Added confusion for code completion systems like VC++.

This commit is contained in:
Camilla Berglund
2011-02-09 12:37:42 +01:00
parent f02dbd30be
commit a66a4cd1e4
3 changed files with 46 additions and 16 deletions
+30 -10
View File
@@ -775,7 +775,7 @@ GLFWAPI void glfwOpenWindowHint(int target, int hint)
// Properly kill the window / video display
//========================================================================
GLFWAPI void glfwCloseWindow(GLFWwindow window)
GLFWAPI void glfwCloseWindow(GLFWwindow handle)
{
if (!_glfwInitialized)
{
@@ -783,6 +783,8 @@ GLFWAPI void glfwCloseWindow(GLFWwindow window)
return;
}
_GLFWwindow* window = (_GLFWwindow*) handle;
// Show mouse pointer again (if hidden)
if (window == _glfwLibrary.cursorLockWindow)
glfwEnable(window, GLFW_MOUSE_CURSOR);
@@ -831,7 +833,7 @@ GLFWAPI void glfwSetWindowTitle(GLFWwindow window, const char* title)
// Get the window size
//========================================================================
GLFWAPI void glfwGetWindowSize(GLFWwindow window, int* width, int* height)
GLFWAPI void glfwGetWindowSize(GLFWwindow handle, int* width, int* height)
{
if (!_glfwInitialized)
{
@@ -839,6 +841,8 @@ GLFWAPI void glfwGetWindowSize(GLFWwindow window, int* width, int* height)
return;
}
_GLFWwindow* window = (_GLFWwindow*) handle;
if (width != NULL)
*width = window->width;
@@ -851,7 +855,7 @@ GLFWAPI void glfwGetWindowSize(GLFWwindow window, int* width, int* height)
// Set the window size
//========================================================================
GLFWAPI void glfwSetWindowSize(GLFWwindow window, int width, int height)
GLFWAPI void glfwSetWindowSize(GLFWwindow handle, int width, int height)
{
if (!_glfwInitialized)
{
@@ -859,6 +863,8 @@ GLFWAPI void glfwSetWindowSize(GLFWwindow window, int width, int height)
return;
}
_GLFWwindow* window = (_GLFWwindow*) handle;
if (window->iconified)
{
// TODO: Figure out if this is an error
@@ -884,7 +890,7 @@ GLFWAPI void glfwSetWindowSize(GLFWwindow window, int width, int height)
// Get the window position
//========================================================================
GLFWAPI void glfwGetWindowPos(GLFWwindow window, int* x, int* y)
GLFWAPI void glfwGetWindowPos(GLFWwindow handle, int* x, int* y)
{
if (!_glfwInitialized)
{
@@ -892,6 +898,8 @@ GLFWAPI void glfwGetWindowPos(GLFWwindow window, int* x, int* y)
return;
}
_GLFWwindow* window = (_GLFWwindow*) handle;
if (x != NULL)
*x = window->positionX;
@@ -904,7 +912,7 @@ GLFWAPI void glfwGetWindowPos(GLFWwindow window, int* x, int* y)
// Set the window position
//========================================================================
GLFWAPI void glfwSetWindowPos(GLFWwindow window, int x, int y)
GLFWAPI void glfwSetWindowPos(GLFWwindow handle, int x, int y)
{
if (!_glfwInitialized)
{
@@ -912,6 +920,8 @@ GLFWAPI void glfwSetWindowPos(GLFWwindow window, int x, int y)
return;
}
_GLFWwindow* window = (_GLFWwindow*) handle;
if (window->mode == GLFW_FULLSCREEN || window->iconified)
{
// TODO: Figure out if this is an error
@@ -926,7 +936,7 @@ GLFWAPI void glfwSetWindowPos(GLFWwindow window, int x, int y)
// Window iconification
//========================================================================
GLFWAPI void glfwIconifyWindow(GLFWwindow window)
GLFWAPI void glfwIconifyWindow(GLFWwindow handle)
{
if (!_glfwInitialized)
{
@@ -934,6 +944,8 @@ GLFWAPI void glfwIconifyWindow(GLFWwindow window)
return;
}
_GLFWwindow* window = (_GLFWwindow*) handle;
if (window->iconified)
return;
@@ -945,7 +957,7 @@ GLFWAPI void glfwIconifyWindow(GLFWwindow window)
// Window un-iconification
//========================================================================
GLFWAPI void glfwRestoreWindow(GLFWwindow window)
GLFWAPI void glfwRestoreWindow(GLFWwindow handle)
{
if (!_glfwInitialized)
{
@@ -953,6 +965,8 @@ GLFWAPI void glfwRestoreWindow(GLFWwindow window)
return;
}
_GLFWwindow* window = (_GLFWwindow*) handle;
if (!window->iconified)
return;
@@ -1013,7 +1027,7 @@ GLFWAPI void glfwSwapInterval(int interval)
// Get window parameter
//========================================================================
GLFWAPI int glfwGetWindowParam(GLFWwindow window, int param)
GLFWAPI int glfwGetWindowParam(GLFWwindow handle, int param)
{
if (!_glfwInitialized)
{
@@ -1021,6 +1035,8 @@ GLFWAPI int glfwGetWindowParam(GLFWwindow window, int param)
return 0;
}
_GLFWwindow* window = (_GLFWwindow*) handle;
switch (param)
{
case GLFW_ACTIVE:
@@ -1080,7 +1096,7 @@ GLFWAPI int glfwGetWindowParam(GLFWwindow window, int param)
// Set the user pointer for the specified window
//========================================================================
GLFWAPI void glfwSetWindowUserPointer(GLFWwindow window, void* pointer)
GLFWAPI void glfwSetWindowUserPointer(GLFWwindow handle, void* pointer)
{
if (!_glfwInitialized)
{
@@ -1088,6 +1104,8 @@ GLFWAPI void glfwSetWindowUserPointer(GLFWwindow window, void* pointer)
return;
}
_GLFWwindow* window = (_GLFWwindow*) handle;
window->userPointer = pointer;
}
@@ -1096,7 +1114,7 @@ GLFWAPI void glfwSetWindowUserPointer(GLFWwindow window, void* pointer)
// Get the user pointer for the specified window
//========================================================================
GLFWAPI void* glfwGetWindowUserPointer(GLFWwindow window)
GLFWAPI void* glfwGetWindowUserPointer(GLFWwindow handle)
{
if (!_glfwInitialized)
{
@@ -1104,6 +1122,8 @@ GLFWAPI void* glfwGetWindowUserPointer(GLFWwindow window)
return NULL;
}
_GLFWwindow* window = (_GLFWwindow*) handle;
return window->userPointer;
}