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