diff options
-rw-r--r-- | emulators/xcopilot/files/patch-sum | 5 | ||||
-rw-r--r-- | emulators/xcopilot/patches/patch-ag | 141 | ||||
-rw-r--r-- | emulators/xcopilot/patches/patch-ah | 24 | ||||
-rw-r--r-- | emulators/xcopilot/patches/patch-ai | 13 |
4 files changed, 182 insertions, 1 deletions
diff --git a/emulators/xcopilot/files/patch-sum b/emulators/xcopilot/files/patch-sum index 2a47d60304e..e803019d7e5 100644 --- a/emulators/xcopilot/files/patch-sum +++ b/emulators/xcopilot/files/patch-sum @@ -1,4 +1,4 @@ -$NetBSD: patch-sum,v 1.2 1999/09/13 21:31:51 tron Exp $ +$NetBSD: patch-sum,v 1.3 2001/02/12 14:09:24 wiz Exp $ MD5 (patch-aa) = f419ad19282caffee898640aa3341713 MD5 (patch-ab) = 718fe3320ec52f9fb32490e67371ad3f @@ -6,3 +6,6 @@ MD5 (patch-ac) = f4d07d2cb7b122a8cb7cd5c05f4656e4 MD5 (patch-ad) = 898429301619fddb9a1de6e67d60dc27 MD5 (patch-ae) = 322bcacb72e4c1effb2f3cef84030411 MD5 (patch-af) = a7c0fb11c987fa0444287771564b9a87 +MD5 (patch-ag) = f966bdd4ccffa7db05a5a3675281f02e +MD5 (patch-ah) = ceb99ba42e6af06ccb63b2fbb12bda6a +MD5 (patch-ai) = b2271b0d30e6be24fa67d2dfb30060da diff --git a/emulators/xcopilot/patches/patch-ag b/emulators/xcopilot/patches/patch-ag new file mode 100644 index 00000000000..ebf7ffeba1d --- /dev/null +++ b/emulators/xcopilot/patches/patch-ag @@ -0,0 +1,141 @@ +$NetBSD: patch-ag,v 1.1 2001/02/12 14:09:25 wiz Exp $ + +--- display.c.orig Tue Aug 25 15:56:02 1998 ++++ display.c Tue Feb 6 15:02:19 2001 +@@ -272,8 +272,13 @@ + } + + static int xcpHandleExpose(XEvent *event) { +- xcpPutImage(event->xexpose.x, event->xexpose.y, event->xexpose.width, +- event->xexpose.height); ++ if (shared->LcdPower == lcdOff) { ++ XClearWindow (xcpDisplay, xcpLCDWindow); ++ XFlush(xcpDisplay); ++ } ++ else ++ xcpPutImage(event->xexpose.x, event->xexpose.y, event->xexpose.width, ++ event->xexpose.height); + return event->xexpose.count; + } + +@@ -360,15 +365,26 @@ + typedef struct _Key { + const char *name; + XRectangle bounds; ++ KeySym key; + } Key; + +-static Key keys[] = {{"power", {0, 281, 16, 22}}, +- {"up", {100, 280, 25, 12}}, +- {"down", {100, 302, 25, 12}}, +- {"datebook", {24, 277, 28, 29}}, +- {"phone", {63, 277, 28, 29}}, +- {"todo", {134, 277, 28, 29}}, +- {"memo", {173, 277, 28, 29}}}; ++typedef struct _NonprintKey { ++ KeySym sym; ++ int code; ++} NonprintKey; ++ ++static Key keys[] = {{"power", {0, 281, 16, 22}, XK_Escape}, ++ {"up", {100, 280, 25, 12}, XK_Page_Up}, ++ {"down", {100, 302, 25, 12}, XK_Page_Down}, ++ {"datebook", {24, 277, 28, 29}, XK_F9}, ++ {"phone", {63, 277, 28, 29}, XK_F10}, ++ {"todo", {134, 277, 28, 29}, XK_F11}, ++ {"memo", {173, 277, 28, 29}, XK_F12}}; ++ ++static NonprintKey nonprint_keys[] = {{XK_Left, 0x1c /* chrLeftArrow */}, ++ {XK_Right, 0x1d /* chrRightArrow */}, ++ {XK_Down, 0x103 /* vchrNextField */}, ++ {XK_Up, 0x10c /* vchrPrevField */}}; + + static void HandleKey(Widget w, XtPointer client_data, XEvent *event, + Boolean *continue_to_dispatch) +@@ -502,7 +518,7 @@ + { + static KeySym keysym; + static XComposeStatus compose; +- int count, bufsize, in; ++ int count, bufsize, in, i, code; + char buffer[8]; + + bufsize = 8; +@@ -511,16 +527,55 @@ + bufsize, + &keysym, + &compose); ++ ++ for (i = 0; i < XtNumber(keys); i++) ++ if (keysym == keys[i].key) { ++ xcpKeyEvent(1, i); ++ return; ++ } ++ ++ if (count > 0) { ++ if (buffer[0] == '\r') ++ code = '\n'; ++ else ++ code = buffer[0]; ++ } ++ else { ++ for (i = 0; i < XtNumber(nonprint_keys); i++) ++ if (keysym == nonprint_keys[i].sym) { ++ count = 1; ++ code = nonprint_keys[i].code; ++ } ++ } ++ + if (count > 0) { +- if (buffer[0] == '\r') { +- buffer[0] = '\n'; +- } + in = shptr->kbin; +- shptr->kb[in] = buffer[0]; ++ shptr->kb[in] = code; + shptr->kbin = (in + 1) & 7; + } + } + ++static void xcpKBKey(XEvent *event) ++{ ++ static KeySym keysym; ++ static XComposeStatus compose; ++ int count, bufsize, in, i; ++ char buffer[8]; ++ ++ bufsize = 8; ++ count = XLookupString((XKeyEvent *) event, ++ buffer, ++ bufsize, ++ &keysym, ++ &compose); ++ ++ for (i = 0; i < XtNumber(keys); i++) ++ if (keysym == keys[i].key) { ++ xcpKeyEvent(0, i); ++ return; ++ } ++} ++ + static void HandleClientMessage(Widget w, XtPointer client_data, XEvent *event, + Boolean *continue_to_dispatch) + { +@@ -542,6 +597,8 @@ + case KeyPress: + xcpKBtoASCII(shptr, event); + break; ++ case KeyRelease: ++ xcpKBKey(event); + case ButtonPress: /* a mouse button was pressed */ + if (event->xbutton.button == 3) + do_menu(event->xbutton.x_root, event->xbutton.y_root); +@@ -623,7 +680,7 @@ + XtNborder, BlackPixel(xcpDisplay, xcpScreenNum), NULL); + + XtAddEventHandler(topWidget, ButtonPressMask | KeyPressMask | +- OwnerGrabButtonMask, False, HandleXEvents, ++ KeyReleaseMask | OwnerGrabButtonMask, False, HandleXEvents, + (XtPointer)shptr); + + /* diff --git a/emulators/xcopilot/patches/patch-ah b/emulators/xcopilot/patches/patch-ah new file mode 100644 index 00000000000..a9d33c0abb8 --- /dev/null +++ b/emulators/xcopilot/patches/patch-ah @@ -0,0 +1,24 @@ +$NetBSD: patch-ah,v 1.1 2001/02/12 14:09:25 wiz Exp $ + +--- xcopilot.1.orig Sun Feb 4 18:59:03 2001 ++++ xcopilot.1 Mon Feb 5 00:27:53 2001 +@@ -216,7 +216,18 @@ + it to tap the power button, any of the other buttons, or on the screen. + You can use it to write in graffiti in the appropriate area of the LCD. + Additionally, you can type, and what you type will be passed to +-XCopilot, making input easier. ++XCopilot, making input easier. The hardware buttons are also bound ++to the following keys: ++.Pp ++F9: Datebook ++.Pp ++F10: Address ++.Pp ++F11: Todo ++.Pp ++F12: Memopad ++.Pp ++ESC: Power + .Pp + \fBThe Right Mouse Menu\fP + .Pp diff --git a/emulators/xcopilot/patches/patch-ai b/emulators/xcopilot/patches/patch-ai new file mode 100644 index 00000000000..3796eee8d66 --- /dev/null +++ b/emulators/xcopilot/patches/patch-ai @@ -0,0 +1,13 @@ +$NetBSD: patch-ai,v 1.1 2001/02/12 14:09:25 wiz Exp $ + +--- mc68k/shared.h.orig Tue Feb 6 14:49:07 2001 ++++ mc68k/shared.h Tue Feb 6 14:49:32 2001 +@@ -95,7 +95,7 @@ + int pen, pendown, penx, peny; /* modified by lcd process */ + int key, keydown; /* modified by lcd process */ + int kbin, kbout; /* ring-buffer for X11 keyboard */ +- char kb[8]; /* ASCII data from X11 keyboard */ ++ int kb[8]; /* data from X11 keyboard (palm chr codes) */ + + /* + * X Output devices (display_proc) |