It might be easier to simply run a barebones Carbon or Cocoa event
loop in your little app (both are built on top of CFRunLoop) and
then use the Carbon or Cocoa notifications.
Right now my little app is a command-line tool. Does it need to be a
bundle with an Info.plist to have a Carbon event loop?
No, it doesn't. However, I remembered that there's also a notification
posted at the CoreGraphics level (which I think is what Carbon and
Cocoa listen for) that you could check using just a CFRunLoop-based
app. See CGSession.h and kCGNotifyGUIConsoleSessionChanged. You can
use CFNotificationCenterGetDarwinNotifyCenter to get a notification
center object to which you can add an observer for the
ConsoleSessionChanged notification.
-eric
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartz-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartz-dev/email@hidden