void ShowMouse(void) { char fikt1, fikt2; int mousex, mousey; GetMouseButtons(&fikt1, &fikt2, &mousex, &mousey); cursorx = mousex; cursory = mousey; // and now draw to the new cursor place ... setwritemode(XOR_PUT); BLine(cursorx, cursory - 2, cursorx, cursory - 10, C); BLine(cursorx, cursory + 2, cursorx, cursory + 10, C); BLine(cursorx - 2, cursory, cursorx - 10, cursory, C); BLine(cursorx + 2, cursory, cursorx + 10, cursory, C); // istalling again the mouse event handler ... registers.r_ax = 0x0c; registers.r_cx = 0x01; registers.r_es = FP_SEG(mouse_event_handler); registers.r_dx = FP_OFF(mouse_event_handler); intr(0x33, ®isters); }
bool nuiSWF::MouseClicked(nuiSize X, nuiSize Y, nglMouseInfo::Flags Button) { mButtons |= GetMouseButtons(Button); mpMovieInterface->notify_mouse_state(ToBelow(X), ToBelow(Y), mButtons); return mInterceptMouse; }
static void do_sys_mouse(window_t *win) { static uint32_t mouse_click_time; static int mouse_action; static int old_buttons; int buttons; uint32_t wheels; uint32_t click_time; int action; pos_t pos; mouse_action = 0; pos = GetMousePos(POS_WINDOW); if(pos.val != old_pos.val) { mouse_action = 0x80000000; old_pos = pos; }; // printf("pos x%d y%d\n", pos.x, pos.y); buttons = GetMouseButtons(); wheels = get_mouse_wheels(); if( wheels & 0xFFFF) { wheels = (short)wheels>0 ? MSG_WHEELDOWN : MSG_WHEELUP; send_mouse_message(win, wheels); } if((action = (buttons ^ old_buttons))!=0) { mouse_action|= action<<3; mouse_action|= buttons & ~old_buttons; } old_buttons = buttons; if(mouse_action & 0x80000000) { DBG("mouse move \n\r"); send_mouse_message(win, MSG_MOUSEMOVE); }; if(mouse_action & 0x09) { if((mouse_action & 0x09)==0x09) { // printf("left button down x= %d y= %d\n\r", old_x.x, old_x.y); click_time = get_tick_count(); if(click_time < mouse_click_time+35) { mouse_click_time = click_time; send_mouse_message(win,MSG_LBTNDBLCLK); } else { mouse_click_time = click_time; send_mouse_message(win,MSG_LBTNDOWN); }; } else { // printf("left button up \n\r"); send_mouse_message(win,MSG_LBTNUP); } }; if(mouse_action & 0x12) { if((mouse_action & 0x12)==0x12) { DBG("right button down \n\r"); send_mouse_message(win,MSG_RBTNDOWN); } else { DBG("right button up \n\r"); send_mouse_message(win,MSG_RBTNUP); }; }; if(mouse_action & 0x24) { if((mouse_action & 0x24)==0x24) { DBG("middle button down \n\r"); send_mouse_message(win,MSG_MBTNDOWN); } else { DBG("middle button up \n\r"); send_mouse_message(win,MSG_MBTNUP); }; }; };