Subversion Repositories Kolibri OS

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
4503 Serge 1
/*
2
 * Copyright (C) 2010 LunarG Inc.
3
 *
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:
10
 *
11
 * The above copyright notice and this permission notice shall be included
12
 * in all copies or substantial portions of the Software.
13
 *
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.
21
 *
22
 * Authors:
23
 *    Chia-I Wu 
24
 */
25
 
26
#ifndef EGLUT_H
27
#define EGLUT_H
28
 
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
35
};
36
 
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,
52
 
53
   /* directional keys */
54
   EGLUT_KEY_LEFT  = 176,
55
   EGLUT_KEY_UP    = 178,
56
   EGLUT_KEY_RIGHT = 179,
57
   EGLUT_KEY_DOWN  = 177,
58
};
59
 
60
 
61
/* used by eglutGet */
62
enum {
63
   EGLUT_ELAPSED_TIME
64
};
65
 
66
typedef void (*EGLUTidleCB)(void);
67
typedef void (*EGLUTreshapeCB)(int, int);
68
typedef void (*EGLUTdisplayCB)(void);
69
typedef void (*EGLUTkeyboardCB)(unsigned char);
70
typedef void (*EGLUTspecialCB)(int);
71
 
72
void eglutInitAPIMask(int mask);
73
void eglutInitWindowSize(int width, int height);
74
void eglutInit(int argc, char **argv);
75
void eglutFini(void);
76
 
77
int eglutGet(int state);
78
 
79
void eglutIdleFunc(EGLUTidleCB func);
80
void eglutPostRedisplay(void);
81
 
82
void eglutMainLoop(void);
83
 
84
int eglutCreateWindow(const char *title);
85
void eglutDestroyWindow(int win);
86
 
87
int eglutGetWindowWidth(void);
88
int eglutGetWindowHeight(void);
89
 
90
void eglutDisplayFunc(EGLUTdisplayCB func);
91
void eglutReshapeFunc(EGLUTreshapeCB func);
92
void eglutKeyboardFunc(EGLUTkeyboardCB func);
93
void eglutSpecialFunc(EGLUTspecialCB func);
94
 
95
#endif /* EGLUT_H */