1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/graphics/openvg/openvginterface/include/1.1/openvg.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,820 @@
1.4 +/*------------------------------------------------------------------------
1.5 + *
1.6 + * OpenVG 1.1 Reference Implementation
1.7 + * -------------------------------------
1.8 + *
1.9 + * Copyright (c) 2008-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.1 API.
1.33 + *//*-------------------------------------------------------------------*/
1.34 +
1.35 +#ifndef __VG_1_1_OPENVG_H
1.36 +#define __VG_1_1_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 to all 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 +#include <khronos_types.h>
1.65 +
1.66 +#define OPENVG_VERSION_1_0 1
1.67 +#define OPENVG_VERSION_1_0_1 1
1.68 +#define OPENVG_VERSION_1_1 2
1.69 +
1.70 +typedef khronos_float_t VGfloat;
1.71 +typedef khronos_int8_t VGbyte;
1.72 +typedef khronos_uint8_t VGubyte;
1.73 +typedef khronos_int16_t VGshort;
1.74 +typedef khronos_int32_t VGint;
1.75 +typedef khronos_uint32_t VGuint;
1.76 +typedef khronos_uint32_t VGbitfield;
1.77 +
1.78 +typedef enum {
1.79 + VG_FALSE = 0,
1.80 + VG_TRUE = 1
1.81 +} VGboolean;
1.82 +
1.83 +#define VG_MAXSHORT ((VGshort)((~((unsigned)0)) >> 1))
1.84 +#define VG_MAXINT ((VGint)((~((unsigned)0)) >> 1))
1.85 +
1.86 +typedef VGuint VGHandle;
1.87 +
1.88 +#define VG_INVALID_HANDLE ((VGHandle)0)
1.89 +
1.90 +typedef enum {
1.91 + VG_NO_ERROR = 0,
1.92 + VG_BAD_HANDLE_ERROR = 0x1000,
1.93 + VG_ILLEGAL_ARGUMENT_ERROR = 0x1001,
1.94 + VG_OUT_OF_MEMORY_ERROR = 0x1002,
1.95 + VG_PATH_CAPABILITY_ERROR = 0x1003,
1.96 + VG_UNSUPPORTED_IMAGE_FORMAT_ERROR = 0x1004,
1.97 + VG_UNSUPPORTED_PATH_FORMAT_ERROR = 0x1005,
1.98 + VG_IMAGE_IN_USE_ERROR = 0x1006,
1.99 + VG_NO_CONTEXT_ERROR = 0x1007
1.100 +} VGErrorCode;
1.101 +
1.102 +typedef enum {
1.103 + /* Mode settings */
1.104 + VG_MATRIX_MODE = 0x1100,
1.105 + VG_FILL_RULE = 0x1101,
1.106 + VG_IMAGE_QUALITY = 0x1102,
1.107 + VG_RENDERING_QUALITY = 0x1103,
1.108 + VG_BLEND_MODE = 0x1104,
1.109 + VG_IMAGE_MODE = 0x1105,
1.110 +
1.111 + /* Scissoring rectangles */
1.112 + VG_SCISSOR_RECTS = 0x1106,
1.113 +
1.114 + /* Color Transformation */
1.115 + VG_COLOR_TRANSFORM = 0x1170,
1.116 + VG_COLOR_TRANSFORM_VALUES = 0x1171,
1.117 +
1.118 + /* Stroke parameters */
1.119 + VG_STROKE_LINE_WIDTH = 0x1110,
1.120 + VG_STROKE_CAP_STYLE = 0x1111,
1.121 + VG_STROKE_JOIN_STYLE = 0x1112,
1.122 + VG_STROKE_MITER_LIMIT = 0x1113,
1.123 + VG_STROKE_DASH_PATTERN = 0x1114,
1.124 + VG_STROKE_DASH_PHASE = 0x1115,
1.125 + VG_STROKE_DASH_PHASE_RESET = 0x1116,
1.126 +
1.127 + /* Edge fill color for VG_TILE_FILL tiling mode */
1.128 + VG_TILE_FILL_COLOR = 0x1120,
1.129 +
1.130 + /* Color for vgClear */
1.131 + VG_CLEAR_COLOR = 0x1121,
1.132 +
1.133 + /* Glyph origin */
1.134 + VG_GLYPH_ORIGIN = 0x1122,
1.135 +
1.136 + /* Enable/disable alpha masking and scissoring */
1.137 + VG_MASKING = 0x1130,
1.138 + VG_SCISSORING = 0x1131,
1.139 +
1.140 + /* Pixel layout information */
1.141 + VG_PIXEL_LAYOUT = 0x1140,
1.142 + VG_SCREEN_LAYOUT = 0x1141,
1.143 +
1.144 + /* Source format selection for image filters */
1.145 + VG_FILTER_FORMAT_LINEAR = 0x1150,
1.146 + VG_FILTER_FORMAT_PREMULTIPLIED = 0x1151,
1.147 +
1.148 + /* Destination write enable mask for image filters */
1.149 + VG_FILTER_CHANNEL_MASK = 0x1152,
1.150 +
1.151 + /* Implementation limits (read-only) */
1.152 + VG_MAX_SCISSOR_RECTS = 0x1160,
1.153 + VG_MAX_DASH_COUNT = 0x1161,
1.154 + VG_MAX_KERNEL_SIZE = 0x1162,
1.155 + VG_MAX_SEPARABLE_KERNEL_SIZE = 0x1163,
1.156 + VG_MAX_COLOR_RAMP_STOPS = 0x1164,
1.157 + VG_MAX_IMAGE_WIDTH = 0x1165,
1.158 + VG_MAX_IMAGE_HEIGHT = 0x1166,
1.159 + VG_MAX_IMAGE_PIXELS = 0x1167,
1.160 + VG_MAX_IMAGE_BYTES = 0x1168,
1.161 + VG_MAX_FLOAT = 0x1169,
1.162 + VG_MAX_GAUSSIAN_STD_DEVIATION = 0x116A
1.163 +} VGParamType;
1.164 +
1.165 +typedef enum {
1.166 + VG_RENDERING_QUALITY_NONANTIALIASED = 0x1200,
1.167 + VG_RENDERING_QUALITY_FASTER = 0x1201,
1.168 + VG_RENDERING_QUALITY_BETTER = 0x1202 /* Default */
1.169 +} VGRenderingQuality;
1.170 +
1.171 +typedef enum {
1.172 + VG_PIXEL_LAYOUT_UNKNOWN = 0x1300,
1.173 + VG_PIXEL_LAYOUT_RGB_VERTICAL = 0x1301,
1.174 + VG_PIXEL_LAYOUT_BGR_VERTICAL = 0x1302,
1.175 + VG_PIXEL_LAYOUT_RGB_HORIZONTAL = 0x1303,
1.176 + VG_PIXEL_LAYOUT_BGR_HORIZONTAL = 0x1304
1.177 +} VGPixelLayout;
1.178 +
1.179 +typedef enum {
1.180 + VG_MATRIX_PATH_USER_TO_SURFACE = 0x1400,
1.181 + VG_MATRIX_IMAGE_USER_TO_SURFACE = 0x1401,
1.182 + VG_MATRIX_FILL_PAINT_TO_USER = 0x1402,
1.183 + VG_MATRIX_STROKE_PAINT_TO_USER = 0x1403,
1.184 + VG_MATRIX_GLYPH_USER_TO_SURFACE = 0x1404
1.185 +} VGMatrixMode;
1.186 +
1.187 +typedef enum {
1.188 + VG_CLEAR_MASK = 0x1500,
1.189 + VG_FILL_MASK = 0x1501,
1.190 + VG_SET_MASK = 0x1502,
1.191 + VG_UNION_MASK = 0x1503,
1.192 + VG_INTERSECT_MASK = 0x1504,
1.193 + VG_SUBTRACT_MASK = 0x1505
1.194 +} VGMaskOperation;
1.195 +
1.196 +#define VG_PATH_FORMAT_STANDARD 0
1.197 +
1.198 +typedef enum {
1.199 + VG_PATH_DATATYPE_INVALID = -1,
1.200 + VG_PATH_DATATYPE_S_8 = 0,
1.201 + VG_PATH_DATATYPE_S_16 = 1,
1.202 + VG_PATH_DATATYPE_S_32 = 2,
1.203 + VG_PATH_DATATYPE_F = 3
1.204 +} VGPathDatatype;
1.205 +
1.206 +typedef enum {
1.207 + VG_ABSOLUTE = 0,
1.208 + VG_RELATIVE = 1
1.209 +} VGPathAbsRel;
1.210 +
1.211 +typedef enum {
1.212 + VG_CLOSE_PATH = ( 0 << 1),
1.213 + VG_MOVE_TO = ( 1 << 1),
1.214 + VG_LINE_TO = ( 2 << 1),
1.215 + VG_HLINE_TO = ( 3 << 1),
1.216 + VG_VLINE_TO = ( 4 << 1),
1.217 + VG_QUAD_TO = ( 5 << 1),
1.218 + VG_CUBIC_TO = ( 6 << 1),
1.219 + VG_SQUAD_TO = ( 7 << 1),
1.220 + VG_SCUBIC_TO = ( 8 << 1),
1.221 + VG_SCCWARC_TO = ( 9 << 1),
1.222 + VG_SCWARC_TO = (10 << 1),
1.223 + VG_LCCWARC_TO = (11 << 1),
1.224 + VG_LCWARC_TO = (12 << 1)
1.225 +} VGPathSegment;
1.226 +
1.227 +typedef enum {
1.228 + VG_MOVE_TO_ABS = VG_MOVE_TO | VG_ABSOLUTE,
1.229 + VG_MOVE_TO_REL = VG_MOVE_TO | VG_RELATIVE,
1.230 + VG_LINE_TO_ABS = VG_LINE_TO | VG_ABSOLUTE,
1.231 + VG_LINE_TO_REL = VG_LINE_TO | VG_RELATIVE,
1.232 + VG_HLINE_TO_ABS = VG_HLINE_TO | VG_ABSOLUTE,
1.233 + VG_HLINE_TO_REL = VG_HLINE_TO | VG_RELATIVE,
1.234 + VG_VLINE_TO_ABS = VG_VLINE_TO | VG_ABSOLUTE,
1.235 + VG_VLINE_TO_REL = VG_VLINE_TO | VG_RELATIVE,
1.236 + VG_QUAD_TO_ABS = VG_QUAD_TO | VG_ABSOLUTE,
1.237 + VG_QUAD_TO_REL = VG_QUAD_TO | VG_RELATIVE,
1.238 + VG_CUBIC_TO_ABS = VG_CUBIC_TO | VG_ABSOLUTE,
1.239 + VG_CUBIC_TO_REL = VG_CUBIC_TO | VG_RELATIVE,
1.240 + VG_SQUAD_TO_ABS = VG_SQUAD_TO | VG_ABSOLUTE,
1.241 + VG_SQUAD_TO_REL = VG_SQUAD_TO | VG_RELATIVE,
1.242 + VG_SCUBIC_TO_ABS = VG_SCUBIC_TO | VG_ABSOLUTE,
1.243 + VG_SCUBIC_TO_REL = VG_SCUBIC_TO | VG_RELATIVE,
1.244 + VG_SCCWARC_TO_ABS = VG_SCCWARC_TO | VG_ABSOLUTE,
1.245 + VG_SCCWARC_TO_REL = VG_SCCWARC_TO | VG_RELATIVE,
1.246 + VG_SCWARC_TO_ABS = VG_SCWARC_TO | VG_ABSOLUTE,
1.247 + VG_SCWARC_TO_REL = VG_SCWARC_TO | VG_RELATIVE,
1.248 + VG_LCCWARC_TO_ABS = VG_LCCWARC_TO | VG_ABSOLUTE,
1.249 + VG_LCCWARC_TO_REL = VG_LCCWARC_TO | VG_RELATIVE,
1.250 + VG_LCWARC_TO_ABS = VG_LCWARC_TO | VG_ABSOLUTE,
1.251 + VG_LCWARC_TO_REL = VG_LCWARC_TO | VG_RELATIVE
1.252 +} VGPathCommand;
1.253 +
1.254 +typedef VGHandle VGPath;
1.255 +
1.256 +typedef enum {
1.257 + VG_PATH_CAPABILITY_APPEND_FROM = (1 << 0),
1.258 + VG_PATH_CAPABILITY_APPEND_TO = (1 << 1),
1.259 + VG_PATH_CAPABILITY_MODIFY = (1 << 2),
1.260 + VG_PATH_CAPABILITY_TRANSFORM_FROM = (1 << 3),
1.261 + VG_PATH_CAPABILITY_TRANSFORM_TO = (1 << 4),
1.262 + VG_PATH_CAPABILITY_INTERPOLATE_FROM = (1 << 5),
1.263 + VG_PATH_CAPABILITY_INTERPOLATE_TO = (1 << 6),
1.264 + VG_PATH_CAPABILITY_PATH_LENGTH = (1 << 7),
1.265 + VG_PATH_CAPABILITY_POINT_ALONG_PATH = (1 << 8),
1.266 + VG_PATH_CAPABILITY_TANGENT_ALONG_PATH = (1 << 9),
1.267 + VG_PATH_CAPABILITY_PATH_BOUNDS = (1 << 10),
1.268 + VG_PATH_CAPABILITY_PATH_TRANSFORMED_BOUNDS = (1 << 11),
1.269 + VG_PATH_CAPABILITY_ALL = (1 << 12) - 1
1.270 +} VGPathCapabilities;
1.271 +
1.272 +typedef enum {
1.273 + VG_PATH_FORMAT = 0x1600,
1.274 + VG_PATH_DATATYPE = 0x1601,
1.275 + VG_PATH_SCALE = 0x1602,
1.276 + VG_PATH_BIAS = 0x1603,
1.277 + VG_PATH_NUM_SEGMENTS = 0x1604,
1.278 + VG_PATH_NUM_COORDS = 0x1605
1.279 +} VGPathParamType;
1.280 +
1.281 +typedef enum {
1.282 + VG_CAP_BUTT = 0x1700,
1.283 + VG_CAP_ROUND = 0x1701,
1.284 + VG_CAP_SQUARE = 0x1702
1.285 +} VGCapStyle;
1.286 +
1.287 +typedef enum {
1.288 + VG_JOIN_MITER = 0x1800,
1.289 + VG_JOIN_ROUND = 0x1801,
1.290 + VG_JOIN_BEVEL = 0x1802
1.291 +} VGJoinStyle;
1.292 +
1.293 +typedef enum {
1.294 + VG_EVEN_ODD = 0x1900,
1.295 + VG_NON_ZERO = 0x1901
1.296 +} VGFillRule;
1.297 +
1.298 +typedef enum {
1.299 + VG_STROKE_PATH = (1 << 0),
1.300 + VG_FILL_PATH = (1 << 1)
1.301 +} VGPaintMode;
1.302 +
1.303 +typedef VGHandle VGPaint;
1.304 +
1.305 +typedef enum {
1.306 + /* Color paint parameters */
1.307 + VG_PAINT_TYPE = 0x1A00,
1.308 + VG_PAINT_COLOR = 0x1A01,
1.309 + VG_PAINT_COLOR_RAMP_SPREAD_MODE = 0x1A02,
1.310 + VG_PAINT_COLOR_RAMP_PREMULTIPLIED = 0x1A07,
1.311 + VG_PAINT_COLOR_RAMP_STOPS = 0x1A03,
1.312 +
1.313 + /* Linear gradient paint parameters */
1.314 + VG_PAINT_LINEAR_GRADIENT = 0x1A04,
1.315 +
1.316 + /* Radial gradient paint parameters */
1.317 + VG_PAINT_RADIAL_GRADIENT = 0x1A05,
1.318 +
1.319 + /* Pattern paint parameters */
1.320 + VG_PAINT_PATTERN_TILING_MODE = 0x1A06
1.321 +} VGPaintParamType;
1.322 +
1.323 +typedef enum {
1.324 + VG_PAINT_TYPE_COLOR = 0x1B00,
1.325 + VG_PAINT_TYPE_LINEAR_GRADIENT = 0x1B01,
1.326 + VG_PAINT_TYPE_RADIAL_GRADIENT = 0x1B02,
1.327 + VG_PAINT_TYPE_PATTERN = 0x1B03
1.328 +} VGPaintType;
1.329 +
1.330 +typedef enum {
1.331 + VG_COLOR_RAMP_SPREAD_PAD = 0x1C00,
1.332 + VG_COLOR_RAMP_SPREAD_REPEAT = 0x1C01,
1.333 + VG_COLOR_RAMP_SPREAD_REFLECT = 0x1C02
1.334 +} VGColorRampSpreadMode;
1.335 +
1.336 +typedef enum {
1.337 + VG_TILE_FILL = 0x1D00,
1.338 + VG_TILE_PAD = 0x1D01,
1.339 + VG_TILE_REPEAT = 0x1D02,
1.340 + VG_TILE_REFLECT = 0x1D03
1.341 +} VGTilingMode;
1.342 +
1.343 +typedef enum {
1.344 + /* RGB{A,X} channel ordering */
1.345 + VG_IMAGE_FORMAT_INVALID = -1,
1.346 + VG_sRGBX_8888 = 0,
1.347 + VG_sRGBA_8888 = 1,
1.348 + VG_sRGBA_8888_PRE = 2,
1.349 + VG_sRGB_565 = 3,
1.350 + VG_sRGBA_5551 = 4,
1.351 + VG_sRGBA_4444 = 5,
1.352 + VG_sL_8 = 6,
1.353 + VG_lRGBX_8888 = 7,
1.354 + VG_lRGBA_8888 = 8,
1.355 + VG_lRGBA_8888_PRE = 9,
1.356 + VG_lL_8 = 10,
1.357 + VG_A_8 = 11,
1.358 + VG_BW_1 = 12,
1.359 + VG_A_1 = 13,
1.360 + VG_A_4 = 14,
1.361 +
1.362 + /* {A,X}RGB channel ordering */
1.363 + VG_sXRGB_8888 = 0 | (1 << 6),
1.364 + VG_sARGB_8888 = 1 | (1 << 6),
1.365 + VG_sARGB_8888_PRE = 2 | (1 << 6),
1.366 + VG_sARGB_1555 = 4 | (1 << 6),
1.367 + VG_sARGB_4444 = 5 | (1 << 6),
1.368 + VG_lXRGB_8888 = 7 | (1 << 6),
1.369 + VG_lARGB_8888 = 8 | (1 << 6),
1.370 + VG_lARGB_8888_PRE = 9 | (1 << 6),
1.371 +
1.372 + /* BGR{A,X} channel ordering */
1.373 + VG_sBGRX_8888 = 0 | (1 << 7),
1.374 + VG_sBGRA_8888 = 1 | (1 << 7),
1.375 + VG_sBGRA_8888_PRE = 2 | (1 << 7),
1.376 + VG_sBGR_565 = 3 | (1 << 7),
1.377 + VG_sBGRA_5551 = 4 | (1 << 7),
1.378 + VG_sBGRA_4444 = 5 | (1 << 7),
1.379 + VG_lBGRX_8888 = 7 | (1 << 7),
1.380 + VG_lBGRA_8888 = 8 | (1 << 7),
1.381 + VG_lBGRA_8888_PRE = 9 | (1 << 7),
1.382 +
1.383 + /* {A,X}BGR channel ordering */
1.384 + VG_sXBGR_8888 = 0 | (1 << 6) | (1 << 7),
1.385 + VG_sABGR_8888 = 1 | (1 << 6) | (1 << 7),
1.386 + VG_sABGR_8888_PRE = 2 | (1 << 6) | (1 << 7),
1.387 + VG_sABGR_1555 = 4 | (1 << 6) | (1 << 7),
1.388 + VG_sABGR_4444 = 5 | (1 << 6) | (1 << 7),
1.389 + VG_lXBGR_8888 = 7 | (1 << 6) | (1 << 7),
1.390 + VG_lABGR_8888 = 8 | (1 << 6) | (1 << 7),
1.391 + VG_lABGR_8888_PRE = 9 | (1 << 6) | (1 << 7)
1.392 +} VGImageFormat;
1.393 +
1.394 +typedef VGHandle VGImage;
1.395 +typedef int VGeglImageKHR;
1.396 +
1.397 +typedef enum {
1.398 + VG_IMAGE_QUALITY_NONANTIALIASED = (1 << 0),
1.399 + VG_IMAGE_QUALITY_FASTER = (1 << 1),
1.400 + VG_IMAGE_QUALITY_BETTER = (1 << 2)
1.401 +} VGImageQuality;
1.402 +
1.403 +typedef enum {
1.404 + VG_IMAGE_FORMAT = 0x1E00,
1.405 + VG_IMAGE_WIDTH = 0x1E01,
1.406 + VG_IMAGE_HEIGHT = 0x1E02
1.407 +} VGImageParamType;
1.408 +
1.409 +typedef enum {
1.410 + VG_DRAW_IMAGE_NORMAL = 0x1F00,
1.411 + VG_DRAW_IMAGE_MULTIPLY = 0x1F01,
1.412 + VG_DRAW_IMAGE_STENCIL = 0x1F02
1.413 +} VGImageMode;
1.414 +
1.415 +typedef enum {
1.416 + VG_RED = (1 << 3),
1.417 + VG_GREEN = (1 << 2),
1.418 + VG_BLUE = (1 << 1),
1.419 + VG_ALPHA = (1 << 0)
1.420 +} VGImageChannel;
1.421 +
1.422 +typedef enum {
1.423 + VG_BLEND_SRC = 0x2000,
1.424 + VG_BLEND_SRC_OVER = 0x2001,
1.425 + VG_BLEND_DST_OVER = 0x2002,
1.426 + VG_BLEND_SRC_IN = 0x2003,
1.427 + VG_BLEND_DST_IN = 0x2004,
1.428 + VG_BLEND_MULTIPLY = 0x2005,
1.429 + VG_BLEND_SCREEN = 0x2006,
1.430 + VG_BLEND_DARKEN = 0x2007,
1.431 + VG_BLEND_LIGHTEN = 0x2008,
1.432 + VG_BLEND_ADDITIVE = 0x2009
1.433 +} VGBlendMode;
1.434 +
1.435 +typedef enum {
1.436 + VG_IMAGE_FORMAT_QUERY = 0x2100,
1.437 + VG_PATH_DATATYPE_QUERY = 0x2101
1.438 +} VGHardwareQueryType;
1.439 +
1.440 +typedef enum {
1.441 + VG_HARDWARE_ACCELERATED = 0x2200,
1.442 + VG_HARDWARE_UNACCELERATED = 0x2201
1.443 +} VGHardwareQueryResult;
1.444 +
1.445 +typedef enum {
1.446 + VG_VENDOR = 0x2300,
1.447 + VG_RENDERER = 0x2301,
1.448 + VG_VERSION = 0x2302,
1.449 + VG_EXTENSIONS = 0x2303
1.450 +} VGStringID;
1.451 +
1.452 +typedef enum {
1.453 + VG_FONT_NUM_GLYPHS = 0x2F00
1.454 +} VGFontParamType;
1.455 +
1.456 +
1.457 +/* Function Prototypes */
1.458 +
1.459 +#ifndef VG_API_CALL
1.460 +# if defined(SYMBIAN_VG_DLL_EXPORTS)
1.461 +# define VG_API_CALL EXPORT_C
1.462 +# else
1.463 +# define VG_API_CALL IMPORT_C
1.464 +# endif //defined(SYMBIAN_VG_DLL_EXPORTS)
1.465 +#endif
1.466 +#ifndef VG_APIENTRY
1.467 +#define VG_APIENTRY /* nothing */
1.468 +#endif
1.469 +#ifndef VG_APIEXIT
1.470 +#define VG_APIEXIT __SOFTFP
1.471 +#endif
1.472 +
1.473 +VG_API_CALL VGErrorCode VG_APIENTRY
1.474 + vgGetError(void) VG_APIEXIT;
1.475 +
1.476 +VG_API_CALL void VG_APIENTRY
1.477 + vgFlush(void) VG_APIEXIT;
1.478 +VG_API_CALL void VG_APIENTRY
1.479 + vgFinish(void) VG_APIEXIT;
1.480 +
1.481 +/* Getters and Setters */
1.482 +VG_API_CALL void VG_APIENTRY
1.483 + vgSetf (VGParamType type, VGfloat value) VG_APIEXIT;
1.484 +VG_API_CALL void VG_APIENTRY
1.485 + vgSeti (VGParamType type, VGint value) VG_APIEXIT;
1.486 +VG_API_CALL void VG_APIENTRY
1.487 + vgSetfv(VGParamType type, VGint count,
1.488 + const VGfloat * values) VG_APIEXIT;
1.489 +VG_API_CALL void VG_APIENTRY
1.490 + vgSetiv(VGParamType type, VGint count,
1.491 + const VGint * values) VG_APIEXIT;
1.492 +VG_API_CALL VGfloat VG_APIENTRY
1.493 + vgGetf(VGParamType type) VG_APIEXIT;
1.494 +VG_API_CALL VGint VG_APIENTRY
1.495 + vgGeti(VGParamType type) VG_APIEXIT;
1.496 +VG_API_CALL VGint VG_APIENTRY
1.497 + vgGetVectorSize(VGParamType type) VG_APIEXIT;
1.498 +VG_API_CALL void VG_APIENTRY
1.499 + vgGetfv(VGParamType type, VGint count,
1.500 + VGfloat * values) VG_APIEXIT;
1.501 +VG_API_CALL void VG_APIENTRY
1.502 + vgGetiv(VGParamType type, VGint count,
1.503 + VGint * values) VG_APIEXIT;
1.504 +VG_API_CALL void VG_APIENTRY
1.505 + vgSetParameterf(VGHandle object,
1.506 + VGint paramType,
1.507 + VGfloat value) VG_APIEXIT;
1.508 +VG_API_CALL void VG_APIENTRY
1.509 + vgSetParameteri(VGHandle object,
1.510 + VGint paramType,
1.511 + VGint value) VG_APIEXIT;
1.512 +VG_API_CALL void VG_APIENTRY
1.513 + vgSetParameterfv(VGHandle object,
1.514 + VGint paramType,
1.515 + VGint count,
1.516 + const VGfloat * values) VG_APIEXIT;
1.517 +VG_API_CALL void VG_APIENTRY
1.518 + vgSetParameteriv(VGHandle object,
1.519 + VGint paramType,
1.520 + VGint count,
1.521 + const VGint * values) VG_APIEXIT;
1.522 +
1.523 +VG_API_CALL VGfloat VG_APIENTRY
1.524 + vgGetParameterf(VGHandle object,
1.525 + VGint paramType) VG_APIEXIT;
1.526 +VG_API_CALL VGint VG_APIENTRY
1.527 + vgGetParameteri(VGHandle object,
1.528 + VGint paramType) VG_APIEXIT;
1.529 +VG_API_CALL VGint VG_APIENTRY
1.530 + vgGetParameterVectorSize(VGHandle object,
1.531 + VGint paramType) VG_APIEXIT;
1.532 +VG_API_CALL void VG_APIENTRY
1.533 + vgGetParameterfv(VGHandle object,
1.534 + VGint paramType,
1.535 + VGint count,
1.536 + VGfloat * values) VG_APIEXIT;
1.537 +VG_API_CALL void VG_APIENTRY
1.538 + vgGetParameteriv(VGHandle object,
1.539 + VGint paramType,
1.540 + VGint count,
1.541 + VGint * values) VG_APIEXIT;
1.542 +
1.543 +/* Matrix Manipulation */
1.544 +VG_API_CALL void VG_APIENTRY
1.545 + vgLoadIdentity(void) VG_APIEXIT;
1.546 +VG_API_CALL void VG_APIENTRY
1.547 + vgLoadMatrix(const VGfloat * m) VG_APIEXIT;
1.548 +VG_API_CALL void VG_APIENTRY
1.549 + vgGetMatrix(VGfloat * m) VG_APIEXIT;
1.550 +VG_API_CALL void VG_APIENTRY
1.551 + vgMultMatrix(const VGfloat * m) VG_APIEXIT;
1.552 +VG_API_CALL void VG_APIENTRY
1.553 + vgTranslate(VGfloat tx, VGfloat ty) VG_APIEXIT;
1.554 +VG_API_CALL void VG_APIENTRY
1.555 + vgScale(VGfloat sx, VGfloat sy) VG_APIEXIT;
1.556 +VG_API_CALL void VG_APIENTRY
1.557 + vgShear(VGfloat shx, VGfloat shy) VG_APIEXIT;
1.558 +VG_API_CALL void VG_APIENTRY
1.559 + vgRotate(VGfloat angle) VG_APIEXIT;
1.560 +
1.561 +/* Masking and Clearing */
1.562 +typedef VGHandle VGMaskLayer;
1.563 +
1.564 +VG_API_CALL void VG_APIENTRY
1.565 + vgMask(VGHandle mask, VGMaskOperation operation,
1.566 + VGint x, VGint y,
1.567 + VGint width, VGint height) VG_APIEXIT;
1.568 +VG_API_CALL void VG_APIENTRY
1.569 + vgRenderToMask(VGPath path,
1.570 + VGbitfield paintModes,
1.571 + VGMaskOperation operation) VG_APIEXIT;
1.572 +VG_API_CALL VGMaskLayer VG_APIENTRY
1.573 + vgCreateMaskLayer(VGint width, VGint height) VG_APIEXIT;
1.574 +VG_API_CALL void VG_APIENTRY
1.575 + vgDestroyMaskLayer(VGMaskLayer maskLayer) VG_APIEXIT;
1.576 +VG_API_CALL void VG_APIENTRY
1.577 + vgFillMaskLayer(VGMaskLayer maskLayer,
1.578 + VGint x, VGint y,
1.579 + VGint width, VGint height,
1.580 + VGfloat value) VG_APIEXIT;
1.581 +VG_API_CALL void VG_APIENTRY
1.582 + vgCopyMask(VGMaskLayer maskLayer,
1.583 + VGint sx, VGint sy,
1.584 + VGint dx, VGint dy,
1.585 + VGint width, VGint height) VG_APIEXIT;
1.586 +VG_API_CALL void VG_APIENTRY
1.587 + vgClear(VGint x, VGint y,
1.588 + VGint width, VGint height) VG_APIEXIT;
1.589 +
1.590 +/* Paths */
1.591 +VG_API_CALL VGPath VG_APIENTRY
1.592 + vgCreatePath(VGint pathFormat,
1.593 + VGPathDatatype datatype,
1.594 + VGfloat scale, VGfloat bias,
1.595 + VGint segmentCapacityHint,
1.596 + VGint coordCapacityHint,
1.597 + VGbitfield capabilities) VG_APIEXIT;
1.598 +VG_API_CALL void VG_APIENTRY
1.599 + vgClearPath(VGPath path, VGbitfield capabilities) VG_APIEXIT;
1.600 +VG_API_CALL void VG_APIENTRY
1.601 + vgDestroyPath(VGPath path) VG_APIEXIT;
1.602 +VG_API_CALL void VG_APIENTRY
1.603 + vgRemovePathCapabilities(VGPath path,
1.604 + VGbitfield capabilities) VG_APIEXIT;
1.605 +VG_API_CALL VGbitfield VG_APIENTRY
1.606 + vgGetPathCapabilities(VGPath path) VG_APIEXIT;
1.607 +VG_API_CALL void VG_APIENTRY
1.608 + vgAppendPath(VGPath dstPath, VGPath srcPath) VG_APIEXIT;
1.609 +VG_API_CALL void VG_APIENTRY
1.610 + vgAppendPathData(VGPath dstPath,
1.611 + VGint numSegments,
1.612 + const VGubyte * pathSegments,
1.613 + const void * pathData) VG_APIEXIT;
1.614 +VG_API_CALL void VG_APIENTRY
1.615 + vgModifyPathCoords(VGPath dstPath,
1.616 + VGint startIndex,
1.617 + VGint numSegments,
1.618 + const void * pathData) VG_APIEXIT;
1.619 +VG_API_CALL void VG_APIENTRY
1.620 + vgTransformPath(VGPath dstPath, VGPath srcPath) VG_APIEXIT;
1.621 +VG_API_CALL VGboolean VG_APIENTRY
1.622 + vgInterpolatePath(VGPath dstPath,
1.623 + VGPath startPath,
1.624 + VGPath endPath,
1.625 + VGfloat amount) VG_APIEXIT;
1.626 +VG_API_CALL VGfloat VG_APIENTRY
1.627 + vgPathLength(VGPath path,
1.628 + VGint startSegment,
1.629 + VGint numSegments) VG_APIEXIT;
1.630 +VG_API_CALL void VG_APIENTRY
1.631 + vgPointAlongPath(VGPath path,
1.632 + VGint startSegment,
1.633 + VGint numSegments,
1.634 + VGfloat distance,
1.635 + VGfloat * x, VGfloat * y,
1.636 + VGfloat * tangentX,
1.637 + VGfloat * tangentY) VG_APIEXIT;
1.638 +VG_API_CALL void VG_APIENTRY
1.639 + vgPathBounds(VGPath path,
1.640 + VGfloat * minX,
1.641 + VGfloat * minY,
1.642 + VGfloat * width,
1.643 + VGfloat * height) VG_APIEXIT;
1.644 +VG_API_CALL void VG_APIENTRY
1.645 + vgPathTransformedBounds(VGPath path,
1.646 + VGfloat * minX,
1.647 + VGfloat * minY,
1.648 + VGfloat * width,
1.649 + VGfloat * height) VG_APIEXIT;
1.650 +VG_API_CALL void VG_APIENTRY
1.651 + vgDrawPath(VGPath path, VGbitfield paintModes) VG_APIEXIT;
1.652 +
1.653 +/* Paint */
1.654 +VG_API_CALL VGPaint VG_APIENTRY
1.655 + vgCreatePaint(void) VG_APIEXIT;
1.656 +VG_API_CALL void VG_APIENTRY
1.657 + vgDestroyPaint(VGPaint paint) VG_APIEXIT;
1.658 +VG_API_CALL void VG_APIENTRY
1.659 + vgSetPaint(VGPaint paint, VGbitfield paintModes) VG_APIEXIT;
1.660 +VG_API_CALL VGPaint VG_APIENTRY
1.661 + vgGetPaint(VGPaintMode paintMode) VG_APIEXIT;
1.662 +VG_API_CALL void VG_APIENTRY
1.663 + vgSetColor(VGPaint paint, VGuint rgba) VG_APIEXIT;
1.664 +VG_API_CALL VGuint VG_APIENTRY
1.665 + vgGetColor(VGPaint paint) VG_APIEXIT;
1.666 +VG_API_CALL void VG_APIENTRY
1.667 + vgPaintPattern(VGPaint paint, VGImage pattern) VG_APIEXIT;
1.668 +
1.669 +/* Images */
1.670 +VG_API_CALL VGImage VG_APIENTRY
1.671 + vgCreateImage(VGImageFormat format,
1.672 + VGint width, VGint height,
1.673 + VGbitfield allowedQuality) VG_APIEXIT;
1.674 +VG_API_CALL void VG_APIENTRY
1.675 + vgDestroyImage(VGImage image) VG_APIEXIT;
1.676 +VG_API_CALL void VG_APIENTRY
1.677 + vgClearImage(VGImage image,
1.678 + VGint x, VGint y,
1.679 + VGint width, VGint height) VG_APIEXIT;
1.680 +VG_API_CALL void VG_APIENTRY
1.681 + vgImageSubData(VGImage image,
1.682 + const void * data,
1.683 + VGint dataStride,
1.684 + VGImageFormat dataFormat,
1.685 + VGint x, VGint y,
1.686 + VGint width, VGint height) VG_APIEXIT;
1.687 +VG_API_CALL void VG_APIENTRY
1.688 + vgGetImageSubData(VGImage image,
1.689 + void * data,
1.690 + VGint dataStride,
1.691 + VGImageFormat dataFormat,
1.692 + VGint x, VGint y,
1.693 + VGint width, VGint height) VG_APIEXIT;
1.694 +VG_API_CALL VGImage VG_APIENTRY
1.695 + vgChildImage(VGImage parent,
1.696 + VGint x, VGint y,
1.697 + VGint width, VGint height) VG_APIEXIT;
1.698 +VG_API_CALL VGImage VG_APIENTRY
1.699 + vgGetParent(VGImage image) VG_APIEXIT;
1.700 +VG_API_CALL void VG_APIENTRY
1.701 + vgCopyImage(VGImage dst, VGint dx, VGint dy,
1.702 + VGImage src, VGint sx, VGint sy,
1.703 + VGint width, VGint height,
1.704 + VGboolean dither) VG_APIEXIT;
1.705 +VG_API_CALL void VG_APIENTRY
1.706 + vgDrawImage(VGImage image) VG_APIEXIT;
1.707 +VG_API_CALL void VG_APIENTRY
1.708 + vgSetPixels(VGint dx, VGint dy,
1.709 + VGImage src, VGint sx, VGint sy,
1.710 + VGint width, VGint height) VG_APIEXIT;
1.711 +VG_API_CALL void VG_APIENTRY
1.712 + vgWritePixels(const void * data, VGint dataStride,
1.713 + VGImageFormat dataFormat,
1.714 + VGint dx, VGint dy,
1.715 + VGint width, VGint height) VG_APIEXIT;
1.716 +VG_API_CALL void VG_APIENTRY
1.717 + vgGetPixels(VGImage dst, VGint dx, VGint dy,
1.718 + VGint sx, VGint sy,
1.719 + VGint width, VGint height) VG_APIEXIT;
1.720 +VG_API_CALL void VG_APIENTRY
1.721 + vgReadPixels(void * data, VGint dataStride,
1.722 + VGImageFormat dataFormat,
1.723 + VGint sx, VGint sy,
1.724 + VGint width, VGint height) VG_APIEXIT;
1.725 +VG_API_CALL void VG_APIENTRY
1.726 + vgCopyPixels(VGint dx, VGint dy,
1.727 + VGint sx, VGint sy,
1.728 + VGint width, VGint height) VG_APIEXIT;
1.729 +
1.730 +/* Text */
1.731 +typedef VGHandle VGFont;
1.732 +
1.733 +VG_API_CALL VGFont VG_APIENTRY
1.734 + vgCreateFont(VGint glyphCapacityHint) VG_APIEXIT;
1.735 +VG_API_CALL void VG_APIENTRY
1.736 + vgDestroyFont(VGFont font) VG_APIEXIT;
1.737 +VG_API_CALL void VG_APIENTRY
1.738 + vgSetGlyphToPath(VGFont font,
1.739 + VGuint glyphIndex,
1.740 + VGPath path,
1.741 + VGboolean isHinted,
1.742 + const VGfloat glyphOrigin [2],
1.743 + const VGfloat escapement[2]) VG_APIEXIT;
1.744 +VG_API_CALL void VG_APIENTRY
1.745 + vgSetGlyphToImage(VGFont font,
1.746 + VGuint glyphIndex,
1.747 + VGImage image,
1.748 + const VGfloat glyphOrigin [2],
1.749 + const VGfloat escapement[2]) VG_APIEXIT;
1.750 +VG_API_CALL void VG_APIENTRY
1.751 + vgClearGlyph(VGFont font,
1.752 + VGuint glyphIndex) VG_APIEXIT;
1.753 +VG_API_CALL void VG_APIENTRY
1.754 + vgDrawGlyph(VGFont font,
1.755 + VGuint glyphIndex,
1.756 + VGbitfield paintModes,
1.757 + VGboolean allowAutoHinting) VG_APIEXIT;
1.758 +VG_API_CALL void VG_APIENTRY
1.759 + vgDrawGlyphs(VGFont font,
1.760 + VGint glyphCount,
1.761 + const VGuint * glyphIndices,
1.762 + const VGfloat * adjustments_x,
1.763 + const VGfloat * adjustments_y,
1.764 + VGbitfield paintModes,
1.765 + VGboolean allowAutoHinting) VG_APIEXIT;
1.766 +
1.767 +/* Image Filters */
1.768 +VG_API_CALL void VG_APIENTRY
1.769 + vgColorMatrix(VGImage dst, VGImage src,
1.770 + const VGfloat * matrix) VG_APIEXIT;
1.771 +VG_API_CALL void VG_APIENTRY
1.772 + vgConvolve(VGImage dst, VGImage src,
1.773 + VGint kernelWidth, VGint kernelHeight,
1.774 + VGint shiftX, VGint shiftY,
1.775 + const VGshort * kernel,
1.776 + VGfloat scale,
1.777 + VGfloat bias,
1.778 + VGTilingMode tilingMode) VG_APIEXIT;
1.779 +VG_API_CALL void VG_APIENTRY
1.780 + vgSeparableConvolve(VGImage dst, VGImage src,
1.781 + VGint kernelWidth,
1.782 + VGint kernelHeight,
1.783 + VGint shiftX, VGint shiftY,
1.784 + const VGshort * kernelX,
1.785 + const VGshort * kernelY,
1.786 + VGfloat scale,
1.787 + VGfloat bias,
1.788 + VGTilingMode tilingMode) VG_APIEXIT;
1.789 +VG_API_CALL void VG_APIENTRY
1.790 + vgGaussianBlur(VGImage dst, VGImage src,
1.791 + VGfloat stdDeviationX,
1.792 + VGfloat stdDeviationY,
1.793 + VGTilingMode tilingMode) VG_APIEXIT;
1.794 +VG_API_CALL void VG_APIENTRY
1.795 + vgLookup(VGImage dst, VGImage src,
1.796 + const VGubyte * redLUT,
1.797 + const VGubyte * greenLUT,
1.798 + const VGubyte * blueLUT,
1.799 + const VGubyte * alphaLUT,
1.800 + VGboolean outputLinear,
1.801 + VGboolean outputPremultiplied) VG_APIEXIT;
1.802 +VG_API_CALL void VG_APIENTRY
1.803 + vgLookupSingle(VGImage dst, VGImage src,
1.804 + const VGuint * lookupTable,
1.805 + VGImageChannel sourceChannel,
1.806 + VGboolean outputLinear,
1.807 + VGboolean outputPremultiplied) VG_APIEXIT;
1.808 +
1.809 +/* Hardware Queries */
1.810 +VG_API_CALL VGHardwareQueryResult VG_APIENTRY
1.811 + vgHardwareQuery
1.812 + (VGHardwareQueryType key,
1.813 + VGint setting) VG_APIEXIT;
1.814 +
1.815 +/* Renderer and Extension Information */
1.816 +VG_API_CALL const VGubyte * VG_APIENTRY
1.817 + vgGetString(VGStringID name) VG_APIEXIT;
1.818 +
1.819 +#ifdef __cplusplus
1.820 +} /* extern "C" */
1.821 +#endif
1.822 +
1.823 +#endif /* __VG_1_1_OPENVG_H */