*-------------------------------------------------------------------
*/
-static gboolean collection_table_motion_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data)
+static gboolean collection_table_motion_cb(GtkWidget *widget, GdkEventMotion *event, gpointer data)
{
CollectTable *ct = data;
- collection_table_motion_update(ct, (gint)bevent->x, (gint)bevent->y, FALSE);
+ collection_table_motion_update(ct, (gint)event->x, (gint)event->y, FALSE);
return FALSE;
}
fs->hide_mouse_id = g_timeout_add(FULL_SCREEN_HIDE_MOUSE_DELAY, fullscreen_hide_mouse_cb, fs);
}
-static gboolean fullscreen_mouse_moved(GtkWidget *widget, GdkEventButton *bevent, gpointer data)
+static gboolean fullscreen_mouse_moved(GtkWidget *widget, GdkEventMotion *event, gpointer data)
{
FullScreenData *fs = data;
}
}
-static void image_drag_cb(PixbufRenderer *pr, GdkEventButton *event, gpointer data)
+static void image_drag_cb(PixbufRenderer *pr, GdkEventMotion *event, gpointer data)
{
ImageWindow *imd = data;
gint width, height;
}
void image_set_drag_func(ImageWindow *imd,
- void (*func)(ImageWindow *, GdkEventButton *event, gdouble dx, gdouble dy, gpointer),
+ void (*func)(ImageWindow *, GdkEventMotion *event, gdouble dx, gdouble dy, gpointer),
gpointer data)
{
imd->func_drag = func;
void (*func)(ImageWindow *, GdkEventButton *event, gpointer),
gpointer data);
void image_set_drag_func(ImageWindow *imd,
- void (*func)(ImageWindow *, GdkEventButton *event, gdouble dx, gdouble dy, gpointer),
+ void (*func)(ImageWindow *, GdkEventMotion *event, gdouble dx, gdouble dy, gpointer),
gpointer data);
void image_set_scroll_func(ImageWindow *imd,
void (*func)(ImageWindow *, GdkEventScroll *event, gpointer),
}
}
-static void layout_image_drag_cb(ImageWindow *imd, GdkEventButton *event, gdouble dx, gdouble dy, gpointer data)
+static void layout_image_drag_cb(ImageWindow *imd, GdkEventMotion *event, gdouble dx, gdouble dy, gpointer data)
{
gint i;
LayoutWindow *lw = data;
}
-static void layout_image_drag_inactive_cb(ImageWindow *imd, GdkEventButton *event, gdouble dx, gdouble dy, gpointer data)
+static void layout_image_drag_inactive_cb(ImageWindow *imd, GdkEventMotion *event, gdouble dx, gdouble dy, gpointer data)
{
LayoutWindow *lw = data;
gint i = image_idx(lw, imd);
}
}
-static void pr_drag_signal(PixbufRenderer *pr, GdkEventButton *bevent)
+static void pr_drag_signal(PixbufRenderer *pr, GdkEventMotion *event)
{
- g_signal_emit(pr, signals[SIGNAL_DRAG], 0, bevent);
+ g_signal_emit(pr, signals[SIGNAL_DRAG], 0, event);
}
static void pr_update_pixel_signal(PixbufRenderer *pr)
*-------------------------------------------------------------------
*/
-static gboolean pr_mouse_motion_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data)
+static gboolean pr_mouse_motion_cb(GtkWidget *widget, GdkEventMotion *event, gpointer data)
{
PixbufRenderer *pr;
gint accel;
* See http://bugzilla.gnome.org/show_bug.cgi?id=587714 for more. */
gint x, y;
#if GTK_CHECK_VERSION(3,0,0)
- device_manager = gdk_display_get_device_manager(gdk_window_get_display(bevent->window));
+ device_manager = gdk_display_get_device_manager(gdk_window_get_display(event->window));
device = gdk_device_manager_get_client_pointer(device_manager);
- gdk_window_get_device_position(bevent->window, device, &x, &y, NULL);
+ gdk_window_get_device_position(event->window, device, &x, &y, NULL);
#else
- gdk_window_get_pointer (bevent->window, &x, &y, NULL);
+ gdk_window_get_pointer (event->window, &x, &y, NULL);
#endif
- bevent->x = x;
- bevent->y = y;
+ event->x = x;
+ event->y = y;
pr = PIXBUF_RENDERER(widget);
if (pr->scroller_id)
{
- pr->scroller_xpos = bevent->x;
- pr->scroller_ypos = bevent->y;
+ pr->scroller_xpos = event->x;
+ pr->scroller_ypos = event->y;
}
- pr->x_mouse = bevent->x;
- pr->y_mouse = bevent->y;
+ pr->x_mouse = event->x;
+ pr->y_mouse = event->y;
pr_update_pixel_signal(pr);
if (!pr->in_drag || !gdk_pointer_is_grabbed()) return FALSE;
widget_set_cursor(widget, GDK_FLEUR);
}
- if (bevent->state & GDK_CONTROL_MASK)
+ if (event->state & GDK_CONTROL_MASK)
{
accel = PR_PAN_SHIFT_MULTIPLIER;
}
}
/* do the scroll */
- pixbuf_renderer_scroll(pr, (pr->drag_last_x - bevent->x) * accel,
- (pr->drag_last_y - bevent->y) * accel);
+ pixbuf_renderer_scroll(pr, (pr->drag_last_x - event->x) * accel,
+ (pr->drag_last_y - event->y) * accel);
- pr_drag_signal(pr, bevent);
+ pr_drag_signal(pr, event);
- pr->drag_last_x = bevent->x;
- pr->drag_last_y = bevent->y;
+ pr->drag_last_x = event->x;
+ pr->drag_last_y = event->y;
/* This is recommended by the GTK+ documentation, but does not work properly.
* Use deprecated way until GTK+ gets a solution for correct motion hint handling:
* http://bugzilla.gnome.org/show_bug.cgi?id=587714
*/
- /* gdk_event_request_motions (bevent); */
+ /* gdk_event_request_motions (event); */
return FALSE;
}
void (*update_pixel)(PixbufRenderer *pr);
void (*render_complete)(PixbufRenderer *pr);
- void (*drag)(PixbufRenderer *pr, GdkEventButton *event);
+ void (*drag)(PixbufRenderer *pr, GdkEventMotion *event);
};
/* button, scroll functions */
void (*func_button)(ImageWindow *, GdkEventButton *event, gpointer);
- void (*func_drag)(ImageWindow *, GdkEventButton *event, gdouble dx, gdouble dy, gpointer);
+ void (*func_drag)(ImageWindow *, GdkEventMotion *event, gdouble dx, gdouble dy, gpointer);
void (*func_scroll)(ImageWindow *, GdkEventScroll *event, gpointer);
void (*func_focus_in)(ImageWindow *, gpointer);
return handle_size;
}
-static gboolean sizer_motion_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data)
+static gboolean sizer_motion_cb(GtkWidget *widget, GdkEventMotion *event, gpointer data)
{
SizerData *sd = data;
gint x, y;
if (!sd->in_drag) return FALSE;
- x = sd->press_x - bevent->x_root;
- y = sd->press_y - bevent->y_root;
+ x = sd->press_x - event->x_root;
+ y = sd->press_y - event->y_root;
w = sd->press_width;
h = sd->press_height;
*-------------------------------------------------------------------
*/
-static gboolean vficon_motion_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data)
+static gboolean vficon_motion_cb(GtkWidget *widget, GdkEventMotion *event, gpointer data)
{
ViewFile *vf = data;
IconData *id;
- id = vficon_find_data_by_coord(vf, (gint)bevent->x, (gint)bevent->y, NULL);
+ id = vficon_find_data_by_coord(vf, (gint)event->x, (gint)event->y, NULL);
tip_update(vf, id);
return FALSE;