package libdrm

  1. Overview
  2. Docs

Module Kms.PlaneSource

A plane wraps a Buffer with some extra metadata.

Sourcetype id = [ `Plane ] Id.t
Sourcetype 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;
}
Sourceval list : Device.t -> id list

Get the plane resources.

Note: You must enable Client_cap.atomic mode first.

Sourceval get : Device.t -> id -> t
Sourceval id : t -> id
Sourcetype 'a region = {
  1. x : 'a;
  2. y : 'a;
  3. w : 'a;
  4. h : 'a;
}
Sourceval 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.

Sourceval pp : t Fmt.t

Properties

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

Note: get the format table with get_in_formats.

Sourceval in_fence_fd : Unix.file_descr option property