mirror of
https://github.com/glfw/glfw.git
synced 2024-11-29 15:44: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)
|
GLFWtheme* _glfwGetSystemDefaultThemeCocoa(void)
|
||||||
{
|
{
|
||||||
return NULL;
|
_glfwInputError(GLFW_FEATURE_UNIMPLEMENTED, NULL);
|
||||||
|
return NULL; // TODO: implement
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // _GLFW_COCOA
|
#endif // _GLFW_COCOA
|
||||||
|
@ -1883,6 +1883,7 @@ void _glfwSetThemeCocoa(_GLFWwindow* window, GLFWtheme* theme)
|
|||||||
[window->ns.object setAppearance:nil];
|
[window->ns.object setAppearance:nil];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// TODO: support color
|
||||||
|
|
||||||
NSAppearanceName name;
|
NSAppearanceName name;
|
||||||
|
|
||||||
@ -1929,6 +1930,8 @@ void _glfwSetThemeCocoa(_GLFWwindow* window, GLFWtheme* theme)
|
|||||||
|
|
||||||
GLFWtheme* _glfwGetThemeCocoa(_GLFWwindow* window)
|
GLFWtheme* _glfwGetThemeCocoa(_GLFWwindow* window)
|
||||||
{
|
{
|
||||||
|
_glfwInputError(GLFW_FEATURE_UNIMPLEMENTED, NULL); // TODO: remove
|
||||||
|
|
||||||
GLFWtheme theme;
|
GLFWtheme theme;
|
||||||
NSAppearanceName name = [window->ns.object appearance].name;
|
NSAppearanceName name = [window->ns.object appearance].name;
|
||||||
|
|
||||||
@ -1972,7 +1975,7 @@ GLFWtheme* _glfwGetThemeCocoa(_GLFWwindow* window)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//return theme;
|
//return theme;
|
||||||
return NULL;
|
return NULL; // TODO: implement
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -555,5 +555,7 @@ GLFWAPI GLFWthemefun glfwSetSystemThemeCallback(GLFWthemefun callback)
|
|||||||
_GLFW_REQUIRE_INIT_OR_RETURN(NULL);
|
_GLFW_REQUIRE_INIT_OR_RETURN(NULL);
|
||||||
|
|
||||||
//return _glfw.platform.setSystemThemeCallback(callback);
|
//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 =
|
const _GLFWplatform null =
|
||||||
{
|
{
|
||||||
GLFW_PLATFORM_NULL,
|
GLFW_PLATFORM_NULL,
|
||||||
|
// Init
|
||||||
_glfwInitNull,
|
_glfwInitNull,
|
||||||
_glfwTerminateNull,
|
_glfwTerminateNull,
|
||||||
|
_glfwGetSystemDefaultThemeNull,
|
||||||
|
// Input
|
||||||
_glfwGetCursorPosNull,
|
_glfwGetCursorPosNull,
|
||||||
_glfwSetCursorPosNull,
|
_glfwSetCursorPosNull,
|
||||||
_glfwSetCursorModeNull,
|
_glfwSetCursorModeNull,
|
||||||
@ -61,6 +64,7 @@ GLFWbool _glfwConnectNull(int platformID, _GLFWplatform* platform)
|
|||||||
_glfwPollJoystickNull,
|
_glfwPollJoystickNull,
|
||||||
_glfwGetMappingNameNull,
|
_glfwGetMappingNameNull,
|
||||||
_glfwUpdateGamepadGUIDNull,
|
_glfwUpdateGamepadGUIDNull,
|
||||||
|
// Monitor
|
||||||
_glfwFreeMonitorNull,
|
_glfwFreeMonitorNull,
|
||||||
_glfwGetMonitorPosNull,
|
_glfwGetMonitorPosNull,
|
||||||
_glfwGetMonitorContentScaleNull,
|
_glfwGetMonitorContentScaleNull,
|
||||||
@ -69,6 +73,7 @@ GLFWbool _glfwConnectNull(int platformID, _GLFWplatform* platform)
|
|||||||
_glfwGetVideoModeNull,
|
_glfwGetVideoModeNull,
|
||||||
_glfwGetGammaRampNull,
|
_glfwGetGammaRampNull,
|
||||||
_glfwSetGammaRampNull,
|
_glfwSetGammaRampNull,
|
||||||
|
// Window
|
||||||
_glfwCreateWindowNull,
|
_glfwCreateWindowNull,
|
||||||
_glfwDestroyWindowNull,
|
_glfwDestroyWindowNull,
|
||||||
_glfwSetWindowTitleNull,
|
_glfwSetWindowTitleNull,
|
||||||
@ -102,13 +107,17 @@ GLFWbool _glfwConnectNull(int platformID, _GLFWplatform* platform)
|
|||||||
_glfwSetWindowFloatingNull,
|
_glfwSetWindowFloatingNull,
|
||||||
_glfwSetWindowOpacityNull,
|
_glfwSetWindowOpacityNull,
|
||||||
_glfwSetWindowMousePassthroughNull,
|
_glfwSetWindowMousePassthroughNull,
|
||||||
|
_glfwGetThemeNull,
|
||||||
|
_glfwSetThemeNull,
|
||||||
_glfwPollEventsNull,
|
_glfwPollEventsNull,
|
||||||
_glfwWaitEventsNull,
|
_glfwWaitEventsNull,
|
||||||
_glfwWaitEventsTimeoutNull,
|
_glfwWaitEventsTimeoutNull,
|
||||||
_glfwPostEmptyEventNull,
|
_glfwPostEmptyEventNull,
|
||||||
|
// EGL
|
||||||
_glfwGetEGLPlatformNull,
|
_glfwGetEGLPlatformNull,
|
||||||
_glfwGetEGLNativeDisplayNull,
|
_glfwGetEGLNativeDisplayNull,
|
||||||
_glfwGetEGLNativeWindowNull,
|
_glfwGetEGLNativeWindowNull,
|
||||||
|
// Vulkan
|
||||||
_glfwGetRequiredInstanceExtensionsNull,
|
_glfwGetRequiredInstanceExtensionsNull,
|
||||||
_glfwGetPhysicalDevicePresentationSupportNull,
|
_glfwGetPhysicalDevicePresentationSupportNull,
|
||||||
_glfwCreateWindowSurfaceNull,
|
_glfwCreateWindowSurfaceNull,
|
||||||
@ -131,3 +140,7 @@ void _glfwTerminateNull(void)
|
|||||||
_glfwTerminateEGL();
|
_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);
|
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;
|
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)
|
EGLenum _glfwGetEGLPlatformNull(EGLint** attribs)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user