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:
-
data | user data: used on startup to initialize old_interval |
void debug_fprintf |
( |
FILE * |
out, |
|
|
char * |
format, |
|
|
|
... |
|
) |
| |
convenience wrapper for
fprintf(out, format, ...);
fflush(out);
- Parameters:
-
out | the file to write to |
format | the 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:
-
widget | the widget to delete |
data | not used |
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:
-
dir | a buffer for the result |
len | the length of dir |
is_applet | TRUE 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:
-
menu | the menu to which to add the item |
label | the label of the item |
callback | the callback function |
data | any 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:
-
menu | the menu to which to add the item |
label | the label of the item |
stock_id | the string for the stock icon |
callback | the callback function |
data | any user data |
void menu_add_separator |
( |
GtkContainer * |
menu | ) |
|
Add a separator to the menu menu
- Parameters:
-
menu | the 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:
-
menu | the MenuShell to which to add the item |
label | the label of the item |
callback | the callback function |
data | any 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:
-
menu | the MenuShell to which to add the item |
label | the label of the item |
stock_id | the string for the stock icon |
callback | the callback function |
data | any user data |
void menu_shell_add_separator |
( |
GtkMenuShell * |
menu | ) |
|
Add a separator to the menu menu
- Parameters:
-
menu | the MenuShell to which to add the separator |
This function creates a ListStore from a playlist
- Parameters:
-
- Returns:
- the new ListStore
This function creates a TreeStore from a playlist
- Parameters:
-
- Returns:
- the new TreeStore
GtkWidget* pl_create_tree_view |
( |
GtkTreeModel * |
model | ) |
|
Create a TreeView for the supplied TreeModel
- Parameters:
-
model | the 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:
-
widget | Widget from which the call originated |
data | the 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:
-
widget | the widget it is called from |
allocation | the allocation info (size/pos) on screen |
data | user data |
void quit_procedure |
( |
GtkWidget * |
widget, |
|
|
gpointer |
data |
|
) |
| |
Callback wrapper for gtk_main_quit
- Parameters:
-
widget | Widget from which the call originated |
data | the user data |
gboolean update_info |
( |
gpointer |
data | ) |
|
periodic function for updating title and statusbar
- Parameters:
-
data | user data use for update_interval, it is used to check for a changed update interval |