comparison android/dw.cpp @ 2608:a11522c30345

Android: Add initial code to handle button presses and long clicks on DWRender. Android Studio seems to think there is something wrong with the setOnTouchListener() code but it seems to work.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Fri, 16 Jul 2021 18:55:05 +0000
parents 3b9bbd69bb9c
children dcd71b04cc46
comparison
equal deleted inserted replaced
2607:3b9bbd69bb9c 2608:a11522c30345
309 /* Button press and release event */ 309 /* Button press and release event */
310 case 3: 310 case 3:
311 case 4: 311 case 4:
312 { 312 {
313 int (* API buttonfunc)(HWND, int, int, int, void *) = (int (* API)(HWND, int, int, int, void *))handler->signalfunction; 313 int (* API buttonfunc)(HWND, int, int, int, void *) = (int (* API)(HWND, int, int, int, void *))handler->signalfunction;
314 int button = 1; 314 int button = params[5] ? DW_POINTER_TO_INT(params[5]) : 1;
315 315
316 retval = buttonfunc(handler->window, DW_POINTER_TO_INT(params[3]), DW_POINTER_TO_INT(params[4]), button, handler->data); 316 retval = buttonfunc(handler->window, DW_POINTER_TO_INT(params[3]), DW_POINTER_TO_INT(params[4]), button, handler->data);
317 break; 317 break;
318 } 318 }
319 /* Motion notify event */ 319 /* Motion notify event */