#[non_exhaustive]#[repr(u8)]pub enum PropTag {
Show 16 variants
FbId = 0,
FbModifier = 1,
CrtcId = 2,
CrtcX = 3,
CrtcY = 4,
CrtcW = 5,
CrtcH = 6,
SrcX = 7,
SrcY = 8,
SrcW = 9,
SrcH = 10,
Rotation = 11,
Alpha = 12,
Zpos = 13,
PixelFormat = 14,
InFenceFd = 15,
}Expand description
Property tags a layer recognizes.
The set is closed: every KMS plane property a layer carries lives
here, and an unrecognized name handed to
Layer::set_property_by_name is
dropped — a kernel commit would reject it with EINVAL anyway, so
accepting it would only hide the typo. The scene writes a few per-plane
extras, such as COLOR_ENCODING and FB_DAMAGE_CLIPS, from plane
capabilities rather than from the layer.
Adding a property means adding a variant here and extending
PropTag::name and PropTag::class. Both are exhaustive matches, so
the compiler names every place that needs updating.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
FbId = 0
FB_ID — the framebuffer to scan out.
FbModifier = 1
FB_MODIFIER — the layout of that framebuffer.
CrtcId = 2
CRTC_ID — which CRTC the plane feeds.
CrtcX = 3
CRTC_X — destination x, in pixels.
CrtcY = 4
CRTC_Y — destination y, in pixels.
CrtcW = 5
CRTC_W — destination width, in pixels.
CrtcH = 6
CRTC_H — destination height, in pixels.
SrcX = 7
SRC_X — source x, 16.16 fixed point.
SrcY = 8
SRC_Y — source y, 16.16 fixed point.
SrcW = 9
SRC_W — source width, 16.16 fixed point.
SrcH = 10
SRC_H — source height, 16.16 fixed point.
Rotation = 11
rotation — rotate/reflect bitmask.
Alpha = 12
alpha — per-plane alpha, u16.
Zpos = 13
zpos — stacking order.
PixelFormat = 14
pixel_format — the FourCC.
InFenceFd = 15
IN_FENCE_FD — a fence the flip waits on.
Implementations§
Source§impl PropTag
impl PropTag
Sourcepub const ALL: [Self; 16]
pub const ALL: [Self; 16]
Every tag, in enum order.
Listing them explicitly rather than deriving a count keeps the
exhaustiveness of PropTag::class meaningful: a variant inserted
without being added here breaks the index-contiguity check in
every_prop_tag_is_classified. One appended at the end is not caught,
so keep the array’s size in step.
Sourcepub const fn class(self) -> PropClass
pub const fn class(self) -> PropClass
Whether this property describes content or placement.
See PropClass. The match is exhaustive by construction: adding a
variant without classifying it is a compile error, which is the whole
reason this is a function rather than a lookup table with a default.