Emerge.Config.Window (Emerge v0.5.1)

Copy Markdown View Source

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

%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.

Summary

Types

Window platform. Automatic selects the current platform.

Canonical form after nested keyword records have been expanded.

t()

Types

backend()

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

Window platform. Automatic selects the current platform.

normalized_t()

@type normalized_t() :: t()

Canonical form after nested keyword records have been expanded.

t()

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