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>
|
10703
|
34 #if !GTK_CHECK_VERSION(2,6,0)
|
|
35 # include "gtkcellview.h"
|
|
36 # include "gtkcellviewmenuitem.h"
|
|
37 # if !GTK_CHECK_VERSION(2,4,0)
|
|
38 # include "gtkcelllayout.h"
|
|
39 # include "gtkcombobox.h"
|
|
40 # endif /* Gtk 2.4 */
|
|
41 #endif /* Gtk 2.6 */
|
10643
|
42
|
|
43 G_BEGIN_DECLS
|
|
44
|
|
45 #define GTK_GAIM_TYPE_STATUS_BOX (gtk_gaim_status_box_get_type ())
|
|
46 #define GTK_GAIM_STATUS_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_GAIM_TYPE_STATUS_BOX, GtkGaimStatusBox))
|
|
47 #define GTK_GAIM_STATUS_BOX_CLASS(vtable) (G_TYPE_CHECK_CLASS_CAST ((vtable), GTK_GAIM_TYPE_STATUS_BOX, GtkGaimStatusBoxClass))
|
|
48 #define GTK_GAIM_IS_STATUS_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_GAIM_TYPE_STATUS_BOX))
|
|
49 #define GTK_GAIM_IS_STATUS_BOX_CLASS(vtable) (G_TYPE_CHECK_CLASS_TYPE ((vtable), GTK_GAIM_TYPE_STATUS_BOX))
|
|
50 #define GTK_GAIM_STATUS_BOX_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), GTK_GAIM_TYPE_STATUS_BOX, GtkGaimStatusBoxClass))
|
|
51
|
|
52 typedef struct _GtkGaimStatusBox GtkGaimStatusBox;
|
|
53 typedef struct _GtkGaimStatusBoxClass GtkGaimStatusBoxClass;
|
|
54
|
|
55 struct _GtkGaimStatusBox
|
|
56 {
|
|
57 GtkComboBox parent_instance;
|
|
58
|
|
59 GtkListStore *store;
|
|
60 GtkListStore *dropdown_store;
|
|
61
|
|
62 GtkWidget *vbox, *sw;
|
|
63 GtkWidget *imhtml;
|
|
64 gboolean imhtml_visible;
|
|
65
|
|
66 GtkWidget *cell_view;
|
|
67 GtkCellRenderer *icon_rend;
|
|
68 GtkCellRenderer *text_rend;
|
|
69
|
|
70 GdkPixbuf *error_pixbuf;
|
|
71 int connecting_index;
|
|
72 GdkPixbuf *connecting_pixbufs[4];
|
|
73 int typing_index;
|
|
74 GdkPixbuf *typing_pixbufs[4];
|
|
75
|
|
76 gboolean connecting;
|
|
77 gboolean typing;
|
|
78
|
|
79
|
|
80 GtkTreeIter iter;
|
|
81 GdkPixbuf *pixbuf;
|
|
82 char *title;
|
|
83 char *desc;
|
|
84 char *error;
|
|
85 };
|
|
86
|
|
87 struct _GtkGaimStatusBoxClass
|
|
88 {
|
|
89 GtkComboBoxClass parent_class;
|
|
90
|
|
91 /* signals */
|
|
92 void (* changed) (GtkComboBox *combo_box);
|
|
93
|
|
94 /* Padding for future expansion */
|
|
95 void (*_gtk_reserved0) (void);
|
|
96 void (*_gtk_reserved1) (void);
|
|
97 void (*_gtk_reserved2) (void);
|
|
98 void (*_gtk_reserved3) (void);
|
|
99 };
|
|
100
|
|
101
|
|
102 GType gtk_gaim_status_box_get_type (void) G_GNUC_CONST;
|
|
103 GtkWidget *gtk_gaim_status_box_new (void);
|
|
104
|
|
105 void
|
|
106 gtk_gaim_status_box_add(GtkGaimStatusBox *status_box, GdkPixbuf *pixbuf, const char *text, const char *sec_text, char *edit);
|
|
107
|
|
108 void
|
|
109 gtk_gaim_status_box_set_error(GtkGaimStatusBox *status_box, const gchar *error);
|
|
110
|
|
111 void
|
|
112 gtk_gaim_status_box_set_connecting(GtkGaimStatusBox *status_box, gboolean connecting);
|
|
113
|
|
114 void
|
|
115 gtk_gaim_status_box_pulse_connecting(GtkGaimStatusBox *status_box);
|
|
116
|
10649
|
117
|
|
118 const char *gtk_gaim_status_box_get_active_type(GtkGaimStatusBox *status_box);
|
|
119
|
|
120 const char *gtk_gaim_status_box_get_message(GtkGaimStatusBox *status_box);
|
|
121
|
10643
|
122 G_END_DECLS
|
|
123
|
|
124 #endif /* __GTK_GAIM_GTK_STATUS_COMBO_BOX_H__ */
|