mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 13:04:35 +00:00
Add glfwIsWindowLightTheme function
This commit is contained in:
parent
d63766c99f
commit
8b991ae051
@ -3388,6 +3388,8 @@ GLFWAPI void glfwGetWindowPos(GLFWwindow* window, int* xpos, int* ypos);
|
||||
*/
|
||||
GLFWAPI void glfwSetWindowPos(GLFWwindow* window, int xpos, int ypos);
|
||||
|
||||
GLFWAPI int glfwIsWindowLightTheme(GLFWwindow* window);
|
||||
|
||||
/*! @brief Retrieves the size of the content area of the specified window.
|
||||
*
|
||||
* This function retrieves the size, in screen coordinates, of the content area
|
||||
|
@ -533,6 +533,7 @@ struct _GLFWwindow
|
||||
GLFWbool focusOnShow;
|
||||
GLFWbool mousePassthrough;
|
||||
GLFWbool shouldClose;
|
||||
GLFWbool isLightTheme;
|
||||
void* userPointer;
|
||||
GLFWbool doublebuffer;
|
||||
GLFWvidmode videoMode;
|
||||
|
@ -1372,6 +1372,7 @@ static int createNativeWindow(_GLFWwindow* window,
|
||||
should_use_light_mode = wndconfig->theme == GLFW_THEME_LIGHT;
|
||||
|
||||
_glfwSetWindowTheme(!should_use_light_mode, window->win32.handle);
|
||||
window->isLightTheme = should_use_light_mode ? GLFW_TRUE : GLFW_FALSE;
|
||||
|
||||
_glfw_free(wideTitle);
|
||||
|
||||
|
@ -588,6 +588,15 @@ GLFWAPI void glfwSetWindowPos(GLFWwindow* handle, int xpos, int ypos)
|
||||
_glfw.platform.setWindowPos(window, xpos, ypos);
|
||||
}
|
||||
|
||||
GLFWAPI int glfwIsWindowLightTheme(GLFWwindow* handle)
|
||||
{
|
||||
_GLFWwindow* window = (_GLFWwindow*)handle;
|
||||
assert(window != NULL);
|
||||
|
||||
_GLFW_REQUIRE_INIT_OR_RETURN(0);
|
||||
return window->isLightTheme;
|
||||
}
|
||||
|
||||
GLFWAPI void glfwGetWindowSize(GLFWwindow* handle, int* width, int* height)
|
||||
{
|
||||
_GLFWwindow* window = (_GLFWwindow*) handle;
|
||||
|
Loading…
Reference in New Issue
Block a user