forgotten commit. disabled until egl is adapted.
[AROS-Contrib.git] / scalos / include / inline / ttengine.h
blob5d0378da960f29b2a67872115f3989066cf93045
1 #ifndef _INLINE_TTENGINE_H
2 #define _INLINE_TTENGINE_H
4 #ifndef CLIB_TTENGINE_PROTOS_H
5 #define CLIB_TTENGINE_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
15 #ifndef UTILITY_TAGITEM_H
16 #include <utility/tagitem.h>
17 #endif
18 #ifndef LIBRARIES_TTENGINE_H
19 #include <libraries/ttengine.h>
20 #endif
21 #ifndef GRAPHICS_TEXT_H
22 #include <graphics/text.h>
23 #endif
25 #ifndef TTENGINE_BASE_NAME
26 #define TTENGINE_BASE_NAME TTEngineBase
27 #endif
29 #define TT_OpenFontA(taglist) \
30 LP1(0x1e, APTR, TT_OpenFontA, struct TagItem *, taglist, a0, \
31 , TTENGINE_BASE_NAME)
33 #ifndef NO_INLINE_STDARG
34 #define TT_OpenFont(tags...) \
35 ({ULONG _tags[] = {tags}; TT_OpenFontA((struct TagItem *) _tags);})
36 #endif
38 #define TT_SetFont(rp, font) \
39 LP2(0x24, BOOL, TT_SetFont, struct RastPort *, rp, a1, APTR, font, a0, \
40 , TTENGINE_BASE_NAME)
42 #define TT_CloseFont(font) \
43 LP1NR(0x2a, TT_CloseFont, APTR, font, a0, \
44 , TTENGINE_BASE_NAME)
46 #define TT_Text(rp, string, count) \
47 LP3NR(0x30, TT_Text, struct RastPort *, rp, a1, APTR, string, a0, ULONG, count, d0, \
48 , TTENGINE_BASE_NAME)
50 #define TT_SetAttrsA(rp, taglist) \
51 LP2(0x36, ULONG, TT_SetAttrsA, struct RastPort *, rp, a1, struct TagItem *, taglist, a0, \
52 , TTENGINE_BASE_NAME)
54 #ifndef NO_INLINE_STDARG
55 #define TT_SetAttrs(rp, tags...) \
56 ({ULONG _tags[] = {tags}; TT_SetAttrsA((rp), (struct TagItem *) _tags);})
57 #endif
59 #define TT_GetAttrsA(rp, taglist) \
60 LP2(0x3c, ULONG, TT_GetAttrsA, struct RastPort *, rp, a1, struct TagItem *, taglist, a0, \
61 , TTENGINE_BASE_NAME)
63 #ifndef NO_INLINE_STDARG
64 #define TT_GetAttrs(rp, tags...) \
65 ({ULONG _tags[] = {tags}; TT_GetAttrsA((rp), (struct TagItem *) _tags);})
66 #endif
68 #define TT_TextLength(rp, string, count) \
69 LP3(0x42, ULONG, TT_TextLength, struct RastPort *, rp, a1, APTR, string, a0, ULONG, count, d0, \
70 , TTENGINE_BASE_NAME)
72 #define TT_TextExtent(rp, string, count, te) \
73 LP4NR(0x48, TT_TextExtent, struct RastPort *, rp, a1, APTR, string, a0, LONG, count, d0, struct TextExtent *, te, a2, \
74 , TTENGINE_BASE_NAME)
76 #define TT_TextFit(rp, string, count, te, tec, dir, cwidth, cheight) \
77 LP8(0x4e, ULONG, TT_TextFit, struct RastPort *, rp, a1, APTR, string, a0, ULONG, count, d0, struct TextExtent *, te, a2, struct TextExtent *, tec, a3, LONG, dir, d1, ULONG, cwidth, d2, ULONG, cheight, d3, \
78 , TTENGINE_BASE_NAME)
80 #define TT_GetPixmapA(font, string, count, taglist) \
81 LP4(0x54, struct TT_Pixmap *, TT_GetPixmapA, APTR, font, a1, APTR, string, a2, ULONG, count, d0, struct TagItem *, taglist, a0, \
82 , TTENGINE_BASE_NAME)
84 #ifndef NO_INLINE_STDARG
85 #define TT_GetPixmap(font, string, count, tags...) \
86 ({ULONG _tags[] = {tags}; TT_GetPixmapA((font), (string), (count), (struct TagItem *) _tags);})
87 #endif
89 #define TT_FreePixmap(pixmap) \
90 LP1NR(0x5a, TT_FreePixmap, struct TT_Pixmap *, pixmap, a0, \
91 , TTENGINE_BASE_NAME)
93 #define TT_DoneRastPort(rp) \
94 LP1NR(0x60, TT_DoneRastPort, struct RastPort *, rp, a1, \
95 , TTENGINE_BASE_NAME)
97 #define TT_AllocRequest() \
98 LP0(0x66, APTR, TT_AllocRequest, \
99 , TTENGINE_BASE_NAME)
101 #define TT_RequestA(request, taglist) \
102 LP2(0x6c, struct TagItem*, TT_RequestA, APTR, request, a0, struct TagItem *, taglist, a1, \
103 , TTENGINE_BASE_NAME)
105 #ifndef NO_INLINE_STDARG
106 #define TT_Request(request, tags...) \
107 ({ULONG _tags[] = {tags}; TT_RequestA((request), (struct TagItem *) _tags);})
108 #endif
110 #define TT_FreeRequest(request) \
111 LP1NR(0x72, TT_FreeRequest, APTR, request, a0, \
112 , TTENGINE_BASE_NAME)
114 #define TT_ObtainFamilyListA(taglist) \
115 LP1(0x78, STRPTR *, TT_ObtainFamilyListA, struct TagItem *, taglist, a0, \
116 , TTENGINE_BASE_NAME)
118 #ifndef NO_INLINE_STDARG
119 #define TT_ObtainFamilyList(tags...) \
120 ({ULONG _tags[] = {tags}; TT_ObtainFamilyListA((struct TagItem *) _tags);})
121 #endif
123 #define TT_FreeFamilyList(list) \
124 LP1NR(0x7e, TT_FreeFamilyList, STRPTR *, list, a0, \
125 , TTENGINE_BASE_NAME)
127 #endif /* _INLINE_TTENGINE_H */