-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9c9a0e1
commit 60f900a
Showing
130 changed files
with
4,520 additions
and
2 deletions.
There are no files selected for viewing
Binary file added
BIN
+488 Bytes
android/build/classes/com/geraudbourdin/svgview/SvgViewBootstrap.class
Binary file not shown.
Binary file added
BIN
+730 Bytes
android/build/classes/com/geraudbourdin/svgview/SvgViewModule.class
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+3.12 KB
android/build/classes/com/geraudbourdin/svgview/ViewProxy$SvgView.class
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<h1>svg-view Module</h1> | ||
<h2>Description</h2> | ||
<p>TODO: Enter your module description here</p> | ||
<h2>Accessing the svg-view Module</h2> | ||
<p>To access this module from JavaScript, you would do the following:</p> | ||
<pre><code>var svg_view = require("com.geraudbourdin.svgview"); | ||
</code></pre> | ||
<p>The svg_view variable is a reference to the Module object.</p> | ||
<h2>Reference</h2> | ||
<p>TODO: If your module has an API, you should document | ||
the reference here.</p> | ||
<h3>svg_view.function</h3> | ||
<p>TODO: This is an example of a module function.</p> | ||
<h3>svg_view.property</h3> | ||
<p>TODO: This is an example of a module property.</p> | ||
<h2>Usage</h2> | ||
<p>TODO: Enter your usage example here</p> | ||
<h2>Author</h2> | ||
<p>TODO: Enter your author name, email and other contact | ||
details you want to share here.</p> | ||
<h2>License</h2> | ||
<p>TODO: Enter your license/legal information here.</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Main NDK build script for com.geraudbourdin.svgview | ||
|
||
APP_BUILD_SCRIPT := jni/Android.mk | ||
TARGET_PLATFORM := android-10 | ||
APP_STL := stlport_shared | ||
APP_ABI := armeabi armeabi-v7a x86 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#ifndef KROLL_NATIVES_H | ||
#define KROLL_NATIVES_H | ||
|
||
#include <stdint.h> | ||
|
||
namespace titanium { | ||
|
||
const char bootstrap_native[] = { 47, 42, 42, 10, 32, 42, 32, 65, 112, 112, 99, 101, 108, 101, 114, 97, 116, 111, 114, 32, 84, 105, 116, 97, 110, 105, 117, 109, 32, 77, 111, 98, 105, 108, 101, 10, 32, 42, 32, 67, 111, 112, 121, 114, 105, 103, 104, 116, 32, 40, 99, 41, 32, 50, 48, 49, 49, 32, 98, 121, 32, 65, 112, 112, 99, 101, 108, 101, 114, 97, 116, 111, 114, 44, 32, 73, 110, 99, 46, 32, 65, 108, 108, 32, 82, 105, 103, 104, 116, 115, 32, 82, 101, 115, 101, 114, 118, 101, 100, 46, 10, 32, 42, 32, 76, 105, 99, 101, 110, 115, 101, 100, 32, 117, 110, 100, 101, 114, 32, 116, 104, 101, 32, 116, 101, 114, 109, 115, 32, 111, 102, 32, 116, 104, 101, 32, 65, 112, 97, 99, 104, 101, 32, 80, 117, 98, 108, 105, 99, 32, 76, 105, 99, 101, 110, 115, 101, 10, 32, 42, 32, 80, 108, 101, 97, 115, 101, 32, 115, 101, 101, 32, 116, 104, 101, 32, 76, 73, 67, 69, 78, 83, 69, 32, 105, 110, 99, 108, 117, 100, 101, 100, 32, 119, 105, 116, 104, 32, 116, 104, 105, 115, 32, 100, 105, 115, 116, 114, 105, 98, 117, 116, 105, 111, 110, 32, 102, 111, 114, 32, 100, 101, 116, 97, 105, 108, 115, 46, 10, 32, 42, 10, 32, 42, 32, 87, 97, 114, 110, 105, 110, 103, 58, 32, 84, 104, 105, 115, 32, 102, 105, 108, 101, 32, 105, 115, 32, 71, 69, 78, 69, 82, 65, 84, 69, 68, 44, 32, 97, 110, 100, 32, 115, 104, 111, 117, 108, 100, 32, 110, 111, 116, 32, 98, 101, 32, 109, 111, 100, 105, 102, 105, 101, 100, 10, 32, 42, 47, 10, 118, 97, 114, 32, 98, 111, 111, 116, 115, 116, 114, 97, 112, 32, 61, 32, 107, 114, 111, 108, 108, 46, 78, 97, 116, 105, 118, 101, 77, 111, 100, 117, 108, 101, 46, 114, 101, 113, 117, 105, 114, 101, 40, 34, 98, 111, 111, 116, 115, 116, 114, 97, 112, 34, 41, 44, 10, 9, 105, 110, 118, 111, 107, 101, 114, 32, 61, 32, 107, 114, 111, 108, 108, 46, 78, 97, 116, 105, 118, 101, 77, 111, 100, 117, 108, 101, 46, 114, 101, 113, 117, 105, 114, 101, 40, 34, 105, 110, 118, 111, 107, 101, 114, 34, 41, 44, 10, 9, 84, 105, 116, 97, 110, 105, 117, 109, 32, 61, 32, 107, 114, 111, 108, 108, 46, 98, 105, 110, 100, 105, 110, 103, 40, 34, 84, 105, 116, 97, 110, 105, 117, 109, 34, 41, 46, 84, 105, 116, 97, 110, 105, 117, 109, 59, 10, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 111, 100, 117, 108, 101, 66, 111, 111, 116, 115, 116, 114, 97, 112, 40, 109, 111, 100, 117, 108, 101, 66, 105, 110, 100, 105, 110, 103, 41, 32, 123, 10, 9, 102, 117, 110, 99, 116, 105, 111, 110, 32, 108, 97, 122, 121, 71, 101, 116, 40, 111, 98, 106, 101, 99, 116, 44, 32, 98, 105, 110, 100, 105, 110, 103, 44, 32, 110, 97, 109, 101, 44, 32, 110, 97, 109, 101, 115, 112, 97, 99, 101, 41, 32, 123, 10, 9, 9, 114, 101, 116, 117, 114, 110, 32, 98, 111, 111, 116, 115, 116, 114, 97, 112, 46, 108, 97, 122, 121, 71, 101, 116, 40, 111, 98, 106, 101, 99, 116, 44, 32, 98, 105, 110, 100, 105, 110, 103, 44, 10, 9, 9, 9, 110, 97, 109, 101, 44, 32, 110, 97, 109, 101, 115, 112, 97, 99, 101, 44, 32, 109, 111, 100, 117, 108, 101, 66, 105, 110, 100, 105, 110, 103, 46, 103, 101, 116, 66, 105, 110, 100, 105, 110, 103, 41, 59, 10, 9, 125, 10, 10, 9, 118, 97, 114, 32, 109, 111, 100, 117, 108, 101, 32, 61, 32, 109, 111, 100, 117, 108, 101, 66, 105, 110, 100, 105, 110, 103, 46, 103, 101, 116, 66, 105, 110, 100, 105, 110, 103, 40, 34, 99, 111, 109, 46, 103, 101, 114, 97, 117, 100, 98, 111, 117, 114, 100, 105, 110, 46, 115, 118, 103, 118, 105, 101, 119, 46, 83, 118, 103, 86, 105, 101, 119, 77, 111, 100, 117, 108, 101, 34, 41, 91, 34, 83, 118, 103, 86, 105, 101, 119, 34, 93, 59, 10, 9, 118, 97, 114, 32, 105, 110, 118, 111, 99, 97, 116, 105, 111, 110, 65, 80, 73, 115, 32, 61, 32, 109, 111, 100, 117, 108, 101, 46, 105, 110, 118, 111, 99, 97, 116, 105, 111, 110, 65, 80, 73, 115, 32, 61, 32, 91, 93, 59, 10, 9, 109, 111, 100, 117, 108, 101, 46, 97, 112, 105, 78, 97, 109, 101, 32, 61, 32, 34, 83, 118, 103, 86, 105, 101, 119, 34, 59, 10, 10, 9, 102, 117, 110, 99, 116, 105, 111, 110, 32, 97, 100, 100, 73, 110, 118, 111, 99, 97, 116, 105, 111, 110, 65, 80, 73, 40, 109, 111, 100, 117, 108, 101, 44, 32, 109, 111, 100, 117, 108, 101, 78, 97, 109, 101, 115, 112, 97, 99, 101, 44, 32, 110, 97, 109, 101, 115, 112, 97, 99, 101, 44, 32, 97, 112, 105, 41, 32, 123, 10, 9, 9, 105, 110, 118, 111, 99, 97, 116, 105, 111, 110, 65, 80, 73, 115, 46, 112, 117, 115, 104, 40, 123, 32, 110, 97, 109, 101, 115, 112, 97, 99, 101, 58, 32, 110, 97, 109, 101, 115, 112, 97, 99, 101, 44, 32, 97, 112, 105, 58, 32, 97, 112, 105, 32, 125, 41, 59, 10, 9, 125, 10, 10, 9, 9, 97, 100, 100, 73, 110, 118, 111, 99, 97, 116, 105, 111, 110, 65, 80, 73, 40, 109, 111, 100, 117, 108, 101, 44, 32, 34, 83, 118, 103, 86, 105, 101, 119, 34, 44, 32, 34, 83, 118, 103, 86, 105, 101, 119, 34, 44, 32, 34, 99, 114, 101, 97, 116, 101, 86, 105, 101, 119, 34, 41, 59, 10, 10, 9, 9, 9, 105, 102, 32, 40, 33, 40, 34, 95, 95, 112, 114, 111, 112, 101, 114, 116, 105, 101, 115, 68, 101, 102, 105, 110, 101, 100, 95, 95, 34, 32, 105, 110, 32, 109, 111, 100, 117, 108, 101, 41, 41, 32, 123, 9, 9, 10, 9, 9, 79, 98, 106, 101, 99, 116, 46, 100, 101, 102, 105, 110, 101, 80, 114, 111, 112, 101, 114, 116, 105, 101, 115, 40, 109, 111, 100, 117, 108, 101, 44, 32, 123, 10, 9, 9, 9, 34, 86, 105, 101, 119, 34, 58, 32, 123, 10, 9, 9, 9, 9, 103, 101, 116, 58, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 41, 32, 123, 10, 9, 9, 9, 9, 9, 118, 97, 114, 32, 86, 105, 101, 119, 32, 61, 32, 108, 97, 122, 121, 71, 101, 116, 40, 116, 104, 105, 115, 44, 32, 34, 99, 111, 109, 46, 103, 101, 114, 97, 117, 100, 98, 111, 117, 114, 100, 105, 110, 46, 115, 118, 103, 118, 105, 101, 119, 46, 86, 105, 101, 119, 80, 114, 111, 120, 121, 34, 44, 32, 34, 86, 105, 101, 119, 34, 44, 32, 34, 86, 105, 101, 119, 34, 41, 59, 10, 9, 9, 9, 9, 9, 114, 101, 116, 117, 114, 110, 32, 86, 105, 101, 119, 59, 10, 9, 9, 9, 9, 125, 44, 10, 9, 9, 9, 9, 99, 111, 110, 102, 105, 103, 117, 114, 97, 98, 108, 101, 58, 32, 116, 114, 117, 101, 10, 9, 9, 9, 125, 44, 10, 9, 9, 10, 9, 9, 125, 41, 59, 10, 9, 9, 109, 111, 100, 117, 108, 101, 46, 99, 111, 110, 115, 116, 114, 117, 99, 116, 111, 114, 46, 112, 114, 111, 116, 111, 116, 121, 112, 101, 46, 99, 114, 101, 97, 116, 101, 86, 105, 101, 119, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 41, 32, 123, 10, 9, 9, 9, 114, 101, 116, 117, 114, 110, 32, 110, 101, 119, 32, 109, 111, 100, 117, 108, 101, 46, 86, 105, 101, 119, 40, 97, 114, 103, 117, 109, 101, 110, 116, 115, 41, 59, 10, 9, 9, 125, 10, 9, 9, 125, 10, 9, 9, 109, 111, 100, 117, 108, 101, 46, 95, 95, 112, 114, 111, 112, 101, 114, 116, 105, 101, 115, 68, 101, 102, 105, 110, 101, 100, 95, 95, 32, 61, 32, 116, 114, 117, 101, 59, 10, 9, 9, 114, 101, 116, 117, 114, 110, 32, 109, 111, 100, 117, 108, 101, 59, 10, 10, 125, 10, 101, 120, 112, 111, 114, 116, 115, 46, 98, 111, 111, 116, 115, 116, 114, 97, 112, 32, 61, 32, 109, 111, 100, 117, 108, 101, 66, 111, 111, 116, 115, 116, 114, 97, 112, 59, 10, 0 }; | ||
|
||
struct _native { | ||
const char* name; | ||
const char* source; | ||
size_t source_length; | ||
}; | ||
|
||
static const struct _native natives[] = { | ||
|
||
{ "bootstrap", bootstrap_native, sizeof(bootstrap_native) - 1 }, | ||
|
||
{ NULL, NULL, 0 } /* sentinel */ | ||
|
||
}; | ||
|
||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
/* C++ code produced by gperf version 3.0.3 */ | ||
/* Command-line: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/gperf -L C++ -E -t /private/var/folders/0v/slqzg7hs6l74393tj2x_glh80000gn/T/gtwin/SvgView-generated/KrollGeneratedBindings.gperf */ | ||
/* Computed positions: -k'' */ | ||
|
||
#line 3 "/private/var/folders/0v/slqzg7hs6l74393tj2x_glh80000gn/T/gtwin/SvgView-generated/KrollGeneratedBindings.gperf" | ||
|
||
|
||
#include <string.h> | ||
#include <v8.h> | ||
#include <KrollBindings.h> | ||
|
||
#include "com.geraudbourdin.svgview.SvgViewModule.h" | ||
#include "com.geraudbourdin.svgview.ViewProxy.h" | ||
|
||
|
||
#line 14 "/private/var/folders/0v/slqzg7hs6l74393tj2x_glh80000gn/T/gtwin/SvgView-generated/KrollGeneratedBindings.gperf" | ||
struct titanium::bindings::BindEntry; | ||
/* maximum key range = 5, duplicates = 0 */ | ||
|
||
class SvgViewBindings | ||
{ | ||
private: | ||
static inline unsigned int hash (const char *str, unsigned int len); | ||
public: | ||
static struct titanium::bindings::BindEntry *lookupGeneratedInit (const char *str, unsigned int len); | ||
}; | ||
|
||
inline /*ARGSUSED*/ | ||
unsigned int | ||
SvgViewBindings::hash (register const char *str, register unsigned int len) | ||
{ | ||
return len; | ||
} | ||
|
||
struct titanium::bindings::BindEntry * | ||
SvgViewBindings::lookupGeneratedInit (register const char *str, register unsigned int len) | ||
{ | ||
enum | ||
{ | ||
TOTAL_KEYWORDS = 2, | ||
MIN_WORD_LENGTH = 35, | ||
MAX_WORD_LENGTH = 39, | ||
MIN_HASH_VALUE = 35, | ||
MAX_HASH_VALUE = 39 | ||
}; | ||
|
||
static struct titanium::bindings::BindEntry wordlist[] = | ||
{ | ||
{""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, | ||
{""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, | ||
{""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, | ||
{""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, | ||
#line 17 "/private/var/folders/0v/slqzg7hs6l74393tj2x_glh80000gn/T/gtwin/SvgView-generated/KrollGeneratedBindings.gperf" | ||
{"com.geraudbourdin.svgview.ViewProxy", ::com::geraudbourdin::svgview::svgview::ViewProxy::bindProxy, ::com::geraudbourdin::svgview::svgview::ViewProxy::dispose}, | ||
{""}, {""}, {""}, | ||
#line 16 "/private/var/folders/0v/slqzg7hs6l74393tj2x_glh80000gn/T/gtwin/SvgView-generated/KrollGeneratedBindings.gperf" | ||
{"com.geraudbourdin.svgview.SvgViewModule", ::com::geraudbourdin::svgview::SvgViewModule::bindProxy, ::com::geraudbourdin::svgview::SvgViewModule::dispose} | ||
}; | ||
|
||
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) | ||
{ | ||
unsigned int key = hash (str, len); | ||
|
||
if (key <= MAX_HASH_VALUE) | ||
{ | ||
register const char *s = wordlist[key].name; | ||
|
||
if (*str == *s && !strcmp (str + 1, s + 1)) | ||
return &wordlist[key]; | ||
} | ||
} | ||
return 0; | ||
} | ||
#line 18 "/private/var/folders/0v/slqzg7hs6l74393tj2x_glh80000gn/T/gtwin/SvgView-generated/KrollGeneratedBindings.gperf" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
%define lookup-function-name lookupGeneratedInit | ||
%define class-name SvgViewBindings | ||
%{ | ||
|
||
#include <string.h> | ||
#include <v8.h> | ||
#include <KrollBindings.h> | ||
|
||
#include "com.geraudbourdin.svgview.SvgViewModule.h" | ||
#include "com.geraudbourdin.svgview.ViewProxy.h" | ||
|
||
|
||
%} | ||
struct titanium::bindings::BindEntry; | ||
%% | ||
com.geraudbourdin.svgview.SvgViewModule, ::com::geraudbourdin::svgview::SvgViewModule::bindProxy, ::com::geraudbourdin::svgview::SvgViewModule::dispose | ||
com.geraudbourdin.svgview.ViewProxy, ::com::geraudbourdin::svgview::svgview::ViewProxy::bindProxy, ::com::geraudbourdin::svgview::svgview::ViewProxy::dispose | ||
%% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
/** | ||
* Appcelerator Titanium Mobile | ||
* Copyright (c) 2011 by Appcelerator, Inc. All Rights Reserved. | ||
* Licensed under the terms of the Apache Public License | ||
* Please see the LICENSE included with this distribution for details. | ||
* | ||
* Warning: This file is GENERATED, and should not be modified | ||
*/ | ||
#include <jni.h> | ||
#include <v8.h> | ||
|
||
#include <AndroidUtil.h> | ||
#include <KrollBindings.h> | ||
#include <V8Util.h> | ||
|
||
#include "BootstrapJS.cpp" | ||
#include "KrollGeneratedBindings.cpp" | ||
|
||
#define TAG "com.geraudbourdin.svgview" | ||
|
||
using namespace v8; | ||
|
||
static Persistent<Object> bindingCache; | ||
|
||
static Handle<Value> SvgView_getBinding(const Arguments& args) | ||
{ | ||
HandleScope scope; | ||
|
||
if (args.Length() == 0) { | ||
return ThrowException(Exception::Error(String::New("SvgView.getBinding requires 1 argument: binding"))); | ||
} | ||
|
||
if (bindingCache.IsEmpty()) { | ||
bindingCache = Persistent<Object>::New(Object::New()); | ||
} | ||
|
||
Handle<String> binding = args[0]->ToString(); | ||
|
||
if (bindingCache->Has(binding)) { | ||
return bindingCache->Get(binding); | ||
} | ||
|
||
String::Utf8Value bindingValue(binding); | ||
|
||
LOGD(TAG, "Looking up binding: %s", *bindingValue); | ||
|
||
titanium::bindings::BindEntry *extBinding = ::SvgViewBindings::lookupGeneratedInit( | ||
*bindingValue, bindingValue.length()); | ||
|
||
if (!extBinding) { | ||
LOGE(TAG, "Couldn't find binding: %s, returning undefined", *bindingValue); | ||
return Undefined(); | ||
} | ||
|
||
Handle<Object> exports = Object::New(); | ||
extBinding->bind(exports); | ||
bindingCache->Set(binding, exports); | ||
|
||
return exports; | ||
} | ||
|
||
static void SvgView_init(Handle<Object> exports) | ||
{ | ||
HandleScope scope; | ||
|
||
for (int i = 0; titanium::natives[i].name; ++i) { | ||
Local<String> name = String::New(titanium::natives[i].name); | ||
Handle<String> source = IMMUTABLE_STRING_LITERAL_FROM_ARRAY( | ||
titanium::natives[i].source, titanium::natives[i].source_length); | ||
|
||
exports->Set(name, source); | ||
} | ||
|
||
exports->Set(String::New("getBinding"), FunctionTemplate::New(SvgView_getBinding)->GetFunction()); | ||
} | ||
|
||
static void SvgView_dispose() | ||
{ | ||
HandleScope scope; | ||
if (bindingCache.IsEmpty()) { | ||
return; | ||
} | ||
|
||
Local<Array> propertyNames = bindingCache->GetPropertyNames(); | ||
uint32_t length = propertyNames->Length(); | ||
|
||
for (uint32_t i = 0; i < length; ++i) { | ||
String::Utf8Value binding(propertyNames->Get(i)); | ||
int bindingLength = binding.length(); | ||
|
||
titanium::bindings::BindEntry *extBinding = | ||
::SvgViewBindings::lookupGeneratedInit(*binding, bindingLength); | ||
|
||
if (extBinding && extBinding->dispose) { | ||
extBinding->dispose(); | ||
} | ||
} | ||
|
||
bindingCache.Dispose(); | ||
bindingCache = Persistent<Object>(); | ||
} | ||
|
||
static titanium::bindings::BindEntry SvgViewBinding = { | ||
"com.geraudbourdin.svgview", | ||
SvgView_init, | ||
SvgView_dispose | ||
}; | ||
|
||
// Main module entry point | ||
extern "C" JNIEXPORT void JNICALL | ||
Java_com_geraudbourdin_svgview_SvgViewBootstrap_nativeBootstrap | ||
(JNIEnv *env, jobject self) | ||
{ | ||
titanium::KrollBindings::addExternalBinding("com.geraudbourdin.svgview", &SvgViewBinding); | ||
titanium::KrollBindings::addExternalLookup(&(::SvgViewBindings::lookupGeneratedInit)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/** | ||
* Appcelerator Titanium Mobile | ||
* Copyright (c) 2011 by Appcelerator, Inc. All Rights Reserved. | ||
* Licensed under the terms of the Apache Public License | ||
* Please see the LICENSE included with this distribution for details. | ||
* | ||
* Warning: This file is GENERATED, and should not be modified | ||
*/ | ||
var bootstrap = kroll.NativeModule.require("bootstrap"), | ||
invoker = kroll.NativeModule.require("invoker"), | ||
Titanium = kroll.binding("Titanium").Titanium; | ||
|
||
function moduleBootstrap(moduleBinding) { | ||
function lazyGet(object, binding, name, namespace) { | ||
return bootstrap.lazyGet(object, binding, | ||
name, namespace, moduleBinding.getBinding); | ||
} | ||
|
||
var module = moduleBinding.getBinding("com.geraudbourdin.svgview.SvgViewModule")["SvgView"]; | ||
var invocationAPIs = module.invocationAPIs = []; | ||
module.apiName = "SvgView"; | ||
|
||
function addInvocationAPI(module, moduleNamespace, namespace, api) { | ||
invocationAPIs.push({ namespace: namespace, api: api }); | ||
} | ||
|
||
addInvocationAPI(module, "SvgView", "SvgView", "createView"); | ||
|
||
if (!("__propertiesDefined__" in module)) { | ||
Object.defineProperties(module, { | ||
"View": { | ||
get: function() { | ||
var View = lazyGet(this, "com.geraudbourdin.svgview.ViewProxy", "View", "View"); | ||
return View; | ||
}, | ||
configurable: true | ||
}, | ||
|
||
}); | ||
module.constructor.prototype.createView = function() { | ||
return new module.View(arguments); | ||
} | ||
} | ||
module.__propertiesDefined__ = true; | ||
return module; | ||
|
||
} | ||
exports.bootstrap = moduleBootstrap; |
21 changes: 21 additions & 0 deletions
21
android/build/generated/java/com/geraudbourdin/svgview/SvgViewBootstrap.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/** | ||
* Appcelerator Titanium Mobile | ||
* Copyright (c) 2011 by Appcelerator, Inc. All Rights Reserved. | ||
* Licensed under the terms of the Apache Public License | ||
* Please see the LICENSE included with this distribution for details. | ||
* | ||
* Warning: This file is GENERATED, and should not be modified | ||
*/ | ||
package com.geraudbourdin.svgview; | ||
|
||
import org.appcelerator.kroll.KrollExternalModule; | ||
|
||
public class SvgViewBootstrap implements KrollExternalModule | ||
{ | ||
public void bootstrap() | ||
{ | ||
nativeBootstrap(); | ||
} | ||
|
||
private native void nativeBootstrap(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Android.mk for com.geraudbourdin.svgview | ||
LOCAL_PATH := $(call my-dir) | ||
THIS_DIR := $(LOCAL_PATH) | ||
|
||
include $(CLEAR_VARS) | ||
|
||
THIS_DIR = $(LOCAL_PATH) | ||
LOCAL_MODULE := com.geraudbourdin.svgview | ||
LOCAL_CFLAGS := -g "-I$(TI_MOBILE_SDK)/android/native/include" | ||
|
||
# https://jira.appcelerator.org/browse/TIMOB-15263 | ||
LOCAL_DISABLE_FORMAT_STRING_CHECKS=true | ||
|
||
# Several places in generated code we set some jvalues to NULL and | ||
# since NDK r8b we'd get warnings about each one. | ||
LOCAL_CFLAGS += -Wno-conversion-null | ||
|
||
# cf https://groups.google.com/forum/?fromgroups=#!topic/android-ndk/Q8ajOD37LR0 | ||
LOCAL_CFLAGS += -Wno-psabi | ||
|
||
LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -ldl -llog -L$(TARGET_OUT) "-L$(TI_MOBILE_SDK)/android/native/libs/$(TARGET_ARCH_ABI)" -lkroll-v8 | ||
|
||
GEN_DIR := $(realpath .) | ||
GEN_JNI_DIR := $(GEN_DIR)/jni | ||
|
||
ABS_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp) | ||
BOOTSTRAP_CPP := $(wildcard $(LOCAL_PATH)/../*Bootstrap.cpp) | ||
|
||
LOCAL_SRC_FILES := $(patsubst $(LOCAL_PATH)/%,%,$(ABS_SRC_FILES)) \ | ||
$(patsubst $(LOCAL_PATH)/%,%,$(BOOTSTRAP_CPP)) | ||
|
||
$(BOOTSTRAP_CPP): $(GEN_DIR)/KrollGeneratedBindings.cpp $(GEN_DIR)/BootstrapJS.cpp | ||
|
||
$(GEN_DIR)/KrollGeneratedBindings.cpp: | ||
gperf -L C++ -E -t "$(GEN_DIR)/KrollGeneratedBindings.gperf" > "$(GEN_DIR)/KrollGeneratedBindings.cpp" | ||
|
||
$(GEN_DIR)/BootstrapJS.cpp: | ||
"$(PYTHON)" "$(TI_MOBILE_SDK)/module/android/js2c.py" "$(GEN_DIR)/BootstrapJS.cpp" "$(GEN_DIR)/bootstrap.js" | ||
|
||
include $(BUILD_SHARED_LIBRARY) |
Oops, something went wrong.