gtk+ r20601 - trunk/gtk



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

Log:
Seal GtkHandleBox


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

Modified: trunk/gtk/gtk.symbols
==============================================================================
--- trunk/gtk/gtk.symbols	(original)
+++ trunk/gtk/gtk.symbols	Fri Jun 20 11:07:56 2008
@@ -1584,6 +1584,7 @@
 gtk_handle_box_get_handle_position
 gtk_handle_box_get_shadow_type
 gtk_handle_box_get_snap_edge
+gtk_handle_box_get_child_detached
 gtk_handle_box_get_type G_GNUC_CONST
 gtk_handle_box_new
 gtk_handle_box_set_handle_position

Modified: trunk/gtk/gtkhandlebox.c
==============================================================================
--- trunk/gtk/gtkhandlebox.c	(original)
+++ trunk/gtk/gtkhandlebox.c	Fri Jun 20 11:07:56 2008
@@ -50,7 +50,8 @@
   PROP_SHADOW_TYPE,
   PROP_HANDLE_POSITION,
   PROP_SNAP_EDGE,
-  PROP_SNAP_EDGE_SET
+  PROP_SNAP_EDGE_SET,
+  PROP_CHILD_DETACHED
 };
 
 #define DRAG_HANDLE_SIZE 10
@@ -205,6 +206,14 @@
 							 FALSE,
 							 GTK_PARAM_READWRITE));
 
+  g_object_class_install_property (gobject_class,
+                                   PROP_CHILD_DETACHED,
+                                   g_param_spec_boolean ("child-detached",
+							 P_("Child Detached"),
+							 P_("A boolean value indicating whether the handlebox's child is attached or detached."),
+							 FALSE,
+							 GTK_PARAM_READABLE));
+
   object_class->destroy = gtk_handle_box_destroy;
 
   widget_class->map = gtk_handle_box_map;
@@ -323,6 +332,9 @@
     case PROP_SNAP_EDGE_SET:
       g_value_set_boolean (value, handle_box->snap_edge != -1);
       break;
+    case PROP_CHILD_DETACHED:
+      g_value_set_boolean (value, handle_box->child_detached);
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -850,6 +862,24 @@
   return handle_box->snap_edge;
 }
 
+/**
+ * gtk_handle_box_get_child_detached:
+ * @handle_box: a #GtkHandleBox
+ *
+ * Whether the handlebox's child is currently detached.
+ *
+ * Return value: %TRUE if the child is currently detached, otherwise %FALSE
+ *
+ * Since:  GSEAL-branch
+ **/
+gboolean
+gtk_handle_box_get_child_detached (GtkHandleBox *handle_box)
+{
+  g_return_val_if_fail (GTK_IS_HANDLE_BOX (handle_box), FALSE);
+
+  return handle_box->child_detached;
+}
+
 static void
 gtk_handle_box_paint (GtkWidget      *widget,
 		  

Modified: trunk/gtk/gtkhandlebox.h
==============================================================================
--- trunk/gtk/gtkhandlebox.h	(original)
+++ trunk/gtk/gtkhandlebox.h	Fri Jun 20 11:07:56 2008
@@ -58,23 +58,23 @@
 {
   GtkBin bin;
 
-  GdkWindow      *bin_window;	/* parent window for children */
-  GdkWindow      *float_window;
-  GtkShadowType   shadow_type;
-  guint		  handle_position : 2;
-  guint		  float_window_mapped : 1;
-  guint		  child_detached : 1;
-  guint		  in_drag : 1;
-  guint		  shrink_on_detach : 1;
+  GdkWindow      *GSEAL (bin_window);	/* parent window for children */
+  GdkWindow      *GSEAL (float_window);
+  GtkShadowType   GSEAL (shadow_type);
+  guint		  GSEAL (handle_position : 2);
+  guint		  GSEAL (float_window_mapped : 1);
+  guint		  GSEAL (child_detached : 1);
+  guint		  GSEAL (in_drag : 1);
+  guint		  GSEAL (shrink_on_detach : 1);
 
-  signed int      snap_edge : 3; /* -1 == unset */
+  signed int      GSEAL (snap_edge : 3); /* -1 == unset */
   
   /* Variables used during a drag
    */
-  gint deskoff_x, deskoff_y; /* Offset between root relative coordinates
+  gint GSEAL (deskoff_x), GSEAL (deskoff_y); /* Offset between root relative coordinates
 			      * and deskrelative coordinates */
-  GtkAllocation   attach_allocation;
-  GtkAllocation   float_allocation;
+  GtkAllocation   GSEAL (attach_allocation);
+  GtkAllocation   GSEAL (float_allocation);
 };
 
 struct _GtkHandleBoxClass
@@ -105,6 +105,7 @@
 void          gtk_handle_box_set_snap_edge        (GtkHandleBox    *handle_box,
 						   GtkPositionType  edge);
 GtkPositionType gtk_handle_box_get_snap_edge      (GtkHandleBox    *handle_box);
+gboolean      gtk_handle_box_get_child_detached   (GtkHandleBox    *handle_box);
 
 G_END_DECLS
 



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