mirror of
https://github.com/glfw/glfw.git
synced 2024-11-26 06:14:35 +00:00
Add empty theme support for Null platform
Add TODO comments for Null and Cocoa theming functions.
This commit is contained in:
parent
da9e6dac24
commit
f81a9b32c3
@ -704,7 +704,8 @@ void _glfwTerminateCocoa(void)
|
||||
|
||||
GLFWtheme* _glfwGetSystemDefaultThemeCocoa(void)
|
||||
{
|
||||
return NULL;
|
||||
_glfwInputError(GLFW_FEATURE_UNIMPLEMENTED, NULL);
|
||||
return NULL; // TODO: implement
|
||||
}
|
||||
|
||||
#endif // _GLFW_COCOA
|
||||
|
@ -1883,6 +1883,7 @@ void _glfwSetThemeCocoa(_GLFWwindow* window, GLFWtheme* theme)
|
||||
[window->ns.object setAppearance:nil];
|
||||
return;
|
||||
}
|
||||
// TODO: support color
|
||||
|
||||
NSAppearanceName name;
|
||||
|
||||
@ -1929,6 +1930,8 @@ void _glfwSetThemeCocoa(_GLFWwindow* window, GLFWtheme* theme)
|
||||
|
||||
GLFWtheme* _glfwGetThemeCocoa(_GLFWwindow* window)
|
||||
{
|
||||
_glfwInputError(GLFW_FEATURE_UNIMPLEMENTED, NULL); // TODO: remove
|
||||
|
||||
GLFWtheme theme;
|
||||
NSAppearanceName name = [window->ns.object appearance].name;
|
||||
|
||||
@ -1972,7 +1975,7 @@ GLFWtheme* _glfwGetThemeCocoa(_GLFWwindow* window)
|
||||
}
|
||||
|
||||
//return theme;
|
||||
return NULL;
|
||||
return NULL; // TODO: implement
|
||||
}
|
||||
|
||||
|
||||
|
@ -555,5 +555,7 @@ GLFWAPI GLFWthemefun glfwSetSystemThemeCallback(GLFWthemefun callback)
|
||||
_GLFW_REQUIRE_INIT_OR_RETURN(NULL);
|
||||
|
||||
//return _glfw.platform.setSystemThemeCallback(callback);
|
||||
return NULL;
|
||||
|
||||
_glfwInputError(GLFW_FEATURE_UNIMPLEMENTED, NULL);
|
||||
return NULL; // TODO: implement
|
||||
}
|
||||
|
@ -41,8 +41,11 @@ GLFWbool _glfwConnectNull(int platformID, _GLFWplatform* platform)
|
||||
const _GLFWplatform null =
|
||||
{
|
||||
GLFW_PLATFORM_NULL,
|
||||
// Init
|
||||
_glfwInitNull,
|
||||
_glfwTerminateNull,
|
||||
_glfwGetSystemDefaultThemeNull,
|
||||
// Input
|
||||
_glfwGetCursorPosNull,
|
||||
_glfwSetCursorPosNull,
|
||||
_glfwSetCursorModeNull,
|
||||
@ -61,6 +64,7 @@ GLFWbool _glfwConnectNull(int platformID, _GLFWplatform* platform)
|
||||
_glfwPollJoystickNull,
|
||||
_glfwGetMappingNameNull,
|
||||
_glfwUpdateGamepadGUIDNull,
|
||||
// Monitor
|
||||
_glfwFreeMonitorNull,
|
||||
_glfwGetMonitorPosNull,
|
||||
_glfwGetMonitorContentScaleNull,
|
||||
@ -69,6 +73,7 @@ GLFWbool _glfwConnectNull(int platformID, _GLFWplatform* platform)
|
||||
_glfwGetVideoModeNull,
|
||||
_glfwGetGammaRampNull,
|
||||
_glfwSetGammaRampNull,
|
||||
// Window
|
||||
_glfwCreateWindowNull,
|
||||
_glfwDestroyWindowNull,
|
||||
_glfwSetWindowTitleNull,
|
||||
@ -102,13 +107,17 @@ GLFWbool _glfwConnectNull(int platformID, _GLFWplatform* platform)
|
||||
_glfwSetWindowFloatingNull,
|
||||
_glfwSetWindowOpacityNull,
|
||||
_glfwSetWindowMousePassthroughNull,
|
||||
_glfwGetThemeNull,
|
||||
_glfwSetThemeNull,
|
||||
_glfwPollEventsNull,
|
||||
_glfwWaitEventsNull,
|
||||
_glfwWaitEventsTimeoutNull,
|
||||
_glfwPostEmptyEventNull,
|
||||
// EGL
|
||||
_glfwGetEGLPlatformNull,
|
||||
_glfwGetEGLNativeDisplayNull,
|
||||
_glfwGetEGLNativeWindowNull,
|
||||
// Vulkan
|
||||
_glfwGetRequiredInstanceExtensionsNull,
|
||||
_glfwGetPhysicalDevicePresentationSupportNull,
|
||||
_glfwCreateWindowSurfaceNull,
|
||||
@ -131,3 +140,7 @@ void _glfwTerminateNull(void)
|
||||
_glfwTerminateEGL();
|
||||
}
|
||||
|
||||
GLFWtheme* _glfwGetSystemDefaultThemeNull(void)
|
||||
{
|
||||
return NULL; // TODO: should probably return a colorless GLFWtheme with baseTheme set to GLFW_BASE_THEME_LIGHT
|
||||
}
|
||||
|
@ -147,3 +147,6 @@ VkResult _glfwCreateWindowSurfaceNull(VkInstance instance, _GLFWwindow* window,
|
||||
|
||||
void _glfwPollMonitorsNull(void);
|
||||
|
||||
GLFWtheme* _glfwGetSystemDefaultThemeNull(void);
|
||||
void _glfwSetThemeNull(_GLFWwindow* window, GLFWtheme* theme);
|
||||
GLFWtheme* _glfwGetThemeNull(_GLFWwindow* window);
|
||||
|
@ -551,6 +551,15 @@ const char* _glfwGetClipboardStringNull(void)
|
||||
return _glfw.null.clipboardString;
|
||||
}
|
||||
|
||||
void _glfwSetThemeNull(_GLFWwindow* window, GLFWtheme* theme)
|
||||
{
|
||||
}
|
||||
|
||||
GLFWtheme* _glfwGetThemeNull(_GLFWwindow* window)
|
||||
{
|
||||
return NULL; // TODO: see to-do in _glfwGetSystemDefaultThemeNull
|
||||
}
|
||||
|
||||
EGLenum _glfwGetEGLPlatformNull(EGLint** attribs)
|
||||
{
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user