Initial import of Scalos. To decrease size I have
[AROS-Contrib.git] / scalos / include / inline / guigfx.h
blob23e884ef0775cdd1b81ca5ab4db758ef8f3e75a9
1 #ifndef _INLINE_GUIGFX_H
2 #define _INLINE_GUIGFX_H
4 #ifndef CLIB_GUIGFX_PROTOS_H
5 #define CLIB_GUIGFX_PROTOS_H
6 #endif
8 #ifndef __INLINE_MACROS_H
9 #include <inline/macros.h>
10 #endif
12 #ifndef EXEC_TYPES_H
13 #include <exec/types.h>
14 #endif
16 #ifndef GUIGFX_BASE_NAME
17 #define GUIGFX_BASE_NAME GuiGFXBase
18 #endif
20 #define MakePictureA(array, width, height, tags) \
21 LP4(0x1e, APTR, MakePictureA, APTR, array, a0, ULONG, width, d0, ULONG, height, d1, struct TagItem *, tags, a1, \
22 , GUIGFX_BASE_NAME)
24 #ifndef NO_INLINE_STDARG
25 #define MakePicture(array, width, height, tags...) \
26 ({ULONG _tags[] = {tags}; MakePictureA((array), (width), (height), (struct TagItem *) _tags);})
27 #endif
29 #define LoadPictureA(filename, tags) \
30 LP2(0x24, APTR, LoadPictureA, STRPTR, filename, a0, struct TagItem *, tags, a1, \
31 , GUIGFX_BASE_NAME)
33 #ifndef NO_INLINE_STDARG
34 #define LoadPicture(filename, tags...) \
35 ({ULONG _tags[] = {tags}; LoadPictureA((filename), (struct TagItem *) _tags);})
36 #endif
38 #define ReadPictureA(rp, colormap, x, y, width, height, tags) \
39 LP7(0x2a, APTR, ReadPictureA, struct RastPort *, rp, a0, struct ColorMap *, colormap, a1, ULONG, x, d0, ULONG, y, d1, ULONG, width, d2, ULONG, height, d3, struct TagItem *, tags, a2, \
40 , GUIGFX_BASE_NAME)
42 #ifndef NO_INLINE_STDARG
43 #define ReadPicture(rp, colormap, x, y, width, height, tags...) \
44 ({ULONG _tags[] = {tags}; ReadPictureA((rp), (colormap), (x), (y), (width), (height), (struct TagItem *) _tags);})
45 #endif
47 #define ClonePictureA(pic, tags) \
48 LP2(0x30, APTR, ClonePictureA, APTR, pic, a0, struct TagItem *, tags, a1, \
49 , GUIGFX_BASE_NAME)
51 #ifndef NO_INLINE_STDARG
52 #define ClonePicture(pic, tags...) \
53 ({ULONG _tags[] = {tags}; ClonePictureA((pic), (struct TagItem *) _tags);})
54 #endif
56 #define DeletePicture(pic) \
57 LP1NR(0x36, DeletePicture, APTR, pic, a0, \
58 , GUIGFX_BASE_NAME)
60 #define AddPictureA(psm, pic, tags) \
61 LP3(0x42, APTR, AddPictureA, APTR, psm, a0, APTR, pic, a1, struct TagItem *, tags, a2, \
62 , GUIGFX_BASE_NAME)
64 #ifndef NO_INLINE_STDARG
65 #define AddPicture(psm, pic, tags...) \
66 ({ULONG _tags[] = {tags}; AddPictureA((psm), (pic), (struct TagItem *) _tags);})
67 #endif
69 #define AddPaletteA(psm, palette, tags) \
70 LP3(0x48, APTR, AddPaletteA, APTR, psm, a0, APTR, palette, a1, struct TagItem *, tags, a2, \
71 , GUIGFX_BASE_NAME)
73 #ifndef NO_INLINE_STDARG
74 #define AddPalette(psm, palette, tags...) \
75 ({ULONG _tags[] = {tags}; AddPaletteA((psm), (palette), (struct TagItem *) _tags);})
76 #endif
78 #define AddPixelArrayA(psm, array, width, height, tags) \
79 LP5(0x4e, APTR, AddPixelArrayA, APTR, psm, a0, APTR, array, a1, ULONG, width, d0, ULONG, height, d1, struct TagItem *, tags, a2, \
80 , GUIGFX_BASE_NAME)
82 #ifndef NO_INLINE_STDARG
83 #define AddPixelArray(psm, array, width, height, tags...) \
84 ({ULONG _tags[] = {tags}; AddPixelArrayA((psm), (array), (width), (height), (struct TagItem *) _tags);})
85 #endif
87 #define RemColorHandle(colorhandle) \
88 LP1NR(0x54, RemColorHandle, APTR, colorhandle, a0, \
89 , GUIGFX_BASE_NAME)
91 #define CreatePenShareMapA(tags) \
92 LP1(0x5a, APTR, CreatePenShareMapA, struct TagItem *, tags, a0, \
93 , GUIGFX_BASE_NAME)
95 #ifndef NO_INLINE_STDARG
96 #define CreatePenShareMap(tags...) \
97 ({ULONG _tags[] = {tags}; CreatePenShareMapA((struct TagItem *) _tags);})
98 #endif
100 #define DeletePenShareMap(psm) \
101 LP1NR(0x60, DeletePenShareMap, APTR, psm, a0, \
102 , GUIGFX_BASE_NAME)
104 #define ObtainDrawHandleA(psm, rp, cm, tags) \
105 LP4(0x66, APTR, ObtainDrawHandleA, APTR, psm, a0, struct RastPort *, rp, a1, struct ColorMap *, cm, a2, struct TagItem *, tags, a3, \
106 , GUIGFX_BASE_NAME)
108 #ifndef NO_INLINE_STDARG
109 #define ObtainDrawHandle(psm, rp, cm, tags...) \
110 ({ULONG _tags[] = {tags}; ObtainDrawHandleA((psm), (rp), (cm), (struct TagItem *) _tags);})
111 #endif
113 #define ReleaseDrawHandle(drawhandle) \
114 LP1NR(0x6c, ReleaseDrawHandle, APTR, drawhandle, a0, \
115 , GUIGFX_BASE_NAME)
117 #define DrawPictureA(drawhandle, pic, x, y, tags) \
118 LP5(0x72, BOOL, DrawPictureA, APTR, drawhandle, a0, APTR, pic, a1, ULONG, x, d0, ULONG, y, d1, struct TagItem *, tags, a2, \
119 , GUIGFX_BASE_NAME)
121 #ifndef NO_INLINE_STDARG
122 #define DrawPicture(drawhandle, pic, x, y, tags...) \
123 ({ULONG _tags[] = {tags}; DrawPictureA((drawhandle), (pic), (x), (y), (struct TagItem *) _tags);})
124 #endif
126 #define MapPaletteA(drawhandle, palette, pentab, tags) \
127 LP4(0x78, BOOL, MapPaletteA, APTR, drawhandle, a0, APTR, palette, a1, UBYTE *, pentab, a2, struct TagItem *, tags, a3, \
128 , GUIGFX_BASE_NAME)
130 #ifndef NO_INLINE_STDARG
131 #define MapPalette(drawhandle, palette, pentab, tags...) \
132 ({ULONG _tags[] = {tags}; MapPaletteA((drawhandle), (palette), (pentab), (struct TagItem *) _tags);})
133 #endif
135 #define MapPenA(drawhandle, rgb, tags) \
136 LP3(0x7e, LONG, MapPenA, APTR, drawhandle, a0, ULONG, rgb, a1, struct TagItem *, tags, a2, \
137 , GUIGFX_BASE_NAME)
139 #ifndef NO_INLINE_STDARG
140 #define MapPen(drawhandle, rgb, tags...) \
141 ({ULONG _tags[] = {tags}; MapPenA((drawhandle), (rgb), (struct TagItem *) _tags);})
142 #endif
144 #define CreatePictureBitMapA(drawhandle, pic, tags) \
145 LP3(0x84, struct BitMap *, CreatePictureBitMapA, APTR, drawhandle, a0, APTR, pic, a1, struct TagItem *, tags, a2, \
146 , GUIGFX_BASE_NAME)
148 #ifndef NO_INLINE_STDARG
149 #define CreatePictureBitMap(drawhandle, pic, tags...) \
150 ({ULONG _tags[] = {tags}; CreatePictureBitMapA((drawhandle), (pic), (struct TagItem *) _tags);})
151 #endif
153 #define DoPictureMethodA(pic, method, arguments) \
154 LP3(0x8a, ULONG, DoPictureMethodA, APTR, pic, a0, ULONG, method, d0, ULONG *, arguments, a1, \
155 , GUIGFX_BASE_NAME)
157 #ifndef NO_INLINE_STDARG
158 #define DoPictureMethod(pic, method, tags...) \
159 ({ULONG _tags[] = {tags}; DoPictureMethodA((pic), (method), (ULONG *) _tags);})
160 #endif
162 #define GetPictureAttrsA(pic, tags) \
163 LP2(0x90, ULONG, GetPictureAttrsA, APTR, pic, a0, struct TagItem *, tags, a1, \
164 , GUIGFX_BASE_NAME)
166 #ifndef NO_INLINE_STDARG
167 #define GetPictureAttrs(pic, tags...) \
168 ({ULONG _tags[] = {tags}; GetPictureAttrsA((pic), (struct TagItem *) _tags);})
169 #endif
171 #define LockPictureA(pic, mode, args) \
172 LP3(0x96, ULONG, LockPictureA, APTR, pic, a0, ULONG, mode, d0, ULONG *, args, a1, \
173 , GUIGFX_BASE_NAME)
175 #ifndef NO_INLINE_STDARG
176 #define LockPicture(pic, mode, tags...) \
177 ({ULONG _tags[] = {tags}; LockPictureA((pic), (mode), (ULONG *) _tags);})
178 #endif
180 #define UnLockPicture(pic, mode) \
181 LP2NR(0x9c, UnLockPicture, APTR, pic, a0, ULONG, mode, d0, \
182 , GUIGFX_BASE_NAME)
184 #define IsPictureA(filename, tags) \
185 LP2(0xa2, BOOL, IsPictureA, STRPTR, filename, a0, struct TagItem *, tags, a1, \
186 , GUIGFX_BASE_NAME)
188 #ifndef NO_INLINE_STDARG
189 #define IsPicture(filename, tags...) \
190 ({ULONG _tags[] = {tags}; IsPictureA((filename), (struct TagItem *) _tags);})
191 #endif
193 #define CreateDirectDrawHandleA(drawhandle, sw, sh, dw, dh, tags) \
194 LP6(0xa8, APTR, CreateDirectDrawHandleA, APTR, drawhandle, a0, ULONG, sw, d0, ULONG, sh, d1, ULONG, dw, d2, ULONG, dh, d3, struct TagItem *, tags, a1, \
195 , GUIGFX_BASE_NAME)
197 #ifndef NO_INLINE_STDARG
198 #define CreateDirectDrawHandle(drawhandle, sw, sh, dw, dh, tags...) \
199 ({ULONG _tags[] = {tags}; CreateDirectDrawHandleA((drawhandle), (sw), (sh), (dw), (dh), (struct TagItem *) _tags);})
200 #endif
202 #define DeleteDirectDrawHandle(ddh) \
203 LP1NR(0xae, DeleteDirectDrawHandle, APTR, ddh, a0, \
204 , GUIGFX_BASE_NAME)
206 #define DirectDrawTrueColorA(ddh, array, x, y, tags) \
207 LP5(0xb4, BOOL, DirectDrawTrueColorA, APTR, ddh, a0, ULONG *, array, a1, ULONG, x, d0, ULONG, y, d1, struct TagItem *, tags, a2, \
208 , GUIGFX_BASE_NAME)
210 #ifndef NO_INLINE_STDARG
211 #define DirectDrawTrueColor(ddh, array, x, y, tags...) \
212 ({ULONG _tags[] = {tags}; DirectDrawTrueColorA((ddh), (array), (x), (y), (struct TagItem *) _tags);})
213 #endif
215 #define CreatePictureMaskA(pic, mask, maskwidth, tags) \
216 LP4(0xba, BOOL, CreatePictureMaskA, APTR, pic, a0, UBYTE *, mask, a1, ULONG, maskwidth, d0, struct TagItem *, tags, a2, \
217 , GUIGFX_BASE_NAME)
219 #ifndef NO_INLINE_STDARG
220 #define CreatePictureMask(pic, mask, maskwidth, tags...) \
221 ({ULONG _tags[] = {tags}; CreatePictureMaskA((pic), (mask), (maskwidth), (struct TagItem *) _tags);})
222 #endif
224 #endif /* _INLINE_GUIGFX_H */