gtk+ r20629 - trunk/gtk



Author: timj
Date: Fri Jun 20 11:10:37 2008
New Revision: 20629
URL: http://svn.gnome.org/viewvc/gtk+?rev=20629&view=rev

Log:
Add gtk_plug_get_socket_window


Modified:
   trunk/gtk/gtk.symbols
   trunk/gtk/gtkplug.c
   trunk/gtk/gtkplug.h

Modified: trunk/gtk/gtk.symbols
==============================================================================
--- trunk/gtk/gtk.symbols	(original)
+++ trunk/gtk/gtk.symbols	Fri Jun 20 11:10:37 2008
@@ -2502,6 +2502,7 @@
 gtk_plug_construct_for_display
 gtk_plug_get_id
 gtk_plug_get_embedded
+gtk_plug_get_socket_window
 gtk_plug_get_type G_GNUC_CONST
 gtk_plug_new
 gtk_plug_new_for_display

Modified: trunk/gtk/gtkplug.c
==============================================================================
--- trunk/gtk/gtkplug.c	(original)
+++ trunk/gtk/gtkplug.c	Fri Jun 20 11:10:37 2008
@@ -71,6 +71,7 @@
 enum {
   PROP_0,
   PROP_EMBEDDED,
+  PROP_SOCKET_WINDOW
 };
 
 enum {
@@ -95,6 +96,9 @@
     case PROP_EMBEDDED:
       g_value_set_boolean (value, plug->socket_window != NULL);
       break;
+    case PROP_SOCKET_WINDOW:
+      g_value_set_object (value, plug->socket_window);
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -149,6 +153,21 @@
 							 GTK_PARAM_READABLE));
 
   /**
+   * GtkPlug:socket-window:
+   *
+   * The window of the socket the plug is embedded in.
+   *
+   * Since: GSEAL-branch
+   */
+  g_object_class_install_property (gobject_class,
+				   PROP_SOCKET_WINDOW,
+				   g_param_spec_object ("socket window",
+							P_("Socket Window"),
+							P_("The window of the socket the plug is embedded in"),
+							GDK_TYPE_WINDOW,
+							GTK_PARAM_READABLE));
+
+  /**
    * GtkPlug::embedded:
    * @plug: the object on which the signal was emitted
    *
@@ -249,7 +268,7 @@
  * @plug: a #GtkPlug
  *
  * Determines whether the plug is embedded in a socket.
- * 
+ *
  * Return value: %TRUE if the plug is embedded in a socket
  **/
 gboolean
@@ -261,6 +280,22 @@
 }
 
 /**
+ * gtk_plug_get_socket_window:
+ * @plug: a #GtkPlug
+ *
+ * Retrieves the socket the plug is embedded in.
+ *
+ * Return value: the window of the socket, or %NULL
+ **/
+GdkWindow *
+gtk_plug_get_socket_window (GtkPlug *plug)
+{
+  g_return_val_if_fail (GTK_IS_PLUG (plug), NULL);
+
+  return plug->socket_window;
+}
+
+/**
  * _gtk_plug_add_to_socket:
  * @plug: a #GtkPlug
  * @socket_: a #GtkSocket

Modified: trunk/gtk/gtkplug.h
==============================================================================
--- trunk/gtk/gtkplug.h	(original)
+++ trunk/gtk/gtkplug.h	Fri Jun 20 11:10:37 2008
@@ -94,6 +94,8 @@
 
 gboolean  gtk_plug_get_embedded (GtkPlug         *plug);
 
+GdkWindow *gtk_plug_get_socket_window (GtkPlug   *plug);
+
 void _gtk_plug_add_to_socket      (GtkPlug   *plug,
 				   GtkSocket *socket_);
 void _gtk_plug_remove_from_socket (GtkPlug   *plug,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]