mirror of
https://github.com/glfw/glfw.git
synced 2026-09-19 15:25:50 +00:00
Removed duplicate documentation.
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.
This commit is contained in:
+1
-149
@@ -65,13 +65,9 @@ static void clearScrollOffsets(void)
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
////// GLFW internal API //////
|
||||
////// GLFW event API //////
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//========================================================================
|
||||
// Register window focus events
|
||||
//========================================================================
|
||||
|
||||
void _glfwInputWindowFocus(_GLFWwindow* window, GLboolean focused)
|
||||
{
|
||||
if (focused)
|
||||
@@ -112,11 +108,6 @@ void _glfwInputWindowFocus(_GLFWwindow* window, GLboolean focused)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Register window position events
|
||||
//========================================================================
|
||||
|
||||
void _glfwInputWindowPos(_GLFWwindow* window, int x, int y)
|
||||
{
|
||||
if (window->positionX == x && window->positionY == y)
|
||||
@@ -129,11 +120,6 @@ void _glfwInputWindowPos(_GLFWwindow* window, int x, int y)
|
||||
window->callbacks.pos((GLFWwindow*) window, x, y);
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Register window size events
|
||||
//========================================================================
|
||||
|
||||
void _glfwInputWindowSize(_GLFWwindow* window, int width, int height)
|
||||
{
|
||||
if (window->width == width && window->height == height)
|
||||
@@ -146,11 +132,6 @@ void _glfwInputWindowSize(_GLFWwindow* window, int width, int height)
|
||||
window->callbacks.size((GLFWwindow*) window, width, height);
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Register window size events
|
||||
//========================================================================
|
||||
|
||||
void _glfwInputWindowIconify(_GLFWwindow* window, int iconified)
|
||||
{
|
||||
if (window->iconified == iconified)
|
||||
@@ -162,32 +143,17 @@ void _glfwInputWindowIconify(_GLFWwindow* window, int iconified)
|
||||
window->callbacks.iconify((GLFWwindow*) window, iconified);
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Register window visibility events
|
||||
//========================================================================
|
||||
|
||||
void _glfwInputWindowVisibility(_GLFWwindow* window, int visible)
|
||||
{
|
||||
window->visible = visible;
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Register window damage events
|
||||
//========================================================================
|
||||
|
||||
void _glfwInputWindowDamage(_GLFWwindow* window)
|
||||
{
|
||||
if (window->callbacks.refresh)
|
||||
window->callbacks.refresh((GLFWwindow*) window);
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Register window close request events
|
||||
//========================================================================
|
||||
|
||||
void _glfwInputWindowCloseRequest(_GLFWwindow* window)
|
||||
{
|
||||
if (window->callbacks.close)
|
||||
@@ -201,10 +167,6 @@ void _glfwInputWindowCloseRequest(_GLFWwindow* window)
|
||||
////// GLFW public API //////
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//========================================================================
|
||||
// Create the GLFW window and its associated context
|
||||
//========================================================================
|
||||
|
||||
GLFWAPI GLFWwindow* glfwCreateWindow(int width, int height,
|
||||
const char* title,
|
||||
GLFWmonitor* monitor,
|
||||
@@ -339,11 +301,6 @@ GLFWAPI GLFWwindow* glfwCreateWindow(int width, int height,
|
||||
return (GLFWwindow*) window;
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Reset all window hints to their default values
|
||||
//========================================================================
|
||||
|
||||
void glfwDefaultWindowHints(void)
|
||||
{
|
||||
if (!_glfwInitialized)
|
||||
@@ -375,11 +332,6 @@ void glfwDefaultWindowHints(void)
|
||||
_glfw.hints.stencilBits = 8;
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Set hints for creating the window
|
||||
//========================================================================
|
||||
|
||||
GLFWAPI void glfwWindowHint(int target, int hint)
|
||||
{
|
||||
if (!_glfwInitialized)
|
||||
@@ -471,11 +423,6 @@ GLFWAPI void glfwWindowHint(int target, int hint)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Properly kill the window / video display
|
||||
//========================================================================
|
||||
|
||||
GLFWAPI void glfwDestroyWindow(GLFWwindow* handle)
|
||||
{
|
||||
_GLFWwindow* window = (_GLFWwindow*) handle;
|
||||
@@ -517,11 +464,6 @@ GLFWAPI void glfwDestroyWindow(GLFWwindow* handle)
|
||||
free(window);
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Set the window title
|
||||
//========================================================================
|
||||
|
||||
GLFWAPI void glfwSetWindowTitle(GLFWwindow* handle, const char* title)
|
||||
{
|
||||
_GLFWwindow* window = (_GLFWwindow*) handle;
|
||||
@@ -535,11 +477,6 @@ GLFWAPI void glfwSetWindowTitle(GLFWwindow* handle, const char* title)
|
||||
_glfwPlatformSetWindowTitle(window, title);
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Get the window size
|
||||
//========================================================================
|
||||
|
||||
GLFWAPI void glfwGetWindowSize(GLFWwindow* handle, int* width, int* height)
|
||||
{
|
||||
_GLFWwindow* window = (_GLFWwindow*) handle;
|
||||
@@ -557,11 +494,6 @@ GLFWAPI void glfwGetWindowSize(GLFWwindow* handle, int* width, int* height)
|
||||
*height = window->height;
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Set the window size
|
||||
//========================================================================
|
||||
|
||||
GLFWAPI void glfwSetWindowSize(GLFWwindow* handle, int width, int height)
|
||||
{
|
||||
_GLFWwindow* window = (_GLFWwindow*) handle;
|
||||
@@ -585,11 +517,6 @@ GLFWAPI void glfwSetWindowSize(GLFWwindow* handle, int width, int height)
|
||||
_glfwPlatformSetWindowSize(window, width, height);
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Window iconification
|
||||
//========================================================================
|
||||
|
||||
GLFWAPI void glfwIconifyWindow(GLFWwindow* handle)
|
||||
{
|
||||
_GLFWwindow* window = (_GLFWwindow*) handle;
|
||||
@@ -606,11 +533,6 @@ GLFWAPI void glfwIconifyWindow(GLFWwindow* handle)
|
||||
_glfwPlatformIconifyWindow(window);
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Window un-iconification
|
||||
//========================================================================
|
||||
|
||||
GLFWAPI void glfwRestoreWindow(GLFWwindow* handle)
|
||||
{
|
||||
_GLFWwindow* window = (_GLFWwindow*) handle;
|
||||
@@ -627,11 +549,6 @@ GLFWAPI void glfwRestoreWindow(GLFWwindow* handle)
|
||||
_glfwPlatformRestoreWindow(window);
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Window show
|
||||
//========================================================================
|
||||
|
||||
GLFWAPI void glfwShowWindow(GLFWwindow* handle)
|
||||
{
|
||||
_GLFWwindow* window = (_GLFWwindow*) handle;
|
||||
@@ -648,11 +565,6 @@ GLFWAPI void glfwShowWindow(GLFWwindow* handle)
|
||||
_glfwPlatformShowWindow(window);
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Window hide
|
||||
//========================================================================
|
||||
|
||||
GLFWAPI void glfwHideWindow(GLFWwindow* handle)
|
||||
{
|
||||
_GLFWwindow* window = (_GLFWwindow*) handle;
|
||||
@@ -669,11 +581,6 @@ GLFWAPI void glfwHideWindow(GLFWwindow* handle)
|
||||
_glfwPlatformHideWindow(window);
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Get window parameter
|
||||
//========================================================================
|
||||
|
||||
GLFWAPI int glfwGetWindowParam(GLFWwindow* handle, int param)
|
||||
{
|
||||
_GLFWwindow* window = (_GLFWwindow*) handle;
|
||||
@@ -722,11 +629,6 @@ GLFWAPI int glfwGetWindowParam(GLFWwindow* handle, int param)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Get window monitor
|
||||
//========================================================================
|
||||
|
||||
GLFWAPI GLFWmonitor* glfwGetWindowMonitor(GLFWwindow* handle)
|
||||
{
|
||||
_GLFWwindow* window = (_GLFWwindow*) handle;
|
||||
@@ -740,11 +642,6 @@ GLFWAPI GLFWmonitor* glfwGetWindowMonitor(GLFWwindow* handle)
|
||||
return (GLFWmonitor*) window->monitor;
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Set the user pointer for the specified window
|
||||
//========================================================================
|
||||
|
||||
GLFWAPI void glfwSetWindowUserPointer(GLFWwindow* handle, void* pointer)
|
||||
{
|
||||
_GLFWwindow* window = (_GLFWwindow*) handle;
|
||||
@@ -758,11 +655,6 @@ GLFWAPI void glfwSetWindowUserPointer(GLFWwindow* handle, void* pointer)
|
||||
window->userPointer = pointer;
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Get the user pointer for the specified window
|
||||
//========================================================================
|
||||
|
||||
GLFWAPI void* glfwGetWindowUserPointer(GLFWwindow* handle)
|
||||
{
|
||||
_GLFWwindow* window = (_GLFWwindow*) handle;
|
||||
@@ -776,11 +668,6 @@ GLFWAPI void* glfwGetWindowUserPointer(GLFWwindow* handle)
|
||||
return window->userPointer;
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Set callback function for window position changes
|
||||
//========================================================================
|
||||
|
||||
GLFWAPI void glfwSetWindowPosCallback(GLFWwindow* handle, GLFWwindowposfun cbfun)
|
||||
{
|
||||
_GLFWwindow* window = (_GLFWwindow*) handle;
|
||||
@@ -794,11 +681,6 @@ GLFWAPI void glfwSetWindowPosCallback(GLFWwindow* handle, GLFWwindowposfun cbfun
|
||||
window->callbacks.pos = cbfun;
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Set callback function for window size changes
|
||||
//========================================================================
|
||||
|
||||
GLFWAPI void glfwSetWindowSizeCallback(GLFWwindow* handle, GLFWwindowsizefun cbfun)
|
||||
{
|
||||
_GLFWwindow* window = (_GLFWwindow*) handle;
|
||||
@@ -812,11 +694,6 @@ GLFWAPI void glfwSetWindowSizeCallback(GLFWwindow* handle, GLFWwindowsizefun cbf
|
||||
window->callbacks.size = cbfun;
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Set callback function for window close events
|
||||
//========================================================================
|
||||
|
||||
GLFWAPI void glfwSetWindowCloseCallback(GLFWwindow* handle, GLFWwindowclosefun cbfun)
|
||||
{
|
||||
_GLFWwindow* window = (_GLFWwindow*) handle;
|
||||
@@ -830,11 +707,6 @@ GLFWAPI void glfwSetWindowCloseCallback(GLFWwindow* handle, GLFWwindowclosefun c
|
||||
window->callbacks.close = cbfun;
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Set callback function for window refresh events
|
||||
//========================================================================
|
||||
|
||||
GLFWAPI void glfwSetWindowRefreshCallback(GLFWwindow* handle, GLFWwindowrefreshfun cbfun)
|
||||
{
|
||||
_GLFWwindow* window = (_GLFWwindow*) handle;
|
||||
@@ -848,11 +720,6 @@ GLFWAPI void glfwSetWindowRefreshCallback(GLFWwindow* handle, GLFWwindowrefreshf
|
||||
window->callbacks.refresh = cbfun;
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Set callback function for window focus events
|
||||
//========================================================================
|
||||
|
||||
GLFWAPI void glfwSetWindowFocusCallback(GLFWwindow* handle, GLFWwindowfocusfun cbfun)
|
||||
{
|
||||
_GLFWwindow* window = (_GLFWwindow*) handle;
|
||||
@@ -866,11 +733,6 @@ GLFWAPI void glfwSetWindowFocusCallback(GLFWwindow* handle, GLFWwindowfocusfun c
|
||||
window->callbacks.focus = cbfun;
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Set callback function for window iconification events
|
||||
//========================================================================
|
||||
|
||||
GLFWAPI void glfwSetWindowIconifyCallback(GLFWwindow* handle, GLFWwindowiconifyfun cbfun)
|
||||
{
|
||||
_GLFWwindow* window = (_GLFWwindow*) handle;
|
||||
@@ -884,11 +746,6 @@ GLFWAPI void glfwSetWindowIconifyCallback(GLFWwindow* handle, GLFWwindowiconifyf
|
||||
window->callbacks.iconify = cbfun;
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Poll for new window and input events
|
||||
//========================================================================
|
||||
|
||||
GLFWAPI void glfwPollEvents(void)
|
||||
{
|
||||
if (!_glfwInitialized)
|
||||
@@ -902,11 +759,6 @@ GLFWAPI void glfwPollEvents(void)
|
||||
_glfwPlatformPollEvents();
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Wait for new window and input events
|
||||
//========================================================================
|
||||
|
||||
GLFWAPI void glfwWaitEvents(void)
|
||||
{
|
||||
if (!_glfwInitialized)
|
||||
|
||||
Reference in New Issue
Block a user