find . -type f -exec chmod -x {} +
| 1 | 1 |
new file mode 100755 |
| ... | ... |
@@ -0,0 +1,139 @@ |
| 1 |
+#ifndef _MICROGLUT_ |
|
| 2 |
+#define _MICROGLUT_ |
|
| 3 |
+ |
|
| 4 |
+#ifdef __cplusplus |
|
| 5 |
+extern "C" {
|
|
| 6 |
+#endif |
|
| 7 |
+ |
|
| 8 |
+// If this is compiled on the Mac or Windows, tell me! |
|
| 9 |
+#ifdef __APPLE__ |
|
| 10 |
+ ERROR! This is NOT the Mac version of MicroGlut and will not work on the Mac! |
|
| 11 |
+#endif |
|
| 12 |
+#ifdef _WIN32 |
|
| 13 |
+ ERROR! This is NOT the Windows version of MicroGlut and will not work on Windows! |
|
| 14 |
+#endif |
|
| 15 |
+ |
|
| 16 |
+// Same or similar to old GLUT calls |
|
| 17 |
+void glutMainLoop(); |
|
| 18 |
+void glutCheckLoop(); |
|
| 19 |
+void glutInit(int *argcp, char **argv); |
|
| 20 |
+void glutPostRedisplay(); |
|
| 21 |
+ |
|
| 22 |
+void glutReshapeFunc(void (*func)(int width, int height)); |
|
| 23 |
+void glutDisplayFunc(void (*func)(void)); |
|
| 24 |
+void glutKeyboardFunc(void (*func)(unsigned char key, int x, int y)); |
|
| 25 |
+void glutKeyboardUpFunc(void (*func)(unsigned char key, int x, int y)); |
|
| 26 |
+void glutSpecialFunc(void (*func)(unsigned char key, int x, int y)); |
|
| 27 |
+void glutSpecialUpFunc(void (*func)(unsigned char key, int x, int y)); |
|
| 28 |
+ |
|
| 29 |
+void glutMouseFunc(void (*func)(int button, int state, int x, int y)); |
|
| 30 |
+void glutPassiveMotionFunc(void (*func)(int x, int y)); |
|
| 31 |
+void glutMotionFunc(void (*func)(int x, int y)); |
|
| 32 |
+ |
|
| 33 |
+void glutInitWindowPosition (int x, int y); |
|
| 34 |
+void glutInitWindowSize (int width, int height); |
|
| 35 |
+void glutCreateWindow (const char *windowTitle); |
|
| 36 |
+ |
|
| 37 |
+void glutSwapBuffers(); |
|
| 38 |
+ |
|
| 39 |
+#define GLUT_ELAPSED_TIME (700) |
|
| 40 |
+#define GLUT_WINDOW_WIDTH (102) |
|
| 41 |
+#define GLUT_WINDOW_HEIGHT (103) |
|
| 42 |
+#define GLUT_MOUSE_POSITION_X (802) |
|
| 43 |
+#define GLUT_MOUSE_POSITION_Y (803) |
|
| 44 |
+// #define GLUT_QUIT_FLAG (801) |
|
| 45 |
+// To do: quit flag |
|
| 46 |
+int glutGet(int type); |
|
| 47 |
+ |
|
| 48 |
+void glutInitDisplayMode(unsigned int mode); |
|
| 49 |
+void glutIdleFunc(void (*func)(void)); |
|
| 50 |
+ |
|
| 51 |
+// Standard GLUT timer |
|
| 52 |
+void glutTimerFunc(int millis, void (*func)(int arg), int arg); |
|
| 53 |
+// Ingemar's version |
|
| 54 |
+void glutRepeatingTimer(int millis); |
|
| 55 |
+ // Old name, will be removed: |
|
| 56 |
+#define glutRepeatingTimerFunc glutRepeatingTimer |
|
| 57 |
+ |
|
| 58 |
+// New call for polling the keyboard, good for games |
|
| 59 |
+char glutKeyIsDown(unsigned char c); |
|
| 60 |
+// And the same for the mouse |
|
| 61 |
+char glutMouseIsDown(unsigned char c); |
|
| 62 |
+ |
|
| 63 |
+void glutWarpPointer( int x, int y ); |
|
| 64 |
+void glutShowCursor(); |
|
| 65 |
+void glutHideCursor(); |
|
| 66 |
+ |
|
| 67 |
+void glutReshapeWindow(int width, int height); |
|
| 68 |
+void glutPositionWindow(int x, int y); |
|
| 69 |
+void glutSetWindowTitle(char *title); |
|
| 70 |
+void glutInitContextVersion(int major, int minor); |
|
| 71 |
+ |
|
| 72 |
+void glutFullScreen(); |
|
| 73 |
+void glutExitFullScreen(); |
|
| 74 |
+void glutToggleFullScreen(); |
|
| 75 |
+void glutExit(); |
|
| 76 |
+ |
|
| 77 |
+/* Mouse buttons. */ |
|
| 78 |
+#define GLUT_LEFT_BUTTON 0 |
|
| 79 |
+// No support for middle yet |
|
| 80 |
+#define GLUT_MIDDLE_BUTTON 1 |
|
| 81 |
+#define GLUT_RIGHT_BUTTON 2 |
|
| 82 |
+ |
|
| 83 |
+/* Mouse button state. */ |
|
| 84 |
+#define GLUT_DOWN 0 |
|
| 85 |
+#define GLUT_UP 1 |
|
| 86 |
+ |
|
| 87 |
+// Special keys. |
|
| 88 |
+// I am reusing unused ASCII codes with no mercy! |
|
| 89 |
+#define GLUT_KEY_F1 1 |
|
| 90 |
+#define GLUT_KEY_F2 2 |
|
| 91 |
+#define GLUT_KEY_F3 3 |
|
| 92 |
+#define GLUT_KEY_F4 4 |
|
| 93 |
+#define GLUT_KEY_F5 5 |
|
| 94 |
+#define GLUT_KEY_F6 6 |
|
| 95 |
+#define GLUT_KEY_F7 7 |
|
| 96 |
+// F8 and up ignored since they are not possible on some keyboards - like mine |
|
| 97 |
+#define GLUT_KEY_LEFT 28 |
|
| 98 |
+#define GLUT_KEY_UP 29 |
|
| 99 |
+#define GLUT_KEY_RIGHT 30 |
|
| 100 |
+#define GLUT_KEY_DOWN 31 |
|
| 101 |
+#define GLUT_KEY_PAGE_UP 22 |
|
| 102 |
+#define GLUT_KEY_PAGE_DOWN 23 |
|
| 103 |
+#define GLUT_KEY_HOME 24 |
|
| 104 |
+#define GLUT_KEY_END 25 |
|
| 105 |
+#define GLUT_KEY_INSERT 26 |
|
| 106 |
+ |
|
| 107 |
+#define GLUT_KEY_LEFT_SHIFT 14 |
|
| 108 |
+#define GLUT_KEY_RIGHT_SHIFT 15 |
|
| 109 |
+#define GLUT_KEY_CONTROL 16 |
|
| 110 |
+#define GLUT_KEY_ALT 17 |
|
| 111 |
+#define GLUT_KEY_COMMAND 18 |
|
| 112 |
+#define GLUT_KEY_KEYPAD5 19 |
|
| 113 |
+#define GLUT_KEY_KEYPAD_NUMLOCK 20 |
|
| 114 |
+ |
|
| 115 |
+// These obvious ones... |
|
| 116 |
+#define GLUT_KEY_ESC 27 |
|
| 117 |
+#define GLUT_KEY_TAB 9 |
|
| 118 |
+#define GLUT_KEY_RETURN 13 |
|
| 119 |
+// more |
|
| 120 |
+ |
|
| 121 |
+ |
|
| 122 |
+// Only some modes supported |
|
| 123 |
+#define GLUT_STENCIL 32 |
|
| 124 |
+#define GLUT_MULTISAMPLE 128 |
|
| 125 |
+//#define GLUT_STEREO 256 |
|
| 126 |
+#define GLUT_RGB 0 |
|
| 127 |
+#define GLUT_RGBA GLUT_RGB |
|
| 128 |
+#define GLUT_ALPHA GLUT_RGB |
|
| 129 |
+#define GLUT_SINGLE 0 |
|
| 130 |
+#define GLUT_DOUBLE 2 |
|
| 131 |
+#define GLUT_DEPTH 16 |
|
| 132 |
+ |
|
| 133 |
+ |
|
| 134 |
+#ifdef __cplusplus |
|
| 135 |
+} |
|
| 136 |
+#endif |
|
| 137 |
+ |
|
| 138 |
+ |
|
| 139 |
+#endif |