Re: Application launched/quit notification
Re: Application launched/quit notification
- Subject: Re: Application launched/quit notification
- From: Bill Cheeseman <email@hidden>
- Date: Sun, 20 Jun 2010 20:29:14 -0400
On Jun 20, 2010, at 7:01 PM, Ryan Joseph wrote:
> Why aren't there some obvious application launched/quit notifications
I can only speculate, but I think the accessibility API was designed to deal with a particular scope of issues, defined by the need to emulate the graphical user interface of the Mac for the benefit of people who can't see the screen. That is primarily an application-centric issue. The only area where the accessibility API extends beyond individual applications is the special "systemwide" UI element, which you can use to identify all applications running on the machine in order to get at all their windows.
You have to turn to other APIs to get other information. For example, in Cocoa on Snow Leopard, the NSWorkspace class has a number of new notifications that do exactly what you want. For example, NSWorkspaceDidActivateApplicationNotification tells you when the Finder is about to activate an application. Similar notifications deal with deactivation, hide/unhide application, launch/terminate application, and others.
Still other APIs let you respond to other events on the computer. My particular favorite is Quartz Event Taps, which let you respond to user input events (keyboard, mouse, scrollwheel, tablet, etc.) no matter what application they are aimed at. Another is the new FSEvents API which lets you respond to file system activity.
To solve a particular problem, you may have to look beyond the accessibility API to these other APIs.
--
Bill Cheeseman - email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Accessibility-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden