dnd: Move GdkDragAction to gdktypes.h
authorBenjamin Otte <otte@redhat.com>
Wed, 30 May 2018 19:12:43 +0000 (21:12 +0200)
committerBenjamin Otte <otte@redhat.com>
Mon, 18 Jun 2018 21:49:52 +0000 (23:49 +0200)
That way, both gdkdrag.h and gdkdrop.h can use it without one having to
include the other.

gdk/gdkdnd.h
gdk/gdktypes.h

index 365e9cf4cb77b7211d445876ceaedaf4fc6554fc..506aa93aeb95f3c019b8d4fb736a249fe345b385 100644 (file)
@@ -39,35 +39,6 @@ G_BEGIN_DECLS
 #define GDK_DRAG_CONTEXT(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_DRAG_CONTEXT, GdkDragContext))
 #define GDK_IS_DRAG_CONTEXT(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_DRAG_CONTEXT))
 
-/**
- * GdkDragAction:
- * @GDK_ACTION_COPY: Copy the data.
- * @GDK_ACTION_MOVE: Move the data, i.e. first copy it, then delete
- *  it from the source using the DELETE target of the X selection protocol.
- * @GDK_ACTION_LINK: Add a link to the data. Note that this is only
- *  useful if source and destination agree on what it means.
- * @GDK_ACTION_ASK: Ask the user what to do with the data.
- *
- * Used in #GdkDragContext to indicate what the destination
- * should do with the dropped data.
- */
-typedef enum
-{
-  GDK_ACTION_COPY    = 1 << 0,
-  GDK_ACTION_MOVE    = 1 << 1,
-  GDK_ACTION_LINK    = 1 << 2,
-  GDK_ACTION_ASK     = 1 << 3
-} GdkDragAction;
-
-/**
- * GDK_ACTION_ALL:
- *
- * Defines all possible DND actions. This can be used in gdk_drop_status()
- * messages when any drop can be accepted or a more specific drop method
- * is not yet known.
- */
-#define GDK_ACTION_ALL (GDK_ACTION_COPY | GDK_ACTION_MOVE | GDK_ACTION_LINK)
-
 /**
  * GdkDragCancelReason:
  * @GDK_DRAG_CANCEL_NO_TARGET: There is no suitable drop target.
index ba799fb4ced79ef950b4c1786eaea1f2e039ce06..cdd5808e7800c0bc820b58a08f1f9b2d3a0c7984 100644 (file)
@@ -576,6 +576,35 @@ typedef enum
   GDK_AXIS_FLAG_SLIDER   = 1 << GDK_AXIS_SLIDER,
 } GdkAxisFlags;
 
+/**
+ * GdkDragAction:
+ * @GDK_ACTION_COPY: Copy the data.
+ * @GDK_ACTION_MOVE: Move the data, i.e. first copy it, then delete
+ *  it from the source using the DELETE target of the X selection protocol.
+ * @GDK_ACTION_LINK: Add a link to the data. Note that this is only
+ *  useful if source and destination agree on what it means.
+ * @GDK_ACTION_ASK: Ask the user what to do with the data.
+ *
+ * Used in #GdkDragContext to indicate what the destination
+ * should do with the dropped data.
+ */
+typedef enum
+{
+  GDK_ACTION_COPY    = 1 << 0,
+  GDK_ACTION_MOVE    = 1 << 1,
+  GDK_ACTION_LINK    = 1 << 2,
+  GDK_ACTION_ASK     = 1 << 3
+} GdkDragAction;
+
+/**
+ * GDK_ACTION_ALL:
+ *
+ * Defines all possible DND actions. This can be used in gdk_drop_status()
+ * messages when any drop can be accepted or a more specific drop method
+ * is not yet known.
+ */
+#define GDK_ACTION_ALL (GDK_ACTION_COPY | GDK_ACTION_MOVE | GDK_ACTION_LINK)
+
 G_END_DECLS
 
 #endif /* __GDK_TYPES_H__ */