GvaMusicButton

GvaMusicButton — Button for streaming music

Synopsis

                    GvaMusicButton;
GtkWidget *         gva_music_button_new                (void);
void                gva_music_button_play               (GvaMusicButton *music_button);
void                gva_music_button_pause              (GvaMusicButton *music_button);
const gchar *       gva_music_button_get_game           (GvaMusicButton *music_button);
void                gva_music_button_set_game           (GvaMusicButton *music_button,
                                                         const gchar *game);
const gchar *       gva_music_button_get_status         (GvaMusicButton *music_button);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkBin
                                 +----GtkButton
                                       +----GvaMusicButton

Implemented Interfaces

GvaMusicButton implements AtkImplementorIface, GtkBuildable and GtkActivatable.

Properties

  "game"                     gchar*                : Read / Write
  "status"                   gchar*                : Read

Signals

  "pause"                                          : Run Last
  "play"                                           : Run Last

Description

A GvaMusicButton toggles between playing and pausing in-game music clips streamed from http://www.arcade-history.com/.

This requires arcade history information from a 'history.dat' file.

Details

GvaMusicButton

typedef struct _GvaMusicButton GvaMusicButton;

Contains only private data that should be read and manipulated using the functions below.


gva_music_button_new ()

GtkWidget *         gva_music_button_new                (void);

Creates a new GvaMusicButton.

Returns :

a new GvaMusicButton

gva_music_button_play ()

void                gva_music_button_play               (GvaMusicButton *music_button);

Plays a music clip from the game specified by the GvaMusicButton:game property. The clip will repeat indefinitely until paused or a different game is chosen.

music_button :

a GvaMusicButton

gva_music_button_pause ()

void                gva_music_button_pause              (GvaMusicButton *music_button);

Pauses a music clip from the game specified by the GvaMusicButton:game property.

music_button :

a GvaMusicButton

gva_music_button_get_game ()

const gchar *       gva_music_button_get_game           (GvaMusicButton *music_button);

Returns the name of the game for which to play a music clip.

music_button :

a GvaMusicButton

Returns :

the game for which to play a music clip

gva_music_button_set_game ()

void                gva_music_button_set_game           (GvaMusicButton *music_button,
                                                         const gchar *game);

Sets the name of the game for which to play a music clip. Use gva_music_button_play() to play the clip.

music_button :

a GvaMusicButton

game :

the name of a game

gva_music_button_get_status ()

const gchar *       gva_music_button_get_status         (GvaMusicButton *music_button);

Returns a status message about the music clip, such as buffering progress or whether a music clip is available for the selected game.

music_button :

a GvaMusicButton

Returns :

a status message about the music clip

Property Details

The "game" property

  "game"                     gchar*                : Read / Write

The game for which to play a music clip.

Default value: NULL


The "status" property

  "status"                   gchar*                : Read

Status message about the music clip.

Default value: NULL

Signal Details

The "pause" signal

void                user_function                      (GvaMusicButton *music_button,
                                                        gpointer        user_data)         : Run Last

The ::pause signal is emitted when the user pauses a music clip.

music_button :

the GvaMusicButton that received the signal

user_data :

user data set when the signal handler was connected.

The "play" signal

void                user_function                      (GvaMusicButton *music_button,
                                                        gpointer        user_data)         : Run Last

The ::play signal is emitted when the user plays a music clip.

music_button :

the GvaMusicButton

user_data :

user data set when the signal handler was connected.