2 * arch-tag: Header for GtkTreeModel impl. containing RBSource objects
4 * Copyright (C) 2003 Colin Walters <walters@verbum.org>
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; either version 2 of the
9 * License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
16 * You should have received a copy of the GNU General Public
17 * License along with this program; if not, write to the
18 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
19 * Boston, MA 02110-1301 USA.
23 #ifndef __RB_SOURCELIST_MODEL_H
24 #define __RB_SOURCELIST_MODEL_H
26 #include <gtk/gtktreemodelfilter.h>
28 #include "rb-source.h"
32 #define RB_TYPE_SOURCELIST_MODEL (rb_sourcelist_model_get_type ())
33 #define RB_SOURCELIST_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RB_TYPE_SOURCELIST_MODEL, RBSourceListModel))
34 #define RB_SOURCELIST_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RB_TYPE_SOURCELIST_MODEL, RBSourceListModelClass))
35 #define RB_IS_SOURCELIST_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RB_TYPE_SOURCELIST_MODEL))
36 #define RB_IS_SOURCELIST_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), RB_TYPE_SOURCELIST_MODEL))
37 #define RB_SOURCELIST_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RB_TYPE_SOURCELIST_MODEL, RBSourceListModelClass))
39 typedef struct RBSourceListModelPrivate RBSourceListModelPrivate
;
41 typedef struct RBSourceListModel
43 GtkTreeModelFilter parent
;
45 RBSourceListModelPrivate
*priv
;
48 typedef struct RBSourceListModelClass
50 GtkTreeModelFilterClass parent_class
;
52 void (*drop_received
) (RBSourceListModel
*model
, RBSource
*target
, GtkTreeViewDropPosition pos
, GtkSelectionData
*data
);
54 } RBSourceListModelClass
;
58 RB_SOURCELIST_MODEL_COLUMN_PLAYING
= 0,
59 RB_SOURCELIST_MODEL_COLUMN_PIXBUF
,
60 RB_SOURCELIST_MODEL_COLUMN_NAME
,
61 RB_SOURCELIST_MODEL_COLUMN_SOURCE
,
62 RB_SOURCELIST_MODEL_COLUMN_ATTRIBUTES
,
63 RB_SOURCELIST_MODEL_COLUMN_VISIBILITY
,
64 RB_SOURCELIST_MODEL_N_COLUMNS
67 GType
rb_sourcelist_model_get_type (void);
69 GtkTreeModel
* rb_sourcelist_model_new (void);
71 void rb_sourcelist_model_set_dnd_targets (RBSourceListModel
*sourcelist
,
72 GtkTreeView
*treeview
);
73 GtkTreePath
* rb_sourcelist_model_get_group_path (RBSourceListModel
*sourcelist
,
74 RBSourceListGroup group
);
75 gboolean
rb_sourcelist_model_row_is_separator (GtkTreeModel
*model
,
77 RBSourceListModel
*sourcelist
);
81 #endif /* __RB_SOURCELIST_H */