class NativeWindowDisplayStateEvent
package openfl.events
extends Event
Available on AIR, Android, HashLink, Linux, Neko, Windows, iOS, macOS
A NativeWindow object dispatches events of the NativeWindowDisplayStateEvent class when the window display state changes.
See also:
Static variables
staticinlineread onlyDISPLAY_STATE_CHANGE:EventType<NativeWindowDisplayStateEvent> = "displayStateChange"
Defines the value of the type
property of a displayStateChange
event object.
This event has the following properties:
Property | Value |
---|---|
afterDisplayState | The old display state of the window. |
beforeDisplayState | The new display state of the window. |
target | The NativeWindow object that has just changed state. |
bubbles | false |
cancelable | false ; There is no default behavior to cancel. |
currentTarget | The object that is actively processing the Event object with an event listener. |
staticinlineread onlyDISPLAY_STATE_CHANGING:EventType<NativeWindowDisplayStateEvent> = "displayStateChanging"
Defines the value of the type
property of a displayStateChanging
event object.
This event has the following properties:
Property | Value |
---|---|
afterDisplayState | The display state of the window before the pending change. |
beforeDisplayState | The display state of the window after the pending change. |
target | The NativeWindow object that has just changed state. |
bubbles | false |
cancelable | true ; canceling the event will prevent the change. |
currentTarget | The object that is actively processing the Event object with an event listener. |
Constructor
new(type:String, bubbles:Bool = false, cancelable:Bool = false, ?beforeDisplayState:NativeWindowDisplayState, ?afterDisplayState:NativeWindowDisplayState)
Creates an Event object with specific information relevant to window display state events. Event objects are passed as parameters to event listeners.
Variables
afterDisplayState:NativeWindowDisplayState
The display state of the NativeWindow after the change.
If the event is displayStateChanging
, the display state has not yet\
changed; afterDisplayState
indicates the new display state if the
event is not canceled. If the event is displayStateChanged
,
afterDisplayState
indicates the current value.
beforeDisplayState:NativeWindowDisplayState
The display state of the NativeWindow before the change.
If the event is displayStateChanging
, the display state has not yet
changed; beforeDisplayState
reflects the Window's current display
state. If the event is displayStateChanged
, beforeDisplayState
indicates the previous value.