Events
Phoenix supports the following (case sensitive) events. Use these to construct an Event.
Phoenix
didLaunch
triggered once when Phoenix has launched and the context is readywillTerminate
triggered when Phoenix will terminate, use this event to perform any tasks before the application terminates
Device
3.0.0+
deviceWillSleep
triggered when the device will sleepdeviceDidWake
triggered when the device did wake
Screen
screensDidChange
triggered when screens (i.e. displays) are added, removed, or dynamically reconfigured
Space
spaceDidChange
triggered when the active space has changed
Mouse
All of the following mouse events receive the corresponding Point
object as the first argument for the callback function. This object is also enhanced with a modifiers
array which contains the key modifiers pressed when the mouse event is triggered.
mouseDidMove
triggered when the mouse has movedmouseDidLeftClick
triggered when the mouse did left clickmouseDidRightClick
triggered when the mouse did right clickmouseDidLeftDrag
triggered when the mouse did left dragmouseDidRightDrag
triggered when the mouse did right drag
4.0.0+
mouseDidOtherClick
triggered when the mouse did tertiary clickmouseDidOtherDrag
triggered when the mouse did tertiary drag
App
All of the following app events receive the corresponding App
instance as the first argument for the callback function.
appDidLaunch
triggered when an app has launchedappDidTerminate
triggered when an app has terminatedappDidActivate
triggered when an app has activatedappDidHide
triggered when an app becomes hiddenappDidShow
triggered when an app is shown (becomes unhidden)
Window
All of the following window events receive the corresponding Window
instance as the first argument for the callback function.
windowDidOpen
triggered when a window has openedwindowDidClose
triggered when a window has closedwindowDidFocus
triggered when a window was focused within an appwindowDidMove
triggered when a window has movedwindowDidResize
triggered when a window has resizedwindowDidMinimise
orwindowDidMinimize
triggered when a window has minimisedwindowDidUnminimise
orwindowDidUnminimize
triggered when a window has unminimised