Changeset 830ac99 in mainline
- Timestamp:
- 2006-06-15T19:53:38Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 096ba7a
- Parents:
- 7a0c530
- Files:
-
- 1 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
console/console.c
r7a0c530 r830ac99 299 299 /* TODO: Handle hangup */ 300 300 return; 301 case KBD_MS_MOVE: 302 gcons_mouse_move(IPC_GET_ARG1(call), IPC_GET_ARG2(call)); 303 break; 301 304 case KBD_PUSHCHAR: 302 305 /* got key from keyboard driver */ -
console/gcons.c
r7a0c530 r830ac99 231 231 } 232 232 233 234 static inline int limit(int a,int left, int right) 235 { 236 if (a < left) 237 a = left; 238 if (a >= right) 239 a = right - 1; 240 return a; 241 } 242 243 void gcons_mouse_move(int dx, int dy) 244 { 245 static int x = 0; 246 static int y = 0; 247 248 x = limit(x+dx, 0, xres); 249 y = limit(y+dy, 0, yres); 250 251 async_msg_2(fbphone, FB_POINTER_MOVE, x, y); 252 } 253 254 233 255 /** Draw a PPM pixmap to framebuffer 234 256 * -
console/gcons.h
r7a0c530 r830ac99 42 42 void gcons_notify_connect(int consnum); 43 43 void gcons_notify_disconnect(int consnum); 44 void gcons_mouse_move(int dx, int dy); 44 45 45 46 #endif -
fb/fb.c
r7a0c530 r830ac99 1125 1125 ipc_answer_fast(callid, 0, screen.xres,screen.yres); 1126 1126 continue; 1127 case FB_POINTER_MOVE: 1128 putpixel(&viewports[0], IPC_GET_ARG1(call), IPC_GET_ARG2(call), 1129 0xd0a080); 1130 break; 1127 1131 default: 1128 1132 retval = ENOENT; -
kbd/Makefile
r7a0c530 r830ac99 49 49 arch/$(ARCH)/src/kbd.c 50 50 51 ifeq ($(ARCH), ia32) 52 ARCH_SOURCES += arch/$(ARCH)/src/mouse.c 53 CFLAGS += -DMOUSE_ENABLED 54 endif 55 ifeq ($(ARCH), amd64) 56 ARCH_SOURCES += arch/$(ARCH)/src/mouse.c 57 CFLAGS += -DMOUSE_ENABLED 58 endif 59 60 61 51 62 GENERIC_OBJECTS := $(addsuffix .o,$(basename $(GENERIC_SOURCES))) 52 63 ARCH_OBJECTS := $(addsuffix .o,$(basename $(ARCH_SOURCES))) -
kbd/arch/ia32/src/kbd.c
r7a0c530 r830ac99 450 450 int status = IPC_GET_ARG1(*call); 451 451 452 if ((status & i8042_MOUSE_DATA)) { 453 ; 454 } else { 455 int scan_code = IPC_GET_ARG2(*call); 456 457 if (scan_code != IGNORE_CODE) { 458 if (scan_code & KEY_RELEASE) 459 key_released(keybuffer, scan_code ^ KEY_RELEASE); 460 else 461 key_pressed(keybuffer, scan_code); 462 } 452 if ((status & i8042_MOUSE_DATA)) 453 return 0; 454 455 int scan_code = IPC_GET_ARG2(*call); 456 457 if (scan_code != IGNORE_CODE) { 458 if (scan_code & KEY_RELEASE) 459 key_released(keybuffer, scan_code ^ KEY_RELEASE); 460 else 461 key_pressed(keybuffer, scan_code); 463 462 } 464 463 return 1; -
kbd/generic/kbd.c
r7a0c530 r830ac99 65 65 int chr; 66 66 67 #ifdef MOUSE_ENABLED 68 if (mouse_arch_process(phone2cons, call)) 69 return; 70 #endif 71 72 kbd_arch_process(&keybuffer, call); 73 67 74 if (cons_connected && phone2cons != -1) { 68 75 /* recode to ASCII - one interrupt can produce more than one code so result is stored in fifo */ 69 kbd_arch_process(&keybuffer, call);70 71 76 while (!keybuffer_empty(&keybuffer)) { 72 77 if (!keybuffer_pop(&keybuffer, (int *)&chr)) -
kbd/include/kbd.h
r7a0c530 r830ac99 38 38 #define __KBD_H__ 39 39 40 #include <key_buffer.h> 40 41 41 42 int kbd_arch_process(keybuffer_t *keybuffer, ipc_call_t *call); 43 int mouse_arch_process(int phoneid, ipc_call_t *call); 42 44 43 45 #endif -
kbd/include/keys.h
r7a0c530 r830ac99 38 38 #define _KBD_KEYS_H_ 39 39 40 #define KBD_PUSHCHAR 1024 40 #define KBD_PUSHCHAR 1024 41 #define KBD_MS_LEFT 1025 42 #define KBD_MS_RIGHT 1026 43 #define KBD_MS_MIDDLE 1027 44 #define KBD_MS_MOVE 1028 41 45 42 46 #define KBD_KEY_F1 0x3b -
libc/include/ipc/fb.h
r7a0c530 r830ac99 71 71 #define FB_ANIM_STOP 1205 72 72 73 #define FB_POINTER_MOVE 1300 74 73 75 #endif 74 76
Note:
See TracChangeset
for help on using the changeset viewer.