1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/graphics/openvg/openvginterface/include/1.0/openvg.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,646 @@
1.4 +/*------------------------------------------------------------------------
1.5 + *
1.6 + * OpenVG 1.0.1 Reference Implementation
1.7 + * -------------------------------------
1.8 + *
1.9 + * Copyright (c) 2007-2009 The Khronos Group Inc.
1.10 + *
1.11 + * Permission is hereby granted, free of charge, to any person obtaining a
1.12 + * copy of this software and /or associated documentation files
1.13 + * (the "Materials "), to deal in the Materials without restriction,
1.14 + * including without limitation the rights to use, copy, modify, merge,
1.15 + * publish, distribute, sublicense, and/or sell copies of the Materials,
1.16 + * and to permit persons to whom the Materials are furnished to do so,
1.17 + * subject to the following conditions:
1.18 + *
1.19 + * The above copyright notice and this permission notice shall be included
1.20 + * in all copies or substantial portions of the Materials.
1.21 + *
1.22 + * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
1.23 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1.24 + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
1.25 + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
1.26 + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
1.27 + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR
1.28 + * THE USE OR OTHER DEALINGS IN THE MATERIALS.
1.29 + *
1.30 + *//**
1.31 + * \file
1.32 + * \brief OpenVG 1.0.1 API.
1.33 + *//*-------------------------------------------------------------------*/
1.34 +
1.35 +#ifndef __VG_1_0_OPENVG_H
1.36 +#define __VG_1_0_OPENVG_H
1.37 +
1.38 +#ifndef __VG_OPENVG_H_
1.39 +#error Do not include this file directly. Use <VG/openvg.h>.
1.40 +#endif
1.41 +
1.42 +/* differences from the actual sample implemtation provided by Khronos:
1.43 +- this comment
1.44 +- the Doxygen comment with tag 'publishedAll', and tag 'released'
1.45 +- changing
1.46 + #define VG_API_CALL extern
1.47 + to
1.48 + #define VG_API_CALL IMPORT_C
1.49 +- the addition of __SOFTFP in some of the function prototypes
1.50 +- the addition of VG_PATH_DATATYPE_INVALID in VGPathDatatype
1.51 +- the addition of VG_IMAGE_FORMAT_INVALID in VGImageFormat
1.52 +- the addition of VGeglImageKHR typedef for the VG_KHR_EGL_image extension
1.53 + */
1.54 +
1.55 +/**
1.56 +@publishedAll
1.57 +@released
1.58 +*/
1.59 +
1.60 +#ifdef __cplusplus
1.61 +extern "C" {
1.62 +#endif
1.63 +
1.64 +#define OPENVG_VERSION_1_0 1
1.65 +#define OPENVG_VERSION_1_0_1 1
1.66 +
1.67 +#include <khronos_types.h>
1.68 +
1.69 +typedef khronos_float VGfloat;
1.70 +typedef khronos_int8_t VGbyte;
1.71 +typedef khronos_uint8_t VGubyte;
1.72 +typedef khronos_int16_t VGshort;
1.73 +typedef khronos_int32_t VGint;
1.74 +typedef khronos_uint32_t VGuint;
1.75 +typedef khronos_uint32_t VGbitfield;
1.76 +
1.77 +typedef enum {
1.78 + VG_FALSE = 0,
1.79 + VG_TRUE = 1
1.80 +} VGboolean;
1.81 +
1.82 +#define VG_MAXSHORT ((VGshort)((~((unsigned)0)) >> 1))
1.83 +#define VG_MAXINT ((VGint)((~((unsigned)0)) >> 1))
1.84 +
1.85 +typedef VGuint VGHandle;
1.86 +
1.87 +#define VG_INVALID_HANDLE ((VGHandle)0)
1.88 +
1.89 +typedef enum {
1.90 + VG_NO_ERROR = 0,
1.91 + VG_BAD_HANDLE_ERROR = 0x1000,
1.92 + VG_ILLEGAL_ARGUMENT_ERROR = 0x1001,
1.93 + VG_OUT_OF_MEMORY_ERROR = 0x1002,
1.94 + VG_PATH_CAPABILITY_ERROR = 0x1003,
1.95 + VG_UNSUPPORTED_IMAGE_FORMAT_ERROR = 0x1004,
1.96 + VG_UNSUPPORTED_PATH_FORMAT_ERROR = 0x1005,
1.97 + VG_IMAGE_IN_USE_ERROR = 0x1006,
1.98 + VG_NO_CONTEXT_ERROR = 0x1007
1.99 +} VGErrorCode;
1.100 +
1.101 +typedef enum {
1.102 + /* Mode settings */
1.103 + VG_MATRIX_MODE = 0x1100,
1.104 + VG_FILL_RULE = 0x1101,
1.105 + VG_IMAGE_QUALITY = 0x1102,
1.106 + VG_RENDERING_QUALITY = 0x1103,
1.107 + VG_BLEND_MODE = 0x1104,
1.108 + VG_IMAGE_MODE = 0x1105,
1.109 +
1.110 + /* Scissoring rectangles */
1.111 + VG_SCISSOR_RECTS = 0x1106,
1.112 +
1.113 + /* Stroke parameters */
1.114 + VG_STROKE_LINE_WIDTH = 0x1110,
1.115 + VG_STROKE_CAP_STYLE = 0x1111,
1.116 + VG_STROKE_JOIN_STYLE = 0x1112,
1.117 + VG_STROKE_MITER_LIMIT = 0x1113,
1.118 + VG_STROKE_DASH_PATTERN = 0x1114,
1.119 + VG_STROKE_DASH_PHASE = 0x1115,
1.120 + VG_STROKE_DASH_PHASE_RESET = 0x1116,
1.121 +
1.122 + /* Edge fill color for VG_TILE_FILL tiling mode */
1.123 + VG_TILE_FILL_COLOR = 0x1120,
1.124 +
1.125 + /* Color for vgClear */
1.126 + VG_CLEAR_COLOR = 0x1121,
1.127 +
1.128 + /* Enable/disable alpha masking and scissoring */
1.129 + VG_MASKING = 0x1130,
1.130 + VG_SCISSORING = 0x1131,
1.131 +
1.132 + /* Pixel layout information */
1.133 + VG_PIXEL_LAYOUT = 0x1140,
1.134 + VG_SCREEN_LAYOUT = 0x1141,
1.135 +
1.136 + /* Source format selection for image filters */
1.137 + VG_FILTER_FORMAT_LINEAR = 0x1150,
1.138 + VG_FILTER_FORMAT_PREMULTIPLIED = 0x1151,
1.139 +
1.140 + /* Destination write enable mask for image filters */
1.141 + VG_FILTER_CHANNEL_MASK = 0x1152,
1.142 +
1.143 + /* Implementation limits (read-only) */
1.144 + VG_MAX_SCISSOR_RECTS = 0x1160,
1.145 + VG_MAX_DASH_COUNT = 0x1161,
1.146 + VG_MAX_KERNEL_SIZE = 0x1162,
1.147 + VG_MAX_SEPARABLE_KERNEL_SIZE = 0x1163,
1.148 + VG_MAX_COLOR_RAMP_STOPS = 0x1164,
1.149 + VG_MAX_IMAGE_WIDTH = 0x1165,
1.150 + VG_MAX_IMAGE_HEIGHT = 0x1166,
1.151 + VG_MAX_IMAGE_PIXELS = 0x1167,
1.152 + VG_MAX_IMAGE_BYTES = 0x1168,
1.153 + VG_MAX_FLOAT = 0x1169,
1.154 + VG_MAX_GAUSSIAN_STD_DEVIATION = 0x116A
1.155 +} VGParamType;
1.156 +
1.157 +typedef enum {
1.158 + VG_RENDERING_QUALITY_NONANTIALIASED = 0x1200,
1.159 + VG_RENDERING_QUALITY_FASTER = 0x1201,
1.160 + VG_RENDERING_QUALITY_BETTER = 0x1202 /* Default */
1.161 +} VGRenderingQuality;
1.162 +
1.163 +typedef enum {
1.164 + VG_PIXEL_LAYOUT_UNKNOWN = 0x1300,
1.165 + VG_PIXEL_LAYOUT_RGB_VERTICAL = 0x1301,
1.166 + VG_PIXEL_LAYOUT_BGR_VERTICAL = 0x1302,
1.167 + VG_PIXEL_LAYOUT_RGB_HORIZONTAL = 0x1303,
1.168 + VG_PIXEL_LAYOUT_BGR_HORIZONTAL = 0x1304
1.169 +} VGPixelLayout;
1.170 +
1.171 +typedef enum {
1.172 + VG_MATRIX_PATH_USER_TO_SURFACE = 0x1400,
1.173 + VG_MATRIX_IMAGE_USER_TO_SURFACE = 0x1401,
1.174 + VG_MATRIX_FILL_PAINT_TO_USER = 0x1402,
1.175 + VG_MATRIX_STROKE_PAINT_TO_USER = 0x1403
1.176 +} VGMatrixMode;
1.177 +
1.178 +typedef enum {
1.179 + VG_CLEAR_MASK = 0x1500,
1.180 + VG_FILL_MASK = 0x1501,
1.181 + VG_SET_MASK = 0x1502,
1.182 + VG_UNION_MASK = 0x1503,
1.183 + VG_INTERSECT_MASK = 0x1504,
1.184 + VG_SUBTRACT_MASK = 0x1505
1.185 +} VGMaskOperation;
1.186 +
1.187 +#define VG_PATH_FORMAT_STANDARD 0
1.188 +
1.189 +typedef enum {
1.190 + VG_PATH_DATATYPE_INVALID = -1,
1.191 + VG_PATH_DATATYPE_S_8 = 0,
1.192 + VG_PATH_DATATYPE_S_16 = 1,
1.193 + VG_PATH_DATATYPE_S_32 = 2,
1.194 + VG_PATH_DATATYPE_F = 3
1.195 +} VGPathDatatype;
1.196 +
1.197 +typedef enum {
1.198 + VG_ABSOLUTE = 0,
1.199 + VG_RELATIVE = 1
1.200 +} VGPathAbsRel;
1.201 +
1.202 +typedef enum {
1.203 + VG_CLOSE_PATH = ( 0 << 1),
1.204 + VG_MOVE_TO = ( 1 << 1),
1.205 + VG_LINE_TO = ( 2 << 1),
1.206 + VG_HLINE_TO = ( 3 << 1),
1.207 + VG_VLINE_TO = ( 4 << 1),
1.208 + VG_QUAD_TO = ( 5 << 1),
1.209 + VG_CUBIC_TO = ( 6 << 1),
1.210 + VG_SQUAD_TO = ( 7 << 1),
1.211 + VG_SCUBIC_TO = ( 8 << 1),
1.212 + VG_SCCWARC_TO = ( 9 << 1),
1.213 + VG_SCWARC_TO = (10 << 1),
1.214 + VG_LCCWARC_TO = (11 << 1),
1.215 + VG_LCWARC_TO = (12 << 1)
1.216 +} VGPathSegment;
1.217 +
1.218 +typedef enum {
1.219 + VG_MOVE_TO_ABS = VG_MOVE_TO | VG_ABSOLUTE,
1.220 + VG_MOVE_TO_REL = VG_MOVE_TO | VG_RELATIVE,
1.221 + VG_LINE_TO_ABS = VG_LINE_TO | VG_ABSOLUTE,
1.222 + VG_LINE_TO_REL = VG_LINE_TO | VG_RELATIVE,
1.223 + VG_HLINE_TO_ABS = VG_HLINE_TO | VG_ABSOLUTE,
1.224 + VG_HLINE_TO_REL = VG_HLINE_TO | VG_RELATIVE,
1.225 + VG_VLINE_TO_ABS = VG_VLINE_TO | VG_ABSOLUTE,
1.226 + VG_VLINE_TO_REL = VG_VLINE_TO | VG_RELATIVE,
1.227 + VG_QUAD_TO_ABS = VG_QUAD_TO | VG_ABSOLUTE,
1.228 + VG_QUAD_TO_REL = VG_QUAD_TO | VG_RELATIVE,
1.229 + VG_CUBIC_TO_ABS = VG_CUBIC_TO | VG_ABSOLUTE,
1.230 + VG_CUBIC_TO_REL = VG_CUBIC_TO | VG_RELATIVE,
1.231 + VG_SQUAD_TO_ABS = VG_SQUAD_TO | VG_ABSOLUTE,
1.232 + VG_SQUAD_TO_REL = VG_SQUAD_TO | VG_RELATIVE,
1.233 + VG_SCUBIC_TO_ABS = VG_SCUBIC_TO | VG_ABSOLUTE,
1.234 + VG_SCUBIC_TO_REL = VG_SCUBIC_TO | VG_RELATIVE,
1.235 + VG_SCCWARC_TO_ABS = VG_SCCWARC_TO | VG_ABSOLUTE,
1.236 + VG_SCCWARC_TO_REL = VG_SCCWARC_TO | VG_RELATIVE,
1.237 + VG_SCWARC_TO_ABS = VG_SCWARC_TO | VG_ABSOLUTE,
1.238 + VG_SCWARC_TO_REL = VG_SCWARC_TO | VG_RELATIVE,
1.239 + VG_LCCWARC_TO_ABS = VG_LCCWARC_TO | VG_ABSOLUTE,
1.240 + VG_LCCWARC_TO_REL = VG_LCCWARC_TO | VG_RELATIVE,
1.241 + VG_LCWARC_TO_ABS = VG_LCWARC_TO | VG_ABSOLUTE,
1.242 + VG_LCWARC_TO_REL = VG_LCWARC_TO | VG_RELATIVE
1.243 +} VGPathCommand;
1.244 +
1.245 +typedef VGHandle VGPath;
1.246 +
1.247 +typedef enum {
1.248 + VG_PATH_CAPABILITY_APPEND_FROM = (1 << 0),
1.249 + VG_PATH_CAPABILITY_APPEND_TO = (1 << 1),
1.250 + VG_PATH_CAPABILITY_MODIFY = (1 << 2),
1.251 + VG_PATH_CAPABILITY_TRANSFORM_FROM = (1 << 3),
1.252 + VG_PATH_CAPABILITY_TRANSFORM_TO = (1 << 4),
1.253 + VG_PATH_CAPABILITY_INTERPOLATE_FROM = (1 << 5),
1.254 + VG_PATH_CAPABILITY_INTERPOLATE_TO = (1 << 6),
1.255 + VG_PATH_CAPABILITY_PATH_LENGTH = (1 << 7),
1.256 + VG_PATH_CAPABILITY_POINT_ALONG_PATH = (1 << 8),
1.257 + VG_PATH_CAPABILITY_TANGENT_ALONG_PATH = (1 << 9),
1.258 + VG_PATH_CAPABILITY_PATH_BOUNDS = (1 << 10),
1.259 + VG_PATH_CAPABILITY_PATH_TRANSFORMED_BOUNDS = (1 << 11),
1.260 + VG_PATH_CAPABILITY_ALL = (1 << 12) - 1
1.261 +} VGPathCapabilities;
1.262 +
1.263 +typedef enum {
1.264 + VG_PATH_FORMAT = 0x1600,
1.265 + VG_PATH_DATATYPE = 0x1601,
1.266 + VG_PATH_SCALE = 0x1602,
1.267 + VG_PATH_BIAS = 0x1603,
1.268 + VG_PATH_NUM_SEGMENTS = 0x1604,
1.269 + VG_PATH_NUM_COORDS = 0x1605
1.270 +} VGPathParamType;
1.271 +
1.272 +typedef enum {
1.273 + VG_CAP_BUTT = 0x1700,
1.274 + VG_CAP_ROUND = 0x1701,
1.275 + VG_CAP_SQUARE = 0x1702
1.276 +} VGCapStyle;
1.277 +
1.278 +typedef enum {
1.279 + VG_JOIN_MITER = 0x1800,
1.280 + VG_JOIN_ROUND = 0x1801,
1.281 + VG_JOIN_BEVEL = 0x1802
1.282 +} VGJoinStyle;
1.283 +
1.284 +typedef enum {
1.285 + VG_EVEN_ODD = 0x1900,
1.286 + VG_NON_ZERO = 0x1901
1.287 +} VGFillRule;
1.288 +
1.289 +typedef enum {
1.290 + VG_STROKE_PATH = (1 << 0),
1.291 + VG_FILL_PATH = (1 << 1)
1.292 +} VGPaintMode;
1.293 +
1.294 +typedef VGHandle VGPaint;
1.295 +
1.296 +typedef enum {
1.297 + /* Color paint parameters */
1.298 + VG_PAINT_TYPE = 0x1A00,
1.299 + VG_PAINT_COLOR = 0x1A01,
1.300 + VG_PAINT_COLOR_RAMP_SPREAD_MODE = 0x1A02,
1.301 + VG_PAINT_COLOR_RAMP_PREMULTIPLIED = 0x1A07,
1.302 + VG_PAINT_COLOR_RAMP_STOPS = 0x1A03,
1.303 +
1.304 + /* Linear gradient paint parameters */
1.305 + VG_PAINT_LINEAR_GRADIENT = 0x1A04,
1.306 +
1.307 + /* Radial gradient paint parameters */
1.308 + VG_PAINT_RADIAL_GRADIENT = 0x1A05,
1.309 +
1.310 + /* Pattern paint parameters */
1.311 + VG_PAINT_PATTERN_TILING_MODE = 0x1A06
1.312 +} VGPaintParamType;
1.313 +
1.314 +typedef enum {
1.315 + VG_PAINT_TYPE_COLOR = 0x1B00,
1.316 + VG_PAINT_TYPE_LINEAR_GRADIENT = 0x1B01,
1.317 + VG_PAINT_TYPE_RADIAL_GRADIENT = 0x1B02,
1.318 + VG_PAINT_TYPE_PATTERN = 0x1B03
1.319 +} VGPaintType;
1.320 +
1.321 +typedef enum {
1.322 + VG_COLOR_RAMP_SPREAD_PAD = 0x1C00,
1.323 + VG_COLOR_RAMP_SPREAD_REPEAT = 0x1C01,
1.324 + VG_COLOR_RAMP_SPREAD_REFLECT = 0x1C02
1.325 +} VGColorRampSpreadMode;
1.326 +
1.327 +typedef enum {
1.328 + VG_TILE_FILL = 0x1D00,
1.329 + VG_TILE_PAD = 0x1D01,
1.330 + VG_TILE_REPEAT = 0x1D02,
1.331 + VG_TILE_REFLECT = 0x1D03
1.332 +} VGTilingMode;
1.333 +
1.334 +typedef enum {
1.335 + /* RGB{A,X} channel ordering */
1.336 + VG_IMAGE_FORMAT_INVALID = -1,
1.337 + VG_sRGBX_8888 = 0,
1.338 + VG_sRGBA_8888 = 1,
1.339 + VG_sRGBA_8888_PRE = 2,
1.340 + VG_sRGB_565 = 3,
1.341 + VG_sRGBA_5551 = 4,
1.342 + VG_sRGBA_4444 = 5,
1.343 + VG_sL_8 = 6,
1.344 + VG_lRGBX_8888 = 7,
1.345 + VG_lRGBA_8888 = 8,
1.346 + VG_lRGBA_8888_PRE = 9,
1.347 + VG_lL_8 = 10,
1.348 + VG_A_8 = 11,
1.349 + VG_BW_1 = 12,
1.350 +
1.351 + /* {A,X}RGB channel ordering */
1.352 + VG_sXRGB_8888 = 0 | (1 << 6),
1.353 + VG_sARGB_8888 = 1 | (1 << 6),
1.354 + VG_sARGB_8888_PRE = 2 | (1 << 6),
1.355 + VG_sARGB_1555 = 4 | (1 << 6),
1.356 + VG_sARGB_4444 = 5 | (1 << 6),
1.357 + VG_lXRGB_8888 = 7 | (1 << 6),
1.358 + VG_lARGB_8888 = 8 | (1 << 6),
1.359 + VG_lARGB_8888_PRE = 9 | (1 << 6),
1.360 +
1.361 + /* BGR{A,X} channel ordering */
1.362 + VG_sBGRX_8888 = 0 | (1 << 7),
1.363 + VG_sBGRA_8888 = 1 | (1 << 7),
1.364 + VG_sBGRA_8888_PRE = 2 | (1 << 7),
1.365 + VG_sBGR_565 = 3 | (1 << 7),
1.366 + VG_sBGRA_5551 = 4 | (1 << 7),
1.367 + VG_sBGRA_4444 = 5 | (1 << 7),
1.368 + VG_lBGRX_8888 = 7 | (1 << 7),
1.369 + VG_lBGRA_8888 = 8 | (1 << 7),
1.370 + VG_lBGRA_8888_PRE = 9 | (1 << 7),
1.371 +
1.372 + /* {A,X}BGR channel ordering */
1.373 + VG_sXBGR_8888 = 0 | (1 << 6) | (1 << 7),
1.374 + VG_sABGR_8888 = 1 | (1 << 6) | (1 << 7),
1.375 + VG_sABGR_8888_PRE = 2 | (1 << 6) | (1 << 7),
1.376 + VG_sABGR_1555 = 4 | (1 << 6) | (1 << 7),
1.377 + VG_sABGR_4444 = 5 | (1 << 6) | (1 << 7),
1.378 + VG_lXBGR_8888 = 7 | (1 << 6) | (1 << 7),
1.379 + VG_lABGR_8888 = 8 | (1 << 6) | (1 << 7),
1.380 + VG_lABGR_8888_PRE = 9 | (1 << 6) | (1 << 7)
1.381 +} VGImageFormat;
1.382 +
1.383 +typedef VGHandle VGImage;
1.384 +typedef int VGeglImageKHR;
1.385 +
1.386 +typedef enum {
1.387 + VG_IMAGE_QUALITY_NONANTIALIASED = (1 << 0),
1.388 + VG_IMAGE_QUALITY_FASTER = (1 << 1),
1.389 + VG_IMAGE_QUALITY_BETTER = (1 << 2)
1.390 +} VGImageQuality;
1.391 +
1.392 +typedef enum {
1.393 + VG_IMAGE_FORMAT = 0x1E00,
1.394 + VG_IMAGE_WIDTH = 0x1E01,
1.395 + VG_IMAGE_HEIGHT = 0x1E02
1.396 +} VGImageParamType;
1.397 +
1.398 +typedef enum {
1.399 + VG_DRAW_IMAGE_NORMAL = 0x1F00,
1.400 + VG_DRAW_IMAGE_MULTIPLY = 0x1F01,
1.401 + VG_DRAW_IMAGE_STENCIL = 0x1F02
1.402 +} VGImageMode;
1.403 +
1.404 +typedef enum {
1.405 + VG_RED = (1 << 3),
1.406 + VG_GREEN = (1 << 2),
1.407 + VG_BLUE = (1 << 1),
1.408 + VG_ALPHA = (1 << 0)
1.409 +} VGImageChannel;
1.410 +
1.411 +typedef enum {
1.412 + VG_BLEND_SRC = 0x2000,
1.413 + VG_BLEND_SRC_OVER = 0x2001,
1.414 + VG_BLEND_DST_OVER = 0x2002,
1.415 + VG_BLEND_SRC_IN = 0x2003,
1.416 + VG_BLEND_DST_IN = 0x2004,
1.417 + VG_BLEND_MULTIPLY = 0x2005,
1.418 + VG_BLEND_SCREEN = 0x2006,
1.419 + VG_BLEND_DARKEN = 0x2007,
1.420 + VG_BLEND_LIGHTEN = 0x2008,
1.421 + VG_BLEND_ADDITIVE = 0x2009
1.422 +} VGBlendMode;
1.423 +
1.424 +typedef enum {
1.425 + VG_IMAGE_FORMAT_QUERY = 0x2100,
1.426 + VG_PATH_DATATYPE_QUERY = 0x2101
1.427 +} VGHardwareQueryType;
1.428 +
1.429 +typedef enum {
1.430 + VG_HARDWARE_ACCELERATED = 0x2200,
1.431 + VG_HARDWARE_UNACCELERATED = 0x2201
1.432 +} VGHardwareQueryResult;
1.433 +
1.434 +typedef enum {
1.435 + VG_VENDOR = 0x2300,
1.436 + VG_RENDERER = 0x2301,
1.437 + VG_VERSION = 0x2302,
1.438 + VG_EXTENSIONS = 0x2303
1.439 +} VGStringID;
1.440 +
1.441 +/* Function Prototypes */
1.442 +
1.443 +#ifndef VG_API_CALL
1.444 +# if defined(SYMBIAN_VG_DLL_EXPORTS)
1.445 +# define VG_API_CALL EXPORT_C
1.446 +# else
1.447 +# define VG_API_CALL IMPORT_C
1.448 +# endif //defined(SYMBIAN_VG_DLL_EXPORTS)
1.449 +#endif
1.450 +
1.451 +VG_API_CALL VGErrorCode vgGetError(void);
1.452 +
1.453 +VG_API_CALL void vgFlush(void);
1.454 +VG_API_CALL void vgFinish(void);
1.455 +
1.456 +/* Getters and Setters */
1.457 +VG_API_CALL void vgSetf (VGParamType type, VGfloat value) __SOFTFP;
1.458 +VG_API_CALL void vgSeti (VGParamType type, VGint value);
1.459 +VG_API_CALL void vgSetfv(VGParamType type, VGint count,
1.460 + const VGfloat * values);
1.461 +VG_API_CALL void vgSetiv(VGParamType type, VGint count,
1.462 + const VGint * values);
1.463 +
1.464 +VG_API_CALL VGfloat vgGetf(VGParamType type) __SOFTFP;
1.465 +VG_API_CALL VGint vgGeti(VGParamType type);
1.466 +VG_API_CALL VGint vgGetVectorSize(VGParamType type);
1.467 +VG_API_CALL void vgGetfv(VGParamType type, VGint count, VGfloat * values);
1.468 +VG_API_CALL void vgGetiv(VGParamType type, VGint count, VGint * values);
1.469 +
1.470 +VG_API_CALL void vgSetParameterf(VGHandle object,
1.471 + VGint paramType,
1.472 + VGfloat value) __SOFTFP;
1.473 +VG_API_CALL void vgSetParameteri(VGHandle object,
1.474 + VGint paramType,
1.475 + VGint value);
1.476 +VG_API_CALL void vgSetParameterfv(VGHandle object,
1.477 + VGint paramType,
1.478 + VGint count, const VGfloat * values);
1.479 +VG_API_CALL void vgSetParameteriv(VGHandle object,
1.480 + VGint paramType,
1.481 + VGint count, const VGint * values);
1.482 +
1.483 +VG_API_CALL VGfloat vgGetParameterf(VGHandle object,
1.484 + VGint paramType) __SOFTFP;
1.485 +VG_API_CALL VGint vgGetParameteri(VGHandle object,
1.486 + VGint paramType);
1.487 +VG_API_CALL VGint vgGetParameterVectorSize(VGHandle object,
1.488 + VGint paramType);
1.489 +VG_API_CALL void vgGetParameterfv(VGHandle object,
1.490 + VGint paramType,
1.491 + VGint count, VGfloat * values);
1.492 +VG_API_CALL void vgGetParameteriv(VGHandle object,
1.493 + VGint paramType,
1.494 + VGint count, VGint * values);
1.495 +
1.496 +/* Matrix Manipulation */
1.497 +VG_API_CALL void vgLoadIdentity(void);
1.498 +VG_API_CALL void vgLoadMatrix(const VGfloat * m);
1.499 +VG_API_CALL void vgGetMatrix(VGfloat * m);
1.500 +VG_API_CALL void vgMultMatrix(const VGfloat * m);
1.501 +VG_API_CALL void vgTranslate(VGfloat tx, VGfloat ty) __SOFTFP;
1.502 +VG_API_CALL void vgScale(VGfloat sx, VGfloat sy) __SOFTFP;
1.503 +VG_API_CALL void vgShear(VGfloat shx, VGfloat shy) __SOFTFP;
1.504 +VG_API_CALL void vgRotate(VGfloat angle) __SOFTFP;
1.505 +
1.506 +/* Masking and Clearing */
1.507 +VG_API_CALL void vgMask(VGImage mask, VGMaskOperation operation,
1.508 + VGint x, VGint y, VGint width, VGint height);
1.509 +VG_API_CALL void vgClear(VGint x, VGint y, VGint width, VGint height);
1.510 +
1.511 +/* Paths */
1.512 +VG_API_CALL VGPath vgCreatePath(VGint pathFormat,
1.513 + VGPathDatatype datatype,
1.514 + VGfloat scale, VGfloat bias,
1.515 + VGint segmentCapacityHint,
1.516 + VGint coordCapacityHint,
1.517 + VGbitfield capabilities) __SOFTFP;
1.518 +VG_API_CALL void vgClearPath(VGPath path, VGbitfield capabilities);
1.519 +VG_API_CALL void vgDestroyPath(VGPath path);
1.520 +VG_API_CALL void vgRemovePathCapabilities(VGPath path,
1.521 + VGbitfield capabilities);
1.522 +VG_API_CALL VGbitfield vgGetPathCapabilities(VGPath path);
1.523 +VG_API_CALL void vgAppendPath(VGPath dstPath, VGPath srcPath);
1.524 +VG_API_CALL void vgAppendPathData(VGPath dstPath,
1.525 + VGint numSegments,
1.526 + const VGubyte * pathSegments,
1.527 + const void * pathData);
1.528 +VG_API_CALL void vgModifyPathCoords(VGPath dstPath, VGint startIndex,
1.529 + VGint numSegments,
1.530 + const void * pathData);
1.531 +VG_API_CALL void vgTransformPath(VGPath dstPath, VGPath srcPath);
1.532 +VG_API_CALL VGboolean vgInterpolatePath(VGPath dstPath,
1.533 + VGPath startPath,
1.534 + VGPath endPath,
1.535 + VGfloat amount) __SOFTFP;
1.536 +VG_API_CALL VGfloat vgPathLength(VGPath path,
1.537 + VGint startSegment, VGint numSegments) __SOFTFP;
1.538 +VG_API_CALL void vgPointAlongPath(VGPath path,
1.539 + VGint startSegment, VGint numSegments,
1.540 + VGfloat distance,
1.541 + VGfloat * x, VGfloat * y,
1.542 + VGfloat * tangentX, VGfloat * tangentY) __SOFTFP;
1.543 +VG_API_CALL void vgPathBounds(VGPath path,
1.544 + VGfloat * minX, VGfloat * minY,
1.545 + VGfloat * width, VGfloat * height);
1.546 +VG_API_CALL void vgPathTransformedBounds(VGPath path,
1.547 + VGfloat * minX, VGfloat * minY,
1.548 + VGfloat * width, VGfloat * height);
1.549 +VG_API_CALL void vgDrawPath(VGPath path, VGbitfield paintModes);
1.550 +
1.551 +/* Paint */
1.552 +VG_API_CALL VGPaint vgCreatePaint(void);
1.553 +VG_API_CALL void vgDestroyPaint(VGPaint paint);
1.554 +VG_API_CALL void vgSetPaint(VGPaint paint, VGbitfield paintModes);
1.555 +VG_API_CALL VGPaint vgGetPaint(VGPaintMode paintMode);
1.556 +VG_API_CALL void vgSetColor(VGPaint paint, VGuint rgba);
1.557 +VG_API_CALL VGuint vgGetColor(VGPaint paint);
1.558 +VG_API_CALL void vgPaintPattern(VGPaint paint, VGImage pattern);
1.559 +
1.560 +/* Images */
1.561 +VG_API_CALL VGImage vgCreateImage(VGImageFormat format,
1.562 + VGint width, VGint height,
1.563 + VGbitfield allowedQuality);
1.564 +VG_API_CALL void vgDestroyImage(VGImage image);
1.565 +VG_API_CALL void vgClearImage(VGImage image,
1.566 + VGint x, VGint y, VGint width, VGint height);
1.567 +VG_API_CALL void vgImageSubData(VGImage image,
1.568 + const void * data, VGint dataStride,
1.569 + VGImageFormat dataFormat,
1.570 + VGint x, VGint y, VGint width, VGint height);
1.571 +VG_API_CALL void vgGetImageSubData(VGImage image,
1.572 + void * data, VGint dataStride,
1.573 + VGImageFormat dataFormat,
1.574 + VGint x, VGint y,
1.575 + VGint width, VGint height);
1.576 +VG_API_CALL VGImage vgChildImage(VGImage parent,
1.577 + VGint x, VGint y, VGint width, VGint height);
1.578 +VG_API_CALL VGImage vgGetParent(VGImage image);
1.579 +VG_API_CALL void vgCopyImage(VGImage dst, VGint dx, VGint dy,
1.580 + VGImage src, VGint sx, VGint sy,
1.581 + VGint width, VGint height,
1.582 + VGboolean dither);
1.583 +VG_API_CALL void vgDrawImage(VGImage image);
1.584 +VG_API_CALL void vgSetPixels(VGint dx, VGint dy,
1.585 + VGImage src, VGint sx, VGint sy,
1.586 + VGint width, VGint height);
1.587 +VG_API_CALL void vgWritePixels(const void * data, VGint dataStride,
1.588 + VGImageFormat dataFormat,
1.589 + VGint dx, VGint dy,
1.590 + VGint width, VGint height);
1.591 +VG_API_CALL void vgGetPixels(VGImage dst, VGint dx, VGint dy,
1.592 + VGint sx, VGint sy,
1.593 + VGint width, VGint height);
1.594 +VG_API_CALL void vgReadPixels(void * data, VGint dataStride,
1.595 + VGImageFormat dataFormat,
1.596 + VGint sx, VGint sy,
1.597 + VGint width, VGint height);
1.598 +VG_API_CALL void vgCopyPixels(VGint dx, VGint dy,
1.599 + VGint sx, VGint sy,
1.600 + VGint width, VGint height);
1.601 +
1.602 +/* Image Filters */
1.603 +VG_API_CALL void vgColorMatrix(VGImage dst, VGImage src,
1.604 + const VGfloat * matrix);
1.605 +VG_API_CALL void vgConvolve(VGImage dst, VGImage src,
1.606 + VGint kernelWidth, VGint kernelHeight,
1.607 + VGint shiftX, VGint shiftY,
1.608 + const VGshort * kernel,
1.609 + VGfloat scale,
1.610 + VGfloat bias,
1.611 + VGTilingMode tilingMode) __SOFTFP;
1.612 +VG_API_CALL void vgSeparableConvolve(VGImage dst, VGImage src,
1.613 + VGint kernelWidth,
1.614 + VGint kernelHeight,
1.615 + VGint shiftX, VGint shiftY,
1.616 + const VGshort * kernelX,
1.617 + const VGshort * kernelY,
1.618 + VGfloat scale,
1.619 + VGfloat bias,
1.620 + VGTilingMode tilingMode) __SOFTFP;
1.621 +VG_API_CALL void vgGaussianBlur(VGImage dst, VGImage src,
1.622 + VGfloat stdDeviationX,
1.623 + VGfloat stdDeviationY,
1.624 + VGTilingMode tilingMode) __SOFTFP;
1.625 +VG_API_CALL void vgLookup(VGImage dst, VGImage src,
1.626 + const VGubyte * redLUT,
1.627 + const VGubyte * greenLUT,
1.628 + const VGubyte * blueLUT,
1.629 + const VGubyte * alphaLUT,
1.630 + VGboolean outputLinear,
1.631 + VGboolean outputPremultiplied);
1.632 +VG_API_CALL void vgLookupSingle(VGImage dst, VGImage src,
1.633 + const VGuint * lookupTable,
1.634 + VGImageChannel sourceChannel,
1.635 + VGboolean outputLinear,
1.636 + VGboolean outputPremultiplied);
1.637 +
1.638 +/* Hardware Queries */
1.639 +VG_API_CALL VGHardwareQueryResult vgHardwareQuery(VGHardwareQueryType key,
1.640 + VGint setting);
1.641 +
1.642 +/* Renderer and Extension Information */
1.643 +VG_API_CALL const VGubyte * vgGetString(VGStringID name);
1.644 +
1.645 +#ifdef __cplusplus
1.646 +} /* extern "C" */
1.647 +#endif
1.648 +
1.649 +#endif /*__VG_1_0_OPENVG_H */