# `MingaEditor.Layout.SurfaceRegistry.Placement`
[🔗](https://github.com/jsmestad/minga/blob/main/lib/minga_editor/layout/surface_registry/placement.ex#L1)

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

# `t`

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

# `new`

```elixir
@spec new(
  MingaEditor.Layout.SurfaceRegistry.surface_id(),
  MingaEditor.Layout.rect(),
  non_neg_integer(),
  MingaEditor.Layout.SurfaceRegistry.hit_kind()
) :: t()
```

Constructs a placement. Called only by `SurfaceRegistry`.

---

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