1 /* 2 * Copyright (C) 2003 Colin Walters <walters@verbum.org> 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public License as 6 * published by the Free Software Foundation; either version 2 of the 7 * License, or (at your option) any later version. 8 * 9 * The Rhythmbox authors hereby grant permission for non-GPL compatible 10 * GStreamer plugins to be used and distributed together with GStreamer 11 * and Rhythmbox. This permission is above and beyond the permissions granted 12 * by the GPL license by which Rhythmbox is covered. If you modify this code 13 * you may extend this exception to your version of the code, but you are not 14 * obligated to do so. If you do not wish to do so, delete this exception 15 * statement from your version. 16 * 17 * This program is distributed in the hope that it will be useful, 18 * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 * General Public License for more details. 21 * 22 * You should have received a copy of the GNU General Public 23 * License along with this program; if not, write to the 24 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 25 * Boston, MA 02110-1301 USA. 26 * 27 */ 28 29 #ifndef RB_DISPLAY_PAGE_MODEL_H 30 #define RB_DISPLAY_PAGE_MODEL_H 31 32 #include <gtk/gtk.h> 33 34 #include <sources/rb-display-page.h> 35 36 G_BEGIN_DECLS 37 38 #define RB_TYPE_DISPLAY_PAGE_MODEL (rb_display_page_model_get_type ()) 39 #define RB_DISPLAY_PAGE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RB_TYPE_DISPLAY_PAGE_MODEL, RBDisplayPageModel)) 40 #define RB_DISPLAY_PAGE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RB_TYPE_DISPLAY_PAGE_MODEL, RBDisplayPageModelClass)) 41 #define RB_IS_DISPLAY_PAGE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RB_TYPE_DISPLAY_PAGE_MODEL)) 42 #define RB_IS_DISPLAY_PAGE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), RB_TYPE_DISPLAY_PAGE_MODEL)) 43 #define RB_DISPLAY_PAGE_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RB_TYPE_DISPLAY_PAGE_MODEL, RBDisplayPageModelClass)) 44 45 typedef enum { 46 RB_DISPLAY_PAGE_MODEL_COLUMN_PLAYING = 0, 47 RB_DISPLAY_PAGE_MODEL_COLUMN_PAGE, 48 RB_DISPLAY_PAGE_MODEL_N_COLUMNS 49 } RBDisplayPageModelColumn; 50 51 GType rb_display_page_model_column_get_type (void); 52 #define RB_TYPE_DISPLAY_PAGE_MODEL_COLUMN (rb_display_page_model_column_get_type ()) 53 54 typedef struct _RBDisplayPageModel RBDisplayPageModel; 55 typedef struct _RBDisplayPageModelClass RBDisplayPageModelClass; 56 57 struct _RBDisplayPageModel 58 { 59 GtkTreeModelFilter parent; 60 }; 61 62 struct _RBDisplayPageModelClass 63 { 64 GtkTreeModelFilterClass parent_class; 65 66 void (*drop_received) (RBDisplayPageModel *model, 67 RBDisplayPage *target, 68 GtkTreeViewDropPosition pos, 69 GtkSelectionData *data); 70 void (*page_inserted) (RBDisplayPageModel *model, 71 RBDisplayPage *page, 72 GtkTreeIter *iter); 73 }; 74 75 GType rb_display_page_model_get_type (void); 76 77 RBDisplayPageModel *rb_display_page_model_new (void); 78 79 void rb_display_page_model_set_playing_source (RBDisplayPageModel *page_model, 80 RBDisplayPage *source); 81 82 void rb_display_page_model_add_page (RBDisplayPageModel *page_model, 83 RBDisplayPage *page, 84 RBDisplayPage *parent); 85 void rb_display_page_model_remove_page (RBDisplayPageModel *page_model, 86 RBDisplayPage *page); 87 gboolean rb_display_page_model_find_page (RBDisplayPageModel *page_model, 88 RBDisplayPage *page, 89 GtkTreeIter *iter); 90 gboolean rb_display_page_model_find_page_full (RBDisplayPageModel *page_model, 91 RBDisplayPage *page, 92 GtkTreeIter *iter); 93 94 void rb_display_page_model_set_dnd_targets (RBDisplayPageModel *page_model, 95 GtkTreeView *treeview); 96 97 G_END_DECLS 98 99 #endif /* RB_DISPLAY_PAGE_MODEL */ 100