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_SET_BUFFER_SCALE: u32 = 8;
pub(crate) const WL_OPCODE_SURFACE_DAMAGE_BUFFER: u32 = 9;
pub(crate) const WL_SURFACE_BUFFER_SCALE_MIN_VERSION: u32 = 3;
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 or EGL/GLES3 surface support";
pub(crate) const ERR_LINUX_EGL_UNAVAILABLE: &str =
"Linux dynamic libEGL.so.1 / libGLESv2.so.2 presentation unavailable";
pub(crate) const LINUX_LIB_EGL: &str = "libEGL.so.1\0";
pub(crate) const LINUX_LIB_GLESV2: &str = "libGLESv2.so.2\0";
pub(crate) const LINUX_LIB_WAYLAND_EGL: &str = "libwayland-egl.so.1\0";
pub(crate) const SYM_X_CONNECTION_NUMBER: &str = "XConnectionNumber\0";
pub(crate) const SYM_WL_DISPLAY_GET_FD: &str = "wl_display_get_fd\0";
pub(crate) const SYM_WL_DISPLAY_PREPARE_READ: &str = "wl_display_prepare_read\0";
pub(crate) const SYM_WL_DISPLAY_READ_EVENTS: &str = "wl_display_read_events\0";
pub(crate) const SYM_WL_DISPLAY_CANCEL_READ: &str = "wl_display_cancel_read\0";
pub(crate) const SYM_WL_CALLBACK_INTERFACE: &str = "wl_callback_interface\0";
pub(crate) const WL_OPCODE_SURFACE_FRAME: u32 = 3;
pub(crate) const LINUX_POLLIN: i16 = 0x0001;
pub(crate) const LINUX_PIPE_NONBLOCK_CLOEXEC: i32 = 0x0008_0800;
pub(crate) const SYM_EGL_GET_DISPLAY: &str = "eglGetDisplay\0";
pub(crate) const SYM_EGL_INITIALIZE: &str = "eglInitialize\0";
pub(crate) const SYM_EGL_BIND_API: &str = "eglBindAPI\0";
pub(crate) const SYM_EGL_CHOOSE_CONFIG: &str = "eglChooseConfig\0";
pub(crate) const SYM_EGL_CREATE_CONTEXT: &str = "eglCreateContext\0";
pub(crate) const SYM_EGL_CREATE_WINDOW_SURFACE: &str = "eglCreateWindowSurface\0";
pub(crate) const SYM_EGL_MAKE_CURRENT: &str = "eglMakeCurrent\0";
pub(crate) const SYM_EGL_SWAP_INTERVAL: &str = "eglSwapInterval\0";
pub(crate) const SYM_EGL_SWAP_BUFFERS: &str = "eglSwapBuffers\0";
pub(crate) const SYM_EGL_DESTROY_SURFACE: &str = "eglDestroySurface\0";
pub(crate) const SYM_EGL_DESTROY_CONTEXT: &str = "eglDestroyContext\0";
pub(crate) const SYM_EGL_TERMINATE: &str = "eglTerminate\0";
pub(crate) const SYM_WL_EGL_WINDOW_CREATE: &str = "wl_egl_window_create\0";
pub(crate) const SYM_WL_EGL_WINDOW_RESIZE: &str = "wl_egl_window_resize\0";
pub(crate) const SYM_WL_EGL_WINDOW_DESTROY: &str = "wl_egl_window_destroy\0";
pub(crate) const SYM_GL_CREATE_SHADER: &str = "glCreateShader\0";
pub(crate) const SYM_GL_SHADER_SOURCE: &str = "glShaderSource\0";
pub(crate) const SYM_GL_COMPILE_SHADER: &str = "glCompileShader\0";
pub(crate) const SYM_GL_GET_SHADERIV: &str = "glGetShaderiv\0";
pub(crate) const SYM_GL_DELETE_SHADER: &str = "glDeleteShader\0";
pub(crate) const SYM_GL_CREATE_PROGRAM: &str = "glCreateProgram\0";
pub(crate) const SYM_GL_ATTACH_SHADER: &str = "glAttachShader\0";
pub(crate) const SYM_GL_LINK_PROGRAM: &str = "glLinkProgram\0";
pub(crate) const SYM_GL_GET_PROGRAMIV: &str = "glGetProgramiv\0";
pub(crate) const SYM_GL_DELETE_PROGRAM: &str = "glDeleteProgram\0";
pub(crate) const SYM_GL_USE_PROGRAM: &str = "glUseProgram\0";
pub(crate) const SYM_GL_GET_UNIFORM_LOCATION: &str = "glGetUniformLocation\0";
pub(crate) const SYM_GL_UNIFORM1I: &str = "glUniform1i\0";
pub(crate) const SYM_GL_UNIFORM2F: &str = "glUniform2f\0";
pub(crate) const SYM_GL_GEN_VERTEX_ARRAYS: &str = "glGenVertexArrays\0";
pub(crate) const SYM_GL_BIND_VERTEX_ARRAY: &str = "glBindVertexArray\0";
pub(crate) const SYM_GL_DELETE_VERTEX_ARRAYS: &str = "glDeleteVertexArrays\0";
pub(crate) const SYM_GL_GEN_BUFFERS: &str = "glGenBuffers\0";
pub(crate) const SYM_GL_BIND_BUFFER: &str = "glBindBuffer\0";
pub(crate) const SYM_GL_BUFFER_DATA: &str = "glBufferData\0";
pub(crate) const SYM_GL_BUFFER_SUB_DATA: &str = "glBufferSubData\0";
pub(crate) const SYM_GL_DELETE_BUFFERS: &str = "glDeleteBuffers\0";
pub(crate) const SYM_GL_ENABLE_VERTEX_ATTRIB_ARRAY: &str = "glEnableVertexAttribArray\0";
pub(crate) const SYM_GL_VERTEX_ATTRIB_POINTER: &str = "glVertexAttribPointer\0";
pub(crate) const SYM_GL_VERTEX_ATTRIB_IPOINTER: &str = "glVertexAttribIPointer\0";
pub(crate) const SYM_GL_VERTEX_ATTRIB_DIVISOR: &str = "glVertexAttribDivisor\0";
pub(crate) const SYM_GL_GEN_TEXTURES: &str = "glGenTextures\0";
pub(crate) const SYM_GL_BIND_TEXTURE: &str = "glBindTexture\0";
pub(crate) const SYM_GL_TEX_PARAMETERI: &str = "glTexParameteri\0";
pub(crate) const SYM_GL_TEX_STORAGE_2D: &str = "glTexStorage2D\0";
pub(crate) const SYM_GL_TEX_IMAGE_2D: &str = "glTexImage2D\0";
pub(crate) const SYM_GL_TEX_SUB_IMAGE_2D: &str = "glTexSubImage2D\0";
pub(crate) const SYM_GL_DELETE_TEXTURES: &str = "glDeleteTextures\0";
pub(crate) const SYM_GL_ACTIVE_TEXTURE: &str = "glActiveTexture\0";
pub(crate) const SYM_GL_PIXEL_STOREI: &str = "glPixelStorei\0";
pub(crate) const SYM_GL_VIEWPORT: &str = "glViewport\0";
pub(crate) const SYM_GL_ENABLE: &str = "glEnable\0";
pub(crate) const SYM_GL_DISABLE: &str = "glDisable\0";
pub(crate) const SYM_GL_BLEND_FUNC_SEPARATE: &str = "glBlendFuncSeparate\0";
pub(crate) const SYM_GL_SCISSOR: &str = "glScissor\0";
pub(crate) const SYM_GL_CLEAR_COLOR: &str = "glClearColor\0";
pub(crate) const SYM_GL_CLEAR: &str = "glClear\0";
pub(crate) const SYM_GL_DRAW_ARRAYS_INSTANCED: &str = "glDrawArraysInstanced\0";
pub(crate) const LINUX_GL_UNIFORM_VIEWPORT: &str = "u_viewport\0";
pub(crate) const LINUX_GL_UNIFORM_SCROLL_OFFSET: &str = "u_scroll_offset\0";
pub(crate) const LINUX_GL_UNIFORM_GLYPH_R8: &str = "u_glyph_r8\0";
pub(crate) const LINUX_GL_UNIFORM_GLYPH_RGBA8: &str = "u_glyph_rgba8\0";
pub(crate) const LINUX_GL_UNIFORM_IMAGE_TEX: &str = "u_image_tex\0";
pub(crate) const LINUX_GL_UNIFORM_EXTERNAL_TEX: &str = "u_external_tex\0";
pub(crate) const LINUX_EGL_OPENGL_ES_API: u32 = 0x30A0;
pub(crate) const LINUX_EGL_SURFACE_TYPE: i32 = 0x3033;
pub(crate) const LINUX_EGL_WINDOW_BIT: i32 = 0x0004;
pub(crate) const LINUX_EGL_RENDERABLE_TYPE: i32 = 0x3040;
pub(crate) const LINUX_EGL_OPENGL_ES3_BIT: i32 = 0x0040;
pub(crate) const LINUX_EGL_RED_SIZE: i32 = 0x3024;
pub(crate) const LINUX_EGL_GREEN_SIZE: i32 = 0x3023;
pub(crate) const LINUX_EGL_BLUE_SIZE: i32 = 0x3022;
pub(crate) const LINUX_EGL_ALPHA_SIZE: i32 = 0x3021;
pub(crate) const LINUX_EGL_NONE: i32 = 0x3038;
pub(crate) const LINUX_EGL_CONTEXT_CLIENT_VERSION: i32 = 0x3098;
pub(crate) const LINUX_GL_VERTEX_SHADER: u32 = 0x8B31;
pub(crate) const LINUX_GL_FRAGMENT_SHADER: u32 = 0x8B30;
pub(crate) const LINUX_GL_COMPILE_STATUS: u32 = 0x8B81;
pub(crate) const LINUX_GL_LINK_STATUS: u32 = 0x8B82;
pub(crate) const LINUX_GL_ARRAY_BUFFER: u32 = 0x8892;
pub(crate) const LINUX_GL_STATIC_DRAW: u32 = 0x88E4;
pub(crate) const LINUX_GL_STREAM_DRAW: u32 = 0x88E0;
pub(crate) const LINUX_GL_TRIANGLES: u32 = 0x0004;
pub(crate) const LINUX_GL_FLOAT: u32 = 0x1406;
pub(crate) const LINUX_GL_UNSIGNED_INT: u32 = 0x1405;
pub(crate) const LINUX_GL_UNSIGNED_BYTE: u32 = 0x1401;
pub(crate) const LINUX_GL_TEXTURE_2D: u32 = 0x0DE1;
pub(crate) const LINUX_GL_TEXTURE0: u32 = 0x84C0;
pub(crate) const LINUX_GL_TEXTURE1: u32 = 0x84C1;
pub(crate) const LINUX_GL_TEXTURE2: u32 = 0x84C2;
pub(crate) const LINUX_GL_TEXTURE3: u32 = 0x84C3;
pub(crate) const LINUX_GL_TEXTURE_MIN_FILTER: u32 = 0x2801;
pub(crate) const LINUX_GL_TEXTURE_MAG_FILTER: u32 = 0x2800;
pub(crate) const LINUX_GL_TEXTURE_WRAP_S: u32 = 0x2802;
pub(crate) const LINUX_GL_TEXTURE_WRAP_T: u32 = 0x2803;
pub(crate) const LINUX_GL_LINEAR: i32 = 0x2601;
pub(crate) const LINUX_GL_CLAMP_TO_EDGE: i32 = 0x812F;
pub(crate) const LINUX_GL_R8: u32 = 0x8229;
pub(crate) const LINUX_GL_RED: u32 = 0x1903;
pub(crate) const LINUX_GL_RGBA8: u32 = 0x8058;
pub(crate) const LINUX_GL_RGBA: u32 = 0x1908;
pub(crate) const LINUX_GL_UNPACK_ALIGNMENT: u32 = 0x0CF5;
pub(crate) const LINUX_GL_UNPACK_ROW_LENGTH: u32 = 0x0CF2;
pub(crate) const LINUX_GL_BLEND: u32 = 0x0BE2;
pub(crate) const LINUX_GL_SCISSOR_TEST: u32 = 0x0C11;
pub(crate) const LINUX_GL_SRC_ALPHA: u32 = 0x0302;
pub(crate) const LINUX_GL_ONE_MINUS_SRC_ALPHA: u32 = 0x0303;
pub(crate) const LINUX_GL_ONE: u32 = 1;
pub(crate) const LINUX_GL_COLOR_BUFFER_BIT: u32 = 0x4000;
pub(crate) const LINUX_GL_UNIT_QUAD: [f32; 12] =
[0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 1.0, 1.0, 0.0, 1.0];