1 There are several code fragments that need to be placed in the device
2 dependent part of the server. These are described below. These code
3 fragments are device and implementation dependent.
5 This code fragment should go in your ddx InitInput() routine:
8 extern KeyCode xtest_command_key;
12 xtest_command_key = <whatever-is-a-good-keycode-for-your-keyboard>;
15 This code fragment should go at the front of the file that handles
20 * defined in xtestext1di.c
22 extern int on_steal_input;
23 extern Bool XTestStealKeyData();
26 This code fragment should go in the function that parses input from the
27 keyboard or pointer after you know what input action has occurred, but before
28 you have told the server about it. If conditionalizes the actual function
29 call to pass the information on:
32 if (!on_steal_input ||
33 XTestStealKeyData(code, direction, dev_type, x, y))
34 #endif /* XTESTEXT1 */
35 handle_device_event(...);
37 This code fragment should go in the function that handles mouse motion after
38 you have figured out how much the mouse has moved:
42 XTestStealMotionData(dx, dy, dev, x, y);
46 This code fragment should go at the front of the os-specific code where
47 you wait (by doing a select on the socket in our implementation) for
51 extern int playback_on;
52 void XTestComputeWaitTime();
55 These code fragments should go in the os-specific code on both sides of
56 where you wait (by doing a select on the socket in our implementation)
57 for something to happen:
61 XTestComputeWaitTime(wt = &waittime);
63 ... code to do select ...
64 WakeupHandler(i, LastSelectMask);
67 i = XTestProcessInputAction(i, &waittime);
71 You also need to implement the following routines (documentation
72 is needed; for now, see server/ddx/hp/hp/x_hil.c):
75 XTestGenerateEvent(dev_type, keycode, keystate, mousex, mousey)
83 XTestGetPointerPos(fmousex, fmousey)
84 short *fmousex, *fmousey;
87 XTestJumpPointer(jx, jy, dev_type)