]> git.0d.be Git - empathy.git/blob - libempathy-gtk/empathy-dialpad-button.h
UOA: Do not segfault when "Done" or "Cancel" button clicked but widget is not ready yet
[empathy.git] / libempathy-gtk / empathy-dialpad-button.h
1 /*
2  * Copyright (C) 2011-2012 Collabora Ltd.
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License as
6  * published by the Free Software Foundation; either version 2 of the
7  * License, or (at your option) any later version.
8  *
9  * This program 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  * General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public
15  * License along with this program; if not, write to the
16  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17  * Boston, MA  02110-1301  USA
18  *
19  * Authors: Danielle Madeley <danielle.madeley@collabora.co.uk>
20  *          Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
21  */
22
23
24 #ifndef __EMPATHY_DIALPAD_BUTTON_H__
25 #define __EMPATHY_DIALPAD_BUTTON_H__
26
27 #include <gtk/gtk.h>
28
29 #include <telepathy-glib/telepathy-glib.h>
30
31 G_BEGIN_DECLS
32
33 typedef struct _EmpathyDialpadButton EmpathyDialpadButton;
34 typedef struct _EmpathyDialpadButtonClass EmpathyDialpadButtonClass;
35 typedef struct _EmpathyDialpadButtonPriv EmpathyDialpadButtonPriv;
36
37 struct _EmpathyDialpadButtonClass
38 {
39   /*<private>*/
40   GtkButtonClass parent_class;
41 };
42
43 struct _EmpathyDialpadButton
44 {
45   /*<private>*/
46   GtkButton parent;
47   EmpathyDialpadButtonPriv *priv;
48 };
49
50 GType empathy_dialpad_button_get_type (void);
51
52 /* TYPE MACROS */
53 #define EMPATHY_TYPE_DIALPAD_BUTTON \
54   (empathy_dialpad_button_get_type ())
55 #define EMPATHY_DIALPAD_BUTTON(obj) \
56   (G_TYPE_CHECK_INSTANCE_CAST((obj), \
57     EMPATHY_TYPE_DIALPAD_BUTTON, \
58     EmpathyDialpadButton))
59 #define EMPATHY_DIALPAD_BUTTON_CLASS(klass) \
60   (G_TYPE_CHECK_CLASS_CAST((klass), \
61     EMPATHY_TYPE_DIALPAD_BUTTON, \
62     EmpathyDialpadButtonClass))
63 #define EMPATHY_IS_DIALPAD_BUTTON(obj) \
64   (G_TYPE_CHECK_INSTANCE_TYPE((obj), \
65     EMPATHY_TYPE_DIALPAD_BUTTON))
66 #define EMPATHY_IS_DIALPAD_BUTTON_CLASS(klass) \
67   (G_TYPE_CHECK_CLASS_TYPE((klass), \
68     EMPATHY_TYPE_DIALPAD_BUTTON))
69 #define EMPATHY_DIALPAD_BUTTON_GET_CLASS(obj) \
70   (G_TYPE_INSTANCE_GET_CLASS ((obj), \
71     EMPATHY_TYPE_DIALPAD_BUTTON, \
72     EmpathyDialpadButtonClass))
73
74 GtkWidget * empathy_dialpad_button_new (
75     const gchar *label,
76     const gchar *sub_label,
77     TpDTMFEvent event);
78
79 const gchar * empathy_dialpad_button_get_label (EmpathyDialpadButton *self);
80 const gchar * empathy_dialpad_button_get_sub_label (EmpathyDialpadButton *self);
81 TpDTMFEvent empathy_dialpad_button_get_event (EmpathyDialpadButton *self);
82
83 G_END_DECLS
84
85 #endif /* #ifndef __EMPATHY_DIALPAD_BUTTON_H__*/