Skip to content

Commit

Permalink
Removed duplicate documentation.
Browse files Browse the repository at this point in the history
The public, platform, native, event and utility functions are already
documented in-source.  Having duplicate documentation inevitably means
having them contradict one another.  Furthermore, most of the function
descriptions simply repeated the name of the function.
  • Loading branch information
elmindreda committed Jan 25, 2013
1 parent 75705ba commit 3e78570
Show file tree
Hide file tree
Showing 35 changed files with 15 additions and 1,028 deletions.
9 changes: 0 additions & 9 deletions src/clipboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@
////// GLFW public API //////
//////////////////////////////////////////////////////////////////////////

//========================================================================
// Set the clipboard contents
//========================================================================

GLFWAPI void glfwSetClipboardString(GLFWwindow* handle, const char* string)
{
_GLFWwindow* window = (_GLFWwindow*) handle;
Expand All @@ -54,11 +50,6 @@ GLFWAPI void glfwSetClipboardString(GLFWwindow* handle, const char* string)
_glfwPlatformSetClipboardString(window, string);
}


//========================================================================
// Return the current clipboard contents
//========================================================================

GLFWAPI const char* glfwGetClipboardString(GLFWwindow* handle)
{
_GLFWwindow* window = (_GLFWwindow*) handle;
Expand Down
9 changes: 0 additions & 9 deletions src/cocoa_clipboard.m
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@
////// GLFW platform API //////
//////////////////////////////////////////////////////////////////////////

//========================================================================
// Set the clipboard contents
//========================================================================

void _glfwPlatformSetClipboardString(_GLFWwindow* window, const char* string)
{
NSArray* types = [NSArray arrayWithObjects:NSStringPboardType, nil];
Expand All @@ -51,11 +47,6 @@ void _glfwPlatformSetClipboardString(_GLFWwindow* window, const char* string)
forType:NSStringPboardType];
}


//========================================================================
// Return the current clipboard contents
//========================================================================

const char* _glfwPlatformGetClipboardString(_GLFWwindow* window)
{
NSPasteboard* pasteboard = [NSPasteboard generalPasteboard];
Expand Down
15 changes: 3 additions & 12 deletions src/cocoa_gamma.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,9 @@
#include <ApplicationServices/ApplicationServices.h>


//************************************************************************
//**** GLFW internal functions ****
//************************************************************************

//========================================================================
// Save the original gamma ramp so that it can be restored later
//========================================================================
//////////////////////////////////////////////////////////////////////////
////// GLFW platform API //////
//////////////////////////////////////////////////////////////////////////

void _glfwPlatformGetGammaRamp(GLFWgammaramp* ramp)
{
Expand All @@ -66,11 +62,6 @@ void _glfwPlatformGetGammaRamp(GLFWgammaramp* ramp)
}
}


//========================================================================
// Make the specified gamma ramp current
//========================================================================

