titlestring

titlestring

Synopsis




                    TitleInput;
typedef             BmpTitleInput;
#define             XMMS_TITLEINPUT_SIZE
#define             XMMS_TITLEINPUT_VERSION
#define             XMMS_NEW_TITLEINPUT                 (input)
TitleInput*         bmp_title_input_new                 (void);
void                bmp_title_input_free                (BmpTitleInput *input);
gchar*              xmms_get_titlestring                (const gchar *fmt,
                                                         TitleInput *input);
GtkWidget*          xmms_titlestring_descriptions       (gchar *tags,
                                                         gint columns);

Description

Details

TitleInput

typedef struct {
    gint __size;                /* Set by bmp_title_input_new() */
    gint __version;             /* Ditto */

    gchar *performer;           /* %p */
    gchar *album_name;          /* %a */
    gchar *track_name;          /* %t */
    gint track_number;          /* %n */
    gint year;                  /* %y */
    gchar *date;                /* %d */
    gchar *genre;               /* %g */
    gchar *comment;             /* %c */
    gchar *file_name;           /* %f */
    const gchar *file_ext;      /* %e *//* is not always strdup'ed, see xmms_input_get_song_info and plugins! */
    gchar *file_path;           /* %F */
    gint length;                /* not displayable */
    gchar *formatter;           /* not displayable */
    gchar *custom;              /* not displayable, for internal use */
    time_t mtime;
} TitleInput;

Tuple which is passed to xmms_get_titlestring(). An input tuple is allocated and initialized with bmp_title_input_new(). Before passing the struct to xmms_get_titlestring() it should be filled with appropriate field values.

gint __size;

Private field which describes the version of the TitleInput.

gint __version;

Private field which describes the version of the TitleInput.

gchar *performer;

The performer of the media that the tuple is describing.

gchar *album_name;

The name of the album that contains the media.

gchar *track_name;

The title of the media.

gint track_number;

The track number of the media.

gint year;

The year the media was published.

gchar *date;

The date the media was published.

gchar *genre;

The genre of the media.

gchar *comment;

Any comments attached to the media.

gchar *file_name;

The filename which refers to the media.

const gchar *file_ext;

The file's extension.

gchar *file_path;

The path that the media is in.

gint length;

The length of the media.

gchar *formatter;

The format string that should be used.

gchar *custom;

A custom field for miscellaneous information.

time_t mtime;

The last modified time of the file.

BmpTitleInput

typedef TitleInput BmpTitleInput;

An alternate name for the TitleInput object.


XMMS_TITLEINPUT_SIZE

#define XMMS_TITLEINPUT_SIZE	sizeof(TitleInput)

The size of the TitleInput object compiled into the library.


XMMS_TITLEINPUT_VERSION

#define XMMS_TITLEINPUT_VERSION	(1)

The version of the TitleInput object compiled into the library.


XMMS_NEW_TITLEINPUT()

#define XMMS_NEW_TITLEINPUT(input) input = bmp_title_input_new();

Initializes a TitleInput object. Included for XMMS compatibility.

input :

A TitleInput to initialize.

bmp_title_input_new ()

TitleInput*         bmp_title_input_new                 (void);

BmpTitleInput tuple factory.

Returns :

A BmpTitleInput object.

bmp_title_input_free ()

void                bmp_title_input_free                (BmpTitleInput *input);

Destroys a BmpTitleInput tuple.

input :

A BmpTitleInput tuple to destroy.

xmms_get_titlestring ()

gchar*              xmms_get_titlestring                (const gchar *fmt,
                                                         TitleInput *input);

Generates a formatted string from a tuple.

fmt :

A format string.

input :

A tuple to use for data.

Returns :

A formatted tuple string.

xmms_titlestring_descriptions ()

GtkWidget*          xmms_titlestring_descriptions       (gchar *tags,
                                                         gint columns);

Generates a box explaining how to use the formatters.

tags :

A list of formatters to provide.

columns :

A number of columns to arrange them in.

Returns :

A GtkWidget containing the table.