File: normal_sorttab_page.h

package info (click to toggle)
gtkpod 2.1.5-10
  • links: PTS
  • area: main
  • in suites: bookworm
  • size: 19,424 kB
  • sloc: ansic: 51,604; xml: 16,135; sh: 11,916; cpp: 7,545; perl: 1,449; makefile: 1,380; lex: 638; awk: 73; python: 35
file content (121 lines) | stat: -rw-r--r-- 4,047 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
/*
 |  Copyright (C) 2002-2011 Jorg Schuler <jcsjcs at users sourceforge net>
 |                                             Paul Richardson <phantom_sf at users.sourceforge.net>
 |  Part of the gtkpod project.
 |
 |  URL: http://www.gtkpod.org/
 |  URL: http://gtkpod.sourceforge.net/
 |
 |  This program is free software; you can redistribute it and/or modify
 |  it under the terms of the GNU General Public License as published by
 |  the Free Software Foundation; either version 2 of the License, or
 |  (at your option) any later version.
 |
 |  This program is distributed in the hope that it will be useful,
 |  but WITHOUT ANY WARRANTY; without even the implied warranty of
 |  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 |  GNU General Public License for more details.
 |
 |  You should have received a copy of the GNU General Public License
 |  along with this program; if not, write to the Free Software
 |  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 |
 |  iTunes and iPod are trademarks of Apple
 |
 |  This product is not supported/written/published by Apple!
 |
 */

#ifndef NORMAL_SORT_TAB_PAGE_H_
#define NORMAL_SORT_TAB_PAGE_H_

#include <gtk/gtk.h>

G_BEGIN_DECLS

/* struct for each entry in sort tab */
typedef struct {
    gchar *name;

    /* The sort key can be compared with other sort keys using strcmp
     * and it will give the expected result, according to the user
     * settings. Must be regenerated if the user settings change.
     */
    gchar *name_sortkey;

    /* The fuzzy sortkey can be used to compare discarding some
     * prefixes, such as "the", "el", "la", etc. If NULL, you should use
     * name_sortkey instead.
     */
    gchar *name_fuzzy_sortkey;

    /* set if this is the "All" entry */
    gboolean master;

    /* set if this is the "Compilation" entry */
    gboolean compilation;

    /* GList with member tracks (pointer to "Track") */
    GList *members;
} TabEntry;

/* "Column numbers" in sort tab model */
typedef enum  {
  ST_COLUMN_ENTRY = 0,
  ST_NUM_COLUMNS
} ST_item;

GType normal_sort_tab_page_get_type (void);

#define NORMAL_SORT_TAB_TYPE_PAGE            (normal_sort_tab_page_get_type ())

#define NORMAL_SORT_TAB_PAGE(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), NORMAL_SORT_TAB_TYPE_PAGE, NormalSortTabPage))

#define NORMAL_SORT_TAB_IS_PAGE(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NORMAL_SORT_TAB_TYPE_PAGE))

#define NORMAL_SORT_TAB_PAGE_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), NORMAL_SORT_TAB_TYPE_PAGE, NormalSortTabPageClass))

#define NORMAL_SORT_TAB_IS_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NORMAL_SORT_TAB_TYPE_PAGE))

#define NORMAL_SORT_TAB_PAGE_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), NORMAL_SORT_TAB_TYPE_PAGE, NormalSortTabPageClass))


typedef struct _NormalSortTabPagePrivate NormalSortTabPagePrivate;
typedef struct _NormalSortTabPage        NormalSortTabPage;
typedef struct _NormalSortTabPageClass   NormalSortTabPageClass;

struct _NormalSortTabPage {
    /*<private>*/
    GtkTreeView parent_instance;

    /* structure containing private members */
     /*<private>*/
     NormalSortTabPagePrivate *priv;
};

struct _NormalSortTabPageClass {
  GtkTreeViewClass parent_class;

};

GtkWidget *normal_sort_tab_page_new();

void normal_sort_tab_page_set_unselected(NormalSortTabPage *self, gboolean state);

void normal_sort_tab_page_add_track(NormalSortTabPage *self, Track *track, gboolean final, gboolean display);

void normal_sort_tab_page_remove_track(NormalSortTabPage *self, Track *track);

void normal_sort_tab_page_track_changed(NormalSortTabPage *self, Track *track, gboolean removed);

void normal_sort_tab_page_clear(NormalSortTabPage *self);

GList *normal_sort_tab_page_get_selected_tracks(NormalSortTabPage *self);

void normal_sort_tab_page_sort(NormalSortTabPage *self, enum GtkPodSortTypes order);

void normal_sort_tab_page_stop_editing(NormalSortTabPage *self, gboolean cancel);

G_END_DECLS

#endif /* NORMAL_SORT_TAB_PAGE_H_ */