MingaEditor.Layout.SurfaceRegistry.Placement (Minga v0.1.0)

Copy Markdown View Source

One placed surface: its identity, rect, z band, and hit kind.

This struct mirrors the surface_placement{surface_id, rect, z, hit_kind} shape the consult locked for the gui_surface_layout wire opcode (#2268), expressed BEAM-side as data. It carries no wire encoding itself; the encoder (a later #2268 child) reads surface_id/rect/z/hit_kind and maps surface_id to u16 via MingaEditor.Layout.SurfaceRegistry.surface_id_u16/1.

MingaEditor.Layout.SurfaceRegistry is the only module that constructs these (one writer per struct).

Summary

Types

t()

A placed surface entry.

Functions

Constructs a placement. Called only by SurfaceRegistry.

Types

t()

@type t() :: %MingaEditor.Layout.SurfaceRegistry.Placement{
  hit_kind: MingaEditor.Layout.SurfaceRegistry.hit_kind(),
  rect: MingaEditor.Layout.rect(),
  surface_id: MingaEditor.Layout.SurfaceRegistry.surface_id(),
  z: non_neg_integer()
}

A placed surface entry.

Functions

new(surface_id, rect, z, hit_kind)

Constructs a placement. Called only by SurfaceRegistry.