1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/VG/1.0/vgu.h Wed Mar 31 12:27:01 2010 +0100
1.3 @@ -0,0 +1,154 @@
1.4 +/*------------------------------------------------------------------------
1.5 + *
1.6 + * VGU 1.1 Reference Implementation
1.7 + * -------------------------------------
1.8 + *
1.9 + * Copyright (c) 2008 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 VGU 1.1 API.
1.33 + *//*-------------------------------------------------------------------*/
1.34 +
1.35 +#ifndef __VG_1_1_VGU_H
1.36 +#define __VG_1_1_VGU_H
1.37 +
1.38 +#ifndef __VG_VGU_H_
1.39 +#error Do not include this file directly. Use <VG/vgu.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 + */
1.51 +
1.52 +/**
1.53 +@publishedAll
1.54 +@released
1.55 +*/
1.56 +#ifdef __cplusplus
1.57 +extern "C" {
1.58 +#endif
1.59 +
1.60 +#include <VG/openvg.h>
1.61 +
1.62 +#define VGU_VERSION_1_0 1
1.63 +#define VGU_VERSION_1_1 2
1.64 +
1.65 +#ifndef VGU_API_CALL
1.66 +#define VGU_API_CALL IMPORT_C
1.67 +#endif
1.68 +#ifndef VGU_APIENTRY
1.69 +#define VGU_APIENTRY /* nothing */
1.70 +#endif
1.71 +#ifndef VGU_APIEXIT
1.72 +#define VGU_APIEXIT __SOFTFP
1.73 +#endif
1.74 +
1.75 +typedef enum {
1.76 + VGU_NO_ERROR = 0,
1.77 + VGU_BAD_HANDLE_ERROR = 0xF000,
1.78 + VGU_ILLEGAL_ARGUMENT_ERROR = 0xF001,
1.79 + VGU_OUT_OF_MEMORY_ERROR = 0xF002,
1.80 + VGU_PATH_CAPABILITY_ERROR = 0xF003,
1.81 + VGU_BAD_WARP_ERROR = 0xF004
1.82 +} VGUErrorCode;
1.83 +
1.84 +typedef enum {
1.85 + VGU_ARC_OPEN = 0xF100,
1.86 + VGU_ARC_CHORD = 0xF101,
1.87 + VGU_ARC_PIE = 0xF102
1.88 +} VGUArcType;
1.89 +
1.90 +VGU_API_CALL VGUErrorCode VGU_APIENTRY
1.91 + vguLine(VGPath path,
1.92 + VGfloat x0, VGfloat y0,
1.93 + VGfloat x1, VGfloat y1) VGU_APIEXIT;
1.94 +
1.95 +VGU_API_CALL VGUErrorCode VGU_APIENTRY
1.96 + vguPolygon(VGPath path,
1.97 + const VGfloat * points,
1.98 + VGint count,
1.99 + VGboolean closed) VGU_APIEXIT;
1.100 +
1.101 +VGU_API_CALL VGUErrorCode VGU_APIENTRY
1.102 + vguRect(VGPath path,
1.103 + VGfloat x, VGfloat y,
1.104 + VGfloat width, VGfloat height) VGU_APIEXIT;
1.105 +
1.106 +VGU_API_CALL VGUErrorCode VGU_APIENTRY
1.107 + vguRoundRect(VGPath path,
1.108 + VGfloat x, VGfloat y,
1.109 + VGfloat width,
1.110 + VGfloat height,
1.111 + VGfloat arcWidth,
1.112 + VGfloat arcHeight) VGU_APIEXIT;
1.113 +
1.114 +VGU_API_CALL VGUErrorCode VGU_APIENTRY
1.115 + vguEllipse(VGPath path,
1.116 + VGfloat cx, VGfloat cy,
1.117 + VGfloat width,
1.118 + VGfloat height) VGU_APIEXIT;
1.119 +
1.120 +VGU_API_CALL VGUErrorCode VGU_APIENTRY
1.121 + vguArc(VGPath path,
1.122 + VGfloat x, VGfloat y,
1.123 + VGfloat width, VGfloat height,
1.124 + VGfloat startAngle,
1.125 + VGfloat angleExtent,
1.126 + VGUArcType arcType) VGU_APIEXIT;
1.127 +
1.128 +VGU_API_CALL VGUErrorCode VGU_APIENTRY
1.129 + vguComputeWarpQuadToSquare(VGfloat sx0, VGfloat sy0,
1.130 + VGfloat sx1, VGfloat sy1,
1.131 + VGfloat sx2, VGfloat sy2,
1.132 + VGfloat sx3, VGfloat sy3,
1.133 + VGfloat * matrix) VGU_APIEXIT;
1.134 +
1.135 +VGU_API_CALL VGUErrorCode VGU_APIENTRY
1.136 + vguComputeWarpSquareToQuad(VGfloat dx0, VGfloat dy0,
1.137 + VGfloat dx1, VGfloat dy1,
1.138 + VGfloat dx2, VGfloat dy2,
1.139 + VGfloat dx3, VGfloat dy3,
1.140 + VGfloat * matrix) VGU_APIEXIT;
1.141 +
1.142 +VGU_API_CALL VGUErrorCode VGU_APIENTRY
1.143 + vguComputeWarpQuadToQuad(VGfloat dx0, VGfloat dy0,
1.144 + VGfloat dx1, VGfloat dy1,
1.145 + VGfloat dx2, VGfloat dy2,
1.146 + VGfloat dx3, VGfloat dy3,
1.147 + VGfloat sx0, VGfloat sy0,
1.148 + VGfloat sx1, VGfloat sy1,
1.149 + VGfloat sx2, VGfloat sy2,
1.150 + VGfloat sx3, VGfloat sy3,
1.151 + VGfloat * matrix) VGU_APIEXIT;
1.152 +
1.153 +#ifdef __cplusplus
1.154 +} /* extern "C" */
1.155 +#endif
1.156 +
1.157 +#endif /* __VG_1_1_VGU_H */