Styles

Styles — The UI style of the player

Synopsis

#include <rc-ui-style.h>

gboolean            rc_ui_style_css_set_data            (const gchar *data,
                                                         gssize length);
gboolean            rc_ui_style_css_set_file            (const gchar *filename);
gboolean            rc_ui_style_css_set_resource        (const gchar *resource_path);
void                rc_ui_style_css_unset               ();
guint               rc_ui_style_embedded_theme_get_length
                                                        ();
const gchar *       rc_ui_style_embedded_theme_get_name (guint index);
gboolean            rc_ui_style_embedded_theme_set_by_index
                                                        (guint index);
gboolean            rc_ui_style_embedded_theme_set_by_name
                                                        (const gchar *name);
gboolean            rc_ui_style_embedded_theme_set_default
                                                        ();
GSList *            rc_ui_style_search_theme_paths      ();

Description

This module provides the configration of the style (theme) of the player. The player can use GTK+ 3 CSS style file for setting the style, there are also some embedded styles in the player.

Details

rc_ui_style_css_set_data ()

gboolean            rc_ui_style_css_set_data            (const gchar *data,
                                                         gssize length);

Apply the CSS style data to the player.

data :

the CSS data in the buffer

length :

the length of the data

Returns :

Whether the operation succeeded.

rc_ui_style_css_set_file ()

gboolean            rc_ui_style_css_set_file            (const gchar *filename);

Apply the CSS style file to the player.

filename :

the CSS file path

Returns :

Whether the operation succeeded.

rc_ui_style_css_set_resource ()

gboolean            rc_ui_style_css_set_resource        (const gchar *resource_path);

Apply the CSS style file in the registered GResource to the player.

resource_path :

the CSS file path in the registered GResource

Returns :

Whether the operation succeeded.

rc_ui_style_css_unset ()

void                rc_ui_style_css_unset               ();

Remove CSS style used before.


rc_ui_style_embedded_theme_get_length ()

guint               rc_ui_style_embedded_theme_get_length
                                                        ();

Get the number of the embedded themes in the player.

Returns :

The number of the embedded themes.

rc_ui_style_embedded_theme_get_name ()

const gchar *       rc_ui_style_embedded_theme_get_name (guint index);

Get the name of the embedded themes in the player by the given index number.

index :

the theme index

Returns :

The name of the embedded themes.

rc_ui_style_embedded_theme_set_by_index ()

gboolean            rc_ui_style_embedded_theme_set_by_index
                                                        (guint index);

Use the embedded theme in the player by the given index number.

index :

the theme index

Returns :

Whether the theme is set successfully.

rc_ui_style_embedded_theme_set_by_name ()

gboolean            rc_ui_style_embedded_theme_set_by_name
                                                        (const gchar *name);

Use the embedded theme in the player by the given name.

name :

the theme name

Returns :

Whether the theme is set successfully.

rc_ui_style_embedded_theme_set_default ()

gboolean            rc_ui_style_embedded_theme_set_default
                                                        ();

Use the default embedded theme in the player.

Returns :

Whether the theme is set successfully.

rc_ui_style_search_theme_paths ()

GSList *            rc_ui_style_search_theme_paths      ();

Get a list of theme paths, which contains theme files.

Returns :

A list of theme paths. [transfer full][element-type filename]