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