musicus mpd client 0.1d
Defines | Typedefs | Enumerations | Functions
MPD actions

Defines

#define GPOINTER_TO_ACTION_TYPE(data)   ((MpdActionType)data)
#define ACTION_TYPE_TO_GPOINTER(data)   ((gpointer)data)

Typedefs

typedef enum MpdActionType_ MpdActionType
typedef gboolean(* ActionFunc )(void)

Enumerations

enum  MpdActionType_ {
  ACTION_UNDEF, ACTION_PLAY_PAUSE, ACTION_STOP, ACTION_NEXT,
  ACTION_PREVIOUS, ACTION_PLAYLIST, ACTION_UPDATE_DB, ACTION_MEDIA_BROWSER,
  ACTION_RANDOM, ACTION_REPEAT, ACTION_XFADE, NUM_ACTIONS
}

Functions

void action (GtkWidget *widget, gpointer data)

Detailed Description

This module contains an universal callback function which provides an interface to the various active mpd commands such as play/pause


Define Documentation

#define ACTION_TYPE_TO_GPOINTER (   data)    ((gpointer)data)

convert an ActionType to a gpointer

#define GPOINTER_TO_ACTION_TYPE (   data)    ((MpdActionType)data)

convert a gpointer to a MpdActionType


Typedef Documentation

typedef gboolean(* ActionFunc)(void)

Action function prototype

MpdActionType is used to communicate the desired action to the action callback.
Use the macros GPOINTER_TO_ACTION_TYPE and ACTION_TYPE_TO_GPOINTER for conversion between gpointers to ActionTypes.


Enumeration Type Documentation

enum MpdActionType_

See also:
MpdActionType
Enumerator:
ACTION_UNDEF 

undefined action

ACTION_PLAY_PAUSE 

toggle play/pause

ACTION_STOP 

stop playback

ACTION_NEXT 

next song

ACTION_PREVIOUS 

previous song

ACTION_PLAYLIST 

open playlist window

ACTION_UPDATE_DB 

update database

ACTION_MEDIA_BROWSER 

open media browser

ACTION_RANDOM 

toggle random state

ACTION_REPEAT 

toggle repeat state

ACTION_XFADE 

toggle crossfade state

NUM_ACTIONS 

number of actions


Function Documentation

void action ( GtkWidget *  widget,
gpointer  data 
)

The callback function

Parameters:
widgetThe widget from which this function was called
datasupply a MpdActionType (use the conversion macros)
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines