Initial import of Scalos. To decrease size I have
[AROS-Contrib.git] / scalos / include / inline / cybergraphics.h
blobbc52c0b6c62664ee73f6833a9dee500d1e0ccd85
1 #ifndef _INLINE_CYBERGRAPHICS_H
2 #define _INLINE_CYBERGRAPHICS_H
4 #ifndef CLIB_CYBERGRAPHICS_PROTOS_H
5 #define CLIB_CYBERGRAPHICS_PROTOS_H
6 #endif
8 #ifndef __INLINE_MACROS_H
9 #include <inline/macros.h>
10 #endif
12 #ifndef UTILITY_TAGITEM_H
13 #include <utility/tagitem.h>
14 #endif
16 #ifndef CYBERGRAPHICS_BASE_NAME
17 #define CYBERGRAPHICS_BASE_NAME CyberGfxBase
18 #endif
20 #define IsCyberModeID(displayID) \
21 LP1(0x36, BOOL, IsCyberModeID, ULONG, displayID, d0, \
22 , CYBERGRAPHICS_BASE_NAME)
24 #define BestCModeIDTagList(bestModeIDTags) \
25 LP1(0x3c, ULONG, BestCModeIDTagList, struct TagItem *, bestModeIDTags, a0, \
26 , CYBERGRAPHICS_BASE_NAME)
28 #ifndef NO_INLINE_STDARG
29 #define BestCModeIDTags(tags...) \
30 ({ULONG _tags[] = {tags}; BestCModeIDTagList((struct TagItem *) _tags);})
31 #endif
33 #define CModeRequestTagList(modeRequest, modeRequestTags) \
34 LP2(0x42, ULONG, CModeRequestTagList, APTR, modeRequest, a0, struct TagItem *, modeRequestTags, a1, \
35 , CYBERGRAPHICS_BASE_NAME)
37 #ifndef NO_INLINE_STDARG
38 #define CModeRequestTags(modeRequest, tags...) \
39 ({ULONG _tags[] = {tags}; CModeRequestTagList((modeRequest), (struct TagItem *) _tags);})
40 #endif
42 #define AllocCModeListTagList(modeListTags) \
43 LP1(0x48, struct List *, AllocCModeListTagList, struct TagItem *, modeListTags, a1, \
44 , CYBERGRAPHICS_BASE_NAME)
46 #ifndef NO_INLINE_STDARG
47 #define AllocCModeListTags(tags...) \
48 ({ULONG _tags[] = {tags}; AllocCModeListTagList((struct TagItem *) _tags);})
49 #endif
51 #define FreeCModeList(modeList) \
52 LP1NR(0x4e, FreeCModeList, struct List *, modeList, a0, \
53 , CYBERGRAPHICS_BASE_NAME)
55 #define ScalePixelArray(srcRect, srcW, srcH, srcMod, rp, destX, destY, destW, destH, srcFormat) \
56 LP10(0x5a, LONG, ScalePixelArray, APTR, srcRect, a0, ULONG, srcW, d0, ULONG, srcH, d1, ULONG, srcMod, d2, struct RastPort *, rp, a1, ULONG, destX, d3, ULONG, destY, d4, ULONG, destW, d5, ULONG, destH, d6, ULONG, srcFormat, d7, \
57 , CYBERGRAPHICS_BASE_NAME)
59 #define GetCyberMapAttr(cyberGfxBitmap, cyberAttrTag) \
60 LP2(0x60, ULONG, GetCyberMapAttr, struct BitMap *, cyberGfxBitmap, a0, ULONG, cyberAttrTag, d0, \
61 , CYBERGRAPHICS_BASE_NAME)
63 #define GetCyberIDAttr(cyberIDAttr, cyberDisplayModeID) \
64 LP2(0x66, ULONG, GetCyberIDAttr, ULONG, cyberIDAttr, d0, ULONG, cyberDisplayModeID, d1, \
65 , CYBERGRAPHICS_BASE_NAME)
67 #define ReadRGBPixel(rp, x, y) \
68 LP3(0x6c, ULONG, ReadRGBPixel, struct RastPort *, rp, a1, ULONG, x, d0, ULONG, y, d1, \
69 , CYBERGRAPHICS_BASE_NAME)
71 #define WriteRGBPixel(rp, x, y, argb) \
72 LP4(0x72, LONG, WriteRGBPixel, struct RastPort *, rp, a1, ULONG, x, d0, ULONG, y, d1, ULONG, argb, d2, \
73 , CYBERGRAPHICS_BASE_NAME)
75 #define ReadPixelArray(destRect, destX, destY, destMod, rp, srcX, srcY, sizeX, sizeY, destFormat) \
76 LP10(0x78, ULONG, ReadPixelArray, APTR, destRect, a0, ULONG, destX, d0, ULONG, destY, d1, ULONG, destMod, d2, struct RastPort *, rp, a1, ULONG, srcX, d3, ULONG, srcY, d4, ULONG, sizeX, d5, ULONG, sizeY, d6, ULONG, destFormat, d7, \
77 , CYBERGRAPHICS_BASE_NAME)
79 #define WritePixelArray(srcRect, srcX, srcY, srcMod, rp, destX, destY, sizeX, sizeY, srcFormat) \
80 LP10(0x7e, ULONG, WritePixelArray, APTR, srcRect, a0, ULONG, srcX, d0, ULONG, srcY, d1, ULONG, srcMod, d2, struct RastPort *, rp, a1, ULONG, destX, d3, ULONG, destY, d4, ULONG, sizeX, d5, ULONG, sizeY, d6, ULONG, srcFormat, d7, \
81 , CYBERGRAPHICS_BASE_NAME)
83 #define MovePixelArray(srcX, srcY, rp, destX, destY, sizeX, sizeY) \
84 LP7(0x84, ULONG, MovePixelArray, ULONG, srcX, d0, ULONG, srcY, d1, struct RastPort *, rp, a1, ULONG, destX, d2, ULONG, destY, d3, ULONG, sizeX, d4, ULONG, sizeY, d5, \
85 , CYBERGRAPHICS_BASE_NAME)
87 #define InvertPixelArray(rp, destX, destY, sizeX, sizeY) \
88 LP5(0x90, ULONG, InvertPixelArray, struct RastPort *, rp, a1, ULONG, destX, d0, ULONG, destY, d1, ULONG, sizeX, d2, ULONG, sizeY, d3, \
89 , CYBERGRAPHICS_BASE_NAME)
91 #define FillPixelArray(rp, destX, destY, sizeX, sizeY, aRGB) \
92 LP6(0x96, ULONG, FillPixelArray, struct RastPort *, rp, a1, ULONG, destX, d0, ULONG, destY, d1, ULONG, sizeX, d2, ULONG, sizeY, d3, ULONG, aRGB, d4, \
93 , CYBERGRAPHICS_BASE_NAME)
95 #define DoCDrawMethodTagList(hook, rp, tagList) \
96 LP3NR(0x9c, DoCDrawMethodTagList, struct Hook *, hook, a0, struct RastPort *, rp, a1, struct TagItem *, tagList, a2, \
97 , CYBERGRAPHICS_BASE_NAME)
99 #ifndef NO_INLINE_STDARG
100 #define DoCDrawMethodTags(hook, rp, tags...) \
101 ({ULONG _tags[] = {tags}; DoCDrawMethodTagList((hook), (rp), (struct TagItem *) _tags);})
102 #endif
104 #define CVideoCtrlTagList(viewPort, tagList) \
105 LP2NR(0xa2, CVideoCtrlTagList, struct ViewPort *, viewPort, a0, struct TagItem *, tagList, a1, \
106 , CYBERGRAPHICS_BASE_NAME)
108 #ifndef NO_INLINE_STDARG
109 #define CVideoCtrlTags(viewPort, tags...) \
110 ({ULONG _tags[] = {tags}; CVideoCtrlTagList((viewPort), (struct TagItem *) _tags);})
111 #endif
113 #define LockBitMapTagList(bitMap, tagList) \
114 LP2(0xa8, APTR, LockBitMapTagList, APTR, bitMap, a0, struct TagItem *, tagList, a1, \
115 , CYBERGRAPHICS_BASE_NAME)
117 #ifndef NO_INLINE_STDARG
118 #define LockBitMapTags(bitMap, tags...) \
119 ({ULONG _tags[] = {tags}; LockBitMapTagList((bitMap), (struct TagItem *) _tags);})
120 #endif
122 #define UnLockBitMap(handle) \
123 LP1NR(0xae, UnLockBitMap, APTR, handle, a0, \
124 , CYBERGRAPHICS_BASE_NAME)
126 #define UnLockBitMapTagList(handle, tagList) \
127 LP2NR(0xb4, UnLockBitMapTagList, APTR, handle, a0, struct TagItem *, tagList, a1, \
128 , CYBERGRAPHICS_BASE_NAME)
130 #ifndef NO_INLINE_STDARG
131 #define UnLockBitMapTags(handle, tags...) \
132 ({ULONG _tags[] = {tags}; UnLockBitMapTagList((handle), (struct TagItem *) _tags);})
133 #endif
135 #define ExtractColor(rp, bitMap, colour, srcX, srcY, width, height) \
136 LP7(0xba, ULONG, ExtractColor, struct RastPort *, rp, a0, struct BitMap *, bitMap, a1, ULONG, colour, d0, ULONG, srcX, d1, ULONG, srcY, d2, ULONG, width, d3, ULONG, height, d4, \
137 , CYBERGRAPHICS_BASE_NAME)
139 #define WriteLUTPixelArray(srcRect, srcX, srcY, srcMod, rp, colorTab, destX, destY, sizeX, sizeY, cTFormat) \
140 LP11(0xc6, ULONG, WriteLUTPixelArray, APTR, srcRect, a0, ULONG, srcX, d0, ULONG, srcY, d1, ULONG, srcMod, d2, struct RastPort *, rp, a1, APTR, colorTab, a2, ULONG, destX, d3, ULONG, destY, d4, ULONG, sizeX, d5, ULONG, sizeY, d6, ULONG, cTFormat, d7, \
141 , CYBERGRAPHICS_BASE_NAME)
143 #define WritePixelArrayAlpha(srcRect, srcX, srcY, srcMod, rp, destX, destY, sizeX, sizeY, globalAlpha) \
144 LP10(0xd8, ULONG, WritePixelArrayAlpha, APTR, srcRect, a0, ULONG, srcX, d0, ULONG, srcY, d1, ULONG, srcMod, d2, struct RastPort *, rp, a1, ULONG, destX, d3, ULONG, destY, d4, ULONG, sizeX, d5, ULONG, sizeY, d6, ULONG, globalAlpha, d7, \
145 , CYBERGRAPHICS_BASE_NAME)
147 #define BltTemplateAlpha(source, xSrc, srcMod, destRP, xDest, yDest, xSize, ySize) \
148 LP8NR(0xde, BltTemplateAlpha, UBYTE *, source, a0, LONG, xSrc, d0, LONG, srcMod, d1, struct RastPort *, destRP, a1, ULONG, xDest, d2, ULONG, yDest, d3, ULONG, xSize, d4, ULONG, ySize, d5, \
149 , CYBERGRAPHICS_BASE_NAME)
151 #define ProcessPixelArray(rp, destX, destY, sizeX, sizeY, operation, value, taglist) \
152 LP8NR(0xe4, ProcessPixelArray, struct RastPort *, rp, a1, ULONG, destX, d0, ULONG, destY, d1, ULONG, sizeX, d2, ULONG, sizeY, d3, ULONG, operation, d4, LONG, value, d5, struct TagItem *, taglist, a2, \
153 , CYBERGRAPHICS_BASE_NAME)
155 #ifndef NO_INLINE_STDARG
156 #define ProcessPixelArrayTags(rp, destX, destY, sizeX, sizeY, operation, value, tags...) \
157 ({ULONG _tags[] = {tags}; ProcessPixelArray((rp), (destX), (destY), (sizeX), (sizeY), (operation), (value), (struct TagItem *) _tags);})
158 #endif
160 #define BltBitMapAlpha(srcBitMap, srcX, srcY, destBitMap, destX, destY, sizeX, sizeY, taglist) \
161 LP9(0xea, ULONG, BltBitMapAlpha, struct BitMap *, srcBitMap, a0, LONG, srcX, d0, LONG, srcY, d1, struct BitMap *, destBitMap, a1, LONG, destX, d2, LONG, destY, d3, LONG, sizeX, d4, LONG, sizeY, d5, struct TagItem *, taglist, a2, \
162 , CYBERGRAPHICS_BASE_NAME)
164 #define BltBitMapRastPortAlpha(srcBitMap, srcX, srcY, destRP, destX, destY, sizeX, sizeY, taglist) \
165 LP9(0xf0, ULONG, BltBitMapRastPortAlpha, struct BitMap *, srcBitMap, a0, LONG, srcX, d0, LONG, srcY, d1, struct RastPort *, destRP, a1, LONG, destX, d2, LONG, destY, d3, LONG, sizeX, d4, LONG, sizeY, d5, struct TagItem *, taglist, a2, \
166 , CYBERGRAPHICS_BASE_NAME)
168 #define ScalePixelArrayAlpha(srcRect, srcW, srcH, srcMod, rp, destX, destY, destW, destH, globalAlpha) \
169 LP10(0x102, LONG, ScalePixelArrayAlpha, APTR, srcRect, a0, ULONG, srcW, d0, ULONG, srcH, d1, ULONG, srcMod, d2, struct RastPort *, rp, a1, ULONG, destX, d3, ULONG, destY, d4, ULONG, destW, d5, ULONG, destH, d6, ULONG, globalAlpha, d7, \
170 , CYBERGRAPHICS_BASE_NAME)
172 #endif /* _INLINE_CYBERGRAPHICS_H */