Sat, 12 Mar 2005 01:10:37 +0000
[gaim-migrate @ 12235]
grim says this is really fixed this time.
| 10643 | 1 | /* |
| 2 | * @file gtkstatusbox.c GTK+ Status Selection Widget | |
| 3 | * @ingroup gtkui | |
| 4 | * | |
| 5 | * gaim | |
| 6 | * | |
| 7 | * Gaim is the legal property of its developers, whose names are too numerous | |
| 8 | * to list here. Please refer to the COPYRIGHT file distributed with this | |
| 9 | * source distribution. | |
| 10 | * | |
| 11 | * This program is free software; you can redistribute it and/or modify | |
| 12 | * it under the terms of the GNU General Public License as published by | |
| 13 | * the Free Software Foundation; either version 2 of the License, or | |
| 14 | * (at your option) any later version. | |
| 15 | * | |
| 16 | * This program is distributed in the hope that it will be useful, | |
| 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 19 | * GNU General Public License for more details. | |
| 20 | * | |
| 21 | * You should have received a copy of the GNU General Public License | |
| 22 | * along with this program; if not, write to the Free Software | |
| 23 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 24 | */ | |
| 25 | ||
| 26 | ||
| 27 | #ifndef __GTK_GAIM_STATUS_BOX_H__ | |
| 28 | #define __GTK_GAIM_STATUS_BOX_H__ | |
| 29 | ||
| 30 | #include <gtk/gtk.h> | |
| 31 | #include "gtkimhtml.h" | |
| 32 | #include <gtk/gtktreemodel.h> | |
| 33 | #include <gtk/gtktreeview.h> | |
| 34 | ||
| 35 | G_BEGIN_DECLS | |
| 36 | ||
| 37 | #define GTK_GAIM_TYPE_STATUS_BOX (gtk_gaim_status_box_get_type ()) | |
| 38 | #define GTK_GAIM_STATUS_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_GAIM_TYPE_STATUS_BOX, GtkGaimStatusBox)) | |
| 39 | #define GTK_GAIM_STATUS_BOX_CLASS(vtable) (G_TYPE_CHECK_CLASS_CAST ((vtable), GTK_GAIM_TYPE_STATUS_BOX, GtkGaimStatusBoxClass)) | |
| 40 | #define GTK_GAIM_IS_STATUS_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_GAIM_TYPE_STATUS_BOX)) | |
| 41 | #define GTK_GAIM_IS_STATUS_BOX_CLASS(vtable) (G_TYPE_CHECK_CLASS_TYPE ((vtable), GTK_GAIM_TYPE_STATUS_BOX)) | |
| 42 | #define GTK_GAIM_STATUS_BOX_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), GTK_GAIM_TYPE_STATUS_BOX, GtkGaimStatusBoxClass)) | |
| 43 | ||
| 44 | typedef struct _GtkGaimStatusBox GtkGaimStatusBox; | |
| 45 | typedef struct _GtkGaimStatusBoxClass GtkGaimStatusBoxClass; | |
| 46 | ||
| 47 | struct _GtkGaimStatusBox | |
| 48 | { | |
| 49 | GtkComboBox parent_instance; | |
| 50 | ||
| 51 | GtkListStore *store; | |
| 52 | GtkListStore *dropdown_store; | |
| 53 | ||
| 54 | GtkWidget *vbox, *sw; | |
| 55 | GtkWidget *imhtml; | |
| 56 | gboolean imhtml_visible; | |
| 57 | ||
| 58 | GtkWidget *cell_view; | |
| 59 | GtkCellRenderer *icon_rend; | |
| 60 | GtkCellRenderer *text_rend; | |
| 61 | ||
| 62 | GdkPixbuf *error_pixbuf; | |
| 63 | int connecting_index; | |
| 64 | GdkPixbuf *connecting_pixbufs[4]; | |
| 65 | int typing_index; | |
| 66 | GdkPixbuf *typing_pixbufs[4]; | |
| 67 | ||
| 68 | gboolean connecting; | |
| 69 | gboolean typing; | |
| 70 | ||
| 71 | ||
| 72 | GtkTreeIter iter; | |
| 73 | GdkPixbuf *pixbuf; | |
| 74 | char *title; | |
| 75 | char *desc; | |
| 76 | char *error; | |
| 77 | }; | |
| 78 | ||
| 79 | struct _GtkGaimStatusBoxClass | |
| 80 | { | |
| 81 | GtkComboBoxClass parent_class; | |
| 82 | ||
| 83 | /* signals */ | |
| 84 | void (* changed) (GtkComboBox *combo_box); | |
| 85 | ||
| 86 | /* Padding for future expansion */ | |
| 87 | void (*_gtk_reserved0) (void); | |
| 88 | void (*_gtk_reserved1) (void); | |
| 89 | void (*_gtk_reserved2) (void); | |
| 90 | void (*_gtk_reserved3) (void); | |
| 91 | }; | |
| 92 | ||
| 93 | ||
| 94 | GType gtk_gaim_status_box_get_type (void) G_GNUC_CONST; | |
| 95 | GtkWidget *gtk_gaim_status_box_new (void); | |
| 96 | ||
| 97 | void | |
| 98 | gtk_gaim_status_box_add(GtkGaimStatusBox *status_box, GdkPixbuf *pixbuf, const char *text, const char *sec_text, char *edit); | |
| 99 | ||
| 100 | void | |
| 101 | gtk_gaim_status_box_set_error(GtkGaimStatusBox *status_box, const gchar *error); | |
| 102 | ||
| 103 | void | |
| 104 | gtk_gaim_status_box_set_connecting(GtkGaimStatusBox *status_box, gboolean connecting); | |
| 105 | ||
| 106 | void | |
| 107 | gtk_gaim_status_box_pulse_connecting(GtkGaimStatusBox *status_box); | |
| 108 | ||
| 10649 | 109 | |
| 110 | const char *gtk_gaim_status_box_get_active_type(GtkGaimStatusBox *status_box); | |
| 111 | ||
| 112 | const char *gtk_gaim_status_box_get_message(GtkGaimStatusBox *status_box); | |
| 113 | ||
| 10643 | 114 | G_END_DECLS |
| 115 | ||
| 116 | #endif /* __GTK_GAIM_GTK_STATUS_COMBO_BOX_H__ */ |