]> git.sesse.net Git - rdpsrv/blob - Xserver/programs/Xserver/Xext/xtest1.frags
Support RDP5 logon packets.
[rdpsrv] / Xserver / programs / Xserver / Xext / xtest1.frags
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.
4
5 This code fragment should go in your ddx InitInput() routine:
6
7 #ifdef XTESTEXT1
8 extern KeyCode xtest_command_key;
9 #endif
10
11 #ifdef XTESTEXT1
12     xtest_command_key = <whatever-is-a-good-keycode-for-your-keyboard>;
13 #endif
14
15 This code fragment should go at the front of the file that handles
16 keyboards:
17
18 #ifdef XTESTEXT1
19 /*
20  * defined in xtestext1di.c
21  */
22 extern int      on_steal_input;
23 extern Bool     XTestStealKeyData();
24 #endif XTESTEXT1
25
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:
30
31 #ifdef XTESTEXT1
32         if (!on_steal_input ||
33             XTestStealKeyData(code, direction, dev_type, x, y))
34 #endif /* XTESTEXT1 */
35         handle_device_event(...);
36
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:
39
40 #ifdef XTESTEXT1
41         if (on_steal_input)
42             XTestStealMotionData(dx, dy, dev, x, y);
43 #endif XTESTEXT1
44
45
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
48 something to happen:
49
50 #ifdef  XTESTEXT1
51 extern int      playback_on;
52 void XTestComputeWaitTime();
53 #endif  XTESTEXT1
54
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:
58
59 #ifdef XTESTEXT1
60             if (playback_on)
61                     XTestComputeWaitTime(wt = &waittime);
62 #endif XTESTEXT1
63             ... code to do select ...
64             WakeupHandler(i, LastSelectMask);
65 #ifdef XTESTEXT1
66             if (playback_on)
67                     i = XTestProcessInputAction(i, &waittime);
68 #endif XTESTEXT1
69
70
71 You also need to implement the following routines (documentation
72 is needed; for now, see server/ddx/hp/hp/x_hil.c):
73
74 void
75 XTestGenerateEvent(dev_type, keycode, keystate, mousex, mousey)
76         int     dev_type;
77         int     keycode;
78         int     keystate;
79         int     mousex;
80         int     mousey;
81
82 void
83 XTestGetPointerPos(fmousex, fmousey)
84         short *fmousex, *fmousey;
85
86 void
87 XTestJumpPointer(jx, jy, dev_type)
88         int     jx;
89         int     jy;
90         int     dev_type;