Changeset 5349 for trunk/Ohana/src/kii/picture/cursor.c
- Timestamp:
- Oct 15, 2005, 2:41:53 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/kii/picture/cursor.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/kii/picture/cursor.c
r3464 r5349 10 10 int status; 11 11 XComposeStatus composestatus; 12 char string[10], line[ 500];12 char string[10], line[40], *name; 13 13 double x, y; 14 14 … … 35 35 if (LastEvent (display, MotionNotify, &event)) UpdatePointer (graphic, layout, (XMotionEvent *) &event); 36 36 if (LastEvent (display, ButtonPress, &event)) InterpretPresses (graphic, layout, (XButtonEvent *) &event); 37 38 37 if (LastEvent (display, KeyPress, &event)) { 39 38 status = XLookupString ((XKeyEvent *) &event, string, 9, &keysym, &composestatus); 40 39 41 if (!status) continue;42 40 if (event.xkey.x < layout[0].picture.x) continue; 43 41 if (event.xkey.x > layout[0].picture.x + layout[0].picture.dx) continue; … … 46 44 47 45 Screen_to_Image (&x, &y, (double)event.xkey.x, (double)event.xkey.y, layout); 46 name = XKeysymToString (keysym); 48 47 49 if (isprint(string[0])) 50 sprintf (line, "%c %6.1f %6.1f ", string[0], x, y); 51 else { 52 sprintf (line, "X %6.1f %6.1f ", x, y); 53 } 54 write (layout[0].Ximage, line, 16); 48 // skip the following keys: 49 if (!strcmp (name, "Shift_L")) continue; 50 if (!strcmp (name, "Shift_R")) continue; 51 if (!strcmp (name, "Control_L")) continue; 52 if (!strcmp (name, "Control_R")) continue; 53 if (!strcmp (name, "Alt_L")) continue; 54 if (!strcmp (name, "Alt_R")) continue; 55 if (!strcmp (name, "Super_L")) continue; 56 if (!strcmp (name, "Super_R")) continue; 57 if (!strcmp (name, "Caps_Lock")) continue; 58 if (!strcmp (name, "Pause")) continue; 59 if (!strcmp (name, "Continue")) continue; 60 if (!strcmp (name, "Num_Lock")) continue; 61 if (!strcmp (name, "Scroll_Lock")) continue; 62 if (!strcmp (name, "Print")) continue; 63 if (!strcmp (name, "(null)")) continue; 64 65 snprintf (line, 40, "%12s %12.6f %12.6f ", name, x, y); 66 write (layout[0].Ximage, line, 40); 55 67 } 56 68 }
Note:
See TracChangeset
for help on using the changeset viewer.
