summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-01-02 10:12:44 -0500
committerMatthias Clasen <mclasen@redhat.com>2020-01-04 12:51:59 -0500
commitb5ca10d013be2838691dabe9a070d9754b85edad (patch)
tree160dfa5c40064c99a6eec8994c80517e05b232ee
parent18e7ad615d55e9f1eaf191239e63f8904af2b420 (diff)
downloadgtk+-b5ca10d013be2838691dabe9a070d9754b85edad.tar.gz
Move some remaining api over
-rw-r--r--gtk/gtkdnd.c31
-rw-r--r--gtk/gtkdnd.h5
-rw-r--r--gtk/gtkdragdest.c31
-rw-r--r--gtk/gtkdragdest.h6
4 files changed, 37 insertions, 36 deletions
diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c
index dc6e5d8cfe..2b0366c5b7 100644
--- a/gtk/gtkdnd.c
+++ b/gtk/gtkdnd.c
@@ -269,37 +269,6 @@ gtk_drag_get_data (GtkWidget *widget,
data);
}
-/**
- * gtk_drag_highlight: (method)
- * @widget: a widget to highlight
- *
- * Highlights a widget as a currently hovered drop target.
- * To end the highlight, call gtk_drag_unhighlight().
- * GTK+ calls this automatically if %GTK_DEST_DEFAULT_HIGHLIGHT is set.
- */
-void
-gtk_drag_highlight (GtkWidget *widget)
-{
- g_return_if_fail (GTK_IS_WIDGET (widget));
-
- gtk_widget_set_state_flags (widget, GTK_STATE_FLAG_DROP_ACTIVE, FALSE);
-}
-
-/**
- * gtk_drag_unhighlight: (method)
- * @widget: a widget to remove the highlight from
- *
- * Removes a highlight set by gtk_drag_highlight() from
- * a widget.
- */
-void
-gtk_drag_unhighlight (GtkWidget *widget)
-{
- g_return_if_fail (GTK_IS_WIDGET (widget));
-
- gtk_widget_unset_state_flags (widget, GTK_STATE_FLAG_DROP_ACTIVE);
-}
-
/*
* _gtk_drag_dest_handle_event:
* @toplevel: Toplevel widget that received the event
diff --git a/gtk/gtkdnd.h b/gtk/gtkdnd.h
index c8b0c8c44a..28f60e3d3b 100644
--- a/gtk/gtkdnd.h
+++ b/gtk/gtkdnd.h
@@ -44,11 +44,6 @@ void gtk_drag_get_data (GtkWidget *widget,
GdkDrop *drop,
GdkAtom target);
-GDK_AVAILABLE_IN_ALL
-void gtk_drag_highlight (GtkWidget *widget);
-GDK_AVAILABLE_IN_ALL
-void gtk_drag_unhighlight (GtkWidget *widget);
-
G_END_DECLS
diff --git a/gtk/gtkdragdest.c b/gtk/gtkdragdest.c
index f158b3acf2..1a76818ba8 100644
--- a/gtk/gtkdragdest.c
+++ b/gtk/gtkdragdest.c
@@ -1047,3 +1047,34 @@ gtk_drop_target_emit_drag_data_received (GtkDropTarget *dest,
set_drop (dest, drop);
g_signal_emit (dest, signals[DRAG_DATA_RECEIVED], 0, sdata);
}
+
+/**
+ * gtk_drag_highlight: (method)
+ * @widget: a widget to highlight
+ *
+ * Highlights a widget as a currently hovered drop target.
+ * To end the highlight, call gtk_drag_unhighlight().
+ *
+ * GTK calls this automatically if %GTK_DEST_DEFAULT_HIGHLIGHT is set.
+ */
+void
+gtk_drag_highlight (GtkWidget *widget)
+{
+ g_return_if_fail (GTK_IS_WIDGET (widget));
+
+ gtk_widget_set_state_flags (widget, GTK_STATE_FLAG_DROP_ACTIVE, FALSE);
+}
+
+/**
+ * gtk_drag_unhighlight: (method)
+ * @widget: a widget to remove the highlight from
+ *
+ * Removes a highlight set by gtk_drag_highlight() from a widget.
+ */
+void
+gtk_drag_unhighlight (GtkWidget *widget)
+{
+ g_return_if_fail (GTK_IS_WIDGET (widget));
+
+ gtk_widget_unset_state_flags (widget, GTK_STATE_FLAG_DROP_ACTIVE);
+}
diff --git a/gtk/gtkdragdest.h b/gtk/gtkdragdest.h
index e126298bf9..4ef71ea6b8 100644
--- a/gtk/gtkdragdest.h
+++ b/gtk/gtkdragdest.h
@@ -156,6 +156,12 @@ GtkWidget *gtk_drop_target_get_target (GtkDropTarget *dest);
GDK_AVAILABLE_IN_ALL
const char *gtk_drop_target_find_mimetype (GtkDropTarget *dest);
+GDK_AVAILABLE_IN_ALL
+void gtk_drag_highlight (GtkWidget *widget);
+
+GDK_AVAILABLE_IN_ALL
+void gtk_drag_unhighlight (GtkWidget *widget);
+
G_END_DECLS