[gtk+/touch-for-3.4] Rename GdkTouchSequence to GdkEventSequence
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/touch-for-3.4] Rename GdkTouchSequence to GdkEventSequence
- Date: Wed, 29 Feb 2012 21:52:03 +0000 (UTC)
commit 0aced24ba508ff4f562de63e9459c87b63e3c3de
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Feb 29 16:38:44 2012 -0500
Rename GdkTouchSequence to GdkEventSequence
We may eventually have sequences involving non-touch events,
so keep the name neutral.
Update all users.
docs/reference/gdk/gdk3-sections.txt | 4 ++-
gdk/gdk.symbols | 2 +-
gdk/gdkdisplay.c | 6 ++--
gdk/gdkdisplayprivate.h | 8 +++---
gdk/gdkevents.c | 16 +++++++------
gdk/gdkevents.h | 6 ++--
gdk/gdkwindow.c | 39 ++++++++++++++++-----------------
gtk/gtkpaned.c | 11 ++++-----
8 files changed, 47 insertions(+), 45 deletions(-)
---
diff --git a/docs/reference/gdk/gdk3-sections.txt b/docs/reference/gdk/gdk3-sections.txt
index 3e25d83..12f069c 100644
--- a/docs/reference/gdk/gdk3-sections.txt
+++ b/docs/reference/gdk/gdk3-sections.txt
@@ -782,7 +782,8 @@ gdk_event_get_root_coords
gdk_event_get_scroll_direction
gdk_event_get_state
gdk_event_get_time
-gdk_event_get_touch_sequence
+GdkEventSequence
+gdk_event_get_event_sequence
gdk_event_request_motions
gdk_events_get_angle
gdk_events_get_center
@@ -820,6 +821,7 @@ GdkEvent
GdkEventAny
GdkEventKey
GdkEventButton
+GdkEventTouch
GdkEventScroll
GdkEventMotion
GdkEventExpose
diff --git a/gdk/gdk.symbols b/gdk/gdk.symbols
index cf62d85..9552f3e 100644
--- a/gdk/gdk.symbols
+++ b/gdk/gdk.symbols
@@ -168,7 +168,7 @@ gdk_event_get_scroll_direction
gdk_event_get_source_device
gdk_event_get_state
gdk_event_get_time
-gdk_event_get_touch_sequence
+gdk_event_get_event_sequence
gdk_event_get_type
gdk_event_handler_set
gdk_event_mask_get_type
diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c
index beaea01..4542859 100644
--- a/gdk/gdkdisplay.c
+++ b/gdk/gdkdisplay.c
@@ -721,7 +721,7 @@ _gdk_display_break_touch_grabs (GdkDisplay *display,
void
_gdk_display_add_touch_grab (GdkDisplay *display,
GdkDevice *device,
- GdkTouchSequence *sequence,
+ GdkEventSequence *sequence,
GdkWindow *window,
GdkWindow *native_window,
GdkEventMask event_mask,
@@ -744,7 +744,7 @@ _gdk_display_add_touch_grab (GdkDisplay *display,
gboolean
_gdk_display_end_touch_grab (GdkDisplay *display,
GdkDevice *device,
- GdkTouchSequence *sequence)
+ GdkEventSequence *sequence)
{
guint i;
@@ -1117,7 +1117,7 @@ _gdk_display_has_device_grab (GdkDisplay *display,
GdkTouchGrabInfo *
_gdk_display_has_touch_grab (GdkDisplay *display,
GdkDevice *device,
- GdkTouchSequence *sequence,
+ GdkEventSequence *sequence,
gulong serial)
{
guint i;
diff --git a/gdk/gdkdisplayprivate.h b/gdk/gdkdisplayprivate.h
index 0946d19..9c5b467 100644
--- a/gdk/gdkdisplayprivate.h
+++ b/gdk/gdkdisplayprivate.h
@@ -64,7 +64,7 @@ typedef struct
typedef struct
{
GdkDevice *device;
- GdkTouchSequence *sequence;
+ GdkEventSequence *sequence;
GdkWindow *window;
GdkWindow *native_window;
@@ -278,7 +278,7 @@ gboolean _gdk_display_check_grab_ownership (GdkDisplay *display
gulong serial);
void _gdk_display_add_touch_grab (GdkDisplay *display,
GdkDevice *device,
- GdkTouchSequence *sequence,
+ GdkEventSequence *sequence,
GdkWindow *window,
GdkWindow *native_window,
GdkEventMask event_mask,
@@ -286,11 +286,11 @@ void _gdk_display_add_touch_grab (GdkDisplay *display
guint32 time);
GdkTouchGrabInfo * _gdk_display_has_touch_grab (GdkDisplay *display,
GdkDevice *device,
- GdkTouchSequence *sequence,
+ GdkEventSequence *sequence,
gulong serial);
gboolean _gdk_display_end_touch_grab (GdkDisplay *display,
GdkDevice *device,
- GdkTouchSequence *sequence);
+ GdkEventSequence *sequence);
void _gdk_display_enable_motion_hints (GdkDisplay *display,
GdkDevice *device);
GdkPointerWindowInfo * _gdk_display_get_pointer_info (GdkDisplay *display,
diff --git a/gdk/gdkevents.c b/gdk/gdkevents.c
index ae0d1ac..4f41dc1 100644
--- a/gdk/gdkevents.c
+++ b/gdk/gdkevents.c
@@ -1791,19 +1791,21 @@ gdk_event_get_screen (const GdkEvent *event)
}
/**
- * gdk_event_get_touch_sequence:
+ * gdk_event_get_event_sequence:
* @event: a #GdkEvent
*
- * If @event if of type %GDK_TOUCH_BEGIN, %GDK_TOUCH_UPDATE,
- * %GDK_TOUCH_END or %GDK_TOUCH_CANCEL, returns the #GdkTouchSequence
- * to which the event belongs. Otherwise, return %NULL.
+ * Returns the #GdkEventSequence to which @event belongs.
+ * Currently, only touch events (i.e. those with type %GDK_TOUCH_BEGIN,
+ * %GDK_TOUCH_UPDATE, %GDK_TOUCH_END or %GDK_TOUCH_CANCEL) are
+ * connected in sequences. If the event does not belong to an
+ * event sequence, %NULL is returned.
*
- * Returns: the touch sequence that the event belongs to
+ * Returns: the event sequence that the event belongs to, or %NULL
*
* Since: 3.4
*/
-GdkTouchSequence *
-gdk_event_get_touch_sequence (const GdkEvent *event)
+GdkEventSequence *
+gdk_event_get_event_sequence (const GdkEvent *event)
{
if (!event)
return NULL;
diff --git a/gdk/gdkevents.h b/gdk/gdkevents.h
index e0103c6..644e5c2 100644
--- a/gdk/gdkevents.h
+++ b/gdk/gdkevents.h
@@ -145,7 +145,7 @@ typedef struct _GdkEventWindowState GdkEventWindowState;
typedef struct _GdkEventSetting GdkEventSetting;
typedef struct _GdkEventGrabBroken GdkEventGrabBroken;
-typedef struct _GdkTouchSequence GdkTouchSequence;
+typedef struct _GdkEventSequence GdkEventSequence;
typedef union _GdkEvent GdkEvent;
@@ -714,7 +714,7 @@ struct _GdkEventTouch
gdouble y;
gdouble *axes;
guint state;
- GdkTouchSequence *sequence;
+ GdkEventSequence *sequence;
gboolean emulating_pointer;
GdkDevice *device;
gdouble x_root, y_root;
@@ -1226,7 +1226,7 @@ void gdk_event_set_screen (GdkEvent *event,
GdkScreen *screen);
GdkScreen *gdk_event_get_screen (const GdkEvent *event);
-GdkTouchSequence *gdk_event_get_touch_sequence (const GdkEvent *event);
+GdkEventSequence *gdk_event_get_event_sequence (const GdkEvent *event);
void gdk_set_show_events (gboolean show_events);
gboolean gdk_get_show_events (void);
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 39a84a4..3362156 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -8350,15 +8350,14 @@ send_crossing_event (GdkDisplay *display,
GdkTouchGrabInfo *touch_grab = NULL;
GdkPointerWindowInfo *pointer_info;
gboolean block_event = FALSE;
- GdkTouchSequence *touch_sequence;
+ GdkEventSequence *sequence;
grab = _gdk_display_has_device_grab (display, device, serial);
pointer_info = _gdk_display_get_pointer_info (display, device);
- touch_sequence = gdk_event_get_touch_sequence (event_in_queue);
- if (touch_sequence)
- touch_grab = _gdk_display_has_touch_grab (display, device,
- touch_sequence, serial);
+ sequence = gdk_event_get_event_sequence (event_in_queue);
+ if (sequence)
+ touch_grab = _gdk_display_has_touch_grab (display, device, sequence, serial);
if (touch_grab)
{
@@ -9133,7 +9132,7 @@ _gdk_synthesize_crossing_events_for_geometry_change (GdkWindow *changed_window)
static GdkWindow *
get_event_window (GdkDisplay *display,
GdkDevice *device,
- GdkTouchSequence *touch_sequence,
+ GdkEventSequence *sequence,
GdkWindow *pointer_window,
GdkEventType type,
GdkModifierType mask,
@@ -9146,7 +9145,7 @@ get_event_window (GdkDisplay *display,
GdkDeviceGrabInfo *grab;
GdkTouchGrabInfo *touch_grab;
- touch_grab = _gdk_display_has_touch_grab (display, device, touch_sequence, serial);
+ touch_grab = _gdk_display_has_touch_grab (display, device, sequence, serial);
grab = _gdk_display_get_last_device_grab (display, device);
if (is_touch_type (type) && pointer_emulated)
@@ -9388,15 +9387,15 @@ proxy_pointer_event (GdkDisplay *display,
GdkWindow *event_win;
guint evmask;
gboolean is_hint;
- GdkTouchSequence *touch_sequence;
+ GdkEventSequence *sequence;
GdkEventType event_type;
- touch_sequence = gdk_event_get_touch_sequence (source_event);
+ sequence = gdk_event_get_event_sequence (source_event);
event_type = source_event->type;
event_win = get_event_window (display,
device,
- touch_sequence,
+ sequence,
pointer_window,
source_event->type,
state,
@@ -9417,7 +9416,7 @@ proxy_pointer_event (GdkDisplay *display,
* not mutate in this case.
*/
if ((evmask & GDK_TOUCH_MASK) == 0 ||
- !_gdk_display_has_touch_grab (display, device, touch_sequence, serial))
+ !_gdk_display_has_touch_grab (display, device, sequence, serial))
event_type = GDK_MOTION_NOTIFY;
}
else if ((evmask & GDK_TOUCH_MASK) == 0)
@@ -9550,7 +9549,7 @@ proxy_button_event (GdkEvent *source_event,
GdkWindow *w;
GdkDevice *device, *source_device;
GdkEventMask evmask;
- GdkTouchSequence *touch_sequence;
+ GdkEventSequence *sequence;
type = source_event->any.type;
event_window = source_event->any.window;
@@ -9567,7 +9566,7 @@ proxy_button_event (GdkEvent *source_event,
pointer_info = _gdk_display_get_pointer_info (display, device);
pointer_grab = _gdk_display_has_device_grab (display, device, serial);
- touch_sequence = gdk_event_get_touch_sequence (source_event);
+ sequence = gdk_event_get_event_sequence (source_event);
if ((type == GDK_BUTTON_PRESS ||
type == GDK_TOUCH_BEGIN) &&
@@ -9605,7 +9604,7 @@ proxy_button_event (GdkEvent *source_event,
if (type == GDK_TOUCH_BEGIN &&
pointer_window->event_mask & GDK_TOUCH_MASK)
{
- _gdk_display_add_touch_grab (display, device, touch_sequence,
+ _gdk_display_add_touch_grab (display, device, sequence,
pointer_window, event_window,
gdk_window_get_events (pointer_window),
serial, time_);
@@ -9635,7 +9634,7 @@ proxy_button_event (GdkEvent *source_event,
event_win = get_event_window (display,
device,
- touch_sequence,
+ sequence,
pointer_window,
type, state,
&evmask,
@@ -9647,7 +9646,7 @@ proxy_button_event (GdkEvent *source_event,
if (_gdk_event_get_pointer_emulated (source_event))
{
if ((evmask & GDK_TOUCH_MASK) == 0 ||
- !_gdk_display_has_touch_grab (display, device, touch_sequence, serial))
+ !_gdk_display_has_touch_grab (display, device, sequence, serial))
{
if (type == GDK_TOUCH_BEGIN)
type = GDK_BUTTON_PRESS;
@@ -10053,12 +10052,12 @@ _gdk_windowing_got_event (GdkDisplay *display,
event->type == GDK_TOUCH_END) &&
!event->any.send_event)
{
- GdkTouchSequence *touch_sequence;
+ GdkEventSequence *sequence;
- touch_sequence = gdk_event_get_touch_sequence (event);
- if (event->type == GDK_TOUCH_END && touch_sequence)
+ sequence = gdk_event_get_event_sequence (event);
+ if (event->type == GDK_TOUCH_END && sequence)
{
- _gdk_display_end_touch_grab (display, device, touch_sequence);
+ _gdk_display_end_touch_grab (display, device, sequence);
}
if (event->type == GDK_BUTTON_RELEASE ||
diff --git a/gtk/gtkpaned.c b/gtk/gtkpaned.c
index fe4577d..2800054 100644
--- a/gtk/gtkpaned.c
+++ b/gtk/gtkpaned.c
@@ -104,7 +104,7 @@ typedef struct
{
GdkWindow *pane_window;
GdkDevice *device;
- GdkTouchSequence *sequence;
+ GdkEventSequence *sequence;
gdouble x;
gdouble y;
GdkEvent *button_press_event;
@@ -1840,7 +1840,7 @@ _gtk_paned_find_pane_window (GtkWidget *widget,
static TouchInfo *
_gtk_paned_find_touch (GtkPaned *paned,
GdkDevice *device,
- GdkTouchSequence *sequence,
+ GdkEventSequence *sequence,
guint *index)
{
GtkPanedPrivate *priv = paned->priv;
@@ -1851,8 +1851,7 @@ _gtk_paned_find_touch (GtkPaned *paned,
{
info = &g_array_index (priv->touches, TouchInfo, i);
- if (info->device == device &&
- info->sequence == sequence)
+ if (info->device == device && info->sequence == sequence)
{
if (index)
*index = i;
@@ -1903,7 +1902,7 @@ gtk_paned_captured_event (GtkWidget *widget,
GdkDevice *device, *source_device;
GdkWindow *pane_window;
TouchInfo new = { 0 }, *info;
- GdkTouchSequence *sequence;
+ GdkEventSequence *sequence;
guint index;
gdouble event_x, event_y;
gint x, y;
@@ -1915,7 +1914,7 @@ gtk_paned_captured_event (GtkWidget *widget,
* depending on the target window event mask, so assume
* touch ID = 0 for pointer events to ease handling.
*/
- sequence = gdk_event_get_touch_sequence (event);
+ sequence = gdk_event_get_event_sequence (event);
gdk_event_get_coords (event, &event_x, &event_y);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]