Tizen 2.0 Release
[profile/ivi/osmesa.git] / include / VG / vgext.h
1 /* $Revision: 6810 $ on $Date:: 2008-10-29 07:31:37 -0700 #$ */
2
3 /*------------------------------------------------------------------------
4  * 
5  * VG extensions Reference Implementation
6  * -------------------------------------
7  *
8  * Copyright (c) 2008 The Khronos Group Inc.
9  *
10  * Permission is hereby granted, free of charge, to any person obtaining a
11  * copy of this software and /or associated documentation files
12  * (the "Materials "), to deal in the Materials without restriction,
13  * including without limitation the rights to use, copy, modify, merge,
14  * publish, distribute, sublicense, and/or sell copies of the Materials,
15  * and to permit persons to whom the Materials are furnished to do so,
16  * subject to the following conditions: 
17  *
18  * The above copyright notice and this permission notice shall be included 
19  * in all copies or substantial portions of the Materials. 
20  *
21  * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
24  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
25  * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
26  * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR
27  * THE USE OR OTHER DEALINGS IN THE MATERIALS.
28  *
29  *//**
30  * \file
31  * \brief       VG extensions
32  *//*-------------------------------------------------------------------*/
33
34
35
36 #ifndef _VGEXT_H
37 #define _VGEXT_H
38
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42
43 #include <VG/openvg.h>
44 #include <VG/vgu.h>
45
46 #ifndef VG_API_ENTRYP
47 #   define VG_API_ENTRYP VG_API_ENTRY*
48 #endif
49
50 #ifndef VGU_API_ENTRYP
51 #   define VGU_API_ENTRYP VGU_API_ENTRY*
52 #endif
53
54 /*-------------------------------------------------------------------------------
55  * KHR extensions
56  *------------------------------------------------------------------------------*/
57
58 typedef enum  {
59
60 #ifndef VG_KHR_iterative_average_blur
61   VG_MAX_AVERAGE_BLUR_DIMENSION_KHR        = 0x116B,
62   VG_AVERAGE_BLUR_DIMENSION_RESOLUTION_KHR = 0x116C,
63   VG_MAX_AVERAGE_BLUR_ITERATIONS_KHR       = 0x116D,
64 #endif
65
66   VG_PARAM_TYPE_KHR_FORCE_SIZE             = VG_MAX_ENUM
67 } VGParamTypeKHR;
68
69 #ifndef VG_KHR_EGL_image
70 #define VG_KHR_EGL_image 1
71 /* VGEGLImageKHR is an opaque handle to an EGLImage */
72 typedef void* VGeglImageKHR; 
73
74 #ifdef VG_VGEXT_PROTOTYPES
75 VG_API_CALL VGImage VG_API_ENTRY vgCreateEGLImageTargetKHR(VGeglImageKHR image);
76 #endif
77 typedef VGImage (VG_API_ENTRYP PFNVGCREATEEGLIMAGETARGETKHRPROC) (VGeglImageKHR image);
78
79 #endif
80
81
82 #ifndef VG_KHR_iterative_average_blur
83 #define VG_KHR_iterative_average_blur 1
84
85 #ifdef VG_VGEXT_PROTOTYPES
86 VG_API_CALL void vgIterativeAverageBlurKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGTilingMode tilingMode);
87 #endif 
88 typedef void (VG_API_ENTRYP PFNVGITERATIVEAVERAGEBLURKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGTilingMode tilingMode);
89
90 #endif
91
92
93 #ifndef VG_KHR_advanced_blending
94 #define VG_KHR_advanced_blending 1
95
96 typedef enum {
97   VG_BLEND_OVERLAY_KHR        = 0x2010,
98   VG_BLEND_HARDLIGHT_KHR      = 0x2011,
99   VG_BLEND_SOFTLIGHT_SVG_KHR  = 0x2012,
100   VG_BLEND_SOFTLIGHT_KHR      = 0x2013,
101   VG_BLEND_COLORDODGE_KHR     = 0x2014,
102   VG_BLEND_COLORBURN_KHR      = 0x2015,
103   VG_BLEND_DIFFERENCE_KHR     = 0x2016,
104   VG_BLEND_SUBTRACT_KHR       = 0x2017,
105   VG_BLEND_INVERT_KHR         = 0x2018,
106   VG_BLEND_EXCLUSION_KHR      = 0x2019,
107   VG_BLEND_LINEARDODGE_KHR    = 0x201a,
108   VG_BLEND_LINEARBURN_KHR     = 0x201b,
109   VG_BLEND_VIVIDLIGHT_KHR     = 0x201c,
110   VG_BLEND_LINEARLIGHT_KHR    = 0x201d,
111   VG_BLEND_PINLIGHT_KHR       = 0x201e,
112   VG_BLEND_HARDMIX_KHR        = 0x201f,
113   VG_BLEND_CLEAR_KHR          = 0x2020,
114   VG_BLEND_DST_KHR            = 0x2021,
115   VG_BLEND_SRC_OUT_KHR        = 0x2022,
116   VG_BLEND_DST_OUT_KHR        = 0x2023,
117   VG_BLEND_SRC_ATOP_KHR       = 0x2024,
118   VG_BLEND_DST_ATOP_KHR       = 0x2025,
119   VG_BLEND_XOR_KHR            = 0x2026,
120
121   VG_BLEND_MODE_KHR_FORCE_SIZE= VG_MAX_ENUM
122 } VGBlendModeKHR;
123 #endif
124
125 #ifndef VG_KHR_parametric_filter
126 #define VG_KHR_parametric_filter 1 
127
128 typedef enum {
129   VG_PF_OBJECT_VISIBLE_FLAG_KHR = (1 << 0),
130   VG_PF_KNOCKOUT_FLAG_KHR       = (1 << 1),
131   VG_PF_OUTER_FLAG_KHR          = (1 << 2),
132   VG_PF_INNER_FLAG_KHR          = (1 << 3),
133
134   VG_PF_TYPE_KHR_FORCE_SIZE     = VG_MAX_ENUM
135 } VGPfTypeKHR;
136
137 typedef enum {
138   VGU_IMAGE_IN_USE_ERROR           = 0xF010,
139
140   VGU_ERROR_CODE_KHR_FORCE_SIZE    = VG_MAX_ENUM
141 } VGUErrorCodeKHR;
142
143 #ifdef VG_VGEXT_PROTOTYPES
144 VG_API_CALL void VG_API_ENTRY vgParametricFilterKHR(VGImage dst,VGImage src,VGImage blur,VGfloat strength,VGfloat offsetX,VGfloat offsetY,VGbitfield filterFlags,VGPaint highlightPaint,VGPaint shadowPaint);
145 VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguDropShadowKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint shadowColorRGBA);
146 VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguGlowKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint glowColorRGBA) ;
147 VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguBevelKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint highlightColorRGBA,VGuint shadowColorRGBA);
148 VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguGradientGlowKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint stopsCount,const VGfloat* glowColorRampStops);
149 VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguGradientBevelKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint stopsCount,const VGfloat* bevelColorRampStops);
150 #endif
151 typedef void (VG_API_ENTRYP PFNVGPARAMETRICFILTERKHRPROC) (VGImage dst,VGImage src,VGImage blur,VGfloat strength,VGfloat offsetX,VGfloat offsetY,VGbitfield filterFlags,VGPaint highlightPaint,VGPaint shadowPaint);
152 typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUDROPSHADOWKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint shadowColorRGBA);
153 typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUGLOWKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint glowColorRGBA);
154 typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUBEVELKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint highlightColorRGBA,VGuint shadowColorRGBA);
155 typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUGRADIENTGLOWKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint stopsCount,const VGfloat* glowColorRampStops);
156 typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUGRADIENTBEVELKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint stopsCount,const VGfloat* bevelColorRampStops);
157
158 #endif
159
160
161 /*-------------------------------------------------------------------------------
162  * NDS extensions
163  *------------------------------------------------------------------------------*/
164
165 #ifndef VG_NDS_paint_generation
166 #define VG_NDS_paint_generation 1
167
168 typedef enum { 
169   VG_PAINT_COLOR_RAMP_LINEAR_NDS            = 0x1A10,
170   VG_COLOR_MATRIX_NDS                       = 0x1A11,
171   VG_PAINT_COLOR_TRANSFORM_LINEAR_NDS       = 0x1A12,
172
173   VG_PAINT_PARAM_TYPE_NDS_FORCE_SIZE        = VG_MAX_ENUM
174 } VGPaintParamTypeNds;
175
176 typedef enum {
177   VG_DRAW_IMAGE_COLOR_MATRIX_NDS            = 0x1F10,
178
179   VG_IMAGE_MODE_NDS_FORCE_SIZE              = VG_MAX_ENUM
180 } VGImageModeNds;
181 #endif 
182
183
184 #ifndef VG_NDS_projective_geometry
185 #define VG_NDS_projective_geometry 1
186
187 typedef enum {
188   VG_CLIP_MODE_NDS                          = 0x1180,
189   VG_CLIP_LINES_NDS                         = 0x1181,
190   VG_MAX_CLIP_LINES_NDS                     = 0x1182,
191
192   VG_PARAM_TYPE_NDS_FORCE_SIZE        = VG_MAX_ENUM
193 } VGParamTypeNds;
194
195 typedef enum {
196   VG_CLIPMODE_NONE_NDS                      = 0x3000,
197   VG_CLIPMODE_CLIP_CLOSED_NDS               = 0x3001,
198   VG_CLIPMODE_CLIP_OPEN_NDS                 = 0x3002,
199   VG_CLIPMODE_CULL_NDS                      = 0x3003,
200
201   VG_CLIPMODE_NDS_FORCE_SIZE = VG_MAX_ENUM
202 } VGClipModeNds;
203
204 typedef enum {
205   VG_RQUAD_TO_NDS              = ( 13 << 1 ),
206   VG_RCUBIC_TO_NDS             = ( 14 << 1 ),
207   
208   VG_PATH_SEGMENT_NDS_FORCE_SIZE = VG_MAX_ENUM
209 } VGPathSegmentNds;
210
211 typedef enum {
212   VG_RQUAD_TO_ABS_NDS            = (VG_RQUAD_TO_NDS  | VG_ABSOLUTE),
213   VG_RQUAD_TO_REL_NDS            = (VG_RQUAD_TO_NDS  | VG_RELATIVE),
214   VG_RCUBIC_TO_ABS_NDS           = (VG_RCUBIC_TO_NDS | VG_ABSOLUTE),
215   VG_RCUBIC_TO_REL_NDS           = (VG_RCUBIC_TO_NDS | VG_RELATIVE),
216
217   VG_PATH_COMMAND_NDS_FORCE_SIZE = VG_MAX_ENUM
218 } VGPathCommandNds;
219
220 #ifdef VG_VGEXT_PROTOTYPES
221 VG_API_CALL void VG_API_ENTRY vgProjectiveMatrixNDS(VGboolean enable) ;
222 VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguTransformClipLineNDS(const VGfloat Ain,const VGfloat Bin,const VGfloat Cin,const VGfloat* matrix,const VGboolean inverse,VGfloat* Aout,VGfloat* Bout,VGfloat* Cout);
223 #endif 
224 typedef void (VG_API_ENTRYP PFNVGPROJECTIVEMATRIXNDSPROC) (VGboolean enable) ;
225 typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUTRANSFORMCLIPLINENDSPROC) (const VGfloat Ain,const VGfloat Bin,const VGfloat Cin,const VGfloat* matrix,const VGboolean inverse,VGfloat* Aout,VGfloat* Bout,VGfloat* Cout);
226
227 #endif
228
229 #ifdef __cplusplus 
230 } /* extern "C" */
231 #endif
232
233 #endif /* _VGEXT_H */