2
2
* arch-tag: Header for object implementing main playback logic
4
4
* Copyright (C) 2002 Jorn Baayen <jorn@nl.linux.org>
5
* Copyright (C) 2003 Colin Walters <walters@verbum.org>
5
* Copyright (C) 2003,2004 Colin Walters <walters@verbum.org>
7
7
* This program is free software; you can redistribute it and/or modify
8
8
* it under the terms of the GNU General Public License as published by
45
45
RB_SHELL_PLAYER_ERROR_PLAYLIST_PARSE_ERROR,
46
RB_SHELL_PLAYER_ERROR_END_OF_PLAYLIST,
47
RB_SHELL_PLAYER_ERROR_NOT_PLAYING,
48
RB_SHELL_PLAYER_ERROR_NOT_SEEKABLE,
46
49
} RBShellPlayerError;
48
51
#define RB_SHELL_PLAYER_ERROR rb_shell_player_error_quark ()
63
66
GtkHBoxClass parent_class;
65
68
void (*window_title_changed) (RBShellPlayer *player, const char *window_title);
66
void (*duration_changed) (RBShellPlayer *player, const char *duration);
69
void (*elapsed_changed) (RBShellPlayer *player, guint elapsed);
70
void (*playing_changed) (RBShellPlayer *player, gboolean playing);
71
void (*playing_source_changed) (RBShellPlayer *player, RBSource *source);
72
void (*playing_uri_changed) (RBShellPlayer *player, const char *uri);
73
void (*playing_song_changed) (RBShellPlayer *player, RhythmDBEntry *entry);
67
74
} RBShellPlayerClass;
69
76
GType rb_shell_player_get_type (void);
71
RBShellPlayer * rb_shell_player_new (BonoboUIComponent *component,
72
BonoboUIComponent *tray_component);
78
RBShellPlayer * rb_shell_player_new (RhythmDB *db,
80
GtkActionGroup *actiongroup);
74
82
void rb_shell_player_set_selected_source (RBShellPlayer *shell_player,
83
91
void rb_shell_player_play_entry (RBShellPlayer *player,
84
92
RhythmDBEntry *entry);
85
void rb_shell_player_playpause (RBShellPlayer *player);
93
gboolean rb_shell_player_playpause (RBShellPlayer *player, gboolean ignore_stop, GError **error);
86
94
void rb_shell_player_stop (RBShellPlayer *player);
87
void rb_shell_player_do_previous (RBShellPlayer *player);
88
void rb_shell_player_do_next (RBShellPlayer *player);
95
gboolean rb_shell_player_do_previous (RBShellPlayer *player, GError **error);
96
gboolean rb_shell_player_do_next (RBShellPlayer *player, GError **error);
90
long rb_shell_player_get_playing_time(RBShellPlayer *player);
91
void rb_shell_player_set_playing_time(RBShellPlayer *player, long time);
98
char * rb_shell_player_get_playing_time_string (RBShellPlayer *player);
99
gboolean rb_shell_player_get_playing_time(RBShellPlayer *player,
102
gboolean rb_shell_player_set_playing_time(RBShellPlayer *player,
105
void rb_shell_player_seek (RBShellPlayer *player, long offset);
92
106
long rb_shell_player_get_playing_song_duration (RBShellPlayer *player);
94
108
RBPlayer * rb_shell_player_get_mm_player (RBShellPlayer *shell_player);
96
gboolean rb_shell_player_get_playing (RBShellPlayer *shell_player);
110
gboolean rb_shell_player_get_playing (RBShellPlayer *shell_player,
98
const char * rb_shell_player_get_playing_path(RBShellPlayer *shell_player);
114
gboolean rb_shell_player_get_playing_path(RBShellPlayer *shell_player,
100
118
void rb_shell_player_sync_buttons (RBShellPlayer *player);
105
123
gboolean rb_shell_player_get_playback_state(RBShellPlayer *player,
106
124
gboolean *shuffle,
107
125
gboolean *repeat);
108
void rb_shell_player_set_volume (RBShellPlayer *player, float vol);
109
float rb_shell_player_get_volume (RBShellPlayer *player);
110
void rb_shell_player_seek (RBShellPlayer *player, long offset);
111
void rb_shell_player_toggle_mute (RBShellPlayer *player);
127
RhythmDBEntry * rb_shell_player_get_playing_entry (RBShellPlayer *player);
129
void rb_shell_player_toggle_mute (RBShellPlayer *player);
114
132
gboolean rb_shell_player_handle_key (RBShellPlayer *player, guint keyval);