Commit 2faae9fd authored by Michael Natterer's avatar Michael Natterer Committed by Michael Natterer

move the gtk_widget_get_parent() and gtk_widget_get_parent_window()

2008-08-29  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkwidget.h: move the gtk_widget_get_parent() and
	gtk_widget_get_parent_window() prototypes together with their
	respective setters.

	* gtk/gtkwidget.c: move gtk_widget_get_parent_window() together
	with its setter.


svn path=/trunk/; revision=21240
parent 105f259e
2008-08-29 Michael Natterer <mitch@imendio.com>
* gtk/gtkwidget.h: move the gtk_widget_get_parent() and
gtk_widget_get_parent_window() prototypes together with their
respective setters.
* gtk/gtkwidget.c: move gtk_widget_get_parent_window() together
with its setter.
2008-08-29 Michael Natterer <mitch@imendio.com> 2008-08-29 Michael Natterer <mitch@imendio.com>
* gtk/gtkscrolledwindow.c: events return gboolean not gint, * gtk/gtkscrolledwindow.c: events return gboolean not gint,
......
...@@ -6564,6 +6564,26 @@ gtk_widget_set_parent_window (GtkWidget *widget, ...@@ -6564,6 +6564,26 @@ gtk_widget_set_parent_window (GtkWidget *widget,
} }
} }
/**
* gtk_widget_get_parent_window:
* @widget: a #GtkWidget.
* @returns: the parent window of @widget.
*
* Gets @widget's parent window.
**/
GdkWindow *
gtk_widget_get_parent_window (GtkWidget *widget)
{
GdkWindow *parent_window;
g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL);
parent_window = g_object_get_qdata (G_OBJECT (widget), quark_parent_window);
return (parent_window != NULL) ? parent_window :
(widget->parent != NULL) ? widget->parent->window : NULL;
}
/** /**
* gtk_widget_set_child_visible: * gtk_widget_set_child_visible:
...@@ -6774,26 +6794,6 @@ gtk_widget_get_root_window (GtkWidget *widget) ...@@ -6774,26 +6794,6 @@ gtk_widget_get_root_window (GtkWidget *widget)
return gdk_screen_get_root_window (gtk_widget_get_screen (widget)); return gdk_screen_get_root_window (gtk_widget_get_screen (widget));
} }
/**
* gtk_widget_get_parent_window:
* @widget: a #GtkWidget.
* @returns: the parent window of @widget.
*
* Gets @widget's parent window.
**/
GdkWindow *
gtk_widget_get_parent_window (GtkWidget *widget)
{
GdkWindow *parent_window;
g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL);
parent_window = g_object_get_qdata (G_OBJECT (widget), quark_parent_window);
return (parent_window != NULL) ? parent_window :
(widget->parent != NULL) ? widget->parent->window : NULL;
}
/** /**
* gtk_widget_child_focus: * gtk_widget_child_focus:
* @widget: a #GtkWidget * @widget: a #GtkWidget
......
...@@ -567,17 +567,16 @@ void gtk_widget_set_redraw_on_allocate (GtkWidget *widget, ...@@ -567,17 +567,16 @@ void gtk_widget_set_redraw_on_allocate (GtkWidget *widget,
gboolean redraw_on_allocate); gboolean redraw_on_allocate);
void gtk_widget_set_parent (GtkWidget *widget, void gtk_widget_set_parent (GtkWidget *widget,
GtkWidget *parent); GtkWidget *parent);
GtkWidget * gtk_widget_get_parent (GtkWidget *widget);
void gtk_widget_set_parent_window (GtkWidget *widget, void gtk_widget_set_parent_window (GtkWidget *widget,
GdkWindow *parent_window); GdkWindow *parent_window);
GdkWindow * gtk_widget_get_parent_window (GtkWidget *widget);
void gtk_widget_set_child_visible (GtkWidget *widget, void gtk_widget_set_child_visible (GtkWidget *widget,
gboolean is_visible); gboolean is_visible);
gboolean gtk_widget_get_child_visible (GtkWidget *widget); gboolean gtk_widget_get_child_visible (GtkWidget *widget);
GtkAllocation gtk_widget_get_allocation (GtkWidget *widget); GtkAllocation gtk_widget_get_allocation (GtkWidget *widget);
GdkWindow* gtk_widget_get_window (GtkWidget *widget); GdkWindow* gtk_widget_get_window (GtkWidget *widget);
GtkWidget *gtk_widget_get_parent (GtkWidget *widget);
GdkWindow *gtk_widget_get_parent_window (GtkWidget *widget);
gboolean gtk_widget_child_focus (GtkWidget *widget, gboolean gtk_widget_child_focus (GtkWidget *widget,
GtkDirectionType direction); GtkDirectionType direction);
gboolean gtk_widget_keynav_failed (GtkWidget *widget, gboolean gtk_widget_keynav_failed (GtkWidget *widget,
......
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