]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkinvisible.c
Some more documentation fixes
[~andy/gtk] / gtk / gtkinvisible.c
index e08f62da24ada571a493274bf23f843ded6891cb..27ca2502cbc66b18a5342a035c9d71d80591675d 100644 (file)
@@ -12,9 +12,7 @@
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  */
 
 /*
 #include "config.h"
 #include <gdk/gdk.h>
 #include "gtkinvisible.h"
+#include "gtkwidgetprivate.h"
 #include "gtkprivate.h"
 #include "gtkintl.h"
 
+
+/**
+ * SECTION:gtkinvisible
+ * @Short_description: A widget which is not displayed
+ * @Title: GtkInvisible
+ *
+ * The #GtkInvisible widget is used internally in GTK+, and is probably not
+ * very useful for application developers.
+ *
+ * It is used for reliable pointer grabs and selection handling in the code
+ * for drag-and-drop.
+ */
+
+
 struct _GtkInvisiblePrivate
 {
   GdkScreen    *screen;
@@ -44,8 +57,7 @@ enum {
 
 static void gtk_invisible_destroy       (GtkWidget         *widget);
 static void gtk_invisible_realize       (GtkWidget         *widget);
-static void gtk_invisible_style_set     (GtkWidget         *widget,
-                                        GtkStyle          *previous_style);
+static void gtk_invisible_style_updated (GtkWidget         *widget);
 static void gtk_invisible_show          (GtkWidget         *widget);
 static void gtk_invisible_size_allocate (GtkWidget         *widget,
                                         GtkAllocation     *allocation);
@@ -74,7 +86,7 @@ gtk_invisible_class_init (GtkInvisibleClass *class)
   gobject_class = (GObjectClass*) class;
 
   widget_class->realize = gtk_invisible_realize;
-  widget_class->style_set = gtk_invisible_style_set;
+  widget_class->style_updated = gtk_invisible_style_updated;
   widget_class->show = gtk_invisible_show;
   widget_class->size_allocate = gtk_invisible_size_allocate;
   widget_class->destroy = gtk_invisible_destroy;
@@ -248,14 +260,11 @@ gtk_invisible_realize (GtkWidget *widget)
 
   window = gdk_window_new (parent, &attributes, attributes_mask);
   gtk_widget_set_window (widget, window);
-  gdk_window_set_user_data (window, widget);
-
-  gtk_widget_style_attach (widget);
+  gtk_widget_register_window (widget, window);
 }
 
 static void
-gtk_invisible_style_set (GtkWidget *widget,
-                        GtkStyle  *previous_style)
+gtk_invisible_style_updated (GtkWidget *widget)
 {
   /* Don't chain up to parent implementation */
 }
@@ -263,7 +272,7 @@ gtk_invisible_style_set (GtkWidget *widget,
 static void
 gtk_invisible_show (GtkWidget *widget)
 {
-  GTK_WIDGET_SET_FLAGS (widget, GTK_VISIBLE);
+  _gtk_widget_set_visible_flag (widget, TRUE);
   gtk_widget_map (widget);
 }