I'm trying to create a SIMBL plugin for Finder to add icon overlay over some files.
I have this code:
@implementation NSObject (FAIconOverlay)
- (void)FAIconOverlay_TIconAndTextCell_drawIconWithFrame:(struct CGRect)arg1
{
[self FAIconOverlay_TIconAndTextCell_drawIconWithFrame:arg1];
if (![self respondsToSelector:@selector(node)]) {
return;
}
NSLog(@"%@", [[[NSClassFromString(@"FINode") nodeWithFENode:[(TNodeIconAndNameCell *)self node]] fullPath] lastPathComponent]);
// Draw the icon overlay
}
- (void)FAIconOverlay_TDesktopIcon_drawIconInContext:(struct CGContext *)arg1
{
[self FAIconOverlay_TDesktopIcon_drawIconInContext:arg1];
}
@end
I can draw the icon overlay but, when I try to get the path of the file I get a "Use of undeclared identifier TNodeIconAndNameCell". Looking this link < How to Write OS X Finder plugin > I see that is neccessary to generate a Finder.h file...
My question is: How to generate this file?? I tried running "class-dump -H Finder.app" but I get too more compiling errors
Thank you very much!
The solution is not include all the headers generated by class-dump (to now how to generate this headers check the @jackjr300 answer). Only is necessary included the used headers and fix the compiling problems.