diff src/events.h @ 282:c42ec1d1cded r21-0b39

Import from CVS: tag r21-0b39
author cvs
date Mon, 13 Aug 2007 10:33:18 +0200
parents c5d627a313b1
children 558f606b08ae
line wrap: on
line diff
--- a/src/events.h	Mon Aug 13 10:32:23 2007 +0200
+++ b/src/events.h	Mon Aug 13 10:33:18 2007 +0200
@@ -227,13 +227,19 @@
     function		An elisp function to call with this event object.
     internal_function	Ignored.
     object		Anything.
+    button		What button went down or up.
+    modifiers		Bucky-bits on that button: shift, control, meta, etc.
+    x, y		Where it was at the button-state-change (in pixels).
 			This is similar to an eval_event, except that it is
 			generated by user actions: selections in the
-			menubar or scrollbar actions.  It is a "command"
-			event, like key and mouse presses (and unlike mouse
-			motion, process output, and enter and leave window
-			hooks).  In many ways, eval_events are not the same
-			as keypresses or misc_user_events.
+			menubar, scrollbar actions, or drag and drop actions.
+			It is a "command" event, like key and mouse presses
+			(and unlike mouse motion, process output, and enter
+			and leave window hooks).  In many ways, eval_events
+			are not the same as keypresses or misc_user_events.
+			The button, modifiers, x, and y parts are only used
+			by the XEmacs Drag'n'Drop system. Don't depend on their
+			values for other types of misc_user_events.
 
  magic_event
 			No user-serviceable parts within.  This is for things
@@ -259,18 +265,7 @@
 			a magic_event; the Lisp programmer need not know
 			anything more.
 
-#if defined(HAVE_OFFIX_DND) || defined(HAVE_MS_WINDOWS)
- dnd_drop_event
- dnd_drag_event (* to be implemented *)
-    button		What button went down or up.
-    modifiers		Bucky-bits on that button: shift, control, meta, etc.
-    x, y		Where it was at the button-state-change (in pixels).
-    data                A list of type and data.
-                        This events are created by Drag'n'Drop actions.
-			Currently only the OffiX Dnd Protocol is supported.
- #endif
-
- */
+*/
 
 /*
   Stream pairs description
@@ -342,11 +337,15 @@
   USID (*create_stream_pair_cb) (void* /* inhandle*/, void* /*outhandle*/ ,
 				 Lisp_Object* /* instream */,
 				 Lisp_Object* /* outstream */,
-				 int /* pty_flag */);
+				 int /* flags */);
   USID (*delete_stream_pair_cb) (Lisp_Object /* instream */,
 				 Lisp_Object /* outstream */);
 };
 
+/* Flags for create_stream_pair_cb() FLAGS parameter */
+#define STREAM_PTY_FLUSHING		0x0001
+#define STREAM_NETWORK_CONNECTION	0x0002
+
 extern struct event_stream *event_stream;
 
 typedef enum emacs_event_type
@@ -362,9 +361,6 @@
   magic_eval_event,
   eval_event,
   misc_user_event,
-#if defined(HAVE_OFFIX_DND) || defined(HAVE_MS_WINDOWS)
-  dnd_drop_event,
-#endif
   dead_event
 } emacs_event_type;
 
@@ -409,22 +405,21 @@
   Lisp_Object	    object;
 };
 
+struct misc_user_data
+{
+  Lisp_Object       function;
+  Lisp_Object	    object;
+  int               button;
+  unsigned char     modifiers;
+  int               x, y;
+};
+
 struct magic_eval_data
 {
   void		    (*internal_function) (Lisp_Object);
   Lisp_Object	    object;
 };
 
-#if defined(HAVE_OFFIX_DND) || defined(HAVE_MS_WINDOWS)
-struct dnd_drop_data
-{
-  int               button;
-  unsigned char     modifiers;
-  int               x, y;
-  Lisp_Object       data;
-};
-#endif
-
 #if defined (HAVE_X_WINDOWS) && defined(emacs)
 # include <X11/Xlib.h>
 #endif
@@ -462,12 +457,10 @@
       struct motion_data	motion;
       struct process_data	process;
       struct timeout_data	timeout;
-      struct eval_data		eval;	/* misc_user_event uses this too */
+      struct eval_data		eval;	/* misc_user_event no loger uses this */
+      struct misc_user_data	misc;	/* because it needs position information */
       union magic_data		magic;
       struct magic_eval_data	magic_eval;
-#if defined(HAVE_OFFIX_DND) || defined(HAVE_MS_WINDOWS)
-      struct dnd_drop_data      dnd_drop;
-#endif
     } event;
 };
 
@@ -595,6 +588,10 @@
 int event_stream_add_async_timeout (EMACS_TIME thyme);
 void event_stream_remove_async_timeout (int id);
 
+/* from event-stream.c -- focus sanity */
+extern int focus_follows_mouse;
+void investigate_frame_change (void);
+
 void emacs_handle_focus_change_preliminary (Lisp_Object frame_inp_and_dev);
 void emacs_handle_focus_change_final (Lisp_Object frame_inp_and_dev);