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:
Matthias Clasen 2020-05-17 17:49:02 -04:00
parent 75d9310986
commit 71bad81aff
11 changed files with 30 additions and 30 deletions

View File

@ -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;

View File

@ -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,

View File

@ -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,

View File

@ -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);

View File

@ -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,

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -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);

View File

@ -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);

View File

@ -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,