mapi: Add vgapi.

vgapi is a dispatcher for OpenVG.
This commit is contained in:
Chia-I Wu 2010-04-26 16:48:59 +08:00
parent d4589d3816
commit bdc4504252
3 changed files with 154 additions and 0 deletions

50
src/mapi/vgapi/Makefile Normal file
View file

@ -0,0 +1,50 @@
# src/mapi/vgapi/Makefile
TOP := ../../..
include $(TOP)/configs/current
MAPI := $(TOP)/src/mapi/mapi
include $(MAPI)/sources.mak
VGAPI_SOURCES := $(addprefix $(MAPI)/, $(MAPI_SOURCES))
VGAPI_OBJECTS := $(MAPI_SOURCES:.c=.o)
VGAPI_CPPFLAGS := -DMAPI_ABI_HEADER=\"vgapi/vgapi_tmp.h\"
GENERATED_SOURCES := vgapi_tmp.h
INCLUDE_DIRS := \
-I$(TOP)/include \
-I$(TOP)/src/mapi
.PHONY: default
default: depend libvgapi.a
libvgapi.a: $(VGAPI_OBJECTS)
@$(MKLIB) -o vgapi -static $(VGAPI_OBJECTS)
$(VGAPI_SOURCES): | $(GENERATED_SOURCES)
$(VGAPI_OBJECTS): %.o: $(MAPI)/%.c
$(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(VGAPI_CPPFLAGS) $< -o $@
vgapi_tmp.h: vgapi.csv $(MAPI)/mapi_abi.py
$(PYTHON2) $(PYTHON_FLAGS) $(MAPI)/mapi_abi.py \
-i vgapi/vgapi_defines.h $< > $@
.PHONY: clean
clean:
-rm -f libvgapi.a
-rm -f $(VGAPI_OBJECTS)
-rm -f depend depend.bak
-rm -f $(GENERATED_SOURCES)
# nothing to install
install:
depend: $(VGAPI_SOURCES)
@echo "running $(MKDEP)"
@touch depend
@$(MKDEP) $(MKDEP_OPTIONS) -f- $(DEFINES) $(INCLUDE_DIRS) \
$(VGAPI_CPPFLAGS) $(VGAPI_SOURCES) 2>/dev/null | \
sed -e 's,^$(MAPI)/,,' > depend

93
src/mapi/vgapi/vgapi.csv Normal file
View file

@ -0,0 +1,93 @@
# This is the source file for the various generate structs/tables/functions
# used in st/vega.
# OpenVG 1.0
void, AppendPath, VGPath dstPath, VGPath srcPath
void, AppendPathData, VGPath dstPath, VGint numSegments, const VGubyte *pathSegments, const void *pathData
VGImage, ChildImage, VGImage parent, VGint x, VGint y, VGint width, VGint height
void, Clear, VGint x, VGint y, VGint width, VGint height
void, ClearImage, VGImage image, VGint x, VGint y, VGint width, VGint height
void, ClearPath, VGPath path, VGbitfield capabilities
void, ColorMatrix, VGImage dst, VGImage src, const VGfloat *matrix
void, Convolve, VGImage dst, VGImage src, VGint kernelWidth, VGint kernelHeight, VGint shiftX, VGint shiftY, const VGshort *kernel, VGfloat scale, VGfloat bias, VGTilingMode tilingMode
void, CopyImage, VGImage dst, VGint dx, VGint dy, VGImage src, VGint sx, VGint sy, VGint width, VGint height, VGboolean dither
void, CopyPixels, VGint dx, VGint dy, VGint sx, VGint sy, VGint width, VGint height
VGImage, CreateImage, VGImageFormat format, VGint width, VGint height, VGbitfield allowedQuality
VGPaint, CreatePaint, void
VGPath, CreatePath, VGint pathFormat, VGPathDatatype datatype, VGfloat scale, VGfloat bias, VGint segmentCapacityHint, VGint coordCapacityHint, VGbitfield capabilities
void, DestroyImage, VGImage image
void, DestroyPaint, VGPaint paint
void, DestroyPath, VGPath path
void, DrawImage, VGImage image
void, DrawPath, VGPath path, VGbitfield paintModes
void, Finish, void
void, Flush, void
void, GaussianBlur, VGImage dst, VGImage src, VGfloat stdDeviationX, VGfloat stdDeviationY, VGTilingMode tilingMode
VGuint, GetColor, VGPaint paint
VGErrorCode, GetError, void
void, GetImageSubData, VGImage image, void *data, VGint dataStride, VGImageFormat dataFormat, VGint x, VGint y, VGint width, VGint height
void, GetMatrix, VGfloat *m
VGPaint, GetPaint, VGPaintMode paintMode
VGint, GetParameterVectorSize, VGHandle object, VGint paramType
VGfloat, GetParameterf, VGHandle object, VGint paramType
void, GetParameterfv, VGHandle object, VGint paramType, VGint count, VGfloat *values
VGint, GetParameteri, VGHandle object, VGint paramType
void, GetParameteriv, VGHandle object, VGint paramType, VGint count, VGint *values
VGImage, GetParent, VGImage image
VGbitfield, GetPathCapabilities, VGPath path
void, GetPixels, VGImage dst, VGint dx, VGint dy, VGint sx, VGint sy, VGint width, VGint height
const VGubyte *, GetString, VGStringID name
VGint, GetVectorSize, VGParamType type
VGfloat, Getf, VGParamType type
void, Getfv, VGParamType type, VGint count, VGfloat *values
VGint, Geti, VGParamType type
void, Getiv, VGParamType type, VGint count, VGint *values
VGHardwareQueryResult, HardwareQuery, VGHardwareQueryType key, VGint setting
void, ImageSubData, VGImage image, const void *data, VGint dataStride, VGImageFormat dataFormat, VGint x, VGint y, VGint width, VGint height
VGboolean, InterpolatePath, VGPath dstPath, VGPath startPath, VGPath endPath, VGfloat amount
void, LoadIdentity, void
void, LoadMatrix, const VGfloat *m
void, Lookup, VGImage dst, VGImage src, const VGubyte *redLUT, const VGubyte *greenLUT, const VGubyte *blueLUT, const VGubyte *alphaLUT, VGboolean outputLinear, VGboolean outputPremultiplied
void, LookupSingle, VGImage dst, VGImage src, const VGuint *lookupTable, VGImageChannel sourceChannel, VGboolean outputLinear, VGboolean outputPremultiplied
void, Mask, VGHandle mask, VGMaskOperation operation, VGint x, VGint y, VGint width, VGint height
void, ModifyPathCoords, VGPath dstPath, VGint startIndex, VGint numSegments, const void *pathData
void, MultMatrix, const VGfloat *m
void, PaintPattern, VGPaint paint, VGImage pattern
void, PathBounds, VGPath path, VGfloat *minX, VGfloat *minY, VGfloat *width, VGfloat *height
VGfloat, PathLength, VGPath path, VGint startSegment, VGint numSegments
void, PathTransformedBounds, VGPath path, VGfloat *minX, VGfloat *minY, VGfloat *width, VGfloat *height
void, PointAlongPath, VGPath path, VGint startSegment, VGint numSegments, VGfloat distance, VGfloat *x, VGfloat *y, VGfloat *tangentX, VGfloat *tangentY
void, ReadPixels, void *data, VGint dataStride, VGImageFormat dataFormat, VGint sx, VGint sy, VGint width, VGint height
void, RemovePathCapabilities, VGPath path, VGbitfield capabilities
void, Rotate, VGfloat angle
void, Scale, VGfloat sx, VGfloat sy
void, SeparableConvolve, VGImage dst, VGImage src, VGint kernelWidth, VGint kernelHeight, VGint shiftX, VGint shiftY, const VGshort *kernelX, const VGshort *kernelY, VGfloat scale, VGfloat bias, VGTilingMode tilingMode
void, SetColor, VGPaint paint, VGuint rgba
void, SetPaint, VGPaint paint, VGbitfield paintModes
void, SetParameterf, VGHandle object, VGint paramType, VGfloat value
void, SetParameterfv, VGHandle object, VGint paramType, VGint count, const VGfloat *values
void, SetParameteri, VGHandle object, VGint paramType, VGint value
void, SetParameteriv, VGHandle object, VGint paramType, VGint count, const VGint *values
void, SetPixels, VGint dx, VGint dy, VGImage src, VGint sx, VGint sy, VGint width, VGint height
void, Setf, VGParamType type, VGfloat value
void, Setfv, VGParamType type, VGint count, const VGfloat *values
void, Seti, VGParamType type, VGint value
void, Setiv, VGParamType type, VGint count, const VGint *values
void, Shear, VGfloat shx, VGfloat shy
void, TransformPath, VGPath dstPath, VGPath srcPath
void, Translate, VGfloat tx, VGfloat ty
void, WritePixels, const void *data, VGint dataStride, VGImageFormat dataFormat, VGint dx, VGint dy, VGint width, VGint height
## OpenVG 1.1
#void, ClearGlyph, VGFont font,VGuint glyphIndex
#void, CopyMask, VGMaskLayer maskLayer, VGint dx, VGint dy, VGint sx, VGint sy, VGint width, VGint height
#VGFont, CreateFont, VGint glyphCapacityHint
#VGMaskLayer, CreateMaskLayer, VGint width, VGint height
#void, DestroyFont, VGFont font
#void, DestroyMaskLayer, VGMaskLayer maskLayer
#void, DrawGlyph, VGFont font, VGuint glyphIndex, VGbitfield paintModes, VGboolean allowAutoHinting
#void, DrawGlyphs, VGFont font, VGint glyphCount, const VGuint *glyphIndices, const VGfloat *adjustments_x, const VGfloat *adjustments_y, VGbitfield paintModes, VGboolean allowAutoHinting
#void, FillMaskLayer, VGMaskLayer maskLayer, VGint x, VGint y, VGint width, VGint height, VGfloat value
#void, RenderToMask, VGPath path, VGbitfield paintModes, VGMaskOperation operation
#void, SetGlyphToImage, VGFont font, VGuint glyphIndex, VGImage image, const VGfloat glyphOrigin[2], const VGfloat escapement[2]
#void, SetGlyphToPath, VGFont font, VGuint glyphIndex, VGPath path, VGboolean isHinted, const VGfloat glyphOrigin[2], const VGfloat escapement[2]
1 # This is the source file for the various generate structs/tables/functions
2 # used in st/vega.
3 # OpenVG 1.0
4 void, AppendPath, VGPath dstPath, VGPath srcPath
5 void, AppendPathData, VGPath dstPath, VGint numSegments, const VGubyte *pathSegments, const void *pathData
6 VGImage, ChildImage, VGImage parent, VGint x, VGint y, VGint width, VGint height
7 void, Clear, VGint x, VGint y, VGint width, VGint height
8 void, ClearImage, VGImage image, VGint x, VGint y, VGint width, VGint height
9 void, ClearPath, VGPath path, VGbitfield capabilities
10 void, ColorMatrix, VGImage dst, VGImage src, const VGfloat *matrix
11 void, Convolve, VGImage dst, VGImage src, VGint kernelWidth, VGint kernelHeight, VGint shiftX, VGint shiftY, const VGshort *kernel, VGfloat scale, VGfloat bias, VGTilingMode tilingMode
12 void, CopyImage, VGImage dst, VGint dx, VGint dy, VGImage src, VGint sx, VGint sy, VGint width, VGint height, VGboolean dither
13 void, CopyPixels, VGint dx, VGint dy, VGint sx, VGint sy, VGint width, VGint height
14 VGImage, CreateImage, VGImageFormat format, VGint width, VGint height, VGbitfield allowedQuality
15 VGPaint, CreatePaint, void
16 VGPath, CreatePath, VGint pathFormat, VGPathDatatype datatype, VGfloat scale, VGfloat bias, VGint segmentCapacityHint, VGint coordCapacityHint, VGbitfield capabilities
17 void, DestroyImage, VGImage image
18 void, DestroyPaint, VGPaint paint
19 void, DestroyPath, VGPath path
20 void, DrawImage, VGImage image
21 void, DrawPath, VGPath path, VGbitfield paintModes
22 void, Finish, void
23 void, Flush, void
24 void, GaussianBlur, VGImage dst, VGImage src, VGfloat stdDeviationX, VGfloat stdDeviationY, VGTilingMode tilingMode
25 VGuint, GetColor, VGPaint paint
26 VGErrorCode, GetError, void
27 void, GetImageSubData, VGImage image, void *data, VGint dataStride, VGImageFormat dataFormat, VGint x, VGint y, VGint width, VGint height
28 void, GetMatrix, VGfloat *m
29 VGPaint, GetPaint, VGPaintMode paintMode
30 VGint, GetParameterVectorSize, VGHandle object, VGint paramType
31 VGfloat, GetParameterf, VGHandle object, VGint paramType
32 void, GetParameterfv, VGHandle object, VGint paramType, VGint count, VGfloat *values
33 VGint, GetParameteri, VGHandle object, VGint paramType
34 void, GetParameteriv, VGHandle object, VGint paramType, VGint count, VGint *values
35 VGImage, GetParent, VGImage image
36 VGbitfield, GetPathCapabilities, VGPath path
37 void, GetPixels, VGImage dst, VGint dx, VGint dy, VGint sx, VGint sy, VGint width, VGint height
38 const VGubyte *, GetString, VGStringID name
39 VGint, GetVectorSize, VGParamType type
40 VGfloat, Getf, VGParamType type
41 void, Getfv, VGParamType type, VGint count, VGfloat *values
42 VGint, Geti, VGParamType type
43 void, Getiv, VGParamType type, VGint count, VGint *values
44 VGHardwareQueryResult, HardwareQuery, VGHardwareQueryType key, VGint setting
45 void, ImageSubData, VGImage image, const void *data, VGint dataStride, VGImageFormat dataFormat, VGint x, VGint y, VGint width, VGint height
46 VGboolean, InterpolatePath, VGPath dstPath, VGPath startPath, VGPath endPath, VGfloat amount
47 void, LoadIdentity, void
48 void, LoadMatrix, const VGfloat *m
49 void, Lookup, VGImage dst, VGImage src, const VGubyte *redLUT, const VGubyte *greenLUT, const VGubyte *blueLUT, const VGubyte *alphaLUT, VGboolean outputLinear, VGboolean outputPremultiplied
50 void, LookupSingle, VGImage dst, VGImage src, const VGuint *lookupTable, VGImageChannel sourceChannel, VGboolean outputLinear, VGboolean outputPremultiplied
51 void, Mask, VGHandle mask, VGMaskOperation operation, VGint x, VGint y, VGint width, VGint height
52 void, ModifyPathCoords, VGPath dstPath, VGint startIndex, VGint numSegments, const void *pathData
53 void, MultMatrix, const VGfloat *m
54 void, PaintPattern, VGPaint paint, VGImage pattern
55 void, PathBounds, VGPath path, VGfloat *minX, VGfloat *minY, VGfloat *width, VGfloat *height
56 VGfloat, PathLength, VGPath path, VGint startSegment, VGint numSegments
57 void, PathTransformedBounds, VGPath path, VGfloat *minX, VGfloat *minY, VGfloat *width, VGfloat *height
58 void, PointAlongPath, VGPath path, VGint startSegment, VGint numSegments, VGfloat distance, VGfloat *x, VGfloat *y, VGfloat *tangentX, VGfloat *tangentY
59 void, ReadPixels, void *data, VGint dataStride, VGImageFormat dataFormat, VGint sx, VGint sy, VGint width, VGint height
60 void, RemovePathCapabilities, VGPath path, VGbitfield capabilities
61 void, Rotate, VGfloat angle
62 void, Scale, VGfloat sx, VGfloat sy
63 void, SeparableConvolve, VGImage dst, VGImage src, VGint kernelWidth, VGint kernelHeight, VGint shiftX, VGint shiftY, const VGshort *kernelX, const VGshort *kernelY, VGfloat scale, VGfloat bias, VGTilingMode tilingMode
64 void, SetColor, VGPaint paint, VGuint rgba
65 void, SetPaint, VGPaint paint, VGbitfield paintModes
66 void, SetParameterf, VGHandle object, VGint paramType, VGfloat value
67 void, SetParameterfv, VGHandle object, VGint paramType, VGint count, const VGfloat *values
68 void, SetParameteri, VGHandle object, VGint paramType, VGint value
69 void, SetParameteriv, VGHandle object, VGint paramType, VGint count, const VGint *values
70 void, SetPixels, VGint dx, VGint dy, VGImage src, VGint sx, VGint sy, VGint width, VGint height
71 void, Setf, VGParamType type, VGfloat value
72 void, Setfv, VGParamType type, VGint count, const VGfloat *values
73 void, Seti, VGParamType type, VGint value
74 void, Setiv, VGParamType type, VGint count, const VGint *values
75 void, Shear, VGfloat shx, VGfloat shy
76 void, TransformPath, VGPath dstPath, VGPath srcPath
77 void, Translate, VGfloat tx, VGfloat ty
78 void, WritePixels, const void *data, VGint dataStride, VGImageFormat dataFormat, VGint dx, VGint dy, VGint width, VGint height
79 ## OpenVG 1.1
80 #void, ClearGlyph, VGFont font,VGuint glyphIndex
81 #void, CopyMask, VGMaskLayer maskLayer, VGint dx, VGint dy, VGint sx, VGint sy, VGint width, VGint height
82 #VGFont, CreateFont, VGint glyphCapacityHint
83 #VGMaskLayer, CreateMaskLayer, VGint width, VGint height
84 #void, DestroyFont, VGFont font
85 #void, DestroyMaskLayer, VGMaskLayer maskLayer
86 #void, DrawGlyph, VGFont font, VGuint glyphIndex, VGbitfield paintModes, VGboolean allowAutoHinting
87 #void, DrawGlyphs, VGFont font, VGint glyphCount, const VGuint *glyphIndices, const VGfloat *adjustments_x, const VGfloat *adjustments_y, VGbitfield paintModes, VGboolean allowAutoHinting
88 #void, FillMaskLayer, VGMaskLayer maskLayer, VGint x, VGint y, VGint width, VGint height, VGfloat value
89 #void, RenderToMask, VGPath path, VGbitfield paintModes, VGMaskOperation operation
90 #void, SetGlyphToImage, VGFont font, VGuint glyphIndex, VGImage image, const VGfloat glyphOrigin[2], const VGfloat escapement[2]
91 #void, SetGlyphToPath, VGFont font, VGuint glyphIndex, VGPath path, VGboolean isHinted, const VGfloat glyphOrigin[2], const VGfloat escapement[2]

View file

@ -0,0 +1,11 @@
#ifndef VGAPI_DEFINES_H
#define VGAPI_DEFINES_H
#include "VG/openvg.h"
#include "VG/vgext.h"
#define MAPI_ABI_PREFIX vg
#define MAPI_ABI_PUBLIC VG_API_CALL
#define MAPI_ABI_ATTR VG_API_ENTRY
#endif /* VGAPI_DEFINES_H */