# `Emerge.Config.Window`
[🔗](https://github.com/emerge-elixir/emerge/blob/v0.5.1/lib/emerge/config/window.ex#L1)

A desktop window. Set this record as `Emerge.Config.output`.

```elixir
%Emerge.Config{
  output: %Emerge.Config.Window{title: "My App", size: {1024, 768}}
}
```

## Fields

- `backend` — `:auto` (default), `:wayland` or `:macos`. Automatic selection uses
  the platform's window backend. This is separate from the drawing API in
  `Emerge.Config.Renderer`.
- `title` — window title; defaults to `"Emerge"`.
- `size` — initial `{width, height}` in positive integer surface pixels;
  defaults to `{800, 600}`. The window manager can choose a different size.
- `always_on_top` — macOS floating-window preference; defaults to `false`.
  It has no effect on Wayland.

## Changing settings

`title` can change through the viewport's `config` callback on Wayland and macOS.
Changing the other fields requires starting a new viewport. `size` is not a
command to resize an existing window.

# `backend`

```elixir
@type backend() :: :auto | :wayland | :macos
```

Window platform. Automatic selects the current platform.

# `normalized_t`

```elixir
@type normalized_t() :: t()
```

Canonical form after nested keyword records have been expanded.

# `t`

```elixir
@type t() :: %Emerge.Config.Window{
  always_on_top: boolean(),
  backend: backend(),
  size: {pos_integer(), pos_integer()},
  title: String.t()
}
```

---

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