1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */ 2 /* 3 * pkg-config-chooser 4 * Copyright (C) Johannes Schmid 2010 <jhs@gnome.org> 5 * 6 * pkg-config-chooser is free software: you can redistribute it and/or modify it 7 * under the terms of the GNU General Public License as published by the 8 * Free Software Foundation, either version 2 of the License, or 9 * (at your option) any later version. 10 * 11 * pkg-config-chooser is distributed in the hope that it will be useful, but 12 * WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 * See the GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License along 17 * with this program. If not, see <http://www.gnu.org/licenses/>. 18 */ 19 20 #ifndef _ANJUTA_PKG_CONFIG_CHOOSER_H_ 21 #define _ANJUTA_PKG_CONFIG_CHOOSER_H_ 22 23 #include <gtk/gtk.h> 24 25 G_BEGIN_DECLS 26 27 #define ANJUTA_TYPE_PKG_CONFIG_CHOOSER (anjuta_pkg_config_chooser_get_type ()) 28 #define ANJUTA_PKG_CONFIG_CHOOSER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ANJUTA_TYPE_PKG_CONFIG_CHOOSER, AnjutaPkgConfigChooser)) 29 #define ANJUTA_PKG_CONFIG_CHOOSER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ANJUTA_TYPE_PKG_CONFIG_CHOOSER, AnjutaPkgConfigChooserClass)) 30 #define ANJUTA_IS_PKG_CONFIG_CHOOSER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ANJUTA_TYPE_PKG_CONFIG_CHOOSER)) 31 #define ANJUTA_IS_PKG_CONFIG_CHOOSER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ANJUTA_TYPE_PKG_CONFIG_CHOOSER)) 32 #define ANJUTA_PKG_CONFIG_CHOOSER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ANJUTA_TYPE_PKG_CONFIG_CHOOSER, AnjutaPkgConfigChooserClass)) 33 34 typedef struct _AnjutaPkgConfigChooserClass AnjutaPkgConfigChooserClass; 35 typedef struct _AnjutaPkgConfigChooser AnjutaPkgConfigChooser; 36 typedef struct _AnjutaPkgConfigChooserPrivate AnjutaPkgConfigChooserPrivate; 37 38 struct _AnjutaPkgConfigChooserClass 39 { 40 GtkTreeViewClass parent_class; 41 42 /* Signals */ 43 void(* package_activated) (AnjutaPkgConfigChooser *self, const gchar* package); 44 void(* package_deactivated) (AnjutaPkgConfigChooser *self, const gchar* package); 45 }; 46 47 struct _AnjutaPkgConfigChooser 48 { 49 GtkTreeView parent_instance; 50 51 AnjutaPkgConfigChooserPrivate* priv; 52 }; 53 54 GType anjuta_pkg_config_chooser_get_type (void) G_GNUC_CONST; 55 GtkWidget* anjuta_pkg_config_chooser_new (void); 56 57 GList* anjuta_pkg_config_chooser_get_active_packages (AnjutaPkgConfigChooser* chooser); 58 void anjuta_pkg_config_chooser_set_active_packages (AnjutaPkgConfigChooser* chooser, GList* packages); 59 void anjuta_pkg_config_chooser_show_active_only (AnjutaPkgConfigChooser* chooser, gboolean show_selected); 60 void anjuta_pkg_config_chooser_show_active_column (AnjutaPkgConfigChooser* chooser, gboolean show_column); 61 62 gchar* anjuta_pkg_config_chooser_get_selected_package (AnjutaPkgConfigChooser* chooser); 63 64 65 G_END_DECLS 66 67 #endif /* _ANJUTA_PKG_CONFIG_CHOOSER_H_ */ 68