[gtk+] API: gdk: Remove depth argument from gdk_window_get_geometry()
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] API: gdk: Remove depth argument from gdk_window_get_geometry()
- Date: Mon, 6 Dec 2010 00:31:23 +0000 (UTC)
commit 645d0ac403f6c707d22307d86cc5732c9c20118a
Author: Benjamin Otte <otte redhat com>
Date: Sun Dec 5 14:36:59 2010 +0100
API: gdk: Remove depth argument from gdk_window_get_geometry()
We don't want to expose depth anymore. If you need it, query the visual.
gdk/gdkscreen.c | 2 +-
gdk/gdkwindow.c | 8 ++------
gdk/gdkwindow.h | 3 +--
gdk/x11/gdkdnd-x11.c | 2 +-
gdk/x11/gdkwindow-x11.c | 4 ++--
gtk/gtkiconview.c | 2 +-
gtk/gtkwindow-decorate.c | 4 ++--
7 files changed, 10 insertions(+), 15 deletions(-)
---
diff --git a/gdk/gdkscreen.c b/gdk/gdkscreen.c
index 57b17ff..71cabf5 100644
--- a/gdk/gdkscreen.c
+++ b/gdk/gdkscreen.c
@@ -304,7 +304,7 @@ gdk_screen_get_monitor_at_window (GdkScreen *screen,
g_return_val_if_fail (GDK_IS_SCREEN (screen), -1);
gdk_window_get_geometry (window, &win_rect.x, &win_rect.y, &win_rect.width,
- &win_rect.height, NULL);
+ &win_rect.height);
gdk_window_get_origin (window, &win_rect.x, &win_rect.y);
num_monitors = gdk_screen_get_n_monitors (screen);
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 71959ee..4ab9a26 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -6809,7 +6809,6 @@ gdk_window_set_device_cursor (GdkWindow *window,
* @y: (out) (allow-none): return location for Y coordinate of window (relative to its parent)
* @width: (out) (allow-none): return location for width of window
* @height: (out) (allow-none): return location for height of window
- * @depth: (out) (allow-none): return location for bit depth of window
*
* Any of the return location arguments to this function may be %NULL,
* if you aren't interested in getting the value of that field.
@@ -6839,8 +6838,7 @@ gdk_window_get_geometry (GdkWindow *window,
gint *x,
gint *y,
gint *width,
- gint *height,
- gint *depth)
+ gint *height)
{
GdkWindow *parent;
GdkWindowImplClass *impl_class;
@@ -6862,7 +6860,7 @@ gdk_window_get_geometry (GdkWindow *window,
impl_class = GDK_WINDOW_IMPL_GET_CLASS (window->impl);
impl_class->get_geometry (window, x, y,
width, height,
- depth);
+ NULL);
/* This reports the position wrt to the native parent, we need to convert
it to be relative to the client side parent */
parent = window->parent;
@@ -6884,8 +6882,6 @@ gdk_window_get_geometry (GdkWindow *window,
*width = window->width;
if (height)
*height = window->height;
- if (depth)
- *depth = window->depth;
}
}
}
diff --git a/gdk/gdkwindow.h b/gdk/gdkwindow.h
index 936e69a..05da783 100644
--- a/gdk/gdkwindow.h
+++ b/gdk/gdkwindow.h
@@ -720,8 +720,7 @@ void gdk_window_get_geometry (GdkWindow *window,
gint *x,
gint *y,
gint *width,
- gint *height,
- gint *depth);
+ gint *height);
int gdk_window_get_width (GdkWindow *window);
int gdk_window_get_height (GdkWindow *window);
void gdk_window_get_position (GdkWindow *window,
diff --git a/gdk/x11/gdkdnd-x11.c b/gdk/x11/gdkdnd-x11.c
index 0c94a64..f8f2e13 100644
--- a/gdk/x11/gdkdnd-x11.c
+++ b/gdk/x11/gdkdnd-x11.c
@@ -559,7 +559,7 @@ gdk_window_cache_new (GdkScreen *screen)
toplevel_windows = gdk_screen_get_toplevel_windows (screen);
for (list = toplevel_windows; list; list = list->next) {
window = GDK_WINDOW (list->data);
- gdk_window_get_geometry (window, &x, &y, &width, &height, NULL);
+ gdk_window_get_geometry (window, &x, &y, &width, &height);
gdk_window_cache_add (result, GDK_WINDOW_XID (window),
x, y, width, height,
gdk_window_is_visible (window));
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index 725f77a..51ded44 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -3229,7 +3229,7 @@ _gdk_windowing_window_at_device_position (GdkDisplay *display,
pointer_window = child;
break;
}
- gdk_window_get_geometry (window, NULL, NULL, &width, &height, NULL);
+ gdk_window_get_geometry (window, NULL, NULL, &width, &height);
if (winx >= 0 && winy >= 0 && winx < width && winy < height)
{
/* A childless toplevel, or below another window? */
@@ -5096,7 +5096,7 @@ calculate_unmoving_origin (MoveResizeData *mv_resize)
{
gdk_window_get_frame_extents (mv_resize->moveresize_window, &rect);
gdk_window_get_geometry (mv_resize->moveresize_window,
- NULL, NULL, &width, &height, NULL);
+ NULL, NULL, &width, &height);
switch (mv_resize->moveresize_geometry.win_gravity)
{
diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c
index 17ce6af..243106e 100644
--- a/gtk/gtkiconview.c
+++ b/gtk/gtkiconview.c
@@ -6704,7 +6704,7 @@ gtk_icon_view_autoscroll (GtkIconView *icon_view)
window = gtk_widget_get_window (GTK_WIDGET (icon_view));
gdk_window_get_pointer (window, &px, &py, NULL);
- gdk_window_get_geometry (window, &x, &y, &width, &height, NULL);
+ gdk_window_get_geometry (window, &x, &y, &width, &height);
/* see if we are near the edge. */
voffset = py - (y + 2 * SCROLL_EDGE_SIZE);
diff --git a/gtk/gtkwindow-decorate.c b/gtk/gtkwindow-decorate.c
index 1a276f8..d58feb3 100644
--- a/gtk/gtkwindow-decorate.c
+++ b/gtk/gtkwindow-decorate.c
@@ -362,7 +362,7 @@ gtk_decorated_window_motion_notify (GtkWidget *widget,
win_x += DECORATION_BORDER_LEFT;
win_y += DECORATION_BORDER_TOP;
- gdk_window_get_geometry (win, NULL, NULL, &win_w, &win_h, NULL);
+ gdk_window_get_geometry (win, NULL, NULL, &win_w, &win_h);
if (deco->moving)
{
@@ -547,7 +547,7 @@ gtk_decorated_window_window_state (GtkWidget *widget,
{
int w, h;
gdk_window_get_geometry (widget->window, NULL, NULL,
- &deco->last_w, &deco->last_h, NULL);
+ &deco->last_w, &deco->last_h);
gdk_window_get_origin (widget->window, &deco->last_x, &deco->last_y);
w = gdk_screen_get_width(gdk_screen_get_default()) - DECORATION_BORDER_TOT_X;
h = gdk_screen_get_height(gdk_screen_get_default()) - DECORATION_BORDER_TOT_Y;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]