annotate src/audacious/titlestring.h @ 3001:6d4b7b739232 trunk

fully implement UiSkinnedNumber, number.c no longer needed
author Tomasz Mon <desowin@gmail.com>
date Sun, 08 Jul 2007 12:21:09 +0200
parents 65073812a5cf
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1 /*
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
2 * Copyright (C) 2001, Espen Skoglund <esk@ira.uka.de>
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3 *
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
4 * This program is free software; you can redistribute it and/or
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
5 * modify it under the terms of the GNU General Public License
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
6 * as published by the Free Software Foundation; either version 2
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
7 * of the License, or (at your option) any later version.
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
8 *
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
9 * This program is distributed in the hope that it will be useful,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
12 * GNU General Public License for more details.
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
13 *
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
14 * You should have received a copy of the GNU General Public License
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
15 * along with this program; if not, write to the Free Software
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
17 * 02110-1301, USA.
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
18 *
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
19 */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
20 #ifndef XMMS_TITLESTRING_H
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
21 #define XMMS_TITLESTRING_H
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
22
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
23 #include <glib.h>
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
24 #include <gtk/gtk.h>
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
25 #include <unistd.h>
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
26 #include <time.h>
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
27
2431
3ec22a11c83e [svn] - moved titlestring.* and xconvert.* from libaudacious to audacious
mf0102
parents: 2313
diff changeset
28 /**
3ec22a11c83e [svn] - moved titlestring.* and xconvert.* from libaudacious to audacious
mf0102
parents: 2313
diff changeset
29 * TitleInput:
3ec22a11c83e [svn] - moved titlestring.* and xconvert.* from libaudacious to audacious
mf0102
parents: 2313
diff changeset
30 * @__size: Private field which describes the version of the TitleInput.
3ec22a11c83e [svn] - moved titlestring.* and xconvert.* from libaudacious to audacious
mf0102
parents: 2313
diff changeset
31 * @__version: Private field which describes the version of the TitleInput.
3ec22a11c83e [svn] - moved titlestring.* and xconvert.* from libaudacious to audacious
mf0102
parents: 2313
diff changeset
32 * @performer: The performer of the media that the tuple is describing.
3ec22a11c83e [svn] - moved titlestring.* and xconvert.* from libaudacious to audacious
mf0102
parents: 2313
diff changeset
33 * @album_name: The name of the album that contains the media.
3ec22a11c83e [svn] - moved titlestring.* and xconvert.* from libaudacious to audacious
mf0102
parents: 2313
diff changeset
34 * @track_name: The title of the media.
3ec22a11c83e [svn] - moved titlestring.* and xconvert.* from libaudacious to audacious
mf0102
parents: 2313
diff changeset
35 * @track_number: The track number of the media.
3ec22a11c83e [svn] - moved titlestring.* and xconvert.* from libaudacious to audacious
mf0102
parents: 2313
diff changeset
36 * @year: The year the media was published.
3ec22a11c83e [svn] - moved titlestring.* and xconvert.* from libaudacious to audacious
mf0102
parents: 2313
diff changeset
37 * @date: The date the media was published.
3ec22a11c83e [svn] - moved titlestring.* and xconvert.* from libaudacious to audacious
mf0102
parents: 2313
diff changeset
38 * @genre: The genre of the media.
3ec22a11c83e [svn] - moved titlestring.* and xconvert.* from libaudacious to audacious
mf0102
parents: 2313
diff changeset
39 * @comment: Any comments attached to the media.
3ec22a11c83e [svn] - moved titlestring.* and xconvert.* from libaudacious to audacious
mf0102
parents: 2313
diff changeset
40 * @file_name: The filename which refers to the media.
3ec22a11c83e [svn] - moved titlestring.* and xconvert.* from libaudacious to audacious
mf0102
parents: 2313
diff changeset
41 * @file_ext: The file's extension.
3ec22a11c83e [svn] - moved titlestring.* and xconvert.* from libaudacious to audacious
mf0102
parents: 2313
diff changeset
42 * @file_path: The path that the media is in.
3ec22a11c83e [svn] - moved titlestring.* and xconvert.* from libaudacious to audacious
mf0102
parents: 2313
diff changeset
43 * @length: The length of the media.
3ec22a11c83e [svn] - moved titlestring.* and xconvert.* from libaudacious to audacious
mf0102
parents: 2313
diff changeset
44 * @formatter: The format string that should be used.
2593
65073812a5cf [svn] - custom field support for audacious_get_tuple_field_data()
nhjm449
parents: 2560
diff changeset
45 * @custom: A custom field for miscellaneous information.
2431
3ec22a11c83e [svn] - moved titlestring.* and xconvert.* from libaudacious to audacious
mf0102
parents: 2313
diff changeset
46 * @mtime: The last modified time of the file.
3ec22a11c83e [svn] - moved titlestring.* and xconvert.* from libaudacious to audacious
mf0102
parents: 2313
diff changeset
47 *
3ec22a11c83e [svn] - moved titlestring.* and xconvert.* from libaudacious to audacious
mf0102
parents: 2313
diff changeset
48 * Tuple which is passed to xmms_get_titlestring(). An input tuple
3ec22a11c83e [svn] - moved titlestring.* and xconvert.* from libaudacious to audacious
mf0102
parents: 2313
diff changeset
49 * is allocated and initialized with bmp_title_input_new(). Before
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
50 * passing the struct to xmms_get_titlestring() it should be filled
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
51 * with appropriate field values.
2431
3ec22a11c83e [svn] - moved titlestring.* and xconvert.* from libaudacious to audacious
mf0102
parents: 2313
diff changeset
52 **/
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
53 typedef struct {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
54 gint __size; /* Set by bmp_title_input_new() */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
55 gint __version; /* Ditto */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
56
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
57 gchar *performer; /* %p */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
58 gchar *album_name; /* %a */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
59 gchar *track_name; /* %t */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
60 gint track_number; /* %n */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
61 gint year; /* %y */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
62 gchar *date; /* %d */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
63 gchar *genre; /* %g */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
64 gchar *comment; /* %c */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
65 gchar *file_name; /* %f */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
66 const gchar *file_ext; /* %e *//* is not always strdup'ed, see xmms_input_get_song_info and plugins! */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
67 gchar *file_path; /* %F */
2560
5511818eb9d3 [svn] - added custom field in tuple, for internal use by plugins or by whatever wanting to use it
giacomo
parents: 2431
diff changeset
68 gint length; /* not displayable */
5511818eb9d3 [svn] - added custom field in tuple, for internal use by plugins or by whatever wanting to use it
giacomo
parents: 2431
diff changeset
69 gchar *formatter; /* not displayable */
5511818eb9d3 [svn] - added custom field in tuple, for internal use by plugins or by whatever wanting to use it
giacomo
parents: 2431
diff changeset
70 gchar *custom; /* not displayable, for internal use */
2431
3ec22a11c83e [svn] - moved titlestring.* and xconvert.* from libaudacious to audacious
mf0102
parents: 2313
diff changeset
71 time_t mtime;
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
72 } TitleInput;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
73
2431
3ec22a11c83e [svn] - moved titlestring.* and xconvert.* from libaudacious to audacious
mf0102
parents: 2313
diff changeset
74 /**
3ec22a11c83e [svn] - moved titlestring.* and xconvert.* from libaudacious to audacious
mf0102
parents: 2313
diff changeset
75 * BmpTitleInput:
3ec22a11c83e [svn] - moved titlestring.* and xconvert.* from libaudacious to audacious
mf0102
parents: 2313
diff changeset
76 *
3ec22a11c83e [svn] - moved titlestring.* and xconvert.* from libaudacious to audacious
mf0102
parents: 2313
diff changeset
77 * An alternate name for the #TitleInput object.
3ec22a11c83e [svn] - moved titlestring.* and xconvert.* from libaudacious to audacious
mf0102
parents: 2313
diff changeset
78 **/
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
79 typedef TitleInput BmpTitleInput;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
80
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
81
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
82 /*
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
83 * Using a __size field helps the library functions detect plugins
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
84 * that use a possibly extended version of the struct. The __version
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
85 * field helps the library detect possible future incompatibilities in
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
86 * the struct layout.
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
87 */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
88
2431
3ec22a11c83e [svn] - moved titlestring.* and xconvert.* from libaudacious to audacious
mf0102
parents: 2313
diff changeset
89 /**
3ec22a11c83e [svn] - moved titlestring.* and xconvert.* from libaudacious to audacious
mf0102
parents: 2313
diff changeset
90 * XMMS_TITLEINPUT_SIZE:
3ec22a11c83e [svn] - moved titlestring.* and xconvert.* from libaudacious to audacious
mf0102
parents: 2313
diff changeset
91 *
3ec22a11c83e [svn] - moved titlestring.* and xconvert.* from libaudacious to audacious
mf0102
parents: 2313
diff changeset
92 * The size of the TitleInput object compiled into the library.
3ec22a11c83e [svn] - moved titlestring.* and xconvert.* from libaudacious to audacious
mf0102
parents: 2313
diff changeset
93 **/
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
94 #define XMMS_TITLEINPUT_SIZE sizeof(TitleInput)
2431
3ec22a11c83e [svn] - moved titlestring.* and xconvert.* from libaudacious to audacious
mf0102
parents: 2313
diff changeset
95
3ec22a11c83e [svn] - moved titlestring.* and xconvert.* from libaudacious to audacious
mf0102
parents: 2313
diff changeset
96 /**
3ec22a11c83e [svn] - moved titlestring.* and xconvert.* from libaudacious to audacious
mf0102
parents: 2313
diff changeset
97 * XMMS_TITLEINPUT_VERSION:
3ec22a11c83e [svn] - moved titlestring.* and xconvert.* from libaudacious to audacious
mf0102
parents: 2313
diff changeset
98 *
3ec22a11c83e [svn] - moved titlestring.* and xconvert.* from libaudacious to audacious
mf0102
parents: 2313
diff changeset
99 * The version of the TitleInput object compiled into the library.
3ec22a11c83e [svn] - moved titlestring.* and xconvert.* from libaudacious to audacious
mf0102
parents: 2313
diff changeset
100 **/
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
101 #define XMMS_TITLEINPUT_VERSION (1)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
102
2431
3ec22a11c83e [svn] - moved titlestring.* and xconvert.* from libaudacious to audacious
mf0102
parents: 2313
diff changeset
103 /**
3ec22a11c83e [svn] - moved titlestring.* and xconvert.* from libaudacious to audacious
mf0102
parents: 2313
diff changeset
104 * XMMS_NEW_TITLEINPUT:
3ec22a11c83e [svn] - moved titlestring.* and xconvert.* from libaudacious to audacious
mf0102
parents: 2313
diff changeset
105 * @input: A TitleInput to initialize.
3ec22a11c83e [svn] - moved titlestring.* and xconvert.* from libaudacious to audacious
mf0102
parents: 2313
diff changeset
106 *
3ec22a11c83e [svn] - moved titlestring.* and xconvert.* from libaudacious to audacious
mf0102
parents: 2313
diff changeset
107 * Initializes a TitleInput object. Included for XMMS compatibility.
3ec22a11c83e [svn] - moved titlestring.* and xconvert.* from libaudacious to audacious
mf0102
parents: 2313
diff changeset
108 **/
3ec22a11c83e [svn] - moved titlestring.* and xconvert.* from libaudacious to audacious
mf0102
parents: 2313
diff changeset
109 #define XMMS_NEW_TITLEINPUT(input) input = bmp_title_input_new();
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
110
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
111
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
112 G_BEGIN_DECLS
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
113
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
114 TitleInput *bmp_title_input_new(void);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
115 void bmp_title_input_free(BmpTitleInput * input);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
116
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
117 gchar *xmms_get_titlestring(const gchar * fmt, TitleInput * input);
2431
3ec22a11c83e [svn] - moved titlestring.* and xconvert.* from libaudacious to audacious
mf0102
parents: 2313
diff changeset
118 GtkWidget *xmms_titlestring_descriptions(gchar * tags, gint columns);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
119
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
120 G_END_DECLS
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
121
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
122 #endif /* !XMMS_TITLESTRING_H */