forked from AuroraMiddleware/gtk
gesturedrag: Convert docs
This commit is contained in:
parent
d4f2121bc2
commit
e604c3b77c
@ -18,17 +18,17 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SECTION:gtkgesturedrag
|
* GtkGestureDrag:
|
||||||
* @Short_description: Drag gesture
|
|
||||||
* @Title: GtkGestureDrag
|
|
||||||
* @See_also: #GtkGestureSwipe
|
|
||||||
*
|
*
|
||||||
* #GtkGestureDrag is a #GtkGesture implementation that recognizes drag
|
* `GtkGestureDrag` is a `GtkGesture` implementation for drags.
|
||||||
* operations. The drag operation itself can be tracked throughout the
|
*
|
||||||
* #GtkGestureDrag::drag-begin, #GtkGestureDrag::drag-update and
|
* The drag operation itself can be tracked throughout the
|
||||||
* #GtkGestureDrag::drag-end signals, or the relevant coordinates be
|
* [signal@Gtk.GestureDrag::drag-begin],
|
||||||
* extracted through gtk_gesture_drag_get_offset() and
|
* [signal@Gtk.GestureDrag::drag-update] and
|
||||||
* gtk_gesture_drag_get_start_point().
|
* [signal@Gtk.GestureDrag::drag-end] signals, and the relevant
|
||||||
|
* coordinates can be extracted through
|
||||||
|
* [method@Gtk.GestureDrag.get_offset] and
|
||||||
|
* [method@Gtk.GestureDrag.get_start_point].
|
||||||
*/
|
*/
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "gtkgesturedrag.h"
|
#include "gtkgesturedrag.h"
|
||||||
@ -148,7 +148,7 @@ gtk_gesture_drag_class_init (GtkGestureDragClass *klass)
|
|||||||
* @start_x: X coordinate, relative to the widget allocation
|
* @start_x: X coordinate, relative to the widget allocation
|
||||||
* @start_y: Y coordinate, relative to the widget allocation
|
* @start_y: Y coordinate, relative to the widget allocation
|
||||||
*
|
*
|
||||||
* This signal is emitted whenever dragging starts.
|
* Emitted whenever dragging starts.
|
||||||
*/
|
*/
|
||||||
signals[DRAG_BEGIN] =
|
signals[DRAG_BEGIN] =
|
||||||
g_signal_new (I_("drag-begin"),
|
g_signal_new (I_("drag-begin"),
|
||||||
@ -167,7 +167,7 @@ gtk_gesture_drag_class_init (GtkGestureDragClass *klass)
|
|||||||
* @offset_x: X offset, relative to the start point
|
* @offset_x: X offset, relative to the start point
|
||||||
* @offset_y: Y offset, relative to the start point
|
* @offset_y: Y offset, relative to the start point
|
||||||
*
|
*
|
||||||
* This signal is emitted whenever the dragging point moves.
|
* Emitted whenever the dragging point moves.
|
||||||
*/
|
*/
|
||||||
signals[DRAG_UPDATE] =
|
signals[DRAG_UPDATE] =
|
||||||
g_signal_new (I_("drag-update"),
|
g_signal_new (I_("drag-update"),
|
||||||
@ -186,7 +186,7 @@ gtk_gesture_drag_class_init (GtkGestureDragClass *klass)
|
|||||||
* @offset_x: X offset, relative to the start point
|
* @offset_x: X offset, relative to the start point
|
||||||
* @offset_y: Y offset, relative to the start point
|
* @offset_y: Y offset, relative to the start point
|
||||||
*
|
*
|
||||||
* This signal is emitted whenever the dragging is finished.
|
* Emitted whenever the dragging is finished.
|
||||||
*/
|
*/
|
||||||
signals[DRAG_END] =
|
signals[DRAG_END] =
|
||||||
g_signal_new (I_("drag-end"),
|
g_signal_new (I_("drag-end"),
|
||||||
@ -209,9 +209,9 @@ gtk_gesture_drag_init (GtkGestureDrag *gesture)
|
|||||||
/**
|
/**
|
||||||
* gtk_gesture_drag_new:
|
* gtk_gesture_drag_new:
|
||||||
*
|
*
|
||||||
* Returns a newly created #GtkGesture that recognizes drags.
|
* Returns a newly created `GtkGesture` that recognizes drags.
|
||||||
*
|
*
|
||||||
* Returns: a newly created #GtkGestureDrag
|
* Returns: a newly created `GtkGestureDrag`
|
||||||
**/
|
**/
|
||||||
GtkGesture *
|
GtkGesture *
|
||||||
gtk_gesture_drag_new (void)
|
gtk_gesture_drag_new (void)
|
||||||
@ -222,16 +222,18 @@ gtk_gesture_drag_new (void)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_gesture_drag_get_start_point:
|
* gtk_gesture_drag_get_start_point:
|
||||||
* @gesture: a #GtkGesture
|
* @gesture: a `GtkGesture`
|
||||||
* @x: (out) (nullable): X coordinate for the drag start point
|
* @x: (out) (nullable): X coordinate for the drag start point
|
||||||
* @y: (out) (nullable): Y coordinate for the drag start point
|
* @y: (out) (nullable): Y coordinate for the drag start point
|
||||||
*
|
*
|
||||||
|
* Gets the point where the drag started.
|
||||||
|
*
|
||||||
* If the @gesture is active, this function returns %TRUE
|
* If the @gesture is active, this function returns %TRUE
|
||||||
* and fills in @x and @y with the drag start coordinates,
|
* and fills in @x and @y with the drag start coordinates,
|
||||||
* in window-relative coordinates.
|
* in surface-relative coordinates.
|
||||||
*
|
*
|
||||||
* Returns: %TRUE if the gesture is active
|
* Returns: %TRUE if the gesture is active
|
||||||
**/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
gtk_gesture_drag_get_start_point (GtkGestureDrag *gesture,
|
gtk_gesture_drag_get_start_point (GtkGestureDrag *gesture,
|
||||||
double *x,
|
double *x,
|
||||||
@ -264,12 +266,14 @@ gtk_gesture_drag_get_start_point (GtkGestureDrag *gesture,
|
|||||||
* @x: (out) (nullable): X offset for the current point
|
* @x: (out) (nullable): X offset for the current point
|
||||||
* @y: (out) (nullable): Y offset for the current point
|
* @y: (out) (nullable): Y offset for the current point
|
||||||
*
|
*
|
||||||
|
* Gets the offset from the start point.
|
||||||
|
*
|
||||||
* If the @gesture is active, this function returns %TRUE and
|
* If the @gesture is active, this function returns %TRUE and
|
||||||
* fills in @x and @y with the coordinates of the current point,
|
* fills in @x and @y with the coordinates of the current point,
|
||||||
* as an offset to the starting drag point.
|
* as an offset to the starting drag point.
|
||||||
*
|
*
|
||||||
* Returns: %TRUE if the gesture is active
|
* Returns: %TRUE if the gesture is active
|
||||||
**/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
gtk_gesture_drag_get_offset (GtkGestureDrag *gesture,
|
gtk_gesture_drag_get_offset (GtkGestureDrag *gesture,
|
||||||
double *x,
|
double *x,
|
||||||
|
Loading…
Reference in New Issue
Block a user