Lines Matching +full:two +full:- +full:wire
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
3 "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"[
7 <!-- lifted from troff+ms+XMan by doclifter -->
15 <affiliation><orgname>Hewlett-Packard</orgname></affiliation>
20 <holder>Hewlett-Packard Company</holder>
29 Hewlett-Packard makes no representations about the suitability for any purpose of the information i…
30 …nt. It is provided "as is" without express or implied warranty. This document is only a draft stan-
57 <!-- .LP -->
59 device- and implementation-independent, and should require no changes.
66 for the device-dependent part of X are that the input devices be
68 generated. Device-dependent X is responsible for reading input data from
72 <!-- .LP -->
77 implementation-dependent. It is also up to each implementation to decide
85 <!-- .LP -->
86 Input extension events generated by the X server use the same 32-byte xEvent
87 wire event as do core input events. However, additional information must be
97 <!-- .LP -->
99 X input devices. Device-Independent X provides functions that can be
110 <!-- .LP -->
112 Device-Independent X | Device-Dependent X
113 -------------------- | -------------------
115 InitInput --------------> | - do device-specific initialization
117 | - call AddInputDevice (deviceProc,AutoStart)
119 - creates DeviceIntRec |
120 - records deviceProc |
121 - adds new device to |
123 sets dev->startup=AutoStart|
124 | - call one of:
125 | - RegisterPointerDevice (X pointer)
126 | - processInputProc = ProcessPointerEvents
127 | - RegisterKeyboardDevice (X keyboard)
128 | - processInputProc = ProcessKeyboardEvents
129 | - RegisterOtherDevice (extension device)
130 | - processInputProc = ProcessOtherEvents
133 InitAndStartDevices -----> | - calls deviceProc with parameters
135 sets dev->inited = return |
138 | - in deviceProc, do one of:
139 | - call InitPointerDeviceStruct (X pointer)
140 | - call InitKeyboardDeviceStruct (X keybd)
141 | - init extension device by calling some of:
142 | - InitKeyClassDeviceStruct
143 | - InitButtonClassDeviceStruct
144 | - InitValuatorClassDeviceStruct
145 | - InitValuatorAxisStruct
146 | - InitFocusClassDeviceStruct
147 | - InitProximityClassDeviceStruct
148 | - InitKbdFeedbackClassDeviceStruct
149 | - InitPtrFeedbackClassDeviceStruct
150 | - InitLedFeedbackClassDeviceStruct
151 | - InitStringFeedbackClassDeviceStruct
152 | - InitIntegerFeedbackClassDeviceStruct
153 | - InitBellFeedbackClassDeviceStruct
154 | - init device name and type by:
155 | - calling MakeAtom with one of the
157 | - calling AssignTypeAndName
163 calls EnableDevice if | - EnableDevice calls deviceProc with
164 dev->startup & | (DEVICE_ON, AutoStart)
165 dev->inited |
167 If deviceProc returns | - core devices are now enabled, extension
178 <!-- .LP -->
181 device- and implementation- specific initialization, and for calling
188 <!-- .LP -->
194 <!-- .LP -->
199 <!-- .LP -->
205 <!-- .LP -->
209 <!-- .LP -->
221 * in some implementation-dependent manner.
249 dev->devicePrivate = (pointer) &localdevs[i];
257 <!-- .LP -->
273 <!-- .LP -->
278 <!-- .LP -->
284 LocalDevice *localdev = (LocalDevice *) dev->devicePrivate;
289 if (strcmp(localdev->name, XI_TABLET) == 0)
293 * reports two axes of motion, and can be focused.
299 InitValuatorClassDeviceStruct (dev, localdev->n_axes,);
301 for (i=0; i<localdev->n_axes; i++)
308 else if (strcmp(localdev->name, XI_BUTTONBOX) == 0)
318 else if (strcmp(localdev->name, XI_KNOBBOX) == 0)
325 InitValuatorClassDeviceStruct (dev, localdev->n_axes,);
327 for (i=0; i<localdev->n_axes; i++)
332 localdev->atom =
333 MakeAtom(localdev->name, strlen(localdev->name), FALSE);
334 AssignTypeAndName (dev, localdev->atom, localdev->name);
337 AddEnabledDevice (localdev->file_ds);
338 dev->on = TRUE;
341 dev->on = FALSE;
342 RemoveEnabledDevice (localdev->file_ds);
351 <!-- .LP -->
358 <!-- .LP -->
366 <!-- .LP -->
383 <!-- .LP -->
386 <!-- .RS -->
387 <!-- .in +5n -->
392 KeyClass - the device has keys.
397 ButtonClass - the device has buttons.
402 ValuatorClass - the device reports motion data or positional data.
407 Proximitylass - the device reports proximity information.
412 FocusClass - the device can be focused.
417 FeedbackClass - the device supports some kind of feedback.
418 <!-- .in -5n -->
419 <!-- .RE -->
424 <!-- .LP -->
438 <!-- .LP -->
447 <!-- .LP -->
457 <!-- .LP -->
466 <!-- .LP -->
474 <!-- .LP -->
484 <!-- .LP -->
493 <!-- .LP -->
502 <!-- .LP -->
514 <!-- .LP -->
523 <!-- .LP -->
530 <!-- .LP -->
548 <!-- .LP -->
557 <!-- .LP -->
569 <!-- .LP -->
573 is left implementation-dependent.
579 <!-- .LP -->
594 <!-- .LP -->
599 <!-- .LP -->
623 <!-- .LP -->
637 <!-- .LP -->
646 <!-- .LP -->
660 <!-- .LP -->
668 <!-- .LP -->
686 <!-- .LP -->
708 <!-- .LP -->
729 <!-- .LP -->
741 <!-- .LP -->
754 <!-- .LP -->
763 <!-- .LP -->
771 <!-- .LP -->
780 <title>Implementation-Dependent Routines</title>
782 <!-- .LP -->
784 implementation-dependent entry points. Default routines
793 <!-- .LP -->
805 <!-- .LP -->
819 dev->public.devicePrivate = local_dev[i];
821 dev->inited = ((*dev->deviceProc)(dev, DEVICE_INIT) == Success);
828 <!-- .LP -->
837 <!-- .LP -->
846 <!-- .LP -->
853 <!-- .LP -->
861 <!-- .LP -->
868 <!-- .LP -->
876 <!-- .LP -->
883 <!-- .LP -->
893 <!-- .LP -->
900 <!-- .LP -->
909 <!-- .LP -->
919 <!-- .LP -->
926 <!-- .LP -->
932 <!-- .LP -->
935 the X cursor in the X- and Y- directions. If the axes are different
939 <!-- .LP -->
945 <!-- .LP -->
952 <!-- .LP -->
960 <!-- .LP -->
967 <!-- .LP -->
973 <!-- .LP -->
979 <!-- .LP -->
987 <!-- .LP -->
999 <!-- .LP -->
1006 <!-- .LP -->
1008 be contained in the 32-byte xEvent data structure. To send this information
1009 to clients, DDX must generate two or more 32-byte wire events. The following
1015 <!-- .LP -->
1020 <!-- .LP -->
1021 <!-- .RS -->
1022 <!-- .in +5n -->
1027 deviceid - the identifier of the device that generated the event.
1032 device_state - the state of any modifiers on the device that generated the event.
1037 num_valuators - the number of valuators reported in this event.
1042 first_valuator - the first valuator reported in this event.
1047 valuator0 through valuator5 - the values of the valuators.
1048 <!-- .in -5n -->
1049 <!-- .RE -->
1054 <!-- .LP -->
1055 In order to pass this information to the input extension library, two 32-byte
1056 wire events must be generated by DDX. The first has an event type of
1060 <!-- .LP -->
1061 The following code fragment shows how the two wire events could be initialized:
1064 <!-- .LP -->
1075 xev->type = DeviceKeyPress; /* defined by input extension */
1076 xev->detail = keycode; /* key pressed on this device */
1077 xev->time = timestamp; /* same as for core events */
1078 xev->rootX = pointerx; /* x location of core pointer */
1079 xev->rootY = pointery; /* y location of core pointer */
1085 /* event, and also indicates whether more than one 32-byte wire */
1090 xev->deviceid = dev->id | MORE_EVENTS; /* sending more than 1 */
1093 /* Fields in the second 32-byte wire event: */
1097 xv->type = DeviceValuator; /* event type of second event */
1098 xv->deviceid = dev->id; /* id of this device */
1099 xv->num_valuators = 0; /* no valuators being sent */
1100 xv->device_state = 0; /* will be filled in by DIX */
1107 <!-- .LP -->
1116 <!-- .LP -->
1119 two wire events are required to contain this information.
1120 The following code fragment shows how the two wire events could be initialized:
1123 <!-- .LP -->
1134 xev->type = DeviceMotionNotify; /* defined by input extension */
1135 xev->detail = keycode; /* key pressed on this device */
1136 xev->time = timestamp; /* same as for core events */
1137 xev->rootX = pointerx; /* x location of core pointer */
1138 xev->rootY = pointery; /* y location of core pointer */
1144 /* event, and also indicates whether more than one 32-byte wire */
1149 xev->deviceid = dev->id | MORE_EVENTS; /* sending more than 1 */
1152 /* Fields in the second 32-byte wire event: */
1156 xv->type = DeviceValuator; /* event type of second event */
1157 xv->deviceid = dev->id; /* id of this device */
1158 xv->num_valuators = 2; /* 2 valuators being sent */
1159 xv->first_valuator = 0; /* first valuator being sent */
1160 xv->device_state = 0; /* will be filled in by DIX */
1161 xv->valuator0 = x; /* first axis of this device */
1162 xv->valuator1 = y; /* second axis of this device */
1166 <!-- .LP -->
1176 <!-- .LP -->
1186 <!-- .LP -->
1190 <!-- .bp -->
1191 <!-- .\" .TC -->