summaryrefslogtreecommitdiff
path: root/gtk/gtkwidget.c
diff options
context:
space:
mode:
authorMatthias Clasen <maclas@gmx.de>2003-06-14 22:27:14 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2003-06-14 22:27:14 +0000
commitec280c7b326e45dc014e94021fd290285570ad36 (patch)
treef0bc8b6563a0da5e0405b45dbf08de68297998c2 /gtk/gtkwidget.c
parentee9683ceec0a8d218a100624944f978a738d3d1f (diff)
downloadgdk-pixbuf-ec280c7b326e45dc014e94021fd290285570ad36.tar.gz
Document new properties as 2.4 additions.
2003-06-15 Matthias Clasen <maclas@gmx.de> * gtk/gtkcalendar.c (gtk_calendar_class_init): * gtk/gtknotebook.c (gtk_notebook_class_init): * gtk/gtkalignment.c (gtk_alignment_class_init): * gtk/gtkpaned.c (gtk_paned_class_init): Document new properties as 2.4 additions. * gtk/gtkwidget.c (gtk_widget_class_init): Move inline signal docs to the proper place, immediately before the g_signal_new() call. * gtk/gtktextiter.h: Make the flags-nature of GtkTextSearchFlags more obvious. (#115122, Jeff Franks)
Diffstat (limited to 'gtk/gtkwidget.c')
-rw-r--r--gtk/gtkwidget.c143
1 files changed, 72 insertions, 71 deletions
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index f53f6d3d7..304aa9a09 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -55,77 +55,6 @@
#define WIDGET_CLASS(w) GTK_WIDGET_GET_CLASS (w)
#define INIT_PATH_SIZE (512)
-/**
- * GtkWidget::child-notify:
- * @widget: the object which received the signal.
- * @pspec: the #GParamSpec of the changed child property.
- * @user_data: user data set when the signal handler was connected.
- *
- * The ::child-notify signal is emitted for each child property that has
- * changed on an object. The signal's detail holds the property name.
- */
-
-/**
- * GtkWidget::drag-data-received:
- * @widget: the object which received the signal.
- * @drag_context: the drag context
- * @x: where the drop happened
- * @y: where the drop happened
- * @data: the received data
- * @info: the info that has been registered with the target in the
- * #GtkTargetList.
- * @time: the timestamp at which the data was received
- * @user_data: user data set when the signal handler was connected.
- *
- * The ::drag-data-received signal is emitted on the drop site when the drop
- * happens and the data has been received. A handler for this signal is
- * expected to process the received data and then call gtk_drag_finish(),
- * setting the <literal>success</literal> parameter depending on whether the
- * data was processed successfully.
- *
- * The handler may inspect and modify <literal>context-&gt;action</literal>
- * before calling gtk_drag_finish(), e.g. to implement %GTK_ACTION_ASK as
- * shown in the following example:
- * <informalexample><programlisting>
- * void
- * drag_data_received (GtkWidget *widget,
- * GdkDragContext *context,
- * gint x,
- * gint y,
- * GtkSelectionData *data,
- * guint info,
- * guint time)
- * {
- * if ((data->length >= 0) && (data->format == 8))
- * {
- * if (context->action == GDK_ACTION_ASK)
- * {
- * GtkWidget *dialog;
- * gint response;
- *
- * dialog = gtk_message_dialog_new (NULL,
- * GTK_DIALOG_MODAL |
- * GTK_DIALOG_DESTROY_WITH_PARENT,
- * GTK_MESSAGE_INFO,
- * GTK_BUTTONS_YES_NO,
- * "Move the data ?\n");
- * response = gtk_dialog_run (GTK_DIALOG (dialog));
- * gtk_widget_destroy (dialog);
- *
- * if (response == GTK_RESPONSE_YES)
- * context->action = GDK_ACTION_MOVE;
- * else
- * context->action = GDK_ACTION_COPY;
- * }
- *
- * gtk_drag_finish (context, TRUE, FALSE, time);
- * return;
- * }
- *
- * gtk_drag_finish (context, FALSE, FALSE, time);
- * }
- * </programlisting></informalexample>
- */
enum {
SHOW,
@@ -711,6 +640,16 @@ gtk_widget_class_init (GtkWidgetClass *klass)
_gtk_marshal_VOID__BOOLEAN,
G_TYPE_NONE, 1,
G_TYPE_BOOLEAN);
+
+/**
+ * GtkWidget::child-notify:
+ * @widget: the object which received the signal.
+ * @pspec: the #GParamSpec of the changed child property.
+ * @user_data: user data set when the signal handler was connected.
+ *
+ * The ::child-notify signal is emitted for each child property that has
+ * changed on an object. The signal's detail holds the property name.
+ */
widget_signals[CHILD_NOTIFY] =
g_signal_new ("child_notify",
G_TYPE_FROM_CLASS (gobject_class),
@@ -1056,6 +995,68 @@ gtk_widget_class_init (GtkWidgetClass *klass)
GTK_TYPE_SELECTION_DATA | G_SIGNAL_TYPE_STATIC_SCOPE,
G_TYPE_UINT,
G_TYPE_UINT);
+
+/**
+ * GtkWidget::drag-data-received:
+ * @widget: the object which received the signal.
+ * @drag_context: the drag context
+ * @x: where the drop happened
+ * @y: where the drop happened
+ * @data: the received data
+ * @info: the info that has been registered with the target in the
+ * #GtkTargetList.
+ * @time: the timestamp at which the data was received
+ * @user_data: user data set when the signal handler was connected.
+ *
+ * The ::drag-data-received signal is emitted on the drop site when the drop
+ * happens and the data has been received. A handler for this signal is
+ * expected to process the received data and then call gtk_drag_finish(),
+ * setting the <literal>success</literal> parameter depending on whether the
+ * data was processed successfully.
+ *
+ * The handler may inspect and modify <literal>context-&gt;action</literal>
+ * before calling gtk_drag_finish(), e.g. to implement %GTK_ACTION_ASK as
+ * shown in the following example:
+ * <informalexample><programlisting>
+ * void
+ * drag_data_received (GtkWidget *widget,
+ * GdkDragContext *context,
+ * gint x,
+ * gint y,
+ * GtkSelectionData *data,
+ * guint info,
+ * guint time)
+ * {
+ * if ((data->length >= 0) && (data->format == 8))
+ * {
+ * if (context->action == GDK_ACTION_ASK)
+ * {
+ * GtkWidget *dialog;
+ * gint response;
+ *
+ * dialog = gtk_message_dialog_new (NULL,
+ * GTK_DIALOG_MODAL |
+ * GTK_DIALOG_DESTROY_WITH_PARENT,
+ * GTK_MESSAGE_INFO,
+ * GTK_BUTTONS_YES_NO,
+ * "Move the data ?\n");
+ * response = gtk_dialog_run (GTK_DIALOG (dialog));
+ * gtk_widget_destroy (dialog);
+ *
+ * if (response == GTK_RESPONSE_YES)
+ * context->action = GDK_ACTION_MOVE;
+ * else
+ * context->action = GDK_ACTION_COPY;
+ * }
+ *
+ * gtk_drag_finish (context, TRUE, FALSE, time);
+ * return;
+ * }
+ *
+ * gtk_drag_finish (context, FALSE, FALSE, time);
+ * }
+ * </programlisting></informalexample>
+ */
widget_signals[DRAG_DATA_RECEIVED] =
g_signal_new ("drag_data_received",
G_TYPE_FROM_CLASS (gobject_class),