diff src/events.h @ 5118:e0db3c197671 ben-lisp-object

merge up to latest default branch, doesn't compile yet
author Ben Wing <ben@xemacs.org>
date Sat, 26 Dec 2009 21:18:49 -0600
parents 2fd201d73a92
children d1247f3cc363
line wrap: on
line diff
--- a/src/events.h	Sat Dec 26 00:20:27 2009 -0600
+++ b/src/events.h	Sat Dec 26 21:18:49 2009 -0600
@@ -186,7 +186,7 @@
 #define SET_KEY_DATA_MODIFIERS(d, m) ((d)->modifiers = m)
 
 #ifdef EVENT_DATA_AS_OBJECTS
-DECLARE_LRECORD (key_data, Lisp_Key_Data);
+DECLARE_LISP_OBJECT (key_data, Lisp_Key_Data);
 #define XKEY_DATA(x) XRECORD (x, key_data, Lisp_Key_Data)
 #define wrap_key_data(p) wrap_record (p, key_data)
 #define KEY_DATAP(x) RECORDP (x, key_data)
@@ -232,7 +232,7 @@
 typedef struct Lisp_Button_Data Lisp_Button_Data;
 
 #ifdef EVENT_DATA_AS_OBJECTS
-DECLARE_LRECORD (button_data, Lisp_Button_Data);
+DECLARE_LISP_OBJECT (button_data, Lisp_Button_Data);
 #define XBUTTON_DATA(x) XRECORD (x, button_data, Lisp_Button_Data)
 #define wrap_button_data(p) wrap_record (p, button_data)
 #define BUTTON_DATAP(x) RECORDP (x, button_data)
@@ -281,7 +281,7 @@
 typedef struct Lisp_Motion_Data Lisp_Motion_Data;
 
 #ifdef EVENT_DATA_AS_OBJECTS
-DECLARE_LRECORD (motion_data, Lisp_Motion_Data);
+DECLARE_LISP_OBJECT (motion_data, Lisp_Motion_Data);
 #define XMOTION_DATA(x) XRECORD (x, motion_data, Lisp_Motion_Data)
 #define wrap_motion_data(p) wrap_record (p, motion_data)
 #define MOTION_DATAP(x) RECORDP (x, motion_data)
@@ -321,7 +321,7 @@
 typedef struct Lisp_Process_Data Lisp_Process_Data;
 
 #ifdef EVENT_DATA_AS_OBJECTS
-DECLARE_LRECORD (process_data, Lisp_Process_Data);
+DECLARE_LISP_OBJECT (process_data, Lisp_Process_Data);
 #define XPROCESS_DATA(x) XRECORD (x, process_data, Lisp_Process_Data)
 #define wrap_process_data(p) wrap_record (p, process_data)
 #define PROCESS_DATAP(x) RECORDP (x, process_data)
@@ -362,7 +362,7 @@
 typedef struct Lisp_Timeout_Data Lisp_Timeout_Data;
 
 #ifdef EVENT_DATA_AS_OBJECTS
-DECLARE_LRECORD (timeout_data, Lisp_Timeout_Data);
+DECLARE_LISP_OBJECT (timeout_data, Lisp_Timeout_Data);
 #define XTIMEOUT_DATA(x) XRECORD (x, timeout_data, Lisp_Timeout_Data)
 #define wrap_timeout_data(p) wrap_record(p, timeout_data)
 #define TIMEOUT_DATAP(x) RECORDP (x, timeout_data)
@@ -419,7 +419,7 @@
 typedef struct Lisp_Eval_Data Lisp_Eval_Data;
 
 #ifdef EVENT_DATA_AS_OBJECTS
-DECLARE_LRECORD (eval_data, Lisp_Eval_Data);
+DECLARE_LISP_OBJECT (eval_data, Lisp_Eval_Data);
 #define XEVAL_DATA(x) XRECORD (x, eval_data, Lisp_Eval_Data)
 #define wrap_eval_data(p) wrap_record(p, eval_data)
 #define EVAL_DATAP(x) RECORDP (x, eval_data)
@@ -475,7 +475,7 @@
 typedef struct Lisp_Misc_User_Data Lisp_Misc_User_Data;
 
 #ifdef EVENT_DATA_AS_OBJECTS
-DECLARE_LRECORD (misc_user_data, Lisp_Misc_User_Data);
+DECLARE_LISP_OBJECT (misc_user_data, Lisp_Misc_User_Data);
 #define XMISC_USER_DATA(x) XRECORD (x, misc_user_data, Lisp_Misc_User_Data)
 #define wrap_misc_user_data(p) wrap_record(p, misc_user_data)
 #define MISC_USER_DATAP(x) RECORDP (x, misc_user_data)
@@ -549,7 +549,7 @@
 typedef struct Lisp_Magic_Eval_Data Lisp_Magic_Eval_Data;
 
 #ifdef EVENT_DATA_AS_OBJECTS
