Something like this in your component .mm (or in xcode get info on the source file and force objective c++ compilation)
NSWindow *w;
ComponentPeer *componentPeer=getPeer();
jassert(componentPeer);
NSView* const peer = (NSView*) (componentPeer->getNativeHandle());
if (peer && (w=[peer window]))
{
[w flipMe]; // I dunno if the above link extends NSWindow via a category...see below
}
// example of extending NSWindow
@implementation NSWindow(WindowFlipperExt)
-(void)flipMe
{
// code to flip the window
}
@end