1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3 * Copyright (C) 2007-2008 Collabora Ltd.
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.
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.
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
19 * Authors: Xavier Claessens <xclaesse@gmail.com>
22 #ifndef __EMPATHY_CONTACT_WIDGET_H__
23 #define __EMPATHY_CONTACT_WIDGET_H__
27 #include <libempathy/empathy-contact.h>
28 #include "empathy-account-chooser.h"
33 * EmpathyContactWidgetFlags:
34 * @EMPATHY_CONTACT_WIDGET_EDIT_NONE: Don't show any widgets to edit any details
35 * of the contact. This should be the option for widgets that merely display
36 * information about a contact.
37 * @EMPATHY_CONTACT_WIDGET_EDIT_ALIAS: Show a #GtkEntry allowing changes to the
39 * @EMPATHY_CONTACT_WIDGET_EDIT_AVATAR: Show an #EmpathyAvatarChooser allowing
40 * changes to the contact's avatar.
41 * @EMPATHY_CONTACT_WIDGET_EDIT_ACCOUNT: Show an #EmpathyAccountChooser allowing
42 * changes to the contact's account.
43 * @EMPATHY_CONTACT_WIDGET_EDIT_ID: Show a #GtkEntry allowing changes to the
44 * contact's identifier.
45 * @EMPATHY_CONTACT_WIDGET_EDIT_GROUPS: Show a widget to change the groups the
47 * @EMPATHY_CONTACT_WIDGET_FOR_TOOLTIP: Make widgets more designed for a tooltip.
48 * For example, make widgets not selectable.
50 * Flags used when creating an #EmpathyContactWidget to specify which features
51 * should be available.
55 EMPATHY_CONTACT_WIDGET_EDIT_NONE
= 0,
56 EMPATHY_CONTACT_WIDGET_EDIT_ALIAS
= 1 << 0,
57 EMPATHY_CONTACT_WIDGET_EDIT_AVATAR
= 1 << 1,
58 EMPATHY_CONTACT_WIDGET_EDIT_ACCOUNT
= 1 << 2,
59 EMPATHY_CONTACT_WIDGET_EDIT_ID
= 1 << 3,
60 EMPATHY_CONTACT_WIDGET_EDIT_GROUPS
= 1 << 4,
61 EMPATHY_CONTACT_WIDGET_FOR_TOOLTIP
= 1 << 5,
62 EMPATHY_CONTACT_WIDGET_SHOW_LOCATION
= 1 << 6,
63 } EmpathyContactWidgetFlags
;
65 GtkWidget
* empathy_contact_widget_new (EmpathyContact
*contact
,
66 EmpathyContactWidgetFlags flags
);
67 EmpathyContact
*empathy_contact_widget_get_contact (GtkWidget
*widget
);
68 void empathy_contact_widget_set_contact (GtkWidget
*widget
,
69 EmpathyContact
*contact
);
70 void empathy_contact_widget_set_account_filter (GtkWidget
*widget
,
71 EmpathyAccountChooserFilterFunc filter
, gpointer user_data
);
75 #endif /* __EMPATHY_CONTACT_WIDGET_H__ */