Crate wayland_headers

Crate wayland_headers 

Source
Expand description

§Wayland Headers for Rust

This library contains minimalist Rust FFI bindings for Wayland in a way that’s roughly equivalent to the official Wayland 1.18.0 headers for C/C++ along with the stable protocols found in wayland-protocols 1.20. It makes no attempt at providing safe or idiomatic Rust wrappers and doesn’t rename any C identifiers to match Rust’s style guidelines.

For example, the following Rust code:

use wayland_headers::wayland_client::*;

is roughly equivalent to the following C code:

#include <wayland-client.h>

This library is based specifically on Wayland 1.18.0 and protocols 1.20 since those are the versions provided by Steam Runtime 3 ‘sniper’.

Using this library does not automatically link against any libwayland-*.so libraries.

§Extension Protocol wl_interface Statics

For the extension protocol wl_interface statics (e.g. xdg_shell_client_protocol::xdg_popup_interface), only external declarations are provided. See wayland-protocol-statics for a convenient way to include their definitions in a Rust program.

Modules§

presentation_time_client_protocol
presentation_time_server_protocol
viewporter_client_protocol
viewporter_server_protocol
wayland_client
wayland_client_core
wayland_client_protocol
wayland_cursor
wayland_egl
wayland_egl_core
wayland_server
wayland_server_core
wayland_server_protocol
wayland_util
wayland_version
xdg_shell_client_protocol
xdg_shell_server_protocol

Macros§

wl_array_for_each
Roughly equivalent to the wl_array_for_each(pos, array) C macro.
wl_client_for_each
Roughly equivalent to the wl_client_for_each(client, list) C macro.
wl_container_of
Roughly equivalent to the wl_container_of(ptr, sample, member) C macro.
wl_list_for_each
Roughly equivalent to the wl_list_for_each(pos, head, member) C macro.
wl_list_for_each_reverse
Roughly equivalent to the wl_list_for_each_reverse(pos, head, member) C macro.
wl_list_for_each_reverse_safe
Roughly equivalent to the wl_list_for_each_reverse_safe(pos, tmp, head, member) C macro.
wl_list_for_each_safe
Roughly equivalent to the wl_list_for_each_safe(pos, tmp, head, member) C macro.
wl_resource_for_each
Roughly equivalent to the wl_resource_for_each(resource, list) C macro.
wl_resource_for_each_safe
Roughly equivalent to the wl_resource_for_each_safe(resource, tmp, list) C macro.