Global Variable

NSWorkspaceWillSleepNotification

A notification that the workspace posts before the machine goes to sleep.

Declaration

NSNotificationName NSWorkspaceWillSleepNotification;

Discussion

An observer of this message can delay sleep for up to 30 seconds while handling this notification.

The notification object is the shared NSWorkspace instance. The notification does not contain a userInfo dictionary.

See Also

Responding to Environment Notifications

NSWorkspaceWillLaunchApplicationNotification

A notification that the workspace posts when the Finder is about to launch an app.

NSWorkspaceDidLaunchApplicationNotification

A notification that the workspace posts when a new app has started up.

NSWorkspaceDidTerminateApplicationNotification

A notification that the workspace posts when an app finishes executing.

NSWorkspaceSessionDidBecomeActiveNotification

A notification that the workspace posts after a user session is switched in.

NSWorkspaceSessionDidResignActiveNotification

A notification that the workspace posts before a user session is switched out.

NSWorkspaceDidHideApplicationNotification

A notification that the workspace posts when the Finder hid an app.

NSWorkspaceDidUnhideApplicationNotification

A notification that the workspace posts when the Finder unhid an app.

NSWorkspaceDidActivateApplicationNotification

A notification that the workspace posts when the Finder is about to activate an app.

NSWorkspaceDidDeactivateApplicationNotification

A notification that the workspace posts when the Finder deactivated an app.

NSWorkspaceDidRenameVolumeNotification

A notification that the workspace posts when a volume changes its name or mount path.

NSWorkspaceDidMountNotification

A notification that the workspace posts when a new device has been mounted.

NSWorkspaceWillUnmountNotification

A notification that the workspace posts when the Finder is about to unmount a device.

NSWorkspaceDidUnmountNotification

A notification that the workspace posts when the Finder unmounts a device.

NSWorkspaceDidChangeFileLabelsNotification

A notification that the workspace posts when the Finder file labels or colors change.

NSWorkspaceActiveSpaceDidChangeNotification

A notification that the workspace posts when a Spaces change occurs.

NSWorkspaceDidWakeNotification

A notification that the workspace posts when the machine wakes from sleep.

NSWorkspaceWillPowerOffNotification

A notification that the workspace posts when the user requests a logout or powers off the machine.

NSWorkspaceScreensDidSleepNotification

A notification that the workspace posts when the machine’s screen goes to sleep.

NSWorkspaceScreensDidWakeNotification

A notification that the workspace posts when the machine’s screens wake.

NSWorkspaceAccessibilityDisplayOptionsDidChangeNotification

A notification that the workspace posts when any of the accessibility display options change.

NSWorkspaceVolumeLocalizedNameKey

A string containing the user-visible name of the volume.

NSWorkspaceVolumeURLKey

A URL containing the mount path of the volume.

NSWorkspaceVolumeOldLocalizedNameKey

A string containing the old user-visible name of the volume

NSWorkspaceVolumeOldURLKey

A URL containing the old mount path of the volume