X11: Add native access to primary selection

This adds the native access functions glfwSetX11SelectionString and
glfwGetX11SelectionString under GLFW_EXPOSE_NATIVE_X11.  They are
similar to glfwSetClipboardString and glfwGetClipboardString but operate
on the PRIMARY selection.

The primary selection is widely used in X11, and so seems important to
support.  Primary selection is mostly an X11-specific thing, hence it's
exposed as an X11 native interface.

Fixes #894.
Closes #1056.

Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
This commit is contained in:
Kristian Nielsen
2017-08-02 16:10:13 +02:00
committed by Camilla Löwy
parent 3ee7f8f695
commit 29a75ab09d
6 changed files with 180 additions and 72 deletions

View File

@@ -124,6 +124,9 @@ information on what to include when reporting a bug.
## Changelog
- Added `glfwSetX11SelectionString` and `glfwGetX11SelectionString`
native functions for accessing X11 primary selection as a supplement to
the clipboard on the X11 platform (#894)
- Added `glfwGetError` function for querying the last error code and its
description (#970)
- Added `glfwUpdateGamepadMappings` function for importing gamepad mappings in