comparison src/events.h @ 5120:d1247f3cc363 ben-lisp-object

latest work on lisp-object workspace; more changes eliminating LCRECORD in place of LISP_OBJECT; now compiles and runs.
author Ben Wing <ben@xemacs.org>
date Mon, 28 Dec 2009 01:15:52 -0600
parents e0db3c197671
children b5df3737028a
comparison
equal deleted inserted replaced
5119:d877c14318b3 5120:d1247f3cc363
121 }; 121 };
122 122
123 struct Lisp_Key_Data 123 struct Lisp_Key_Data
124 { 124 {
125 #ifdef EVENT_DATA_AS_OBJECTS 125 #ifdef EVENT_DATA_AS_OBJECTS
126 struct lrecord_header lheader; 126 FROB_BLOCK_LISP_OBJECT_HEADER lheader;
127 #endif /* EVENT_DATA_AS_OBJECTS */ 127 #endif /* EVENT_DATA_AS_OBJECTS */
128 /* What keysym this is; a character or a symbol. */ 128 /* What keysym this is; a character or a symbol. */
129 Lisp_Object keysym; 129 Lisp_Object keysym;
130 /* Modifiers held down when key was pressed: control, meta, etc. 130 /* Modifiers held down when key was pressed: control, meta, etc.
131 Also includes buttons. For many keys, Shift is not a bit; that 131 Also includes buttons. For many keys, Shift is not a bit; that
217 SET_EVENT_KEY_ALT_KEYCHARS (XEVENT (e), n, val) 217 SET_EVENT_KEY_ALT_KEYCHARS (XEVENT (e), n, val)
218 218
219 struct Lisp_Button_Data 219 struct Lisp_Button_Data
220 { 220 {
221 #ifdef EVENT_DATA_AS_OBJECTS 221 #ifdef EVENT_DATA_AS_OBJECTS
222 struct lrecord_header lheader; 222 FROB_BLOCK_LISP_OBJECT_HEADER lheader;
223 #endif /* EVENT_DATA_AS_OBJECTS */ 223 #endif /* EVENT_DATA_AS_OBJECTS */
224 /* What button went down or up. */ 224 /* What button went down or up. */
225 int button; 225 int button;
226 /* Bucky-bits on that button: shift, control, meta, etc. Also 226 /* Bucky-bits on that button: shift, control, meta, etc. Also
227 includes other buttons (not the one pressed). */ 227 includes other buttons (not the one pressed). */
269 SET_EVENT_BUTTON_Y (XEVENT (e), val) 269 SET_EVENT_BUTTON_Y (XEVENT (e), val)
270 270
271 struct Lisp_Motion_Data 271 struct Lisp_Motion_Data
272 { 272 {
273 #ifdef EVENT_DATA_AS_OBJECTS 273 #ifdef EVENT_DATA_AS_OBJECTS
274 struct lrecord_header lheader; 274 FROB_BLOCK_LISP_OBJECT_HEADER lheader;
275 #endif /* EVENT_DATA_AS_OBJECTS */ 275 #endif /* EVENT_DATA_AS_OBJECTS */
276 /* Where it was after it moved (in pixels). */ 276 /* Where it was after it moved (in pixels). */
277 int x, y; 277 int x, y;
278 /* Bucky-bits down when the motion was detected. */ 278 /* Bucky-bits down when the motion was detected. */
279 int modifiers; 279 int modifiers;
311 SET_EVENT_MOTION_MODIFIERS (XEVENT (e), val) 311 SET_EVENT_MOTION_MODIFIERS (XEVENT (e), val)
312 312
313 struct Lisp_Process_Data 313 struct Lisp_Process_Data
314 { 314 {
315 #ifdef EVENT_DATA_AS_OBJECTS 315 #ifdef EVENT_DATA_AS_OBJECTS
316 struct lrecord_header lheader; 316 FROB_BLOCK_LISP_OBJECT_HEADER lheader;
317 #endif /* EVENT_DATA_AS_OBJECTS */ 317 #endif /* EVENT_DATA_AS_OBJECTS */
318 /* the XEmacs "process" object in question */ 318 /* the XEmacs "process" object in question */
319 Lisp_Object process; 319 Lisp_Object process;
320 }; 320 };
321 typedef struct Lisp_Process_Data Lisp_Process_Data; 321 typedef struct Lisp_Process_Data Lisp_Process_Data;
350 function An elisp function to call when this timeout is 350 function An elisp function to call when this timeout is
351 processed. 351 processed.
352 object The object passed to that function. 352 object The object passed to that function.
353 */ 353 */
354 #ifdef EVENT_DATA_AS_OBJECTS 354 #ifdef EVENT_DATA_AS_OBJECTS
355 struct lrecord_header lheader; 355 FROB_BLOCK_LISP_OBJECT_HEADER lheader;
356 #endif /* EVENT_DATA_AS_OBJECTS */ 356 #endif /* EVENT_DATA_AS_OBJECTS */
357 int interval_id; 357 int interval_id;
358 int id_number; 358 int id_number;
359 Lisp_Object function; 359 Lisp_Object function;
360 Lisp_Object object; 360 Lisp_Object object;
409 409
410 function An elisp function to call with this event object. 410 function An elisp function to call with this event object.
411 object Argument of function. 411 object Argument of function.
412 */ 412 */
413 #ifdef EVENT_DATA_AS_OBJECTS 413 #ifdef EVENT_DATA_AS_OBJECTS
414 struct lrecord_header lheader; 414 FROB_BLOCK_LISP_OBJECT_HEADER lheader;
415 #endif /* EVENT_DATA_AS_OBJECTS */ 415 #endif /* EVENT_DATA_AS_OBJECTS */
416 Lisp_Object function; 416 Lisp_Object function;
417 Lisp_Object object; 417 Lisp_Object object;
418 }; 418 };
419 typedef struct Lisp_Eval_Data Lisp_Eval_Data; 419 typedef struct Lisp_Eval_Data Lisp_Eval_Data;
462 The button, modifiers, x, and y parts are only used 462 The button, modifiers, x, and y parts are only used
463 by the XEmacs Drag'n'Drop system. Don't depend on their 463 by the XEmacs Drag'n'Drop system. Don't depend on their
464 values for other types of misc_user_events. 464 values for other types of misc_user_events.
465 */ 465 */
466 #ifdef EVENT_DATA_AS_OBJECTS 466 #ifdef EVENT_DATA_AS_OBJECTS
467 struct lrecord_header lheader; 467 FROB_BLOCK_LISP_OBJECT_HEADER lheader;
468 #endif /* EVENT_DATA_AS_OBJECTS */ 468 #endif /* EVENT_DATA_AS_OBJECTS */
469 Lisp_Object function; 469 Lisp_Object function;
470 Lisp_Object object; 470 Lisp_Object object;
471 int button; 471 int button;
472 int modifiers; 472 int modifiers;
539 will always be 0. 539 will always be 0.
540 object Argument of function. 540 object Argument of function.
541 541
542 */ 542 */
543 #ifdef EVENT_DATA_AS_OBJECTS 543 #ifdef EVENT_DATA_AS_OBJECTS
544 struct lrecord_header lheader; 544 FROB_BLOCK_LISP_OBJECT_HEADER lheader;
545 #endif /* EVENT_DATA_AS_OBJECTS */ 545 #endif /* EVENT_DATA_AS_OBJECTS */
546 void (*internal_function) (Lisp_Object); 546 void (*internal_function) (Lisp_Object);
547 Lisp_Object object; 547 Lisp_Object object;
548 }; 548 };
549 typedef struct Lisp_Magic_Eval_Data Lisp_Magic_Eval_Data; 549 typedef struct Lisp_Magic_Eval_Data Lisp_Magic_Eval_Data;
595 reasons why eval_events exist; I'm not entirely happy with this 595 reasons why eval_events exist; I'm not entirely happy with this
596 aspect of this event model. 596 aspect of this event model.
597 */ 597 */
598 598
599 #ifdef EVENT_DATA_AS_OBJECTS 599 #ifdef EVENT_DATA_AS_OBJECTS
600 struct lrecord_header lheader; 600 FROB_BLOCK_LISP_OBJECT_HEADER lheader;
601 #endif /* EVENT_DATA_AS_OBJECTS */ 601 #endif /* EVENT_DATA_AS_OBJECTS */
602 602
603 union { 603 union {
604 #ifdef HAVE_GTK 604 #ifdef HAVE_GTK
605 GdkEvent gdk_event; 605 GdkEvent gdk_event;
658 SET_EVENT_MAGIC_MSWINDOWS_EVENT (XEVENT (e), val) 658 SET_EVENT_MAGIC_MSWINDOWS_EVENT (XEVENT (e), val)
659 #endif 659 #endif
660 660
661 struct Lisp_Timeout 661 struct Lisp_Timeout
662 { 662 {
663 struct LCRECORD_HEADER header; 663 LISP_OBJECT_HEADER header;
664 int id; /* Id we use to identify the timeout over its lifetime */ 664 int id; /* Id we use to identify the timeout over its lifetime */
665 int interval_id; /* Id for this particular interval; this may 665 int interval_id; /* Id for this particular interval; this may
666 be different each time the timeout is 666 be different each time the timeout is
667 signalled.*/ 667 signalled.*/
668 Lisp_Object function, object; /* Function and object associated 668 Lisp_Object function, object; /* Function and object associated
688 - For dead events, this is the next dead one. 688 - For dead events, this is the next dead one.
689 - For events on the command_event_queue, the next one on the queue. 689 - For events on the command_event_queue, the next one on the queue.
690 - Likewise for events chained in the command builder. 690 - Likewise for events chained in the command builder.
691 - Otherwise it's Qnil. 691 - Otherwise it's Qnil.
692 */ 692 */
693 struct lrecord_header lheader; 693 FROB_BLOCK_LISP_OBJECT_HEADER lheader;
694 Lisp_Object next; 694 Lisp_Object next;
695 emacs_event_type event_type; 695 emacs_event_type event_type;
696 696
697 /* Where this event occurred on. This will be a frame, device, 697 /* Where this event occurred on. This will be a frame, device,
698 console, or nil, depending on the event type. It is important 698 console, or nil, depending on the event type. It is important
1135 builder; if the command builder is then complete (does not still represent 1135 builder; if the command builder is then complete (does not still represent
1136 a prefix key sequence) it executes the corresponding command. 1136 a prefix key sequence) it executes the corresponding command.
1137 */ 1137 */
1138 struct command_builder 1138 struct command_builder
1139 { 1139 {
1140 struct LCRECORD_HEADER header; 1140 LISP_OBJECT_HEADER header;
1141 Lisp_Object console; /* back pointer to the console this command 1141 Lisp_Object console; /* back pointer to the console this command
1142 builder is for */ 1142 builder is for */
1143 #if 0 1143 #if 0
1144 /* #### Not implemented: nil, or an event representing the first 1144 /* #### Not implemented: nil, or an event representing the first
1145 event read after the last command completed. Threaded. */ 1145 event read after the last command completed. Threaded. */