epoc32/include/VG/1.0/vgu.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:27:01 +0100
branchSymbian2
changeset 3 e1b950c65cb4
parent 2 epoc32/include/VG/1.1/vgu.h@2fe1408b6811
child 4 837f303aceeb
permissions -rw-r--r--
Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
     1 /*------------------------------------------------------------------------
     2  * 
     3  * VGU 1.1 Reference Implementation
     4  * -------------------------------------
     5  *
     6  * Copyright (c) 2008 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	VGU 1.1 API.
    30  *//*-------------------------------------------------------------------*/
    31 
    32 #ifndef __VG_1_1_VGU_H
    33 #define __VG_1_1_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 #ifdef __cplusplus
    54 extern "C" {
    55 #endif
    56 
    57 #include <VG/openvg.h>
    58 
    59 #define VGU_VERSION_1_0 1
    60 #define VGU_VERSION_1_1 2
    61 
    62 #ifndef VGU_API_CALL
    63 #define VGU_API_CALL IMPORT_C
    64 #endif
    65 #ifndef VGU_APIENTRY
    66 #define VGU_APIENTRY /* nothing */
    67 #endif
    68 #ifndef VGU_APIEXIT
    69 #define VGU_APIEXIT __SOFTFP
    70 #endif
    71 
    72 typedef enum {
    73   VGU_NO_ERROR                                 = 0,
    74   VGU_BAD_HANDLE_ERROR                         = 0xF000,
    75   VGU_ILLEGAL_ARGUMENT_ERROR                   = 0xF001,
    76   VGU_OUT_OF_MEMORY_ERROR                      = 0xF002,
    77   VGU_PATH_CAPABILITY_ERROR                    = 0xF003,
    78   VGU_BAD_WARP_ERROR                           = 0xF004
    79 } VGUErrorCode;
    80 
    81 typedef enum {
    82   VGU_ARC_OPEN                                 = 0xF100,
    83   VGU_ARC_CHORD                                = 0xF101,
    84   VGU_ARC_PIE                                  = 0xF102
    85 } VGUArcType;
    86 
    87 VGU_API_CALL VGUErrorCode VGU_APIENTRY
    88      vguLine(VGPath path,
    89         VGfloat x0, VGfloat y0,
    90         VGfloat x1, VGfloat y1) VGU_APIEXIT;
    91 
    92 VGU_API_CALL VGUErrorCode VGU_APIENTRY
    93      vguPolygon(VGPath path,
    94         const VGfloat * points,
    95         VGint count,
    96         VGboolean closed) VGU_APIEXIT;
    97 
    98 VGU_API_CALL VGUErrorCode VGU_APIENTRY
    99      vguRect(VGPath path,
   100         VGfloat x, VGfloat y,
   101         VGfloat width, VGfloat height) VGU_APIEXIT;
   102 
   103 VGU_API_CALL VGUErrorCode VGU_APIENTRY
   104      vguRoundRect(VGPath path,
   105         VGfloat x, VGfloat y,
   106         VGfloat width,
   107         VGfloat height,
   108         VGfloat arcWidth,
   109         VGfloat arcHeight) VGU_APIEXIT;
   110 
   111 VGU_API_CALL VGUErrorCode VGU_APIENTRY
   112      vguEllipse(VGPath path,
   113         VGfloat cx, VGfloat cy,
   114         VGfloat width,
   115         VGfloat height) VGU_APIEXIT;
   116 
   117 VGU_API_CALL VGUErrorCode VGU_APIENTRY
   118      vguArc(VGPath path,
   119         VGfloat x, VGfloat y,
   120         VGfloat width, VGfloat height,
   121         VGfloat startAngle,
   122         VGfloat angleExtent,
   123         VGUArcType arcType) VGU_APIEXIT;
   124 
   125 VGU_API_CALL VGUErrorCode VGU_APIENTRY
   126     vguComputeWarpQuadToSquare(VGfloat sx0, VGfloat sy0,
   127         VGfloat sx1, VGfloat sy1,
   128         VGfloat sx2, VGfloat sy2,
   129         VGfloat sx3, VGfloat sy3,
   130         VGfloat * matrix) VGU_APIEXIT;
   131 
   132 VGU_API_CALL VGUErrorCode VGU_APIENTRY
   133     vguComputeWarpSquareToQuad(VGfloat dx0, VGfloat dy0,
   134         VGfloat dx1, VGfloat dy1,
   135         VGfloat dx2, VGfloat dy2,
   136         VGfloat dx3, VGfloat dy3,
   137         VGfloat * matrix) VGU_APIEXIT;
   138 
   139 VGU_API_CALL VGUErrorCode VGU_APIENTRY
   140     vguComputeWarpQuadToQuad(VGfloat dx0, VGfloat dy0,
   141         VGfloat dx1, VGfloat dy1,
   142         VGfloat dx2, VGfloat dy2,
   143         VGfloat dx3, VGfloat dy3,
   144         VGfloat sx0, VGfloat sy0,
   145         VGfloat sx1, VGfloat sy1,
   146         VGfloat sx2, VGfloat sy2,
   147         VGfloat sx3, VGfloat sy3,
   148         VGfloat * matrix) VGU_APIEXIT;
   149 
   150 #ifdef __cplusplus
   151 } /* extern "C" */
   152 #endif
   153 
   154 #endif /* __VG_1_1_VGU_H */