Bug 1735097 - Geolocation: use EpochTimeStamp instead of DOMTimeStamp r=saschanaz...
[gecko.git] / gfx / gl / GLTypes.h
blobf5b317b4b758d65f928c6f3d1a5f3122b11a9ebb
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #ifndef GLTYPES_H_
6 #define GLTYPES_H_
8 #include <stddef.h>
9 #include <stdint.h>
11 #ifndef GLAPIENTRY
12 # ifdef WIN32
13 # include <windef.h>
14 # define GLAPIENTRY APIENTRY
15 # define GLAPI
16 # else
17 # define GLAPIENTRY
18 # define GLAPI
19 # endif
20 #endif
22 typedef uint8_t realGLboolean;
24 #if !defined(__gltypes_h_) && !defined(__gl_h_)
25 # define __gltypes_h_
26 # define __gl_h_
28 typedef uint32_t GLenum;
29 typedef uint32_t GLbitfield;
30 typedef uint32_t GLuint;
31 typedef int32_t GLint;
32 typedef int32_t GLsizei;
33 typedef int8_t GLbyte;
34 typedef int16_t GLshort;
35 typedef uint8_t GLubyte;
36 typedef uint16_t GLushort;
37 typedef float GLfloat;
38 typedef float GLclampf;
39 # ifndef GLdouble_defined
40 typedef double GLdouble;
41 # endif
42 typedef double GLclampd;
43 typedef void GLvoid;
45 typedef char GLchar;
46 # ifndef __gl2_h_
47 # ifdef _WIN64
48 typedef signed long long int GLintptr;
49 typedef signed long long int GLsizeiptr;
50 # else
51 typedef signed long int GLintptr;
52 typedef signed long int GLsizeiptr;
53 # endif
54 # endif
56 #endif /* #if !defined(__gltypes_h_) && !defined(__gl_h_) */
58 #include <stdint.h>
60 // ARB_sync
61 typedef struct __GLsync* GLsync;
62 typedef int64_t GLint64;
63 typedef uint64_t GLuint64;
65 // OES_EGL_image (GLES)
66 typedef void* GLeglImage;
68 // KHR_debug
69 typedef void(GLAPIENTRY* GLDEBUGPROC)(GLenum source, GLenum type, GLuint id,
70 GLenum severity, GLsizei length,
71 const GLchar* message,
72 const GLvoid* userParam);
74 // EGL types
75 typedef void* EGLImage;
76 typedef int EGLint;
77 typedef unsigned int EGLBoolean;
78 typedef unsigned int EGLenum;
79 typedef intptr_t EGLAttrib;
80 typedef void* EGLConfig;
81 typedef void* EGLContext;
82 typedef void* EGLDisplay;
83 typedef void* EGLDeviceEXT;
84 typedef void* EGLSurface;
85 typedef void* EGLClientBuffer;
86 typedef void* EGLCastToRelevantPtr;
87 typedef void* EGLImage;
88 typedef void* EGLSync;
89 typedef void* EGLStreamKHR;
90 typedef uint64_t EGLTime;
92 #define EGL_NO_CONTEXT ((EGLContext)0)
93 #define EGL_NO_DISPLAY ((EGLDisplay)0)
94 #define EGL_NO_SURFACE ((EGLSurface)0)
95 #define EGL_NO_CONFIG ((EGLConfig) nullptr)
96 #define EGL_NO_SYNC ((EGLSync)0)
97 #define EGL_NO_IMAGE ((EGLImage)0)
99 #ifdef XP_WIN
100 # ifndef WIN32_LEAN_AND_MEAN
101 # define WIN32_LEAN_AND_MEAN 1
102 # endif
104 # include <windef.h>
106 typedef HDC EGLNativeDisplayType;
107 typedef HBITMAP EGLNativePixmapType;
108 typedef HWND EGLNativeWindowType;
109 #else
110 typedef void* EGLNativeDisplayType;
111 typedef void* EGLNativePixmapType;
112 typedef void* EGLNativeWindowType;
113 #endif
115 #endif // GLTYPES_H_