chiark / gitweb /
Don't allocate per-queue tabtype. In fact the allocate version broken
[disorder] / disobedience / queue-generic.h
index 7ee93b64f1b37d6dec43f3b53770ccd6509d7987..8b2acafe01713c9975759232f34c03ff04dee7a3 100644 (file)
@@ -32,10 +32,19 @@ struct queue_column {
   /** @brief Passed to value() */
   const char *data;
 
-  /** @brief TODO */
-  gfloat xalign;
+  /** @brief Flags word */
+  unsigned flags;
 };
 
+/** @brief Ellipsize column if too wide */
+#define COL_ELLIPSIZE 0x0001
+
+/** @brief Set expand property */
+#define COL_EXPAND 0x0002
+
+/** @brief Right-algin column */
+#define COL_RIGHT 0x0004
+
 /** @brief An item in the queue's popup menu */
 struct queue_menuitem {
   /** @brief Menu item name */
@@ -63,6 +72,9 @@ struct queuelike {
 
   /* Things filled in by the caller: */
 
+  /** @brief Name for this tab */
+  const char *name;
+  
   /** @brief Initialization function */
   void (*init)(void);
 
@@ -96,6 +108,9 @@ struct queuelike {
   
   /** @brief The popup menu */
   GtkWidget *menu;
+
+  /** @brief Menu callbacks */
+  struct tabtype tabtype;
 };
 
 extern struct queuelike ql_queue;
@@ -139,6 +154,9 @@ const char *column_namepart(const struct queue_entry *q,
                             const char *data);
 const char *column_length(const struct queue_entry *q,
                           const char *data);
+struct tabtype *ql_tabtype(struct queuelike *ql);
+struct queue_entry *ql_iter_to_q(GtkTreeModel *model,
+                                 GtkTreeIter *iter);
 
 #endif /* QUEUE_GENERIC_H */