I haven't found declarations for these events in a header anywhere, and I'm not certain that they're part of any published API, but the events are observable, at least in Leopard.

Observing screen lock/unlock is then a simple a matter of adding yourself as an observer for the screenIsLocked and screenIsUnlocked event. In Cocoa, you'd do something like this to register for these events.

Your observers will never get called as the object you tell the notification centre to send notifications to is nil. You need to provide a valid instance of the class ScreenLock to get called. This is the same for all notifications.

Ok Fine..
In leopard, i am able to get all these notifications;
com.apple.screensaver.didstart
com.apple.screensaver.willstop
com.apple.screensaver.didstop
com.apple.screenIsLocked
com.apple.screenIsUnlocked

But in Tiger, following are not getting notified;
com.apple.screenIsLocked
com.apple.screenIsUnlocked

Any other way to get 'screenIsLocked', 'screenIsUnlocked' notifications in Tiger?