package wayland

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
class type ['a, 'v, 'role] t = object ... end

An ('a, 'v) t handles incoming messages for an object of type 'a. Typically, a constructor will let the user pick from a range of versions for 'v, which will then be constrained by the spawn call.

val cast_version : ('a, _, 'role) t -> ('a, _, 'role) t

If the version rules turn out to be too restrictive, this can be used to disable them. Using this incorrectly may lead to a protocol error (such as receiving an event for which no handler was registered).

val accept_new : (_, 'v, [< `Client | `Server ] as 'role) proxy -> (module Metadata.S with type t = 'a) -> int32 -> ('a, 'v, 'role) proxy

accept_new parent id registers a new object, with an ID allocated by the peer. The resulting proxy is in a half-initialised state. You must call attach on it before switching threads or doing anything else with it.

val attach : ('a, 'v, 'role) proxy -> ['a, 'v, 'role] t -> unit

attach proxy t sets t as the handler for proxy, which must be a partly initialised proxy returned by accept_new.

OCaml

Innovation. Community. Security.