Window query commands. Results arrive as %Plushie.Event.SystemEvent{} in update/2.
Summary
Functions
Query whether a window is maximized.
Query whether a window is minimized.
Query the monitor size for the display containing a window.
Query the raw platform window ID (e.g. X11 window ID, HWND).
Query the window's current scale factor (DPI scaling).
Query the current window mode (windowed, fullscreen, hidden).
Query the position of a window.
Query the size of a window.
Functions
@spec is_maximized( window_id :: Plushie.Command.window_id(), tag :: Plushie.Command.event_tag() ) :: Plushie.Command.t()
Query whether a window is maximized.
Result arrives as %Plushie.Event.SystemEvent{tag: tag, value: boolean}.
@spec is_minimized( window_id :: Plushie.Command.window_id(), tag :: Plushie.Command.event_tag() ) :: Plushie.Command.t()
Query whether a window is minimized.
Result arrives as %Plushie.Event.SystemEvent{tag: tag, value: boolean}.
@spec monitor_size( window_id :: Plushie.Command.window_id(), tag :: Plushie.Command.event_tag() ) :: Plushie.Command.t()
Query the monitor size for the display containing a window.
Result arrives as %Plushie.Event.SystemEvent{tag: tag, value: data}
where data is %{width: width, height: height} or nil if the
monitor cannot be determined.
@spec raw_id( window_id :: Plushie.Command.window_id(), tag :: Plushie.Command.event_tag() ) :: Plushie.Command.t()
Query the raw platform window ID (e.g. X11 window ID, HWND).
Result arrives as %Plushie.Event.SystemEvent{tag: tag, value: platform_id}.
@spec scale_factor( window_id :: Plushie.Command.window_id(), tag :: Plushie.Command.event_tag() ) :: Plushie.Command.t()
Query the window's current scale factor (DPI scaling).
Result arrives as %Plushie.Event.SystemEvent{tag: tag, value: factor}.
@spec window_mode( window_id :: Plushie.Command.window_id(), tag :: Plushie.Command.event_tag() ) :: Plushie.Command.t()
Query the current window mode (windowed, fullscreen, hidden).
Result arrives as %Plushie.Event.SystemEvent{tag: tag, value: mode}.
@spec window_position( window_id :: Plushie.Command.window_id(), tag :: Plushie.Command.event_tag() ) :: Plushie.Command.t()
Query the position of a window.
Result arrives as %Plushie.Event.SystemEvent{tag: tag, value: data}
where data is %{x: x, y: y} or nil if unavailable.
@spec window_size( window_id :: Plushie.Command.window_id(), tag :: Plushie.Command.event_tag() ) :: Plushie.Command.t()
Query the size of a window.
Result arrives as %Plushie.Event.SystemEvent{tag: tag, value: data}
where data is %{width: width, height: height}.