grub2: bring back build of aros-side grub2 tools
[AROS.git] / workbench / libs / icon / support.h
blob4bfcf9c9cb62c06f44c3ece40e54274a464430f4
1 #ifndef _SUPPORT_H_
2 #define _SUPPORT_H_
4 /*
5 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
6 $Id$
7 */
9 #include "icon_intern.h"
11 /*** Prototypes *************************************************************/
12 BPTR __OpenIcon_WB(CONST_STRPTR name, LONG mode, struct IconBase *IconBase);
13 BOOL __CloseIcon_WB(BPTR file, struct IconBase *IconBase);
14 BPTR __OpenDefaultIcon_WB(CONST_STRPTR name, LONG mode, struct IconBase *IconBase);
15 BOOL __CloseDefaultIcon_WB(BPTR file, struct IconBase *IconBase);
17 struct DiskObject *__ReadIcon_WB(BPTR file, struct IconBase *IconBase);
18 BOOL __WriteIcon_WB(BPTR file, struct DiskObject *icon, struct TagItem *tags, struct IconBase *IconBase);
19 VOID __PrepareIcon_WB(struct DiskObject *icon, struct IconBase *IconBase);
20 VOID __FetchIconARGB_WB(struct DiskObject *icon, int id, struct IconBase *IconBase);
21 VOID __FetchIconImage_WB(struct DiskObject *icon, int id, struct IconBase *IconBase);
23 BPTR __LockObject_WB(CONST_STRPTR name, LONG mode, struct IconBase *IconBase);
24 VOID __UnLockObject_WB(BPTR lock, struct IconBase *IconBase);
26 CONST_STRPTR GetDefaultIconName(LONG type);
28 LONG CalcIconHash(struct DiskObject *dobj);
29 APTR AllocMemIcon(struct DiskObject *icon, IPTR size, ULONG req,
30 struct IconBase *IconBase);
31 VOID AddIconToList(struct NativeIcon *icon, struct IconBase *IconBase);
32 VOID RemoveIconFromList(struct NativeIcon *icon, struct IconBase *IconBase);
33 struct NativeIcon *GetNativeIcon(struct DiskObject *dobj, struct IconBase *IconBase);
35 /*** Macros *****************************************************************/
36 #define OpenIcon(name, mode) (__OpenIcon_WB((name), (mode), LB(IconBase)))
37 #define CloseIcon(file) (__CloseIcon_WB((file), LB(IconBase)))
38 #define OpenDefaultIcon(name, mode) (__OpenDefaultIcon_WB((name), (mode), LB(IconBase)))
39 #define CloseDefaultIcon(file) (__CloseDefaultIcon_WB((file), LB(IconBase)))
41 #define ReadIcon(file) (__ReadIcon_WB((file), LB(IconBase)))
42 #define WriteIcon(file, icon, tags) (__WriteIcon_WB((file), (icon), (tags), LB(IconBase)))
43 #define FetchIconARGB(icon, id) (__FetchIconARGB_WB((icon), (id), LB(IconBase)))
44 #define FetchIconImage(icon, id) (__FetchIconImage_WB((icon), (id), LB(IconBase)))
45 #define PrepareIcon(icon) (__PrepareIcon_WB((icon), LB(IconBase)))
47 #define LockObject(name, mode) (__LockObject_WB((name), (mode), IconBase))
48 #define UnLockObject(lock) (__UnLockObject_WB((lock), IconBase))
50 #endif /* _SUPPORT_H_ */