diff options
| author | Simeon Simeonov | 2018-02-26 11:23:00 +0100 |
|---|---|---|
| committer | Simeon Simeonov | 2018-02-26 11:23:00 +0100 |
| commit | 0b3cbf57875fd692e4ba0b336fefa4bee1ed00dc (patch) | |
| tree | af916a30553c78ce9d4f2d8658656a175c5b6921 /src/addressitem.h | |
Initial commit for sylpheed 3.7.0
Diffstat (limited to 'src/addressitem.h')
| -rw-r--r-- | src/addressitem.h | 157 |
1 files changed, 157 insertions, 0 deletions
diff --git a/src/addressitem.h b/src/addressitem.h new file mode 100644 index 0000000..8da6614 --- /dev/null +++ b/src/addressitem.h | |||
| @@ -0,0 +1,157 @@ | |||
| 1 | /* | ||
| 2 | * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client | ||
| 3 | * Copyright (C) 1999,2000 Hiroyuki Yamamoto | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify | ||
| 6 | * it under the terms of the GNU General Public License as published by | ||
| 7 | * the Free Software Foundation; either version 2 of the License, or | ||
| 8 | * (at your option) any later version. | ||
| 9 | * | ||
| 10 | * This program 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 | ||
| 13 | * GNU General Public License for more details. | ||
| 14 | * | ||
| 15 | * You should have received a copy of the GNU General Public License | ||
| 16 | * along with this program; if not, write to the Free Software | ||
| 17 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
| 18 | */ | ||
| 19 | |||
| 20 | /* | ||
| 21 | * Address item data. Shared among GUI components only. | ||
| 22 | */ | ||
| 23 | |||
| 24 | #ifndef __ADDRESSITEM_H__ | ||
| 25 | #define __ADDRESSITEM_H__ | ||
| 26 | |||
| 27 | #include <glib.h> | ||
| 28 | #include <gtk/gtkwidget.h> | ||
| 29 | #include <gtk/gtkctree.h> | ||
| 30 | |||
| 31 | #include "compose.h" | ||
| 32 | #include "addrindex.h" | ||
| 33 | |||
| 34 | #define ADDRESS_OBJECT(obj) ((AddressObject *)obj) | ||
| 35 | #define ADDRESS_OBJECT_TYPE(obj) (ADDRESS_OBJECT(obj)->type) | ||
| 36 | #define ADDRESS_OBJECT_NAME(obj) (ADDRESS_OBJECT(obj)->name) | ||
| 37 | |||
| 38 | #define ADAPTER_INTERFACE(obj) ((AdapterInterface *)obj) | ||
| 39 | #define ADAPTER_FOLDER(obj) ((AdapterFolder *)obj) | ||
| 40 | #define ADAPTER_GROUP(obj) ((AdapterGroup *)obj) | ||
| 41 | #define ADAPTER_DSOURCE(obj) ((AdapterDSource *)obj) | ||
| 42 | |||
| 43 | typedef enum { | ||
| 44 | ADDR_NONE, | ||
| 45 | ADDR_ITEM_PERSON, | ||
| 46 | ADDR_ITEM_EMAIL, | ||
| 47 | ADDR_ITEM_FOLDER, | ||
| 48 | ADDR_ITEM_GROUP, | ||
| 49 | ADDR_INTERFACE, | ||
| 50 | ADDR_DATASOURCE, | ||
| 51 | ADDR_BOOK, /* Sub-type */ | ||
| 52 | ADDR_VCARD, /* Sub-type */ | ||
| 53 | ADDR_JPILOT, /* Sub-type */ | ||
| 54 | ADDR_CATEGORY, /* Sub-type */ | ||
| 55 | ADDR_LDAP /* Sub-type */ | ||
| 56 | } AddressObjectType; | ||
| 57 | |||
| 58 | typedef struct _AddressBook_win AddressBook_win; | ||
| 59 | struct _AddressBook_win | ||
| 60 | { | ||
| 61 | GtkWidget *window; | ||
| 62 | GtkWidget *menubar; | ||
| 63 | GtkWidget *treeview; | ||
| 64 | GtkWidget *listview; | ||
| 65 | GtkWidget *entry; | ||
| 66 | GtkWidget *statusbar; | ||
| 67 | |||
| 68 | GtkWidget *to_btn; | ||
| 69 | GtkWidget *cc_btn; | ||
| 70 | GtkWidget *bcc_btn; | ||
| 71 | GtkWidget *del_btn; | ||
| 72 | GtkWidget *reg_btn; | ||
| 73 | GtkWidget *lup_btn; | ||
| 74 | GtkWidget *close_btn; | ||
| 75 | |||
| 76 | GtkWidget *tree_popup; | ||
| 77 | GtkWidget *list_popup; | ||
| 78 | GtkItemFactory *tree_factory; | ||
| 79 | GtkItemFactory *list_factory; | ||
| 80 | GtkItemFactory *menu_factory; | ||
| 81 | |||
| 82 | GtkTreeRowReference *tree_selected; | ||
| 83 | GtkTreeRowReference *tree_opened; | ||
| 84 | GtkTreeRowReference *list_selected; | ||
| 85 | |||
| 86 | Compose *target_compose; | ||
| 87 | gint status_cid; | ||
| 88 | }; | ||
| 89 | |||
| 90 | typedef struct _AddressTypeControlItem AddressTypeControlItem; | ||
| 91 | struct _AddressTypeControlItem { | ||
| 92 | AddressObjectType objectType; | ||
| 93 | AddressIfType interfaceType; | ||
| 94 | gchar *displayName; | ||
| 95 | gboolean showInTree; | ||
| 96 | gboolean treeExpand; | ||
| 97 | gboolean treeLeaf; | ||
| 98 | gchar *menuCommand; | ||
| 99 | GdkPixbuf *icon_pixbuf; | ||
| 100 | GdkPixbuf *icon_open_pixbuf; | ||
| 101 | }; | ||
| 102 | |||
| 103 | typedef struct _AddressObject AddressObject; | ||
| 104 | struct _AddressObject { | ||
| 105 | AddressObjectType type; | ||
| 106 | gchar *name; | ||
| 107 | }; | ||
| 108 | |||
| 109 | typedef struct _AdapterInterface AdapterInterface; | ||
| 110 | struct _AdapterInterface { | ||
| 111 | AddressObject obj; | ||
| 112 | AddressInterface *iface; | ||
| 113 | AddressIfType interfaceType; | ||
| 114 | AddressTypeControlItem *atci; | ||
| 115 | gboolean enabled; | ||
| 116 | gboolean haveLibrary; | ||
| 117 | GtkTreeRowReference *tree_row; | ||
| 118 | }; | ||
| 119 | |||
| 120 | typedef struct _AdapterDSource AdapterDSource; | ||
| 121 | struct _AdapterDSource { | ||
| 122 | AddressObject obj; | ||
| 123 | AddressDataSource *dataSource; | ||
| 124 | AddressObjectType subType; | ||
| 125 | }; | ||
| 126 | |||
| 127 | typedef struct _AdapterFolder AdapterFolder; | ||
| 128 | struct _AdapterFolder { | ||
| 129 | AddressObject obj; | ||
| 130 | ItemFolder *itemFolder; | ||
| 131 | }; | ||
| 132 | |||
| 133 | typedef struct _AdapterGroup AdapterGroup; | ||
| 134 | struct _AdapterGroup { | ||
| 135 | AddressObject obj; | ||
| 136 | ItemGroup *itemGroup; | ||
| 137 | }; | ||
| 138 | |||
| 139 | typedef struct _AddressFileSelection AddressFileSelection; | ||
| 140 | struct _AddressFileSelection { | ||
| 141 | GtkWidget *fileSelector; | ||
| 142 | gboolean cancelled; | ||
| 143 | }; | ||
| 144 | |||
| 145 | AdapterDSource *addressbook_create_ds_adapter ( AddressDataSource *ds, | ||
| 146 | AddressObjectType otype, | ||
| 147 | gchar *name ); | ||
| 148 | |||
| 149 | void addressbook_ads_set_name ( AdapterDSource *adapter, | ||
| 150 | gchar *value ); | ||
| 151 | |||
| 152 | #endif /* __ADDRESSITEM_H__ */ | ||
| 153 | |||
| 154 | /* | ||
| 155 | * End of Source. | ||
| 156 | */ | ||
| 157 | |||
