• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Fullscreen enter/exit notification [After Panther]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Fullscreen enter/exit notification [After Panther] (From: Michaël Parrot <email@hidden>)
 >Re: Fullscreen enter/exit notification [After Panther] (From: Eric Schlegel <email@hidden>)

  • Prev by Date: Core Data App vs. Core Data Doc-based App: which is appropriate?
  • Next by Date: Re: Apple Event Model to register for click on finder menu item
  • Previous by thread: Re: Fullscreen enter/exit notification [After Panther]
  • Next by thread: Apple Event Model to register for click on finder menu item
  • Index(es):
    • Date
    • Thread