mirror of
https://github.com/glfw/glfw.git
synced 2024-12-01 16:44:37 +00:00
Add stubs for all platforms
This commit is contained in:
parent
b5363d87d2
commit
266f67c6db
@ -683,6 +683,7 @@ GLFWbool _glfwConnectCocoa(int platformID, _GLFWplatform* platform)
|
||||
_glfwSetWindowMousePassthroughCocoa,
|
||||
_glfwGetThemeCocoa,
|
||||
_glfwSetThemeCocoa,
|
||||
// Events
|
||||
_glfwPollEventsCocoa,
|
||||
_glfwWaitEventsCocoa,
|
||||
_glfwWaitEventsTimeoutCocoa,
|
||||
|
@ -672,11 +672,11 @@ struct _GLFWmutex
|
||||
struct _GLFWplatform
|
||||
{
|
||||
int platformID;
|
||||
// init
|
||||
// Init
|
||||
GLFWbool (*init)(void);
|
||||
void (*terminate)(void);
|
||||
GLFWtheme* (*getSystemDefaultTheme)(void);
|
||||
// input
|
||||
// Input
|
||||
void (*getCursorPos)(_GLFWwindow*,double*,double*);
|
||||
void (*setCursorPos)(_GLFWwindow*,double,double);
|
||||
void (*setCursorMode)(_GLFWwindow*,int);
|
||||
@ -695,7 +695,7 @@ struct _GLFWplatform
|
||||
GLFWbool (*pollJoystick)(_GLFWjoystick*,int);
|
||||
const char* (*getMappingName)(void);
|
||||
void (*updateGamepadGUID)(char*);
|
||||
// monitor
|
||||
// Monitor
|
||||
void (*freeMonitor)(_GLFWmonitor*);
|
||||
void (*getMonitorPos)(_GLFWmonitor*,int*,int*);
|
||||
void (*getMonitorContentScale)(_GLFWmonitor*,float*,float*);
|
||||
@ -704,7 +704,7 @@ struct _GLFWplatform
|
||||
void (*getVideoMode)(_GLFWmonitor*,GLFWvidmode*);
|
||||
GLFWbool (*getGammaRamp)(_GLFWmonitor*,GLFWgammaramp*);
|
||||
void (*setGammaRamp)(_GLFWmonitor*,const GLFWgammaramp*);
|
||||
// window
|
||||
// Window
|
||||
GLFWbool (*createWindow)(_GLFWwindow*,const _GLFWwndconfig*,const _GLFWctxconfig*,const _GLFWfbconfig*);
|
||||
void (*destroyWindow)(_GLFWwindow*);
|
||||
void (*setWindowTitle)(_GLFWwindow*,const char*);
|
||||
@ -740,6 +740,7 @@ struct _GLFWplatform
|
||||
void (*setWindowMousePassthrough)(_GLFWwindow*,GLFWbool);
|
||||
GLFWtheme* (*getTheme)(_GLFWwindow*);
|
||||
void (*setTheme)(_GLFWwindow*,GLFWtheme*);
|
||||
// Events
|
||||
void (*pollEvents)(void);
|
||||
void (*waitEvents)(void);
|
||||
void (*waitEventsTimeout)(double);
|
||||
@ -748,7 +749,7 @@ struct _GLFWplatform
|
||||
EGLenum (*getEGLPlatform)(EGLint**);
|
||||
EGLNativeDisplayType (*getEGLNativeDisplay)(void);
|
||||
EGLNativeWindowType (*getEGLNativeWindow)(_GLFWwindow*);
|
||||
// vulkan
|
||||
// Vulkan
|
||||
void (*getRequiredInstanceExtensions)(char**);
|
||||
GLFWbool (*getPhysicalDevicePresentationSupport)(VkInstance,VkPhysicalDevice,uint32_t);
|
||||
VkResult (*createWindowSurface)(VkInstance,_GLFWwindow*,const VkAllocationCallbacks*,VkSurfaceKHR*);
|
||||
|
@ -606,8 +606,11 @@ GLFWbool _glfwConnectWin32(int platformID, _GLFWplatform* platform)
|
||||
const _GLFWplatform win32 =
|
||||
{
|
||||
GLFW_PLATFORM_WIN32,
|
||||
// Init
|
||||
_glfwInitWin32,
|
||||
_glfwTerminateWin32,
|
||||
_glfwGetSystemDefaultThemeWin32
|
||||
// Input
|
||||
_glfwGetCursorPosWin32,
|
||||
_glfwSetCursorPosWin32,
|
||||
_glfwSetCursorModeWin32,
|
||||
@ -626,6 +629,7 @@ GLFWbool _glfwConnectWin32(int platformID, _GLFWplatform* platform)
|
||||
_glfwPollJoystickWin32,
|
||||
_glfwGetMappingNameWin32,
|
||||
_glfwUpdateGamepadGUIDWin32,
|
||||
// Monitor
|
||||
_glfwFreeMonitorWin32,
|
||||
_glfwGetMonitorPosWin32,
|
||||
_glfwGetMonitorContentScaleWin32,
|
||||
@ -634,6 +638,7 @@ GLFWbool _glfwConnectWin32(int platformID, _GLFWplatform* platform)
|
||||
_glfwGetVideoModeWin32,
|
||||
_glfwGetGammaRampWin32,
|
||||
_glfwSetGammaRampWin32,
|
||||
// Window
|
||||
_glfwCreateWindowWin32,
|
||||
_glfwDestroyWindowWin32,
|
||||
_glfwSetWindowTitleWin32,
|
||||
@ -667,13 +672,18 @@ GLFWbool _glfwConnectWin32(int platformID, _GLFWplatform* platform)
|
||||
_glfwSetWindowFloatingWin32,
|
||||
_glfwSetWindowOpacityWin32,
|
||||
_glfwSetWindowMousePassthroughWin32,
|
||||
_glfwGetThemeWin32,
|
||||
_glfwSetThemeWin32,
|
||||
// Events
|
||||
_glfwPollEventsWin32,
|
||||
_glfwWaitEventsWin32,
|
||||
_glfwWaitEventsTimeoutWin32,
|
||||
_glfwPostEmptyEventWin32,
|
||||
// EGL
|
||||
_glfwGetEGLPlatformWin32,
|
||||
_glfwGetEGLNativeDisplayWin32,
|
||||
_glfwGetEGLNativeWindowWin32,
|
||||
// Vulkan
|
||||
_glfwGetRequiredInstanceExtensionsWin32,
|
||||
_glfwGetPhysicalDevicePresentationSupportWin32,
|
||||
_glfwCreateWindowSurfaceWin32,
|
||||
@ -727,5 +737,11 @@ void _glfwTerminateWin32(void)
|
||||
freeLibraries();
|
||||
}
|
||||
|
||||
GLFWtheme* _glfwGetSystemDefaultThemeWin32(void)
|
||||
{
|
||||
_glfwInputError(GLFW_FEATURE_UNIMPLEMENTED, NULL);
|
||||
return NULL; // TODO: implement
|
||||
}
|
||||
|
||||
#endif // _GLFW_WIN32
|
||||
|
||||
|
@ -622,3 +622,6 @@ GLFWbool _glfwCreateContextWGL(_GLFWwindow* window,
|
||||
const _GLFWctxconfig* ctxconfig,
|
||||
const _GLFWfbconfig* fbconfig);
|
||||
|
||||
GLFWtheme* _glfwGetSystemDefaultThemeWin32(void);
|
||||
void _glfwSetThemeWin32(_GLFWwindow* window, GLFWtheme* theme);
|
||||
GLFWtheme* _glfwGetThemeWin32(_GLFWwindow* window);
|
||||
|
@ -2373,6 +2373,17 @@ const char* _glfwGetClipboardStringWin32(void)
|
||||
return _glfw.win32.clipboardString;
|
||||
}
|
||||
|
||||
void _glfwSetThemeWin32(_GLFWwindow* window, GLFWtheme* theme)
|
||||
{
|
||||
_glfwInputError(GLFW_FEATURE_UNIMPLEMENTED, NULL);
|
||||
}
|
||||
|
||||
GLFWtheme* _glfwGetThemeWin32(_GLFWwindow* window)
|
||||
{
|
||||
_glfwInputError(GLFW_FEATURE_UNIMPLEMENTED, NULL);
|
||||
return NULL; // TODO: implement
|
||||
}
|
||||
|
||||
EGLenum _glfwGetEGLPlatformWin32(EGLint** attribs)
|
||||
{
|
||||
if (_glfw.egl.ANGLE_platform_angle)
|
||||
|
@ -379,8 +379,11 @@ GLFWbool _glfwConnectWayland(int platformID, _GLFWplatform* platform)
|
||||
const _GLFWplatform wayland =
|
||||
{
|
||||
GLFW_PLATFORM_WAYLAND,
|
||||
// Init
|
||||
_glfwInitWayland,
|
||||
_glfwTerminateWayland,
|
||||
_glfwGetSystemDefaultThemeWayland
|
||||
// Input
|
||||
_glfwGetCursorPosWayland,
|
||||
_glfwSetCursorPosWayland,
|
||||
_glfwSetCursorModeWayland,
|
||||
@ -407,6 +410,7 @@ GLFWbool _glfwConnectWayland(int platformID, _GLFWplatform* platform)
|
||||
_glfwGetMappingNameNull,
|
||||
_glfwUpdateGamepadGUIDNull,
|
||||
#endif
|
||||
// Monitor
|
||||
_glfwFreeMonitorWayland,
|
||||
_glfwGetMonitorPosWayland,
|
||||
_glfwGetMonitorContentScaleWayland,
|
||||
@ -415,6 +419,7 @@ GLFWbool _glfwConnectWayland(int platformID, _GLFWplatform* platform)
|
||||
_glfwGetVideoModeWayland,
|
||||
_glfwGetGammaRampWayland,
|
||||
_glfwSetGammaRampWayland,
|
||||
// Window
|
||||
_glfwCreateWindowWayland,
|
||||
_glfwDestroyWindowWayland,
|
||||
_glfwSetWindowTitleWayland,
|
||||
@ -448,13 +453,18 @@ GLFWbool _glfwConnectWayland(int platformID, _GLFWplatform* platform)
|
||||
_glfwSetWindowFloatingWayland,
|
||||
_glfwSetWindowOpacityWayland,
|
||||
_glfwSetWindowMousePassthroughWayland,
|
||||
_glfwGetThemeWayland,
|
||||
_glfwSetThemeWayland,
|
||||
// Events
|
||||
_glfwPollEventsWayland,
|
||||
_glfwWaitEventsWayland,
|
||||
_glfwWaitEventsTimeoutWayland,
|
||||
_glfwPostEmptyEventWayland,
|
||||
// EGL
|
||||
_glfwGetEGLPlatformWayland,
|
||||
_glfwGetEGLNativeDisplayWayland,
|
||||
_glfwGetEGLNativeWindowWayland,
|
||||
// Vulkan
|
||||
_glfwGetRequiredInstanceExtensionsWayland,
|
||||
_glfwGetPhysicalDevicePresentationSupportWayland,
|
||||
_glfwCreateWindowSurfaceWayland,
|
||||
@ -793,5 +803,11 @@ void _glfwTerminateWayland(void)
|
||||
_glfw_free(_glfw.wl.clipboardString);
|
||||
}
|
||||
|
||||
GLFWtheme* _glfwGetSystemDefaultThemeWayland(void)
|
||||
{
|
||||
_glfwInputError(GLFW_FEATURE_UNIMPLEMENTED, NULL);
|
||||
return NULL; // TODO: implement
|
||||
}
|
||||
|
||||
#endif // _GLFW_WAYLAND
|
||||
|
||||
|
@ -519,3 +519,6 @@ void _glfwUpdateContentScaleWayland(_GLFWwindow* window);
|
||||
void _glfwAddSeatListenerWayland(struct wl_seat* seat);
|
||||
void _glfwAddDataDeviceListenerWayland(struct wl_data_device* device);
|
||||
|
||||
GLFWtheme* _glfwGetSystemDefaultThemeWayland(void);
|
||||
void _glfwSetThemeWayland(_GLFWwindow* window, GLFWtheme* theme);
|
||||
GLFWtheme* _glfwGetThemeWayland(_GLFWwindow* window);
|
||||
|
@ -2775,6 +2775,17 @@ const char* _glfwGetClipboardStringWayland(void)
|
||||
return _glfw.wl.clipboardString;
|
||||
}
|
||||
|
||||
void _glfwSetThemeWayland(_GLFWwindow* window, GLFWtheme* theme)
|
||||
{
|
||||
_glfwInputError(GLFW_FEATURE_UNIMPLEMENTED, NULL);
|
||||
}
|
||||
|
||||
GLFWtheme* _glfwGetThemeWayland(_GLFWwindow* window)
|
||||
{
|
||||
_glfwInputError(GLFW_FEATURE_UNIMPLEMENTED, NULL);
|
||||
return NULL; // TODO: implement
|
||||
}
|
||||
|
||||
EGLenum _glfwGetEGLPlatformWayland(EGLint** attribs)
|
||||
{
|
||||
if (_glfw.egl.EXT_platform_base && _glfw.egl.EXT_platform_wayland)
|
||||
|
@ -1169,8 +1169,11 @@ GLFWbool _glfwConnectX11(int platformID, _GLFWplatform* platform)
|
||||
const _GLFWplatform x11 =
|
||||
{
|
||||
GLFW_PLATFORM_X11,
|
||||
// Init
|
||||
_glfwInitX11,
|
||||
_glfwTerminateX11,
|
||||
_glfwGetSystemDefaultThemeX11
|
||||
// Input
|
||||
_glfwGetCursorPosX11,
|
||||
_glfwSetCursorPosX11,
|
||||
_glfwSetCursorModeX11,
|
||||
@ -1197,6 +1200,7 @@ GLFWbool _glfwConnectX11(int platformID, _GLFWplatform* platform)
|
||||
_glfwGetMappingNameNull,
|
||||
_glfwUpdateGamepadGUIDNull,
|
||||
#endif
|
||||
// Monitor
|
||||
_glfwFreeMonitorX11,
|
||||
_glfwGetMonitorPosX11,
|
||||
_glfwGetMonitorContentScaleX11,
|
||||
@ -1205,6 +1209,7 @@ GLFWbool _glfwConnectX11(int platformID, _GLFWplatform* platform)
|
||||
_glfwGetVideoModeX11,
|
||||
_glfwGetGammaRampX11,
|
||||
_glfwSetGammaRampX11,
|
||||
// Window
|
||||
_glfwCreateWindowX11,
|
||||
_glfwDestroyWindowX11,
|
||||
_glfwSetWindowTitleX11,
|
||||
@ -1238,13 +1243,18 @@ GLFWbool _glfwConnectX11(int platformID, _GLFWplatform* platform)
|
||||
_glfwSetWindowFloatingX11,
|
||||
_glfwSetWindowOpacityX11,
|
||||
_glfwSetWindowMousePassthroughX11,
|
||||
_glfwGetThemeX11,
|
||||
_glfwSetThemeX11,
|
||||
// Events
|
||||
_glfwPollEventsX11,
|
||||
_glfwWaitEventsX11,
|
||||
_glfwWaitEventsTimeoutX11,
|
||||
_glfwPostEmptyEventX11,
|
||||
// EGL
|
||||
_glfwGetEGLPlatformX11,
|
||||
_glfwGetEGLNativeDisplayX11,
|
||||
_glfwGetEGLNativeWindowX11,
|
||||
// Vulkan
|
||||
_glfwGetRequiredInstanceExtensionsX11,
|
||||
_glfwGetPhysicalDevicePresentationSupportX11,
|
||||
_glfwCreateWindowSurfaceX11,
|
||||
@ -1654,5 +1664,11 @@ void _glfwTerminateX11(void)
|
||||
}
|
||||
}
|
||||
|
||||
GLFWtheme* _glfwGetSystemDefaultThemeX11(void)
|
||||
{
|
||||
_glfwInputError(GLFW_FEATURE_UNIMPLEMENTED, NULL);
|
||||
return NULL; // TODO: implement
|
||||
}
|
||||
|
||||
#endif // _GLFW_X11
|
||||
|
||||
|
@ -1002,3 +1002,6 @@ GLFWbool _glfwChooseVisualGLX(const _GLFWwndconfig* wndconfig,
|
||||
const _GLFWfbconfig* fbconfig,
|
||||
Visual** visual, int* depth);
|
||||
|
||||
GLFWtheme* _glfwGetSystemDefaultThemeX11(void);
|
||||
void _glfwSetThemeX11(_GLFWwindow* window, GLFWtheme* theme);
|
||||
GLFWtheme* _glfwGetThemeX11(_GLFWwindow* window);
|
||||
|
@ -3082,6 +3082,17 @@ const char* _glfwGetClipboardStringX11(void)
|
||||
return getSelectionString(_glfw.x11.CLIPBOARD);
|
||||
}
|
||||
|
||||
void _glfwSetThemeX11(_GLFWwindow* window, GLFWtheme* theme)
|
||||
{
|
||||
_glfwInputError(GLFW_FEATURE_UNIMPLEMENTED, NULL);
|
||||
}
|
||||
|
||||
GLFWtheme* _glfwGetThemeX11(_GLFWwindow* window)
|
||||
{
|
||||
_glfwInputError(GLFW_FEATURE_UNIMPLEMENTED, NULL);
|
||||
return NULL; // TODO: implement
|
||||
}
|
||||
|
||||
EGLenum _glfwGetEGLPlatformX11(EGLint** attribs)
|
||||
{
|
||||
if (_glfw.egl.ANGLE_platform_angle)
|
||||
|
Loading…
Reference in New Issue
Block a user