Window Events
The window will automatically emit the following events (and intentions) during its lifecycle.
To subscribe to events, you can use direct access to the event listener, using Window::$events
property.
The window instance also supports a more convenient and simple way of registering events using the on()
method.
Closing Intention
An Boson\Window\Event\WindowClosing
intention to close the window.
Closed Event
An Boson\Window\Event\WindowClosed
event fired after the window has been closed and the Boson\Window\Event\WindowClosing
intention has not been cancelled.
Created Event
An Boson\Window\Event\WindowCreated
event fired after window has been created.
Decorated Event
An Boson\Window\Event\WindowDecorated
event fired after window controls visibility changed.
$isDecorated
- Visibility status of the OS window controls.
Decoration Changed Event
An Boson\Window\Event\WindowDecorationChanged
event fired after window decoration has been changed.
$decoration
- Decorations type of the window.$previous
- Previous decorations type of the window.
Focused Event
An Boson\Window\Event\WindowFocused
event fired after window focus has been changed.
$isFocused
- Window focus status.
Maximized Event
An Boson\Window\Event\WindowMaximized
event fired after window maximized state has been changed.
$isMaximized
- Window maximized status.
Minimized Event
An Boson\Window\Event\WindowMinimized
event fired after window minimized state has been changed.
$isMinimized
- Window minimized status.
Resized Event
An Boson\Window\Event\WindowResized
event fired after window size has been changed.
$width
- Window width dimension in pixels.$height
- Window height dimension in pixels.
State Changed Event
An Boson\Window\Event\WindowStateChanged
event fired after window state has been changed.
$state
- State type of the window.$previous
- Previous state type of the window.