08b638a105488f797f8f1be196de4a957a792941
[claws.git] / src / stock_pixmap.h
1 /*
2  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3  * Copyright (C) 1999-2007 Hiroyuki Yamamoto and the Claws Mail team
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 3 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, see <http://www.gnu.org/licenses/>.
17  * 
18  */
19
20 #ifndef __STOCK_PIXMAP_H__
21 #define __STOCK_PIXMAP_H__
22
23 #include <glib.h>
24 #include <gtk/gtkwidget.h>
25
26 typedef enum
27 {
28         STOCK_PIXMAP_ADDR_ONE,
29         STOCK_PIXMAP_ADDR_TWO,
30         STOCK_PIXMAP_ADDRESS,
31         STOCK_PIXMAP_ADDRESS_BOOK,
32         STOCK_PIXMAP_ADDRESS_SEARCH,
33         STOCK_PIXMAP_ANONYMOUS,
34         STOCK_PIXMAP_BOOK,
35         STOCK_PIXMAP_CATEGORY,
36         STOCK_PIXMAP_CHECKBOX_OFF,
37         STOCK_PIXMAP_CHECKBOX_ON,
38         STOCK_PIXMAP_CHECK_SPELLING,
39         STOCK_PIXMAP_CLIP,
40         STOCK_PIXMAP_CLIP_KEY,
41         STOCK_PIXMAP_CLIP_GPG_SIGNED,
42         STOCK_PIXMAP_CLOSE,
43         STOCK_PIXMAP_COMPLETE,
44         STOCK_PIXMAP_CONTINUE,
45         STOCK_PIXMAP_DELETED,
46         STOCK_PIXMAP_DIR_CLOSE,
47         STOCK_PIXMAP_DIR_CLOSE_HRM,
48         STOCK_PIXMAP_DIR_OPEN,
49         STOCK_PIXMAP_DIR_OPEN_HRM,
50         STOCK_PIXMAP_DIR_CLOSE_MARK,
51         STOCK_PIXMAP_DIR_CLOSE_HRM_MARK,
52         STOCK_PIXMAP_DIR_OPEN_MARK,
53         STOCK_PIXMAP_DIR_OPEN_HRM_MARK,
54         STOCK_PIXMAP_DOWN_ARROW,
55         STOCK_PIXMAP_UP_ARROW,
56         STOCK_PIXMAP_EDIT_EXTERN,
57         STOCK_PIXMAP_ERROR,
58         STOCK_PIXMAP_EXEC,
59         STOCK_PIXMAP_FORWARDED,
60         STOCK_PIXMAP_GROUP,
61         STOCK_PIXMAP_IGNORETHREAD,
62         STOCK_PIXMAP_INBOX_CLOSE,
63         STOCK_PIXMAP_INBOX_CLOSE_HRM,
64         STOCK_PIXMAP_INBOX_OPEN,
65         STOCK_PIXMAP_INBOX_OPEN_HRM,
66         STOCK_PIXMAP_INBOX_CLOSE_MARK,
67         STOCK_PIXMAP_INBOX_CLOSE_HRM_MARK,
68         STOCK_PIXMAP_INBOX_OPEN_MARK,
69         STOCK_PIXMAP_INBOX_OPEN_HRM_MARK,
70         STOCK_PIXMAP_INSERT_FILE,
71         STOCK_PIXMAP_INTERFACE,
72         STOCK_PIXMAP_JPILOT,
73         STOCK_PIXMAP_KEY,
74         STOCK_PIXMAP_LDAP,
75         STOCK_PIXMAP_LINEWRAP_CURRENT,
76         STOCK_PIXMAP_LINEWRAP_ALL,
77         STOCK_PIXMAP_LOCKED,
78         STOCK_PIXMAP_MAIL,
79         STOCK_PIXMAP_MAIL_ATTACH,
80         STOCK_PIXMAP_MAIL_COMPOSE,
81         STOCK_PIXMAP_MAIL_FORWARD,
82         STOCK_PIXMAP_MAIL_RECEIVE,
83         STOCK_PIXMAP_MAIL_RECEIVE_ALL,
84         STOCK_PIXMAP_MAIL_REPLY,
85         STOCK_PIXMAP_MAIL_REPLY_TO_ALL,
86         STOCK_PIXMAP_MAIL_REPLY_TO_AUTHOR,
87         STOCK_PIXMAP_MAIL_REPLY_TO_LIST,
88         STOCK_PIXMAP_MAIL_SEND,
89         STOCK_PIXMAP_MAIL_SEND_QUEUE,
90         STOCK_PIXMAP_MAIL_SIGN,
91         STOCK_PIXMAP_OPEN_MAIL,
92         STOCK_PIXMAP_MARK,
93         STOCK_PIXMAP_NEW,
94         STOCK_PIXMAP_NEWS_COMPOSE,
95         STOCK_PIXMAP_OUTBOX_CLOSE,
96         STOCK_PIXMAP_OUTBOX_CLOSE_HRM,
97         STOCK_PIXMAP_OUTBOX_OPEN,
98         STOCK_PIXMAP_OUTBOX_OPEN_HRM,
99         STOCK_PIXMAP_OUTBOX_CLOSE_MARK,
100         STOCK_PIXMAP_OUTBOX_CLOSE_HRM_MARK,
101         STOCK_PIXMAP_OUTBOX_OPEN_MARK,
102         STOCK_PIXMAP_OUTBOX_OPEN_HRM_MARK,
103         STOCK_PIXMAP_REPLIED,
104         STOCK_PIXMAP_PASTE,
105         STOCK_PIXMAP_PREFERENCES,
106         STOCK_PIXMAP_PROPERTIES,
107         STOCK_PIXMAP_QUEUE_CLOSE,
108         STOCK_PIXMAP_QUEUE_CLOSE_HRM,
109         STOCK_PIXMAP_QUEUE_OPEN,
110         STOCK_PIXMAP_QUEUE_OPEN_HRM,
111         STOCK_PIXMAP_TRASH_OPEN,
112         STOCK_PIXMAP_TRASH_OPEN_HRM,
113         STOCK_PIXMAP_TRASH_CLOSE,
114         STOCK_PIXMAP_TRASH_CLOSE_HRM,
115         STOCK_PIXMAP_QUEUE_CLOSE_MARK,
116         STOCK_PIXMAP_QUEUE_CLOSE_HRM_MARK,
117         STOCK_PIXMAP_QUEUE_OPEN_MARK,
118         STOCK_PIXMAP_QUEUE_OPEN_HRM_MARK,
119         STOCK_PIXMAP_TRASH_OPEN_MARK,
120         STOCK_PIXMAP_TRASH_OPEN_HRM_MARK,
121         STOCK_PIXMAP_TRASH_CLOSE_MARK,
122         STOCK_PIXMAP_TRASH_CLOSE_HRM_MARK,
123         STOCK_PIXMAP_UNREAD,
124         STOCK_PIXMAP_VCARD,
125         STOCK_PIXMAP_ONLINE,
126         STOCK_PIXMAP_OFFLINE,
127         STOCK_PIXMAP_NOTICE_WARN,               /* small warning */
128         STOCK_PIXMAP_NOTICE_ERROR,              /* small error   */
129         STOCK_PIXMAP_NOTICE_NOTE,               /* small message */
130         STOCK_PIXMAP_QUICKSEARCH,               /* quicksearch pixmap */
131         STOCK_PIXMAP_GPG_SIGNED,
132         STOCK_PIXMAP_GO_FOLDERS,
133         STOCK_PIXMAP_DRAFTS_CLOSE,
134         STOCK_PIXMAP_DRAFTS_OPEN,
135         STOCK_PIXMAP_DRAFTS_CLOSE_MARK,
136         STOCK_PIXMAP_DRAFTS_OPEN_MARK,
137         STOCK_PIXMAP_MIME_TEXT_PLAIN,
138         STOCK_PIXMAP_MIME_TEXT_HTML,
139         STOCK_PIXMAP_MIME_TEXT_PATCH,
140         STOCK_PIXMAP_MIME_APPLICATION,
141         STOCK_PIXMAP_MIME_IMAGE,
142         STOCK_PIXMAP_MIME_AUDIO,
143         STOCK_PIXMAP_MIME_TEXT_ENRICHED,
144         STOCK_PIXMAP_MIME_UNKNOWN,
145         STOCK_PIXMAP_MIME_PDF,
146         STOCK_PIXMAP_MIME_PS,
147         STOCK_PIXMAP_MIME_TEXT_CALENDAR,
148         STOCK_PIXMAP_MIME_PGP_SIG,
149         STOCK_PIXMAP_PRINTER,
150         STOCK_PIXMAP_PRIVACY_SIGNED,
151         STOCK_PIXMAP_PRIVACY_PASSED,
152         STOCK_PIXMAP_PRIVACY_FAILED,
153         STOCK_PIXMAP_PRIVACY_UNKNOWN,
154         STOCK_PIXMAP_PRIVACY_EXPIRED,
155         STOCK_PIXMAP_PRIVACY_WARN,
156         STOCK_PIXMAP_PRIVACY_EMBLEM_ENCRYPTED,
157         STOCK_PIXMAP_PRIVACY_EMBLEM_SIGNED,
158         STOCK_PIXMAP_PRIVACY_EMBLEM_PASSED,
159         STOCK_PIXMAP_PRIVACY_EMBLEM_FAILED,
160         STOCK_PIXMAP_PRIVACY_EMBLEM_WARN,
161         STOCK_PIXMAP_MIME_MESSAGE,
162         STOCK_PIXMAP_CLAWS_MAIL_ICON,
163         STOCK_PIXMAP_READ,
164         STOCK_PIXMAP_DELETE,
165         STOCK_PIXMAP_CANCEL,
166         STOCK_PIXMAP_TRASH,
167         STOCK_PIXMAP_CLAWS_MAIL_LOGO,
168         STOCK_PIXMAP_DIR_NOSELECT, 
169         STOCK_PIXMAP_SPAM,
170         STOCK_PIXMAP_SPAM_BTN,
171         STOCK_PIXMAP_HAM_BTN,
172         STOCK_PIXMAP_MOVED,
173         STOCK_PIXMAP_COPIED,
174         STOCK_PIXMAP_SELECTION,
175         STOCK_PIXMAP_WATCHTHREAD,
176         STOCK_PIXMAP_TRAY_NEWMAIL_OFFLINE,
177         STOCK_PIXMAP_TRAY_NEWMAIL,
178         STOCK_PIXMAP_TRAY_NEWMARKEDMAIL_OFFLINE,
179         STOCK_PIXMAP_TRAY_NEWMARKEDMAIL,
180         STOCK_PIXMAP_TRAY_NOMAIL_OFFLINE,
181         STOCK_PIXMAP_TRAY_NOMAIL,
182         STOCK_PIXMAP_TRAY_UNREADMAIL_OFFLINE,
183         STOCK_PIXMAP_TRAY_UNREADMAIL,
184         STOCK_PIXMAP_TRAY_UNREADMARKEDMAIL_OFFLINE,
185         STOCK_PIXMAP_TRAY_UNREADMARKEDMAIL,
186         STOCK_PIXMAP_EMPTY,              /* last entry */
187         N_STOCK_PIXMAPS
188 } StockPixmap;
189
190 typedef enum {
191         OVERLAY_NONE,
192         OVERLAY_TOP_LEFT,
193         OVERLAY_TOP_CENTER,
194         OVERLAY_TOP_RIGHT,
195         OVERLAY_MID_LEFT,
196         OVERLAY_MID_CENTER,
197         OVERLAY_MID_RIGHT,
198         OVERLAY_BOTTOM_LEFT,
199         OVERLAY_BOTTOM_CENTER,
200         OVERLAY_BOTTOM_RIGHT
201 } OverlayPosition;
202
203 GtkWidget *stock_pixmap_widget  (GtkWidget       *window,
204                                  StockPixmap      icon);
205 gint stock_pixbuf_gdk           (GtkWidget *window, StockPixmap icon, 
206                                  GdkPixbuf **pixbuf);
207 gint stock_pixmap_gdk           (GtkWidget       *window,
208                                  StockPixmap      icon,
209                                  GdkPixmap      **pixmap,
210                                  GdkBitmap      **mask);
211
212 GList *stock_pixmap_themes_list_new     (void);
213 void stock_pixmap_themes_list_free      (GList *list);
214 gchar *stock_pixmap_get_name         (StockPixmap icon);
215 StockPixmap stock_pixmap_get_icon    (gchar *file);
216 GtkWidget *stock_pixmap_widget_with_overlay (GtkWidget          *window,
217                                              StockPixmap         icon,
218                                              StockPixmap         overlay,
219                                              OverlayPosition     pos,
220                                              gint                border_x,
221                                              gint                border_y);
222
223 #endif /* __STOCK_PIXMAP_H__ */