Expected parameter type in GSCallbackHandler

I couldn’t find the documentation concerning the Glyphs Objective-C API for GSCallbackHandler

+ (void)addCallback:(id)target forOperation:(NSString *)operation;

What’s the class for target? The Python API is simpler but I’d rather do this in Objective-C .

I specifically want to listen to DrawForeground notifications.

edit: nevermind, I figured it out.

You need to define a method with the following signature on the target object

- (void)drawForegroundForLayer:(GSLayer *)layer options:(NSDictionary *)options;

1 Like