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