Re: Fullscreen enter/exit notification [After Panther]
Re: Fullscreen enter/exit notification [After Panther]
- Subject: Re: Fullscreen enter/exit notification [After Panther]
- From: Michaël Parrot <email@hidden>
- Date: Wed, 28 Sep 2005 11:32:56 +0200
Perfect !
Thanks a lot !
Example :
------------------------------------------------------------------------
-----------------------------
Controller *controller=nil;
pascal OSErr menuBarShownHidden (EventHandlerCallRef inHandlerRef,
EventRef inEvent, void *data) {
return [controller menuBarShownHidden:inEvent];
}
@implementation Controller
- (OSStatus)menuBarShownHidden:(EventRef)inEvent
{
if (GetEventKind(inEvent) == kEventMenuBarShown)
NSLog(@"kEventMenuBarShown");
else
NSLog(@"kEventMenuBarHidden");
return 0;
}
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
controller=self;
EventTypeSpec opt[] =
{
{ kEventClassMenu, kEventMenuBarShown },
{ kEventClassMenu, kEventMenuBarHidden }
};
OSStatus err;
err=InstallEventHandler(GetEventDispatcherTarget
(),NewEventHandlerUPP((EventHandlerProcPtr) menuBarShownHidden),
2,opt,nil,nil);
if (err != 0)
NSLog(@"Error: InstallEventHandler %d",err);
}
------------------------------------------------------------------------
-----------------------------
Michaël Parrot
Parrot's Softwares
http://www.mparrot.net
On Sep 27, 2005, at 5:18 PM, Eric Schlegel wrote:
On Sep 27, 2005, at 2:22 AM, Michaël Parrot wrote:
Hello,
I read a topic for determine the statusbar visibilty but
notification don't work with Tiger.
http://www.cocoabuilder.com/archive/message/cocoa/
2004/3/23/102291
Do you have a new solution for this ?
Use a Carbon event handler for kEventMenuBarShown/Hidden.
-eric
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden