root / src / addressitem.h @ 133
History | View | Annotate | Download (3.8 kB)
| 1 | 1 | hiro | /*
|
|---|---|---|---|
| 2 | 1 | hiro | * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client |
| 3 | 1 | hiro | * Copyright (C) 1999,2000 Hiroyuki Yamamoto |
| 4 | 1 | hiro | * |
| 5 | 1 | hiro | * This program is free software; you can redistribute it and/or modify |
| 6 | 1 | hiro | * it under the terms of the GNU General Public License as published by |
| 7 | 1 | hiro | * the Free Software Foundation; either version 2 of the License, or |
| 8 | 1 | hiro | * (at your option) any later version. |
| 9 | 1 | hiro | * |
| 10 | 1 | hiro | * This program is distributed in the hope that it will be useful, |
| 11 | 1 | hiro | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | 1 | hiro | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | 1 | hiro | * GNU General Public License for more details. |
| 14 | 1 | hiro | * |
| 15 | 1 | hiro | * You should have received a copy of the GNU General Public License |
| 16 | 1 | hiro | * along with this program; if not, write to the Free Software |
| 17 | 1 | hiro | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 18 | 1 | hiro | */ |
| 19 | 1 | hiro | |
| 20 | 1 | hiro | /*
|
| 21 | 1 | hiro | * Address item data. Shared among GUI components only. |
| 22 | 1 | hiro | */ |
| 23 | 1 | hiro | |
| 24 | 1 | hiro | #ifndef __ADDRESSITEM_H__
|
| 25 | 1 | hiro | #define __ADDRESSITEM_H__
|
| 26 | 1 | hiro | |
| 27 | 1 | hiro | #include <glib.h> |
| 28 | 1 | hiro | #include <gtk/gtkwidget.h> |
| 29 | 1 | hiro | #include <gtk/gtkctree.h> |
| 30 | 1 | hiro | |
| 31 | 1 | hiro | #include "compose.h" |
| 32 | 1 | hiro | #include "addrindex.h" |
| 33 | 1 | hiro | |
| 34 | 1 | hiro | #define ADDRESS_OBJECT(obj) ((AddressObject *)obj)
|
| 35 | 1 | hiro | #define ADDRESS_OBJECT_TYPE(obj) (ADDRESS_OBJECT(obj)->type)
|
| 36 | 1 | hiro | #define ADDRESS_OBJECT_NAME(obj) (ADDRESS_OBJECT(obj)->name)
|
| 37 | 1 | hiro | |
| 38 | 1 | hiro | #define ADAPTER_INTERFACE(obj) ((AdapterInterface *)obj)
|
| 39 | 1 | hiro | #define ADAPTER_FOLDER(obj) ((AdapterFolder *)obj)
|
| 40 | 1 | hiro | #define ADAPTER_GROUP(obj) ((AdapterGroup *)obj)
|
| 41 | 1 | hiro | #define ADAPTER_DSOURCE(obj) ((AdapterDSource *)obj)
|
| 42 | 1 | hiro | |
| 43 | 1 | hiro | typedef enum { |
| 44 | 1 | hiro | ADDR_NONE, |
| 45 | 1 | hiro | ADDR_ITEM_PERSON, |
| 46 | 1 | hiro | ADDR_ITEM_EMAIL, |
| 47 | 1 | hiro | ADDR_ITEM_FOLDER, |
| 48 | 1 | hiro | ADDR_ITEM_GROUP, |
| 49 | 1 | hiro | ADDR_INTERFACE, |
| 50 | 1 | hiro | ADDR_DATASOURCE, |
| 51 | 1 | hiro | ADDR_BOOK, /* Sub-type */
|
| 52 | 1 | hiro | ADDR_VCARD, /* Sub-type */
|
| 53 | 1 | hiro | ADDR_JPILOT, /* Sub-type */
|
| 54 | 1 | hiro | ADDR_CATEGORY, /* Sub-type */
|
| 55 | 1 | hiro | ADDR_LDAP /* Sub-type */
|
| 56 | 1 | hiro | } AddressObjectType; |
| 57 | 1 | hiro | |
| 58 | 1 | hiro | typedef struct _AddressBook_win AddressBook_win; |
| 59 | 1 | hiro | struct _AddressBook_win
|
| 60 | 1 | hiro | {
|
| 61 | 1 | hiro | GtkWidget *window; |
| 62 | 1 | hiro | GtkWidget *menubar; |
| 63 | 1 | hiro | GtkWidget *ctree; |
| 64 | 1 | hiro | GtkWidget *clist; |
| 65 | 1 | hiro | GtkWidget *entry; |
| 66 | 1 | hiro | GtkWidget *statusbar; |
| 67 | 1 | hiro | |
| 68 | 1 | hiro | GtkWidget *del_btn; |
| 69 | 1 | hiro | GtkWidget *reg_btn; |
| 70 | 1 | hiro | GtkWidget *lup_btn; |
| 71 | 1 | hiro | GtkWidget *to_btn; |
| 72 | 1 | hiro | GtkWidget *cc_btn; |
| 73 | 1 | hiro | GtkWidget *bcc_btn; |
| 74 | 1 | hiro | |
| 75 | 1 | hiro | GtkWidget *tree_popup; |
| 76 | 1 | hiro | GtkWidget *list_popup; |
| 77 | 1 | hiro | GtkItemFactory *tree_factory; |
| 78 | 1 | hiro | GtkItemFactory *list_factory; |
| 79 | 1 | hiro | GtkItemFactory *menu_factory; |
| 80 | 1 | hiro | |
| 81 | 1 | hiro | GtkCTreeNode *treeSelected; |
| 82 | 1 | hiro | GtkCTreeNode *opened; |
| 83 | 1 | hiro | GtkCTreeNode *listSelected; |
| 84 | 1 | hiro | |
| 85 | 1 | hiro | Compose *target_compose; |
| 86 | 1 | hiro | gint status_cid; |
| 87 | 1 | hiro | }; |
| 88 | 1 | hiro | |
| 89 | 1 | hiro | typedef struct _AddressTypeControlItem AddressTypeControlItem; |
| 90 | 1 | hiro | struct _AddressTypeControlItem {
|
| 91 | 1 | hiro | AddressObjectType objectType; |
| 92 | 1 | hiro | AddressIfType interfaceType; |
| 93 | 1 | hiro | gchar *displayName; |
| 94 | 1 | hiro | gboolean showInTree; |
| 95 | 1 | hiro | gboolean treeExpand; |
| 96 | 1 | hiro | gboolean treeLeaf; |
| 97 | 1 | hiro | gchar *menuCommand; |
| 98 | 1 | hiro | GdkPixmap *iconXpm; |
| 99 | 1 | hiro | GdkBitmap *maskXpm; |
| 100 | 1 | hiro | GdkPixmap *iconXpmOpen; |
| 101 | 1 | hiro | GdkBitmap *maskXpmOpen; |
| 102 | 1 | hiro | }; |
| 103 | 1 | hiro | |
| 104 | 1 | hiro | typedef struct _AddressObject AddressObject; |
| 105 | 1 | hiro | struct _AddressObject {
|
| 106 | 1 | hiro | AddressObjectType type; |
| 107 | 1 | hiro | gchar *name; |
| 108 | 1 | hiro | }; |
| 109 | 1 | hiro | |
| 110 | 1 | hiro | typedef struct _AdapterInterface AdapterInterface; |
| 111 | 1 | hiro | struct _AdapterInterface {
|
| 112 | 1 | hiro | AddressObject obj; |
| 113 | 1 | hiro | AddressInterface *interface; |
| 114 | 1 | hiro | AddressIfType interfaceType; |
| 115 | 1 | hiro | AddressTypeControlItem *atci; |
| 116 | 1 | hiro | gboolean enabled; |
| 117 | 1 | hiro | gboolean haveLibrary; |
| 118 | 1 | hiro | GtkCTreeNode *treeNode; |
| 119 | 1 | hiro | }; |
| 120 | 1 | hiro | |
| 121 | 1 | hiro | typedef struct _AdapterDSource AdapterDSource; |
| 122 | 1 | hiro | struct _AdapterDSource {
|
| 123 | 1 | hiro | AddressObject obj; |
| 124 | 1 | hiro | AddressDataSource *dataSource; |
| 125 | 1 | hiro | AddressObjectType subType; |
| 126 | 1 | hiro | }; |
| 127 | 1 | hiro | |
| 128 | 1 | hiro | typedef struct _AdapterFolder AdapterFolder; |
| 129 | 1 | hiro | struct _AdapterFolder {
|
| 130 | 1 | hiro | AddressObject obj; |
| 131 | 1 | hiro | ItemFolder *itemFolder; |
| 132 | 1 | hiro | }; |
| 133 | 1 | hiro | |
| 134 | 1 | hiro | typedef struct _AdapterGroup AdapterGroup; |
| 135 | 1 | hiro | struct _AdapterGroup {
|
| 136 | 1 | hiro | AddressObject obj; |
| 137 | 1 | hiro | ItemGroup *itemGroup; |
| 138 | 1 | hiro | }; |
| 139 | 1 | hiro | |
| 140 | 1 | hiro | typedef struct _AddressFileSelection AddressFileSelection; |
| 141 | 1 | hiro | struct _AddressFileSelection {
|
| 142 | 1 | hiro | GtkWidget *fileSelector; |
| 143 | 1 | hiro | gboolean cancelled; |
| 144 | 1 | hiro | }; |
| 145 | 1 | hiro | |
| 146 | 1 | hiro | AdapterDSource *addressbook_create_ds_adapter ( AddressDataSource *ds, |
| 147 | 1 | hiro | AddressObjectType otype, |
| 148 | 1 | hiro | gchar *name ); |
| 149 | 1 | hiro | |
| 150 | 1 | hiro | void addressbook_ads_set_name ( AdapterDSource *adapter,
|
| 151 | 1 | hiro | gchar *value ); |
| 152 | 1 | hiro | |
| 153 | 1 | hiro | #endif /* __ADDRESSITEM_H__ */ |
| 154 | 1 | hiro | |
| 155 | 1 | hiro | /*
|
| 156 | 1 | hiro | * End of Source. |
| 157 | 1 | hiro | */ |