Add arg missed in change 958.
[disorder] / disobedience / queue-generic.h
index b73d90a..fdf37a9 100644 (file)
@@ -55,7 +55,7 @@ struct queuelike {
   const char *name;
   
   /** @brief Initialization function */
-  void (*init)(void);
+  void (*init)(struct queuelike *ql);
 
   /** @brief Columns */
   const struct queue_column *columns;
@@ -90,6 +90,18 @@ struct queuelike {
 
   /** @brief Menu callbacks */
   struct tabtype tabtype;
+
+  /** @brief Drag-drop callback, or NULL for no drag+drop
+   * @param src Row to move
+   * @param dst Destination position
+   *
+   * If the rearrangement is impossible then the displayed queue must be put
+   * back.
+   */
+  void (*drop)(struct queuelike *ql, int src, int dst);
+
+  /** @brief Stashed drag target row */
+  GtkTreePath *drag_target;
 };
 
 enum {
@@ -134,6 +146,9 @@ void ql_remove_activate(GtkMenuItem *menuitem,
 int ql_play_sensitive(void *extra);
 void ql_play_activate(GtkMenuItem *menuitem,
                       gpointer user_data);
+int ql_adopt_sensitive(void *extra);
+void ql_adopt_activate(GtkMenuItem *menuitem,
+                       gpointer user_data);
 gboolean ql_button_release(GtkWidget *widget,
                            GdkEventButton *event,
                            gpointer user_data);