Module Media.Prop
Media objects properties, capabilities and constraints.
Ranges and constraints
module Bool : sig ... end
bool
constraints.
module Int : sig ... end
int
ranges and constraints.
module Float : sig ... end
float
ranges and constraints.
module Jstr : sig ... end
Jstr
constraints.
Properties
type ('a, 'b, 'c) t
The type for properties of type
'a
whose capabilities are described by'b
and which are constrained by'c
.
type bool_t
= (bool, bool list, Bool.Constraint.t) t
The type for boolean properties.
type int_t
= (int, Int.Range.t, Int.Constraint.t) t
The type for integer properties.
type float_t
= (float, Float.Range.t, Float.Constraint.t) t
The type for floating point properties.
type jstr_t
= (Jstr.t, Jstr.t, Jstr.Constraint.t) t
The type for string properties.
type jstr_enum_t
= (Jstr.t, Jstr.t list, Jstr.Constraint.t) t
The type for string enumeration properties.
val jstr_enum : Jstr.t -> jstr_enum_t
jstr n
is a string enumeration property namedn
.
Low-level interface
type 'a conv
= ('a -> Jv.t) * (Jv.t -> 'a)
'a conv
specifies encoding and decoding functions for JavaScript.
val v : Jstr.t -> 'a conv -> 'b conv -> 'c conv -> ('a, 'b, 'c) t
v v_conv cap_conv constr_conv n
is a new property namedn
whose values are converted withv_conv
, capabilities withcap_conv
and constraints withconstr_conv
.