NSGraphicsContext: Add methods method (#179)

gnustep-back uses the `NSGraphicsContext->methods` _variable_, but using an instance variable across module boundaries is not supported when building with Visual Studio.

This commits adds a `[NSGraphicsContext methods]` _method_, which can be accessed across module boundaries (and hence when building with Visual Studio).
This commit is contained in:
Frederik Carlier 2023-08-01 22:39:46 +02:00 committed by GitHub
parent 0b9924e094
commit eb480b7748
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View file

@ -211,6 +211,7 @@ APPKIT_EXPORT_CLASS
flipped: (BOOL)flipped;
#endif
- (const gsMethodTable *) methods;
- (NSDictionary *) attributes;
- (void *) graphicsPort;

View file

@ -375,6 +375,11 @@ NSGraphicsContext *GSCurrentContext(void)
return context_info;
}
- (const gsMethodTable *) methods
{
return methods;
}
- (void) flushGraphics
{
[self subclassResponsibility: _cmd];