#include <gtk/gtk.h>
-#include <libempathy/empathy-contact.h>
#include "empathy-account-chooser.h"
+#include "empathy-contact.h"
G_BEGIN_DECLS
-/**
- * EmpathyContactWidgetFlags:
- * @EMPATHY_CONTACT_WIDGET_EDIT_NONE: Don't show any widgets to edit any details
- * of the contact. This should be the option for widgets that merely display
- * information about a contact.
- * @EMPATHY_CONTACT_WIDGET_EDIT_ALIAS: Show a #GtkEntry allowing changes to the
- * contact's alias.
- * @EMPATHY_CONTACT_WIDGET_EDIT_AVATAR: Show an #EmpathyAvatarChooser allowing
- * changes to the contact's avatar.
- * @EMPATHY_CONTACT_WIDGET_EDIT_ACCOUNT: Show an #EmpathyAccountChooser allowing
- * changes to the contact's account.
- * @EMPATHY_CONTACT_WIDGET_EDIT_ID: Show a #GtkEntry allowing changes to the
- * contact's identifier.
- * @EMPATHY_CONTACT_WIDGET_EDIT_GROUPS: Show a widget to change the groups the
- * contact is in.
- * @EMPATHY_CONTACT_WIDGET_FOR_TOOLTIP: Make widgets more designed for a tooltip.
- * For example, make widgets not selectable.
- *
- * Options to instruct the #EmpathyContactWidget what features should be
- * enabled.
- */
-typedef enum
+typedef struct _EmpathyContactWidget EmpathyContactWidget;
+typedef struct _EmpathyContactWidgetClass EmpathyContactWidgetClass;
+typedef struct _EmpathyContactWidgetPriv EmpathyContactWidgetPriv;
+
+struct _EmpathyContactWidgetClass
{
- EMPATHY_CONTACT_WIDGET_EDIT_NONE = 0,
- EMPATHY_CONTACT_WIDGET_EDIT_ALIAS = 1 << 0,
- EMPATHY_CONTACT_WIDGET_EDIT_AVATAR = 1 << 1,
- EMPATHY_CONTACT_WIDGET_EDIT_ACCOUNT = 1 << 2,
- EMPATHY_CONTACT_WIDGET_EDIT_ID = 1 << 3,
- EMPATHY_CONTACT_WIDGET_EDIT_GROUPS = 1 << 4,
- EMPATHY_CONTACT_WIDGET_FOR_TOOLTIP = 1 << 5,
-} EmpathyContactWidgetFlags;
+ /*<private>*/
+ GtkBoxClass parent_class;
+};
+
+struct _EmpathyContactWidget
+{
+ /*<private>*/
+ GtkBox parent;
+ EmpathyContactWidgetPriv *priv;
+};
+
+GType empathy_contact_widget_get_type (void);
+
+/* TYPE MACROS */
+#define EMPATHY_TYPE_CONTACT_WIDGET \
+ (empathy_contact_widget_get_type ())
+#define EMPATHY_CONTACT_WIDGET(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST((obj), \
+ EMPATHY_TYPE_CONTACT_WIDGET, \
+ EmpathyContactWidget))
+#define EMPATHY_CONTACT_WIDGET_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST((klass), \
+ EMPATHY_TYPE_CONTACT_WIDGET, \
+ EmpathyContactWidgetClass))
+#define EMPATHY_IS_CONTACT_WIDGET(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE((obj), \
+ EMPATHY_TYPE_CONTACT_WIDGET))
+#define EMPATHY_IS_CONTACT_WIDGET_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_TYPE((klass), \
+ EMPATHY_TYPE_CONTACT_WIDGET))
+#define EMPATHY_CONTACT_WIDGET_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), \
+ EMPATHY_TYPE_CONTACT_WIDGET, \
+ EmpathyContactWidgetClass))
-GtkWidget * empathy_contact_widget_new (EmpathyContact *contact,
- EmpathyContactWidgetFlags flags);
+GtkWidget * empathy_contact_widget_new (EmpathyContact *contact);
EmpathyContact *empathy_contact_widget_get_contact (GtkWidget *widget);
void empathy_contact_widget_set_contact (GtkWidget *widget,
EmpathyContact *contact);
void empathy_contact_widget_set_account_filter (GtkWidget *widget,
EmpathyAccountChooserFilterFunc filter, gpointer user_data);
+const gchar *empathy_contact_widget_get_alias (GtkWidget *widget);
G_END_DECLS