[gdl] docs: Fixed and added some gtk-doc comments



commit f80d307cb3b8d12da0e0ae88f53c0360d6d9586c
Author: Johannes Schmid <jhs gnome org>
Date:   Sun Jun 27 10:11:21 2010 +0200

    docs: Fixed and added some gtk-doc comments

 gdl/gdl-dock-item-button-image.c |    2 +-
 gdl/gdl-dock-item-grip.c         |   13 ++++++-------
 gdl/gdl-dock-item.h              |   35 +++++++++++++++++++++++++++++++----
 3 files changed, 38 insertions(+), 12 deletions(-)
---
diff --git a/gdl/gdl-dock-item-button-image.c b/gdl/gdl-dock-item-button-image.c
index da0cba2..31613a8 100644
--- a/gdl/gdl-dock-item-button-image.c
+++ b/gdl/gdl-dock-item-button-image.c
@@ -149,7 +149,7 @@ gdl_dock_item_button_image_class_init (
 
 /**
  * gdl_dock_item_button_image_new:
- * @param image_type: Specifies what type of image the widget should
+ * @image_type: Specifies what type of image the widget should
  * display
  * 
  * Creates a new GDL dock button image object.
diff --git a/gdl/gdl-dock-item-grip.c b/gdl/gdl-dock-item-grip.c
index c4cd573..06c791b 100644
--- a/gdl/gdl-dock-item-grip.c
+++ b/gdl/gdl-dock-item-grip.c
@@ -257,10 +257,6 @@ gdl_dock_item_grip_close_clicked (GtkWidget       *widget,
     gdl_dock_item_hide_item (grip->item);
 }
 
-#if !GTK_CHECK_VERSION (2, 22, 0)
-#  define gtk_button_get_event_window(button) button->event_window
-#endif // Gtk+ >= 2.22
-
 static void
 gdl_dock_item_grip_fix_iconify_button (GdlDockItemGrip *grip)
 {
@@ -270,10 +266,11 @@ gdl_dock_item_grip_fix_iconify_button (GdlDockItemGrip *grip)
 
     GdkModifierType modifiers;
     gint x = 0, y = 0;
+    gboolean ev_ret;
 
     g_return_if_fail (gtk_widget_get_realized (iconify_button));
 
-    window = gtk_button_get_event_window (GTK_BUTTON (iconify_button));
+    window = gtk_widget_get_parent_window (iconify_button);
     event = gdk_event_new (GDK_LEAVE_NOTIFY);
 
     g_assert (GDK_IS_WINDOW (window));
@@ -291,7 +288,9 @@ gdl_dock_item_grip_fix_iconify_button (GdlDockItemGrip *grip)
     event->crossing.focus = FALSE;
     event->crossing.state = modifiers;
 
-    gtk_widget_event (iconify_button, event);
+    //GTK_BUTTON (iconify_button)->in_button = FALSE;
+    g_signal_emit_by_name (iconify_button, "leave-notify-event",
+                           event, &ev_ret, 0);
 
     gdk_event_free (event);
 }
@@ -759,7 +758,7 @@ gdl_dock_item_grip_set_label (GdlDockItemGrip *grip,
 }
 /**
  * gdl_dock_item_grip_hide_handle:
- * @item: The dock item grip to hide the handle of.
+ * @grip: The dock item grip to hide the handle of.
  * 
  * This function hides the dock item's grip widget handle hatching.
  **/
diff --git a/gdl/gdl-dock-item.h b/gdl/gdl-dock-item.h
index ea47a83..f20e74c 100644
--- a/gdl/gdl-dock-item.h
+++ b/gdl/gdl-dock-item.h
@@ -42,7 +42,26 @@ G_BEGIN_DECLS
 #define GDL_IS_DOCK_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDL_TYPE_DOCK_ITEM))
 #define GDL_DOCK_ITEM_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_DOCK_ITEM, GdlDockItemClass))
 
-/* data types & structures */
+/**
+ * GdlDockItemBehavior:
+ * @GDL_DOCK_ITEM_BEH_NORMAL: Normal dock item
+ * @GDL_DOCK_ITEM_BEH_NEVER_FLOATING: item cannot be undocked
+ * @GDL_DOCK_ITEM_BEH_NEVER_VERTICAL: item cannot be docked vertically
+ * @GDL_DOCK_ITEM_BEH_NEVER_HORIZONTAL: item cannot be docked horizontally
+ * @GDL_DOCK_ITEM_BEH_LOCKED: item is locked, it cannot be moved around
+ * @GDL_DOCK_ITEM_BEH_CANT_DOCK_TOP: item cannot be docked at top
+ * @GDL_DOCK_ITEM_BEH_CANT_DOCK_BOTTOM: item cannot be docked at bottom
+ * @GDL_DOCK_ITEM_BEH_CANT_DOCK_LEFT: item cannot be docked left
+ * @GDL_DOCK_ITEM_BEH_CANT_DOCK_RIGHT: item cannot be docked right
+ * @GDL_DOCK_ITEM_BEH_CANT_DOCK_CENTER: item cannot be docked at center
+ * @GDL_DOCK_ITEM_BEH_CANT_CLOSE: item cannot be closed
+ * @GDL_DOCK_ITEM_BEH_CANT_ICONIFY: item cannot be iconified
+ * @GDL_DOCK_ITEM_BEH_NO_GRIP: item doesn't have a grip
+ *
+ * Described the behaviour of a doc item. The item can have multiple flags set.
+ *
+ **/
+
 typedef enum {
     GDL_DOCK_ITEM_BEH_NORMAL           = 0,
     GDL_DOCK_ITEM_BEH_NEVER_FLOATING   = 1 << 0,
@@ -59,12 +78,21 @@ typedef enum {
     GDL_DOCK_ITEM_BEH_NO_GRIP          = 1 << 11
 } GdlDockItemBehavior;
 
+
+/**
+ * GdlDockItemFlags:
+ * @GDL_DOCK_IN_DRAG: item is in a drag operation
+ * @GDL_DOCK_IN_PREDRAG: item is in a predrag operation
+ * @GDL_DOCK_ICONIFIED: item is iconified
+ * @GDL_DOCK_USER_ACTION: indicates the user has started an action on the dock item
+ *
+ * Status flag of a GdlDockItem. Don't use unless you derive a widget from GdlDockItem
+ *
+ **/
 typedef enum {
     GDL_DOCK_IN_DRAG             = 1 << GDL_DOCK_OBJECT_FLAGS_SHIFT,
     GDL_DOCK_IN_PREDRAG          = 1 << (GDL_DOCK_OBJECT_FLAGS_SHIFT + 1),
     GDL_DOCK_ICONIFIED           = 1 << (GDL_DOCK_OBJECT_FLAGS_SHIFT + 2),
-    /* for general use: indicates the user has started an action on
-       the dock item */
     GDL_DOCK_USER_ACTION         = 1 << (GDL_DOCK_OBJECT_FLAGS_SHIFT + 3)
 } GdlDockItemFlags;
 
@@ -103,7 +131,6 @@ struct _GdlDockItemClass {
                                    GtkOrientation  orientation);
 };
 
-/* additional macros */
 #define GDL_DOCK_ITEM_FLAGS(item)     (GDL_DOCK_OBJECT (item)->flags)
 #define GDL_DOCK_ITEM_IN_DRAG(item) \
     ((GDL_DOCK_ITEM_FLAGS (item) & GDL_DOCK_IN_DRAG) != 0)



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