summaryrefslogtreecommitdiff
path: root/gtk/gtkdnd-quartz.c
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2018-03-20 11:40:08 +0100
committerAlexander Larsson <alexl@redhat.com>2018-03-20 11:40:08 +0100
commit391727bd0dff0f1d2d937f125bb08a541da02348 (patch)
treed7bac00df572f7efde9c8a9ffde46accb971ad20 /gtk/gtkdnd-quartz.c
parentf7326ff828ad133a7884906ad4cd03e2d9980535 (diff)
downloadgtk+-391727bd0dff0f1d2d937f125bb08a541da02348.tar.gz
GdkWindow -> GdkSurface initial type rename
This renames the GdkWindow class and related classes (impl, backend subclasses) to surface. Additionally it renames related types: GdkWindowAttr, GdkWindowPaint, GdkWindowWindowClass, GdkWindowType, GdkWindowTypeHint, GdkWindowHints, GdkWindowState, GdkWindowEdge This is an automatic conversion using the below commands: git sed -f g GdkWindowWindowClass GdkSurfaceSurfaceClass git sed -f g GdkWindow GdkSurface git sed -f g "gdk_window\([ _\(\),;]\|$\)" "gdk_surface\1" # Avoid hitting gdk_windowing git sed -f g "GDK_WINDOW\([ _\(]\|$\)" "GDK_SURFACE\1" # Avoid hitting GDK_WINDOWING git sed "GDK_\([A-Z]*\)IS_WINDOW\([_ (]\|$\)" "GDK_\1IS_SURFACE\2" git sed GDK_TYPE_WINDOW GDK_TYPE_SURFACE git sed -f g GdkPointerWindowInfo GdkPointerSurfaceInfo git sed -f g "BROADWAY_WINDOW" "BROADWAY_SURFACE" git sed -f g "broadway_window" "broadway_surface" git sed -f g "BroadwayWindow" "BroadwaySurface" git sed -f g "WAYLAND_WINDOW" "WAYLAND_SURFACE" git sed -f g "wayland_window" "wayland_surface" git sed -f g "WaylandWindow" "WaylandSurface" git sed -f g "X11_WINDOW" "X11_SURFACE" git sed -f g "x11_window" "x11_surface" git sed -f g "X11Window" "X11Surface" git sed -f g "WIN32_WINDOW" "WIN32_SURFACE" git sed -f g "win32_window" "win32_surface" git sed -f g "Win32Window" "Win32Surface" git sed -f g "QUARTZ_WINDOW" "QUARTZ_SURFACE" git sed -f g "quartz_window" "quartz_surface" git sed -f g "QuartzWindow" "QuartzSurface" git checkout NEWS* po-properties
Diffstat (limited to 'gtk/gtkdnd-quartz.c')
-rw-r--r--gtk/gtkdnd-quartz.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/gtk/gtkdnd-quartz.c b/gtk/gtkdnd-quartz.c
index 9e80abf97e..01cb0238bf 100644
--- a/gtk/gtkdnd-quartz.c
+++ b/gtk/gtkdnd-quartz.c
@@ -348,10 +348,10 @@ static NSWindow *
get_toplevel_nswindow (GtkWidget *widget)
{
GtkWidget *toplevel = gtk_widget_get_toplevel (widget);
- GdkWindow *window = gtk_widget_get_window (toplevel);
+ GdkSurface *window = gtk_widget_get_window (toplevel);
if (gtk_widget_is_toplevel (toplevel) && window)
- return [gdk_quartz_window_get_nsview (window) window];
+ return [gdk_quartz_surface_get_nsview (window) window];
else
return NULL;
}
@@ -633,8 +633,8 @@ gtk_drag_find_widget (GtkWidget *widget,
if (gtk_widget_get_parent (widget))
{
gint tx, ty;
- GdkWindow *window = gtk_widget_get_window (widget);
- GdkWindow *parent_window;
+ GdkSurface *window = gtk_widget_get_window (widget);
+ GdkSurface *parent_window;
GtkAllocation allocation;
parent_window = gtk_widget_get_window (gtk_widget_get_parent (widget));
@@ -651,7 +651,7 @@ gtk_drag_find_widget (GtkWidget *widget,
/* The allocation is relative to the parent window for
* window widgets, not to widget->window.
*/
- gdk_window_get_position (window, &tx, &ty);
+ gdk_surface_get_position (window, &tx, &ty);
allocation_to_window_x -= tx;
allocation_to_window_y -= ty;
@@ -664,18 +664,18 @@ gtk_drag_find_widget (GtkWidget *widget,
{
GdkRectangle window_rect = { 0, 0, 0, 0 };
- window_rect.width = gdk_window_get_width (window);
- window_rect.height = gdk_window_get_height (window);
+ window_rect.width = gdk_surface_get_width (window);
+ window_rect.height = gdk_surface_get_height (window);
gdk_rectangle_intersect (&new_allocation, &window_rect, &new_allocation);
- gdk_window_get_position (window, &tx, &ty);
+ gdk_surface_get_position (window, &tx, &ty);
new_allocation.x += tx;
x_offset += tx;
new_allocation.y += ty;
y_offset += ty;
- window = gdk_window_get_parent (window);
+ window = gdk_surface_get_parent (window);
}
if (!window) /* Window and widget heirarchies didn't match. */
@@ -930,7 +930,7 @@ _gtk_drag_dest_handle_event (GtkWidget *toplevel,
}
}
- gdk_window_get_position (gtk_widget_get_window (toplevel), &tx, &ty);
+ gdk_surface_get_position (gtk_widget_get_window (toplevel), &tx, &ty);
data.x = event->dnd.x_root - tx;
data.y = event->dnd.y_root - ty;
@@ -1094,7 +1094,7 @@ gtk_drag_begin_idle (gpointer arg)
* gdkwindow.h).
*/
@protocol GdkNSView
-- (GdkWindow *)gdkWindow;
+- (GdkSurface *)gdkWindow;
@end
GdkDragContext *
@@ -1109,7 +1109,7 @@ gtk_drag_begin_internal (GtkWidget *widget,
{
GtkDragSourceInfo *info;
GdkDevice *pointer;
- GdkWindow *window;
+ GdkSurface *window;
GdkDragContext *context;
NSWindow *nswindow = get_toplevel_nswindow (widget);
NSPoint point = {0, 0};
@@ -1119,14 +1119,14 @@ gtk_drag_begin_internal (GtkWidget *widget,
if ((x != -1 && y != -1) || event)
{
- GdkWindow *window;
+ GdkSurface *window;
gdouble dx, dy;
if (x != -1 && y != -1)
{
GtkWidget *toplevel = gtk_widget_get_toplevel (widget);
window = gtk_widget_get_window (toplevel);
gtk_widget_translate_coordinates (widget, toplevel, x, y, &x, &y);
- gdk_window_get_root_coords (gtk_widget_get_window (toplevel), x, y,
+ gdk_surface_get_root_coords (gtk_widget_get_window (toplevel), x, y,
&x, &y);
dx = (gdouble)x;
dy = (gdouble)y;
@@ -1136,26 +1136,26 @@ gtk_drag_begin_internal (GtkWidget *widget,
if (gdk_event_get_coords (event, &dx, &dy))
{
/* We need to translate (x, y) to coordinates relative to the
- * toplevel GdkWindow, which should be the GdkWindow backing
+ * toplevel GdkSurface, which should be the GdkSurface backing
* nswindow. Then, we convert to the NSWindow coordinate system.
*/
window = event->any.window;
- GdkWindow *toplevel = gdk_window_get_toplevel (window);
+ GdkSurface *toplevel = gdk_surface_get_toplevel (window);
while (window != toplevel)
{
double old_x = dx;
double old_y = dy;
- gdk_window_coords_to_parent (window, old_x, old_y,
+ gdk_surface_coords_to_parent (window, old_x, old_y,
&dx, &dy);
- window = gdk_window_get_parent (window);
+ window = gdk_surface_get_parent (window);
}
}
time = (double)gdk_event_get_time (event);
}
point.x = dx;
- point.y = gdk_window_get_height (window) - dy;
+ point.y = gdk_surface_get_height (window) - dy;
}
nstime = [[NSDate dateWithTimeIntervalSince1970: time / 1000] timeIntervalSinceReferenceDate];
@@ -1445,7 +1445,7 @@ gtk_drag_set_icon_name (GdkDragContext *context,
g_return_if_fail (GDK_IS_DRAG_CONTEXT (context));
g_return_if_fail (icon_name != NULL);
- display = gdk_window_get_display (gdk_drag_context_get_source_window (context));
+ display = gdk_surface_get_display (gdk_drag_context_get_source_window (context));
g_return_if_fail (display != NULL);
gtk_icon_size_lookup (GTK_ICON_SIZE_DND, &width, &height);