2 * arch-tag: Header for main Rhythmbox shell
4 * Copyright (C) 2002 Jorn Baayen
5 * Copyright (C) 2004 Colin Walters <walters@redhat.com>
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2, or (at your option)
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
26 #include "rb-source.h"
28 #include "rb-song-info.h"
32 #define RB_TYPE_SHELL (rb_shell_get_type ())
33 #define RB_SHELL(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), RB_TYPE_SHELL, RBShell))
34 #define RB_SHELL_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), RB_TYPE_SHELL, RBShellClass))
35 #define RB_IS_SHELL(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), RB_TYPE_SHELL))
36 #define RB_IS_SHELL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), RB_TYPE_SHELL))
37 #define RB_SHELL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), RB_TYPE_SHELL, RBShellClass))
41 RB_SHELL_ERROR_NO_SUCH_URI
,
42 RB_SHELL_ERROR_NO_SUCH_PROPERTY
,
43 RB_SHELL_ERROR_IMMUTABLE_PROPERTY
,
44 RB_SHELL_ERROR_INVALID_PROPERTY_TYPE
,
45 RB_SHELL_ERROR_NO_SOURCE_FOR_URI
48 #define RB_SHELL_ERROR rb_shell_error_quark ()
50 GQuark
rb_shell_error_quark (void);
54 RB_SHELL_UI_LOCATION_SIDEBAR
,
55 RB_SHELL_UI_LOCATION_MAIN_TOP
,
56 RB_SHELL_UI_LOCATION_MAIN_BOTTOM
,
59 GType
rb_shell_ui_location_get_type (void);
60 #define RB_TYPE_SHELL_UI_LOCATION (rb_shell_ui_location_get_type())
62 typedef struct RBShellPrivate RBShellPrivate
;
73 GObjectClass parent_class
;
76 void (*visibility_changed
) (RBShell
*shell
, gboolean visible
);
77 void (*create_song_info
) (RBShell
*shell
, RBSongInfo
*song_info
, gboolean multi
);
80 GType
rb_shell_get_type (void);
82 RBShell
* rb_shell_new (int argc
, char **argv
,
83 gboolean no_registration
,
89 gboolean
rb_shell_present (RBShell
*shell
, guint32 timestamp
, GError
**error
);
91 RBSource
* rb_shell_guess_source_for_uri (RBShell
*shell
, const char *uri
);
93 gboolean
rb_shell_add_uri (RBShell
*shell
,
99 gboolean
rb_shell_load_uri (RBShell
*shell
, const char *uri
, gboolean play
, GError
**error
);
101 GObject
* rb_shell_get_player (RBShell
*shell
);
102 const char * rb_shell_get_player_path(RBShell
*shell
);
103 GObject
* rb_shell_get_playlist_manager (RBShell
*shell
);
104 const char * rb_shell_get_playlist_manager_path (RBShell
*shell
);
105 GObject
* rb_shell_get_ui_manager (RBShell
*shell
);
107 void rb_shell_toggle_visibility (RBShell
*shell
);
109 gboolean
rb_shell_get_song_properties (RBShell
*shell
,
111 GHashTable
**properties
,
114 gboolean
rb_shell_set_song_property (RBShell
*shell
,
116 const char *propname
,
120 gboolean
rb_shell_add_to_queue (RBShell
*shell
,
124 gboolean
rb_shell_remove_from_queue (RBShell
*shell
,
128 gboolean
rb_shell_clear_queue (RBShell
*shell
,
131 gboolean
rb_shell_quit (RBShell
*shell
,
134 void rb_shell_hidden_notify (RBShell
*shell
,
138 const char *secondary
,
140 void rb_shell_notify_playing_entry (RBShell
*shell
,
141 RhythmDBEntry
*entry
,
143 gboolean
rb_shell_do_notify (RBShell
*shell
,
147 void rb_shell_register_entry_type_for_source (RBShell
*shell
,
149 RhythmDBEntryType type
);
150 RBSource
* rb_shell_get_source_by_entry_type (RBShell
*shell
,
151 RhythmDBEntryType type
);
153 gboolean
rb_shell_get_party_mode (RBShell
*shell
);
155 void rb_shell_append_source (RBShell
*shell
, RBSource
*source
, RBSource
*parent
);
157 void rb_shell_add_widget (RBShell
*shell
, GtkWidget
*widget
, RBShellUILocation location
);
158 void rb_shell_remove_widget (RBShell
*shell
, GtkWidget
*widget
, RBShellUILocation location
);
162 #endif /* __RB_SHELL_H */