Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jonatansberg committed Jan 28, 2015
0 parents commit fa1466c
Show file tree
Hide file tree
Showing 193 changed files with 5,844 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.DS_Store
tmp
libs
bin
build
android/dist/*.jar
.apt_generated
.classpath
build.properties
1 change: 1 addition & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TODO: place your license here and we'll include it in the module distribution
106 changes: 106 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
Appcelerator Titanium Mobile Module Project
===========================================

This is a skeleton Titanium Mobile Mobile module project.


MODULE NAMING
-------------

Choose a unique module id for your module. This ID usually follows a namespace
convention using DNS notation. For example, com.appcelerator.module.test. This
ID can only be used once by all public modules in Titanium.


GET STARTED
------------

1. Edit manifest with the appropriate details about your module.
2. Edit LICENSE to add your license details.
3. Place any assets (such as PNG files) that are required anywhere in the module folder.
4. Edit the timodule.json and configure desired settings.
5. Code and build.


DOCUMENTATION FOR YOUR MODULE
-----------------------------

You should provide at least minimal documentation for your module in `documentation` folder using the Markdown syntax.

For more information on the Markdown syntax, refer to this documentation at:

<http://daringfireball.net/projects/markdown/>


TEST HARNESS EXAMPLE FOR YOUR MODULE
------------------------------------

The `example` directory contains a skeleton application test harness that can be
used for testing and providing an example of usage to the users of your module.


BUILDING YOUR MODULE
--------------------

Simply run `titanium build --platform <name of platform> --build-type production --dir /path/to/module`.
You can omit the --dir option if your working directory is in the module's project directory.


INSTALL YOUR MODULE
-------------------

Mac OS X
--------
Copy the distribution zip file into the `~/Library/Application Support/Titanium` folder

Linux
-----
Copy the distribution zip file into the `~/.titanium` folder

Windows
-------
Copy the distribution zip file into the `C:\ProgramData\Titanium` folder


REGISTER YOUR MODULE
--------------------

Register your module with your application by editing `tiapp.xml` and adding your module.
Example:

<modules>
<module version="0.1">com.universalavenue.ticrosswalk</module>
</modules>

When you run your project, the compiler will combine your module along with its dependencies
and assets into the application.


USING YOUR MODULE IN CODE
-------------------------

To use your module in code, you will need to require it.

For example,

var my_module = require('com.universalavenue.ticrosswalk');
my_module.foo();


TESTING YOUR MODULE
-------------------

To test with the script, execute:

titanium run --dir=YOURMODULEDIR

This will execute the app.js in the example folder as a Titanium application.


DISTRIBUTING YOUR MODULE
-------------------------

You can choose to manually distribute your module distribution zip file or through the Titanium Marketplace!


Cheers!
29 changes: 29 additions & 0 deletions android/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>TiCrosswalk</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.appcelerator.titanium.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.aptana.ide.core.unifiedBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>com.appcelerator.titanium.mobile.module.nature</nature>
<nature>com.aptana.projects.webnature</nature>
</natures>
</projectDescription>
7 changes: 7 additions & 0 deletions android/.settings/org.eclipse.jdt.apt.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#Thu Sep 02 15:18:34 CDT 2010
eclipse.preferences.version=1
org.eclipse.jdt.apt.aptEnabled=true
org.eclipse.jdt.apt.genSrcDir=.apt_generated
org.eclipse.jdt.apt.reconcileEnabled=true

org.eclipse.jdt.apt.processorOptions/kroll.jsonFile=TiCrosswalk.json
3 changes: 3 additions & 0 deletions android/.settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#Thu Sep 02 15:18:34 CDT 2010
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.processAnnotations=enabled
1 change: 1 addition & 0 deletions android/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TODO: place your license here and we'll include it in the module distribution
9 changes: 9 additions & 0 deletions android/assets/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Place your assets like PNG files in this directory and they will be packaged
with your module.

All JavaScript files in the assets directory are IGNORED except if you create a
file named "com.universalavenue.ticrosswalk.js" in this directory in which case it will be
wrapped by native code, compiled, and used as your module. This allows you to
run pure JavaScript modules that are pre-compiled.

Note: Mobile Web does not support this assets directory.
45 changes: 45 additions & 0 deletions android/build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<project name="ticrosswalk" default="dist">
<description>
Ant build script for Titanium Android module TiCrosswalk
</description>

<property name="ti.module.root" location="${basedir}"/>
<property file="build.properties" />

<!-- Copy documentation subdirectories -->
<mkdir dir="${basedir}/documentation"/>
<copy todir="${basedir}/documentation">
<fileset dir="${basedir}/../documentation"/>
</copy>

<!-- Copy example subdirectories -->
<mkdir dir="${basedir}/example"/>
<copy todir="${basedir}/example">
<fileset dir="${basedir}/../example"/>
</copy>

<!-- Copy assets subdirectories -->
<mkdir dir="${basedir}/assets"/>
<copy todir="${basedir}/assets">
<fileset dir="${basedir}/../assets"/>
</copy>

<!-- Copy license -->
<copy todir="${basedir}" file="${basedir}/../LICENSE"/>

<target name="cleancopy" description="Delete old copies">
<delete dir="${basedir}/documentation"/>
<delete dir="${basedir}/example"/>
<delete dir="${basedir}/assets"/>
<delete file="${basedir}/LICENSE"/>
</target>

<import file="${titanium.platform}/../module/android/build.xml"/>

<copy todir="${libs}">
<fileset dir="${basedir}/xwalk_core_library">
<include name="**/*"/>
<exclude name="**/libstlport_shared.so"/>
</fileset>
</copy>
</project>
Binary file not shown.
39 changes: 39 additions & 0 deletions android/documentation/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# TiCrosswalk Module

