# `Plushie.Command.WindowQuery`
[🔗](https://github.com/plushie-ui/plushie-elixir/blob/v0.7.2/lib/plushie/command/window_query.ex#L1)

Window query commands. Results arrive as `%Plushie.Event.SystemEvent{}` in `update/2`.

# `is_maximized`

```elixir
@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}`.

# `is_minimized`

```elixir
@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}`.

# `monitor_size`

```elixir
@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.

# `raw_id`

```elixir
@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}`.

# `scale_factor`

```elixir
@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}`.

# `window_mode`

```elixir
@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}`.

# `window_position`

```elixir
@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.

# `window_size`

```elixir
@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}`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
