comparison src/events.h @ 2:ac2d302a0011 r19-15b2

Import from CVS: tag r19-15b2
author cvs
date Mon, 13 Aug 2007 08:46:35 +0200
parents 376386a54a3c
children 4be1180a9e89
comparison
equal deleted inserted replaced
1:c0c6a60d29db 2:ac2d302a0011
25 #ifndef _XEMACS_EVENTS_H_ 25 #ifndef _XEMACS_EVENTS_H_
26 #define _XEMACS_EVENTS_H_ 26 #define _XEMACS_EVENTS_H_
27 27
28 #include "systime.h" 28 #include "systime.h"
29 29
30 /* There is one object, called an event_stream. This object contains 30 /* There is one object called an event_stream. This object contains
31 callback functions for doing the window-system dependent operations that 31 callback functions for doing the window-system-dependent operations
32 XEmacs requires. 32 that XEmacs requires.
33 33
34 If XEmacs is compiled with support for X11 and the X Toolkit, then this 34 If XEmacs is compiled with support for X11 and the X Toolkit, then this
35 event_stream structure will contain functions that can cope with input 35 event_stream structure will contain functions that can cope with input
36 on XEmacs windows on multiple displays, as well as input from dumb tty 36 on XEmacs windows on multiple displays, as well as input from dumb tty
37 frames. 37 frames.
38 38
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
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
51 be able to simultaneously cope with all allowable console types. 51 be able to simultaneously cope with all allowable console types.
52 52
53 The slots of the event_stream structure: 53 The slots of the event_stream structure:
54 54
55 next_event_cb A function which fills in an XEmacs_event struture 55 next_event_cb A function which fills in an XEmacs_event structure
56 with the next event available. If there is no event 56 with the next event available. If there is no event
57 available, then this should block. 57 available, then this should block.
58 58
59 IMPORTANT: timer events and especially process 59 IMPORTANT: timer events and especially process
60 events *must not* be returned if there are 60 events *must not* be returned if there are
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 most keys, Shift is not a bit; that is implicit 177 For many keys, Shift is not a bit; that is implicit
178 in the keyboard layout. 178 in the keyboard layout.
179 179
180 button_press_event 180 button_press_event
181 button_release_event 181 button_release_event
182 button What button went down or up. 182 button What button went down or up.
460 Lisp_Object event_chain_find_previous (Lisp_Object event_chain, 460 Lisp_Object event_chain_find_previous (Lisp_Object event_chain,
461 Lisp_Object event); 461 Lisp_Object event);
462 Lisp_Object event_chain_nth (Lisp_Object event_chain, int n); 462 Lisp_Object event_chain_nth (Lisp_Object event_chain, int n);
463 Lisp_Object copy_event_chain (Lisp_Object event_chain); 463 Lisp_Object copy_event_chain (Lisp_Object event_chain);
464 464
465 /* True is this is a non-internal event 465 /* True if this is a non-internal event
466 (keyboard press, menu, scrollbar, mouse button) */ 466 (keyboard press, menu, scrollbar, mouse button) */
467 int command_event_p (Lisp_Object event); 467 int command_event_p (Lisp_Object event);
468 468
469 struct console *event_console_or_selected (Lisp_Object event); 469 struct console *event_console_or_selected (Lisp_Object event);
470 470
471 int event_stream_event_pending_p (int user); 471 int event_stream_event_pending_p (int user);
472 void event_stream_next_event (struct Lisp_Event *event); 472 void event_stream_next_event (struct Lisp_Event *event);
473 void event_stream_handle_magic_event (struct Lisp_Event *event); 473 void event_stream_handle_magic_event (struct Lisp_Event *event);
474 void event_stream_select_console (struct console *c); 474 void event_stream_select_console (struct console *c);
475 void event_stream_unselect_console (struct console *c); 475 void event_stream_unselect_console (struct console *c);
476 void event_stream_select_process (struct Lisp_Process *proc); 476 void event_stream_select_process (struct Lisp_Process *proc);
477 void event_stream_unselect_process (struct Lisp_Process *proc); 477 void event_stream_unselect_process (struct Lisp_Process *proc);
478 void event_stream_quit_p (void); 478 void event_stream_quit_p (void);
479 479
480 struct low_level_timeout 480 struct low_level_timeout
481 { 481 {
521 void signal_fake_event (void); 521 void signal_fake_event (void);
522 void drain_signal_event_pipe (void); 522 void drain_signal_event_pipe (void);
523 523
524 extern int fake_event_occurred; 524 extern int fake_event_occurred;
525 525
526 int event_stream_unixoid_select_console (struct console *con); 526 int event_stream_unixoid_select_console (struct console *con);
527 int event_stream_unixoid_unselect_console (struct console *con); 527 int event_stream_unixoid_unselect_console (struct console *con);
528 int event_stream_unixoid_select_process (struct Lisp_Process *proc); 528 int event_stream_unixoid_select_process (struct Lisp_Process *proc);
529 int event_stream_unixoid_unselect_process (struct Lisp_Process *proc); 529 int event_stream_unixoid_unselect_process (struct Lisp_Process *proc);
530 int read_event_from_tty_or_stream_desc (struct Lisp_Event *event, 530 int read_event_from_tty_or_stream_desc (struct Lisp_Event *event,
531 struct console *c, int fd); 531 struct console *c, int fd);
532 #endif /* HAVE_UNIXOID_EVENT_LOOP */ 532 #endif /* HAVE_UNIXOID_EVENT_LOOP */
533 533