zwlr_output_head_v1¤
wayland.zwlr_output_head_v1 ¤
Output device
A head is an output device. The difference between a wl_output object and a head is that heads are advertised even if they are turned off. A head object only advertises properties and cannot be used directly to change them.
A head has some read-only properties: modes, name, description and physical_size. These cannot be changed by clients.
Other properties can be updated via a wlr_output_configuration object.
Properties sent via this interface are applied atomically via the wlr_output_manager.done event. No guarantees are made regarding the order in which properties are sent.
Methods:
-
release
–Destroy the head object
-
on_name
–Head name.
-
on_description
–Head description.
-
on_physical_size
–Head physical size.
-
on_mode
–Introduce a mode.
-
on_enabled
–Head is enabled or disabled.
-
on_current_mode
–Current mode.
-
on_position
–Current position.
-
on_transform
–Current transformation.
-
on_scale
–Current scale.
-
on_finished
–The head has disappeared.
-
on_make
–Head manufacturer.
-
on_model
–Head model.
-
on_serial_number
–Head serial number.
-
on_adaptive_sync
–Current adaptive sync state.
events
name ¤
name(name: str) -> None
Head name
This event describes the head name.
The naming convention is compositor defined, but limited to alphanumeric characters and dashes (-). Each name is unique among all wlr_output_head objects, but if a wlr_output_head object is destroyed the same name may be reused later. The names will also remain consistent across sessions with the same hardware and software configuration.
Examples of names include 'HDMI-A-1', 'WL-1', 'X11-1', etc. However, do not assume that the name is a reflection of an underlying DRM connector, X11 connection, etc.
If the compositor implements the xdg-output protocol and this head is enabled, the xdg_output.name event must report the same name.
The name event is sent after a wlr_output_head object is created. This event is only sent once per object, and the name does not change over the lifetime of the wlr_output_head object.
description ¤
description(description: str) -> None
Head description
This event describes a human-readable description of the head.
The description is a UTF-8 string with no convention defined for its contents. Examples might include 'Foocorp 11" Display' or 'Virtual X11 output via :1'. However, do not assume that the name is a reflection of the make, model, serial of the underlying DRM connector or the display name of the underlying X11 connection, etc.
If the compositor implements xdg-output and this head is enabled, the xdg_output.description must report the same description.
The description event is sent after a wlr_output_head object is created. This event is only sent once per object, and the description does not change over the lifetime of the wlr_output_head object.
physical_size ¤
Head physical size
This event describes the physical size of the head. This event is only sent if the head has a physical size (e.g. is not a projector or a virtual device).
The physical size event is sent after a wlr_output_head object is created. This event is only sent once per object, and the physical size does not change over the lifetime of the wlr_output_head object.
Parameters:
mode ¤
mode(mode: zwlr_output_mode_v1) -> None
Introduce a mode
This event introduces a mode for this head. It is sent once per supported mode.
enabled ¤
Head is enabled or disabled
This event describes whether the head is enabled. A disabled head is not mapped to a region of the global compositor space.
When a head is disabled, some properties (current_mode, position, transform and scale) are irrelevant.
Parameters:
current_mode ¤
current_mode(mode: zwlr_output_mode_v1) -> None
Current mode
This event describes the mode currently in use for this head. It is only sent if the output is enabled.
position ¤
transform ¤
transform(transform: transform) -> None
Current transformation
This event describes the transformation currently applied to the head. It is only sent if the output is enabled.
scale ¤
scale(scale: float) -> None
Current scale
This events describes the scale of the head in the global compositor space. It is only sent if the output is enabled.
finished ¤
finished() -> None
The head has disappeared
This event indicates that the head is no longer available. The head object becomes inert. Clients should send a destroy request and release any resources associated with it.
make ¤
make(make: str) -> None
Head manufacturer
This event describes the manufacturer of the head.
This must report the same make as the wl_output interface does in its geometry event.
Together with the model and serial_number events the purpose is to allow clients to recognize heads from previous sessions and for example load head-specific configurations back.
It is not guaranteed this event will be ever sent. A reason for that can be that the compositor does not have information about the make of the head or the definition of a make is not sensible in the current setup, for example in a virtual session. Clients can still try to identify the head by available information from other events but should be aware that there is an increased risk of false positives.
If sent, the make event is sent after a wlr_output_head object is created and only sent once per object. The make does not change over the lifetime of the wlr_output_head object.
It is not recommended to display the make string in UI to users. For that the string provided by the description event should be preferred.
model ¤
model(model: str) -> None
Head model
This event describes the model of the head.
This must report the same model as the wl_output interface does in its geometry event.
Together with the make and serial_number events the purpose is to allow clients to recognize heads from previous sessions and for example load head-specific configurations back.
It is not guaranteed this event will be ever sent. A reason for that can be that the compositor does not have information about the model of the head or the definition of a model is not sensible in the current setup, for example in a virtual session. Clients can still try to identify the head by available information from other events but should be aware that there is an increased risk of false positives.
If sent, the model event is sent after a wlr_output_head object is created and only sent once per object. The model does not change over the lifetime of the wlr_output_head object.
It is not recommended to display the model string in UI to users. For that the string provided by the description event should be preferred.
serial_number ¤
serial_number(serial_number: str) -> None
Head serial number
This event describes the serial number of the head.
Together with the make and model events the purpose is to allow clients to recognize heads from previous sessions and for example load head- specific configurations back.
It is not guaranteed this event will be ever sent. A reason for that can be that the compositor does not have information about the serial number of the head or the definition of a serial number is not sensible in the current setup. Clients can still try to identify the head by available information from other events but should be aware that there is an increased risk of false positives.
If sent, the serial number event is sent after a wlr_output_head object is created and only sent once per object. The serial number does not change over the lifetime of the wlr_output_head object.
It is not recommended to display the serial_number string in UI to users. For that the string provided by the description event should be preferred.
adaptive_sync ¤
adaptive_sync(state: adaptive_sync_state) -> None
Current adaptive sync state
This event describes whether adaptive sync is currently enabled for the head or not. Adaptive sync is also known as Variable Refresh Rate or VRR.
release ¤
release() -> None
Destroy the head object
This request indicates that the client will no longer use this head object.
on_name ¤
on_name(name: str) -> None
Head name.
Override to handle wayland.zwlr_output_head_v1.events.name
.
on_description ¤
on_description(description: str) -> None
Head description.
Override to handle wayland.zwlr_output_head_v1.events.description
.
on_physical_size ¤
Head physical size.
Override to handle wayland.zwlr_output_head_v1.events.physical_size
.
on_mode ¤
on_mode(mode: zwlr_output_mode_v1) -> None
Introduce a mode.
Override to handle wayland.zwlr_output_head_v1.events.mode
.
on_enabled ¤
on_enabled(enabled: int) -> None
Head is enabled or disabled.
Override to handle wayland.zwlr_output_head_v1.events.enabled
.
on_current_mode ¤
on_current_mode(mode: zwlr_output_mode_v1) -> None
Current mode.
Override to handle wayland.zwlr_output_head_v1.events.current_mode
.
on_position ¤
Current position.
Override to handle wayland.zwlr_output_head_v1.events.position
.
on_transform ¤
on_transform(transform: transform) -> None
Current transformation.
Override to handle wayland.zwlr_output_head_v1.events.transform
.
on_scale ¤
on_scale(scale: float) -> None
Current scale.
Override to handle wayland.zwlr_output_head_v1.events.scale
.
on_finished ¤
on_finished() -> None
The head has disappeared.
Override to handle wayland.zwlr_output_head_v1.events.finished
.
on_make ¤
on_make(make: str) -> None
Head manufacturer.
Override to handle wayland.zwlr_output_head_v1.events.make
.
on_model ¤
on_model(model: str) -> None
Head model.
Override to handle wayland.zwlr_output_head_v1.events.model
.
on_serial_number ¤
on_serial_number(serial_number: str) -> None
Head serial number.
Override to handle wayland.zwlr_output_head_v1.events.serial_number
.
on_adaptive_sync ¤
on_adaptive_sync(state: adaptive_sync_state) -> None
Current adaptive sync state.
Override to handle wayland.zwlr_output_head_v1.events.adaptive_sync
.