]> Pileus Git - ~andy/gtk/blobdiff - gdk/gdkevents.h
Change FSF Address
[~andy/gtk] / gdk / gdkevents.h
index 97e3f3f70715fd3d7e9249c4c53957b0a85058e2..048537ee871b120c46d23cfb279d4164eb18f6e6 100644 (file)
@@ -12,9 +12,7 @@
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  */
 
 /*
@@ -31,6 +29,7 @@
 #ifndef __GDK_EVENTS_H__
 #define __GDK_EVENTS_H__
 
+#include <gdk/gdkversionmacros.h>
 #include <gdk/gdkcolor.h>
 #include <gdk/gdktypes.h>
 #include <gdk/gdkdnd.h>
@@ -74,6 +73,56 @@ G_BEGIN_DECLS
  */
 #define GDK_PRIORITY_REDRAW     (G_PRIORITY_HIGH_IDLE + 20)
 
+/**
+ * GDK_EVENT_PROPAGATE:
+ *
+ * Use this macro as the return value for continuing the propagation of
+ * an event handler.
+ *
+ * Since: 3.4
+ */
+#define GDK_EVENT_PROPAGATE     (FALSE)
+
+/**
+ * GDK_EVENT_STOP:
+ *
+ * Use this macro as the return value for stopping the propagation of
+ * an event handler.
+ *
+ * Since: 3.4
+ */
+#define GDK_EVENT_STOP          (TRUE)
+
+/**
+ * GDK_BUTTON_PRIMARY:
+ *
+ * The primary button. This is typically the left mouse button, or the
+ * right button in a left-handed setup.
+ *
+ * Since: 3.4
+ */
+#define GDK_BUTTON_PRIMARY      (1)
+
+/**
+ * GDK_BUTTON_MIDDLE:
+ *
+ * The middle button.
+ *
+ * Since: 3.4
+ */
+#define GDK_BUTTON_MIDDLE       (2)
+
+/**
+ * GDK_BUTTON_SECONDARY:
+ *
+ * The secondary button. This is typically the right mouse button, or the
+ * left button in a left-handed setup.
+ *
+ * Since: 3.4
+ */
+#define GDK_BUTTON_SECONDARY    (3)
+
+
 
 typedef struct _GdkEventAny        GdkEventAny;
 typedef struct _GdkEventExpose     GdkEventExpose;
@@ -371,6 +420,7 @@ typedef enum
  *   decorations.
  * @GDK_WINDOW_STATE_ABOVE: the window is kept above other windows.
  * @GDK_WINDOW_STATE_BELOW: the window is kept below other windows.
+ * @GDK_WINDOW_STATE_FOCUSED: the window is presented as focused (with active decorations).
  *
  * Specifies the state of a toplevel window.
  */
@@ -382,7 +432,8 @@ typedef enum
   GDK_WINDOW_STATE_STICKY     = 1 << 3,
   GDK_WINDOW_STATE_FULLSCREEN = 1 << 4,
   GDK_WINDOW_STATE_ABOVE      = 1 << 5,
-  GDK_WINDOW_STATE_BELOW      = 1 << 6
+  GDK_WINDOW_STATE_BELOW      = 1 << 6,
+  GDK_WINDOW_STATE_FOCUSED    = 1 << 7
 } GdkWindowState;
 
 /**
@@ -798,7 +849,7 @@ struct _GdkEventProperty
  * @target: the target to which the selection should be converted.
  * @property: the property in which to place the result of the conversion.
  * @time: the time of the event in milliseconds.
- * @requestor: the native window on which to place @property.
+ * @requestor: the window on which to place @property or %NULL if none.
  *
  * Generated when a selection is requested or ownership of a selection
  * is taken over by another client application.
@@ -812,7 +863,7 @@ struct _GdkEventSelection
   GdkAtom target;
   GdkAtom property;
   guint32 time;
-  GdkNativeWindow requestor;
+  GdkWindow *requestor;
 };
 
 /**
@@ -1054,9 +1105,24 @@ gboolean  gdk_event_get_state           (const GdkEvent  *event,
 gboolean  gdk_event_get_coords         (const GdkEvent  *event,
                                         gdouble         *x_win,
                                         gdouble         *y_win);
-gboolean  gdk_event_get_root_coords    (const GdkEvent  *event,
-                                        gdouble         *x_root,
-                                        gdouble         *y_root);
+gboolean  gdk_event_get_root_coords    (const GdkEvent *event,
+                                        gdouble        *x_root,
+                                        gdouble        *y_root);
+GDK_AVAILABLE_IN_3_2
+gboolean  gdk_event_get_button          (const GdkEvent *event,
+                                         guint          *button);
+GDK_AVAILABLE_IN_3_2
+gboolean  gdk_event_get_click_count     (const GdkEvent *event,
+                                         guint          *click_count);
+GDK_AVAILABLE_IN_3_2
+gboolean  gdk_event_get_keyval          (const GdkEvent *event,
+                                         guint          *keyval);
+GDK_AVAILABLE_IN_3_2
+gboolean  gdk_event_get_keycode         (const GdkEvent *event,
+                                         guint16        *keycode);
+GDK_AVAILABLE_IN_3_2
+gboolean gdk_event_get_scroll_direction (const GdkEvent *event,
+                                         GdkScrollDirection *direction);
 gboolean  gdk_event_get_axis            (const GdkEvent  *event,
                                          GdkAxisUse       axis_use,
                                          gdouble         *value);
@@ -1066,7 +1132,9 @@ GdkDevice* gdk_event_get_device         (const GdkEvent  *event);
 void       gdk_event_set_source_device  (GdkEvent        *event,
                                          GdkDevice       *device);
 GdkDevice* gdk_event_get_source_device  (const GdkEvent  *event);
-void      gdk_event_request_motions     (const GdkEventMotion *event);
+void       gdk_event_request_motions    (const GdkEventMotion *event);
+GDK_AVAILABLE_IN_3_4
+gboolean   gdk_event_triggers_context_menu (const GdkEvent *event);
 
 gboolean  gdk_events_get_distance       (GdkEvent        *event1,
                                          GdkEvent        *event2,