diff options
Diffstat (limited to 'addressbook/gui/contact-list-editor/e-contact-list-model.h')
-rw-r--r-- | addressbook/gui/contact-list-editor/e-contact-list-model.h | 68 |
1 files changed, 41 insertions, 27 deletions
diff --git a/addressbook/gui/contact-list-editor/e-contact-list-model.h b/addressbook/gui/contact-list-editor/e-contact-list-model.h index 55fe251ad2..68de720286 100644 --- a/addressbook/gui/contact-list-editor/e-contact-list-model.h +++ b/addressbook/gui/contact-list-editor/e-contact-list-model.h @@ -1,48 +1,62 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ + #ifndef _E_CONTACT_LIST_MODEL_H_ #define _E_CONTACT_LIST_MODEL_H_ -#include <table/e-table-model.h> +#include <gtk/gtk.h> #include <libebook/e-contact.h> #include <libebook/e-destination.h> -G_BEGIN_DECLS +/* Standard GObject macros */ +#define E_TYPE_CONTACT_LIST_MODEL \ + (e_contact_list_model_get_type ()) +#define E_CONTACT_LIST_MODEL(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST \ + ((obj), E_TYPE_CONTACT_LIST_MODEL, EContactListModel)) +#define E_CONTACT_LIST_MODEL_CLASS(cls) \ + (G_TYPE_CHECK_CLASS_CAST \ + ((cls), E_TYPE_CONTACT_LIST_MODEL, EContactListModelClass)) +#define E_IS_CONTACT_LIST_MODEL(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE \ + ((obj), E_TYPE_CONTACT_LIST_MODEL)) +#define E_IS_CONTACT_LIST_MODEL_CLASS(cls) \ + (G_TYPE_CHECK_CLASS_TYPE \ + ((cls), E_TYPE_CONTACT_LIST_MODEL)) +#define E_CONTACT_LIST_MODEL_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS \ + ((obj), E_TYPE_CONTACT_LIST_MODEL, EContactListModelClass)) -#define E_TYPE_CONTACT_LIST_MODEL (e_contact_list_model_get_type ()) -#define E_CONTACT_LIST_MODEL(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), E_TYPE_CONTACT_LIST_MODEL, EContactListModel)) -#define E_CONTACT_LIST_MODEL_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), E_TYPE_CONTACT_LIST_MODEL, EContactListModelClass)) -#define E_IS_CONTACT_LIST_MODEL(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), E_TYPE_CONTACT_LIST_MODEL)) -#define E_IS_CONTACT_LIST_MODEL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), E_TYPE_CONTACT_LIST_MODEL)) +G_BEGIN_DECLS typedef struct _EContactListModel EContactListModel; typedef struct _EContactListModelClass EContactListModelClass; struct _EContactListModel { - ETableModel parent; - - EDestination **data; - int data_count; - int data_alloc; + GtkListStore parent; }; - struct _EContactListModelClass { - ETableModelClass parent_class; + GtkListStoreClass parent_class; }; - -GType e_contact_list_model_get_type (void); -void e_contact_list_model_construct (EContactListModel *model); -ETableModel *e_contact_list_model_new (void); - -void e_contact_list_model_add_destination (EContactListModel *model, EDestination *dest); -void e_contact_list_model_add_email (EContactListModel *model, const char *email); -void e_contact_list_model_add_contact (EContactListModel *model, EContact *contact, int email_num); - -void e_contact_list_model_remove_row (EContactListModel *model, int row); -void e_contact_list_model_remove_all (EContactListModel *model); - -const EDestination *e_contact_list_model_get_destination (EContactListModel *model, int row); +GType e_contact_list_model_get_type (void); +GtkTreeModel * e_contact_list_model_new (void); +gboolean e_contact_list_model_has_email (EContactListModel *model, + const gchar *email); +void e_contact_list_model_add_destination + (EContactListModel *model, + EDestination *dest); +void e_contact_list_model_add_email (EContactListModel *model, + const gchar *email); +void e_contact_list_model_add_contact(EContactListModel *model, + EContact *contact, + gint email_num); +void e_contact_list_model_remove_row (EContactListModel *model, + gint row); +void e_contact_list_model_remove_all (EContactListModel *model); +EDestination * e_contact_list_model_get_destination + (EContactListModel *model, + gint row); G_END_DECLS |