Added initial XInput2 cursor motion.

This commit is contained in:
Camilla Berglund
2013-04-04 16:48:58 +02:00
parent 129e94da2e
commit f41d85a209
4 changed files with 97 additions and 1 deletions
+13 -1
View File
@@ -44,6 +44,9 @@
// The XRandR extension provides mode setting and gamma control
#include <X11/extensions/Xrandr.h>
// The XInput2 extension provides improved input events
#include <X11/extensions/XInput2.h>
// The Xkb extension provides improved keyboard support
#include <X11/XKBlib.h>
@@ -94,7 +97,7 @@ typedef struct _GLFWwindowX11
GLboolean cursorGrabbed; // True if cursor is currently grabbed
GLboolean cursorHidden; // True if cursor is currently hidden
GLboolean cursorCentered; // True if cursor was moved since last poll
int cursorPosX, cursorPosY;
double cursorPosX, cursorPosY;
} _GLFWwindowX11;
@@ -153,6 +156,15 @@ typedef struct _GLFWlibraryX11
int versionMinor;
} xkb;
struct {
GLboolean available;
int majorOpcode;
int eventBase;
int errorBase;
int versionMajor;
int versionMinor;
} xi2;
// LUT for mapping X11 key codes to GLFW key codes
int keyCodeLUT[256];