diff options
author | Owen Taylor <otaylor@redhat.com> | 2000-02-18 20:02:24 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2000-02-18 20:02:24 +0000 |
commit | c8a2382b65120b32277f84394c55c7b51383523b (patch) | |
tree | 5fa6f133218b9f19106fb6720f1a7f6258f44476 /gdk/gdkevents.h | |
parent | ab1deac87fa395332b73daf8e2e4c893e23be3e4 (diff) | |
download | gtk+-c8a2382b65120b32277f84394c55c7b51383523b.tar.gz |
Remove OwnerGrabButtonMask from button entries for GDK_BUTTON_PRESS /
Fri Feb 18 14:37:29 2000 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkwindow-x11.c (gdk_event_mask_table): Remove
OwnerGrabButtonMask from button entries for
GDK_BUTTON_PRESS / GDK_BUTTON_RELEASE.
* gtk/gtklayout.c (gtk_layout_realize): Always add GDK_SCROLL
to the event mask (which will result in button/press release
being added to the event mask on Unix) so scrolling works
for layouts in scroll windows.
* gdk/gdkevents.h (enum): Fix up GDK_ALL_EVENTS_MASK.
Patch from Anders Carlsson <andersca@picard.andersnet> to add
a scroll event.
* gtk/testgtk.c (scroll_test_scroll): Added an example of mouse wheel
scrolling to the "Test Scrolling" part of testgtk.
* gtk/gtkwidget.h (struct _GtkWidgetClass): Added scroll_event signal.
* gtk/gtkwidget.c: Added "scroll_event" GTK+ signal and matched
it against GDK_SCROLL.
* gtk/gtkrange.c (gtk_range_scroll_event): Updated to use the new
way of mouse wheel scrolling.
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_scroll_event): Likewise.
* gtk/gtkspinbutton.c (gtk_spin_button_scroll): Likewise.
* gtk/gtkmain.c: Removed previous mouse wheel hack.
* gdk/x11/gdkwindow-x11.c (gdk_event_mask_table): Added entry in
gdk_event_mask_table.
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Added
GdkEventScroll handler.
* gdk/gdkevents.h: Added GdkEventScroll structure.
Diffstat (limited to 'gdk/gdkevents.h')
-rw-r--r-- | gdk/gdkevents.h | 38 |
1 files changed, 35 insertions, 3 deletions
diff --git a/gdk/gdkevents.h b/gdk/gdkevents.h index 607ca82711..bf37ced815 100644 --- a/gdk/gdkevents.h +++ b/gdk/gdkevents.h @@ -17,6 +17,7 @@ typedef struct _GdkEventNoExpose GdkEventNoExpose; typedef struct _GdkEventVisibility GdkEventVisibility; typedef struct _GdkEventMotion GdkEventMotion; typedef struct _GdkEventButton GdkEventButton; +typedef struct _GdkEventScroll GdkEventScroll; typedef struct _GdkEventKey GdkEventKey; typedef struct _GdkEventFocus GdkEventFocus; typedef struct _GdkEventCrossing GdkEventCrossing; @@ -69,6 +70,7 @@ typedef GdkFilterReturn (*GdkFilterFunc) (GdkXEvent *xevent, * Map: A window has been mapped. (It is now visible on the screen). * Unmap: A window has been unmapped. (It is no longer visible on * the screen). + * Scroll: A mouse wheel was scrolled either up or down. */ typedef enum { @@ -103,7 +105,8 @@ typedef enum GDK_DROP_FINISHED = 27, GDK_CLIENT_EVENT = 28, GDK_VISIBILITY_NOTIFY = 29, - GDK_NO_EXPOSE = 30 + GDK_NO_EXPOSE = 30, + GDK_SCROLL = 31 } GdkEventType; /* Event masks. (Used to select what types of events a window @@ -131,15 +134,25 @@ typedef enum GDK_PROXIMITY_IN_MASK = 1 << 18, GDK_PROXIMITY_OUT_MASK = 1 << 19, GDK_SUBSTRUCTURE_MASK = 1 << 20, - GDK_ALL_EVENTS_MASK = 0x0FFFFF + GDK_SCROLL_MASK = 1 << 21, + GDK_ALL_EVENTS_MASK = 0x3FFFFE } GdkEventMask; -typedef enum { +typedef enum +{ GDK_VISIBILITY_UNOBSCURED, GDK_VISIBILITY_PARTIAL, GDK_VISIBILITY_FULLY_OBSCURED } GdkVisibilityState; +typedef enum +{ + GDK_SCROLL_UP, + GDK_SCROLL_DOWN, + GDK_SCROLL_LEFT, + GDK_SCROLL_RIGHT +} GdkScrollDirection; + /* Types of enter/leave notifications. * Ancestor: * Virtual: @@ -244,6 +257,24 @@ struct _GdkEventButton gdouble x_root, y_root; }; +struct _GdkEventScroll +{ + GdkEventType type; + GdkWindow *window; + gint8 send_event; + guint32 time; + gdouble x; + gdouble y; + gdouble pressure; + gdouble xtilt; + gdouble ytilt; + guint state; + GdkScrollDirection direction; + GdkInputSource source; + guint32 deviceid; + gdouble x_root, y_root; +}; + struct _GdkEventKey { GdkEventType type; @@ -361,6 +392,7 @@ union _GdkEvent GdkEventVisibility visibility; GdkEventMotion motion; GdkEventButton button; + GdkEventScroll scroll; GdkEventKey key; GdkEventCrossing crossing; GdkEventFocus focus_change; |