Module Brr_io.Clipboard

Clipboard access

See the Clipboard API.

module Item : sig ... end

Clipboard items.

type t

The type for Clipboard objects.

val of_navigator : Brr.Navigator.t -> t

of_navigator n is a clipboard object for navigator n.

val as_target : t ->

as_target c is c as an event target.

Reading and writing

val read : t -> Item.t list Fut.or_error

read c is the content of c.

val read_text : t -> Jstr.t Fut.or_error

read_text c is the clipboard textual content of c.

val write : t -> Item.t list -> unit Fut.or_error

write c is writes the items is to c.

val write_text : t -> Jstr.t -> unit Fut.or_error

write_text c s writes the string s to c.