void _glfwPlatformSetGammaRamp(const GLFWgammaramp* ramp)
{
int i;
Expand Down
14 changes: 0 additions & 14 deletions src/cocoa_init.m
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,6 @@ static void changeToResourcesDirectory(void)
////// GLFW platform API //////
//////////////////////////////////////////////////////////////////////////

//========================================================================
// Initialize the GLFW library
//========================================================================

int _glfwPlatformInit(void)
{
_glfw.ns.autoreleasePool = [[NSAutoreleasePool alloc] init];
Expand Down Expand Up @@ -119,11 +115,6 @@ int _glfwPlatformInit(void)
return GL_TRUE;
}


//========================================================================
// Close window, if open, and shut down GLFW
//========================================================================

void _glfwPlatformTerminate(void)
{
// TODO: Probably other cleanup
Expand All @@ -150,11 +141,6 @@ void _glfwPlatformTerminate(void)
_glfwTerminateContextAPI();
}


//========================================================================
// Get the GLFW version string
//========================================================================

const char* _glfwPlatformGetVersionString(void)
{
const char* version = _GLFW_VERSION_FULL
Expand Down
19 changes: 0 additions & 19 deletions src/cocoa_joystick.m
Original file line number Diff line number Diff line change
Expand Up @@ -492,10 +492,6 @@ void _glfwTerminateJoysticks(void)
////// GLFW platform API //////
//////////////////////////////////////////////////////////////////////////

//========================================================================
// Determine joystick capabilities
//========================================================================

int _glfwPlatformGetJoystickParam(int joy, int param)
{
if (!_glfwJoysticks[joy].present)
Expand Down Expand Up @@ -523,11 +519,6 @@ int _glfwPlatformGetJoystickParam(int joy, int param)
return GL_FALSE;
}


//========================================================================
// Get joystick axis positions
//========================================================================

int _glfwPlatformGetJoystickAxes(int joy, float* axes, int numaxes)
{
int i;
Expand Down Expand Up @@ -567,11 +558,6 @@ int _glfwPlatformGetJoystickAxes(int joy, float* axes, int numaxes)
return numaxes;
}


//========================================================================
// Get joystick button states
//========================================================================

int _glfwPlatformGetJoystickButtons(int joy, unsigned char* buttons,
int numbuttons)
{
Expand Down Expand Up @@ -625,11 +611,6 @@ int _glfwPlatformGetJoystickButtons(int joy, unsigned char* buttons,
return button;
}


//========================================================================
// Get joystick name
//========================================================================

const char* _glfwPlatformGetJoystickName(int joy)
{
return _glfwJoysticks[joy].name;
Expand Down
19 changes: 0 additions & 19 deletions src/cocoa_monitor.m
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,6 @@ void _glfwRestoreVideoMode(_GLFWmonitor* monitor)
////// GLFW platform API //////
//////////////////////////////////////////////////////////////////////////

//========================================================================
// Return a list of available monitors
//========================================================================

_GLFWmonitor** _glfwPlatformGetMonitors(int* count)
{
uint32_t i, found = 0, monitorCount;
Expand Down Expand Up @@ -265,20 +261,10 @@ void _glfwRestoreVideoMode(_GLFWmonitor* monitor)
return monitors;
}


//========================================================================
// Destroy a monitor struct
//========================================================================

void _glfwPlatformDestroyMonitor(_GLFWmonitor* monitor)
{
}


//========================================================================
// Get a list of available video modes
//========================================================================

GLFWvidmode* _glfwPlatformGetVideoModes(_GLFWmonitor* monitor, int* found)
{
CFArrayRef modes;
Expand Down Expand Up @@ -307,11 +293,6 @@ void _glfwPlatformDestroyMonitor(_GLFWmonitor* monitor)
return result;
}


//========================================================================
// Get the current video mode for the specified monitor
//========================================================================

void _glfwPlatformGetVideoMode(_GLFWmonitor* monitor, GLFWvidmode *mode)
{
CGDisplayModeRef displayMode;
Expand Down
9 changes: 0 additions & 9 deletions src/cocoa_time.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,21 +64,12 @@ void _glfwInitTimer(void)
////// GLFW platform API //////
//////////////////////////////////////////////////////////////////////////

//========================================================================
// Return timer value in seconds
//========================================================================

double _glfwPlatformGetTime(void)
{
return (double) (getRawTime() - _glfw.ns.timer.base) *
_glfw.ns.timer.resolution;
}


//========================================================================
// Set timer value in seconds
//========================================================================

void _glfwPlatformSetTime(double time)
{
_glfw.ns.timer.base = getRawTime() -
Expand Down
64 changes: 0 additions & 64 deletions src/cocoa_window.m
Original file line number Diff line number Diff line change
Expand Up @@ -721,11 +721,6 @@ static GLboolean createWindow(_GLFWwindow* window,
////// GLFW platform API //////
//////////////////////////////////////////////////////////////////////////

//========================================================================
// Here is where the window is created, and the OpenGL rendering context is
// created
//========================================================================

int _glfwPlatformCreateWindow(_GLFWwindow* window,
const _GLFWwndconfig* wndconfig,
const _GLFWfbconfig* fbconfig)
Expand Down Expand Up @@ -793,11 +788,6 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window,
return GL_TRUE;
}


//========================================================================
// Properly kill the window / video display
//========================================================================

void _glfwPlatformDestroyWindow(_GLFWwindow* window)
{
[window->ns.object orderOut:nil];
Expand All @@ -824,73 +814,38 @@ void _glfwPlatformDestroyWindow(_GLFWwindow* window)
// TODO: Probably more cleanup
}


//========================================================================
// Set the window title
//========================================================================

void _glfwPlatformSetWindowTitle(_GLFWwindow* window, const char *title)
{
[window->ns.object setTitle:[NSString stringWithUTF8String:title]];
}


//========================================================================
// Set the window size
//========================================================================

void _glfwPlatformSetWindowSize(_GLFWwindow* window, int width, int height)
{
[window->ns.object setContentSize:NSMakeSize(width, height)];
}


//========================================================================
// Iconify the window
//========================================================================

void _glfwPlatformIconifyWindow(_GLFWwindow* window)
{
[window->ns.object miniaturize:nil];
}


//========================================================================
// Restore (un-iconify) the window
//========================================================================

void _glfwPlatformRestoreWindow(_GLFWwindow* window)
{
[window->ns.object deminiaturize:nil];
}


//========================================================================
// Show window
//========================================================================

void _glfwPlatformShowWindow(_GLFWwindow* window)
{
[window->ns.object makeKeyAndOrderFront:nil];
_glfwInputWindowVisibility(window, GL_TRUE);
}


//========================================================================
// Hide window
//========================================================================

void _glfwPlatformHideWindow(_GLFWwindow* window)
{
[window->ns.object orderOut:nil];
_glfwInputWindowVisibility(window, GL_FALSE);
}


//========================================================================
// Poll for new window and input events
//========================================================================

void _glfwPlatformPollEvents(void)
{
for (;;)
Expand All @@ -909,11 +864,6 @@ void _glfwPlatformPollEvents(void)
_glfw.ns.autoreleasePool = [[NSAutoreleasePool alloc] init];
}


//========================================================================
// Wait for new window and input events
//========================================================================

void _glfwPlatformWaitEvents(void)
{
// I wanted to pass NO to dequeue:, and rely on PollEvents to
Expand All @@ -928,11 +878,6 @@ void _glfwPlatformWaitEvents(void)
_glfwPlatformPollEvents();
}


//========================================================================
// Set physical cursor position
//========================================================================

void _glfwPlatformSetCursorPos(_GLFWwindow* window, int x, int y)
{
if (window->monitor)
Expand All @@ -953,11 +898,6 @@ void _glfwPlatformSetCursorPos(_GLFWwindow* window, int x, int y)
}
}


//========================================================================
// Set physical mouse cursor mode
//========================================================================

void _glfwPlatformSetCursorMode(_GLFWwindow* window, int mode)
{
switch (mode)
Expand All @@ -980,10 +920,6 @@ void _glfwPlatformSetCursorMode(_GLFWwindow* window, int mode)
////// GLFW native API //////
//////////////////////////////////////////////////////////////////////////

//========================================================================
// Returns the Cocoa object of the specified window
//========================================================================

GLFWAPI id glfwGetCocoaWindow(GLFWwindow* handle)
{
_GLFWwindow* window = (_GLFWwindow*) handle;
Expand Down

0 comments on commit 3e78570

Please sign in to comment.