#include "internal.h"
#if defined(_GLFW_X11)
#include <X11/cursorfont.h>
#include <X11/Xmd.h>
#include <poll.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
#include <errno.h>
#include <assert.h>
#define _NET_WM_STATE_REMOVE …
#define _NET_WM_STATE_ADD …
#define _NET_WM_STATE_TOGGLE …
#define Button6 …
#define Button7 …
#define MWM_HINTS_DECORATIONS …
#define MWM_DECOR_ALL …
#define _GLFW_XDND_VERSION …
static GLFWbool waitForX11Event(double* timeout)
{ … }
static GLFWbool waitForAnyEvent(double* timeout)
{ … }
static void writeEmptyEvent(void)
{ … }
static void drainEmptyEvents(void)
{ … }
static GLFWbool waitForVisibilityNotify(_GLFWwindow* window)
{ … }
static int getWindowState(_GLFWwindow* window)
{ … }
static Bool isSelectionEvent(Display* display, XEvent* event, XPointer pointer)
{ … }
static Bool isFrameExtentsEvent(Display* display, XEvent* event, XPointer pointer)
{ … }
static Bool isSelPropNewValueNotify(Display* display, XEvent* event, XPointer pointer)
{ … }
static int translateState(int state)
{ … }
static int translateKey(int scancode)
{ … }
static void sendEventToWM(_GLFWwindow* window, Atom type,
long a, long b, long c, long d, long e)
{ … }
static void updateNormalHints(_GLFWwindow* window, int width, int height)
{ … }
static void updateWindowMode(_GLFWwindow* window)
{ … }
static uint32_t decodeUTF8(const char** s)
{ … }
static char* convertLatin1toUTF8(const char* source)
{ … }
static void updateCursorImage(_GLFWwindow* window)
{ … }
static void captureCursor(_GLFWwindow* window)
{ … }
static void releaseCursor(void)
{ … }
static void enableRawMouseMotion(_GLFWwindow* window)
{ … }
static void disableRawMouseMotion(_GLFWwindow* window)
{ … }
static void disableCursor(_GLFWwindow* window)
{ … }
static void enableCursor(_GLFWwindow* window)
{ … }
static void inputContextDestroyCallback(XIC ic, XPointer clientData, XPointer callData)
{ … }
static GLFWbool createNativeWindow(_GLFWwindow* window,
const _GLFWwndconfig* wndconfig,
Visual* visual, int depth)
{ … }
static Atom writeTargetToProperty(const XSelectionRequestEvent* request)
{ … }
static void handleSelectionRequest(XEvent* event)
{ … }
static const char* getSelectionString(Atom selection)
{ … }
static void acquireMonitor(_GLFWwindow* window)
{ … }
static void releaseMonitor(_GLFWwindow* window)
{ … }
static void processEvent(XEvent *event)
{ … }
unsigned long _glfwGetWindowPropertyX11(Window window,
Atom property,
Atom type,
unsigned char** value)
{ … }
GLFWbool _glfwIsVisualTransparentX11(Visual* visual)
{ … }
void _glfwPushSelectionToManagerX11(void)
{ … }
void _glfwCreateInputContextX11(_GLFWwindow* window)
{ … }
GLFWbool _glfwCreateWindowX11(_GLFWwindow* window,
const _GLFWwndconfig* wndconfig,
const _GLFWctxconfig* ctxconfig,
const _GLFWfbconfig* fbconfig)
{ … }
void _glfwDestroyWindowX11(_GLFWwindow* window)
{ … }
void _glfwSetWindowTitleX11(_GLFWwindow* window, const char* title)
{ … }
void _glfwSetWindowIconX11(_GLFWwindow* window, int count, const GLFWimage* images)
{ … }
void _glfwGetWindowPosX11(_GLFWwindow* window, int* xpos, int* ypos)
{ … }
void _glfwSetWindowPosX11(_GLFWwindow* window, int xpos, int ypos)
{ … }
void _glfwGetWindowSizeX11(_GLFWwindow* window, int* width, int* height)
{ … }
void _glfwSetWindowSizeX11(_GLFWwindow* window, int width, int height)
{ … }
void _glfwSetWindowSizeLimitsX11(_GLFWwindow* window,
int minwidth, int minheight,
int maxwidth, int maxheight)
{ … }
void _glfwSetWindowAspectRatioX11(_GLFWwindow* window, int numer, int denom)
{ … }
void _glfwGetFramebufferSizeX11(_GLFWwindow* window, int* width, int* height)
{ … }
void _glfwGetWindowFrameSizeX11(_GLFWwindow* window,
int* left, int* top,
int* right, int* bottom)
{ … }
void _glfwGetWindowContentScaleX11(_GLFWwindow* window, float* xscale, float* yscale)
{ … }
void _glfwIconifyWindowX11(_GLFWwindow* window)
{ … }
void _glfwRestoreWindowX11(_GLFWwindow* window)
{ … }
void _glfwMaximizeWindowX11(_GLFWwindow* window)
{ … }
void _glfwShowWindowX11(_GLFWwindow* window)
{ … }
void _glfwHideWindowX11(_GLFWwindow* window)
{ … }
void _glfwRequestWindowAttentionX11(_GLFWwindow* window)
{ … }
void _glfwFocusWindowX11(_GLFWwindow* window)
{ … }
void _glfwSetWindowMonitorX11(_GLFWwindow* window,
_GLFWmonitor* monitor,
int xpos, int ypos,
int width, int height,
int refreshRate)
{ … }
GLFWbool _glfwWindowFocusedX11(_GLFWwindow* window)
{ … }
GLFWbool _glfwWindowIconifiedX11(_GLFWwindow* window)
{ … }
GLFWbool _glfwWindowVisibleX11(_GLFWwindow* window)
{ … }
GLFWbool _glfwWindowMaximizedX11(_GLFWwindow* window)
{ … }
GLFWbool _glfwWindowHoveredX11(_GLFWwindow* window)
{ … }
GLFWbool _glfwFramebufferTransparentX11(_GLFWwindow* window)
{ … }
void _glfwSetWindowResizableX11(_GLFWwindow* window, GLFWbool enabled)
{ … }
void _glfwSetWindowDecoratedX11(_GLFWwindow* window, GLFWbool enabled)
{ … }
void _glfwSetWindowFloatingX11(_GLFWwindow* window, GLFWbool enabled)
{ … }
void _glfwSetWindowMousePassthroughX11(_GLFWwindow* window, GLFWbool enabled)
{ … }
float _glfwGetWindowOpacityX11(_GLFWwindow* window)
{ … }
void _glfwSetWindowOpacityX11(_GLFWwindow* window, float opacity)
{ … }
void _glfwSetRawMouseMotionX11(_GLFWwindow *window, GLFWbool enabled)
{ … }
GLFWbool _glfwRawMouseMotionSupportedX11(void)
{ … }
void _glfwPollEventsX11(void)
{ … }
void _glfwWaitEventsX11(void)
{ … }
void _glfwWaitEventsTimeoutX11(double timeout)
{ … }
void _glfwPostEmptyEventX11(void)
{ … }
void _glfwGetCursorPosX11(_GLFWwindow* window, double* xpos, double* ypos)
{ … }
void _glfwSetCursorPosX11(_GLFWwindow* window, double x, double y)
{ … }
void _glfwSetCursorModeX11(_GLFWwindow* window, int mode)
{ … }
const char* _glfwGetScancodeNameX11(int scancode)
{ … }
int _glfwGetKeyScancodeX11(int key)
{ … }
GLFWbool _glfwCreateCursorX11(_GLFWcursor* cursor,
const GLFWimage* image,
int xhot, int yhot)
{ … }
GLFWbool _glfwCreateStandardCursorX11(_GLFWcursor* cursor, int shape)
{ … }
void _glfwDestroyCursorX11(_GLFWcursor* cursor)
{ … }
void _glfwSetCursorX11(_GLFWwindow* window, _GLFWcursor* cursor)
{ … }
void _glfwSetClipboardStringX11(const char* string)
{ … }
const char* _glfwGetClipboardStringX11(void)
{ … }
EGLenum _glfwGetEGLPlatformX11(EGLint** attribs)
{ … }
EGLNativeDisplayType _glfwGetEGLNativeDisplayX11(void)
{ … }
EGLNativeWindowType _glfwGetEGLNativeWindowX11(_GLFWwindow* window)
{ … }
void _glfwGetRequiredInstanceExtensionsX11(char** extensions)
{ … }
GLFWbool _glfwGetPhysicalDevicePresentationSupportX11(VkInstance instance,
VkPhysicalDevice device,
uint32_t queuefamily)
{ … }
VkResult _glfwCreateWindowSurfaceX11(VkInstance instance,
_GLFWwindow* window,
const VkAllocationCallbacks* allocator,
VkSurfaceKHR* surface)
{ … }
GLFWAPI Display* glfwGetX11Display(void)
{ … }
GLFWAPI Window glfwGetX11Window(GLFWwindow* handle)
{ … }
GLFWAPI void glfwSetX11SelectionString(const char* string)
{ … }
GLFWAPI const char* glfwGetX11SelectionString(void)
{ … }
#endif