forked from AuroraMiddleware/gtk
gdk: Make gdk_drag_begin take doubles
This is a better fit to the way we treat coordinates everywhere else.
This commit is contained in:
parent
75d9310986
commit
71bad81aff
@ -87,8 +87,8 @@ _gdk_broadway_surface_drag_begin (GdkSurface *surface,
|
||||
GdkDevice *device,
|
||||
GdkContentProvider *content,
|
||||
GdkDragAction actions,
|
||||
gint dx,
|
||||
gint dy)
|
||||
double dx,
|
||||
double dy)
|
||||
{
|
||||
GdkDrag *new_context;
|
||||
|
||||
|
@ -51,8 +51,8 @@ GdkDrag * _gdk_broadway_surface_drag_begin (GdkSurface *surface,
|
||||
GdkDevice *device,
|
||||
GdkContentProvider *content,
|
||||
GdkDragAction actions,
|
||||
gint dx,
|
||||
gint dy);
|
||||
double dx,
|
||||
double dy);
|
||||
void _gdk_broadway_surface_translate (GdkSurface *surface,
|
||||
cairo_region_t *area,
|
||||
gint dx,
|
||||
|
@ -76,8 +76,8 @@ GdkDrag * gdk_drag_begin (GdkSurface *surface,
|
||||
GdkDevice *device,
|
||||
GdkContentProvider *content,
|
||||
GdkDragAction actions,
|
||||
gint dx,
|
||||
gint dy);
|
||||
double dx,
|
||||
double dy);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_drag_drop_done (GdkDrag *drag,
|
||||
|
@ -2398,8 +2398,8 @@ gdk_drag_begin (GdkSurface *surface,
|
||||
GdkDevice *device,
|
||||
GdkContentProvider *content,
|
||||
GdkDragAction actions,
|
||||
gint dx,
|
||||
gint dy)
|
||||
double dx,
|
||||
double dy)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_SURFACE (surface), NULL);
|
||||
g_return_val_if_fail (GDK_IS_DEVICE (device), NULL);
|
||||
|
@ -151,10 +151,10 @@ struct _GdkSurfaceClass
|
||||
void (* destroy_notify) (GdkSurface *surface);
|
||||
GdkDrag * (* drag_begin) (GdkSurface *surface,
|
||||
GdkDevice *device,
|
||||
GdkContentProvider*content,
|
||||
GdkContentProvider *content,
|
||||
GdkDragAction actions,
|
||||
gint dx,
|
||||
gint dy);
|
||||
double dx,
|
||||
double dy);
|
||||
|
||||
gint (* get_scale_factor) (GdkSurface *surface);
|
||||
void (* get_unscaled_size) (GdkSurface *surface,
|
||||
|
@ -352,8 +352,8 @@ _gdk_wayland_surface_drag_begin (GdkSurface *surface,
|
||||
GdkDevice *device,
|
||||
GdkContentProvider *content,
|
||||
GdkDragAction actions,
|
||||
gint dx,
|
||||
gint dy)
|
||||
double dx,
|
||||
double dy)
|
||||
{
|
||||
GdkWaylandDrag *drag_wayland;
|
||||
GdkDrag *drag;
|
||||
|
@ -103,8 +103,8 @@ GdkDrag *_gdk_wayland_surface_drag_begin (GdkSurface *surface,
|
||||
GdkDevice *device,
|
||||
GdkContentProvider *content,
|
||||
GdkDragAction actions,
|
||||
gint dx,
|
||||
gint dy);
|
||||
double dx,
|
||||
double dy);
|
||||
void _gdk_wayland_surface_offset_next_wl_buffer (GdkSurface *surface,
|
||||
int x,
|
||||
int y);
|
||||
|
@ -1709,8 +1709,8 @@ _gdk_win32_surface_drag_begin (GdkSurface *surface,
|
||||
GdkDevice *device,
|
||||
GdkContentProvider *content,
|
||||
GdkDragAction actions,
|
||||
gint dx,
|
||||
gint dy)
|
||||
double dx,
|
||||
double dy)
|
||||
{
|
||||
GdkDrag *drag;
|
||||
GdkWin32Drag *drag_win32;
|
||||
@ -1731,8 +1731,8 @@ _gdk_win32_surface_drag_begin (GdkSurface *surface,
|
||||
GDK_NOTE (DND, g_print ("_gdk_win32_surface_drag_begin\n"));
|
||||
|
||||
gdk_device_get_position (device, &px, &py);
|
||||
x_root = round (px) + dx;
|
||||
y_root = round (py) + dy;
|
||||
x_root = round (px + dx);
|
||||
y_root = round (py + dy);
|
||||
|
||||
drag_win32->start_x = x_root;
|
||||
drag_win32->start_y = y_root;
|
||||
|
@ -395,8 +395,8 @@ GdkDrag *_gdk_win32_surface_drag_begin (GdkSurface *window,
|
||||
GdkDevice *device,
|
||||
GdkContentProvider *content,
|
||||
GdkDragAction actions,
|
||||
gint x_root,
|
||||
gint y_root);
|
||||
double x_root,
|
||||
double y_root);
|
||||
|
||||
/* Stray GdkWin32Screen members */
|
||||
gboolean _gdk_win32_get_setting (const gchar *name, GValue *value);
|
||||
|
@ -1985,8 +1985,8 @@ _gdk_x11_surface_drag_begin (GdkSurface *surface,
|
||||
GdkDevice *device,
|
||||
GdkContentProvider *content,
|
||||
GdkDragAction actions,
|
||||
gint dx,
|
||||
gint dy)
|
||||
double dx,
|
||||
double dy)
|
||||
{
|
||||
GdkX11Drag *x11_drag;
|
||||
GdkDrag *drag;
|
||||
@ -2013,8 +2013,8 @@ _gdk_x11_surface_drag_begin (GdkSurface *surface,
|
||||
_gdk_device_query_state (device, surface, NULL, &px, &py, NULL);
|
||||
|
||||
gdk_x11_surface_get_root_coords (surface,
|
||||
round (px) + dx,
|
||||
round (py) + dy,
|
||||
round (px + dx),
|
||||
round (py + dy),
|
||||
&x_root,
|
||||
&y_root);
|
||||
|
||||
|
@ -223,8 +223,8 @@ GdkDrag * _gdk_x11_surface_drag_begin (GdkSurface *window,
|
||||
GdkDevice *device,
|
||||
GdkContentProvider *content,
|
||||
GdkDragAction actions,
|
||||
gint dx,
|
||||
gint dy);
|
||||
double dx,
|
||||
double dy);
|
||||
|
||||
void gdk_x11_surface_get_root_coords (GdkSurface *surface,
|
||||
gint x,
|
||||
|
Loading…
Reference in New Issue
Block a user