## Description

TODO: Enter your module description here

## Accessing the TiCrosswalk Module

To access this module from JavaScript, you would do the following:

var ticrosswalk = require("com.universalavenue.ticrosswalk");

The ticrosswalk variable is a reference to the Module object.

## Reference

TODO: If your module has an API, you should document
the reference here.

### ticrosswalk.function

TODO: This is an example of a module function.

### ticrosswalk.property

TODO: This is an example of a module property.

## Usage

TODO: Enter your usage example here

## Author

TODO: Enter your author name, email and other contact
details you want to share here.

## License

TODO: Enter your license/legal information here.
39 changes: 39 additions & 0 deletions android/example/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// This is a test harness for your module
// You should do something interesting in this harness
// to test out the module and to provide instructions
// to users on how to use it by example.


// open a single window
var win = Ti.UI.createWindow({
backgroundColor:'white'
});
var label = Ti.UI.createLabel();
win.add(label);
win.open();

// TODO: write your module tests here
var ticrosswalk = require('com.universalavenue.ticrosswalk');
Ti.API.info("module is => " + ticrosswalk);

label.text = ticrosswalk.example();

Ti.API.info("module exampleProp is => " + ticrosswalk.exampleProp);
ticrosswalk.exampleProp = "This is a test value";

if (Ti.Platform.name == "android") {
var proxy = ticrosswalk.createExample({
message: "Creating an example Proxy",
backgroundColor: "red",
width: 100,
height: 100,
top: 100,
left: 150
});

proxy.printMessage("Hello world!");
proxy.message = "Hi world!. It's me again.";
proxy.printMessage("Hello world!");
win.add(proxy);
}

2 changes: 2 additions & 0 deletions android/lib/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
You can place any .jar dependencies in this directory and they will be included
when your module is being compiled.
Binary file added android/lib/xwalk_core_library-10.39.235.15.jar
Binary file not shown.
19 changes: 19 additions & 0 deletions android/manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#
# this is your module manifest and used by Titanium
# during compilation, packaging, distribution, etc.
#
version: 1.0.0
apiversion: 2
description: TiCrosswalk
author: Jonatan Lundin
license: Specify your license
copyright: Copyright (c) 2015 by Your Company

respackage: org.xwalk.core

# these should not be edited
name: TiCrosswalk
moduleid: com.universalavenue.ticrosswalk
guid: 5af1ea1e-f0e4-4c4f-b71d-f448865806c4
platform: android
minsdk: 3.4.1.GA
3 changes: 3 additions & 0 deletions android/platform/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
You can place platform-specific files here in sub-folders named "android" and/or "iphone", just as you can with normal Titanium Mobile SDK projects. Any folders and files you place here will be merged with the platform-specific files in a Titanium Mobile project that uses this module.

When a Titanium Mobile project that uses this module is built, the files from this platform/ folder will be treated the same as files (if any) from the Titanium Mobile project's platform/ folder.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added android/platform/android/res/drawable/bubble.9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 36 additions & 0 deletions android/platform/android/res/drawable/color_button_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2013 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->

<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:top="0dp"
android:right="0dp"
android:bottom="0dp"
android:left="0dp">
<shape android:shape="rectangle">
<solid android:color="@color/color_picker_border_color"/>
</shape>
</item>
<item android:top="0px"
android:right="1px"
android:bottom="0px"
android:left="1px">
<shape android:shape="rectangle">
<solid android:color="@color/color_picker_background_color"/>
</shape>
</item>
<item
android:id="@+id/color_button_swatch"
android:top="1px"
android:right="2px"
android:bottom="1px"
android:left="2px">
<shape android:shape="rectangle">
<solid android:color="#FF0000"/>
</shape>
</item>
</layer-list>
12 changes: 12 additions & 0 deletions android/platform/android/res/drawable/color_picker_border.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2013 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->

<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">

<stroke android:width="1px" android:color="@color/color_picker_border_color" />
<solid android:color="@color/color_picker_background_color"/>
</shape>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>

<!-- Copyright 2014 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->

<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_above_anchor="true"
android:drawable="@drawable/dropdown_popup_background_up" />
<item android:drawable="@drawable/dropdown_popup_background_down" />
</selector>
Loading

0 comments on commit fa1466c

Please sign in to comment.