Mercurial > touhou
comparison pytouhou/lib/_glfw.pxd @ 636:4fa0a8e7d941
Add a GLFW implementation of gui.Window.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sun, 14 May 2017 20:14:03 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
635:80687f258001 | 636:4fa0a8e7d941 |
---|---|
1 # -*- encoding: utf-8 -*- | |
2 ## | |
3 ## Copyright (C) 2016 Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | |
4 ## | |
5 ## This program is free software; you can redistribute it and/or modify | |
6 ## it under the terms of the GNU General Public License as published | |
7 ## by the Free Software Foundation; version 3 only. | |
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 General Public License for more details. | |
13 ## | |
14 | |
15 cdef extern from "GLFW/glfw3.h" nogil: | |
16 ctypedef void* GLFWmonitor | |
17 ctypedef void* GLFWwindow | |
18 | |
19 ctypedef void (* GLFWerrorfun)(int, const char*) | |
20 ctypedef void (* GLFWwindowclosefun)(GLFWwindow*) | |
21 ctypedef void (* GLFWframebuffersizefun)(GLFWwindow*,int,int) | |
22 ctypedef void (* GLFWkeyfun)(GLFWwindow*, int, int, int, int) | |
23 | |
24 int glfwInit() | |
25 void glfwTerminate() | |
26 | |
27 GLFWerrorfun glfwSetErrorCallback(GLFWerrorfun cbfun) | |
28 | |
29 void glfwWindowHint(int hint, int value) | |
30 GLFWwindow* glfwCreateWindow(int width, int height, const char* title, GLFWmonitor* monitor, GLFWwindow* share) | |
31 void glfwDestroyWindow(GLFWwindow* window) | |
32 void glfwSetWindowShouldClose(GLFWwindow* window, int value) | |
33 | |
34 GLFWmonitor* glfwGetPrimaryMonitor() | |
35 GLFWmonitor* glfwGetWindowMonitor(GLFWwindow* window) | |
36 void glfwSetWindowMonitor(GLFWwindow* window, GLFWmonitor* monitor, int xpos, int ypos, int width, int height, int refreshRate) | |
37 | |
38 GLFWwindowclosefun glfwSetWindowCloseCallback(GLFWwindow* window, GLFWwindowclosefun cbfun) | |
39 GLFWframebuffersizefun glfwSetFramebufferSizeCallback(GLFWwindow* window, GLFWframebuffersizefun cbfun) | |
40 void glfwPollEvents() | |
41 | |
42 bint glfwGetKey(GLFWwindow* window, int key) | |
43 GLFWkeyfun glfwSetKeyCallback(GLFWwindow* window, GLFWkeyfun cbfun) | |
44 | |
45 void glfwMakeContextCurrent(GLFWwindow* window) | |
46 void glfwSwapBuffers(GLFWwindow* window) | |
47 | |
48 ctypedef enum: | |
49 GLFW_DONT_CARE | |
50 | |
51 ctypedef enum: | |
52 GLFW_KEY_Z | |
53 GLFW_KEY_X | |
54 GLFW_KEY_P | |
55 GLFW_KEY_LEFT_SHIFT | |
56 GLFW_KEY_UP | |
57 GLFW_KEY_DOWN | |
58 GLFW_KEY_LEFT | |
59 GLFW_KEY_RIGHT | |
60 GLFW_KEY_LEFT_CONTROL | |
61 GLFW_KEY_ESCAPE | |
62 GLFW_KEY_HOME | |
63 GLFW_KEY_ENTER | |
64 GLFW_KEY_F11 | |
65 | |
66 ctypedef enum: | |
67 GLFW_MOD_ALT | |
68 | |
69 ctypedef enum: | |
70 GLFW_PRESS | |
71 | |
72 ctypedef enum: | |
73 GLFW_CLIENT_API | |
74 GLFW_OPENGL_PROFILE | |
75 GLFW_CONTEXT_VERSION_MAJOR | |
76 GLFW_CONTEXT_VERSION_MINOR | |
77 GLFW_DEPTH_BITS | |
78 GLFW_ALPHA_BITS | |
79 GLFW_DOUBLEBUFFER | |
80 GLFW_RESIZABLE | |
81 | |
82 ctypedef enum: | |
83 GLFW_OPENGL_API | |
84 GLFW_OPENGL_ES_API | |
85 GLFW_OPENGL_CORE_PROFILE |