Skip to content

Instantly share code, notes, and snippets.

@philip-lamb
Last active January 13, 2021 05:14
Show Gist options
  • Save philip-lamb/cac695e3b119f3cf9ee9d98fe4b077bd to your computer and use it in GitHub Desktop.
Save philip-lamb/cac695e3b119f3cf9ee9d98fe4b077bd to your computer and use it in GitHub Desktop.
The generated libsimpleservo EGL bindings on Windows UWP using the 'static struct' gl_generator.
mod __gl_imports {
pub use std::mem;
pub use std::os::raw;
}
pub mod types {
#![allow(non_camel_case_types, non_snake_case, dead_code, missing_copy_implementations)]
// platform-specific aliases are unknown
// IMPORTANT: these are alises to the same level of the bindings
// the values must be defined by the user
#[allow(dead_code)]
pub type khronos_utime_nanoseconds_t = super::khronos_utime_nanoseconds_t;
#[allow(dead_code)]
pub type khronos_uint64_t = super::khronos_uint64_t;
#[allow(dead_code)]
pub type khronos_ssize_t = super::khronos_ssize_t;
pub type EGLNativeDisplayType = super::EGLNativeDisplayType;
#[allow(dead_code)]
pub type EGLNativePixmapType = super::EGLNativePixmapType;
#[allow(dead_code)]
pub type EGLNativeWindowType = super::EGLNativeWindowType;
pub type EGLint = super::EGLint;
#[allow(dead_code)]
pub type NativeDisplayType = super::NativeDisplayType;
#[allow(dead_code)]
pub type NativePixmapType = super::NativePixmapType;
#[allow(dead_code)]
pub type NativeWindowType = super::NativeWindowType;
// EGL alises
pub type Bool = EGLBoolean; // TODO: not sure
pub type EGLBoolean = super::__gl_imports::raw::c_uint;
pub type EGLenum = super::__gl_imports::raw::c_uint;
pub type EGLAttribKHR = isize;
pub type EGLAttrib = isize;
pub type EGLConfig = *const super::__gl_imports::raw::c_void;
pub type EGLContext = *const super::__gl_imports::raw::c_void;
pub type EGLDeviceEXT = *const super::__gl_imports::raw::c_void;
pub type EGLDisplay = *const super::__gl_imports::raw::c_void;
pub type EGLSurface = *const super::__gl_imports::raw::c_void;
pub type EGLClientBuffer = *const super::__gl_imports::raw::c_void;
pub enum __eglMustCastToProperFunctionPointerType_fn {}
pub type __eglMustCastToProperFunctionPointerType =
*mut __eglMustCastToProperFunctionPointerType_fn;
pub type EGLImageKHR = *const super::__gl_imports::raw::c_void;
pub type EGLImage = *const super::__gl_imports::raw::c_void;
pub type EGLOutputLayerEXT = *const super::__gl_imports::raw::c_void;
pub type EGLOutputPortEXT = *const super::__gl_imports::raw::c_void;
pub type EGLSyncKHR = *const super::__gl_imports::raw::c_void;
pub type EGLSync = *const super::__gl_imports::raw::c_void;
pub type EGLTimeKHR = khronos_utime_nanoseconds_t;
pub type EGLTime = khronos_utime_nanoseconds_t;
pub type EGLSyncNV = *const super::__gl_imports::raw::c_void;
pub type EGLTimeNV = khronos_utime_nanoseconds_t;
pub type EGLuint64NV = khronos_utime_nanoseconds_t;
pub type EGLStreamKHR = *const super::__gl_imports::raw::c_void;
pub type EGLuint64KHR = khronos_uint64_t;
pub type EGLNativeFileDescriptorKHR = super::__gl_imports::raw::c_int;
pub type EGLsizeiANDROID = khronos_ssize_t;
pub type EGLSetBlobFuncANDROID = extern "system" fn(*const super::__gl_imports::raw::c_void,
EGLsizeiANDROID,
*const super::__gl_imports::raw::c_void,
EGLsizeiANDROID)
-> ();
pub type EGLGetBlobFuncANDROID = extern "system" fn(*const super::__gl_imports::raw::c_void,
EGLsizeiANDROID,
*mut super::__gl_imports::raw::c_void,
EGLsizeiANDROID)
-> EGLsizeiANDROID;
#[repr(C)]
pub struct EGLClientPixmapHI {
pData: *const super::__gl_imports::raw::c_void,
iWidth: EGLint,
iHeight: EGLint,
iStride: EGLint,
}
}
#[allow(dead_code, non_upper_case_globals)] pub const ALPHA_FORMAT: types::EGLenum = 0x3088;
#[allow(dead_code, non_upper_case_globals)] pub const ALPHA_FORMAT_NONPRE: types::EGLenum = 0x308B;
#[allow(dead_code, non_upper_case_globals)] pub const ALPHA_FORMAT_PRE: types::EGLenum = 0x308C;
#[allow(dead_code, non_upper_case_globals)] pub const ALPHA_MASK_SIZE: types::EGLenum = 0x303E;
#[allow(dead_code, non_upper_case_globals)] pub const ALPHA_SIZE: types::EGLenum = 0x3021;
#[allow(dead_code, non_upper_case_globals)] pub const BACK_BUFFER: types::EGLenum = 0x3084;
#[allow(dead_code, non_upper_case_globals)] pub const BAD_ACCESS: types::EGLenum = 0x3002;
#[allow(dead_code, non_upper_case_globals)] pub const BAD_ALLOC: types::EGLenum = 0x3003;
#[allow(dead_code, non_upper_case_globals)] pub const BAD_ATTRIBUTE: types::EGLenum = 0x3004;
#[allow(dead_code, non_upper_case_globals)] pub const BAD_CONFIG: types::EGLenum = 0x3005;
#[allow(dead_code, non_upper_case_globals)] pub const BAD_CONTEXT: types::EGLenum = 0x3006;
#[allow(dead_code, non_upper_case_globals)] pub const BAD_CURRENT_SURFACE: types::EGLenum = 0x3007;
#[allow(dead_code, non_upper_case_globals)] pub const BAD_DISPLAY: types::EGLenum = 0x3008;
#[allow(dead_code, non_upper_case_globals)] pub const BAD_MATCH: types::EGLenum = 0x3009;
#[allow(dead_code, non_upper_case_globals)] pub const BAD_NATIVE_PIXMAP: types::EGLenum = 0x300A;
#[allow(dead_code, non_upper_case_globals)] pub const BAD_NATIVE_WINDOW: types::EGLenum = 0x300B;
#[allow(dead_code, non_upper_case_globals)] pub const BAD_PARAMETER: types::EGLenum = 0x300C;
#[allow(dead_code, non_upper_case_globals)] pub const BAD_SURFACE: types::EGLenum = 0x300D;
#[allow(dead_code, non_upper_case_globals)] pub const BIND_TO_TEXTURE_RGB: types::EGLenum = 0x3039;
#[allow(dead_code, non_upper_case_globals)] pub const BIND_TO_TEXTURE_RGBA: types::EGLenum = 0x303A;
#[allow(dead_code, non_upper_case_globals)] pub const BLUE_SIZE: types::EGLenum = 0x3022;
#[allow(dead_code, non_upper_case_globals)] pub const BUFFER_DESTROYED: types::EGLenum = 0x3095;
#[allow(dead_code, non_upper_case_globals)] pub const BUFFER_PRESERVED: types::EGLenum = 0x3094;
#[allow(dead_code, non_upper_case_globals)] pub const BUFFER_SIZE: types::EGLenum = 0x3020;
#[allow(dead_code, non_upper_case_globals)] pub const CLIENT_APIS: types::EGLenum = 0x308D;
#[allow(dead_code, non_upper_case_globals)] pub const CL_EVENT_HANDLE: types::EGLenum = 0x309C;
#[allow(dead_code, non_upper_case_globals)] pub const COLORSPACE: types::EGLenum = 0x3087;
#[allow(dead_code, non_upper_case_globals)] pub const COLORSPACE_LINEAR: types::EGLenum = 0x308A;
#[allow(dead_code, non_upper_case_globals)] pub const COLORSPACE_sRGB: types::EGLenum = 0x3089;
#[allow(dead_code, non_upper_case_globals)] pub const COLOR_BUFFER_TYPE: types::EGLenum = 0x303F;
#[allow(dead_code, non_upper_case_globals)] pub const CONDITION_SATISFIED: types::EGLenum = 0x30F6;
#[allow(dead_code, non_upper_case_globals)] pub const CONFIG_CAVEAT: types::EGLenum = 0x3027;
#[allow(dead_code, non_upper_case_globals)] pub const CONFIG_ID: types::EGLenum = 0x3028;
#[allow(dead_code, non_upper_case_globals)] pub const CONFORMANT: types::EGLenum = 0x3042;
#[allow(dead_code, non_upper_case_globals)] pub const CONTEXT_CLIENT_TYPE: types::EGLenum = 0x3097;
#[allow(dead_code, non_upper_case_globals)] pub const CONTEXT_CLIENT_VERSION: types::EGLenum = 0x3098;
#[allow(dead_code, non_upper_case_globals)] pub const CONTEXT_LOST: types::EGLenum = 0x300E;
#[allow(dead_code, non_upper_case_globals)] pub const CONTEXT_MAJOR_VERSION: types::EGLenum = 0x3098;
#[allow(dead_code, non_upper_case_globals)] pub const CONTEXT_MINOR_VERSION: types::EGLenum = 0x30FB;
#[allow(dead_code, non_upper_case_globals)] pub const CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT: types::EGLenum = 0x00000002;
#[allow(dead_code, non_upper_case_globals)] pub const CONTEXT_OPENGL_CORE_PROFILE_BIT: types::EGLenum = 0x00000001;
#[allow(dead_code, non_upper_case_globals)] pub const CONTEXT_OPENGL_DEBUG: types::EGLenum = 0x31B0;
#[allow(dead_code, non_upper_case_globals)] pub const CONTEXT_OPENGL_FORWARD_COMPATIBLE: types::EGLenum = 0x31B1;
#[allow(dead_code, non_upper_case_globals)] pub const CONTEXT_OPENGL_PROFILE_MASK: types::EGLenum = 0x30FD;
#[allow(dead_code, non_upper_case_globals)] pub const CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY: types::EGLenum = 0x31BD;
#[allow(dead_code, non_upper_case_globals)] pub const CONTEXT_OPENGL_ROBUST_ACCESS: types::EGLenum = 0x31B2;
#[allow(dead_code, non_upper_case_globals)] pub const CORE_NATIVE_ENGINE: types::EGLenum = 0x305B;
#[allow(dead_code, non_upper_case_globals)] pub const DEFAULT_DISPLAY: types::EGLNativeDisplayType = 0 as types::EGLNativeDisplayType;
#[allow(dead_code, non_upper_case_globals)] pub const DEPTH_SIZE: types::EGLenum = 0x3025;
#[allow(dead_code, non_upper_case_globals)] pub const DISPLAY_SCALING: types::EGLenum = 10000;
#[allow(dead_code, non_upper_case_globals)] pub const DONT_CARE: types::EGLint = -1 as types::EGLint;
#[allow(dead_code, non_upper_case_globals)] pub const DRAW: types::EGLenum = 0x3059;
#[allow(dead_code, non_upper_case_globals)] pub const EXTENSIONS: types::EGLenum = 0x3055;
#[allow(dead_code, non_upper_case_globals)] pub const FALSE: types::EGLBoolean = 0;
#[allow(dead_code, non_upper_case_globals)] pub const FOREVER: types::EGLuint64KHR = 0xFFFFFFFFFFFFFFFF;
#[allow(dead_code, non_upper_case_globals)] pub const GL_COLORSPACE: types::EGLenum = 0x309D;
#[allow(dead_code, non_upper_case_globals)] pub const GL_COLORSPACE_LINEAR: types::EGLenum = 0x308A;
#[allow(dead_code, non_upper_case_globals)] pub const GL_COLORSPACE_SRGB: types::EGLenum = 0x3089;
#[allow(dead_code, non_upper_case_globals)] pub const GL_RENDERBUFFER: types::EGLenum = 0x30B9;
#[allow(dead_code, non_upper_case_globals)] pub const GL_TEXTURE_2D: types::EGLenum = 0x30B1;
#[allow(dead_code, non_upper_case_globals)] pub const GL_TEXTURE_3D: types::EGLenum = 0x30B2;
#[allow(dead_code, non_upper_case_globals)] pub const GL_TEXTURE_CUBE_MAP_NEGATIVE_X: types::EGLenum = 0x30B4;
#[allow(dead_code, non_upper_case_globals)] pub const GL_TEXTURE_CUBE_MAP_NEGATIVE_Y: types::EGLenum = 0x30B6;
#[allow(dead_code, non_upper_case_globals)] pub const GL_TEXTURE_CUBE_MAP_NEGATIVE_Z: types::EGLenum = 0x30B8;
#[allow(dead_code, non_upper_case_globals)] pub const GL_TEXTURE_CUBE_MAP_POSITIVE_X: types::EGLenum = 0x30B3;
#[allow(dead_code, non_upper_case_globals)] pub const GL_TEXTURE_CUBE_MAP_POSITIVE_Y: types::EGLenum = 0x30B5;
#[allow(dead_code, non_upper_case_globals)] pub const GL_TEXTURE_CUBE_MAP_POSITIVE_Z: types::EGLenum = 0x30B7;
#[allow(dead_code, non_upper_case_globals)] pub const GL_TEXTURE_LEVEL: types::EGLenum = 0x30BC;
#[allow(dead_code, non_upper_case_globals)] pub const GL_TEXTURE_ZOFFSET: types::EGLenum = 0x30BD;
#[allow(dead_code, non_upper_case_globals)] pub const GREEN_SIZE: types::EGLenum = 0x3023;
#[allow(dead_code, non_upper_case_globals)] pub const HEIGHT: types::EGLenum = 0x3056;
#[allow(dead_code, non_upper_case_globals)] pub const HORIZONTAL_RESOLUTION: types::EGLenum = 0x3090;
#[allow(dead_code, non_upper_case_globals)] pub const IMAGE_PRESERVED: types::EGLenum = 0x30D2;
#[allow(dead_code, non_upper_case_globals)] pub const LARGEST_PBUFFER: types::EGLenum = 0x3058;
#[allow(dead_code, non_upper_case_globals)] pub const LEVEL: types::EGLenum = 0x3029;
#[allow(dead_code, non_upper_case_globals)] pub const LOSE_CONTEXT_ON_RESET: types::EGLenum = 0x31BF;
#[allow(dead_code, non_upper_case_globals)] pub const LUMINANCE_BUFFER: types::EGLenum = 0x308F;
#[allow(dead_code, non_upper_case_globals)] pub const LUMINANCE_SIZE: types::EGLenum = 0x303D;
#[allow(dead_code, non_upper_case_globals)] pub const MATCH_NATIVE_PIXMAP: types::EGLenum = 0x3041;
#[allow(dead_code, non_upper_case_globals)] pub const MAX_PBUFFER_HEIGHT: types::EGLenum = 0x302A;
#[allow(dead_code, non_upper_case_globals)] pub const MAX_PBUFFER_PIXELS: types::EGLenum = 0x302B;
#[allow(dead_code, non_upper_case_globals)] pub const MAX_PBUFFER_WIDTH: types::EGLenum = 0x302C;
#[allow(dead_code, non_upper_case_globals)] pub const MAX_SWAP_INTERVAL: types::EGLenum = 0x303C;
#[allow(dead_code, non_upper_case_globals)] pub const MIN_SWAP_INTERVAL: types::EGLenum = 0x303B;
#[allow(dead_code, non_upper_case_globals)] pub const MIPMAP_LEVEL: types::EGLenum = 0x3083;
#[allow(dead_code, non_upper_case_globals)] pub const MIPMAP_TEXTURE: types::EGLenum = 0x3082;
#[allow(dead_code, non_upper_case_globals)] pub const MULTISAMPLE_RESOLVE: types::EGLenum = 0x3099;
#[allow(dead_code, non_upper_case_globals)] pub const MULTISAMPLE_RESOLVE_BOX: types::EGLenum = 0x309B;
#[allow(dead_code, non_upper_case_globals)] pub const MULTISAMPLE_RESOLVE_BOX_BIT: types::EGLenum = 0x0200;
#[allow(dead_code, non_upper_case_globals)] pub const MULTISAMPLE_RESOLVE_DEFAULT: types::EGLenum = 0x309A;
#[allow(dead_code, non_upper_case_globals)] pub const NATIVE_RENDERABLE: types::EGLenum = 0x302D;
#[allow(dead_code, non_upper_case_globals)] pub const NATIVE_VISUAL_ID: types::EGLenum = 0x302E;
#[allow(dead_code, non_upper_case_globals)] pub const NATIVE_VISUAL_TYPE: types::EGLenum = 0x302F;
#[allow(dead_code, non_upper_case_globals)] pub const NONE: types::EGLenum = 0x3038;
#[allow(dead_code, non_upper_case_globals)] pub const NON_CONFORMANT_CONFIG: types::EGLenum = 0x3051;
#[allow(dead_code, non_upper_case_globals)] pub const NOT_INITIALIZED: types::EGLenum = 0x3001;
#[allow(dead_code, non_upper_case_globals)] pub const NO_CONTEXT: types::EGLContext = 0 as types::EGLContext;
#[allow(dead_code, non_upper_case_globals)] pub const NO_DISPLAY: types::EGLDisplay = 0 as types::EGLDisplay;
#[allow(dead_code, non_upper_case_globals)] pub const NO_IMAGE: types::EGLImage = 0 as types::EGLImage;
#[allow(dead_code, non_upper_case_globals)] pub const NO_RESET_NOTIFICATION: types::EGLenum = 0x31BE;
#[allow(dead_code, non_upper_case_globals)] pub const NO_SURFACE: types::EGLSurface = 0 as types::EGLSurface;
#[allow(dead_code, non_upper_case_globals)] pub const NO_SYNC: types::EGLSync = 0 as types::EGLSync;
#[allow(dead_code, non_upper_case_globals)] pub const NO_TEXTURE: types::EGLenum = 0x305C;
#[allow(dead_code, non_upper_case_globals)] pub const OPENGL_API: types::EGLenum = 0x30A2;
#[allow(dead_code, non_upper_case_globals)] pub const OPENGL_BIT: types::EGLenum = 0x0008;
#[allow(dead_code, non_upper_case_globals)] pub const OPENGL_ES2_BIT: types::EGLenum = 0x0004;
#[allow(dead_code, non_upper_case_globals)] pub const OPENGL_ES3_BIT: types::EGLenum = 0x00000040;
#[allow(dead_code, non_upper_case_globals)] pub const OPENGL_ES_API: types::EGLenum = 0x30A0;
#[allow(dead_code, non_upper_case_globals)] pub const OPENGL_ES_BIT: types::EGLenum = 0x0001;
#[allow(dead_code, non_upper_case_globals)] pub const OPENVG_API: types::EGLenum = 0x30A1;
#[allow(dead_code, non_upper_case_globals)] pub const OPENVG_BIT: types::EGLenum = 0x0002;
#[allow(dead_code, non_upper_case_globals)] pub const OPENVG_IMAGE: types::EGLenum = 0x3096;
#[allow(dead_code, non_upper_case_globals)] pub const PBUFFER_BIT: types::EGLenum = 0x0001;
#[allow(dead_code, non_upper_case_globals)] pub const PIXEL_ASPECT_RATIO: types::EGLenum = 0x3092;
#[allow(dead_code, non_upper_case_globals)] pub const PIXMAP_BIT: types::EGLenum = 0x0002;
#[allow(dead_code, non_upper_case_globals)] pub const READ: types::EGLenum = 0x305A;
#[allow(dead_code, non_upper_case_globals)] pub const RED_SIZE: types::EGLenum = 0x3024;
#[allow(dead_code, non_upper_case_globals)] pub const RENDERABLE_TYPE: types::EGLenum = 0x3040;
#[allow(dead_code, non_upper_case_globals)] pub const RENDER_BUFFER: types::EGLenum = 0x3086;
#[allow(dead_code, non_upper_case_globals)] pub const RGB_BUFFER: types::EGLenum = 0x308E;
#[allow(dead_code, non_upper_case_globals)] pub const SAMPLES: types::EGLenum = 0x3031;
#[allow(dead_code, non_upper_case_globals)] pub const SAMPLE_BUFFERS: types::EGLenum = 0x3032;
#[allow(dead_code, non_upper_case_globals)] pub const SIGNALED: types::EGLenum = 0x30F2;
#[allow(dead_code, non_upper_case_globals)] pub const SINGLE_BUFFER: types::EGLenum = 0x3085;
#[allow(dead_code, non_upper_case_globals)] pub const SLOW_CONFIG: types::EGLenum = 0x3050;
#[allow(dead_code, non_upper_case_globals)] pub const STENCIL_SIZE: types::EGLenum = 0x3026;
#[allow(dead_code, non_upper_case_globals)] pub const SUCCESS: types::EGLenum = 0x3000;
#[allow(dead_code, non_upper_case_globals)] pub const SURFACE_TYPE: types::EGLenum = 0x3033;
#[allow(dead_code, non_upper_case_globals)] pub const SWAP_BEHAVIOR: types::EGLenum = 0x3093;
#[allow(dead_code, non_upper_case_globals)] pub const SWAP_BEHAVIOR_PRESERVED_BIT: types::EGLenum = 0x0400;
#[allow(dead_code, non_upper_case_globals)] pub const SYNC_CL_EVENT: types::EGLenum = 0x30FE;
#[allow(dead_code, non_upper_case_globals)] pub const SYNC_CL_EVENT_COMPLETE: types::EGLenum = 0x30FF;
#[allow(dead_code, non_upper_case_globals)] pub const SYNC_CONDITION: types::EGLenum = 0x30F8;
#[allow(dead_code, non_upper_case_globals)] pub const SYNC_FENCE: types::EGLenum = 0x30F9;
#[allow(dead_code, non_upper_case_globals)] pub const SYNC_FLUSH_COMMANDS_BIT: types::EGLenum = 0x0001;
#[allow(dead_code, non_upper_case_globals)] pub const SYNC_PRIOR_COMMANDS_COMPLETE: types::EGLenum = 0x30F0;
#[allow(dead_code, non_upper_case_globals)] pub const SYNC_STATUS: types::EGLenum = 0x30F1;
#[allow(dead_code, non_upper_case_globals)] pub const SYNC_TYPE: types::EGLenum = 0x30F7;
#[allow(dead_code, non_upper_case_globals)] pub const TEXTURE_2D: types::EGLenum = 0x305F;
#[allow(dead_code, non_upper_case_globals)] pub const TEXTURE_FORMAT: types::EGLenum = 0x3080;
#[allow(dead_code, non_upper_case_globals)] pub const TEXTURE_RGB: types::EGLenum = 0x305D;
#[allow(dead_code, non_upper_case_globals)] pub const TEXTURE_RGBA: types::EGLenum = 0x305E;
#[allow(dead_code, non_upper_case_globals)] pub const TEXTURE_TARGET: types::EGLenum = 0x3081;
#[allow(dead_code, non_upper_case_globals)] pub const TIMEOUT_EXPIRED: types::EGLenum = 0x30F5;
#[allow(dead_code, non_upper_case_globals)] pub const TRANSPARENT_BLUE_VALUE: types::EGLenum = 0x3035;
#[allow(dead_code, non_upper_case_globals)] pub const TRANSPARENT_GREEN_VALUE: types::EGLenum = 0x3036;
#[allow(dead_code, non_upper_case_globals)] pub const TRANSPARENT_RED_VALUE: types::EGLenum = 0x3037;
#[allow(dead_code, non_upper_case_globals)] pub const TRANSPARENT_RGB: types::EGLenum = 0x3052;
#[allow(dead_code, non_upper_case_globals)] pub const TRANSPARENT_TYPE: types::EGLenum = 0x3034;
#[allow(dead_code, non_upper_case_globals)] pub const TRUE: types::EGLBoolean = 1;
#[allow(dead_code, non_upper_case_globals)] pub const UNKNOWN: types::EGLint = -1 as types::EGLint;
#[allow(dead_code, non_upper_case_globals)] pub const UNSIGNALED: types::EGLenum = 0x30F3;
#[allow(dead_code, non_upper_case_globals)] pub const VENDOR: types::EGLenum = 0x3053;
#[allow(dead_code, non_upper_case_globals)] pub const VERSION: types::EGLenum = 0x3054;
#[allow(dead_code, non_upper_case_globals)] pub const VERTICAL_RESOLUTION: types::EGLenum = 0x3091;
#[allow(dead_code, non_upper_case_globals)] pub const VG_ALPHA_FORMAT: types::EGLenum = 0x3088;
#[allow(dead_code, non_upper_case_globals)] pub const VG_ALPHA_FORMAT_NONPRE: types::EGLenum = 0x308B;
#[allow(dead_code, non_upper_case_globals)] pub const VG_ALPHA_FORMAT_PRE: types::EGLenum = 0x308C;
#[allow(dead_code, non_upper_case_globals)] pub const VG_ALPHA_FORMAT_PRE_BIT: types::EGLenum = 0x0040;
#[allow(dead_code, non_upper_case_globals)] pub const VG_COLORSPACE: types::EGLenum = 0x3087;
#[allow(dead_code, non_upper_case_globals)] pub const VG_COLORSPACE_LINEAR: types::EGLenum = 0x308A;
#[allow(dead_code, non_upper_case_globals)] pub const VG_COLORSPACE_LINEAR_BIT: types::EGLenum = 0x0020;
#[allow(dead_code, non_upper_case_globals)] pub const VG_COLORSPACE_sRGB: types::EGLenum = 0x3089;
#[allow(dead_code, non_upper_case_globals)] pub const WIDTH: types::EGLenum = 0x3057;
#[allow(dead_code, non_upper_case_globals)] pub const WINDOW_BIT: types::EGLenum = 0x0004;
#[allow(non_camel_case_types, non_snake_case, dead_code)]
#[derive(Copy, Clone)]
pub struct Egl;
impl Egl {
/// Stub function.
#[allow(dead_code)]
pub fn load_with<F>(mut _loadfn: F) -> Egl where F: FnMut(&'static str) -> *const __gl_imports::raw::c_void {
Egl
}
#[allow(non_snake_case)]
// #[allow(unused_variables)]
#[allow(dead_code)]
#[inline]
pub unsafe fn BindAPI(&self, api: types::EGLenum) -> types::EGLBoolean {
BindAPI(api)
}
#[allow(non_snake_case)]
// #[allow(unused_variables)]
#[allow(dead_code)]
#[inline]
pub unsafe fn BindTexImage(&self, dpy: types::EGLDisplay, surface: types::EGLSurface, buffer: types::EGLint) -> types::EGLBoolean {
BindTexImage(dpy, surface, buffer)
}
#[allow(non_snake_case)]
// #[allow(unused_variables)]
#[allow(dead_code)]
#[inline]
pub unsafe fn ChooseConfig(&self, dpy: types::EGLDisplay, attrib_list: *const types::EGLint, configs: *mut types::EGLConfig, config_size: types::EGLint, num_config: *mut types::EGLint) -> types::EGLBoolean {
ChooseConfig(dpy, attrib_list, configs, config_size, num_config)
}
#[allow(non_snake_case)]
// #[allow(unused_variables)]
#[allow(dead_code)]
#[inline]
pub unsafe fn ClientWaitSync(&self, dpy: types::EGLDisplay, sync: types::EGLSync, flags: types::EGLint, timeout: types::EGLTime) -> types::EGLint {
ClientWaitSync(dpy, sync, flags, timeout)
}
#[allow(non_snake_case)]
// #[allow(unused_variables)]
#[allow(dead_code)]
#[inline]
pub unsafe fn CopyBuffers(&self, dpy: types::EGLDisplay, surface: types::EGLSurface, target: types::EGLNativePixmapType) -> types::EGLBoolean {
CopyBuffers(dpy, surface, target)
}
#[allow(non_snake_case)]
// #[allow(unused_variables)]
#[allow(dead_code)]
#[inline]
pub unsafe fn CreateContext(&self, dpy: types::EGLDisplay, config: types::EGLConfig, share_context: types::EGLContext, attrib_list: *const types::EGLint) -> types::EGLContext {
CreateContext(dpy, config, share_context, attrib_list)
}
#[allow(non_snake_case)]
// #[allow(unused_variables)]
#[allow(dead_code)]
#[inline]
pub unsafe fn CreateImage(&self, dpy: types::EGLDisplay, ctx: types::EGLContext, target: types::EGLenum, buffer: types::EGLClientBuffer, attrib_list: *const types::EGLAttrib) -> types::EGLImage {
CreateImage(dpy, ctx, target, buffer, attrib_list)
}
#[allow(non_snake_case)]
// #[allow(unused_variables)]
#[allow(dead_code)]
#[inline]
pub unsafe fn CreatePbufferFromClientBuffer(&self, dpy: types::EGLDisplay, buftype: types::EGLenum, buffer: types::EGLClientBuffer, config: types::EGLConfig, attrib_list: *const types::EGLint) -> types::EGLSurface {
CreatePbufferFromClientBuffer(dpy, buftype, buffer, config, attrib_list)
}
#[allow(non_snake_case)]
// #[allow(unused_variables)]
#[allow(dead_code)]
#[inline]
pub unsafe fn CreatePbufferSurface(&self, dpy: types::EGLDisplay, config: types::EGLConfig, attrib_list: *const types::EGLint) -> types::EGLSurface {
CreatePbufferSurface(dpy, config, attrib_list)
}
#[allow(non_snake_case)]
// #[allow(unused_variables)]
#[allow(dead_code)]
#[inline]
pub unsafe fn CreatePixmapSurface(&self, dpy: types::EGLDisplay, config: types::EGLConfig, pixmap: types::EGLNativePixmapType, attrib_list: *const types::EGLint) -> types::EGLSurface {
CreatePixmapSurface(dpy, config, pixmap, attrib_list)
}
#[allow(non_snake_case)]
// #[allow(unused_variables)]
#[allow(dead_code)]
#[inline]
pub unsafe fn CreatePlatformPixmapSurface(&self, dpy: types::EGLDisplay, config: types::EGLConfig, native_pixmap: *mut __gl_imports::raw::c_void, attrib_list: *const types::EGLAttrib) -> types::EGLSurface {
CreatePlatformPixmapSurface(dpy, config, native_pixmap, attrib_list)
}
#[allow(non_snake_case)]
// #[allow(unused_variables)]
#[allow(dead_code)]
#[inline]
pub unsafe fn CreatePlatformWindowSurface(&self, dpy: types::EGLDisplay, config: types::EGLConfig, native_window: *mut __gl_imports::raw::c_void, attrib_list: *const types::EGLAttrib) -> types::EGLSurface {
CreatePlatformWindowSurface(dpy, config, native_window, attrib_list)
}
#[allow(non_snake_case)]
// #[allow(unused_variables)]
#[allow(dead_code)]
#[inline]
pub unsafe fn CreateSync(&self, dpy: types::EGLDisplay, type_: types::EGLenum, attrib_list: *const types::EGLAttrib) -> types::EGLSync {
CreateSync(dpy, type_, attrib_list)
}
#[allow(non_snake_case)]
// #[allow(unused_variables)]
#[allow(dead_code)]
#[inline]
pub unsafe fn CreateWindowSurface(&self, dpy: types::EGLDisplay, config: types::EGLConfig, win: types::EGLNativeWindowType, attrib_list: *const types::EGLint) -> types::EGLSurface {
CreateWindowSurface(dpy, config, win, attrib_list)
}
#[allow(non_snake_case)]
// #[allow(unused_variables)]
#[allow(dead_code)]
#[inline]
pub unsafe fn DestroyContext(&self, dpy: types::EGLDisplay, ctx: types::EGLContext) -> types::EGLBoolean {
DestroyContext(dpy, ctx)
}
#[allow(non_snake_case)]
// #[allow(unused_variables)]
#[allow(dead_code)]
#[inline]
pub unsafe fn DestroyImage(&self, dpy: types::EGLDisplay, image: types::EGLImage) -> types::EGLBoolean {
DestroyImage(dpy, image)
}
#[allow(non_snake_case)]
// #[allow(unused_variables)]
#[allow(dead_code)]
#[inline]
pub unsafe fn DestroySurface(&self, dpy: types::EGLDisplay, surface: types::EGLSurface) -> types::EGLBoolean {
DestroySurface(dpy, surface)
}
#[allow(non_snake_case)]
// #[allow(unused_variables)]
#[allow(dead_code)]
#[inline]
pub unsafe fn DestroySync(&self, dpy: types::EGLDisplay, sync: types::EGLSync) -> types::EGLBoolean {
DestroySync(dpy, sync)
}
#[allow(non_snake_case)]
// #[allow(unused_variables)]
#[allow(dead_code)]
#[inline]
pub unsafe fn GetConfigAttrib(&self, dpy: types::EGLDisplay, config: types::EGLConfig, attribute: types::EGLint, value: *mut types::EGLint) -> types::EGLBoolean {
GetConfigAttrib(dpy, config, attribute, value)
}
#[allow(non_snake_case)]
// #[allow(unused_variables)]
#[allow(dead_code)]
#[inline]
pub unsafe fn GetConfigs(&self, dpy: types::EGLDisplay, configs: *mut types::EGLConfig, config_size: types::EGLint, num_config: *mut types::EGLint) -> types::EGLBoolean {
GetConfigs(dpy, configs, config_size, num_config)
}
#[allow(non_snake_case)]
// #[allow(unused_variables)]
#[allow(dead_code)]
#[inline]
pub unsafe fn GetCurrentContext(&self, ) -> types::EGLContext {
GetCurrentContext()
}
#[allow(non_snake_case)]
// #[allow(unused_variables)]
#[allow(dead_code)]
#[inline]
pub unsafe fn GetCurrentDisplay(&self, ) -> types::EGLDisplay {
GetCurrentDisplay()
}
#[allow(non_snake_case)]
// #[allow(unused_variables)]
#[allow(dead_code)]
#[inline]
pub unsafe fn GetCurrentSurface(&self, readdraw: types::EGLint) -> types::EGLSurface {
GetCurrentSurface(readdraw)
}
#[allow(non_snake_case)]
// #[allow(unused_variables)]
#[allow(dead_code)]
#[inline]
pub unsafe fn GetDisplay(&self, display_id: types::EGLNativeDisplayType) -> types::EGLDisplay {
GetDisplay(display_id)
}
#[allow(non_snake_case)]
// #[allow(unused_variables)]
#[allow(dead_code)]
#[inline]
pub unsafe fn GetError(&self, ) -> types::EGLint {
GetError()
}
#[allow(non_snake_case)]
// #[allow(unused_variables)]
#[allow(dead_code)]
#[inline]
pub unsafe fn GetPlatformDisplay(&self, platform: types::EGLenum, native_display: *mut __gl_imports::raw::c_void, attrib_list: *const types::EGLAttrib) -> types::EGLDisplay {
GetPlatformDisplay(platform, native_display, attrib_list)
}
#[allow(non_snake_case)]
// #[allow(unused_variables)]
#[allow(dead_code)]
#[inline]
pub unsafe fn GetProcAddress(&self, procname: *const __gl_imports::raw::c_char) -> types::__eglMustCastToProperFunctionPointerType {
GetProcAddress(procname)
}
#[allow(non_snake_case)]
// #[allow(unused_variables)]
#[allow(dead_code)]
#[inline]
pub unsafe fn GetSyncAttrib(&self, dpy: types::EGLDisplay, sync: types::EGLSync, attribute: types::EGLint, value: *mut types::EGLAttrib) -> types::EGLBoolean {
GetSyncAttrib(dpy, sync, attribute, value)
}
#[allow(non_snake_case)]
// #[allow(unused_variables)]
#[allow(dead_code)]
#[inline]
pub unsafe fn Initialize(&self, dpy: types::EGLDisplay, major: *mut types::EGLint, minor: *mut types::EGLint) -> types::EGLBoolean {
Initialize(dpy, major, minor)
}
#[allow(non_snake_case)]
// #[allow(unused_variables)]
#[allow(dead_code)]
#[inline]
pub unsafe fn MakeCurrent(&self, dpy: types::EGLDisplay, draw: types::EGLSurface, read: types::EGLSurface, ctx: types::EGLContext) -> types::EGLBoolean {
MakeCurrent(dpy, draw, read, ctx)
}
#[allow(non_snake_case)]
// #[allow(unused_variables)]
#[allow(dead_code)]
#[inline]
pub unsafe fn QueryAPI(&self, ) -> types::EGLenum {
QueryAPI()
}
#[allow(non_snake_case)]
// #[allow(unused_variables)]
#[allow(dead_code)]
#[inline]
pub unsafe fn QueryContext(&self, dpy: types::EGLDisplay, ctx: types::EGLContext, attribute: types::EGLint, value: *mut types::EGLint) -> types::EGLBoolean {
QueryContext(dpy, ctx, attribute, value)
}
#[allow(non_snake_case)]
// #[allow(unused_variables)]
#[allow(dead_code)]
#[inline]
pub unsafe fn QueryString(&self, dpy: types::EGLDisplay, name: types::EGLint) -> *const __gl_imports::raw::c_char {
QueryString(dpy, name)
}
#[allow(non_snake_case)]
// #[allow(unused_variables)]
#[allow(dead_code)]
#[inline]
pub unsafe fn QuerySurface(&self, dpy: types::EGLDisplay, surface: types::EGLSurface, attribute: types::EGLint, value: *mut types::EGLint) -> types::EGLBoolean {
QuerySurface(dpy, surface, attribute, value)
}
#[allow(non_snake_case)]
// #[allow(unused_variables)]
#[allow(dead_code)]
#[inline]
pub unsafe fn ReleaseTexImage(&self, dpy: types::EGLDisplay, surface: types::EGLSurface, buffer: types::EGLint) -> types::EGLBoolean {
ReleaseTexImage(dpy, surface, buffer)
}
#[allow(non_snake_case)]
// #[allow(unused_variables)]
#[allow(dead_code)]
#[inline]
pub unsafe fn ReleaseThread(&self, ) -> types::EGLBoolean {
ReleaseThread()
}
#[allow(non_snake_case)]
// #[allow(unused_variables)]
#[allow(dead_code)]
#[inline]
pub unsafe fn SurfaceAttrib(&self, dpy: types::EGLDisplay, surface: types::EGLSurface, attribute: types::EGLint, value: types::EGLint) -> types::EGLBoolean {
SurfaceAttrib(dpy, surface, attribute, value)
}
#[allow(non_snake_case)]
// #[allow(unused_variables)]
#[allow(dead_code)]
#[inline]
pub unsafe fn SwapBuffers(&self, dpy: types::EGLDisplay, surface: types::EGLSurface) -> types::EGLBoolean {
SwapBuffers(dpy, surface)
}
#[allow(non_snake_case)]
// #[allow(unused_variables)]
#[allow(dead_code)]
#[inline]
pub unsafe fn SwapInterval(&self, dpy: types::EGLDisplay, interval: types::EGLint) -> types::EGLBoolean {
SwapInterval(dpy, interval)
}
#[allow(non_snake_case)]
// #[allow(unused_variables)]
#[allow(dead_code)]
#[inline]
pub unsafe fn Terminate(&self, dpy: types::EGLDisplay) -> types::EGLBoolean {
Terminate(dpy)
}
#[allow(non_snake_case)]
// #[allow(unused_variables)]
#[allow(dead_code)]
#[inline]
pub unsafe fn WaitClient(&self, ) -> types::EGLBoolean {
WaitClient()
}
#[allow(non_snake_case)]
// #[allow(unused_variables)]
#[allow(dead_code)]
#[inline]
pub unsafe fn WaitGL(&self, ) -> types::EGLBoolean {
WaitGL()
}
#[allow(non_snake_case)]
// #[allow(unused_variables)]
#[allow(dead_code)]
#[inline]
pub unsafe fn WaitNative(&self, engine: types::EGLint) -> types::EGLBoolean {
WaitNative(engine)
}
#[allow(non_snake_case)]
// #[allow(unused_variables)]
#[allow(dead_code)]
#[inline]
pub unsafe fn WaitSync(&self, dpy: types::EGLDisplay, sync: types::EGLSync, flags: types::EGLint) -> types::EGLBoolean {
WaitSync(dpy, sync, flags)
}
}
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(dead_code)]
extern "system" {
#[link_name="eglBindAPI"] fn BindAPI(api: types::EGLenum) -> types::EGLBoolean;
#[link_name="eglBindTexImage"] fn BindTexImage(dpy: types::EGLDisplay, surface: types::EGLSurface, buffer: types::EGLint) -> types::EGLBoolean;
#[link_name="eglChooseConfig"] fn ChooseConfig(dpy: types::EGLDisplay, attrib_list: *const types::EGLint, configs: *mut types::EGLConfig, config_size: types::EGLint, num_config: *mut types::EGLint) -> types::EGLBoolean;
#[link_name="eglClientWaitSync"] fn ClientWaitSync(dpy: types::EGLDisplay, sync: types::EGLSync, flags: types::EGLint, timeout: types::EGLTime) -> types::EGLint;
#[link_name="eglCopyBuffers"] fn CopyBuffers(dpy: types::EGLDisplay, surface: types::EGLSurface, target: types::EGLNativePixmapType) -> types::EGLBoolean;
#[link_name="eglCreateContext"] fn CreateContext(dpy: types::EGLDisplay, config: types::EGLConfig, share_context: types::EGLContext, attrib_list: *const types::EGLint) -> types::EGLContext;
#[link_name="eglCreateImage"] fn CreateImage(dpy: types::EGLDisplay, ctx: types::EGLContext, target: types::EGLenum, buffer: types::EGLClientBuffer, attrib_list: *const types::EGLAttrib) -> types::EGLImage;
#[link_name="eglCreatePbufferFromClientBuffer"] fn CreatePbufferFromClientBuffer(dpy: types::EGLDisplay, buftype: types::EGLenum, buffer: types::EGLClientBuffer, config: types::EGLConfig, attrib_list: *const types::EGLint) -> types::EGLSurface;
#[link_name="eglCreatePbufferSurface"] fn CreatePbufferSurface(dpy: types::EGLDisplay, config: types::EGLConfig, attrib_list: *const types::EGLint) -> types::EGLSurface;
#[link_name="eglCreatePixmapSurface"] fn CreatePixmapSurface(dpy: types::EGLDisplay, config: types::EGLConfig, pixmap: types::EGLNativePixmapType, attrib_list: *const types::EGLint) -> types::EGLSurface;
#[link_name="eglCreatePlatformPixmapSurface"] fn CreatePlatformPixmapSurface(dpy: types::EGLDisplay, config: types::EGLConfig, native_pixmap: *mut __gl_imports::raw::c_void, attrib_list: *const types::EGLAttrib) -> types::EGLSurface;
#[link_name="eglCreatePlatformWindowSurface"] fn CreatePlatformWindowSurface(dpy: types::EGLDisplay, config: types::EGLConfig, native_window: *mut __gl_imports::raw::c_void, attrib_list: *const types::EGLAttrib) -> types::EGLSurface;
#[link_name="eglCreateSync"] fn CreateSync(dpy: types::EGLDisplay, type_: types::EGLenum, attrib_list: *const types::EGLAttrib) -> types::EGLSync;
#[link_name="eglCreateWindowSurface"] fn CreateWindowSurface(dpy: types::EGLDisplay, config: types::EGLConfig, win: types::EGLNativeWindowType, attrib_list: *const types::EGLint) -> types::EGLSurface;
#[link_name="eglDestroyContext"] fn DestroyContext(dpy: types::EGLDisplay, ctx: types::EGLContext) -> types::EGLBoolean;
#[link_name="eglDestroyImage"] fn DestroyImage(dpy: types::EGLDisplay, image: types::EGLImage) -> types::EGLBoolean;
#[link_name="eglDestroySurface"] fn DestroySurface(dpy: types::EGLDisplay, surface: types::EGLSurface) -> types::EGLBoolean;
#[link_name="eglDestroySync"] fn DestroySync(dpy: types::EGLDisplay, sync: types::EGLSync) -> types::EGLBoolean;
#[link_name="eglGetConfigAttrib"] fn GetConfigAttrib(dpy: types::EGLDisplay, config: types::EGLConfig, attribute: types::EGLint, value: *mut types::EGLint) -> types::EGLBoolean;
#[link_name="eglGetConfigs"] fn GetConfigs(dpy: types::EGLDisplay, configs: *mut types::EGLConfig, config_size: types::EGLint, num_config: *mut types::EGLint) -> types::EGLBoolean;
#[link_name="eglGetCurrentContext"] fn GetCurrentContext() -> types::EGLContext;
#[link_name="eglGetCurrentDisplay"] fn GetCurrentDisplay() -> types::EGLDisplay;
#[link_name="eglGetCurrentSurface"] fn GetCurrentSurface(readdraw: types::EGLint) -> types::EGLSurface;
#[link_name="eglGetDisplay"] fn GetDisplay(display_id: types::EGLNativeDisplayType) -> types::EGLDisplay;
#[link_name="eglGetError"] fn GetError() -> types::EGLint;
#[link_name="eglGetPlatformDisplay"] fn GetPlatformDisplay(platform: types::EGLenum, native_display: *mut __gl_imports::raw::c_void, attrib_list: *const types::EGLAttrib) -> types::EGLDisplay;
#[link_name="eglGetProcAddress"] fn GetProcAddress(procname: *const __gl_imports::raw::c_char) -> types::__eglMustCastToProperFunctionPointerType;
#[link_name="eglGetSyncAttrib"] fn GetSyncAttrib(dpy: types::EGLDisplay, sync: types::EGLSync, attribute: types::EGLint, value: *mut types::EGLAttrib) -> types::EGLBoolean;
#[link_name="eglInitialize"] fn Initialize(dpy: types::EGLDisplay, major: *mut types::EGLint, minor: *mut types::EGLint) -> types::EGLBoolean;
#[link_name="eglMakeCurrent"] fn MakeCurrent(dpy: types::EGLDisplay, draw: types::EGLSurface, read: types::EGLSurface, ctx: types::EGLContext) -> types::EGLBoolean;
#[link_name="eglQueryAPI"] fn QueryAPI() -> types::EGLenum;
#[link_name="eglQueryContext"] fn QueryContext(dpy: types::EGLDisplay, ctx: types::EGLContext, attribute: types::EGLint, value: *mut types::EGLint) -> types::EGLBoolean;
#[link_name="eglQueryString"] fn QueryString(dpy: types::EGLDisplay, name: types::EGLint) -> *const __gl_imports::raw::c_char;
#[link_name="eglQuerySurface"] fn QuerySurface(dpy: types::EGLDisplay, surface: types::EGLSurface, attribute: types::EGLint, value: *mut types::EGLint) -> types::EGLBoolean;
#[link_name="eglReleaseTexImage"] fn ReleaseTexImage(dpy: types::EGLDisplay, surface: types::EGLSurface, buffer: types::EGLint) -> types::EGLBoolean;
#[link_name="eglReleaseThread"] fn ReleaseThread() -> types::EGLBoolean;
#[link_name="eglSurfaceAttrib"] fn SurfaceAttrib(dpy: types::EGLDisplay, surface: types::EGLSurface, attribute: types::EGLint, value: types::EGLint) -> types::EGLBoolean;
#[link_name="eglSwapBuffers"] fn SwapBuffers(dpy: types::EGLDisplay, surface: types::EGLSurface) -> types::EGLBoolean;
#[link_name="eglSwapInterval"] fn SwapInterval(dpy: types::EGLDisplay, interval: types::EGLint) -> types::EGLBoolean;
#[link_name="eglTerminate"] fn Terminate(dpy: types::EGLDisplay) -> types::EGLBoolean;
#[link_name="eglWaitClient"] fn WaitClient() -> types::EGLBoolean;
#[link_name="eglWaitGL"] fn WaitGL() -> types::EGLBoolean;
#[link_name="eglWaitNative"] fn WaitNative(engine: types::EGLint) -> types::EGLBoolean;
#[link_name="eglWaitSync"] fn WaitSync(dpy: types::EGLDisplay, sync: types::EGLSync, flags: types::EGLint) -> types::EGLBoolean;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment