• 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: accessibility vs dock
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: accessibility vs dock


  • Subject: Re: accessibility vs dock
  • From: Joshua Kifer <email@hidden>
  • Date: Tue, 9 Dec 2003 17:58:12 -0500

On Dec 9, 2003, at 2:33 PM, Eric Schlegel wrote:

It uses notifications sent by CoreGraphics. At the Carbon event level, these notifications are turned into kEventClassApplication events: kEventAppFrontSwitched, kEventAppLaunched, kEventAppTerminated. Currently there's no Carbon event to indicate when some other application is hidden, though.

Ok, I've implemented like so (below), the return code from InstallApplicationEventHandler is 0 (success?), yet I'm still not receive any events. Any ideas why this doesn't work?


@implementation BARDWorkspaceAdditions

+ (id) alloc
{
return nil;
}

+ (void) enable
{
static BOOL enabled = NO;
if (enabled == NO)
{
NSLog(@"Enabling workspace additions.");
enabled = YES;

ProcessSerialNumber junkPSN;
GetCurrentProcess(&junkPSN);

EventHandlerUPP handlerUPP = NewEventHandlerUPP(BARDWorkspaceAdditionsEventHandler);
EventTypeSpec eventTypes[3];
eventTypes[0].eventClass = kEventClassApplication;
eventTypes[0].eventKind = kEventAppLaunched;
eventTypes[1].eventClass = kEventClassApplication;
eventTypes[1].eventKind = kEventAppTerminated;
eventTypes[2].eventClass = kEventClassApplication;
eventTypes[2].eventKind = kEventAppFrontSwitched;
NSLog(@"%d", InstallApplicationEventHandler(handlerUPP, 3, eventTypes, NULL, NULL));
}
}

@end

pascal OSStatus BARDWorkspaceAdditionsEventHandler(EventHandlerCallRef nextHandler,
EventRef event, void* userData)
{
NSLog(@"Event");
return noErr;
}
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
References: 
 >accessibility vs dock (From: Joshua Kifer <email@hidden>)
 >Re: accessibility vs dock (From: Eric Schlegel <email@hidden>)

  • Prev by Date: (LaunchServices) OS X 10.3 file extensions/mime-types with LaunchServices
  • Next by Date: Re: (LaunchServices) OS X 10.3 file extensions/mime-types with LaunchServices
  • Previous by thread: Re: accessibility vs dock
  • Next by thread: Re: accessibility vs dock
  • Index(es):
    • Date
    • Thread