1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-10-08 15:17:25 -04:00

Formatting.

This commit is contained in:
Camilla Berglund 2012-07-06 14:36:29 +02:00
parent 247ee76b5c
commit 73622a2f3c
4 changed files with 33 additions and 1 deletions

View File

@ -132,6 +132,7 @@ GLFWAPI const char* glfwGetMonitorString(GLFWmonitor handle, int param)
return NULL; return NULL;
} }
//======================================================================== //========================================================================
// Set a callback function for monitor events // Set a callback function for monitor events
//======================================================================== //========================================================================
@ -147,6 +148,7 @@ GLFWAPI void glfwSetMonitorDeviceCallback(GLFWmonitordevicefun cbfun)
_glfwLibrary.monitorCallback= cbfun; _glfwLibrary.monitorCallback= cbfun;
} }
//======================================================================== //========================================================================
// Initialize the monitor list. // Initialize the monitor list.
//======================================================================== //========================================================================
@ -156,6 +158,7 @@ void _glfwInitMonitors(void)
_glfwLibrary.monitorListHead = _glfwCreateMonitors(); _glfwLibrary.monitorListHead = _glfwCreateMonitors();
} }
//======================================================================== //========================================================================
// Refresh monitor list and notify callback. // Refresh monitor list and notify callback.
//======================================================================== //========================================================================
@ -240,6 +243,7 @@ void _glfwRefreshMonitors(void)
_glfwLibrary.monitorListHead = newMonitorList; _glfwLibrary.monitorListHead = newMonitorList;
} }
//======================================================================== //========================================================================
// Delete the monitor list. // Delete the monitor list.
//======================================================================== //========================================================================

View File

@ -48,6 +48,10 @@
////// GLFW platform API ////// ////// GLFW platform API //////
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
//========================================================================
// Create a monitor struct from the specified information
//========================================================================
_GLFWmonitor** _glfwCreateMonitor(_GLFWmonitor** current, _GLFWmonitor** _glfwCreateMonitor(_GLFWmonitor** current,
DISPLAY_DEVICE* adapter, DISPLAY_DEVICE* adapter,
DISPLAY_DEVICE* monitor, DISPLAY_DEVICE* monitor,
@ -75,6 +79,11 @@ _GLFWmonitor** _glfwCreateMonitor(_GLFWmonitor** current,
return &((*current)->next); return &((*current)->next);
} }
//========================================================================
// Destroy a monitor struct
//========================================================================
_GLFWmonitor* _glfwDestroyMonitor(_GLFWmonitor* monitor) _GLFWmonitor* _glfwDestroyMonitor(_GLFWmonitor* monitor)
{ {
_GLFWmonitor* result; _GLFWmonitor* result;
@ -88,6 +97,11 @@ _GLFWmonitor* _glfwDestroyMonitor(_GLFWmonitor* monitor)
return result; return result;
} }
//========================================================================
// Return a list of available monitors
//========================================================================
_GLFWmonitor* _glfwCreateMonitors(void) _GLFWmonitor* _glfwCreateMonitors(void)
{ {
DISPLAY_DEVICE adapter; DISPLAY_DEVICE adapter;

View File

@ -38,6 +38,10 @@
////// GLFW platform API ////// ////// GLFW platform API //////
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
//========================================================================
// Create a monitor struct from the specified information
//========================================================================
#if defined (_GLFW_HAS_XRANDR) #if defined (_GLFW_HAS_XRANDR)
_GLFWmonitor** _glfwCreateMonitor(_GLFWmonitor** current, _GLFWmonitor** _glfwCreateMonitor(_GLFWmonitor** current,
XRROutputInfo* outputInfo, XRROutputInfo* outputInfo,
@ -61,6 +65,11 @@ _GLFWmonitor** _glfwCreateMonitor(_GLFWmonitor** current,
} }
#endif /*_GLFW_HAS_XRANDR*/ #endif /*_GLFW_HAS_XRANDR*/
//========================================================================
// Destroy a monitor struct
//========================================================================
_GLFWmonitor* _glfwDestroyMonitor(_GLFWmonitor* monitor) _GLFWmonitor* _glfwDestroyMonitor(_GLFWmonitor* monitor)
{ {
_GLFWmonitor* result; _GLFWmonitor* result;
@ -77,6 +86,11 @@ _GLFWmonitor* _glfwDestroyMonitor(_GLFWmonitor* monitor)
return result; return result;
} }
//========================================================================
// Return a list of available monitors
//========================================================================
_GLFWmonitor* _glfwCreateMonitors(void) _GLFWmonitor* _glfwCreateMonitors(void)
{ {
_GLFWmonitor* monitorList; _GLFWmonitor* monitorList;

View File

@ -284,7 +284,7 @@ GLFWGLOBAL struct {
typedef struct _GLFWmonitorX11 typedef struct _GLFWmonitorX11
{ {
#if defined(_GLFW_HAS_XRANDR) #if defined(_GLFW_HAS_XRANDR)
XRROutputInfo* output; XRROutputInfo* output;
#else #else
int dummy; int dummy;
#endif /*_GLFW_HAS_XRANDR*/ #endif /*_GLFW_HAS_XRANDR*/