package wayland

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Handler for a proxy with version >= 2.

constraint 'a = [< `V2 | `V3 ]
method private virtual on_geometry : [> `V2 | `V3 ] t -> x:int32 -> y:int32 -> physical_width:int32 -> physical_height:int32 -> subpixel:{Imports}1.Wl_output.Subpixel.t -> make:string -> model:string -> transform:{Imports}1.Wl_output.Transform.t -> unit

Properties of the output.

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

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 xdg_output.name and xdg_output.description.

method private virtual on_mode : [> `V2 | `V3 ] t -> flags:{Imports}1.Wl_output.Mode.t -> width:int32 -> height:int32 -> refresh:int32 -> unit

Advertise available modes for the output.

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

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.

method private virtual on_done : [> `V2 | `V3 ] t -> unit

Sent all information about output.

This event is sent after all other properties have been sent after binding to the output object and after any other property changes done after that. This allows changes to the output properties to be seen as atomic, even if they happen via multiple events.

method private virtual on_scale : [> `V2 | `V3 ] t -> factor:int32 -> unit

Output scaling properties.

This event contains scaling geometry information that is not in the geometry event. It may be sent after binding the output object or if the output scale changes later. If it is not sent, the client should assume a scale of 1.

A scale larger than 1 means that the compositor will automatically scale surface buffers by this amount when rendering. This is used for very high resolution displays where applications rendering at the native resolution would be too small to be legible.

It is intended that scaling aware clients track the current output of a surface, and if it is on a scaled output it should use wl_surface.set_buffer_scale with the scale of the output. That way the compositor can avoid scaling the surface, and the client can supply a higher detail image.

method min_version : int32
method bind_version : [ `V2 ]
OCaml

Innovation. Community. Security.