annotate libaudacious/titlestring.h @ 2257:af716dc0cdb9 trunk

[svn] - do not create GtkAccelGroup anymore; use ui_manager_get_accel_group to get accelerator groups from ui_manager
author giacomo
date Thu, 04 Jan 2007 03:58:58 -0800
parents 53a3d5db6b58
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
1 /*
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
2 * Copyright (C) 2001, Espen Skoglund <esk@ira.uka.de>
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
3 *
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
4 * This program is free software; you can redistribute it and/or
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
5 * modify it under the terms of the GNU General Public License
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
6 * as published by the Free Software Foundation; either version 2
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
7 * of the License, or (at your option) any later version.
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
8 *
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
9 * This program is distributed in the hope that it will be useful,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
12 * GNU General Public License for more details.
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
13 *
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
14 * You should have received a copy of the GNU General Public License
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
15 * along with this program; if not, write to the Free Software
1458
f12d7e208b43 [svn] Update FSF address in copyright notices. Update autotools templates.
chainsaw
parents: 1355
diff changeset
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
1459
705d4c089fce [svn] Fix postal code.
chainsaw
parents: 1458
diff changeset
17 * 02110-1301, USA.
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
18 *
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
19 */
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
20 #ifndef XMMS_TITLESTRING_H
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
21 #define XMMS_TITLESTRING_H
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
22
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
23 #include <glib.h>
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
24 #include <gtk/gtk.h>
1633
936135be464f [svn] - include time.h
nenolod
parents: 1588
diff changeset
25 #include <unistd.h>
936135be464f [svn] - include time.h
nenolod
parents: 1588
diff changeset
26 #include <time.h>
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
27
2060
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 2059
diff changeset
28 /**
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 2059
diff changeset
29 * TitleInput:
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 2059
diff changeset
30 * @__size: Private field which describes the version of the TitleInput.
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 2059
diff changeset
31 * @__version: Private field which describes the version of the TitleInput.
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 2059
diff changeset
32 * @performer: The performer of the media that the tuple is describing.
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 2059
diff changeset
33 * @album_name: The name of the album that contains the media.
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 2059
diff changeset
34 * @track_name: The title of the media.
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 2059
diff changeset
35 * @track_number: The track number of the media.
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 2059
diff changeset
36 * @year: The year the media was published.
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 2059
diff changeset
37 * @date: The date the media was published.
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 2059
diff changeset
38 * @genre: The genre of the media.
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 2059
diff changeset
39 * @comment: Any comments attached to the media.
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 2059
diff changeset
40 * @file_name: The filename which refers to the media.
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 2059
diff changeset
41 * @file_ext: The file's extension.
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 2059
diff changeset
42 * @file_path: The path that the media is in.
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 2059
diff changeset
43 * @length: The length of the media.
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 2059
diff changeset
44 * @formatter: The format string that should be used.
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 2059
diff changeset
45 * @mtime: The last modified time of the file.
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 2059
diff changeset
46 *
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 2059
diff changeset
47 * Tuple which is passed to xmms_get_titlestring(). An input tuple
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 2059
diff changeset
48 * is allocated and initialized with bmp_title_input_new(). Before
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
49 * passing the struct to xmms_get_titlestring() it should be filled
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
50 * with appropriate field values.
2060
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 2059
diff changeset
51 **/
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
52 typedef struct {
1588
15d92c51bde6 [svn] - modified time (mtime) has been introduced into tuple
yaz
parents: 1459
diff changeset
53 gint __size; /* Set by bmp_title_input_new() */
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
54 gint __version; /* Ditto */
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
55
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
56 gchar *performer; /* %p */
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
57 gchar *album_name; /* %a */
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
58 gchar *track_name; /* %t */
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
59 gint track_number; /* %n */
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
60 gint year; /* %y */
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
61 gchar *date; /* %d */
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
62 gchar *genre; /* %g */
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
63 gchar *comment; /* %c */
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
64 gchar *file_name; /* %f */
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
65 const gchar *file_ext; /* %e *//* is not always strdup'ed, see xmms_input_get_song_info and plugins! */
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
66 gchar *file_path; /* %F */
1229
e4b17654a83b [svn] - Add TitleInput.length member.
nenolod
parents: 0
diff changeset
67 gint length; /* not displayable */
1355
2a69c94320e6 [svn] - add tuple->formatter to tuplespace
nenolod
parents: 1229
diff changeset
68 gchar *formatter; /* not displayable */
1588
15d92c51bde6 [svn] - modified time (mtime) has been introduced into tuple
yaz
parents: 1459
diff changeset
69 time_t mtime;
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
70 } TitleInput;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
71
2060
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 2059
diff changeset
72 /**
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 2059
diff changeset
73 * BmpTitleInput:
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 2059
diff changeset
74 *
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 2059
diff changeset
75 * An alternate name for the #TitleInput object.
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 2059
diff changeset
76 **/
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
77 typedef TitleInput BmpTitleInput;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
78
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
79
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
80 /*
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
81 * Using a __size field helps the library functions detect plugins
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
82 * that use a possibly extended version of the struct. The __version
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
83 * field helps the library detect possible future incompatibilities in
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
84 * the struct layout.
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
85 */
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
86
2060
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 2059
diff changeset
87 /**
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 2059
diff changeset
88 * XMMS_TITLEINPUT_SIZE:
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 2059
diff changeset
89 *
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 2059
diff changeset
90 * The size of the TitleInput object compiled into the library.
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 2059
diff changeset
91 **/
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
92 #define XMMS_TITLEINPUT_SIZE sizeof(TitleInput)
2060
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 2059
diff changeset
93
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 2059
diff changeset
94 /**
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 2059
diff changeset
95 * XMMS_TITLEINPUT_VERSION:
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 2059
diff changeset
96 *
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 2059
diff changeset
97 * The version of the TitleInput object compiled into the library.
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 2059
diff changeset
98 **/
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
99 #define XMMS_TITLEINPUT_VERSION (1)
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
100
2060
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 2059
diff changeset
101 /**
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 2059
diff changeset
102 * XMMS_NEW_TITLEINPUT:
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 2059
diff changeset
103 * @input: A TitleInput to initialize.
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 2059
diff changeset
104 *
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 2059
diff changeset
105 * Initializes a TitleInput object. Included for XMMS compatibility.
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 2059
diff changeset
106 **/
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 2059
diff changeset
107 #define XMMS_NEW_TITLEINPUT(input) input = bmp_title_input_new();
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
108
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
109
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
110 G_BEGIN_DECLS
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
111
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
112 TitleInput *bmp_title_input_new(void);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
113 void bmp_title_input_free(BmpTitleInput * input);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
114
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
115 gchar *xmms_get_titlestring(const gchar * fmt, TitleInput * input);
2059
8aaf0f145578 [svn] - documentation fixups
nenolod
parents: 1633
diff changeset
116 GtkWidget *xmms_titlestring_descriptions(gchar * tags, gint columns);
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
117
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
118 G_END_DECLS
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
119
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
120 #endif /* !XMMS_TITLESTRING_H */