Interface WlOutputEvents
- All Known Subinterfaces:
WlOutputEventsV2
,WlOutputEventsV3
,WlOutputEventsV4
An output describes part of the compositor geometry. The compositor works in the 'compositor coordinate system' and an output corresponds to a rectangular area in that space that is actually visible. This typically corresponds to a monitor that displays part of the compositor space. This object is published as global during start up, or when a monitor is hotplugged.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoid
geometry
(WlOutputProxy emitter, int x, int y, int physicalWidth, int physicalHeight, int subpixel, String make, String model, int transform) properties of the outputvoid
mode
(WlOutputProxy emitter, int flags, int width, int height, int refresh) advertise available modes for the output
-
Field Details
-
VERSION
static final int VERSION- See Also:
-
-
Method Details
-
geometry
void geometry(WlOutputProxy emitter, int x, int y, int physicalWidth, int physicalHeight, int subpixel, @Nonnull String make, @Nonnull String model, int transform) properties of the outputThe geometry event describes geometric properties of the output. The event is sent when binding to the output object and whenever any of the properties change.
The physical size can be set to zero if it doesn't make sense for this output (e.g. for projectors or virtual outputs).
The geometry event will be followed by a done event (starting from version 2).
Clients should use wl_surface.preferred_buffer_transform instead of the transform advertised by this event to find the preferred buffer transform to use for a surface.
Note: wl_output only advertises partial information about the output position and identification. Some compositors, for instance those not implementing a desktop-style output layout or those exposing virtual outputs, might fake this information. Instead of using x and y, clients should use xdg_output.logical_position. Instead of using make and model, clients should use name and description.
- Parameters:
emitter
- The protocol object that emitted the event.x
- x position within the global compositor spacey
- y position within the global compositor spacephysicalWidth
- width in millimeters of the outputphysicalHeight
- height in millimeters of the outputsubpixel
- subpixel orientation of the outputmake
- textual description of the manufacturermodel
- textual description of the modeltransform
- additional transformation applied to buffer contents during presentation
-
mode
advertise available modes for the outputThe mode event describes an available mode for the output.
The event is sent when binding to the output object and there will always be one mode, the current mode. The event is sent again if an output changes mode, for the mode that is now current. In other words, the current mode is always the last mode that was received with the current flag set.
Non-current modes are deprecated. A compositor can decide to only advertise the current mode and never send other modes. Clients should not rely on non-current modes.
The size of a mode is given in physical hardware units of the output device. This is not necessarily the same as the output size in the global compositor space. For instance, the output may be scaled, as described in wl_output.scale, or transformed, as described in wl_output.transform. Clients willing to retrieve the output size in the global compositor space should use xdg_output.logical_size instead.
The vertical refresh rate can be set to zero if it doesn't make sense for this output (e.g. for virtual outputs).
The mode event will be followed by a done event (starting from version 2).
Clients should not use the refresh rate to schedule frames. Instead, they should use the wl_surface.frame event or the presentation-time protocol.
Note: this information is not always meaningful for all outputs. Some compositors, such as those exposing virtual outputs, might fake the refresh rate or the size.
- Parameters:
emitter
- The protocol object that emitted the event.flags
- bitfield of mode flagswidth
- width of the mode in hardware unitsheight
- height of the mode in hardware unitsrefresh
- vertical refresh rate in mHz
-