summaryrefslogtreecommitdiff
path: root/src/mapi
diff options
context:
space:
mode:
authorChia-I Wu <olv@lunarg.com>2010-04-26 16:48:59 +0800
committerChia-I Wu <olv@lunarg.com>2010-05-07 10:41:12 +0800
commitbdc4504252692b2eb971c08114182828870cc0f8 (patch)
treee54701da9110256d83448e499e9ec59a12620323 /src/mapi
parentd4589d381697b4b3dd291a3c93a34370508ef1e8 (diff)
mapi: Add vgapi.
vgapi is a dispatcher for OpenVG.
Diffstat (limited to 'src/mapi')
-rw-r--r--src/mapi/vgapi/Makefile50
-rw-r--r--src/mapi/vgapi/vgapi.csv93
-rw-r--r--src/mapi/vgapi/vgapi_defines.h11
3 files changed, 154 insertions, 0 deletions
diff --git a/src/mapi/vgapi/Makefile b/src/mapi/vgapi/Makefile
new file mode 100644
index 0000000000..f2d3eb12a4
--- /dev/null
+++ b/src/mapi/vgapi/Makefile
@@ -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
diff --git a/src/mapi/vgapi/vgapi.csv b/src/mapi/vgapi/vgapi.csv
new file mode 100644
index 0000000000..d28ee32b28
--- /dev/null
+++ b/src/mapi/vgapi/vgapi.csv
@@ -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]
diff --git a/src/mapi/vgapi/vgapi_defines.h b/src/mapi/vgapi/vgapi_defines.h
new file mode 100644
index 0000000000..fb9f68c7ad
--- /dev/null
+++ b/src/mapi/vgapi/vgapi_defines.h
@@ -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 */