mirror of
https://github.com/glfw/glfw.git
synced 2024-11-26 20:11:58 +00:00
Wayland: Split long lines for function declaration
This commit is contained in:
parent
15cad02235
commit
4d3f0fb5df
@ -42,7 +42,8 @@ static inline int min(int n1, int n2)
|
|||||||
return n1 < n2 ? n1 : n2;
|
return n1 < n2 ? n1 : n2;
|
||||||
}
|
}
|
||||||
|
|
||||||
static _GLFWwindow* findWindowFromDecorationSurface(struct wl_surface* surface, int* which)
|
static _GLFWwindow* findWindowFromDecorationSurface(struct wl_surface* surface,
|
||||||
|
int* which)
|
||||||
{
|
{
|
||||||
int focus;
|
int focus;
|
||||||
_GLFWwindow* window = _glfw.windowListHead;
|
_GLFWwindow* window = _glfw.windowListHead;
|
||||||
|
@ -187,7 +187,8 @@ void _glfwPlatformGetGammaRamp(_GLFWmonitor* monitor, GLFWgammaramp* ramp)
|
|||||||
"Wayland: Gamma ramp getting not supported yet");
|
"Wayland: Gamma ramp getting not supported yet");
|
||||||
}
|
}
|
||||||
|
|
||||||
void _glfwPlatformSetGammaRamp(_GLFWmonitor* monitor, const GLFWgammaramp* ramp)
|
void _glfwPlatformSetGammaRamp(_GLFWmonitor* monitor,
|
||||||
|
const GLFWgammaramp* ramp)
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
_glfwInputError(GLFW_PLATFORM_ERROR,
|
_glfwInputError(GLFW_PLATFORM_ERROR,
|
||||||
|
@ -105,8 +105,7 @@ static const struct wl_shell_surface_listener shellSurfaceListener = {
|
|||||||
handlePopupDone
|
handlePopupDone
|
||||||
};
|
};
|
||||||
|
|
||||||
static int
|
static int createTmpfileCloexec(char* tmpname)
|
||||||
createTmpfileCloexec(char* tmpname)
|
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
|
|
||||||
@ -137,8 +136,7 @@ createTmpfileCloexec(char* tmpname)
|
|||||||
* is set to ENOSPC. If posix_fallocate() is not supported, program may
|
* is set to ENOSPC. If posix_fallocate() is not supported, program may
|
||||||
* receive SIGBUS on accessing mmap()'ed file contents instead.
|
* receive SIGBUS on accessing mmap()'ed file contents instead.
|
||||||
*/
|
*/
|
||||||
static int
|
static int createAnonymousFile(off_t size)
|
||||||
createAnonymousFile(off_t size)
|
|
||||||
{
|
{
|
||||||
static const char template[] = "/glfw-shared-XXXXXX";
|
static const char template[] = "/glfw-shared-XXXXXX";
|
||||||
const char* path;
|
const char* path;
|
||||||
@ -485,7 +483,8 @@ static GLFWbool createSurface(_GLFWwindow* window,
|
|||||||
return GLFW_TRUE;
|
return GLFW_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setFullscreen(_GLFWwindow* window, _GLFWmonitor* monitor, int refreshRate)
|
static void setFullscreen(_GLFWwindow* window, _GLFWmonitor* monitor,
|
||||||
|
int refreshRate)
|
||||||
{
|
{
|
||||||
if (window->wl.xdg.toplevel)
|
if (window->wl.xdg.toplevel)
|
||||||
{
|
{
|
||||||
@ -690,8 +689,8 @@ static GLFWbool createXdgSurface(_GLFWwindow* window)
|
|||||||
return GLFW_TRUE;
|
return GLFW_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void setCursorImage(_GLFWwindow* window,
|
||||||
setCursorImage(_GLFWwindow* window, _GLFWcursorWayland* cursorWayland)
|
_GLFWcursorWayland* cursorWayland)
|
||||||
{
|
{
|
||||||
struct itimerspec timer = {};
|
struct itimerspec timer = {};
|
||||||
struct wl_cursor* wlCursor = cursorWayland->cursor;
|
struct wl_cursor* wlCursor = cursorWayland->cursor;
|
||||||
@ -736,8 +735,7 @@ setCursorImage(_GLFWwindow* window, _GLFWcursorWayland* cursorWayland)
|
|||||||
wl_surface_commit(surface);
|
wl_surface_commit(surface);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void incrementCursorImage(_GLFWwindow* window)
|
||||||
incrementCursorImage(_GLFWwindow* window)
|
|
||||||
{
|
{
|
||||||
_GLFWcursor* cursor;
|
_GLFWcursor* cursor;
|
||||||
|
|
||||||
@ -753,8 +751,7 @@ incrementCursorImage(_GLFWwindow* window)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void handleEvents(int timeout)
|
||||||
handleEvents(int timeout)
|
|
||||||
{
|
{
|
||||||
struct wl_display* display = _glfw.wl.display;
|
struct wl_display* display = _glfw.wl.display;
|
||||||
struct pollfd fds[] = {
|
struct pollfd fds[] = {
|
||||||
@ -1029,13 +1026,15 @@ void _glfwPlatformSetWindowSizeLimits(_GLFWwindow* window,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void _glfwPlatformSetWindowAspectRatio(_GLFWwindow* window, int numer, int denom)
|
void _glfwPlatformSetWindowAspectRatio(_GLFWwindow* window,
|
||||||
|
int numer, int denom)
|
||||||
{
|
{
|
||||||
// TODO: find out how to trigger a resize.
|
// TODO: find out how to trigger a resize.
|
||||||
// The actual limits are checked in the wl_shell_surface::configure handler.
|
// The actual limits are checked in the wl_shell_surface::configure handler.
|
||||||
}
|
}
|
||||||
|
|
||||||
void _glfwPlatformGetFramebufferSize(_GLFWwindow* window, int* width, int* height)
|
void _glfwPlatformGetFramebufferSize(_GLFWwindow* window,
|
||||||
|
int* width, int* height)
|
||||||
{
|
{
|
||||||
_glfwPlatformGetWindowSize(window, width, height);
|
_glfwPlatformGetWindowSize(window, width, height);
|
||||||
*width *= window->wl.scale;
|
*width *= window->wl.scale;
|
||||||
|
Loading…
Reference in New Issue
Block a user