16 of their state. </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody> |
16 of their state. </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody> |
17 <p> <b>Variant</b>: <xref href="GUID-D93978BE-11A3-5CE3-B110-1DEAA5AD566C.dita">ScreenPlay</xref>. <b>Target |
17 <p> <b>Variant</b>: <xref href="GUID-D93978BE-11A3-5CE3-B110-1DEAA5AD566C.dita">ScreenPlay</xref>. <b>Target |
18 audience</b>: Application developers. </p> |
18 audience</b>: Application developers. </p> |
19 <p>This topic builds on the <xref href="GUID-9C269F45-F160-5A4B-ABF8-896D2A538E3B.dita">Advanced |
19 <p>This topic builds on the <xref href="GUID-9C269F45-F160-5A4B-ABF8-896D2A538E3B.dita">Advanced |
20 Pointer Overview</xref>. </p> |
20 Pointer Overview</xref>. </p> |
21 <section><title>Communication between an input driver and the Window Server</title> <p>Figure |
21 <section id="GUID-4B7318D7-29AB-4DE4-B37A-2AFAE055982E"><title>Communication |
22 1 below shows how an input driver communicates changes in pointer state to |
22 between an input driver and the Window Server</title> <p>The following diagram |
23 the Window Server. The diagram shows the logical pointer states and how <xref href="GUID-668CEA36-3933-3BBE-A980-CAB62617B4FD.dita"><apiname>TRawEvent</apiname></xref> types |
23 shows how an input driver communicates changes in pointer state to the Window |
|
24 Server. The diagram shows the logical pointer states and how <xref href="GUID-668CEA36-3933-3BBE-A980-CAB62617B4FD.dita"><apiname>TRawEvent</apiname></xref> types |
24 change those states. From the driver's perspective, the pointer can be in |
25 change those states. From the driver's perspective, the pointer can be in |
25 one of three basic logical states: <i>Up</i>, <i>Down</i> or <i>OutOfRange</i>. </p> <p>The |
26 one of three basic logical states: <i>Up</i>, <i>Down</i> or <i>OutOfRange</i>. </p> <p>The |
26 driver sends a number of types of event to move the pointer between these |
27 driver sends a number of types of event to move the pointer between these |
27 states. For example, <xref href="GUID-0FD31DF6-3EA2-3EB3-8940-05F187B98B86.dita"><apiname>EButton1Up</apiname></xref> is an <i>Up</i> event that |
28 states. For example, <xref href="GUID-0FD31DF6-3EA2-3EB3-8940-05F187B98B86.dita"><apiname>EButton1Up</apiname></xref> is an <i>Up</i> event that |
28 changes the pointer from the <i>Down</i> to the <i>Up</i> state. <xref href="GUID-2786B13B-B95C-3D15-B7D2-205E99A64FBC.dita"><apiname>EButton1Down</apiname></xref> is |
29 changes the pointer from the <i>Down</i> to the <i>Up</i> state. <xref href="GUID-2786B13B-B95C-3D15-B7D2-205E99A64FBC.dita"><apiname>EButton1Down</apiname></xref> is |
32 A platform UI is free to implement buttons in any way. However, the Window |
33 A platform UI is free to implement buttons in any way. However, the Window |
33 Server interprets only Button1 as an <b>action</b> and does not interpret |
34 Server interprets only Button1 as an <b>action</b> and does not interpret |
34 the other buttons. </p> <fig id="GUID-2664573F-C5E8-573F-9427-783074351585"> |
35 the other buttons. </p> <fig id="GUID-2664573F-C5E8-573F-9427-783074351585"> |
35 <title> Driver communicates pointer state changes to the Window Server |
36 <title> Driver communicates pointer state changes to the Window Server |
36 </title> |
37 </title> |
37 <image href="GUID-35521A99-3F1F-5EE1-8078-FFD8A298C0BD_d0e215295_href.png" placement="inline"/> |
38 <image href="GUID-35521A99-3F1F-5EE1-8078-FFD8A298C0BD_d0e242805_href.png" placement="inline"/> |
38 </fig> <p>For a complete list of pointer states, the events that can be sent |
39 </fig> <p>For a complete list of pointer states, the events that can be sent |
39 by the driver, and the associated events that the Window Server sends to the |
40 by the driver, and the associated events that the Window Server sends to the |
40 client, see the <xref href="GUID-9AD75103-CD56-5279-B639-5CA2BBF979B5.dita#GUID-9AD75103-CD56-5279-B639-5CA2BBF979B5/GUID-EC2B9C82-D678-5DFE-89A8-8CFCF5376244">Pointer |
41 client, see the <xref href="GUID-9AD75103-CD56-5279-B639-5CA2BBF979B5.dita#GUID-9AD75103-CD56-5279-B639-5CA2BBF979B5/GUID-EC2B9C82-D678-5DFE-89A8-8CFCF5376244">Pointer |
41 states and event communication</xref> table below. </p> </section> |
42 states and event communication</xref> table below. </p> </section> |
42 <section id="GUID-3698CDAC-A904-5C44-BFD1-669D9673D02B"><title> Pointer states</title> <p>Pointing |
43 <section id="GUID-3698CDAC-A904-5C44-BFD1-669D9673D02B"><title> Pointer states</title> <p>Pointing |
62 <entry><p>Detected by sensors, coordinates available, performing an action |
63 <entry><p>Detected by sensors, coordinates available, performing an action |
63 (as defined above). </p> </entry> |
64 (as defined above). </p> </entry> |
64 </row> |
65 </row> |
65 </tbody> |
66 </tbody> |
66 </tgroup> |
67 </tgroup> |
67 </table> <p>Figure 2 shows the extension of the <i>Up</i> and <i>Down</i> states |
68 </table> <p>The following diagram shows the extension of the <i>Up</i> and <i>Down</i> states |
68 with additional substates. <i>Up</i> is extended with substates describing |
69 with additional substates. <i>Up</i> is extended with substates describing |
69 the <b>closeness</b> of the pointer to the screen. <i>Down</i> is extended |
70 the <b>closeness</b> of the pointer to the screen. <i>Down</i> is extended |
70 with substates describing <b>pressing</b>. </p> <fig id="GUID-54DA3BEC-A650-5223-8E46-5B68F414A909"> |
71 with substates describing <b>pressing</b>. </p> <fig id="GUID-54DA3BEC-A650-5223-8E46-5B68F414A909"> |
71 <title> Extension of Up and Down states with substates </title> |
72 <title> Extension of Up and Down states with substates </title> |
72 <image href="GUID-4E1D4E5D-7CE6-5A93-9170-BEF2937FC953_d0e215409_href.png" placement="inline"/> |
73 <image href="GUID-4E1D4E5D-7CE6-5A93-9170-BEF2937FC953_d0e242919_href.png" placement="inline"/> |
73 </fig> <p>The Window Server generates the following events for changes of |
74 </fig> <p>The Window Server generates the following events for changes of |
74 closeness and pressing: </p> <ul> |
75 closeness and pressing: </p> <ul> |
75 <li id="GUID-72265325-882B-5B38-ABE7-EFDF05758B97"><p> <codeph>EExitCloseProximity</codeph> </p> </li> |
76 <li id="GUID-72265325-882B-5B38-ABE7-EFDF05758B97"><p> <codeph>EExitCloseProximity</codeph> </p> </li> |
76 <li id="GUID-D22BF039-8D17-53A4-83C1-3390EBDFBE46"><p> <codeph>EEnterCloseProximity</codeph> </p> </li> |
77 <li id="GUID-D22BF039-8D17-53A4-83C1-3390EBDFBE46"><p> <codeph>EEnterCloseProximity</codeph> </p> </li> |
77 <li id="GUID-5968A499-B87B-54D2-9926-EF446ED1BCCD"><p> <codeph>EExitHighPressure</codeph> </p> </li> |
78 <li id="GUID-5968A499-B87B-54D2-9926-EF446ED1BCCD"><p> <codeph>EExitHighPressure</codeph> </p> </li> |
271 </table> <p>The driver is prohibited from sending <codeph>EPointer3DOutOfRange</codeph> when |
272 </table> <p>The driver is prohibited from sending <codeph>EPointer3DOutOfRange</codeph> when |
272 the pointer is in the Down state. Therefore this is not included in this table. |
273 the pointer is in the Down state. Therefore this is not included in this table. |
273 Because <codeph>TRawEvent</codeph>'s <codeph>EPointer3DOutOfRange</codeph> events |
274 Because <codeph>TRawEvent</codeph>'s <codeph>EPointer3DOutOfRange</codeph> events |
274 do not have coordinates, the Window Server makes sure the event is delivered |
275 do not have coordinates, the Window Server makes sure the event is delivered |
275 to the place where the previous event for the same pointer occurred. It does |
276 to the place where the previous event for the same pointer occurred. It does |
276 this by maintaining the last state of the pointer. </p> <p>Figure 3 shows |
277 this by maintaining the last state of the pointer. </p> <p>The following diagram |
277 the events sent from the Window Server to the client while the pointer traverses |
278 shows the events sent from the Window Server to the client while |
278 the full cycle of events—from OutOfRange, through Down/InHighPressure and |
279 the pointer traverses the full cycle of events—from OutOfRange, through Down/InHighPressure |
279 back to OutOfRange. This diagram does not show all of the possible state transitions |
280 and back to OutOfRange. This diagram does not show all of the possible state |
280 that are described in the table above. </p> <fig id="GUID-C39B447C-0908-5F9A-95EC-2F97E56E2C20"> |
281 transitions that are described in the table above. </p> <fig id="GUID-C39B447C-0908-5F9A-95EC-2F97E56E2C20"> |
281 <title> Events sent from Window Server to client while the pointer traverses |
282 <title> Events sent from Window Server to client while the pointer traverses |
282 the full cycle of states. </title> |
283 the full cycle of states. </title> |
283 <image href="GUID-8F4C626F-3490-50BC-A97F-FD1972FFF65B_d0e216360_href.png" placement="inline"/> |
284 <image href="GUID-8F4C626F-3490-50BC-A97F-FD1972FFF65B_d0e243872_href.png" placement="inline"/> |
284 </fig> </section> |
285 </fig> </section> |
285 </conbody><related-links> |
286 </conbody><related-links> |
286 <link href="GUID-9C269F45-F160-5A4B-ABF8-896D2A538E3B.dita"><linktext>Advanced |
287 <link href="GUID-9C269F45-F160-5A4B-ABF8-896D2A538E3B.dita"><linktext>Advanced |
287 Pointer Overview</linktext></link> |
288 Pointer Overview</linktext></link> |
288 <link href="GUID-C60DC070-572B-5960-B394-550426FDB909.dita"><linktext>Advanced |
289 <link href="GUID-C60DC070-572B-5960-B394-550426FDB909.dita"><linktext>Advanced |