egl: match geometry position of glxgears
[mesa-demos.git] / src / egl / eglut / eglut.h
blob7c07b6d8d95a7073a8e48f6252cd38df6728b9a7
1 /*
2 * Copyright (C) 2010 LunarG Inc.
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice shall be included
12 * in all copies or substantial portions of the Software.
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
22 * Authors:
23 * Chia-I Wu <olv@lunarg.com>
26 #ifndef EGLUT_H
27 #define EGLUT_H
29 /* used by eglutInitAPIMask */
30 enum {
31 EGLUT_OPENGL_BIT = 0x1,
32 EGLUT_OPENGL_ES1_BIT = 0x2,
33 EGLUT_OPENGL_ES2_BIT = 0x4,
34 EGLUT_OPENVG_BIT = 0x8
37 /* used by EGLUTspecialCB */
38 enum {
39 /* function keys */
40 EGLUT_KEY_F1,
41 EGLUT_KEY_F2,
42 EGLUT_KEY_F3,
43 EGLUT_KEY_F4,
44 EGLUT_KEY_F5,
45 EGLUT_KEY_F6,
46 EGLUT_KEY_F7,
47 EGLUT_KEY_F8,
48 EGLUT_KEY_F9,
49 EGLUT_KEY_F10,
50 EGLUT_KEY_F11,
51 EGLUT_KEY_F12,
53 /* directional keys */
54 EGLUT_KEY_LEFT,
55 EGLUT_KEY_UP,
56 EGLUT_KEY_RIGHT,
57 EGLUT_KEY_DOWN,
60 /* used by eglutGet */
61 enum {
62 EGLUT_ELAPSED_TIME
65 typedef void (*EGLUTidleCB)(void);
66 typedef void (*EGLUTreshapeCB)(int, int);
67 typedef void (*EGLUTdisplayCB)(void);
68 typedef void (*EGLUTkeyboardCB)(unsigned char);
69 typedef void (*EGLUTspecialCB)(int);
71 void eglutInitAPIMask(int mask);
72 void eglutInitWindowSize(int width, int height);
73 void eglutInit(int argc, char **argv);
75 int eglutGet(int state);
77 void eglutIdleFunc(EGLUTidleCB func);
78 void eglutPostRedisplay(void);
80 void eglutMainLoop(void);
82 int eglutCreateWindow(const char *title);
83 void eglutDestroyWindow(int win);
85 int eglutGetWindowWidth(void);
86 int eglutGetWindowHeight(void);
88 void eglutDisplayFunc(EGLUTdisplayCB func);
89 void eglutReshapeFunc(EGLUTreshapeCB func);
90 void eglutKeyboardFunc(EGLUTkeyboardCB func);
91 void eglutSpecialFunc(EGLUTspecialCB func);
93 #endif /* EGLUT_H */