Mercurial > hg > xemacs-beta
comparison src/events.h @ 185:3d6bfa290dbd r20-3b19
Import from CVS: tag r20-3b19
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:55:28 +0200 |
parents | 6075d714658b |
children | acd284d43ca1 |
comparison
equal
deleted
inserted
replaced
184:bcd2674570bf | 185:3d6bfa290dbd |
---|---|
39 If it is desired to have XEmacs able to open frames on the displays of | 39 If it is desired to have XEmacs able to open frames on the displays of |
40 multiple heterogeneous machines, X11 and SunView, or X11 and NeXT, for | 40 multiple heterogeneous machines, X11 and SunView, or X11 and NeXT, for |
41 example, then it will be necessary to construct an event_stream structure | 41 example, then it will be necessary to construct an event_stream structure |
42 that can cope with the given types. Currently, the only implemented | 42 that can cope with the given types. Currently, the only implemented |
43 event_streams are for dumb-ttys, and for X11 plus dumb-ttys. | 43 event_streams are for dumb-ttys, and for X11 plus dumb-ttys. |
44 | 44 |
45 To implement this for one window system is relatively simple. | 45 To implement this for one window system is relatively simple. |
46 To implement this for multiple window systems is trickier and may | 46 To implement this for multiple window systems is trickier and may |
47 not be possible in all situations, but it's been done for X and TTY. | 47 not be possible in all situations, but it's been done for X and TTY. |
48 | 48 |
49 Note that these callbacks are *NOT* console methods; that's because | 49 Note that these callbacks are *NOT* console methods; that's because |
50 the routines are not specific to a particular console type but must | 50 the routines are not specific to a particular console type but must |
65 read. If called with an argument of 0, then this | 65 read. If called with an argument of 0, then this |
66 should say whether calling the next_event_cb will | 66 should say whether calling the next_event_cb will |
67 block. If called with an argument of 1, then this | 67 block. If called with an argument of 1, then this |
68 should say whether there are user-generated events | 68 should say whether there are user-generated events |
69 pending (that is, keypresses or mouse-clicks). This | 69 pending (that is, keypresses or mouse-clicks). This |
70 is used for redisplay optimization, among other | 70 is used for redisplay optimization, among other |
71 things. On dumb ttys, these two results are the | 71 things. On dumb ttys, these two results are the |
72 same, but under a window system, they are not. | 72 same, but under a window system, they are not. |
73 | 73 |
74 If this function is not sure whether there are events | 74 If this function is not sure whether there are events |
75 to be read, it *must* return 0. Otherwise various | 75 to be read, it *must* return 0. Otherwise various |
76 undesirable effects will occur, such as redisplay | 76 undesirable effects will occur, such as redisplay |
92 identifies this wakeup. If an implementation | 92 identifies this wakeup. If an implementation |
93 doesn't have microseconds or millisecond | 93 doesn't have microseconds or millisecond |
94 granularity, it should round up to the closest | 94 granularity, it should round up to the closest |
95 value it can deal with. | 95 value it can deal with. |
96 | 96 |
97 remove_timeout_cb Called with an int, the id number of a wakeup to | 97 remove_timeout_cb Called with an int, the id number of a wakeup to |
98 discard. This id number must have been returned by | 98 discard. This id number must have been returned by |
99 the add_timeout_cb. If the given wakeup has | 99 the add_timeout_cb. If the given wakeup has |
100 already expired, this should do nothing. | 100 already expired, this should do nothing. |
101 | 101 |
102 select_process_cb These callbacks tell the underlying implementation to | 102 select_process_cb These callbacks tell the underlying implementation to |
104 which are polled for inferior-process input. When | 104 which are polled for inferior-process input. When |
105 input becomes available on the given process | 105 input becomes available on the given process |
106 connection, an event of type "process" should be | 106 connection, an event of type "process" should be |
107 generated. | 107 generated. |
108 | 108 |
109 select_console_cb These callbacks tell the underlying implementation | 109 select_console_cb These callbacks tell the underlying implementation |
110 unselect_console_cb to add or remove a console from the list of consoles | 110 unselect_console_cb to add or remove a console from the list of consoles |
111 which are polled for user-input. | 111 which are polled for user-input. |
112 | 112 |
113 select_device_cb These callbacks are used by Unixoid event loops | 113 select_device_cb These callbacks are used by Unixoid event loops |
114 unselect_device_cb (those that use select() and file descriptors and | 114 unselect_device_cb (those that use select() and file descriptors and |
160 will be a window. | 160 will be a window. |
161 -- for menubar misc-user events, channel | 161 -- for menubar misc-user events, channel |
162 will be a frame. | 162 will be a frame. |
163 -- for magic events, channel will be a frame | 163 -- for magic events, channel will be a frame |
164 (usually) or a device. | 164 (usually) or a device. |
165 | 165 |
166 timestamp When this event occurred -- if not known, this | 166 timestamp When this event occurred -- if not known, this |
167 is made up. | 167 is made up. |
168 | 168 |
169 In addition, the following structures are specific to particular event | 169 In addition, the following structures are specific to particular event |
170 types: | 170 types: |
171 | 171 |
172 key_press_event | 172 key_press_event |
173 key What keysym this is; an integer or a symbol. | 173 key What keysym this is; an integer or a symbol. |
174 If this is an integer, it will be in the printing | 174 If this is an integer, it will be in the printing |
175 ASCII range: >32 and <127. | 175 ASCII range: >32 and <127. |
176 modifiers Bucky-bits on that key: control, meta, etc. | 176 modifiers Bucky-bits on that key: control, meta, etc. |
177 For many keys, Shift is not a bit; that is implicit | 177 For many keys, Shift is not a bit; that is implicit |
237 that XEmacs itself doesn't care about, but which it | 237 that XEmacs itself doesn't care about, but which it |
238 must do something with for proper interaction with | 238 must do something with for proper interaction with |
239 the window system. | 239 the window system. |
240 | 240 |
241 Magic_events are handled somewhat asynchronously, just | 241 Magic_events are handled somewhat asynchronously, just |
242 like subprocess filters. However, occasionally a | 242 like subprocess filters. However, occasionally a |
243 magic_event needs to be handled synchronously; in that | 243 magic_event needs to be handled synchronously; in that |
244 case, the asynchronous handling of the magic_event will | 244 case, the asynchronous handling of the magic_event will |
245 push an eval_event back onto the queue, which will be | 245 push an eval_event back onto the queue, which will be |
246 handled synchronously later. This is one of the | 246 handled synchronously later. This is one of the |
247 reasons why eval_events exist; I'm not entirely happy | 247 reasons why eval_events exist; I'm not entirely happy |
248 with this aspect of this event model. | 248 with this aspect of this event model. |
249 | 249 |
250 magic_eval_event | 250 magic_eval_event |