1 /* Time-stamp: <2007-03-19 23:11:13 jcs>
2 |
3 |  Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net>
4 |  Part of the gtkpod project.
5 |
6 |  URL: http://www.gtkpod.org/
7 |  URL: http://gtkpod.sourceforge.net/
8 |
9 |  This program is free software; you can redistribute it and/or modify
10 |  it under the terms of the GNU General Public License as published by
11 |  the Free Software Foundation; either version 2 of the License, or
12 |  (at your option) any later version.
13 |
14 |  This program is distributed in the hope that it will be useful,
15 |  but WITHOUT ANY WARRANTY; without even the implied warranty of
16 |  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 |  GNU General Public License for more details.
18 |
19 |  You should have received a copy of the GNU General Public License
20 |  along with this program; if not, write to the Free Software
21 |  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 |
23 |  iTunes and iPod are trademarks of Apple
24 |
25 |  This product is not supported/written/published by Apple!
26 |
27 |  $Id$
28 */
29 
30 #ifndef __DISPLAY_PRIVATE_H__
31 #define __DISPLAY_PRIVATE_H__
32 
33 #ifdef HAVE_CONFIG_H
34 #  include <config.h>
35 #endif
36 
37 #include "display.h"
38 #include "misc.h"
39 #include "display_coverart.h"
40 
41 /* tree sort cannot be unsorted by choosing the default sort
42  * column. Set to 1 if it's broken, 0 if it's not broken */
43 #define BROKEN_GTK_TREE_SORT (!RUNTIME_GTK_CHECK_VERSION(2,5,4))
44 
45 /* This was defined in 2.5.4 -- as I want to detect whether
46    GTK_TREE_SORT is BROKEN at run-time (see above), I need to define
47    it here in case it's not defined */
48 #ifndef GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID
49 #define GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID (-2)
50 #endif
51 
52 /* print some timing info for tuning purposes */
53 #define DEBUG_TIMING 0
54 /* print info when callbacks are initialized */
55 #define DEBUG_CB_INIT 0
56 /* print info when adding tracks */
57 #define DEBUG_ADD_TRACK 0
58 
59 /* used for display organization */
60 void pm_create_treeview (void);
61 void pm_set_selected_playlist(Playlist *pl);
62 void pm_remove_all_playlists (gboolean clear_sort);
63 void pm_add_all_itdbs (void);
64 void tm_create_treeview (void);
65 void tm_track_changed (Track *track);
66 void tm_remove_track (Track *track);
67 void tm_remove_all_tracks (void);
68 void st_remove_all_entries_from_model (guint32 inst);
69 void st_track_changed (Track *track, gboolean removed, guint32 inst);
70 void st_add_track (Track *track, gboolean final, gboolean display, guint32 inst);
71 void st_create_tabs (void);
72 void st_remove_track (Track *track, guint32 inst);
73 void st_init (ST_CAT_item new_category, guint32 inst);
74 void st_cleanup (void);
75 void st_set_default_sizes (void);
76 void st_update_default_sizes (void);
77 void st_set_sorttab_page (int inst, gint category);
78 void tm_update_default_sizes (void);
79 void st_show_hide_tooltips (void);
80 GList *st_get_selected_members (guint32 inst);
81 gint st_get_sorttab_page_number (int inst);
82 
83 void st_enable_disable_view_sort (gint inst, gboolean enable);
84 void tm_enable_disable_view_sort (gboolean enable);
85 
86 
87 /* Drag and drop definitions */
88 #define TGNR(a) (guint)(sizeof(a)/sizeof(GtkTargetEntry))
89 #define DND_GTKPOD_TRACKLIST_TYPE "application/gtkpod-tracklist"
90 #define DND_GTKPOD_TM_PATHLIST_TYPE "application/gtkpod-tm_pathlist"
91 #define DND_GTKPOD_PLAYLISTLIST_TYPE "application/gtkpod-playlistlist"
92 
93 /* Prefs strings */
94 extern const gchar *TM_PREFS_SEARCH_COLUMN;
95 
96 struct asf_data
97 {
98     GtkTreeIter *to_iter;
99     GtkTreeViewDropPosition pos;
100 };
101 
102 #endif /* __DISPLAY_PRIVATE_H__ */
103