Documentation ¶
Overview ¶
Package window defines events associated with windows -- including changes in the dimensions, physical resolution and orientation of the app's window, and iconify, open and close events.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var KiT_Actions = kit.Enums.AddEnum(ActionsN, kit.NotBitFlag, nil)
Functions ¶
This section is empty.
Types ¶
type Actions ¶
type Actions int32
Actions is the action taken on the window by the user.
const ( // Close means that the window is about to close, but has not yet closed. Close Actions = iota // Minimize means that the window has been iconified / miniaturized / is no // longer visible. Minimize // Resize means that the window was resized, including changes in DPI // associated with moving to a new screen. Position may have also changed // too. Requires a redraw. Resize // Move means that the window was moved but NOT resized or changed in any // other way -- does not require a redraw, but anything tracking positions // will want to update. Move // Focus indicates that the window has been activated for receiving user // input. Focus // DeFocus indicates that the window is no longer activated for // receiving input. DeFocus // Paint indicates a request to repaint the window. Paint // Show is for the WindowShow event Show // ScreenUpdate occurs when any of the screen information is updated // This event is sent to the first window on the list of active windows // and it should then perform any necessary updating ScreenUpdate ActionsN )
func (*Actions) FromString ¶
type Event ¶
type Event struct { oswin.EventBase // Action taken on the window -- what has changed. Window state fields // have current values. Action Actions }
window.Event reports on actions taken on a window. The oswin.Window Flags and other state information will always be updated prior to this event being sent, so those should be consulted directly for the new current state.
type FocusEvent ¶
type FocusEvent struct {
Event
}
window.FocusEvent is for synthetic window focus event that is sent to widget consumers sent when user focus on window changes (action is Focus or DeFocus) all other window events go from OS to window consumer but are not forwarded.
func (*FocusEvent) Type ¶
func (ev *FocusEvent) Type() oswin.EventType