2 * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3 * Copyright (C) 1999,2000 Hiroyuki Yamamoto
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 3 of the License, or
8 * (at your option) any later version.
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.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
21 * Address item data. Shared among GUI components only.
24 #ifndef __ADDRESSITEM_H__
25 #define __ADDRESSITEM_H__
31 #include "addrindex.h"
33 #define ADDRESS_OBJECT(obj) ((AddressObject *)obj)
34 #define ADDRESS_OBJECT_TYPE(obj) (ADDRESS_OBJECT(obj)->type)
35 #define ADDRESS_OBJECT_NAME(obj) (ADDRESS_OBJECT(obj)->name)
37 #define ADAPTER_INTERFACE(obj) ((AdapterInterface *)obj)
38 #define ADAPTER_FOLDER(obj) ((AdapterFolder *)obj)
39 #define ADAPTER_GROUP(obj) ((AdapterGroup *)obj)
40 #define ADAPTER_DSOURCE(obj) ((AdapterDSource *)obj)
50 ADDR_BOOK, /* Sub-type */
51 ADDR_VCARD, /* Sub-type */
52 ADDR_JPILOT, /* Sub-type */
53 ADDR_CATEGORY, /* Sub-type */
54 ADDR_LDAP, /* Sub-type */
55 ADDR_LDAP_QUERY /* Sub-type */
58 typedef struct _AddressBook_win AddressBook_win;
59 struct _AddressBook_win
66 GtkWidget *ctree_swin;
67 GtkWidget *editaddress_vbox;
82 GtkWidget *tree_popup;
83 GtkWidget *list_popup;
85 GtkCMCTreeNode *treeSelected;
86 GtkCMCTreeNode *opened;
87 GtkCMCTreeNode *listSelected;
89 Compose *target_compose;
91 GtkUIManager *ui_manager;
94 typedef struct _AddressTypeControlItem AddressTypeControlItem;
95 struct _AddressTypeControlItem {
96 AddressObjectType objectType;
97 AddressIfType interfaceType;
105 GdkPixmap *iconXpmOpen;
106 GdkBitmap *maskXpmOpen;
109 typedef struct _AddressObject AddressObject;
110 struct _AddressObject {
111 AddressObjectType type;
115 typedef struct _AdapterInterface AdapterInterface;
116 struct _AdapterInterface {
118 AddressInterface *interface;
119 AddressIfType interfaceType;
120 AddressTypeControlItem *atci;
122 gboolean haveLibrary;
123 GtkCMCTreeNode *treeNode;
126 typedef struct _AdapterDSource AdapterDSource;
127 struct _AdapterDSource {
129 AddressDataSource *dataSource;
130 AddressObjectType subType;
133 typedef struct _AdapterFolder AdapterFolder;
134 struct _AdapterFolder {
136 ItemFolder *itemFolder;
139 typedef struct _AdapterGroup AdapterGroup;
140 struct _AdapterGroup {
142 ItemGroup *itemGroup;
145 typedef struct _AddressFileSelection AddressFileSelection;
146 struct _AddressFileSelection {
147 GtkWidget *fileSelector;
151 AdapterDSource *addressbook_create_ds_adapter ( AddressDataSource *ds,
152 AddressObjectType otype,
155 void addressbook_ads_set_name ( AdapterDSource *adapter,
158 ItemObjectType addressbook_type2item ( AddressObjectType abType );
160 #endif /* __ADDRESSITEM_H__ */