Module Properties.Values

type 'a t = private {
  1. metadata : 'a metadata;
  2. values : Unsigned.UInt64.t Property.Map.t;
}
val get : Device.t -> 'a Type.t -> 'a Id.t -> 'a t

get dev ty id gets the properties (values and types) for object id (of type ty).

Use Drm.Client_cap.(set atomic) dev true before calling this to get all the properties.

val get_value : 'a t -> ('a, 'v) Property.t -> 'v option

get_value t p gets the value of p (retrieved at the time of the get).

val get_value_exn : 'a t -> ('a, 'v) Property.t -> 'v
val pp : _ t Fmt.t

Low-level API

type raw = binding list
val pp_binding : binding Fmt.t
val get_raw : Device.t -> 'a Type.t -> 'a Id.t -> raw

get_raw dev id ty returns the raw (id, value) pairs without getting the metadata.

This isn't very useful, because the IDs aren't standardised, so you usually need the names too.

val of_raw : Device.t -> 'a Type.t -> 'a Id.t -> raw -> 'a t