mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-23 10:48:51 -05:00
Added input function for window damage events.
This commit is contained in:
parent
de147988f2
commit
72ef537425
|
@ -344,6 +344,7 @@ void _glfwInputWindowFocus(_GLFWwindow* window, GLboolean activated);
|
||||||
void _glfwInputWindowPos(_GLFWwindow* window, int x, int y);
|
void _glfwInputWindowPos(_GLFWwindow* window, int x, int y);
|
||||||
void _glfwInputWindowSize(_GLFWwindow* window, int width, int height);
|
void _glfwInputWindowSize(_GLFWwindow* window, int width, int height);
|
||||||
void _glfwInputWindowIconify(_GLFWwindow* window, int iconified);
|
void _glfwInputWindowIconify(_GLFWwindow* window, int iconified);
|
||||||
|
void _glfwInputWindowDamage(_GLFWwindow* window);
|
||||||
|
|
||||||
// Input event notification
|
// Input event notification
|
||||||
void _glfwInputKey(_GLFWwindow* window, int key, int action);
|
void _glfwInputKey(_GLFWwindow* window, int key, int action);
|
||||||
|
|
|
@ -1069,9 +1069,7 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg,
|
||||||
// Was the window contents damaged?
|
// Was the window contents damaged?
|
||||||
case WM_PAINT:
|
case WM_PAINT:
|
||||||
{
|
{
|
||||||
if (_glfwLibrary.windowRefreshCallback)
|
_glfwInputWindowDamage(window);
|
||||||
_glfwLibrary.windowRefreshCallback(window);
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
11
src/window.c
11
src/window.c
|
@ -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 //////
|
////// GLFW public API //////
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -1349,9 +1349,7 @@ static void processSingleEvent(void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_glfwLibrary.windowRefreshCallback)
|
_glfwInputWindowDamage(window);
|
||||||
_glfwLibrary.windowRefreshCallback(window);
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user