Merge branch 'glfw_null_unused_params' of https://github.com/Luflosi/kitty

This commit is contained in:
Kovid Goyal 2019-09-20 06:27:13 +05:30
commit f16f80b459
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
3 changed files with 73 additions and 73 deletions

View File

@ -33,12 +33,12 @@
////// GLFW platform API ////// ////// GLFW platform API //////
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
int _glfwPlatformPollJoystick(_GLFWjoystick* js, int mode) int _glfwPlatformPollJoystick(_GLFWjoystick* js UNUSED, int mode UNUSED)
{ {
return false; return false;
} }
void _glfwPlatformUpdateGamepadGUID(char* guid) void _glfwPlatformUpdateGamepadGUID(char* guid UNUSED)
{ {
} }

20
glfw/null_monitor.c vendored
View File

@ -34,15 +34,15 @@
////// GLFW platform API ////// ////// GLFW platform API //////
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
void _glfwPlatformFreeMonitor(_GLFWmonitor* monitor) void _glfwPlatformFreeMonitor(_GLFWmonitor* monitor UNUSED)
{ {
} }
void _glfwPlatformGetMonitorPos(_GLFWmonitor* monitor, int* xpos, int* ypos) void _glfwPlatformGetMonitorPos(_GLFWmonitor* monitor UNUSED, int* xpos UNUSED, int* ypos UNUSED)
{ {
} }
void _glfwPlatformGetMonitorContentScale(_GLFWmonitor* monitor, void _glfwPlatformGetMonitorContentScale(_GLFWmonitor* monitor UNUSED,
float* xscale, float* yscale) float* xscale, float* yscale)
{ {
if (xscale) if (xscale)
@ -51,27 +51,27 @@ void _glfwPlatformGetMonitorContentScale(_GLFWmonitor* monitor,
*yscale = 1.f; *yscale = 1.f;
} }
void _glfwPlatformGetMonitorWorkarea(_GLFWmonitor* monitor, void _glfwPlatformGetMonitorWorkarea(_GLFWmonitor* monitor UNUSED,
int* xpos, int* ypos, int* xpos UNUSED, int* ypos UNUSED,
int* width, int* height) int* width UNUSED, int* height UNUSED)
{ {
} }
GLFWvidmode* _glfwPlatformGetVideoModes(_GLFWmonitor* monitor, int* found) GLFWvidmode* _glfwPlatformGetVideoModes(_GLFWmonitor* monitor UNUSED, int* found UNUSED)
{ {
return NULL; return NULL;
} }
void _glfwPlatformGetVideoMode(_GLFWmonitor* monitor, GLFWvidmode* mode) void _glfwPlatformGetVideoMode(_GLFWmonitor* monitor UNUSED, GLFWvidmode* mode UNUSED)
{ {
} }
bool _glfwPlatformGetGammaRamp(_GLFWmonitor* monitor, GLFWgammaramp* ramp) bool _glfwPlatformGetGammaRamp(_GLFWmonitor* monitor UNUSED, GLFWgammaramp* ramp UNUSED)
{ {
return false; return false;
} }
void _glfwPlatformSetGammaRamp(_GLFWmonitor* monitor, const GLFWgammaramp* ramp) void _glfwPlatformSetGammaRamp(_GLFWmonitor* monitor UNUSED, const GLFWgammaramp* ramp UNUSED)
{ {
} }

122
glfw/null_window.c vendored
View File

@ -78,28 +78,28 @@ void _glfwPlatformDestroyWindow(_GLFWwindow* window)
window->context.destroy(window); window->context.destroy(window);
} }
void _glfwPlatformSetWindowTitle(_GLFWwindow* window, const char* title) void _glfwPlatformSetWindowTitle(_GLFWwindow* window UNUSED, const char* title UNUSED)
{ {
} }
void _glfwPlatformSetWindowIcon(_GLFWwindow* window, int count, void _glfwPlatformSetWindowIcon(_GLFWwindow* window UNUSED, int count UNUSED,
const GLFWimage* images) const GLFWimage* images UNUSED)
{ {
} }
void _glfwPlatformSetWindowMonitor(_GLFWwindow* window, void _glfwPlatformSetWindowMonitor(_GLFWwindow* window UNUSED,
_GLFWmonitor* monitor, _GLFWmonitor* monitor UNUSED,
int xpos, int ypos, int xpos UNUSED, int ypos UNUSED,
int width, int height, int width UNUSED, int height UNUSED,
int refreshRate) int refreshRate UNUSED)
{ {
} }
void _glfwPlatformGetWindowPos(_GLFWwindow* window, int* xpos, int* ypos) void _glfwPlatformGetWindowPos(_GLFWwindow* window UNUSED, int* xpos UNUSED, int* ypos UNUSED)
{ {
} }
void _glfwPlatformSetWindowPos(_GLFWwindow* window, int xpos, int ypos) void _glfwPlatformSetWindowPos(_GLFWwindow* window UNUSED, int xpos UNUSED, int ypos UNUSED)
{ {
} }
@ -117,13 +117,13 @@ void _glfwPlatformSetWindowSize(_GLFWwindow* window, int width, int height)
window->null.height = height; window->null.height = height;
} }
void _glfwPlatformSetWindowSizeLimits(_GLFWwindow* window, void _glfwPlatformSetWindowSizeLimits(_GLFWwindow* window UNUSED,
int minwidth, int minheight, int minwidth UNUSED, int minheight UNUSED,
int maxwidth, int maxheight) int maxwidth UNUSED, int maxheight UNUSED)
{ {
} }
void _glfwPlatformSetWindowAspectRatio(_GLFWwindow* window, int n, int d) void _glfwPlatformSetWindowAspectRatio(_GLFWwindow* window UNUSED, int n UNUSED, int d UNUSED)
{ {
} }
@ -135,13 +135,13 @@ void _glfwPlatformGetFramebufferSize(_GLFWwindow* window, int* width, int* heigh
*height = window->null.height; *height = window->null.height;
} }
void _glfwPlatformGetWindowFrameSize(_GLFWwindow* window, void _glfwPlatformGetWindowFrameSize(_GLFWwindow* window UNUSED,
int* left, int* top, int* left UNUSED, int* top UNUSED,
int* right, int* bottom) int* right UNUSED, int* bottom UNUSED)
{ {
} }
void _glfwPlatformGetWindowContentScale(_GLFWwindow* window, void _glfwPlatformGetWindowContentScale(_GLFWwindow* window UNUSED,
float* xscale, float* yscale) float* xscale, float* yscale)
{ {
if (xscale) if (xscale)
@ -150,101 +150,101 @@ void _glfwPlatformGetWindowContentScale(_GLFWwindow* window,
*yscale = 1.f; *yscale = 1.f;
} }
double _glfwPlatformGetDoubleClickInterval(_GLFWwindow* window) double _glfwPlatformGetDoubleClickInterval(_GLFWwindow* window UNUSED)
{ {
return 0.5; return 0.5;
} }
void _glfwPlatformIconifyWindow(_GLFWwindow* window) void _glfwPlatformIconifyWindow(_GLFWwindow* window UNUSED)
{ {
} }
void _glfwPlatformRestoreWindow(_GLFWwindow* window) void _glfwPlatformRestoreWindow(_GLFWwindow* window UNUSED)
{ {
} }
void _glfwPlatformMaximizeWindow(_GLFWwindow* window) void _glfwPlatformMaximizeWindow(_GLFWwindow* window UNUSED)
{ {
} }
int _glfwPlatformWindowMaximized(_GLFWwindow* window) int _glfwPlatformWindowMaximized(_GLFWwindow* window UNUSED)
{ {
return false; return false;
} }
int _glfwPlatformWindowHovered(_GLFWwindow* window) int _glfwPlatformWindowHovered(_GLFWwindow* window UNUSED)
{ {
return false; return false;
} }
int _glfwPlatformFramebufferTransparent(_GLFWwindow* window) int _glfwPlatformFramebufferTransparent(_GLFWwindow* window UNUSED)
{ {
return false; return false;
} }
void _glfwPlatformSetWindowResizable(_GLFWwindow* window, bool enabled) void _glfwPlatformSetWindowResizable(_GLFWwindow* window UNUSED, bool enabled UNUSED)
{ {
} }
void _glfwPlatformSetWindowDecorated(_GLFWwindow* window, bool enabled) void _glfwPlatformSetWindowDecorated(_GLFWwindow* window UNUSED, bool enabled UNUSED)
{ {
} }
void _glfwPlatformSetWindowFloating(_GLFWwindow* window, bool enabled) void _glfwPlatformSetWindowFloating(_GLFWwindow* window UNUSED, bool enabled UNUSED)
{ {
} }
float _glfwPlatformGetWindowOpacity(_GLFWwindow* window) float _glfwPlatformGetWindowOpacity(_GLFWwindow* window UNUSED)
{ {
return 1.f; return 1.f;
} }
void _glfwPlatformSetWindowOpacity(_GLFWwindow* window, float opacity) void _glfwPlatformSetWindowOpacity(_GLFWwindow* window UNUSED, float opacity UNUSED)
{ {
} }
void _glfwPlatformShowWindow(_GLFWwindow* window) void _glfwPlatformShowWindow(_GLFWwindow* window UNUSED)
{ {
} }
void _glfwPlatformRequestWindowAttention(_GLFWwindow* window) void _glfwPlatformRequestWindowAttention(_GLFWwindow* window UNUSED)
{ {
} }
int _glfwPlatformWindowBell(_GLFWwindow* window) int _glfwPlatformWindowBell(_GLFWwindow* window UNUSED)
{ {
return false; return false;
} }
void _glfwPlatformUnhideWindow(_GLFWwindow* window) void _glfwPlatformUnhideWindow(_GLFWwindow* window UNUSED)
{ {
} }
void _glfwPlatformHideWindow(_GLFWwindow* window) void _glfwPlatformHideWindow(_GLFWwindow* window UNUSED)
{ {
} }
void _glfwPlatformFocusWindow(_GLFWwindow* window) void _glfwPlatformFocusWindow(_GLFWwindow* window UNUSED)
{ {
} }
int _glfwPlatformWindowFocused(_GLFWwindow* window) int _glfwPlatformWindowFocused(_GLFWwindow* window UNUSED)
{ {
return false; return false;
} }
int _glfwPlatformWindowOccluded(_GLFWwindow* window) int _glfwPlatformWindowOccluded(_GLFWwindow* window UNUSED)
{ {
return false; return false;
} }
int _glfwPlatformWindowIconified(_GLFWwindow* window) int _glfwPlatformWindowIconified(_GLFWwindow* window UNUSED)
{ {
return false; return false;
} }
int _glfwPlatformWindowVisible(_GLFWwindow* window) int _glfwPlatformWindowVisible(_GLFWwindow* window UNUSED)
{ {
return false; return false;
} }
@ -257,7 +257,7 @@ void _glfwPlatformWaitEvents(void)
{ {
} }
void _glfwPlatformWaitEventsTimeout(double timeout) void _glfwPlatformWaitEventsTimeout(double timeout UNUSED)
{ {
} }
@ -265,39 +265,39 @@ void _glfwPlatformPostEmptyEvent(void)
{ {
} }
void _glfwPlatformGetCursorPos(_GLFWwindow* window, double* xpos, double* ypos) void _glfwPlatformGetCursorPos(_GLFWwindow* window UNUSED, double* xpos UNUSED, double* ypos UNUSED)
{ {
} }
void _glfwPlatformSetCursorPos(_GLFWwindow* window, double x, double y) void _glfwPlatformSetCursorPos(_GLFWwindow* window UNUSED, double x UNUSED, double y UNUSED)
{ {
} }
void _glfwPlatformSetCursorMode(_GLFWwindow* window, int mode) void _glfwPlatformSetCursorMode(_GLFWwindow* window UNUSED, int mode UNUSED)
{ {
} }
int _glfwPlatformCreateCursor(_GLFWcursor* cursor, int _glfwPlatformCreateCursor(_GLFWcursor* cursor UNUSED,
const GLFWimage* image, const GLFWimage* image UNUSED,
int xhot, int yhot, int count) int xhot UNUSED, int yhot UNUSED, int count UNUSED)
{ {
return true; return true;
} }
int _glfwPlatformCreateStandardCursor(_GLFWcursor* cursor, int shape) int _glfwPlatformCreateStandardCursor(_GLFWcursor* cursor UNUSED, int shape UNUSED)
{ {
return true; return true;
} }
void _glfwPlatformDestroyCursor(_GLFWcursor* cursor) void _glfwPlatformDestroyCursor(_GLFWcursor* cursor UNUSED)
{ {
} }
void _glfwPlatformSetCursor(_GLFWwindow* window, _GLFWcursor* cursor) void _glfwPlatformSetCursor(_GLFWwindow* window UNUSED, _GLFWcursor* cursor UNUSED)
{ {
} }
void _glfwPlatformSetClipboardString(const char* string) void _glfwPlatformSetClipboardString(const char* string UNUSED)
{ {
} }
@ -306,31 +306,31 @@ const char* _glfwPlatformGetClipboardString(void)
return NULL; return NULL;
} }
const char* _glfwPlatformGetScancodeName(int scancode) const char* _glfwPlatformGetScancodeName(int scancode UNUSED)
{ {
return ""; return "";
} }
int _glfwPlatformGetKeyScancode(int key) int _glfwPlatformGetKeyScancode(int key UNUSED)
{ {
return -1; return -1;
} }
void _glfwPlatformGetRequiredInstanceExtensions(char** extensions) void _glfwPlatformGetRequiredInstanceExtensions(char** extensions UNUSED)
{ {
} }
int _glfwPlatformGetPhysicalDevicePresentationSupport(VkInstance instance, int _glfwPlatformGetPhysicalDevicePresentationSupport(VkInstance instance UNUSED,
VkPhysicalDevice device, VkPhysicalDevice device UNUSED,
uint32_t queuefamily) uint32_t queuefamily UNUSED)
{ {
return false; return false;
} }
VkResult _glfwPlatformCreateWindowSurface(VkInstance instance, VkResult _glfwPlatformCreateWindowSurface(VkInstance instance UNUSED,
_GLFWwindow* window, _GLFWwindow* window UNUSED,
const VkAllocationCallbacks* allocator, const VkAllocationCallbacks* allocator UNUSED,
VkSurfaceKHR* surface) VkSurfaceKHR* surface UNUSED)
{ {
// This seems like the most appropriate error to return here // This seems like the most appropriate error to return here
return VK_ERROR_INITIALIZATION_FAILED; return VK_ERROR_INITIALIZATION_FAILED;