]> git.0d.be Git - empathy.git/blob - libempathy-gtk/empathy-contact-widget.h
Updated Greek translations
[empathy.git] / libempathy-gtk / empathy-contact-widget.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3  * Copyright (C) 2007-2008 Collabora Ltd.
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18  *
19  * Authors: Xavier Claessens <xclaesse@gmail.com>
20  */
21
22 #ifndef __EMPATHY_CONTACT_WIDGET_H__
23 #define __EMPATHY_CONTACT_WIDGET_H__
24
25 #include <gtk/gtk.h>
26
27 #include <libempathy/empathy-contact.h>
28 #include "empathy-account-chooser.h"
29
30 G_BEGIN_DECLS
31
32 typedef struct _EmpathyContactWidget EmpathyContactWidget;
33 typedef struct _EmpathyContactWidgetClass EmpathyContactWidgetClass;
34 typedef struct _EmpathyContactWidgetPriv EmpathyContactWidgetPriv;
35
36 struct _EmpathyContactWidgetClass
37 {
38   /*<private>*/
39   GtkBoxClass parent_class;
40 };
41
42 struct _EmpathyContactWidget
43 {
44   /*<private>*/
45   GtkBox parent;
46   EmpathyContactWidgetPriv *priv;
47 };
48
49 GType empathy_contact_widget_get_type (void);
50
51 /* TYPE MACROS */
52 #define EMPATHY_TYPE_CONTACT_WIDGET \
53   (empathy_contact_widget_get_type ())
54 #define EMPATHY_CONTACT_WIDGET(obj) \
55   (G_TYPE_CHECK_INSTANCE_CAST((obj), \
56     EMPATHY_TYPE_CONTACT_WIDGET, \
57     EmpathyContactWidget))
58 #define EMPATHY_CONTACT_WIDGET_CLASS(klass) \
59   (G_TYPE_CHECK_CLASS_CAST((klass), \
60     EMPATHY_TYPE_CONTACT_WIDGET, \
61     EmpathyContactWidgetClass))
62 #define EMPATHY_IS_CONTACT_WIDGET(obj) \
63   (G_TYPE_CHECK_INSTANCE_TYPE((obj), \
64     EMPATHY_TYPE_CONTACT_WIDGET))
65 #define EMPATHY_IS_CONTACT_WIDGET_CLASS(klass) \
66   (G_TYPE_CHECK_CLASS_TYPE((klass), \
67     EMPATHY_TYPE_CONTACT_WIDGET))
68 #define EMPATHY_CONTACT_WIDGET_GET_CLASS(obj) \
69   (G_TYPE_INSTANCE_GET_CLASS ((obj), \
70     EMPATHY_TYPE_CONTACT_WIDGET, \
71     EmpathyContactWidgetClass))
72
73 /**
74  * EmpathyContactWidgetFlags:
75  * @EMPATHY_CONTACT_WIDGET_EDIT_NONE: Don't show any widgets to edit any details
76  *  of the contact. This should be the option for widgets that merely display
77  *  information about a contact.
78  * @EMPATHY_CONTACT_WIDGET_EDIT_ALIAS: Show a #GtkEntry allowing changes to the
79  *  contact's alias.
80  * @EMPATHY_CONTACT_WIDGET_EDIT_AVATAR: Show an #EmpathyAvatarChooser allowing
81  *  changes to the contact's avatar.
82  * @EMPATHY_CONTACT_WIDGET_EDIT_ACCOUNT: Show an #EmpathyAccountChooser allowing
83  *  changes to the contact's account.
84  * @EMPATHY_CONTACT_WIDGET_EDIT_ID: Show a #GtkEntry allowing changes to the
85  *  contact's identifier.
86  * @EMPATHY_CONTACT_WIDGET_EDIT_GROUPS: Show a widget to change the groups the
87  *  contact is in.
88  * @EMPATHY_CONTACT_WIDGET_FOR_TOOLTIP: Make widgets more designed for a tooltip.
89  *  For example, make widgets not selectable.
90  *
91  * Flags used when creating an #EmpathyContactWidget to specify which features
92  * should be available.
93  */
94 typedef enum
95 {
96   EMPATHY_CONTACT_WIDGET_EDIT_NONE    = 0,
97   EMPATHY_CONTACT_WIDGET_EDIT_ALIAS   = 1 << 0,
98   EMPATHY_CONTACT_WIDGET_EDIT_AVATAR  = 1 << 1,
99   EMPATHY_CONTACT_WIDGET_EDIT_ACCOUNT = 1 << 2,
100   EMPATHY_CONTACT_WIDGET_EDIT_ID      = 1 << 3,
101   EMPATHY_CONTACT_WIDGET_EDIT_GROUPS  = 1 << 4,
102   EMPATHY_CONTACT_WIDGET_FOR_TOOLTIP  = 1 << 5,
103   EMPATHY_CONTACT_WIDGET_SHOW_LOCATION  = 1 << 6,
104   EMPATHY_CONTACT_WIDGET_NO_SET_ALIAS = 1 << 7,
105   EMPATHY_CONTACT_WIDGET_SHOW_DETAILS = 1 << 8,
106   EMPATHY_CONTACT_WIDGET_EDIT_DETAILS = 1 << 9,
107   EMPATHY_CONTACT_WIDGET_NO_STATUS    = 1 << 10,
108   EMPATHY_CONTACT_WIDGET_NO_ACCOUNT   = 1 << 11,
109 } EmpathyContactWidgetFlags;
110
111 GtkWidget * empathy_contact_widget_new (EmpathyContact *contact,
112     EmpathyContactWidgetFlags flags);
113 EmpathyContact *empathy_contact_widget_get_contact (GtkWidget *widget);
114 void empathy_contact_widget_set_contact (GtkWidget *widget,
115     EmpathyContact *contact);
116 void empathy_contact_widget_set_account_filter (GtkWidget *widget,
117     EmpathyAccountChooserFilterFunc filter, gpointer user_data);
118 const gchar *empathy_contact_widget_get_alias (GtkWidget *widget);
119
120 G_END_DECLS
121
122 #endif /*  __EMPATHY_CONTACT_WIDGET_H__ */