summaryrefslogtreecommitdiff
path: root/gdk/gdkevents.h
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2005-06-25 07:10:40 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2005-06-25 07:10:40 +0000
commit9b356ea0d8ee1992ad9b3559aadad0c4e2b56f2c (patch)
tree2b22564953b69dff46505860a4918ac10c467e3b /gdk/gdkevents.h
parenteffe3785cf61084d9f7e9427cea0999bb4a32473 (diff)
downloadgdk-pixbuf-9b356ea0d8ee1992ad9b3559aadad0c4e2b56f2c.tar.gz
Add a GrabBroken event to GDK, and a grab-broken-event signal to
2005-06-25 Matthias Clasen <mclasen@redhat.com> Add a GrabBroken event to GDK, and a grab-broken-event signal to GtkWidget. (#107320, Simon Cooke, initial patch by John Ehresman) * gdk/gdkevents.h: Add a GDK_GRAB_BROKEN event type, define a GdkEventGrabBroken event struct. * gdk/win32/gdkevents-win32.c (gdk_event_translate): Generate GrabBroken events in response to WM_KILLFOCUS. * gdk/x11/gdkmain-x11.c: Generate GrabBroken events when a grab is broken by the window becoming unviewable, or by another grab from the same client. * gtk/gtkwidget.h (GtkWidgetClass): Add grab_broken_event. * gtk/gtkwidget.c (gtk_widget_event_internal): Translate GrabBroken events into grab_broken_event signals. * gtk/gtkmain.c (gtk_main_do_event): Propagate GrabBroken events. * gtk/gtkmenushell.c (gtk_menu_shell_grab_broken): Deactivate the menu when the grab is broken. * gtk/gtkcolorsel.c (gtk_color_selection_grab_broken): Stop the color picker if the grab is broken. * gtk/gtkpaned.c (gtk_paned_grab_broken): Stop the drag if the grab is broken.
Diffstat (limited to 'gdk/gdkevents.h')
-rw-r--r--gdk/gdkevents.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/gdk/gdkevents.h b/gdk/gdkevents.h
index 32873091d..797bee746 100644
--- a/gdk/gdkevents.h
+++ b/gdk/gdkevents.h
@@ -33,6 +33,7 @@ typedef struct _GdkEventClient GdkEventClient;
typedef struct _GdkEventDND GdkEventDND;
typedef struct _GdkEventWindowState GdkEventWindowState;
typedef struct _GdkEventSetting GdkEventSetting;
+typedef struct _GdkEventGrabBroken GdkEventGrabBroken;
typedef union _GdkEvent GdkEvent;
@@ -118,7 +119,8 @@ typedef enum
GDK_SCROLL = 31,
GDK_WINDOW_STATE = 32,
GDK_SETTING = 33,
- GDK_OWNER_CHANGE = 34
+ GDK_OWNER_CHANGE = 34,
+ GDK_GRAB_BROKEN = 35
} GdkEventType;
/* Event masks. (Used to select what types of events a window
@@ -429,6 +431,13 @@ struct _GdkEventWindowState
GdkWindowState new_window_state;
};
+struct _GdkEventGrabBroken {
+ GdkEventType type;
+ GdkWindow *window;
+ gint8 send_event;
+ gboolean keyboard;
+};
+
/* Event types for DND */
struct _GdkEventDND {
@@ -463,6 +472,7 @@ union _GdkEvent
GdkEventDND dnd;
GdkEventWindowState window_state;
GdkEventSetting setting;
+ GdkEventGrabBroken grab_broken;
};
GType gdk_event_get_type (void) G_GNUC_CONST;