Commit a6e93678 authored by Benjamin Otte's avatar Benjamin Otte
Browse files

gdk: gdk_drawable_get_screen/visual => gdk_window_get_screen/visual

parent 9f47be22
......@@ -1242,7 +1242,7 @@ _gdk_device_translate_window_coord (GdkDevice *device,
x_min = axis_info_x->min_value;
else
{
device_width = gdk_screen_get_width (gdk_drawable_get_screen (window));
device_width = gdk_screen_get_width (gdk_window_get_screen (window));
x_min = 0;
}
......@@ -1250,7 +1250,7 @@ _gdk_device_translate_window_coord (GdkDevice *device,
y_min = axis_info_y->min_value;
else
{
device_height = gdk_screen_get_height (gdk_drawable_get_screen (window));
device_height = gdk_screen_get_height (gdk_window_get_screen (window));
y_min = 0;
}
......@@ -1343,7 +1343,7 @@ _gdk_device_translate_screen_coord (GdkDevice *device,
if (axis_info.use == GDK_AXIS_X)
{
if (axis_width > 0)
scale = gdk_screen_get_width (gdk_drawable_get_screen (window)) / axis_width;
scale = gdk_screen_get_width (gdk_window_get_screen (window)) / axis_width;
else
scale = 1;
......@@ -1352,7 +1352,7 @@ _gdk_device_translate_screen_coord (GdkDevice *device,
else
{
if (axis_width > 0)
scale = gdk_screen_get_height (gdk_drawable_get_screen (window)) / axis_width;
scale = gdk_screen_get_height (gdk_window_get_screen (window)) / axis_width;
else
scale = 1;
......
......@@ -26,8 +26,8 @@
#include "config.h"
#include <gdkdnd.h>
#include <gdkdrawable.h>
#include <gdkdisplay.h>
#include <gdkwindow.h>
/**
......@@ -71,7 +71,7 @@ gdk_drag_find_window (GdkDragContext *context,
GdkDragProtocol *protocol)
{
gdk_drag_find_window_for_screen (context, drag_window,
gdk_drawable_get_screen (context->source_window),
gdk_window_get_screen (context->source_window),
x_root, y_root, dest_window, protocol);
}
......
......@@ -1278,7 +1278,7 @@ gdk_event_get_screen (const GdkEvent *event)
}
if (event->any.window)
return gdk_drawable_get_screen (event->any.window);
return gdk_window_get_screen (event->any.window);
return NULL;
}
......
......@@ -1274,7 +1274,7 @@ gdk_window_new (GdkWindow *parent,
parent = gdk_screen_get_root_window (screen);
}
else
screen = gdk_drawable_get_screen (parent);
screen = gdk_window_get_screen (parent);
g_return_val_if_fail (GDK_IS_WINDOW (parent), NULL);
......@@ -1396,7 +1396,7 @@ gdk_window_new (GdkWindow *parent,
((attributes_mask & GDK_WA_COLORMAP &&
attributes->colormap != gdk_drawable_get_colormap ((GdkDrawable *)private->parent)) ||
(attributes_mask & GDK_WA_VISUAL &&
attributes->visual != gdk_drawable_get_visual ((GdkDrawable *)private->parent))))
attributes->visual != gdk_window_get_visual (GDK_WINDOW (private->parent)))))
native = TRUE; /* InputOutput window with different colormap or visual than parent, needs native window */
if (gdk_window_is_offscreen (private))
......@@ -1551,7 +1551,7 @@ gdk_window_reparent (GdkWindow *window,
(new_parent && GDK_WINDOW_DESTROYED (new_parent)))
return;
screen = gdk_drawable_get_screen (GDK_DRAWABLE (window));
screen = gdk_window_get_screen (window);
if (!new_parent)
new_parent = gdk_screen_get_root_window (screen);
......@@ -1806,7 +1806,7 @@ gdk_window_ensure_native (GdkWindow *window)
gdk_window_drop_cairo_surface (private);
screen = gdk_drawable_get_screen (window);
screen = gdk_window_get_screen (window);
attributes.colormap = gdk_drawable_get_colormap (window);
......@@ -1944,7 +1944,7 @@ _gdk_window_destroy_hierarchy (GdkWindow *window,
return;
display = gdk_drawable_get_display (GDK_DRAWABLE (window));
screen = gdk_drawable_get_screen (GDK_DRAWABLE (window));
screen = gdk_window_get_screen (window);
temp_window = g_object_get_qdata (G_OBJECT (screen), quark_pointer_window);
if (temp_window == window)
g_object_set_qdata (G_OBJECT (screen), quark_pointer_window, NULL);
......
......@@ -1724,7 +1724,7 @@ gdk_window_quartz_get_geometry (GdkWindow *window,
}
if (depth)
*depth = gdk_drawable_get_depth (window);
*depth = gdk_visual_get_depth (gdk_window_get_visual (window));
}
static gint
......
......@@ -300,7 +300,7 @@ gdk_device_win32_query_state (GdkDevice *device,
{
GdkScreen *screen;
screen = gdk_drawable_get_screen (GDK_DRAWABLE (window));
screen = gdk_window_get_screen (window);
*root_window = gdk_screen_get_root_window (screen);
}
......
......@@ -1050,7 +1050,7 @@ _gdk_win32_drawable_description (GdkDrawable *d)
g_return_val_if_fail (GDK_IS_DRAWABLE (d), NULL);
gdk_drawable_get_size (d, &width, &height);
depth = gdk_drawable_get_depth (d);
depth = gdk_visual_get_depth (gdk_window_get_visual (GDK_WINDOW (d)));
return static_printf ("%s:%p:%dx%dx%d",
G_OBJECT_TYPE_NAME (d),
......
......@@ -1881,12 +1881,12 @@ gdk_win32_window_get_geometry (GdkWindow *window,
if (height)
*height = rect.bottom - rect.top;
if (depth)
*depth = gdk_drawable_get_visual (window)->depth;
*depth = gdk_window_get_visual (window)->depth;
GDK_NOTE (MISC, g_print ("gdk_win32_window_get_geometry: %p: %ldx%ldx%d@%+ld%+ld\n",
GDK_WINDOW_HWND (window),
rect.right - rect.left, rect.bottom - rect.top,
gdk_drawable_get_visual (window)->depth,
gdk_window_get_visual (window)->depth,
rect.left, rect.top));
}
}
......
......@@ -256,7 +256,7 @@ gdk_x11_create_cairo_surface (GdkDrawable *drawable,
GdkDrawableImplX11 *impl = GDK_DRAWABLE_IMPL_X11 (drawable);
GdkVisual *visual;
visual = gdk_drawable_get_visual (drawable);
visual = gdk_window_get_visual (impl->wrapper);
if (visual)
return cairo_xlib_surface_create (GDK_SCREEN_XDISPLAY (impl->screen),
impl->xid,
......@@ -274,7 +274,6 @@ gdk_x11_create_cairo_surface (GdkDrawable *drawable,
"so why is this code even reached?");
return NULL;
}
}
static cairo_surface_t *
......
......@@ -233,8 +233,8 @@ _get_scratch_gc (GdkWindowObject *window, cairo_region_t *clip_region)
gint n_rects;
gint depth;
screen = GDK_SCREEN_X11 (gdk_drawable_get_screen (GDK_DRAWABLE (window)));
depth = gdk_drawable_get_depth (GDK_DRAWABLE (window)) - 1;
screen = GDK_SCREEN_X11 (gdk_window_get_screen (GDK_WINDOW (window)));
depth = gdk_visual_get_depth (gdk_window_get_visual (GDK_WINDOW (window))) - 1;
if (!screen->subwindow_gcs[depth])
{
......
......@@ -292,7 +292,7 @@ gdk_x11_window_create_pixmap_surface (GdkWindow *window,
DefaultDepthOfScreen (GDK_SCREEN_XSCREEN (GDK_WINDOW_SCREEN (window))));
surface = cairo_xlib_surface_create (GDK_WINDOW_XDISPLAY (window),
pixmap,
GDK_VISUAL_XVISUAL (gdk_drawable_get_visual (window)),
GDK_VISUAL_XVISUAL (gdk_window_get_visual (window)),
width, height);
attach_free_pixmap_handler (surface, GDK_WINDOW_DISPLAY (window), pixmap);
......@@ -1130,7 +1130,7 @@ _gdk_windowing_window_destroy_foreign (GdkWindow *window)
static GdkWindow *
get_root (GdkWindow *window)
{
GdkScreen *screen = gdk_drawable_get_screen (window);
GdkScreen *screen = gdk_window_get_screen (window);
return gdk_screen_get_root_window (screen);
}
......@@ -3037,7 +3037,7 @@ _gdk_windowing_get_device_state (GdkDisplay *display,
x, y,
NULL, NULL,
mask);
*screen = gdk_drawable_get_screen (root);
*screen = gdk_window_get_screen (root);
}
else
{
......@@ -3062,7 +3062,7 @@ _gdk_windowing_get_device_state (GdkDisplay *display,
if (root != None)
{
GdkWindow *gdk_root = gdk_window_lookup_for_display (display, root);
*screen = gdk_drawable_get_screen (gdk_root);
*screen = gdk_window_get_screen (gdk_root);
}
*x = rootx;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment