List Views

List Views — Catalog and playlist list views

Synopsis

#include <rc-ui-listview.h>

struct              RCUiCatalogView;
struct              RCUiCatalogViewClass;
enum                RCUiListViewPlaylistColumnFlags;
struct              RCUiPlaylistView;
struct              RCUiPlaylistViewClass;
void                rc_ui_listview_catalog_delete_items ();
gboolean            rc_ui_listview_catalog_get_cursor   (GtkTreeIter *iter);
GtkTreeModel *      rc_ui_listview_catalog_get_model    ();
void                rc_ui_listview_catalog_new_playlist ();
void                rc_ui_listview_catalog_rename_playlist
                                                        ();
void                rc_ui_listview_catalog_select       (GtkTreeIter *iter);
void                rc_ui_listview_catalog_set_pango_attributes
                                                        (const PangoAttrList *list);
GtkWidget *         rc_ui_listview_get_catalog_widget   ();
GtkWidget *         rc_ui_listview_get_playlist_widget  ();
void                rc_ui_listview_playlist_delete_items
                                                        ();
gboolean            rc_ui_listview_playlist_get_column_display_mode
                                                        ();
gboolean            rc_ui_listview_playlist_get_cursor  (GtkTreeIter *iter);
guint               rc_ui_listview_playlist_get_enabled_columns
                                                        ();
GtkTreeModel *      rc_ui_listview_playlist_get_model   ();
void                rc_ui_listview_playlist_refresh     ();
void                rc_ui_listview_playlist_select      (GtkTreeIter *iter);
void                rc_ui_listview_playlist_select_all  ();
void                rc_ui_listview_playlist_set_column_display_mode
                                                        (gboolean mode);
void                rc_ui_listview_playlist_set_enabled_columns
                                                        (guint column_flags,
                                                         guint enable_flags);
void                rc_ui_listview_playlist_set_pango_attributes
                                                        (const PangoAttrList *list);
void                rc_ui_listview_playlist_set_title_format
                                                        (const gchar *format);
void                rc_ui_listview_refresh              ();

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkWidget
               +----GtkContainer
                     +----GtkTreeView
                           +----RCUiCatalogView
  GObject
   +----GInitiallyUnowned
         +----GtkWidget
               +----GtkContainer
                     +----GtkTreeView
                           +----RCUiPlaylistView

Implemented Interfaces

RCUiCatalogView implements AtkImplementorIface, GtkBuildable and GtkScrollable.

RCUiPlaylistView implements AtkImplementorIface, GtkBuildable and GtkScrollable.

Description

This module provides the catalog and playlist list view widgets for the player. They show catalog and playlist in the main window.

Details

struct RCUiCatalogView

struct RCUiCatalogView;

The data structure used for RCUiCatalogView class.


struct RCUiCatalogViewClass

struct RCUiCatalogViewClass {
};

RCUiCatalogViewClass class.


enum RCUiListViewPlaylistColumnFlags

typedef enum {
    RC_UI_LISTVIEW_PLAYLIST_COLUMN_ARTIST = 1<<0,
    RC_UI_LISTVIEW_PLAYLIST_COLUMN_ALBUM = 1<<1,
    RC_UI_LISTVIEW_PLAYLIST_COLUMN_TRACK = 1<<2,
    RC_UI_LISTVIEW_PLAYLIST_COLUMN_YEAR = 1<<3,
    RC_UI_LISTVIEW_PLAYLIST_COLUMN_FTYPE = 1<<4,
    RC_UI_LISTVIEW_PLAYLIST_COLUMN_RATING = 1<<5,
    RC_UI_LISTVIEW_PLAYLIST_COLUMN_GENRE = 1<<6
} RCUiListViewPlaylistColumnFlags;

The enum type for control the visibility of some columns in the playlist.

RC_UI_LISTVIEW_PLAYLIST_COLUMN_ARTIST

the artist column

RC_UI_LISTVIEW_PLAYLIST_COLUMN_ALBUM

the album column

RC_UI_LISTVIEW_PLAYLIST_COLUMN_TRACK

the track number column

RC_UI_LISTVIEW_PLAYLIST_COLUMN_YEAR

the year column

RC_UI_LISTVIEW_PLAYLIST_COLUMN_FTYPE

the file type (format) column

RC_UI_LISTVIEW_PLAYLIST_COLUMN_RATING

the rating column

RC_UI_LISTVIEW_PLAYLIST_COLUMN_GENRE

the genre column

struct RCUiPlaylistView

struct RCUiPlaylistView;

The data structure used for RCUiPlaylistView class.


struct RCUiPlaylistViewClass

struct RCUiPlaylistViewClass {
};

RCUiPlaylistViewClass class.


rc_ui_listview_catalog_delete_items ()

void                rc_ui_listview_catalog_delete_items ();

Delete the selected playlist(s) in the catalog.


rc_ui_listview_catalog_get_cursor ()

gboolean            rc_ui_listview_catalog_get_cursor   (GtkTreeIter *iter);

Get the GtkTreeIter of the selected playlist item in the catalog.

iter :

the uninitialized GtkTreeIter

Returns :

TRUE, if iter was set.

rc_ui_listview_catalog_get_model ()

GtkTreeModel *      rc_ui_listview_catalog_get_model    ();

Get the GtkTreeModel used in the current catalog list view.

Returns :

The GtkTreeModel. [transfer none]

rc_ui_listview_catalog_new_playlist ()

void                rc_ui_listview_catalog_new_playlist ();

Create a new playlist in the catalog.


rc_ui_listview_catalog_rename_playlist ()

void                rc_ui_listview_catalog_rename_playlist
                                                        ();

Rename a list (make the name of the selected playlist editable).


rc_ui_listview_catalog_select ()

void                rc_ui_listview_catalog_select       (GtkTreeIter *iter);

Select the playlist in the catalog.

iter :

the iter to the playlist in the catalog

rc_ui_listview_catalog_set_pango_attributes ()

void                rc_ui_listview_catalog_set_pango_attributes
                                                        (const PangoAttrList *list);

Set the pango attribute for the catalog list view.

list :

the pango attribute list

rc_ui_listview_get_catalog_widget ()

GtkWidget *         rc_ui_listview_get_catalog_widget   ();

Get the catalog list view widget. If the widget is not initialized yet, it will be initialized.

Returns :

the catalog widget. [transfer none]

rc_ui_listview_get_playlist_widget ()

GtkWidget *         rc_ui_listview_get_playlist_widget  ();

Get the playlist list view widget. If the widget is not initialized yet, it will be initialized.

Returns :

the playlist widget. [transfer none]

rc_ui_listview_playlist_delete_items ()

void                rc_ui_listview_playlist_delete_items
                                                        ();

Delete the selected item(s) in the selected playlist.


rc_ui_listview_playlist_get_column_display_mode ()

gboolean            rc_ui_listview_playlist_get_column_display_mode
                                                        ();

Get the column display mode.

Returns :

The column display mode.

rc_ui_listview_playlist_get_cursor ()

gboolean            rc_ui_listview_playlist_get_cursor  (GtkTreeIter *iter);

Get the GtkTreeIter of the selected music item in the playlist.

iter :

the uninitialized GtkTreeIter

Returns :

TRUE, if iter was set.

rc_ui_listview_playlist_get_enabled_columns ()

guint               rc_ui_listview_playlist_get_enabled_columns
                                                        ();

Get the visibility of the artist column and album column.

Returns :

The flags of the columns.

rc_ui_listview_playlist_get_model ()

GtkTreeModel *      rc_ui_listview_playlist_get_model   ();

Get the GtkTreeModel used in the current playlist list view.

Returns :

The GtkTreeModel. [transfer none]

rc_ui_listview_playlist_refresh ()

void                rc_ui_listview_playlist_refresh     ();

Refresh the metadata of all music in the selected playlist.


rc_ui_listview_playlist_select ()

void                rc_ui_listview_playlist_select      (GtkTreeIter *iter);

Select the music in the playlist.

iter :

the iter to the playlist in the catalog

rc_ui_listview_playlist_select_all ()

void                rc_ui_listview_playlist_select_all  ();

Select all items in the selected playlist.


rc_ui_listview_playlist_set_column_display_mode ()

void                rc_ui_listview_playlist_set_column_display_mode
                                                        (gboolean mode);

Set the column display mode, set it to FALSE to use single title column mode, set it to TRUE to show metadata in more than one columns and the list header.

mode :

the column display mode

rc_ui_listview_playlist_set_enabled_columns ()

void                rc_ui_listview_playlist_set_enabled_columns
                                                        (guint column_flags,
                                                         guint enable_flags);

Enable or disable (set the visibility of) some columns by the given flags. Notice that this function will only take effects if the display mode is set to TRUE.

column_flags :

the columns to set

enable_flags :

set the columns state

rc_ui_listview_playlist_set_pango_attributes ()

void                rc_ui_listview_playlist_set_pango_attributes
                                                        (const PangoAttrList *list);

Set the pango attribute for the playlist list view.

list :

the pango attribute list

rc_ui_listview_playlist_set_title_format ()

void                rc_ui_listview_playlist_set_title_format
                                                        (const gchar *format);

Set the format string of the title column in the playlist, using %TITLE as title string, %ARTIST as artist string, %ALBUM as album string. Notice that %TITLE should be always included in the string.

format :

the format string

rc_ui_listview_refresh ()

void                rc_ui_listview_refresh              ();

Refresh the catalog and playlist list view.