diff --git a/src/cocoa_fullscreen.m b/src/cocoa_fullscreen.m index d3a715ba..147913fb 100644 --- a/src/cocoa_fullscreen.m +++ b/src/cocoa_fullscreen.m @@ -64,6 +64,7 @@ static GLboolean modeIsGood(CGDisplayModeRef mode) return GL_TRUE; } + //======================================================================== // Convert Core Graphics display mode to GLFW video mode //======================================================================== @@ -217,6 +218,7 @@ int _glfwPlatformGetVideoModes(GLFWvidmode* list, int maxcount) return stored; } + //======================================================================== // Get the desktop video mode //======================================================================== diff --git a/src/cocoa_init.m b/src/cocoa_init.m index 89260c56..d9530f62 100644 --- a/src/cocoa_init.m +++ b/src/cocoa_init.m @@ -33,6 +33,7 @@ //======================================================================== // Change to our application bundle's resources directory, if present //======================================================================== + static void changeToResourcesDirectory(void) { char resourcesPath[MAXPATHLEN]; @@ -105,6 +106,7 @@ int _glfwPlatformInit(void) return GL_TRUE; } + //======================================================================== // Close window, if open, and shut down GLFW //======================================================================== diff --git a/src/cocoa_joystick.m b/src/cocoa_joystick.m index a167692f..45b3be0f 100644 --- a/src/cocoa_joystick.m +++ b/src/cocoa_joystick.m @@ -579,4 +579,3 @@ int _glfwPlatformGetJoystickButtons(int joy, unsigned char* buttons, return numbuttons; } - diff --git a/src/cocoa_opengl.m b/src/cocoa_opengl.m index bd3827fc..0ea39076 100644 --- a/src/cocoa_opengl.m +++ b/src/cocoa_opengl.m @@ -59,6 +59,7 @@ void _glfwPlatformSwapBuffers(void) [window->NSGL.context flushBuffer]; } + //======================================================================== // Set double buffering swap interval //======================================================================== @@ -71,6 +72,7 @@ void _glfwPlatformSwapInterval(int interval) [window->NSGL.context setValues:&sync forParameter:NSOpenGLCPSwapInterval]; } + //======================================================================== // Check if an OpenGL extension is available at runtime //======================================================================== @@ -81,6 +83,7 @@ int _glfwPlatformExtensionSupported(const char* extension) return GL_FALSE; } + //======================================================================== // Get the function pointer to an OpenGL function //======================================================================== @@ -99,6 +102,7 @@ void* _glfwPlatformGetProcAddress(const char* procname) return symbol; } + //======================================================================== // Copies the specified OpenGL state categories from src to dst //======================================================================== diff --git a/src/cocoa_time.c b/src/cocoa_time.c index 4facbffb..745b4239 100644 --- a/src/cocoa_time.c +++ b/src/cocoa_time.c @@ -74,6 +74,7 @@ double _glfwPlatformGetTime(void) _glfwLibrary.NS.timer.resolution; } + //======================================================================== // Set timer value in seconds //======================================================================== diff --git a/src/cocoa_window.m b/src/cocoa_window.m index c1d710c0..d2bcbb3d 100644 --- a/src/cocoa_window.m +++ b/src/cocoa_window.m @@ -112,6 +112,7 @@ @end + //======================================================================== // Delegate for application related notifications //======================================================================== @@ -133,6 +134,7 @@ @end + //======================================================================== // Keyboard symbol translation table //======================================================================== @@ -270,6 +272,7 @@ static const unsigned int MAC_TO_GLFW_KEYCODE_MAPPING[128] = /* 7f */ -1, }; + //======================================================================== // Converts a Mac OS X keycode to a GLFW keycode //======================================================================== @@ -285,6 +288,7 @@ static int convertMacKeyCode(unsigned int macKeyCode) return MAC_TO_GLFW_KEYCODE_MAPPING[macKeyCode]; } + //======================================================================== // Content view class for the GLFW window //======================================================================== @@ -446,6 +450,7 @@ static int convertMacKeyCode(unsigned int macKeyCode) @end + //======================================================================== // GLFW application class //======================================================================== @@ -516,6 +521,7 @@ static NSString* findAppName(void) return @"GLFW Application"; } + //======================================================================== // Set up the menu bar (manually) // This is nasty, nasty stuff -- calls to undocumented semi-private APIs that @@ -523,6 +529,7 @@ static NSString* findAppName(void) // localize(d|able), etc. Loading a nib would save us this horror, but that // doesn't seem like a good thing to require of GLFW's clients. //======================================================================== + static void createMenuBar(void) { NSString* appName = findAppName(); @@ -586,6 +593,7 @@ static void createMenuBar(void) //======================================================================== // Initialize the Cocoa Application Kit //======================================================================== + static GLboolean initializeAppKit(void) { if (NSApp) @@ -604,6 +612,7 @@ static GLboolean initializeAppKit(void) return GL_TRUE; } + //======================================================================== // Create the Cocoa window //======================================================================== @@ -647,6 +656,7 @@ static GLboolean createWindow(_GLFWwindow* window, return GL_TRUE; } + //======================================================================== // Create the OpenGL context //======================================================================== @@ -919,6 +929,7 @@ void _glfwPlatformCloseWindow(_GLFWwindow* window) // TODO: Probably more cleanup } + //======================================================================== // Set the window title //======================================================================== @@ -928,6 +939,7 @@ void _glfwPlatformSetWindowTitle(_GLFWwindow* window, const char *title) [window->NS.window setTitle:[NSString stringWithUTF8String:title]]; } + //======================================================================== // Set the window size //======================================================================== @@ -937,6 +949,7 @@ void _glfwPlatformSetWindowSize(_GLFWwindow* window, int width, int height) [window->NS.window setContentSize:NSMakeSize(width, height)]; } + //======================================================================== // Set the window position //======================================================================== @@ -957,6 +970,7 @@ void _glfwPlatformSetWindowPos(_GLFWwindow* window, int x, int y) display:YES]; } + //======================================================================== // Iconify the window //======================================================================== @@ -966,6 +980,7 @@ void _glfwPlatformIconifyWindow(_GLFWwindow* window) [window->NS.window miniaturize:nil]; } + //======================================================================== // Restore (un-iconify) the window //======================================================================== @@ -975,6 +990,7 @@ void _glfwPlatformRestoreWindow(_GLFWwindow* window) [window->NS.window deminiaturize:nil]; } + //======================================================================== // Write back window parameters into GLFW window structure //======================================================================== @@ -1049,6 +1065,7 @@ void _glfwPlatformRefreshWindowParams(void) window->glDebug = GL_FALSE; } + //======================================================================== // Poll for new window and input events //======================================================================== @@ -1073,6 +1090,7 @@ void _glfwPlatformPollEvents(void) _glfwLibrary.NS.autoreleasePool = [[NSAutoreleasePool alloc] init]; } + //======================================================================== // Wait for new window and input events //======================================================================== @@ -1091,6 +1109,7 @@ void _glfwPlatformWaitEvents( void ) _glfwPlatformPollEvents(); } + //======================================================================== // Set physical mouse cursor position //======================================================================== @@ -1123,6 +1142,7 @@ void _glfwPlatformSetMouseCursorPos(_GLFWwindow* window, int x, int y) CGDisplayMoveCursorToPoint(CGMainDisplayID(), targetPoint); } + //======================================================================== // Set physical mouse cursor mode //========================================================================