Initial work on Cairo bindings

This commit is contained in:
Joshua Granick
2015-05-01 07:17:30 -07:00
parent aa9c17d640
commit 0b82d31501
7 changed files with 133 additions and 0 deletions

View File

@@ -9,6 +9,7 @@
<set name="lime-legacy" value="1" if="legacy || lime_legacy" />
<set name="ios" value="1" if="iphone" />
<set name="LIME_CAIRO" value="1" if="LIME_CAIRO" />
<set name="LIME_CURL" value="1" unless="emscripten" />
<set name="LIME_JPEG" value="1" />
<set name="LIME_FREETYPE" value="1" />
@@ -17,6 +18,7 @@
<set name="LIME_OGG" value="1" />
<set name="LIME_OPENAL" value="1" />
<set name="LIME_OPENGL" value="1" />
<set name="LIME_PIXMAN" value="1" if="LIME_CAIRO || LIME_PIXMAN" />
<set name="LIME_PNG" value="1" />
<set name="LIME_SDL" value="1" />
<set name="LIME_VORBIS" value="1" />
@@ -37,6 +39,15 @@
<file name="src/ExternalInterface.cpp" />
<section if="LIME_CAIRO">
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/cairo/include" />
<compilerflag value="-DCAIRO_WIN32_STATIC_BUILD" if="windows" />
<file name="src/graphics/cairo/CairoBindings.cpp" />
</section>
<section if="LIME_CURL">
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/curl/include/" />
@@ -183,6 +194,7 @@
</files>
<include name="lib/cairo/files.xml" if="LIME_CAIRO" />
<include name="lib/curl/files.xml" />
<include name="lib/freetype/files.xml" />
<include name="lib/harfbuzz/files.xml" />
@@ -191,6 +203,7 @@
<include name="lib/ogg/files.xml" />
<include name="lib/openal/files.xml" />
<include name="lib/openal-android/files.xml" if="android" />
<include name="lib/pixman/files.xml" if="LIME_PIXMAN" />
<include name="lib/png/files.xml" />
<include name="lib/sdl/files.xml" />
<include name="lib/vorbis/files.xml" />
@@ -204,6 +217,7 @@
<files id="lime" />
<files id="native-toolkit-cairo" if="LIME_CAIRO" />
<files id="native-toolkit-curl" if="LIME_CURL" />
<files id="native-toolkit-jpeg" if="LIME_JPEG" />
<files id="native-toolkit-freetype" if="LIME_FREETYPE" />
@@ -212,6 +226,7 @@
<files id="native-toolkit-ogg" if="LIME_OGG" />
<files id="native-toolkit-openal" if="LIME_OPENAL" unless="mac || iphone || android || emscripten" />
<files id="native-toolkit-openal-android" if="LIME_OPENAL android" />
<files id="native-toolkit-pixman" if="LIME_PIXMAN" />
<files id="native-toolkit-png" if="LIME_PNG" />
<files id="native-toolkit-sdl" if="LIME_SDL" unless="emscripten" />
<files id="native-toolkit-vorbis" if="LIME_VORBIS" />

1
project/lib/cairo Submodule

Submodule project/lib/cairo added at 83548b9227

1
project/lib/pixman Submodule

Submodule project/lib/pixman added at 65dced727a

View File

@@ -0,0 +1,33 @@
#include <cairo.h>
#include <hx/CFFI.h>
namespace lime {
value lime_cairo_version () {
return alloc_int (cairo_version ());
}
value lime_cairo_version_string () {
return alloc_string (cairo_version_string ());
}
DEFINE_PRIM (lime_cairo_version, 0);
DEFINE_PRIM (lime_cairo_version_string, 0);
}
extern "C" int lime_cairo_register_prims () {
return 0;
}