00001 /* 00002 * UPnP Browser for Maemo 00003 * 00004 * interface.h 00005 * 00006 * Copyright 2005 Nokia Corporation 00007 */ 00008 00009 #ifndef INTERFACE_H 00010 #define INTERFACE_H 00011 00012 #include "settings.h" 00013 00014 #include <gtk/gtk.h> 00015 #ifdef MAEMO 00016 #include <osso-mime.h> 00017 #include <libosso.h> 00018 #endif 00019 00020 typedef struct _UPnPBrowserWidgets 00021 { 00022 GtkWidget* app; 00023 GtkWidget* appview; 00024 00025 GtkWidget* menu; 00026 00027 GtkTooltips* tips; 00028 00030 GtkWidget* vpaned; 00031 00033 GtkWidget* hpaned; 00034 00036 GtkWidget* toolbar_vbox; 00037 00039 GtkWidget* device_view; 00041 GtkWidget* device_scrolled_window; 00042 00044 GtkWidget* folder_view; 00046 GtkWidget* folder_scrolled_window; 00048 GtkTreeStore* folder_model; 00049 00051 GtkTreeModel *container_filter; 00053 GtkTreeModel *file_filter; 00054 00055 GtkToolItem *volume_dec_button; 00056 GtkToolItem *mute_button; 00057 GtkToolItem *volume_inc_button; 00058 00060 GtkWidget* now_playing_bar; 00061 00063 GtkWidget* toolbar; 00064 00066 GtkWidget* renderer_combo; 00068 GtkListStore* renderer_model; 00069 00070 /* Renderer preset menu button */ 00071 GtkToolItem *presets_button; 00072 00074 GtkWidget* now_playing_text_view; 00076 GtkTextBuffer* now_playing_text_buffer; 00077 00078 /* Timeout handle for the last playing */ 00079 guint now_playing_timeout; 00080 00082 gint volume; 00084 gboolean mute; 00085 00087 GtkWidget* seek_bar; 00088 gulong seek_bar_signal; 00089 00090 #ifdef MAEMO 00091 osso_context_t *osso; 00092 #endif 00093 00094 UPnPBrowserSettings* settings; 00095 00096 } UPnPBrowserWidgets; 00097 00098 /***************************************************************************** 00099 * Functions 00100 *****************************************************************************/ 00104 int create_widgets(); 00105 00109 int create_menu(); 00110 00114 int create_toolbar(); 00115 00116 /***************************************************************************** 00117 * Callbacks 00118 *****************************************************************************/ 00119 00123 void download_clicked(); 00124 00128 void settings_clicked(); 00129 00133 void close_clicked(); 00134 00138 void update_clicked(); 00139 00143 void renderer_presets_clicked(); 00144 00148 void volume_decrease_clicked(); 00149 00153 void mute_clicked(); 00154 00158 void volume_increase_clicked(); 00159 00163 void prev_clicked(); 00164 00168 void play_clicked(); 00169 00173 void pause_clicked(); 00174 00178 void stop_clicked(); 00179 00183 void next_clicked(); 00184 00188 void playlist_clicked(); 00189 00193 void playlist_add_clicked(); 00194 00198 void playlist_add_all_clicked(); 00199 00203 void seek_bar_move(GtkRange* range, gpointer user_data); 00204 00205 #endif