mirror of
https://github.com/glfw/glfw.git
synced 2024-11-29 23:54:37 +00:00
Formatting.
This commit is contained in:
parent
80076e7b67
commit
2b1192a3dd
@ -38,6 +38,10 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
////// GLFW internal API //////
|
||||||
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
void _glfwAllocGammaRamp(GLFWgammaramp* ramp, unsigned int size)
|
void _glfwAllocGammaRamp(GLFWgammaramp* ramp, unsigned int size)
|
||||||
{
|
{
|
||||||
ramp->red = (unsigned short*) malloc(size * sizeof(unsigned short));
|
ramp->red = (unsigned short*) malloc(size * sizeof(unsigned short));
|
||||||
|
@ -56,6 +56,11 @@ static uint64_t getRawTime(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
////// GLFW internal API //////
|
||||||
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
// Initialise timer
|
// Initialise timer
|
||||||
//
|
//
|
||||||
void _glfwInitTimer(void)
|
void _glfwInitTimer(void)
|
||||||
|
@ -60,7 +60,7 @@ typedef struct
|
|||||||
|
|
||||||
// Translates an X event modifier state mask
|
// Translates an X event modifier state mask
|
||||||
//
|
//
|
||||||
int translateState(int state)
|
static int translateState(int state)
|
||||||
{
|
{
|
||||||
int mods = 0;
|
int mods = 0;
|
||||||
|
|
||||||
@ -491,23 +491,6 @@ static void leaveFullscreenMode(_GLFWwindow* window)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return the GLFW window corresponding to the specified X11 window
|
|
||||||
//
|
|
||||||
_GLFWwindow* _glfwFindWindowByHandle(Window handle)
|
|
||||||
{
|
|
||||||
_GLFWwindow* window;
|
|
||||||
|
|
||||||
if (XFindContext(_glfw.x11.display,
|
|
||||||
handle,
|
|
||||||
_glfw.x11.context,
|
|
||||||
(XPointer*) &window) != 0)
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
return window;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Process the specified X event
|
// Process the specified X event
|
||||||
//
|
//
|
||||||
static void processEvent(XEvent *event)
|
static void processEvent(XEvent *event)
|
||||||
@ -838,6 +821,23 @@ static void processEvent(XEvent *event)
|
|||||||
////// GLFW internal API //////
|
////// GLFW internal API //////
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// Return the GLFW window corresponding to the specified X11 window
|
||||||
|
//
|
||||||
|
_GLFWwindow* _glfwFindWindowByHandle(Window handle)
|
||||||
|
{
|
||||||
|
_GLFWwindow* window;
|
||||||
|
|
||||||
|
if (XFindContext(_glfw.x11.display,
|
||||||
|
handle,
|
||||||
|
_glfw.x11.context,
|
||||||
|
(XPointer*) &window) != 0)
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return window;
|
||||||
|
}
|
||||||
|
|
||||||
// Retrieve a single window property of the specified type
|
// Retrieve a single window property of the specified type
|
||||||
// Inspired by fghGetWindowProperty from freeglut
|
// Inspired by fghGetWindowProperty from freeglut
|
||||||
//
|
//
|
||||||
|
Loading…
Reference in New Issue
Block a user