package wayland

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

Handler for a proxy with version >= 1.

constraint 'a = [< `V1 ]
method private virtual on_create_buffer : [> `V1 ] t -> ([ `Wl_buffer ], 'a, [ `Server ]) Wayland__.Proxy.t -> offset:int32 -> width:int32 -> height:int32 -> stride:int32 -> format:{Imports}1.Wl_shm.Format.t -> unit

Create a buffer from the pool.

Create a wl_buffer object from the pool.

The buffer is created offset bytes into the pool and has width and height as specified. The stride argument specifies the number of bytes from the beginning of one row to the beginning of the next. The format is the pixel format of the buffer and must be one of those advertised through the wl_shm.format event.

A buffer will keep a reference to the pool it was created from so it is valid to destroy the pool immediately after creating a buffer from it.

method private virtual on_destroy : [> `V1 ] t -> unit

Destroy the pool.

Destroy the shared memory pool.

The mmapped memory will be released when all buffers that have been created from this pool are gone.

method private virtual on_resize : [> `V1 ] t -> size:int32 -> unit

Change the size of the pool mapping.

This request will cause the server to remap the backing memory for the pool from the file descriptor passed when the pool was created, but using the new size. This request can only be used to make the pool bigger.

This request only changes the amount of bytes that are mmapped by the server and does not touch the file corresponding to the file descriptor passed at creation time. It is the client's responsibility to ensure that the file is at least as big as the new pool size.

method min_version : int32
OCaml

Innovation. Community. Security.