summaryrefslogtreecommitdiff
path: root/gtk/gtkgesturedrag.c
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2014-04-09 18:28:20 +0200
committerCarlos Garnacho <carlosg@gnome.org>2014-05-23 19:54:27 +0200
commit28237f80f59666a5049d505cf0b6b89c90584b77 (patch)
tree95401eb99acbe1664ac36c5ccdc8811b61536cf0 /gtk/gtkgesturedrag.c
parent90b2f386e76ca92b1aba76ce8bf13c1621841e96 (diff)
downloadgtk+-28237f80f59666a5049d505cf0b6b89c90584b77.tar.gz
drag: Add missing documentation
Diffstat (limited to 'gtk/gtkgesturedrag.c')
-rw-r--r--gtk/gtkgesturedrag.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/gtk/gtkgesturedrag.c b/gtk/gtkgesturedrag.c
index 66256ef22a..812fc6b3d0 100644
--- a/gtk/gtkgesturedrag.c
+++ b/gtk/gtkgesturedrag.c
@@ -16,6 +16,20 @@
*
* Author(s): Carlos Garnacho <carlosg@gnome.org>
*/
+
+/**
+ * SECTION:gtkgesturedrag
+ * @Short_description: Drag gesture
+ * @Title: GtkGestureDrag
+ * @See_also: #GtkGestureSwipe
+ *
+ * #GtkGestureDrag is a #GtkGesture implementation that recognizes drag
+ * operations. The drag operation itself can be tracked throught the
+ * #GtkGestureDrag:drag-begin, #GtkGestureDrag:drag-update and
+ * #GtkGestureDrag:drag-end signals, or the relevant coordinates be
+ * extracted through gtk_gesture_drag_get_offset() and
+ * gtk_gesture_drag_get_start_point().
+ */
#include "config.h"
#include <gtk/gtkgesturedrag.h>
@@ -100,6 +114,16 @@ gtk_gesture_drag_class_init (GtkGestureDragClass *klass)
gesture_class->update = gtk_gesture_drag_update;
gesture_class->end = gtk_gesture_drag_end;
+ /**
+ * GtkGestureDrag:drag-begin:
+ * @gesture: the object which received the signal
+ * @start_x: X coordinate, relative to the widget allocation
+ * @start_y: Y coordinate, relative to the widget allocation
+ *
+ * This signal is emitted whenever dragging starts.
+ *
+ * Since: 3.14
+ */
signals[DRAG_BEGIN] =
g_signal_new ("drag-begin",
G_TYPE_FROM_CLASS (klass),
@@ -107,6 +131,16 @@ gtk_gesture_drag_class_init (GtkGestureDragClass *klass)
G_STRUCT_OFFSET (GtkGestureDragClass, drag_begin),
NULL, NULL, NULL,
G_TYPE_NONE, 2, G_TYPE_DOUBLE, G_TYPE_DOUBLE);
+ /**
+ * GtkGestureDrag:drag-update:
+ * @gesture: the object which received the signal
+ * @offset_x: X offset, relative to the start point
+ * @offset_y: Y offset, relative to the start point
+ *
+ * This signal is emitted whenever the dragging point moves.
+ *
+ * Since: 3.14
+ */
signals[DRAG_UPDATE] =
g_signal_new ("drag-update",
G_TYPE_FROM_CLASS (klass),
@@ -114,6 +148,16 @@ gtk_gesture_drag_class_init (GtkGestureDragClass *klass)
G_STRUCT_OFFSET (GtkGestureDragClass, drag_update),
NULL, NULL, NULL,
G_TYPE_NONE, 2, G_TYPE_DOUBLE, G_TYPE_DOUBLE);
+ /**
+ * GtkGestureDrag:drag-end:
+ * @gesture: the object which received the signal
+ * @offset_x: X offset, relative to the start point
+ * @offset_y: Y offset, relative to the start point
+ *
+ * This signal is emitted whenever the dragging is finished.
+ *
+ * Since: 3.14
+ */
signals[DRAG_END] =
g_signal_new ("drag-end",
G_TYPE_FROM_CLASS (klass),