pub const WL_SHM_FORMAT_ARGB8888: u32 = 0;
pub const WL_SHM_FORMAT_XRGB8888: u32 = 1;
pub(crate) const LINUX_LIB_X11: &str = "libX11.so.6\0";
pub(crate) const LINUX_LIB_WAYLAND: &str = "libwayland-client.so.0\0";
pub(crate) const LINUX_LIB_XRANDR: &str = "libXrandr.so.2\0";
pub(crate) const LINUX_LIB_XEXT: &str = "libXext.so.6\0";
pub(crate) const LINUX_LIB_VULKAN: &str = "libvulkan.so.1\0";
pub(crate) const LINUX_WAYLAND_DISPLAY_ENV: &str = "WAYLAND_DISPLAY";
pub(crate) const LINUX_FORCE_X11_ENV: &str = "EUV_LINUX_FORCE_X11";
pub(crate) const SYM_XSHM_QUERY_EXTENSION: &str = "XShmQueryExtension\0";
pub(crate) const SYM_XSHM_CREATE_IMAGE: &str = "XShmCreateImage\0";
pub(crate) const SYM_XSHM_ATTACH: &str = "XShmAttach\0";
pub(crate) const SYM_XSHM_DETACH: &str = "XShmDetach\0";
pub(crate) const SYM_XSHM_PUT_IMAGE: &str = "XShmPutImage\0";
pub(crate) const SYM_WL_DISPLAY_DISPATCH_PENDING: &str = "wl_display_dispatch_pending\0";
pub(crate) const SYM_WL_DISPLAY_DISPATCH: &str = "wl_display_dispatch\0";
pub(crate) const SYM_WL_DISPLAY_FLUSH: &str = "wl_display_flush\0";
pub(crate) const SYM_WL_DISPLAY_ROUNDTRIP: &str = "wl_display_roundtrip\0";
pub(crate) const SYM_WL_DISPLAY_DISCONNECT: &str = "wl_display_disconnect\0";
pub(crate) const SYM_VK_CREATE_WAYLAND_SURFACE: &str = "vkCreateWaylandSurfaceKHR\0";
pub(crate) const SYM_XRR_GET_SCREEN_INFO: &str = "XRRGetScreenInfo\0";
pub(crate) const SYM_XRR_CONFIG_CURRENT_RATE: &str = "XRRConfigCurrentRate\0";
pub(crate) const SYM_XRR_FREE_SCREEN_CONFIG_INFO: &str = "XRRFreeScreenConfigInfo\0";
pub(crate) const LINUX_REFRESH_ENV_VAR: &str = "EUV_REFRESH_RATE_HZ";
pub(crate) const SYM_X_OPEN_DISPLAY: &str = "XOpenDisplay\0";
pub(crate) const SYM_X_DEFAULT_SCREEN: &str = "XDefaultScreen\0";
pub(crate) const SYM_X_ROOT_WINDOW: &str = "XRootWindow\0";
pub(crate) const SYM_X_CREATE_SIMPLE_WINDOW: &str = "XCreateSimpleWindow\0";
pub(crate) const SYM_X_STORE_NAME: &str = "XStoreName\0";
pub(crate) const SYM_X_MAP_WINDOW: &str = "XMapWindow\0";
pub(crate) const SYM_X_RESIZE_WINDOW: &str = "XResizeWindow\0";
pub(crate) const SYM_X_DESTROY_WINDOW: &str = "XDestroyWindow\0";
pub(crate) const SYM_X_FLUSH: &str = "XFlush\0";
pub(crate) const SYM_X_DEFAULT_GC: &str = "XDefaultGC\0";
pub(crate) const SYM_X_DEFAULT_VISUAL: &str = "XDefaultVisual\0";
pub(crate) const SYM_X_DEFAULT_DEPTH: &str = "XDefaultDepth\0";
pub(crate) const SYM_X_CREATE_IMAGE: &str = "XCreateImage\0";
pub(crate) const SYM_X_PUT_IMAGE: &str = "XPutImage\0";
pub(crate) const SYM_X_FREE: &str = "XFree\0";
pub(crate) const SYM_X_SELECT_INPUT: &str = "XSelectInput\0";
pub(crate) const SYM_X_INTERN_ATOM: &str = "XInternAtom\0";
pub(crate) const SYM_X_SET_WM_PROTOCOLS: &str = "XSetWMProtocols\0";
pub(crate) const SYM_X_PENDING: &str = "XPending\0";
pub(crate) const SYM_X_NEXT_EVENT: &str = "XNextEvent\0";
pub(crate) const SYM_X_LOOKUP_STRING: &str = "XLookupString\0";
pub(crate) const SYM_X_RESOURCE_MANAGER_STRING: &str = "XResourceManagerString\0";
pub(crate) const SYM_WL_DISPLAY_CONNECT: &str = "wl_display_connect\0";
pub(crate) const ATOM_WM_DELETE_WINDOW: &str = "WM_DELETE_WINDOW\0";
pub(crate) const LINUX_DPI_ENV_VARS: [&str; 3] =
["EUV_SCALE_FACTOR", "GDK_SCALE", "QT_SCALE_FACTOR"];
pub(crate) const XFT_DPI_PREFIX: &str = "Xft.dpi:";
pub(crate) const X11_DEFAULT_DPI: f32 = 96.0;
pub(crate) const RTLD_LAZY: i32 = 1;
pub(crate) const X11_Z_PIXMAP: i32 = 2;
pub(crate) const X11_EVENT_MASK: isize = 0x0023_804F;
pub(crate) const X11_KEY_PRESS: i32 = 2;
pub(crate) const X11_KEY_RELEASE: i32 = 3;
pub(crate) const X11_BUTTON_PRESS: i32 = 4;
pub(crate) const X11_BUTTON_RELEASE: i32 = 5;
pub(crate) const X11_MOTION_NOTIFY: i32 = 6;
pub(crate) const X11_FOCUS_IN: i32 = 9;
pub(crate) const X11_FOCUS_OUT: i32 = 10;
pub(crate) const X11_EXPOSE: i32 = 12;
pub(crate) const X11_DESTROY_NOTIFY: i32 = 17;
pub(crate) const X11_UNMAP_NOTIFY: i32 = 18;
pub(crate) const X11_MAP_NOTIFY: i32 = 19;
pub(crate) const X11_CONFIGURE_NOTIFY: i32 = 22;
pub(crate) const X11_CLIENT_MESSAGE: i32 = 33;
pub(crate) const X11_SHIFT_MASK: u32 = 1;
pub(crate) const X11_CTRL_MASK: u32 = 4;
pub(crate) const X11_ALT_MASK: u32 = 8;
pub(crate) const X11_META_MASK: u32 = 64;
pub(crate) const ERR_LINUX_NO_DISPLAY: &str = "neither X11 nor Wayland display server available";
pub(crate) const SYM_WL_DISPLAY_GET_ERROR: &str = "wl_display_get_error\0";
pub(crate) const SYM_WL_PROXY_MARSHAL_FLAGS: &str = "wl_proxy_marshal_flags\0";
pub(crate) const SYM_WL_PROXY_ADD_LISTENER: &str = "wl_proxy_add_listener\0";
pub(crate) const SYM_WL_PROXY_DESTROY: &str = "wl_proxy_destroy\0";
pub(crate) const SYM_WL_PROXY_GET_VERSION: &str = "wl_proxy_get_version\0";
pub(crate) const SYM_WL_REGISTRY_INTERFACE: &str = "wl_registry_interface\0";
pub(crate) const SYM_WL_COMPOSITOR_INTERFACE: &str = "wl_compositor_interface\0";
pub(crate) const SYM_WL_SURFACE_INTERFACE: &str = "wl_surface_interface\0";
pub(crate) const SYM_WL_SHM_INTERFACE: &str = "wl_shm_interface\0";
pub(crate) const SYM_WL_SHM_POOL_INTERFACE: &str = "wl_shm_pool_interface\0";
pub(crate) const SYM_WL_BUFFER_INTERFACE: &str = "wl_buffer_interface\0";
pub(crate) const SYM_VK_CREATE_XLIB_SURFACE: &str = "vkCreateXlibSurfaceKHR\0";
pub(crate) const SYM_MEMFD_CREATE: &str = "memfd_create\0";
pub(crate) const WL_IFACE_COMPOSITOR: &str = "wl_compositor";
pub(crate) const WL_IFACE_SHM: &str = "wl_shm";
pub(crate) const WL_MEMFD_NAME: &str = "euv-wayland-shm\0";
pub(crate) const LINUX_DEV_SHM_PREFIX: &str = "/dev/shm/euv-wl-shm";
pub(crate) const WL_OPCODE_DISPLAY_GET_REGISTRY: u32 = 1;
pub(crate) const WL_OPCODE_REGISTRY_BIND: u32 = 0;
pub(crate) const WL_OPCODE_COMPOSITOR_CREATE_SURFACE: u32 = 0;
pub(crate) const WL_OPCODE_SHM_CREATE_POOL: u32 = 0;
pub(crate) const WL_OPCODE_SHM_POOL_CREATE_BUFFER: u32 = 0;
pub(crate) const WL_OPCODE_SHM_POOL_DESTROY: u32 = 1;
pub(crate) const WL_OPCODE_BUFFER_DESTROY: u32 = 0;
pub(crate) const WL_OPCODE_SURFACE_ATTACH: u32 = 1;
pub(crate) const WL_OPCODE_SURFACE_DAMAGE: u32 = 2;
pub(crate) const WL_OPCODE_SURFACE_COMMIT: u32 = 6;
pub(crate) const WL_OPCODE_SURFACE_DAMAGE_BUFFER: u32 = 9;
pub(crate) const WL_MARSHAL_FLAG_DESTROY: u32 = 1;
pub(crate) const WL_COMPOSITOR_MAX_VERSION: u32 = 4;
pub(crate) const WL_SHM_MAX_VERSION: u32 = 1;
pub(crate) const LINUX_MMAP_PROT_RW: i32 = 3;
pub(crate) const LINUX_MMAP_SHARED: i32 = 1;
pub(crate) const LINUX_MFD_CLOEXEC: u32 = 1;
pub(crate) const LINUX_SHM_OPEN_FLAGS: i32 = 524_482;
pub(crate) const LINUX_SHM_FILE_MODE: u32 = 0o600;
pub(crate) const WL_SHM_SLOT_COUNT: usize = 2;
pub(crate) const ERR_LINUX_WL_SURFACE_MISSING: &str =
"wayland software presentation missing wl_display, wl_surface, or wl_shm";
pub(crate) const ERR_LINUX_WL_SHM_ALLOC: &str = "failed to allocate Wayland wl_shm memory mapping";
pub(crate) const ERR_LINUX_WL_BUFFER_CREATE: &str =
"failed to create Wayland wl_shm_pool or wl_buffer";
pub(crate) const ERR_LINUX_WL_NO_FREE_BUFFER: &str =
"no free Wayland wl_shm buffer slot available (all buffers busy)";
pub(crate) const ERR_LINUX_WL_DISPLAY_FLUSH: &str =
"wayland surface commit or wl_display_flush failed";
pub(crate) const ERR_LINUX_INVALID_FRAMEBUFFER: &str =
"invalid framebuffer dimensions or truncated pixel buffer";
pub(crate) const ERR_LINUX_X11_SURFACE_MISSING: &str =
"X11 presentation missing Display, Window, GC, Visual, or XPutImage symbols";
pub(crate) const ERR_LINUX_GPU_DIRECT_UNAVAILABLE: &str =
"Linux direct GPU presentation requires active Vulkan WSI surface support";