1 /** 2 * GLFW3 functions. 3 * See_Also: 4 * $(LINK http://www.glfw.org/docs/latest/modules.html) 5 */ 6 module glfw3d.glfw3.func; 7 8 import glfw3d.glfw3.type; 9 10 extern(C) nothrow { 11 int glfwInit(); 12 void glfwTerminate(); 13 void glfwGetVersion(int* major, int* minor, int* rev); 14 const(char)* glfwGetVersionString(); 15 GLFWerrorfun glfwSetErrorCallback(GLFWerrorfun cbfun); 16 GLFWmonitor** glfwGetMonitors(int* count); 17 GLFWmonitor* glfwGetPrimaryMonitor(); 18 void glfwGetMonitorPos(GLFWmonitor* monitor, int* xpos, int* ypos); 19 void glfwGetMonitorPhysicalSize(GLFWmonitor* monitor, 20 int* widthMM, 21 int* heightMM); 22 const(char)* glfwGetMonitorName(GLFWmonitor* monitor); 23 GLFWmonitorfun glfwSetMonitorCallback(GLFWmonitorfun cbfun); 24 const(GLFWvidmode)* glfwGetVideoModes(GLFWmonitor* monitor, int* count); 25 const(GLFWvidmode)* glfwGetVideoMode(GLFWmonitor* monitor); 26 void glfwSetGamma(GLFWmonitor* monitor, float gamma); 27 const(GLFWgammaramp)* glfwGetGammaRamp(GLFWmonitor* monitor); 28 void glfwSetGammaRamp(GLFWmonitor* monitor, const(GLFWgammaramp)* ramp); 29 void glfwDefaultWindowHints(); 30 void glfwWindowHint(int hint, int value); 31 GLFWwindow* glfwCreateWindow(int width, 32 int height, 33 const(char)* title, 34 GLFWmonitor* monitor, 35 GLFWwindow* share); 36 void glfwDestroyWindow(GLFWwindow* window); 37 int glfwWindowShouldClose(GLFWwindow* window); 38 void glfwSetWindowShouldClose(GLFWwindow* window, int value); 39 void glfwSetWindowTitle(GLFWwindow* window, const(char)* title); 40 void glfwSetWindowIcon(GLFWwindow* window, 41 int count, 42 const(GLFWimage)* images); 43 void glfwGetWindowPos(GLFWwindow* window, int* xpos, int* ypos); 44 void glfwSetWindowPos(GLFWwindow* window, int xpos, int ypos); 45 void glfwGetWindowSize(GLFWwindow* window, int* width, int* height); 46 void glfwSetWindowSizeLimits(GLFWwindow* window, 47 int minwidth, 48 int minheight, 49 int maxwidth, 50 int maxheight); 51 void glfwSetWindowAspectRatio(GLFWwindow* window, int numer, int denom); 52 void glfwSetWindowSize(GLFWwindow* window, int width, int height); 53 void glfwGetFramebufferSize(GLFWwindow* window, 54 int* width, 55 int* height); 56 void glfwGetWindowFrameSize(GLFWwindow* window, 57 int* left, 58 int* top, 59 int* right, 60 int* bottom); 61 void glfwIconifyWindow(GLFWwindow* window); 62 void glfwRestoreWindow(GLFWwindow* window); 63 void glfwMaximizeWindow(GLFWwindow* window); 64 void glfwShowWindow(GLFWwindow* window); 65 void glfwHideWindow(GLFWwindow* window); 66 void glfwFocusWindow(GLFWwindow* window); 67 GLFWmonitor* glfwGetWindowMonitor(GLFWwindow* window); 68 void glfwSetWindowMonitor(GLFWwindow* window, 69 GLFWmonitor* monitor, 70 int xpos, 71 int ypos, 72 int width, 73 int height, 74 int refreshRate); 75 int glfwGetWindowAttrib(GLFWwindow* window, int attrib); 76 void glfwSetWindowUserPointer(GLFWwindow* window, void* pointer); 77 void* glfwGetWindowUserPointer(GLFWwindow* window); 78 GLFWwindowposfun glfwSetWindowPosCallback(GLFWwindow* window, 79 GLFWwindowposfun cbfun); 80 GLFWwindowsizefun glfwSetWindowSizeCallback(GLFWwindow* window, 81 GLFWwindowsizefun cbfun); 82 GLFWwindowclosefun glfwSetWindowCloseCallback(GLFWwindow* window, 83 GLFWwindowclosefun cbfun); 84 GLFWwindowrefreshfun glfwSetWindowRefreshCallback(GLFWwindow* window, 85 GLFWwindowrefreshfun cbfun); 86 GLFWwindowfocusfun glfwSetWindowFocusCallback(GLFWwindow* window, 87 GLFWwindowfocusfun cbfun); 88 GLFWwindowiconifyfun glfwSetWindowIconifyCallback(GLFWwindow* window, 89 GLFWwindowiconifyfun cbfun); 90 GLFWframebuffersizefun glfwSetFramebufferSizeCallback(GLFWwindow* window, 91 GLFWframebuffersizefun cbfun); 92 void glfwPollEvents(); 93 void glfwWaitEvents(); 94 void glfwWaitEventsTimeout(double timeout); 95 void glfwPostEmptyEvent(); 96 int glfwGetInputMode(GLFWwindow* window, int mode); 97 void glfwSetInputMode(GLFWwindow* window, int mode, int value); 98 const(char)* glfwGetKeyName(int key, int scancode); 99 int glfwGetKey(GLFWwindow* window, int key); 100 int glfwGetMouseButton(GLFWwindow* window, int button); 101 void glfwGetCursorPos(GLFWwindow* window, double* xpos, double* ypos); 102 void glfwSetCursorPos(GLFWwindow* window, double xpos, double ypos); 103 GLFWcursor* glfwCreateCursor(const(GLFWimage)* image, 104 int xhot, 105 int yhot); 106 GLFWcursor* glfwCreateStandardCursor(int shape); 107 void glfwDestroyCursor(GLFWcursor* cursor); 108 void glfwSetCursor(GLFWwindow* window, GLFWcursor* cursor); 109 GLFWkeyfun glfwSetKeyCallback(GLFWwindow* window, GLFWkeyfun cbfun); 110 GLFWcharfun glfwSetCharCallback(GLFWwindow* window, GLFWcharfun cbfun); 111 GLFWcharmodsfun glfwSetCharModsCallback(GLFWwindow* window, 112 GLFWcharmodsfun cbfun); 113 GLFWmousebuttonfun glfwSetMouseButtonCallback(GLFWwindow* window, 114 GLFWmousebuttonfun cbfun); 115 GLFWcursorposfun glfwSetCursorPosCallback(GLFWwindow* window, 116 GLFWcursorposfun cbfun); 117 GLFWcursorenterfun glfwSetCursorEnterCallback(GLFWwindow* window, 118 GLFWcursorenterfun cbfun); 119 GLFWscrollfun glfwSetScrollCallback(GLFWwindow* window, 120 GLFWscrollfun cbfun); 121 GLFWdropfun glfwSetDropCallback(GLFWwindow* window, GLFWdropfun cbfun); 122 int glfwJoystickPresent(int joy); 123 const(float)* glfwGetJoystickAxes(int joy, int* count); 124 const(ubyte)* glfwGetJoystickButtons(int joy, int* count); 125 const(char)* glfwGetJoystickName(int joy); 126 GLFWjoystickfun glfwSetJoystickCallback(GLFWjoystickfun cbfun); 127 void glfwSetClipboardString(GLFWwindow* window, const(char)* str); 128 const(char)* glfwGetClipboardString(GLFWwindow* window); 129 double glfwGetTime(); 130 void glfwSetTime(double time); 131 long glfwGetTimerValue(); 132 long glfwGetTimerFrequency(); 133 void glfwMakeContextCurrent(GLFWwindow* window); 134 GLFWwindow* glfwGetCurrentContext(); 135 void glfwSwapBuffers(GLFWwindow* window); 136 void glfwSwapInterval(int interval); 137 int glfwExtensionSupported(const(char)* extension); 138 GLFWglproc glfwGetProcAddress(const(char)* procname); 139 int glfwVulkanSupported(); 140 const(char*)* glfwGetRequiredInstanceExtensions(uint* count); 141 version(GLFW3D_VULKAN) { 142 GLFWvkproc glfwGetInstanceProcAddress(VkInstance instance, 143 const(char)* procname); 144 int glfwGetPhysicalDevicePresentationSupport(VkInstance instance, 145 VkPhysicalDevice device, 146 uint queuefamily); 147 VkResult glfwCreateWindowSurface(VkInstance instance, 148 GLFWwindow* window, 149 const(VkAllocationCallbacks)* allocator, 150 VkSurfaceKHR* surface); 151 } 152 } 153