gizlang/libwayland
the Wayland client library of a Linux desktop (libwayland-client), beside the wire (client.giz). A window of gizlang/window speaks through it on Linux, so its wl_surface is one a GPU driver can draw into (Vulkan's and EGL's Wayland surfaces take libwayland objects). GizOS has no libwayland: its windows speak the wire themselves (gizlang/wayland). Each declaration has the C function's own types: a pointer is u64, an int i32, a uint32_t u32.
import * as Libwayland from "gizlang/libwayland";Functions
wl_display_connect
function wl_display_connect(name: u64): u64 from LIBWAYLANDConnects to the compositor named NAME (a C string; 0: WAYLAND_DISPLAY): the wl_display, or 0.
Effects: fail, io, alloc.
wl_display_connect_to_fd
function wl_display_connect_to_fd(fd: i32): u64 from LIBWAYLANDConnects over the open socket FD: the wl_display, or 0.
Effects: fail, io, alloc.
wl_display_disconnect
function wl_display_disconnect(display: u64): void from LIBWAYLANDCloses the connection of DISPLAY and frees it.
Effects: fail, io, alloc.
wl_display_get_fd
function wl_display_get_fd(display: u64): i32 from LIBWAYLANDThe socket of DISPLAY, to poll for events.
Effects: fail, io, alloc.
wl_display_flush
function wl_display_flush(display: u64): i32 from LIBWAYLANDSends the requests that DISPLAY holds: the bytes sent, or -1.
Effects: fail, io, alloc.
wl_display_prepare_read
function wl_display_prepare_read(display: u64): i32 from LIBWAYLANDReadies DISPLAY to read events from its socket: 0, or -1 when events wait to be dispatched first.
Effects: fail, io, alloc.
wl_display_read_events
function wl_display_read_events(display: u64): i32 from LIBWAYLANDReads the events on the socket of DISPLAY after prepare_read: 0, or -1.
Effects: fail, io, alloc.
wl_display_cancel_read
function wl_display_cancel_read(display: u64): void from LIBWAYLANDEnds a prepare_read of DISPLAY that reads nothing.
Effects: fail, io, alloc.
wl_display_dispatch_pending
function wl_display_dispatch_pending(display: u64): i32 from LIBWAYLANDRuns the dispatchers of the events that DISPLAY has read: their count, or -1.
Effects: fail, io, alloc.
wl_display_get_error
function wl_display_get_error(display: u64): i32 from LIBWAYLANDThe last error of DISPLAY (an errno), or 0.
Effects: fail, io, alloc.
wl_proxy_marshal_array_flags
function wl_proxy_marshal_array_flags(proxy: u64, opcode: u32, made: u64, version: u32, flags: u32, args: u64): u64 from LIBWAYLANDSends request OPCODE of PROXY with the wl_argument array ARGS; MADE is the interface of a new object: it, or 0.
Effects: fail, io, alloc.
wl_proxy_add_dispatcher
function wl_proxy_add_dispatcher(proxy: u64, dispatcher: (implementation: u64, proxy: u64, opcode: u32, message: u64, args: u64) => i32, implementation: u64, data: u64): i32 from LIBWAYLANDSets DISPATCHER for every event of PROXY: its opcode, its wl_message and its wl_argument array.
Effects: fail, io, alloc.
wl_proxy_get_version
function wl_proxy_get_version(proxy: u64): u32 from LIBWAYLANDThe interface version of PROXY.
Effects: fail, io, alloc.
wl_proxy_set_user_data
function wl_proxy_set_user_data(proxy: u64, data: u64): void from LIBWAYLANDKeeps DATA with PROXY.
Effects: fail, io, alloc.
wl_proxy_get_user_data
function wl_proxy_get_user_data(proxy: u64): u64 from LIBWAYLANDThe data kept with PROXY.
Effects: fail, io, alloc.