-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated touch structure #952
base: master
Are you sure you want to change the base?
Conversation
# Conflicts: # src/input.c # src/internal.h # src/win32_platform.h # src/win32_window.c # tests/events.c
# Conflicts: # src/input.c # src/internal.h # src/win32_platform.h
include/GLFW/glfw3.h
Outdated
@@ -870,6 +874,7 @@ extern "C" { | |||
#define GLFW_CURSOR 0x00033001 | |||
#define GLFW_STICKY_KEYS 0x00033002 | |||
#define GLFW_STICKY_MOUSE_BUTTONS 0x00033003 | |||
#define GLFW_TOUCH 0x00030004 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this value not be 0x00033004 to match the surrounding defines?
_glfwPlatformGetWindowSize(window, &width, &height); | ||
_glfwPlatformGetWindowPos(window, &xpos, &ypos); | ||
|
||
//Create storage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indenting is weird here and elsewhere in this file.
@@ -482,6 +494,20 @@ static void joystick_callback(int jid, int event) | |||
} | |||
} | |||
|
|||
static void touch_callback(GLFWwindow* window, GLFWtouch* touchPoints, int count) | |||
{ | |||
printf("Priting info about all touch points"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: "priting" vs "printing"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for these flaws. Is it preferred that I fix these things or do any of you desire to do it yourself?
@eriksunden Thank you, will review. |
This is related to #42. |
It's not a bad-looking interface, but it is more complex than the current one. Is there often more than one related touch event per frame? |
Sorry for the ultra late reply. |
# Conflicts: # include/GLFW/glfw3.h # src/input.c # src/internal.h # src/win32_platform.h
I've updated to the latest master, and tested the result as well. As before, it is a Windows only feature at the moment. |
I wanted touch support inside GLFW, for convenience over software setups like TUIO, so continued on your touch branch, and based on previous experiences with multi-touch applications, I have bundled all the touch points into one container before sending them out through the callbacks.
I have merged to "latest" and then later on to "master", so it's up-to-date for a convenient merge (or to new feature branch) and possibly then part of 3.3 (as I saw in an issue was the plan).
I have built this branch with Visual Studio 2015 x64, XCode 8.2.1, gcc-4.8(on two linux systems).
The actual touch support is, as with your previous commits, only supporting WM_TOUCH, i.e. Windows. If desired, I could gather effort on implementing support on x11 and cocoa side.