801fd23dce36e7bea468cd3008c5ceaa2ab84cb7
[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 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
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_BOOK,
34         STOCK_PIXMAP_CATEGORY,
35         STOCK_PIXMAP_CHECKBOX_OFF,
36         STOCK_PIXMAP_CHECKBOX_ON,
37         STOCK_PIXMAP_CHECK_SPELLING,
38         STOCK_PIXMAP_CLIP,
39         STOCK_PIXMAP_CLIP_KEY,
40         STOCK_PIXMAP_CLIP_GPG_SIGNED,
41         STOCK_PIXMAP_CLOSE,
42         STOCK_PIXMAP_COMPLETE,
43         STOCK_PIXMAP_CONTINUE,
44         STOCK_PIXMAP_DELETED,
45         STOCK_PIXMAP_DIR_CLOSE,
46         STOCK_PIXMAP_DIR_CLOSE_HRM,
47         STOCK_PIXMAP_DIR_OPEN,
48         STOCK_PIXMAP_DIR_OPEN_HRM,
49         STOCK_PIXMAP_DIR_CLOSE_MARK,
50         STOCK_PIXMAP_DIR_CLOSE_HRM_MARK,
51         STOCK_PIXMAP_DIR_OPEN_MARK,
52         STOCK_PIXMAP_DIR_OPEN_HRM_MARK,
53         STOCK_PIXMAP_DOWN_ARROW,
54         STOCK_PIXMAP_UP_ARROW,
55         STOCK_PIXMAP_EDIT_EXTERN,
56         STOCK_PIXMAP_ERROR,
57         STOCK_PIXMAP_EXEC,
58         STOCK_PIXMAP_FORWARDED,
59         STOCK_PIXMAP_GROUP,
60         STOCK_PIXMAP_IGNORETHREAD,
61         STOCK_PIXMAP_INBOX_CLOSE,
62         STOCK_PIXMAP_INBOX_CLOSE_HRM,
63         STOCK_PIXMAP_INBOX_OPEN,
64         STOCK_PIXMAP_INBOX_OPEN_HRM,
65         STOCK_PIXMAP_INBOX_CLOSE_MARK,
66         STOCK_PIXMAP_INBOX_CLOSE_HRM_MARK,
67         STOCK_PIXMAP_INBOX_OPEN_MARK,
68         STOCK_PIXMAP_INBOX_OPEN_HRM_MARK,
69         STOCK_PIXMAP_INSERT_FILE,
70         STOCK_PIXMAP_INTERFACE,
71         STOCK_PIXMAP_JPILOT,
72         STOCK_PIXMAP_KEY,
73         STOCK_PIXMAP_LDAP,
74         STOCK_PIXMAP_LINEWRAP_CURRENT,
75         STOCK_PIXMAP_LINEWRAP_ALL,
76         STOCK_PIXMAP_LOCKED,
77         STOCK_PIXMAP_MAIL,
78         STOCK_PIXMAP_MAIL_ATTACH,
79         STOCK_PIXMAP_MAIL_COMPOSE,
80         STOCK_PIXMAP_MAIL_FORWARD,
81         STOCK_PIXMAP_MAIL_RECEIVE,
82         STOCK_PIXMAP_MAIL_RECEIVE_ALL,
83         STOCK_PIXMAP_MAIL_REPLY,
84         STOCK_PIXMAP_MAIL_REPLY_TO_ALL,
85         STOCK_PIXMAP_MAIL_REPLY_TO_AUTHOR,
86         STOCK_PIXMAP_MAIL_SEND,
87         STOCK_PIXMAP_MAIL_SEND_QUEUE,
88         STOCK_PIXMAP_MAIL_SIGN,
89         STOCK_PIXMAP_MARK,
90         STOCK_PIXMAP_NEW,
91         STOCK_PIXMAP_NEWS_COMPOSE,
92         STOCK_PIXMAP_OUTBOX_CLOSE,
93         STOCK_PIXMAP_OUTBOX_CLOSE_HRM,
94         STOCK_PIXMAP_OUTBOX_OPEN,
95         STOCK_PIXMAP_OUTBOX_OPEN_HRM,
96         STOCK_PIXMAP_OUTBOX_CLOSE_MARK,
97         STOCK_PIXMAP_OUTBOX_CLOSE_HRM_MARK,
98         STOCK_PIXMAP_OUTBOX_OPEN_MARK,
99         STOCK_PIXMAP_OUTBOX_OPEN_HRM_MARK,
100         STOCK_PIXMAP_REPLIED,
101         STOCK_PIXMAP_PASTE,
102         STOCK_PIXMAP_PREFERENCES,
103         STOCK_PIXMAP_PROPERTIES,
104         STOCK_PIXMAP_QUEUE_CLOSE,
105         STOCK_PIXMAP_QUEUE_CLOSE_HRM,
106         STOCK_PIXMAP_QUEUE_OPEN,
107         STOCK_PIXMAP_QUEUE_OPEN_HRM,
108         STOCK_PIXMAP_TRASH_OPEN,
109         STOCK_PIXMAP_TRASH_OPEN_HRM,
110         STOCK_PIXMAP_TRASH_CLOSE,
111         STOCK_PIXMAP_TRASH_CLOSE_HRM,
112         STOCK_PIXMAP_QUEUE_CLOSE_MARK,
113         STOCK_PIXMAP_QUEUE_CLOSE_HRM_MARK,
114         STOCK_PIXMAP_QUEUE_OPEN_MARK,
115         STOCK_PIXMAP_QUEUE_OPEN_HRM_MARK,
116         STOCK_PIXMAP_TRASH_OPEN_MARK,
117         STOCK_PIXMAP_TRASH_OPEN_HRM_MARK,
118         STOCK_PIXMAP_TRASH_CLOSE_MARK,
119         STOCK_PIXMAP_TRASH_CLOSE_HRM_MARK,
120         STOCK_PIXMAP_UNREAD,
121         STOCK_PIXMAP_VCARD,
122         STOCK_PIXMAP_ONLINE,
123         STOCK_PIXMAP_OFFLINE,
124         STOCK_PIXMAP_NOTICE_WARN,               /* small warning */
125         STOCK_PIXMAP_NOTICE_ERROR,              /* small error   */
126         STOCK_PIXMAP_NOTICE_NOTE,               /* small message */
127         STOCK_PIXMAP_QUICKSEARCH,               /* quicksearch pixmap */
128         STOCK_PIXMAP_GPG_SIGNED,
129         STOCK_PIXMAP_DRAFTS_CLOSE,
130         STOCK_PIXMAP_DRAFTS_OPEN,
131         STOCK_PIXMAP_DRAFTS_CLOSE_MARK,
132         STOCK_PIXMAP_DRAFTS_OPEN_MARK,
133         STOCK_PIXMAP_MIME_TEXT_PLAIN,
134         STOCK_PIXMAP_MIME_TEXT_HTML,
135         STOCK_PIXMAP_MIME_APPLICATION,
136         STOCK_PIXMAP_MIME_IMAGE,
137         STOCK_PIXMAP_MIME_AUDIO,
138         STOCK_PIXMAP_MIME_TEXT_ENRICHED,
139         STOCK_PIXMAP_MIME_UNKNOWN,
140         STOCK_PIXMAP_MIME_PDF,
141         STOCK_PIXMAP_MIME_PS,
142         STOCK_PIXMAP_MIME_TEXT_CALENDAR,
143         STOCK_PIXMAP_PRIVACY_SIGNED,
144         STOCK_PIXMAP_PRIVACY_PASSED,
145         STOCK_PIXMAP_PRIVACY_FAILED,
146         STOCK_PIXMAP_PRIVACY_UNKNOWN,
147         STOCK_PIXMAP_PRIVACY_EXPIRED,
148         STOCK_PIXMAP_PRIVACY_WARN,
149         STOCK_PIXMAP_PRIVACY_EMBLEM_ENCRYPTED,
150         STOCK_PIXMAP_PRIVACY_EMBLEM_SIGNED,
151         STOCK_PIXMAP_PRIVACY_EMBLEM_PASSED,
152         STOCK_PIXMAP_PRIVACY_EMBLEM_FAILED,
153         STOCK_PIXMAP_PRIVACY_EMBLEM_WARN,
154         STOCK_PIXMAP_MIME_MESSAGE,
155         STOCK_PIXMAP_CLAWS_MAIL_ICON,
156         STOCK_PIXMAP_READ,
157         STOCK_PIXMAP_TRASH,
158         STOCK_PIXMAP_CLAWS_MAIL_LOGO,
159         STOCK_PIXMAP_DIR_NOSELECT, 
160         STOCK_PIXMAP_SPAM,
161         STOCK_PIXMAP_SPAM_BTN,
162         STOCK_PIXMAP_HAM_BTN,
163         STOCK_PIXMAP_MOVED,
164         STOCK_PIXMAP_COPIED,
165         STOCK_PIXMAP_ACTIVE,
166         STOCK_PIXMAP_INACTIVE,
167         STOCK_PIXMAP_EMPTY,              /* last entry */
168         N_STOCK_PIXMAPS
169 } StockPixmap;
170
171 typedef enum {
172         OVERLAY_NONE,
173         OVERLAY_TOP_LEFT,
174         OVERLAY_TOP_CENTER,
175         OVERLAY_TOP_RIGHT,
176         OVERLAY_MID_LEFT,
177         OVERLAY_MID_CENTER,
178         OVERLAY_MID_RIGHT,
179         OVERLAY_BOTTOM_LEFT,
180         OVERLAY_BOTTOM_CENTER,
181         OVERLAY_BOTTOM_RIGHT
182 } OverlayPosition;
183
184 GtkWidget *stock_pixmap_widget  (GtkWidget       *window,
185                                  StockPixmap      icon);
186 gint stock_pixbuf_gdk           (GtkWidget *window, StockPixmap icon, 
187                                  GdkPixbuf **pixbuf);
188 gint stock_pixmap_gdk           (GtkWidget       *window,
189                                  StockPixmap      icon,
190                                  GdkPixmap      **pixmap,
191                                  GdkBitmap      **mask);
192
193 GList *stock_pixmap_themes_list_new     (void);
194 void stock_pixmap_themes_list_free      (GList *list);
195 gchar *stock_pixmap_get_name         (StockPixmap icon);
196 StockPixmap stock_pixmap_get_icon    (gchar *file);
197 GtkWidget *stock_pixmap_widget_with_overlay (GtkWidget          *window,
198                                              StockPixmap         icon,
199                                              StockPixmap         overlay,
200                                              OverlayPosition     pos,
201                                              gint                border_x,
202                                              gint                border_y);
203
204 #endif /* __STOCK_PIXMAP_H__ */