![]() |
![]() |
![]() |
Rhythmbox Development Reference Manual | ![]() |
---|---|---|---|---|
enum RBSourceGroupCategory; typedef RBSourceGroup; #define RB_SOURCE_GROUP_LIBRARY #define RB_SOURCE_GROUP_PLAYLISTS #define RB_SOURCE_GROUP_DEVICES #define RB_SOURCE_GROUP_SHARED void rb_source_group_init (void); RBSourceGroup* rb_source_group_get_by_name (const char *name); RBSourceGroup* rb_source_group_register (const char *name, const char *display_name, RBSourceGroupCategory category); RBSourceGroup* rb_source_group_library_get_type (void); RBSourceGroup* rb_source_group_playlists_get_type (void); RBSourceGroup* rb_source_group_devices_get_type (void); RBSourceGroup* rb_source_group_shared_get_type (void);
Source groups define sections of the source list. A source group consists of an internal name, a display name, and a category. The internal name can be used to locate a registered source group. The category is used to sort the source groups.
typedef enum { RB_SOURCE_GROUP_CATEGORY_FIXED = 0, /* library, iradio, podcast, queue */ RB_SOURCE_GROUP_CATEGORY_PERSISTENT, /* playlists */ RB_SOURCE_GROUP_CATEGORY_REMOVABLE, /* ipod, generic audio player, audio CD */ RB_SOURCE_GROUP_CATEGORY_TRANSIENT, /* DAAP shares */ RB_SOURCE_GROUP_CATEGORY_LAST } RBSourceGroupCategory;
RBSourceGroup* rb_source_group_get_by_name (const char *name);
Locates a source group by name. If the source group has not been registered yet, returns NULL instead.
|
name of source group to find |
Returns : |
existing source group, or NULL. |
RBSourceGroup* rb_source_group_register (const char *name, const char *display_name, RBSourceGroupCategory category);
Registers and returns a new source group. Registering a source group that already exists will probably do bad things.
|
name of the source group (untranslated, used in code) |
|
display name of the source group (translated) |
|
category for the source group |
Returns : |
new source group |
RBSourceGroup* rb_source_group_library_get_type (void);
Returns : |
the predefined library source group |
RBSourceGroup* rb_source_group_playlists_get_type (void);
Returns : |
the predefined playlists source group |
RBSourceGroup* rb_source_group_devices_get_type (void);
Returns : |
the predefined devices source group |
RBSourceGroup* rb_source_group_shared_get_type (void);
Returns : |
the predefined shared source group |