static void os2_getmouse(aa_context * c, int *x, int *y, int *b) { MOUEVENTINFO mouEvent; PTRLOC ptrLoc; USHORT mouwait = MOU_NOWAIT; MouGetPtrPos(&ptrLoc, hMou); MouReadEventQue(&mouEvent, &mouwait, hMou); *x = ptrLoc.col; *y = ptrLoc.row; if((mouEvent.fs==0)&&(mouEvent.col==0)&&(mouEvent.row==0)) { /* no event */ *b = but; return; } if(mouEvent.fs&0x60) but |= AA_BUTTON2; else but &= ~AA_BUTTON2; if((mouEvent.fs&0x18)||(mouEvent.fs&0x60 && mouEvent.fs&0x06)) but |= AA_BUTTON3; else but &= ~AA_BUTTON3; if(mouEvent.fs&0x06) but |= AA_BUTTON1; else but &= ~AA_BUTTON1; if(mouEvent.fs&0x01) but = 0; *b = but; }
int ConQueryMousePos(int *X, int *Y) { PTRLOC mp; if (!MousePresent) return -1; MouGetPtrPos(&mp, MouseHandle); if (X) *X = mp.col; if (Y) *Y = mp.row; return 0; }
static void hb_gt_os2_mouse_GetPos( PHB_GT pGT, int * row, int * col ) { HB_SYMBOL_UNUSED( pGT ); if( s_uMouHandle ) { PTRLOC pos; MouGetPtrPos( &pos, s_uMouHandle ); *row = ( int ) pos.row; *col = ( int ) pos.col; } }