Module Kms.Plane

A plane wraps a Buffer with some extra metadata.

type id = [ `Plane ] Id.t
type t = {
  1. formats : Fourcc.t list;
  2. plane_id : id;
  3. crtc_id : Crtc.id option;
  4. fb_id : Fb.id option;
  5. crtc_x : int;
  6. crtc_y : int;
  7. x : int;
  8. y : int;
  9. possible_crtcs : int;
}
val list : Device.t -> id list

Get the plane resources.

Note: You must enable Client_cap.atomic mode first.

val get : Device.t -> id -> t
val id : t -> id
type 'a region = {
  1. x : 'a;
  2. y : 'a;
  3. w : 'a;
  4. h : 'a;
}
val set : Device.t -> id -> crtc:Crtc.id -> fb:Fb.id -> src:Ufixed.t region -> dst:int region -> unit

set dev id ~crtc ~fb ~src ~dst sets plane id to show fb region src on crtc at dst.

val pp : t Fmt.t

Properties

type 'a property = ([ `Plane ], 'a) Property.t
val get_properties : Device.t -> id -> [ `Plane ] Properties.Values.t
val typ : [ `Cursor | `Overlay | `Primary | `Unknown of Property.raw_value ] property
val fb_id : [ `Fb ] Id.t option property
val crtc_id : [ `Crtc ] Id.t option property
val crtc_x : int property
val crtc_y : int property
val crtc_w : int property
val crtc_h : int property
val src_x : Ufixed.t property
val src_y : Ufixed.t property
val src_w : Ufixed.t property
val src_h : Ufixed.t property
val get_in_formats : Device.t -> Blob.id -> (Fourcc.t * Modifier.t) list
val in_formats : Blob.id property

Note: get the format table with get_in_formats.

val in_fence_fd : Unix.file_descr option property