1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-26 20:28:49 -05:00

Added input function for window damage events.

This commit is contained in:
Camilla Berglund 2011-10-09 21:12:13 +02:00
parent de147988f2
commit 72ef537425
4 changed files with 14 additions and 6 deletions

View File

@ -344,6 +344,7 @@ void _glfwInputWindowFocus(_GLFWwindow* window, GLboolean activated);
void _glfwInputWindowPos(_GLFWwindow* window, int x, int y);
void _glfwInputWindowSize(_GLFWwindow* window, int width, int height);
void _glfwInputWindowIconify(_GLFWwindow* window, int iconified);
void _glfwInputWindowDamage(_GLFWwindow* window);
// Input event notification
void _glfwInputKey(_GLFWwindow* window, int key, int action);

View File

@ -1069,9 +1069,7 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg,
// Was the window contents damaged?
case WM_PAINT:
{
if (_glfwLibrary.windowRefreshCallback)
_glfwLibrary.windowRefreshCallback(window);
_glfwInputWindowDamage(window);
break;
}

View File

@ -195,6 +195,17 @@ void _glfwInputWindowIconify(_GLFWwindow* window, int iconified)
}
//========================================================================
// Register window damage events
//========================================================================
void _glfwInputWindowDamage(_GLFWwindow* window)
{
if (_glfwLibrary.windowRefreshCallback)
_glfwLibrary.windowRefreshCallback(window);
}
//////////////////////////////////////////////////////////////////////////
////// GLFW public API //////
//////////////////////////////////////////////////////////////////////////

View File

@ -1349,9 +1349,7 @@ static void processSingleEvent(void)
return;
}
if (_glfwLibrary.windowRefreshCallback)
_glfwLibrary.windowRefreshCallback(window);
_glfwInputWindowDamage(window);
break;
}