1 /* ComboFix Widget 2 * Copyright (C) 2001-2006 Cédric Auger 3 * 4 * This library is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Library General Public 6 * License as published by the Free Software Foundation; either 7 * version 2 of the License, or (at your option) any later version. 8 * 9 * This library is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * Library General Public License for more details. 13 * 14 * You should have received a copy of the GNU Library General Public 15 * License along with this library; if not, write to the 16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 * Boston, MA 02111-1307, USA. 18 */ 19 20 21 #ifndef __GTK_COMBOFIX__H__ 22 #define __GTK_COMBOFIX__H__ 23 24 #include <gtk/gtk.h> 25 26 #define GTK_TYPE_COMBOFIX (gtk_combofix_get_type ()) 27 #define GTK_COMBOFIX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_COMBOFIX, GtkComboFix)) 28 #define GTK_IS_COMBOFIX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_COMBOFIX)) 29 30 typedef struct _GtkComboFix GtkComboFix; 31 typedef struct _GtkComboFixClass GtkComboFixClass; 32 33 /* structure of the ComboFix */ 34 struct _GtkComboFix 35 { 36 GtkBox parent; 37 }; 38 39 struct _GtkComboFixClass 40 { 41 GtkBoxClass parent_class; 42 }; 43 44 /* construction */ 45 GType gtk_combofix_get_type (void) G_GNUC_CONST; 46 GtkWidget * gtk_combofix_new (GSList *list, 47 gint type); 48 GtkWidget * gtk_combofix_new_with_properties (GSList *list, 49 gboolean force_text, 50 gboolean case_sensitive, 51 gboolean mixed_sort, 52 gint type); 53 GtkWidget * gtk_combofix_get_entry (GtkComboFix *combofix); 54 void gtk_combofix_set_properties (GtkWidget *combofix); 55 56 /* text */ 57 const gchar * gtk_combofix_get_text (GtkComboFix *combofix); 58 void gtk_combofix_set_text (GtkComboFix *combofix, 59 const gchar *text); 60 void gtk_combofix_set_force_text (GtkComboFix *combofix, 61 gboolean value); 62 void gtk_combofix_set_case_sensitive (GtkComboFix *combofix, 63 gboolean case_sensitive); 64 65 /* popup */ 66 gboolean gtk_combofix_show_popup (GtkComboFix *combofix); 67 gboolean gtk_combofix_hide_popup (GtkComboFix *combofix); 68 69 /* list of items */ 70 void gtk_combofix_append_report (GtkComboFix *combofix, 71 const gchar *report_name); 72 void gtk_combofix_append_text (GtkComboFix *combofix, 73 const gchar *text); 74 void gtk_combofix_remove_report (GtkComboFix *combofix, 75 const gchar *report_name); 76 void gtk_combofix_remove_text (GtkComboFix *combofix, 77 const gchar *text); 78 gboolean gtk_combofix_set_list (GtkComboFix *combofix, 79 GSList *list); 80 void gtk_combofix_set_mixed_sort (GtkComboFix *combofix, 81 gboolean mixed_sort); 82 void gtk_combofix_set_type (GtkComboFix *combofix, 83 gint type); 84 85 /* set callback */ 86 void gtk_combofix_set_selection_callback (GtkComboFix *combofix, 87 GCallback func, 88 gpointer data); 89 90 #endif /* __GTK_COMBOFIX_H__ */ 91