BEAST - Free Software Audio Synthesizer and Tracker  0.9.2
bsttreestores.hh
Go to the documentation of this file.
1  // Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html
2 #ifndef __BST_TREE_STORES_H__
3 #define __BST_TREE_STORES_H__
4 
5 #include "bstutils.hh"
6 
7 G_BEGIN_DECLS
8 
9 
10 /* --- file store --- */
11 enum {
12  BST_FILE_STORE_COL_ID,
13  BST_FILE_STORE_COL_FILE,
14  BST_FILE_STORE_COL_BASE_NAME,
15  BST_FILE_STORE_COL_WAVE_NAME,
16  BST_FILE_STORE_COL_SIZE,
17  BST_FILE_STORE_COL_TIME_USECS,
18  BST_FILE_STORE_COL_TIME_STR,
19  BST_FILE_STORE_COL_LOADER,
20  BST_FILE_STORE_COL_LOADABLE,
21  BST_FILE_STORE_N_COLS
22 };
23 GtkTreeModel* bst_file_store_create (void);
24 void bst_file_store_update_list (GtkTreeModel *model,
25  const gchar *search_path,
26  const gchar *filter);
27 void bst_file_store_forget_list (GtkTreeModel *model);
28 void bst_file_store_destroy (GtkTreeModel *model);
29 
30 
31 /* --- proxy stores --- */
32 enum {
33  BST_PROXY_STORE_SEQID,
34  BST_PROXY_STORE_NAME,
35  BST_PROXY_STORE_BLURB,
36  BST_PROXY_STORE_TYPE,
37  BST_PROXY_STORE_N_COLS
38 };
39 /* store based on a BseItemSeq */
40 GtkTreeModel* bst_item_seq_store_new (gboolean sorted);
41 void bst_item_seq_store_set (GtkTreeModel *self,
42  BseItemSeq *iseq);
43 gint bst_item_seq_store_add (GtkTreeModel *self,
44  SfiProxy proxy);
45 gint bst_item_seq_store_remove (GtkTreeModel *self,
46  SfiProxy proxy);
47 gint bst_item_seq_store_raise (GtkTreeModel *self,
48  SfiProxy proxy);
49 gboolean bst_item_seq_store_can_raise (GtkTreeModel *self,
50  SfiProxy proxy);
51 gint bst_item_seq_store_lower (GtkTreeModel *self,
52  SfiProxy proxy);
53 gboolean bst_item_seq_store_can_lower (GtkTreeModel *self,
54  SfiProxy proxy);
55 BseItemSeq* bst_item_seq_store_dup (GtkTreeModel *self);
56 SfiProxy bst_item_seq_store_get_proxy (GtkTreeModel *self,
57  gint row);
58 SfiProxy bst_item_seq_store_get_from_iter (GtkTreeModel *self,
59  GtkTreeIter *iter);
60 gboolean bst_item_seq_store_get_iter (GtkTreeModel *self,
61  GtkTreeIter *iter,
62  SfiProxy proxy);
63 /* store based on the child list of a container */
64 GxkListWrapper* bst_child_list_wrapper_store_new (void);
65 
66 
67 /* --- generic child list wrapper --- */
68 void bst_child_list_wrapper_setup (GxkListWrapper *self,
69  SfiProxy parent,
70  const gchar *child_type);
71 void bst_child_list_wrapper_set_listener (GxkListWrapper *self,
72  void (*listener) (GtkTreeModel *model,
73  SfiProxy item,
74  gboolean added));
75 void bst_child_list_wrapper_rebuild (GxkListWrapper *self);
76 SfiProxy bst_child_list_wrapper_get_proxy (GxkListWrapper *self,
77  gint row);
78 SfiProxy bst_child_list_wrapper_get_from_iter (GxkListWrapper *self,
79  GtkTreeIter *iter);
80 gboolean bst_child_list_wrapper_get_iter (GxkListWrapper *self,
81  GtkTreeIter *iter,
82  SfiProxy proxy);
83 void bst_child_list_wrapper_proxy_changed (GxkListWrapper *self,
84  SfiProxy item);
85 
86 
87 G_END_DECLS
88 
89 #endif /* __BST_TREE_STORES_H__ */