mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-01 16:30:15 +00:00
dragicon: Convert docs
This commit is contained in:
parent
c11ec03642
commit
eb77ff9696
@ -36,19 +36,17 @@
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SECTION:gtkdragicon
|
* GtkDragIcon:
|
||||||
* @Short_description: A toplevel to use as drag icon
|
|
||||||
* @Title: GtkDragIcon
|
|
||||||
*
|
*
|
||||||
* GtkDragIcon is a #GtkRoot implementation with the sole purpose
|
* `GtkDragIcon` is a `GtkRoot` implementation for drag icons.
|
||||||
* to serve as a drag icon during DND operations. A drag icon moves
|
*
|
||||||
* with the pointer during a drag operation and is destroyed when
|
* A drag icon moves with the pointer during a drag-and-drop operation
|
||||||
* the drag ends.
|
* and is destroyed when the drag ends.
|
||||||
*
|
*
|
||||||
* To set up a drag icon and associate it with an ongoing drag operation,
|
* To set up a drag icon and associate it with an ongoing drag operation,
|
||||||
* use gtk_drag_icon_get_for_drag() to get the icon for a drag. You can
|
* use [func@Gtk.DragIcon.get_for_drag] to get the icon for a drag. You can
|
||||||
* then use it like any other widget and use gtk_drag_icon_set_child() to
|
* then use it like any other widget and use [method@Gtk.DragIcon.set_child]
|
||||||
* set whatever widget should be used for the drag icon.
|
* to set whatever widget should be used for the drag icon.
|
||||||
*
|
*
|
||||||
* Keep in mind that drag icons do not allow user input.
|
* Keep in mind that drag icons do not allow user input.
|
||||||
*/
|
*/
|
||||||
@ -366,7 +364,7 @@ gtk_drag_icon_class_init (GtkDragIconClass *klass)
|
|||||||
widget_class->hide = gtk_drag_icon_hide;
|
widget_class->hide = gtk_drag_icon_hide;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GtkDragIcon:child:
|
* GtkDragIcon:child: (attributes org.gtk.Property.get=gtk_drag_icon_get_child org.gtk.Property.set=gtk_drag_icon_set_child)
|
||||||
*
|
*
|
||||||
* The widget to display as drag icon.
|
* The widget to display as drag icon.
|
||||||
*/
|
*/
|
||||||
@ -389,14 +387,14 @@ gtk_drag_icon_init (GtkDragIcon *self)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_drag_icon_get_for_drag:
|
* gtk_drag_icon_get_for_drag:
|
||||||
* @drag: a #GdkDrag
|
* @drag: a `GdkDrag`
|
||||||
*
|
*
|
||||||
* Gets the #GtkDragIcon in use with @drag.
|
* Gets the `GtkDragIcon` in use with @drag.
|
||||||
*
|
*
|
||||||
* If no drag icon exists yet, a new one will be created
|
* If no drag icon exists yet, a new one will be created
|
||||||
* and shown.
|
* and shown.
|
||||||
*
|
*
|
||||||
* Returns: (transfer none): the #GtkDragIcon
|
* Returns: (transfer none): the `GtkDragIcon`
|
||||||
*/
|
*/
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
gtk_drag_icon_get_for_drag (GdkDrag *drag)
|
gtk_drag_icon_get_for_drag (GdkDrag *drag)
|
||||||
@ -427,14 +425,16 @@ gtk_drag_icon_get_for_drag (GdkDrag *drag)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_drag_icon_set_from_paintable:
|
* gtk_drag_icon_set_from_paintable:
|
||||||
* @drag: a #GdkDrag
|
* @drag: a `GdkDrag`
|
||||||
* @paintable: a #GdkPaintable to display
|
* @paintable: a `GdkPaintable` to display
|
||||||
* @hot_x: X coordinate of the hotspot
|
* @hot_x: X coordinate of the hotspot
|
||||||
* @hot_y: Y coordinate of the hotspot
|
* @hot_y: Y coordinate of the hotspot
|
||||||
*
|
*
|
||||||
* Creates a #GtkDragIcon that shows @paintable, and associates
|
* Creates a `GtkDragIcon` that shows @paintable, and associates
|
||||||
* it with the drag operation. The hotspot position on the paintable
|
* it with the drag operation.
|
||||||
* is aligned with the hotspot of the cursor.
|
*
|
||||||
|
* The hotspot position on the paintable is aligned with the
|
||||||
|
* hotspot of the cursor.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_drag_icon_set_from_paintable (GdkDrag *drag,
|
gtk_drag_icon_set_from_paintable (GdkDrag *drag,
|
||||||
@ -455,12 +455,12 @@ gtk_drag_icon_set_from_paintable (GdkDrag *drag,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_drag_icon_set_child:
|
* gtk_drag_icon_set_child: (attributes org.gtk.Method.set_property=child)
|
||||||
* @self: a #GtkDragIcon
|
* @self: a `GtkDragIcon`
|
||||||
* @child: (nullable): a #GtkWidget or %NULL
|
* @child: (nullable): a `GtkWidget` or %NULL
|
||||||
*
|
*
|
||||||
* Sets the widget to display as the drag icon.
|
* Sets the widget to display as the drag icon.
|
||||||
**/
|
*/
|
||||||
void
|
void
|
||||||
gtk_drag_icon_set_child (GtkDragIcon *self,
|
gtk_drag_icon_set_child (GtkDragIcon *self,
|
||||||
GtkWidget *child)
|
GtkWidget *child)
|
||||||
@ -486,8 +486,8 @@ gtk_drag_icon_set_child (GtkDragIcon *self,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_drag_icon_get_child:
|
* gtk_drag_icon_get_child: (attributes org.gtk.Method.get_property=child)
|
||||||
* @self: a #GtkDragIcon
|
* @self: a `GtkDragIcon`
|
||||||
*
|
*
|
||||||
* Gets the widget currently used as drag icon.
|
* Gets the widget currently used as drag icon.
|
||||||
*
|
*
|
||||||
@ -503,22 +503,22 @@ gtk_drag_icon_get_child (GtkDragIcon *self)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_drag_icon_create_widget_for_value:
|
* gtk_drag_icon_create_widget_for_value:
|
||||||
* @value: a #GValue
|
* @value: a `GValue`
|
||||||
*
|
*
|
||||||
* Creates a widget that can be used as a drag icon for the given
|
* Creates a widget that can be used as a drag icon for the given
|
||||||
* @value.
|
* @value.
|
||||||
*
|
*
|
||||||
* Supported types include strings, #GdkRGBA and #GtkTextBuffer.
|
* Supported types include strings, `GdkRGBA` and `GtkTextBuffer`.
|
||||||
* If GTK does not know how to create a widget for a given value,
|
* If GTK does not know how to create a widget for a given value,
|
||||||
* it will return %NULL.
|
* it will return %NULL.
|
||||||
*
|
*
|
||||||
* This method is used to set the default drag icon on drag'n'drop
|
* This method is used to set the default drag icon on drag'n'drop
|
||||||
* operations started by #GtkDragSource, so you don't need to set
|
* operations started by `GtkDragSource`, so you don't need to set
|
||||||
* a drag icon using this function there.
|
* a drag icon using this function there.
|
||||||
*
|
*
|
||||||
* Returns: (nullable) (transfer full): A new #GtkWidget
|
* Returns: (nullable) (transfer full): A new `GtkWidget`
|
||||||
* for displaying @value as a drag icon.
|
* for displaying @value as a drag icon.
|
||||||
**/
|
*/
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
gtk_drag_icon_create_widget_for_value (const GValue *value)
|
gtk_drag_icon_create_widget_for_value (const GValue *value)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user