Add pointers to discussion on multi-touch

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1332 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
beuc 2012-06-09 17:29:10 +00:00
parent fb12dc9887
commit 21409fddf2
2 changed files with 4 additions and 1 deletions

View File

@ -182,6 +182,8 @@ FGAPI GLUTproc FGAPIENTRY glutGetProcAddress( const char *procName );
#define GLUT_HAS_MULTI 1 #define GLUT_HAS_MULTI 1
/* TODO: add device_id paramater,
cf. http://sourceforge.net/mailarchive/forum.php?thread_name=20120518071314.GA28061%40perso.beuc.net&forum_name=freeglut-developer */
FGAPI void FGAPIENTRY glutMultiEntryFunc( void (* callback)( int, int ) ); FGAPI void FGAPIENTRY glutMultiEntryFunc( void (* callback)( int, int ) );
FGAPI void FGAPIENTRY glutMultiButtonFunc( void (* callback)( int, int, int, int, int ) ); FGAPI void FGAPIENTRY glutMultiButtonFunc( void (* callback)( int, int, int, int, int ) );
FGAPI void FGAPIENTRY glutMultiMotionFunc( void (* callback)( int, int, int ) ); FGAPI void FGAPIENTRY glutMultiMotionFunc( void (* callback)( int, int, int ) );

View File

@ -228,7 +228,8 @@ int32_t handle_input(struct android_app* app, AInputEvent* event) {
int32_t action = AMotionEvent_getAction(event) & AMOTION_EVENT_ACTION_MASK; int32_t action = AMotionEvent_getAction(event) & AMOTION_EVENT_ACTION_MASK;
/* Pointer ID for clicks */ /* Pointer ID for clicks */
int32_t pidx = AMotionEvent_getAction(event) >> AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT; int32_t pidx = AMotionEvent_getAction(event) >> AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT;
/* TODO: Handle multi-touch; also handle multiple sources */ /* TODO: Handle multi-touch; also handle multiple sources/devices */
/* cf. http://sourceforge.net/mailarchive/forum.php?thread_name=20120518071314.GA28061%40perso.beuc.net&forum_name=freeglut-developer */
if (0) { if (0) {
LOGI("motion action=%d index=%d source=%d", action, pidx, source); LOGI("motion action=%d index=%d source=%d", action, pidx, source);
int count = AMotionEvent_getPointerCount(event); int count = AMotionEvent_getPointerCount(event);