|
1 /*------------------------------------------------------------------------ |
|
2 * |
|
3 * VGU 1.1 Reference Implementation |
|
4 * ------------------------------------- |
|
5 * |
|
6 * Copyright (c) 2008-2009 The Khronos Group Inc. |
|
7 * |
|
8 * Permission is hereby granted, free of charge, to any person obtaining a |
|
9 * copy of this software and /or associated documentation files |
|
10 * (the "Materials "), to deal in the Materials without restriction, |
|
11 * including without limitation the rights to use, copy, modify, merge, |
|
12 * publish, distribute, sublicense, and/or sell copies of the Materials, |
|
13 * and to permit persons to whom the Materials are furnished to do so, |
|
14 * subject to the following conditions: |
|
15 * |
|
16 * The above copyright notice and this permission notice shall be included |
|
17 * in all copies or substantial portions of the Materials. |
|
18 * |
|
19 * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
|
20 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
|
21 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
|
22 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, |
|
23 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR |
|
24 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR |
|
25 * THE USE OR OTHER DEALINGS IN THE MATERIALS. |
|
26 * |
|
27 *//** |
|
28 * \file |
|
29 * \brief VGU 1.1 API. |
|
30 *//*-------------------------------------------------------------------*/ |
|
31 |
|
32 #ifndef __VG_1_1_VGU_H |
|
33 #define __VG_1_1_VGU_H |
|
34 |
|
35 #ifndef __VG_VGU_H_ |
|
36 #error Do not include this file directly. Use <VG/vgu.h>. |
|
37 #endif |
|
38 |
|
39 /* differences from the actual sample implemtation provided by Khronos: |
|
40 - this comment |
|
41 - the Doxygen comment with tag 'publishedAll', and tag 'released' |
|
42 - changing |
|
43 #define VG_API_CALL extern |
|
44 to |
|
45 #define VG_API_CALL IMPORT_C |
|
46 - the addition of __SOFTFP in some of the function prototypes |
|
47 */ |
|
48 |
|
49 /** |
|
50 @publishedAll |
|
51 @released |
|
52 */ |
|
53 #ifdef __cplusplus |
|
54 extern "C" { |
|
55 #endif |
|
56 |
|
57 #include <VG/openvg.h> |
|
58 |
|
59 #define VGU_VERSION_1_0 1 |
|
60 #define VGU_VERSION_1_0_1 1 |
|
61 #define VGU_VERSION_1_1 2 |
|
62 |
|
63 #ifndef VGU_API_CALL |
|
64 # if defined(SYMBIAN_VG_DLL_EXPORTS) |
|
65 # define VGU_API_CALL EXPORT_C |
|
66 # else |
|
67 # define VGU_API_CALL IMPORT_C |
|
68 # endif //defined(SYMBIAN_VG_DLL_EXPORTS) |
|
69 #endif |
|
70 #ifndef VGU_APIENTRY |
|
71 #define VGU_APIENTRY /* nothing */ |
|
72 #endif |
|
73 #ifndef VGU_APIEXIT |
|
74 #define VGU_APIEXIT __SOFTFP |
|
75 #endif |
|
76 |
|
77 typedef enum { |
|
78 VGU_NO_ERROR = 0, |
|
79 VGU_BAD_HANDLE_ERROR = 0xF000, |
|
80 VGU_ILLEGAL_ARGUMENT_ERROR = 0xF001, |
|
81 VGU_OUT_OF_MEMORY_ERROR = 0xF002, |
|
82 VGU_PATH_CAPABILITY_ERROR = 0xF003, |
|
83 VGU_BAD_WARP_ERROR = 0xF004 |
|
84 } VGUErrorCode; |
|
85 |
|
86 typedef enum { |
|
87 VGU_ARC_OPEN = 0xF100, |
|
88 VGU_ARC_CHORD = 0xF101, |
|
89 VGU_ARC_PIE = 0xF102 |
|
90 } VGUArcType; |
|
91 |
|
92 VGU_API_CALL VGUErrorCode VGU_APIENTRY |
|
93 vguLine(VGPath path, |
|
94 VGfloat x0, VGfloat y0, |
|
95 VGfloat x1, VGfloat y1) VGU_APIEXIT; |
|
96 |
|
97 VGU_API_CALL VGUErrorCode VGU_APIENTRY |
|
98 vguPolygon(VGPath path, |
|
99 const VGfloat * points, |
|
100 VGint count, |
|
101 VGboolean closed) VGU_APIEXIT; |
|
102 |
|
103 VGU_API_CALL VGUErrorCode VGU_APIENTRY |
|
104 vguRect(VGPath path, |
|
105 VGfloat x, VGfloat y, |
|
106 VGfloat width, VGfloat height) VGU_APIEXIT; |
|
107 |
|
108 VGU_API_CALL VGUErrorCode VGU_APIENTRY |
|
109 vguRoundRect(VGPath path, |
|
110 VGfloat x, VGfloat y, |
|
111 VGfloat width, |
|
112 VGfloat height, |
|
113 VGfloat arcWidth, |
|
114 VGfloat arcHeight) VGU_APIEXIT; |
|
115 |
|
116 VGU_API_CALL VGUErrorCode VGU_APIENTRY |
|
117 vguEllipse(VGPath path, |
|
118 VGfloat cx, VGfloat cy, |
|
119 VGfloat width, |
|
120 VGfloat height) VGU_APIEXIT; |
|
121 |
|
122 VGU_API_CALL VGUErrorCode VGU_APIENTRY |
|
123 vguArc(VGPath path, |
|
124 VGfloat x, VGfloat y, |
|
125 VGfloat width, VGfloat height, |
|
126 VGfloat startAngle, |
|
127 VGfloat angleExtent, |
|
128 VGUArcType arcType) VGU_APIEXIT; |
|
129 |
|
130 VGU_API_CALL VGUErrorCode VGU_APIENTRY |
|
131 vguComputeWarpQuadToSquare(VGfloat sx0, VGfloat sy0, |
|
132 VGfloat sx1, VGfloat sy1, |
|
133 VGfloat sx2, VGfloat sy2, |
|
134 VGfloat sx3, VGfloat sy3, |
|
135 VGfloat * matrix) VGU_APIEXIT; |
|
136 |
|
137 VGU_API_CALL VGUErrorCode VGU_APIENTRY |
|
138 vguComputeWarpSquareToQuad(VGfloat dx0, VGfloat dy0, |
|
139 VGfloat dx1, VGfloat dy1, |
|
140 VGfloat dx2, VGfloat dy2, |
|
141 VGfloat dx3, VGfloat dy3, |
|
142 VGfloat * matrix) VGU_APIEXIT; |
|
143 |
|
144 VGU_API_CALL VGUErrorCode VGU_APIENTRY |
|
145 vguComputeWarpQuadToQuad(VGfloat dx0, VGfloat dy0, |
|
146 VGfloat dx1, VGfloat dy1, |
|
147 VGfloat dx2, VGfloat dy2, |
|
148 VGfloat dx3, VGfloat dy3, |
|
149 VGfloat sx0, VGfloat sy0, |
|
150 VGfloat sx1, VGfloat sy1, |
|
151 VGfloat sx2, VGfloat sy2, |
|
152 VGfloat sx3, VGfloat sy3, |
|
153 VGfloat * matrix) VGU_APIEXIT; |
|
154 |
|
155 #ifdef __cplusplus |
|
156 } /* extern "C" */ |
|
157 #endif |
|
158 |
|
159 #endif /* __VG_1_1_VGU_H */ |