~ubuntu-branches/ubuntu/utopic/rhythmbox/utopic-proposed

« back to all changes in this revision

Viewing changes to shell/rb-shell-player.h

Tags: upstream-0.9.2
ImportĀ upstreamĀ versionĀ 0.9.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 *  arch-tag: Header for object implementing main playback logic
3
3
 *
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>
6
6
 *
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
21
21
 */
22
22
 
23
23
#include <gtk/gtkhbox.h>
24
 
#include <bonobo/bonobo-arg.h>
25
 
#include <bonobo/bonobo-ui-component.h>
 
24
#include <gtk/gtkuimanager.h>
 
25
#include <gtk/gtkactiongroup.h>
26
26
 
27
27
#include "rb-source.h"
28
28
#include "rb-player.h"
43
43
typedef enum
44
44
{
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;
47
50
 
48
51
#define RB_SHELL_PLAYER_ERROR rb_shell_player_error_quark ()
63
66
        GtkHBoxClass parent_class;
64
67
 
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;
68
75
 
69
76
GType                   rb_shell_player_get_type   (void);
70
77
 
71
 
RBShellPlayer *         rb_shell_player_new             (BonoboUIComponent *component,
72
 
                                                         BonoboUIComponent *tray_component);
 
78
RBShellPlayer *         rb_shell_player_new             (RhythmDB *db,
 
79
                                                         GtkUIManager *mgr,
 
80
                                                         GtkActionGroup *actiongroup);
73
81
 
74
82
void                    rb_shell_player_set_selected_source     (RBShellPlayer *shell_player,
75
83
                                                                 RBSource *player);
82
90
 
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);
89
97
 
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,
 
100
                                                         guint *time,
 
101
                                                         GError **error);
 
102
gboolean                rb_shell_player_set_playing_time(RBShellPlayer *player,
 
103
                                                         guint time,
 
104
                                                         GError **error);
 
105
void                    rb_shell_player_seek            (RBShellPlayer *player, long offset);
92
106
long                    rb_shell_player_get_playing_song_duration (RBShellPlayer *player);
93
107
 
94
108
RBPlayer *              rb_shell_player_get_mm_player   (RBShellPlayer *shell_player);
95
109
 
96
 
gboolean                rb_shell_player_get_playing     (RBShellPlayer *shell_player);
 
110
gboolean                rb_shell_player_get_playing     (RBShellPlayer *shell_player,
 
111
                                                         gboolean *playing,
 
112
                                                         GError **error);
97
113
 
98
 
const char *            rb_shell_player_get_playing_path(RBShellPlayer *shell_player);
 
114
gboolean                rb_shell_player_get_playing_path(RBShellPlayer *shell_player,
 
115
                                                         const gchar **path,
 
116
                                                         GError **error);
99
117
 
100
118
void                    rb_shell_player_sync_buttons    (RBShellPlayer *player);
101
119
 
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);
 
126
 
 
127
RhythmDBEntry *         rb_shell_player_get_playing_entry (RBShellPlayer *player);
 
128
 
 
129
void                    rb_shell_player_toggle_mute     (RBShellPlayer *player);
112
130
 
113
131
#ifdef HAVE_ACME
114
132
gboolean                rb_shell_player_handle_key      (RBShellPlayer *player, guint keyval);