]> git.0d.be Git - empathy.git/blob - libempathy-gtk/empathy-contact-widget.h
Updated Polish translation
[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 /**
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
38  *  contact's alias.
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
46  *  contact is in.
47  * @EMPATHY_CONTACT_WIDGET_FOR_TOOLTIP: Make widgets more designed for a tooltip.
48  *  For example, make widgets not selectable.
49  *
50  * Flags used when creating an #EmpathyContactWidget to specify which features
51  * should be available.
52  */
53 typedef enum
54 {
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   EMPATHY_CONTACT_WIDGET_NO_SET_ALIAS = 1 << 7,
64   EMPATHY_CONTACT_WIDGET_EDIT_FAVOURITE = 1 << 8,
65 } EmpathyContactWidgetFlags;
66
67 GtkWidget * empathy_contact_widget_new (EmpathyContact *contact,
68     EmpathyContactWidgetFlags flags);
69 EmpathyContact *empathy_contact_widget_get_contact (GtkWidget *widget);
70 void empathy_contact_widget_set_contact (GtkWidget *widget,
71     EmpathyContact *contact);
72 void empathy_contact_widget_set_account_filter (GtkWidget *widget,
73     EmpathyAccountChooserFilterFunc filter, gpointer user_data);
74 const gchar *empathy_contact_widget_get_alias (GtkWidget *widget);
75
76 G_END_DECLS
77
78 #endif /*  __EMPATHY_CONTACT_WIDGET_H__ */