[gtk/dnd-gestures-2: 57/69] Move some remaining api over
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/dnd-gestures-2: 57/69] Move some remaining api over
- Date: Sat, 4 Jan 2020 17:56:56 +0000 (UTC)
commit b5ca10d013be2838691dabe9a070d9754b85edad
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Jan 2 10:12:44 2020 -0500
Move some remaining api over
gtk/gtkdnd.c | 31 -------------------------------
gtk/gtkdnd.h | 5 -----
gtk/gtkdragdest.c | 31 +++++++++++++++++++++++++++++++
gtk/gtkdragdest.h | 6 ++++++
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]