mirror of
https://github.com/glfw/glfw.git
synced 2026-09-18 22:55:46 +00:00
X11 copying code and support PRIMARY & CLIPBOARD clipboards.
This commit is contained in:
+22
-4
@@ -89,8 +89,17 @@
|
||||
#define _GLFW_PLATFORM_LIBRARY_STATE _GLFWlibraryX11 X11
|
||||
#define _GLFW_PLATFORM_CONTEXT_STATE _GLFWcontextGLX GLX
|
||||
|
||||
// Number of string atoms that will be checked
|
||||
#define _GLFW_STRING_ATOMS_COUNT 4
|
||||
// Clipboard atoms
|
||||
#define _GLFW_CLIPBOARD_ATOM_PRIMARY 0
|
||||
#define _GLFW_CLIPBOARD_ATOM_CLIPBOARD 1
|
||||
#define _GLFW_CLIPBOARD_ATOM_SECONDARY 2
|
||||
#define _GLFW_CLIPBOARD_ATOM_COUNT 3
|
||||
|
||||
// String atoms
|
||||
#define _GLFW_STRING_ATOM_UTF8 0
|
||||
#define _GLFW_STRING_ATOM_COMPOUND 1
|
||||
#define _GLFW_STRING_ATOM_STRING 2
|
||||
#define _GLFW_STRING_ATOM_COUNT 3
|
||||
|
||||
//========================================================================
|
||||
// GLFW platform specific types
|
||||
@@ -229,8 +238,15 @@ typedef struct _GLFWlibraryX11
|
||||
|
||||
// Selection data
|
||||
struct {
|
||||
Atom stringatoms[_GLFW_STRING_ATOMS_COUNT];
|
||||
Atom request;
|
||||
struct {
|
||||
Atom clipboard[_GLFW_CLIPBOARD_ATOM_COUNT];
|
||||
Atom string[_GLFW_STRING_ATOM_COUNT];
|
||||
} atoms;
|
||||
struct {
|
||||
size_t stringlen;
|
||||
char *string;
|
||||
} clipboard;
|
||||
Atom request;
|
||||
int converted;
|
||||
} selection;
|
||||
|
||||
@@ -273,5 +289,7 @@ void _glfwTerminateJoysticks(void);
|
||||
// Unicode support
|
||||
long _glfwKeySym2Unicode(KeySym keysym);
|
||||
|
||||
// Clipboard handling
|
||||
Atom _glfwSelectionRequest(XSelectionRequestEvent *request);
|
||||
|
||||
#endif // _platform_h_
|
||||
|
||||
Reference in New Issue
Block a user