-DECLARE_LRECORD (magic_eval_data, Lisp_Magic_Eval_Data);
+DECLARE_LISP_OBJECT (magic_eval_data, Lisp_Magic_Eval_Data);
 #define XMAGIC_EVAL_DATA(x) XRECORD (x, magic_eval_data, Lisp_Magic_Eval_Data)
 #define wrap_magic_eval_data(p) wrap_record(p, magic_eval_data)
 #define MAGIC_EVAL_DATAP(x) RECORDP (x, magic_eval_data)
@@ -616,7 +616,7 @@
 typedef struct Lisp_Magic_Data Lisp_Magic_Data;
 
 #ifdef EVENT_DATA_AS_OBJECTS
-DECLARE_LRECORD (magic_data, Lisp_Magic_Data);
+DECLARE_LISP_OBJECT (magic_data, Lisp_Magic_Data);
 #define XMAGIC_DATA(x) XRECORD (x, magic_data, Lisp_Magic_Data)
 #define wrap_magic_data(p) wrap_record(p, magic_data)
 #define MAGIC_DATAP(x) RECORDP (x, magic_data)
@@ -675,7 +675,7 @@
 };
 typedef struct Lisp_Timeout Lisp_Timeout;
 
-DECLARE_LRECORD (timeout, Lisp_Timeout);
+DECLARE_LISP_OBJECT (timeout, Lisp_Timeout);
 #define XTIMEOUT(x) XRECORD (x, timeout, Lisp_Timeout)
 #define wrap_timeout(p) wrap_record (p, timeout)
 #define TIMEOUTP(x) RECORDP (x, timeout)
@@ -747,14 +747,14 @@
 #endif /* not EVENT_DATA_AS_OBJECTS */
 };
 
-DECLARE_LRECORD (event, Lisp_Event);
+DECLARE_LISP_OBJECT (event, Lisp_Event);
 #define XEVENT(x) XRECORD (x, event, Lisp_Event)
 #define wrap_event(p) wrap_record (p, event)
 #define EVENTP(x) RECORDP (x, event)
 #define CHECK_EVENT(x) CHECK_RECORD (x, event)
 #define CONCHECK_EVENT(x) CONCHECK_RECORD (x, event)
 
-DECLARE_LRECORD (command_builder, struct command_builder);
+DECLARE_LISP_OBJECT (command_builder, struct command_builder);
 
 #define EVENT_CHANNEL(a) ((a)->channel)
 #define XEVENT_CHANNEL(ev) (XEVENT (ev)->channel)
@@ -921,7 +921,28 @@
 #define XEMACS_MOD_BUTTON3      (1<<8)
 #define XEMACS_MOD_BUTTON4      (1<<9)
 #define XEMACS_MOD_BUTTON5      (1<<10)
-
+#define XEMACS_MOD_BUTTON6      (1<<11)
+#define XEMACS_MOD_BUTTON7      (1<<12)
+#define XEMACS_MOD_BUTTON8      (1<<13)
+#define XEMACS_MOD_BUTTON9      (1<<14)
+#define XEMACS_MOD_BUTTON10     (1<<15)
+#define XEMACS_MOD_BUTTON11     (1<<16)
+#define XEMACS_MOD_BUTTON12     (1<<17)
+#define XEMACS_MOD_BUTTON13     (1<<18)
+#define XEMACS_MOD_BUTTON14     (1<<19)
+#define XEMACS_MOD_BUTTON15     (1<<20)
+#define XEMACS_MOD_BUTTON16     (1<<21)
+#define XEMACS_MOD_BUTTON17     (1<<22)
+#define XEMACS_MOD_BUTTON18     (1<<23)
+#define XEMACS_MOD_BUTTON19     (1<<24)
+#define XEMACS_MOD_BUTTON20     (1<<25)
+#define XEMACS_MOD_BUTTON21     (1<<26)
+#define XEMACS_MOD_BUTTON22     (1<<27)
+#define XEMACS_MOD_BUTTON23     (1<<28)
+#define XEMACS_MOD_BUTTON24     (1<<29)
+#define XEMACS_MOD_BUTTON25     (1<<30)
+#define XEMACS_MOD_BUTTON26     (1<<31)
+   
 /* Note: under X Windows, XEMACS_MOD_ALT is generated by the Alt key
    if there are both Alt and Meta keys.  If there are no Meta keys,
    then Alt generates XEMACS_MOD_META instead.
@@ -930,13 +951,20 @@
 /* Maybe this should be trickier */
 #define KEYSYM(x) (intern (x))
 
+typedef enum character_to_event_meta_behavior
+{
+  high_bit_is_meta,
+  use_console_meta_flag,
+  latin_1_maps_to_itself
+} character_to_event_meta_behavior;
+
 /* from events.c */
 void format_event_object (Eistring *buf, Lisp_Object event, int brief);
 /*void format_event_data_object (Eistring *buf, Lisp_Object data, int brief);*/
-void character_to_event (Ichar c, Lisp_Event *event,
-                         struct console *con,
-                         int use_console_meta_flag,
+void character_to_event (Ichar, Lisp_Event *, struct console *,
+                         character_to_event_meta_behavior meta_flag,
                          int do_backspace_mapping);
+
 void zero_event (Lisp_Event *e);
 
 #define MECR_DEALLOCATE_EVENT 1