3 <title>DispatchEvent - ANDROMEDA X-windows Encapsulation</title>
7 <h1>xapplication::DispatchEvent</h1>
10 DispatchEvent - Dispatch an X event to the receiving window
13 int xapplication::DispatchEvent(XEvent ev)
17 This is the central control function in every X windows application.
18 It is called by <code>main</code> to handle all events from the X
20 After the application is initialized, <code>main</code> just sits in a
21 loop where it reads an event from the workstation and passes the
22 event to <em>DispatchEvent</em>.
26 <em>DispatchEvent</em> searches the list of all windows that
27 are used by the application to find the <code>window</code> object
28 which should receive the event.
29 The appropriate event-handling function of the target window is then
30 called to handle the event.
31 The table below lists events defined in X windows, the mask needed to
32 solicit the event and the handler function which is called when the
36 <tr><th>Event Name<th>Event nr<th>Mask<th>Handler
37 <tr><td> KeyPress <td>2 <td>KeyPressMask<td>
38 <a href="window_ev_keypress.html">EV_KeyPress</a>
39 <tr><td> KeyRelease <td>3 <td>KeyReleaseMask<td>
40 <a href="window_ev_keyrelease.html">EV_KeyRelease</a>
41 <tr><td> ButtonPress <td>4 <td>ButtonPressMask<td>
42 <a href="window_ev_buttonpress.html">EV_ButtonPress</a>
43 <tr><td> ButtonRelease <td>5 <td>ButtonReleaseMask<td>
44 <a href="window_ev_buttonrelease.html">EV_ButtonRelease</a>
45 <tr><td> MotionNotify <td>6 <td>PointerMotionMask<br>
47 Button[1-5]MotionMask<td>
48 <tr><td> EnterNotify <td>7 <td>EnterWindowMask<td>
49 <a href="window_ev_enternotify.html">EV_EnterNotify</a>
50 <tr><td> LeaveNotify <td>8 <td>LeaveWindowMask<td>
51 <a href="window_ev_leavenotify.html">EV_LeaveNotify</a>
52 <tr><td> FocusIn <td>9 <td>FocusChangeMask<td>
53 <tr><td> FocusOut <td>10 <td>FocusChangeMask<td>
54 <tr><td> KeymapNotify <td>11 <td>KeymapStateMask<td>
55 <tr><td> Expose <td>12 <td>ExposureMask<td>
56 <a href="window_ev_expose.html">EV_Expose</a>
57 <tr><td> GraphicsExpose <td>13
58 <tr><td> NoExpose <td>14
59 <tr><td> VisibilityNotify <td>15 <td>VisibilityChangeMask<td>
60 <tr><td> CreateNotify <td>16
61 <tr><td> DestroyNotify <td>17 <td>StructureNotifyMask<td>
62 <tr><td> UnmapNotify <td>18 <td>StructureNotifyMask<td>
63 <tr><td> MapNotify <td>19 <td>StructureNotifyMask<td>
64 <tr><td> MapRequest <td>20
65 <tr><td> ReparentNotify <td>21 <td>StructureNotifyMask<td>
66 <tr><td> ConfigureNotify <td>22 <td>StructureNotifyMask<td>
67 <a href="window_ev_configurenotify.html">EV_ConfigureNotify</a>
68 <tr><td> ConfigureRequest <td>23
69 <tr><td> GravityNotify <td>24 <td>StructureNotifyMask<td>
70 <tr><td> ResizeRequest <td>25
71 <tr><td> CirculateNotify <td>26 <td>StructureNotifyMask<td>
72 <tr><td> CirculateRequest <td>27
73 <tr><td> PropertyNotify <td>28 <td>PropertyChangeMask<td>
74 <tr><td> SelectionClear <td>29
75 <tr><td> SelectionRequest <td>30
76 <tr><td> SelectionNotify <td>31
77 <tr><td> ColormapNotify <td>32 <td>ColormapChangeMask<td>
78 <tr><td> ClientMessage <td>33
79 <tr><td> MappingNotify <td>34
84 <a href="window_selectinput.html">window::SelectInput</a>