GLUS
glus_window.h
Go to the documentation of this file.
1 /*
2  * GLUS - Modern OpenGL, OpenGL ES and OpenVG Utilities. Copyright (C) since 2010 Norbert Nopper
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public License
15  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef GLUS_WINDOW_H_
19 #define GLUS_WINDOW_H_
20 
34 GLUSAPI GLUSboolean GLUSAPIENTRY glusWindowCreate(const GLUSchar* title, const GLUSint width, const GLUSint height, const GLUSboolean fullscreen, const GLUSboolean noResize, const EGLint* configAttribList, const EGLint* contextAttribList);
35 
40 
47 
55 
63 
71 
77 
85 
86 //
87 
94 
101 GLUSAPI GLUSvoid GLUSAPIENTRY glusWindowSetReshapeFunc(GLUSvoid(*glusNewReshape)(const GLUSint width, const GLUSint height));
102 
111 
116 
122 GLUSAPI GLUSvoid GLUSAPIENTRY glusWindowSetKeyFunc(GLUSvoid(*glusNewKey)(const GLUSboolean pressed, const GLUSint key));
123 
134 GLUSAPI GLUSvoid GLUSAPIENTRY glusWindowSetMouseFunc(GLUSvoid(*glusNewMouse)(const GLUSboolean pressed, const GLUSint button, const GLUSint xPos, const GLUSint yPos));
135 
141 GLUSAPI GLUSvoid GLUSAPIENTRY glusWindowSetMouseWheelFunc(GLUSvoid(*glusNewMouseWheel)(const GLUSint buttons, const GLUSint ticks, const GLUSint xPos, const GLUSint yPos));
142 
148 GLUSAPI GLUSvoid GLUSAPIENTRY glusWindowSetMouseMoveFunc(GLUSvoid(*glusNewMouseMove)(const GLUSint buttons, const GLUSint xPos, const GLUSint yPos));
149 
159 
166 
171 
178 
185 
186 #endif /* GLUS_WINDOW_H_ */
GLUSAPI GLUSvoid GLUSAPIENTRY glusWindowSetReshapeFunc(GLUSvoid(*glusNewReshape)(const GLUSint width, const GLUSint height))
Sets the users reshape function.
Definition: glus_window_egl_es.c:91
GLUSAPI GLUSvoid GLUSAPIENTRY glusWindowSwapInterval(GLUSint interval)
Specifies the minimum number of video frame periods per buffer swap for the window.
Definition: glus_window_egl_es.c:416
int GLUSint
Definition: glus_typedef.h:27
float GLUSfloat
Definition: glus_typedef.h:37
GLUSAPI GLUSvoid GLUSAPIENTRY glusWindowSetKeyFunc(GLUSvoid(*glusNewKey)(const GLUSboolean pressed, const GLUSint key))
Sets the users key handler.
Definition: glus_window_egl_es.c:66
GLUSAPI GLUSvoid GLUSAPIENTRY glusWindowShutdown(GLUSvoid)
Called after the main loop.
Definition: glus_window_egl_es.c:399
GLUSAPI GLUSboolean GLUSAPIENTRY glusWindowLoopDoRecording(GLUSvoid)
Calls the main loop once.
Definition: glus_window_egl_es.c:359
void GLUSvoid
Definition: glus_typedef.h:51
GLUSAPI GLUSvoid GLUSAPIENTRY glusWindowDestroy(GLUSvoid)
Cleans up the window and frees all resources.
Definition: glus_window_egl_es.c:232
GLUSAPI GLUSvoid GLUSAPIENTRY glusWindowSetMouseMoveFunc(GLUSvoid(*glusNewMouseMove)(const GLUSint buttons, const GLUSint xPos, const GLUSint yPos))
Sets the users mouse move function.
Definition: glus_window_egl_es.c:81
char GLUSchar
Definition: glus_typedef.h:24
GLUSAPI GLUSboolean GLUSAPIENTRY glusWindowIsRecording(GLUSvoid)
Checks, if a recording is running.
Definition: glus_window_recording.c:75
GLUSAPI GLUSboolean GLUSAPIENTRY glusWindowCreate(const GLUSchar *title, const GLUSint width, const GLUSint height, const GLUSboolean fullscreen, const GLUSboolean noResize, const EGLint *configAttribList, const EGLint *contextAttribList)
Creates the window.
Definition: glus_window_egl_es.c:243
GLUSAPI GLUSvoid GLUSAPIENTRY glusWindowSetMouseWheelFunc(GLUSvoid(*glusNewMouseWheel)(const GLUSint buttons, const GLUSint ticks, const GLUSint xPos, const GLUSint yPos))
Sets the users mouse wheel function.
Definition: glus_window_egl_es.c:76
GLUSAPI GLUSboolean GLUSAPIENTRY glusWindowStartRecording(GLUSint numberFrames, GLUSint framesPerSecond)
Starts recording image clips, by making screenshots of the window.
Definition: glus_window_recording.c:54
GLUSAPI GLUSint GLUSAPIENTRY glusWindowGetWidth(GLUSvoid)
Get window width.
Definition: glus_window_egl_es.c:421
#define GLUSAPI
Definition: glus_function.h:38
GLUSAPI GLUSvoid GLUSAPIENTRY glusWindowSetInitFunc(GLUSboolean(*glusNewInit)(GLUSvoid))
Sets the users initialization function.
Definition: glus_window_egl_es.c:86
GLUSAPI GLUSboolean GLUSAPIENTRY glusWindowStartup(GLUSvoid)
Starts everything before the main loop.
Definition: glus_window_egl_es.c:318
unsigned char GLUSboolean
Definition: glus_typedef.h:21
GLUSAPI GLUSvoid GLUSAPIENTRY glusWindowSetTerminateFunc(GLUSvoid(*glusNewTerminate)(GLUSvoid))
Sets the users terminate function, which is called in any case.
Definition: glus_window_egl_es.c:101
GLUSAPI GLUSboolean GLUSAPIENTRY glusWindowLoop(GLUSvoid)
Calls the main loop once.
Definition: glus_window_egl_es.c:342
GLUSAPI GLUSboolean GLUSAPIENTRY glusWindowRun(GLUSvoid)
Starts the main loop.
Definition: glus_window_egl_es.c:292
GLUSAPI GLUSvoid GLUSAPIENTRY glusWindowSetUpdateFunc(GLUSboolean(*glusNewUpdate)(const GLUSfloat time))
Sets the users update function, which is called every frame.
Definition: glus_window_egl_es.c:96
GLUSAPI GLUSvoid GLUSAPIENTRY glusWindowSetMouseFunc(GLUSvoid(*glusNewMouse)(const GLUSboolean pressed, const GLUSint button, const GLUSint xPos, const GLUSint yPos))
Sets the users mouse handler.
Definition: glus_window_egl_es.c:71
#define GLUSAPIENTRY
Definition: glus_function.h:31
int EGLint
Definition: glus.h:57
GLUSAPI GLUSint GLUSAPIENTRY glusWindowGetHeight(GLUSvoid)
Get window height.
Definition: glus_window_egl_es.c:426
GLUSAPI GLUSvoid GLUSAPIENTRY glusWindowStopRecording(GLUSvoid)
Stops recording the image clips.
Definition: glus_window_recording.c:80