diff --git a/src/cocoa_init.m b/src/cocoa_init.m index 64c99b7c..3d3245f5 100644 --- a/src/cocoa_init.m +++ b/src/cocoa_init.m @@ -704,7 +704,8 @@ void _glfwTerminateCocoa(void) GLFWtheme* _glfwGetSystemDefaultThemeCocoa(void) { - return NULL; + _glfwInputError(GLFW_FEATURE_UNIMPLEMENTED, NULL); + return NULL; // TODO: implement } #endif // _GLFW_COCOA diff --git a/src/cocoa_window.m b/src/cocoa_window.m index 8391884a..76aac5b2 100644 --- a/src/cocoa_window.m +++ b/src/cocoa_window.m @@ -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 } diff --git a/src/init.c b/src/init.c index 890af4aa..52c708eb 100644 --- a/src/init.c +++ b/src/init.c @@ -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 } diff --git a/src/null_init.c b/src/null_init.c index de4b28f3..f42f70b4 100644 --- a/src/null_init.c +++ b/src/null_init.c @@ -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 +} diff --git a/src/null_platform.h b/src/null_platform.h index b646acb3..44a61cad 100644 --- a/src/null_platform.h +++ b/src/null_platform.h @@ -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); diff --git a/src/null_window.c b/src/null_window.c index 5cdf3e23..2804fa59 100644 --- a/src/null_window.c +++ b/src/null_window.c @@ -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;