package wayland

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Shared memory support.

A singleton global object that provides support for shared memory.

Clients can create wl_shm_pool objects using the create_pool request.

On binding the wl_shm object one or more format events are emitted to inform clients about the valid pixel formats that can be used for buffers.

type 'v t = ([ `Wl_shm ], 'v, [ `Client ]) Proxy.t

Version 1

val create_pool : [< `V1 | `V2 ] as 'a t -> [[ `Wl_shm_pool ], 'b, [ `Client ]] Proxy.Handler.t -> fd:Unix.file_descr -> size:int32 -> ([ `Wl_shm_pool ], 'c, [ `Client ]) Proxy.t

Create a shm pool.

Create a new wl_shm_pool object.

The pool can be used to create shared memory based buffer objects. The server will mmap size bytes of the passed file descriptor, to use as backing memory for the pool.

Version 2

val release : [< `V2 ] t -> unit

Release the shm object.

Using this request a client can tell the server that it is not going to use the shm object anymore.

Objects created via this interface remain unaffected.

Handlers

Note: Servers will always want to use v1.

class virtual +'a v1 : object ... end

Handler for a proxy with version >= 1.

class virtual +'a v2 : object ... end

Handler for a proxy with version >= 2.

OCaml

Innovation. Community. Security.