1 using Gmpc.PanedSizeGroup;
4 [CCode (cname="TRUE",cheader_filename="gtk/gtk.h,gtktransition.h")]
5 static bool use_transition;
7 [CCode (cname="paned_size_group", cheader_filename="plugin.h")]
8 static PanedSizeGroup paned_size_group;
10 [CCode (cname = "gmpcconn", cheader_filename="main.h")]
11 static Connection gmpcconn;
13 [CCode (cname = "connection", cheader_filename="plugin.h")]
14 static MPD.Server server;
16 [CCode (cname = "gmw", cheader_filename="main.h")]
17 static MetaWatcher metawatcher;
19 [CCode (cname = "gmpc_profiles", cheader_filename="plugin.h")]
20 static Profiles profiles;
22 [CCode (cheader_filename="gmpc-meta-watcher.h")]
23 public class MetaWatcher {
24 signal void data_changed(MPD.Song song, Gmpc.MetaData.Type type, Gmpc.MetaData.Result result,MetaData.Item met);
27 [CCode ( cname="gmpc_meta_watcher_get_meta_path", cheader_filename="gmpc-meta-watcher.h" )]
28 public Gmpc.MetaData.Result query(MPD.Song song, Gmpc.MetaData.Type type, out MetaData.Item met);
35 [CCode (cname="MetaDataContentType", cprefix = "META_DATA_CONTENT_", cheader_filename = "libmpd/libmpd.h,metadata.h")]
36 public enum ContentType {
45 [CCode (cname="MetaData", cheader_filename="metadata.h")]
48 [CCode (free_function="meta_data_free")]
50 [CCode (cname="meta_data_new")]
52 public Gmpc.MetaData.Type type;
53 public weak string plugin_name;
55 public Gmpc.MetaData.ContentType content_type;
57 [CCode (cname="meta_data_is_empty")]
58 public bool is_empty();
60 [CCode (cname="meta_data_set_uri")]
61 public void set_uri(string uri);
63 [CCode (cname="meta_data_get_image")]
64 public weak uchar[] get_raw();
66 [CCode (cname="meta_data_get_text")]
67 public weak string get_text();
68 /* same as get_text */
70 [CCode (cname="meta_data_get_uri")]
71 public weak string get_uri();
73 [CCode (cname="meta_data_get_html")]
74 public weak string get_html();
76 [CCode (cname="meta_data_get_text_vector")]
77 public weak string[] get_text_vector();
79 [CCode (cname="meta_data_get_text_list")]
80 public weak GLib.List<weak string> get_text_list();
82 [CCode (cname="meta_data_is_text_list")]
83 public bool is_text_list();
84 [CCode (cname="meta_data_dup_steal")]
85 public MetaData.Item dup_steal();
87 [CCode (cname="MetaDataType", cprefix = "META_", cheader_filename = "metadata.h")]
97 SONG_GUITAR_TAB = 256,
98 QUERY_DATA_TYPES = 65535,
99 QUERY_NO_CACHE = 65536
102 [CCode (cname="MetaDataResult", cprefix = "META_DATA_", cheader_filename = "metadata.h")]
110 public delegate void Callback (void *handle,string? plugin_name, GLib.List<MetaData.Item>? list);
111 [CCode ( cname="metadata_get_list", cheader_filename="libmpd/libmpd.h,metadata.h" )]
112 public void* get_list(MPD.Song song, Type type, Callback callback);
114 [CCode ( cname="metadata_get_list_cancel", cheader_filename="metadata.h" )]
115 public void* get_list_cancel(void *handle);
118 [CCode ( cname="meta_data_set_cache", cheader_filename="metadata-cache.h")]
119 public void set_metadata(MPD.Song song, Result result, Gmpc.MetaData.Item met);
121 [CCode ( cname="gmpc_get_metadata_filename", cheader_filename="libmpd/libmpd.h,metadata.h")]
122 public string get_metadata_filename(Type type, MPD.Song song, string? extention);
124 [CCode ( cname="GmpcMetaImage", cheader_filename="gmpc-metaimage.h")]
125 public class Image: Gtk.Widget {
126 [CCode (cname="gmpc_metaimage_new_size")]
127 public Image(Type type, int size);
128 [CCode (cname="gmpc_metaimage_update_cover_from_song")]
129 public void update_from_song(MPD.Song song);
131 [CCode (cname="gmpc_metaimage_update_cover_from_song_delayed")]
132 public void update_from_song_delayed(MPD.Song song);
133 [CCode (cname="gmpc_metaimage_set_squared")]
134 public void set_squared(bool squared);
135 [CCode (cname="gmpc_metaimage_set_hide_on_na")]
136 public void set_hide_on_na(bool hide);
138 [CCode (cname="gmpc_metaimage_set_scale_up")]
139 public void set_scale_up(bool scale);
142 [CCode ( cname="GmpcStatsLabel", cheader_filename="gmpc-stats-label.h")]
143 public class StatsLabel : Gtk.Label {
147 ARTIST_PLAYTIME_SONGS,
151 ALBUM_PLAYTIME_SONGS,
155 [CCode (cname="gmpc_stats_label_new")]
156 public StatsLabel(Type type, MPD.Song song);
158 [CCode ( cname="GmpcMetaTextView", cheader_filename="gmpc-meta-text-view.h")]
159 public class TextView: Gtk.TextView {
160 public bool use_monospace;
161 [CCode (cname="gmpc_meta_text_view_new")]
162 public TextView(Type type);
163 [CCode (cname="gmpc_meta_text_view_query_text_from_song")]
164 public void query_from_song(MPD.Song song);
165 public bool force_ro;
170 [CCode (cprefix = "ERROR_", cheader_filename = "playlist3-messages.h")]
177 [CCode (cname = "playlist3_show_error_message", cheader_filename="playlist3-messages.h")]
178 void show(string message, Gmpc.Messages.Level level);
181 namespace AsyncDownload {
182 [CCode (cname="GEADStatus",cprefix = "GEAD_", cheader_filename = "gmpc_easy_download.h")]
190 [CCode (cname="GEADAsyncHandler", cheader_filename="gmpc_easy_download.h")]
193 [CCode (ref_function="", unref_function ="")]
194 public class Handle {
195 [CCode (cname="gmpc_easy_async_cancel", cheader_filename="gmpc_easy_download.h")]
196 public void cancel ();
198 [CCode (cname="gmpc_easy_handler_get_data_vala_wrap", cheader_filename="gmpc_easy_download.h")]
199 public weak uchar[] get_data();
200 [CCode (cname="gmpc_easy_handler_get_uri", cheader_filename="gmpc_easy_download.h")]
201 public weak string get_uri();
203 [CCode (cname="gmpc_easy_handler_get_user_data", cheader_filename="gmpc_easy_download.h")]
204 public void * get_user_data();
206 [CCode (cname="gmpc_easy_handler_set_user_data", cheader_filename="gmpc_easy_download.h")]
207 public void set_user_data(void *user_data);
209 [CCode (cname="gmpc_easy_handler_get_content_size", cheader_filename="gmpc_easy_download.h")]
210 public int64 get_content_size();
215 public delegate void Callback (Gmpc.AsyncDownload.Handle handle, Gmpc.AsyncDownload.Status status);
217 [CCode (cname="gmpc_easy_async_downloader", cheader_filename="gmpc_easy_download.h")]
218 public weak Gmpc.AsyncDownload.Handle download(string uri, Gmpc.AsyncDownload.Callback callback);
220 [CCode (cname="gmpc_easy_download_uri_escape", cheader_filename="gmpc_easy_download.h")]
221 public string escape_uri(string part);
224 [CCode (cname="gmpc_get_full_glade_path", cheader_filename="plugin.h")]
225 public string data_path(string file);
226 [CCode (cname="gmpc_get_user_path", cheader_filename="plugin.h")]
227 public string user_path(string file);
228 [CCode (cname="open_uri", cheader_filename="misc.h")]
229 public void open_uri(string uri);
232 [CCode (cname="(GtkWindow *)playlist3_get_window", cheader_filename="plugin.h")]
233 public weak Gtk.Window get_window();
234 [CCode (cname="playlist3_window_is_hidden", cheader_filename="plugin.h")]
235 public bool is_hidden();
241 [CCode (cname = "config", cheader_filename="plugin.h")]
242 static Settings config;
243 [CCode (cheader_filename="config1.h")]
246 public class Settings {
247 [CCode (cname="cfg_get_single_value_as_string_with_default", cheader_filename="config1.h")]
248 public string get_string_with_default(string class, string key, string value);
249 [CCode (cname="cfg_get_single_value_as_int_with_default", cheader_filename="config1.h")]
250 public int get_int_with_default(string class, string key, int value);
251 [CCode (cname="cfg_set_single_value_as_int", cheader_filename="config1.h")]
252 public int set_int(string class, string key, int value);
256 [CCode (cname="colorshift_pixbuf",cheader_filename="misc.h")]
257 public void colorshift_pixbuf(Gdk.Pixbuf dest, Gdk.Pixbuf src, int shift);
258 [CCode (cname="misc_header_expose_event",cheader_filename="misc.h")]
259 public bool misc_header_expose_event(Gtk.Widget widget, Gdk.EventExpose event);
262 [CCode (cname="format_time_real", cheader_filename="misc.h")]
263 public string format_time(ulong seconds, string pre);
268 [CCode (cname="playlist3_insert_browser")]
269 public void insert(out Gtk.TreeIter iter, int position);
271 [CCode (cname="pl3_file_browser_open_path")]
272 public void open_path(string path);
275 [CCode (cname="pl3_find2_ec_database")]
276 public void query_database(void *user_data, string query);
279 [CCode (cname="info2_fill_artist_view")]
280 public void show_artist(string artist);
282 [CCode (cname="info2_fill_album_view")]
283 public void show_album(string artist,string album);
286 namespace Playlist3 {
287 [CCode (cname="playlist3_get_category_tree_view")]
288 public unowned Gtk.TreeView get_category_tree_view();
290 [CCode (cname="main_window_add_status_icon")]
291 public void add_status_icon(Gtk.Widget widget);
296 [CCode (chader_filename="gmpc-mpddata-treeview.h",cname="GmpcMpdDataTreeview")]
297 public class TreeView : Gtk.TreeView {
298 [CCode (cname="gmpc_mpddata_treeview_new")]
299 public TreeView(string name, bool sort, Gtk.TreeModel model);
300 [CCode (cname="gmpc_mpddata_treeview_enable_click_fix")]
301 public void enable_click_fix();
302 [CCode (cname="gmpc_mpddata_treeview_right_mouse_intergration")]
303 public int right_mouse_integration(Gtk.Menu menu);
306 [CCode (cheader_filename="gmpc-mpddata-model.h")]
307 public class Model : GLib.Object, Gtk.TreeModel{
308 [CCode (has_construct_function = true,cname="gmpc_mpddata_model_new")]
311 [CCode (cname="gmpc_mpddata_model_set_mpd_data")]
312 public void set_mpd_data(owned MPD.Data.Item? list);
314 [CCode (cname="gmpc_mpddata_model_set_request_artist")]
315 public void set_request_artist(string? list);
317 [CCode (cname="gmpc_mpddata_model_get_request_artist")]
318 public weak string get_request_artist();
319 public int icon_size;
325 [CCode (cname="mpd_song_checksum",cheader_filename="misc.h")]
326 public string? song_checksum(MPD.Song? song);
328 namespace MpdInteraction {
329 [CCode (cname="play_path",cheader_filename="mpdinteraction.h")]
330 public void play_path(string path);
331 [CCode (cname="submenu_for_song")]
332 public void submenu_for_song(Gtk.Widget menu, MPD.Song song);
335 [CCode (cheader_filename="gmpc-profiles.h")]
339 [CCode (cname="gmpc_profiles_get_current",cheader_filename="gmpc-profiles.h")]
340 public string? get_current_id();
341 public void set_db_update_time(string id, int value);
342 public int get_db_update_time(string id);