musicus mpd client 0.1d
Functions
Support

Functions

GtkTreeStore * pl_create_tree_store (MpdPlContainer *plc)
GtkTreeStore * pl_empty_tree_store (void)
GtkListStore * pl_empty_list_store (void)
GtkListStore * pl_create_list_store (MpdPlContainer *list)
GtkWidget * pl_create_tree_view (GtkTreeModel *model)
void pl_win_quit (GtkWidget *widget, gpointer data)
void delete_widget (GtkWidget *widget, gpointer data)
void dummy ()
void quit_procedure (GtkWidget *widget, gpointer data)
gboolean update_info (gpointer data)
gboolean check_update_interval (gpointer data)
void debug_fprintf (FILE *out, char *format,...)
gboolean get_data_dir (gchar *dir, int len, gboolean is_applet)
void menu_add_entry (GtkContainer *menu, gchar *label, GCallback callback, gpointer data)
GtkWidget * menu_add_entry_stock_icon (GtkContainer *menu, gchar *label, const gchar *stock_id, GCallback callback, gpointer data)
void menu_add_separator (GtkContainer *menu)
void menu_shell_add_entry (GtkMenuShell *menu, gchar *label, GCallback callback, gpointer data)
GtkWidget * menu_shell_add_entry_stock_icon (GtkMenuShell *menu, gchar *label, const gchar *stock_id, GCallback callback, gpointer data)
void menu_shell_add_separator (GtkMenuShell *menu)
void print_size (GtkWidget *widget, GtkAllocation *allocation, gpointer data)

Detailed Description

Support routines for Musicus


Function Documentation

gboolean check_update_interval ( gpointer  data)

periodic function which checks if update_interval changes and if it does restarts periodic functions in mpd_info.update_routines is probably best called in an interval between 500 and 1000 ms

Parameters:
datauser data: used on startup to initialize old_interval
void debug_fprintf ( FILE *  out,
char *  format,
  ... 
)

convenience wrapper for

 fprintf(out, format, ...);
 fflush(out);
Parameters:
outthe file to write to
formatthe format specifier (like printf)
...variables as in printf check man 3 printf for more documentation on the format specifier
void delete_widget ( GtkWidget *  widget,
gpointer  data 
)

Delete the GtkWidget pointed to by widget. Install this function by calling g_signal_connect_swapped

Parameters:
widgetthe widget to delete
datanot used
void dummy ( )

Dummy procedure for things which are not yet implemented

gboolean get_data_dir ( gchar *  dir,
int  len,
gboolean  is_applet 
)

get the data dir for the config file
(~/.musicus/ for the standalone version,
~/.gnome2/musicus/ for the applet)

Parameters:
dira buffer for the result
lenthe length of dir
is_appletTRUE if the dir for the applet is wanted
Returns:
FALSE on error, TRUE if all went well
void menu_add_entry ( GtkContainer *  menu,
gchar *  label,
GCallback  callback,
gpointer  data 
)

Add an item to the menu menu.

Parameters:
menuthe menu to which to add the item
labelthe label of the item
callbackthe callback function
dataany user data
GtkWidget* menu_add_entry_stock_icon ( GtkContainer *  menu,
gchar *  label,
const gchar *  stock_id,
GCallback  callback,
gpointer  data 
)

Add an item with stock icon to the menu menu.

Parameters:
menuthe menu to which to add the item
labelthe label of the item
stock_idthe string for the stock icon
callbackthe callback function
dataany user data
void menu_add_separator ( GtkContainer *  menu)

Add a separator to the menu menu

Parameters:
menuthe menu to which to add the separator
void menu_shell_add_entry ( GtkMenuShell *  menu,
gchar *  label,
GCallback  callback,
gpointer  data 
)

Add an item to the MenuShell menu.

Parameters:
menuthe MenuShell to which to add the item
labelthe label of the item
callbackthe callback function
dataany user data
GtkWidget* menu_shell_add_entry_stock_icon ( GtkMenuShell *  menu,
gchar *  label,
const gchar *  stock_id,
GCallback  callback,
gpointer  data 
)

Add an item with stock icon to the MenuShell menu.

Parameters:
menuthe MenuShell to which to add the item
labelthe label of the item
stock_idthe string for the stock icon
callbackthe callback function
dataany user data
void menu_shell_add_separator ( GtkMenuShell *  menu)

Add a separator to the menu menu

Parameters:
menuthe MenuShell to which to add the separator
GtkListStore* pl_create_list_store ( MpdPlContainer list)

This function creates a ListStore from a playlist

Parameters:
listthe playlist
Returns:
the new ListStore
GtkTreeStore* pl_create_tree_store ( MpdPlContainer plc)

This function creates a TreeStore from a playlist

Parameters:
plcthe playlist
Returns:
the new TreeStore
GtkWidget* pl_create_tree_view ( GtkTreeModel *  model)

Create a TreeView for the supplied TreeModel

Parameters:
modelthe TreeModel for which to generate a TreeView
Returns:
a TreeView widget
GtkListStore* pl_empty_list_store ( void  )

This function creates an empty ListStore

Returns:
the ListStore
GtkTreeStore* pl_empty_tree_store ( void  )

This function creates an empty TreeStore

Returns:
the TreeStore
void pl_win_quit ( GtkWidget *  widget,
gpointer  data 
)

Quit callback

Parameters:
widgetWidget from which the call originated
datathe user data
void print_size ( GtkWidget *  widget,
GtkAllocation *  allocation,
gpointer  data 
)

print window size_info_entity usage:

 g_callback(G_OBJECT(obj), "size-allocate",
            G_CALLBACK(print_size), NULL);
Parameters:
widgetthe widget it is called from
allocationthe allocation info (size/pos) on screen
datauser data
void quit_procedure ( GtkWidget *  widget,
gpointer  data 
)

Callback wrapper for gtk_main_quit

Parameters:
widgetWidget from which the call originated
datathe user data
gboolean update_info ( gpointer  data)

periodic function for updating title and statusbar

Parameters:
datauser data use for update_interval, it is used to check for a changed update interval
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines