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 2 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, write to the Free Software
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 * Address item data. Shared among GUI components only.
24 #ifndef __ADDRESSITEM_H__
25 #define __ADDRESSITEM_H__
28 #include <gtk/gtkwidget.h>
29 #include <gtk/gtkctree.h>
32 #include "addrindex.h"
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)
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)
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 ADDR_LDAP_QUERY /* Sub-type */
59 typedef struct _AddressBook_win AddressBook_win;
60 struct _AddressBook_win
65 GtkWidget *ctree_swin;
77 GtkWidget *tree_popup;
78 GtkWidget *list_popup;
79 GtkItemFactory *tree_factory;
80 GtkItemFactory *list_factory;
81 GtkItemFactory *menu_factory;
83 GtkCTreeNode *treeSelected;
85 GtkCTreeNode *listSelected;
87 Compose *target_compose;
91 typedef struct _AddressTypeControlItem AddressTypeControlItem;
92 struct _AddressTypeControlItem {
93 AddressObjectType objectType;
94 AddressIfType interfaceType;
102 GdkPixmap *iconXpmOpen;
103 GdkBitmap *maskXpmOpen;
106 typedef struct _AddressObject AddressObject;
107 struct _AddressObject {
108 AddressObjectType type;
112 typedef struct _AdapterInterface AdapterInterface;
113 struct _AdapterInterface {
115 AddressInterface *interface;
116 AddressIfType interfaceType;
117 AddressTypeControlItem *atci;
119 gboolean haveLibrary;
120 GtkCTreeNode *treeNode;
123 typedef struct _AdapterDSource AdapterDSource;
124 struct _AdapterDSource {
126 AddressDataSource *dataSource;
127 AddressObjectType subType;
130 typedef struct _AdapterFolder AdapterFolder;
131 struct _AdapterFolder {
133 ItemFolder *itemFolder;
136 typedef struct _AdapterGroup AdapterGroup;
137 struct _AdapterGroup {
139 ItemGroup *itemGroup;
142 typedef struct _AddressFileSelection AddressFileSelection;
143 struct _AddressFileSelection {
144 GtkWidget *fileSelector;
148 AdapterDSource *addressbook_create_ds_adapter ( AddressDataSource *ds,
149 AddressObjectType otype,
152 void addressbook_ads_set_name ( AdapterDSource *adapter,
155 ItemObjectType addressbook_type2item ( AddressObjectType abType );
157 #endif /* __ADDRESSITEM_H__ */