From 73622a2f3c8178c9b1d0401963ab041871d2015c Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Fri, 6 Jul 2012 14:36:29 +0200 Subject: [PATCH] Formatting. --- src/monitor.c | 4 ++++ src/win32_monitor.c | 14 ++++++++++++++ src/x11_monitor.c | 14 ++++++++++++++ src/x11_platform.h | 2 +- 4 files changed, 33 insertions(+), 1 deletion(-) diff --git a/src/monitor.c b/src/monitor.c index 021afd19..d30b7c37 100644 --- a/src/monitor.c +++ b/src/monitor.c @@ -132,6 +132,7 @@ GLFWAPI const char* glfwGetMonitorString(GLFWmonitor handle, int param) return NULL; } + //======================================================================== // Set a callback function for monitor events //======================================================================== @@ -147,6 +148,7 @@ GLFWAPI void glfwSetMonitorDeviceCallback(GLFWmonitordevicefun cbfun) _glfwLibrary.monitorCallback= cbfun; } + //======================================================================== // Initialize the monitor list. //======================================================================== @@ -156,6 +158,7 @@ void _glfwInitMonitors(void) _glfwLibrary.monitorListHead = _glfwCreateMonitors(); } + //======================================================================== // Refresh monitor list and notify callback. //======================================================================== @@ -240,6 +243,7 @@ void _glfwRefreshMonitors(void) _glfwLibrary.monitorListHead = newMonitorList; } + //======================================================================== // Delete the monitor list. //======================================================================== diff --git a/src/win32_monitor.c b/src/win32_monitor.c index c0cc503e..2aba1ff1 100644 --- a/src/win32_monitor.c +++ b/src/win32_monitor.c @@ -48,6 +48,10 @@ ////// GLFW platform API ////// ////////////////////////////////////////////////////////////////////////// +//======================================================================== +// Create a monitor struct from the specified information +//======================================================================== + _GLFWmonitor** _glfwCreateMonitor(_GLFWmonitor** current, DISPLAY_DEVICE* adapter, DISPLAY_DEVICE* monitor, @@ -75,6 +79,11 @@ _GLFWmonitor** _glfwCreateMonitor(_GLFWmonitor** current, return &((*current)->next); } + +//======================================================================== +// Destroy a monitor struct +//======================================================================== + _GLFWmonitor* _glfwDestroyMonitor(_GLFWmonitor* monitor) { _GLFWmonitor* result; @@ -88,6 +97,11 @@ _GLFWmonitor* _glfwDestroyMonitor(_GLFWmonitor* monitor) return result; } + +//======================================================================== +// Return a list of available monitors +//======================================================================== + _GLFWmonitor* _glfwCreateMonitors(void) { DISPLAY_DEVICE adapter; diff --git a/src/x11_monitor.c b/src/x11_monitor.c index d22c1c59..de8cda02 100644 --- a/src/x11_monitor.c +++ b/src/x11_monitor.c @@ -38,6 +38,10 @@ ////// GLFW platform API ////// ////////////////////////////////////////////////////////////////////////// +//======================================================================== +// Create a monitor struct from the specified information +//======================================================================== + #if defined (_GLFW_HAS_XRANDR) _GLFWmonitor** _glfwCreateMonitor(_GLFWmonitor** current, XRROutputInfo* outputInfo, @@ -61,6 +65,11 @@ _GLFWmonitor** _glfwCreateMonitor(_GLFWmonitor** current, } #endif /*_GLFW_HAS_XRANDR*/ + +//======================================================================== +// Destroy a monitor struct +//======================================================================== + _GLFWmonitor* _glfwDestroyMonitor(_GLFWmonitor* monitor) { _GLFWmonitor* result; @@ -77,6 +86,11 @@ _GLFWmonitor* _glfwDestroyMonitor(_GLFWmonitor* monitor) return result; } + +//======================================================================== +// Return a list of available monitors +//======================================================================== + _GLFWmonitor* _glfwCreateMonitors(void) { _GLFWmonitor* monitorList; diff --git a/src/x11_platform.h b/src/x11_platform.h index 69192993..e8a4125b 100644 --- a/src/x11_platform.h +++ b/src/x11_platform.h @@ -284,7 +284,7 @@ GLFWGLOBAL struct { typedef struct _GLFWmonitorX11 { #if defined(_GLFW_HAS_XRANDR) - XRROutputInfo* output; + XRROutputInfo* output; #else int dummy; #endif /*_GLFW_HAS_XRANDR*/