JavaScript support for DALi 57/34057/15
authorNick Holland <nick.holland@partner.samsung.com>
Tue, 20 Jan 2015 16:02:00 +0000 (16:02 +0000)
committerNick Holland <nick.holland@partner.samsung.com>
Thu, 26 Feb 2015 10:57:01 +0000 (10:57 +0000)
Configure with --enable-javascript to use
Requires v8 to build (v3.25.19)

git clone git://github.com/v8/v8.git
cd v8
git checkout 5475d473f7fa6f33296276e7b25fc1fe955ab166

Change-Id: Ic22273ab0875e6e21186261fe88a2ac57af162ae

187 files changed:
build/tizen/Makefile.am
build/tizen/configure.ac
build/tizen/dali-toolkit/Makefile.am
build/tizen/plugins/Makefile.am [new file with mode: 0644]
dali-toolkit/dali-toolkit.h
dali-toolkit/internal/file.list
dali-toolkit/internal/scripting/script-impl.cpp [new file with mode: 0644]
dali-toolkit/internal/scripting/script-impl.h [new file with mode: 0644]
dali-toolkit/internal/scripting/script-plugin-proxy.cpp [new file with mode: 0644]
dali-toolkit/internal/scripting/script-plugin-proxy.h [new file with mode: 0644]
dali-toolkit/public-api/file.list
dali-toolkit/public-api/scripting/script-plugin.h [new file with mode: 0644]
dali-toolkit/public-api/scripting/script.cpp [new file with mode: 0644]
dali-toolkit/public-api/scripting/script.h [new file with mode: 0644]
docs/content/images/screenshot.png
docs/content/shared-javascript-and-cpp-documentation/multi-touch-guide.md [new file with mode: 0644]
plugins/dali-script-v8/.gitignore [new file with mode: 0644]
plugins/dali-script-v8/docs/.gitignore [new file with mode: 0644]
plugins/dali-script-v8/docs/README.txt [new file with mode: 0644]
plugins/dali-script-v8/docs/content/actor.js [new file with mode: 0644]
plugins/dali-script-v8/docs/content/animation.js [new file with mode: 0644]
plugins/dali-script-v8/docs/content/camera-actor.js [new file with mode: 0644]
plugins/dali-script-v8/docs/content/constants.js [new file with mode: 0644]
plugins/dali-script-v8/docs/content/dali.js [new file with mode: 0644]
plugins/dali-script-v8/docs/content/helpers.js [new file with mode: 0644]
plugins/dali-script-v8/docs/content/image-actor.js [new file with mode: 0644]
plugins/dali-script-v8/docs/content/image.js [new file with mode: 0644]
plugins/dali-script-v8/docs/content/keyboard-focus-manager.js [new file with mode: 0644]
plugins/dali-script-v8/docs/content/layer-actor.js [new file with mode: 0644]
plugins/dali-script-v8/docs/content/module-loader.js [new file with mode: 0644]
plugins/dali-script-v8/docs/content/pan-gesture-detector.js [new file with mode: 0644]
plugins/dali-script-v8/docs/content/path-animation.js [new file with mode: 0644]
plugins/dali-script-v8/docs/content/render-task.js [new file with mode: 0644]
plugins/dali-script-v8/docs/content/renderable-actor.js [new file with mode: 0644]
plugins/dali-script-v8/docs/content/resource-image.js [new file with mode: 0644]
plugins/dali-script-v8/docs/content/shader-effect.js [new file with mode: 0644]
plugins/dali-script-v8/docs/content/stage.js [new file with mode: 0644]
plugins/dali-script-v8/docs/content/text-actor.js [new file with mode: 0644]
plugins/dali-script-v8/docs/content/texture-atlases.js [new file with mode: 0644]
plugins/dali-script-v8/docs/content/texture-compression.js [new file with mode: 0644]
plugins/dali-script-v8/docs/dali-theme/assets/css/external-small.png [new file with mode: 0644]
plugins/dali-script-v8/docs/dali-theme/assets/css/logo.png [new file with mode: 0644]
plugins/dali-script-v8/docs/dali-theme/assets/css/main.css [new file with mode: 0644]
plugins/dali-script-v8/docs/dali-theme/assets/favicon.png [new file with mode: 0644]
plugins/dali-script-v8/docs/dali-theme/assets/img/example-javascript-code.png [new file with mode: 0644]
plugins/dali-script-v8/docs/dali-theme/assets/img/focus-manager.png [new file with mode: 0644]
plugins/dali-script-v8/docs/dali-theme/assets/img/fragment-shader-color.png [new file with mode: 0644]
plugins/dali-script-v8/docs/dali-theme/assets/img/fragment-shader-reveal.png [new file with mode: 0644]
plugins/dali-script-v8/docs/dali-theme/assets/img/keyframe-animation.png [new file with mode: 0644]
plugins/dali-script-v8/docs/dali-theme/assets/img/path.png [new file with mode: 0644]
plugins/dali-script-v8/docs/dali-theme/assets/img/shader-animation.png [new file with mode: 0644]
plugins/dali-script-v8/docs/dali-theme/assets/img/shader-grid-hint.png [new file with mode: 0644]
plugins/dali-script-v8/docs/dali-theme/assets/img/shared [new symlink]
plugins/dali-script-v8/docs/dali-theme/assets/img/spinner.gif [new file with mode: 0644]
plugins/dali-script-v8/docs/dali-theme/assets/img/stage.png [new file with mode: 0644]
plugins/dali-script-v8/docs/dali-theme/assets/img/vertex-shader.png [new file with mode: 0644]
plugins/dali-script-v8/docs/dali-theme/assets/index.html [new file with mode: 0644]
plugins/dali-script-v8/docs/dali-theme/assets/js/api-filter.js [new file with mode: 0644]
plugins/dali-script-v8/docs/dali-theme/assets/js/api-list.js [new file with mode: 0644]
plugins/dali-script-v8/docs/dali-theme/assets/js/api-search.js [new file with mode: 0644]
plugins/dali-script-v8/docs/dali-theme/assets/js/apidocs.js [new file with mode: 0644]
plugins/dali-script-v8/docs/dali-theme/assets/js/yui-prettify.js [new file with mode: 0644]
plugins/dali-script-v8/docs/dali-theme/assets/vendor/prettify/CHANGES.html [new file with mode: 0644]
plugins/dali-script-v8/docs/dali-theme/assets/vendor/prettify/COPYING [new file with mode: 0644]
plugins/dali-script-v8/docs/dali-theme/assets/vendor/prettify/prettify-min.css [new file with mode: 0644]
plugins/dali-script-v8/docs/dali-theme/assets/vendor/prettify/prettify-min.js [new file with mode: 0644]
plugins/dali-script-v8/docs/dali-theme/layouts/main.handlebars [new file with mode: 0644]
plugins/dali-script-v8/docs/dali-theme/layouts/xhr.handlebars [new file with mode: 0644]
plugins/dali-script-v8/docs/dali-theme/partials/attrs.handlebars [new file with mode: 0644]
plugins/dali-script-v8/docs/dali-theme/partials/classes.handlebars [new file with mode: 0644]
plugins/dali-script-v8/docs/dali-theme/partials/events.handlebars [new file with mode: 0644]
plugins/dali-script-v8/docs/dali-theme/partials/files.handlebars [new file with mode: 0644]
plugins/dali-script-v8/docs/dali-theme/partials/index.handlebars [new file with mode: 0644]
plugins/dali-script-v8/docs/dali-theme/partials/method.handlebars [new file with mode: 0644]
plugins/dali-script-v8/docs/dali-theme/partials/module.handlebars [new file with mode: 0644]
plugins/dali-script-v8/docs/dali-theme/partials/options.handlebars [new file with mode: 0644]
plugins/dali-script-v8/docs/dali-theme/partials/props.handlebars [new file with mode: 0644]
plugins/dali-script-v8/docs/dali-theme/partials/sidebar.handlebars [new file with mode: 0644]
plugins/dali-script-v8/docs/dali-theme/theme.json [new file with mode: 0644]
plugins/dali-script-v8/docs/gmon.out [new file with mode: 0644]
plugins/dali-script-v8/docs/yuidoc.json [new file with mode: 0644]
plugins/dali-script-v8/file.list [new file with mode: 0644]
plugins/dali-script-v8/src/actors/actor-api.cpp [new file with mode: 0644]
plugins/dali-script-v8/src/actors/actor-api.h [new file with mode: 0644]
plugins/dali-script-v8/src/actors/actor-wrapper.cpp [new file with mode: 0644]
plugins/dali-script-v8/src/actors/actor-wrapper.h [new file with mode: 0644]
plugins/dali-script-v8/src/actors/camera-actor-api.cpp [new file with mode: 0644]
plugins/dali-script-v8/src/actors/camera-actor-api.h [new file with mode: 0644]
plugins/dali-script-v8/src/actors/image-actor-api.cpp [new file with mode: 0644]
plugins/dali-script-v8/src/actors/image-actor-api.h [new file with mode: 0644]
plugins/dali-script-v8/src/actors/layer-api.cpp [new file with mode: 0644]
plugins/dali-script-v8/src/actors/layer-api.h [new file with mode: 0644]
plugins/dali-script-v8/src/actors/mesh-actor-api.cpp [new file with mode: 0644]
plugins/dali-script-v8/src/actors/mesh-actor-api.h [new file with mode: 0644]
plugins/dali-script-v8/src/actors/renderable-actor-api.cpp [new file with mode: 0644]
plugins/dali-script-v8/src/actors/renderable-actor-api.h [new file with mode: 0644]
plugins/dali-script-v8/src/actors/text-actor-api.cpp [new file with mode: 0644]
plugins/dali-script-v8/src/actors/text-actor-api.h [new file with mode: 0644]
plugins/dali-script-v8/src/animation/animation-api.cpp [new file with mode: 0644]
plugins/dali-script-v8/src/animation/animation-api.h [new file with mode: 0644]
plugins/dali-script-v8/src/animation/animation-wrapper.cpp [new file with mode: 0644]
plugins/dali-script-v8/src/animation/animation-wrapper.h [new file with mode: 0644]
plugins/dali-script-v8/src/animation/path-api.cpp [new file with mode: 0644]
plugins/dali-script-v8/src/animation/path-api.h [new file with mode: 0644]
plugins/dali-script-v8/src/animation/path-wrapper.cpp [new file with mode: 0644]
plugins/dali-script-v8/src/animation/path-wrapper.h [new file with mode: 0644]
plugins/dali-script-v8/src/constants/constants-wrapper.cpp [new file with mode: 0644]
plugins/dali-script-v8/src/constants/constants-wrapper.h [new file with mode: 0644]
plugins/dali-script-v8/src/dali-script-v8.cpp [new file with mode: 0644]
plugins/dali-script-v8/src/dali-script-v8.h [new file with mode: 0644]
plugins/dali-script-v8/src/dali-wrapper.cpp [new file with mode: 0644]
plugins/dali-script-v8/src/dali-wrapper.h [new file with mode: 0644]
plugins/dali-script-v8/src/events/event-object-generator.cpp [new file with mode: 0644]
plugins/dali-script-v8/src/events/event-object-generator.h [new file with mode: 0644]
plugins/dali-script-v8/src/events/pan-gesture-detector-api.cpp [new file with mode: 0644]
plugins/dali-script-v8/src/events/pan-gesture-detector-api.h [new file with mode: 0644]
plugins/dali-script-v8/src/events/pan-gesture-detector-wrapper.cpp [new file with mode: 0644]
plugins/dali-script-v8/src/events/pan-gesture-detector-wrapper.h [new file with mode: 0644]
plugins/dali-script-v8/src/garbage-collector/garbage-collector.cpp [new file with mode: 0644]
plugins/dali-script-v8/src/garbage-collector/garbage-collector.h [new file with mode: 0644]
plugins/dali-script-v8/src/image/buffer-image-api.cpp [new file with mode: 0644]
plugins/dali-script-v8/src/image/buffer-image-api.h [new file with mode: 0644]
plugins/dali-script-v8/src/image/frame-buffer-image-api.cpp [new file with mode: 0644]
plugins/dali-script-v8/src/image/frame-buffer-image-api.h [new file with mode: 0644]
plugins/dali-script-v8/src/image/image-api.cpp [new file with mode: 0644]
plugins/dali-script-v8/src/image/image-api.h [new file with mode: 0644]
plugins/dali-script-v8/src/image/image-attributes-api.cpp [new file with mode: 0644]
plugins/dali-script-v8/src/image/image-attributes-api.h [new file with mode: 0644]
plugins/dali-script-v8/src/image/image-attributes-wrapper.cpp [new file with mode: 0644]
plugins/dali-script-v8/src/image/image-attributes-wrapper.h [new file with mode: 0644]
plugins/dali-script-v8/src/image/image-wrapper.cpp [new file with mode: 0644]
plugins/dali-script-v8/src/image/image-wrapper.h [new file with mode: 0644]
plugins/dali-script-v8/src/image/native-image-api.cpp [new file with mode: 0644]
plugins/dali-script-v8/src/image/native-image-api.h [new file with mode: 0644]
plugins/dali-script-v8/src/image/nine-patch-image-api.cpp [new file with mode: 0644]
plugins/dali-script-v8/src/image/nine-patch-image-api.h [new file with mode: 0644]
plugins/dali-script-v8/src/image/resource-image-api.cpp [new file with mode: 0644]
plugins/dali-script-v8/src/image/resource-image-api.h [new file with mode: 0644]
plugins/dali-script-v8/src/interfaces/garbage-collector-interface.h [new file with mode: 0644]
plugins/dali-script-v8/src/module-loader/module-loader.cpp [new file with mode: 0644]
plugins/dali-script-v8/src/module-loader/module-loader.h [new file with mode: 0644]
plugins/dali-script-v8/src/module-loader/module.cpp [new file with mode: 0644]
plugins/dali-script-v8/src/module-loader/module.h [new file with mode: 0644]
plugins/dali-script-v8/src/object/handle-wrapper.cpp [new file with mode: 0644]
plugins/dali-script-v8/src/object/handle-wrapper.h [new file with mode: 0644]
plugins/dali-script-v8/src/object/property-value-wrapper.cpp [new file with mode: 0644]
plugins/dali-script-v8/src/object/property-value-wrapper.h [new file with mode: 0644]
plugins/dali-script-v8/src/render-tasks/render-task-api.cpp [new file with mode: 0644]
plugins/dali-script-v8/src/render-tasks/render-task-api.h [new file with mode: 0644]
plugins/dali-script-v8/src/render-tasks/render-task-list-api.cpp [new file with mode: 0644]
plugins/dali-script-v8/src/render-tasks/render-task-list-api.h [new file with mode: 0644]
plugins/dali-script-v8/src/render-tasks/render-task-list-wrapper.cpp [new file with mode: 0644]
plugins/dali-script-v8/src/render-tasks/render-task-list-wrapper.h [new file with mode: 0644]
plugins/dali-script-v8/src/render-tasks/render-task-wrapper.cpp [new file with mode: 0644]
plugins/dali-script-v8/src/render-tasks/render-task-wrapper.h [new file with mode: 0644]
plugins/dali-script-v8/src/shader-effects/shader-effect-api.cpp [new file with mode: 0644]
plugins/dali-script-v8/src/shader-effects/shader-effect-api.h [new file with mode: 0644]
plugins/dali-script-v8/src/shader-effects/shader-effect-wrapper.cpp [new file with mode: 0644]
plugins/dali-script-v8/src/shader-effects/shader-effect-wrapper.h [new file with mode: 0644]
plugins/dali-script-v8/src/shared/api-function.h [new file with mode: 0644]
plugins/dali-script-v8/src/shared/base-wrapped-object.cpp [new file with mode: 0644]
plugins/dali-script-v8/src/shared/base-wrapped-object.h [new file with mode: 0644]
plugins/dali-script-v8/src/shared/object-template-helper.cpp [new file with mode: 0644]
plugins/dali-script-v8/src/shared/object-template-helper.h [new file with mode: 0644]
plugins/dali-script-v8/src/signals/dali-any-javascript-converter.cpp [new file with mode: 0644]
plugins/dali-script-v8/src/signals/dali-any-javascript-converter.h [new file with mode: 0644]
plugins/dali-script-v8/src/signals/emit-notification-interface.h [new file with mode: 0644]
plugins/dali-script-v8/src/signals/signal-manager.cpp [new file with mode: 0644]
plugins/dali-script-v8/src/signals/signal-manager.h [new file with mode: 0644]
plugins/dali-script-v8/src/stage/stage-api.cpp [new file with mode: 0644]
plugins/dali-script-v8/src/stage/stage-api.h [new file with mode: 0644]
plugins/dali-script-v8/src/stage/stage-wrapper.cpp [new file with mode: 0644]
plugins/dali-script-v8/src/stage/stage-wrapper.h [new file with mode: 0644]
plugins/dali-script-v8/src/text/font-api.cpp [new file with mode: 0644]
plugins/dali-script-v8/src/text/font-api.h [new file with mode: 0644]
plugins/dali-script-v8/src/text/font-wrapper.cpp [new file with mode: 0644]
plugins/dali-script-v8/src/text/font-wrapper.h [new file with mode: 0644]
plugins/dali-script-v8/src/toolkit/builder/builder-api.cpp [new file with mode: 0644]
plugins/dali-script-v8/src/toolkit/builder/builder-api.h [new file with mode: 0644]
plugins/dali-script-v8/src/toolkit/builder/builder-wrapper.cpp [new file with mode: 0644]
plugins/dali-script-v8/src/toolkit/builder/builder-wrapper.h [new file with mode: 0644]
plugins/dali-script-v8/src/toolkit/focus-manager/keyboard-focus-manager-api.cpp [new file with mode: 0644]
plugins/dali-script-v8/src/toolkit/focus-manager/keyboard-focus-manager-api.h [new file with mode: 0644]
plugins/dali-script-v8/src/toolkit/focus-manager/keyboard-focus-manager-wrapper.cpp [new file with mode: 0644]
plugins/dali-script-v8/src/toolkit/focus-manager/keyboard-focus-manager-wrapper.h [new file with mode: 0644]
plugins/dali-script-v8/src/utils/v8-utils.cpp [new file with mode: 0644]
plugins/dali-script-v8/src/utils/v8-utils.h [new file with mode: 0644]

index 1ff34c2..f633e75 100644 (file)
 # limitations under the License.
 #
 
-SUBDIRS = dali-toolkit docs
+SUBDIRS = dali-toolkit
+
+if ENABLE_JAVASCRIPT_PLUGIN
+SUBDIRS +=plugins
+endif
+
+# perform documentation last, so it doesn't prevent code from building if there's an error
+SUBDIRS += docs
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = dali-toolkit.pc
index 4c4afda..c1858ef 100644 (file)
@@ -46,14 +46,27 @@ AC_ARG_ENABLE([debug],
               [enable_debug=$enableval],
               [enable_debug=no])
 
+# option for JavaScript plugin
+AC_ARG_ENABLE(javascript,
+              [AC_HELP_STRING([--enable-javascript],
+                              [Enable JavaScript plugin])] ,
+               [enable_javascript=yes],
+               [enable_javascript=no])
+
 if test "x$enable_debug" = "xyes"; then
   DALI_TOOLKIT_CFLAGS="$DALI_TOOLKIT_CFLAGS -DDEBUG_ENABLED"
+  DALI_SCRIPTV8_CFLAGS="$DALI_TOOLKIT_CFLAGS -DDEBUG_ENABLED"
 fi
 
 if test "x$enable_debug" = "xno" -a "x$enable_exportall" = "xno"; then
   DALI_TOOLKIT_CFLAGS="$DALI_TOOLKIT_CFLAGS -fvisibility=hidden -DHIDE_DALI_INTERNALS"
+  DALI_SCRIPTV8_CFLAGS="$DALI_TOOLKIT_CFLAGS -fvisibility=hidden -DHIDE_DALI_INTERNALS"
 fi
 
+#set a variable for the makefile to conditionally compile the plugin
+AM_CONDITIONAL([ENABLE_JAVASCRIPT_PLUGIN], [test x$enable_javascript = xyes])
+
+
 # Tizen Profile options
 AC_ARG_ENABLE([profile],
               [AC_HELP_STRING([--enable-profile=COMMON,MOBILE,LITE,WEARABLE,TV],
@@ -76,6 +89,8 @@ fi
 AC_SUBST(dataReadWriteDir)
 AC_SUBST(dataReadOnlyDir)
 AC_SUBST(DALI_TOOLKIT_CFLAGS)
+AC_SUBST(DALI_SCRIPTV8_CFLAGS)
+AC_SUBST(DALI_SCRIPTV8_LIBS)
 
 # Specify the include directory for development headers
 #devincludepath=${includedir}/dali/internal
@@ -91,6 +106,7 @@ AC_SUBST(DOXYGEN_ROOT_DIR)
 AC_CONFIG_FILES([
  Makefile
  dali-toolkit/Makefile
+ plugins/Makefile
  dali-toolkit.pc
  docs/Makefile
  docs/dali.doxy
@@ -103,6 +119,7 @@ Configuration
 -------------
   Prefix:                           $prefix
   Debug Build:                      $enable_debug
+  JavaScript support (V8 required)  $enable_javascript
   Profile:                          $dali_profile
   Data Dir (Read/Write):            $dataReadWriteDir
   Data Dir (Read Only):             $dataReadOnlyDir
index aab631d..e966482 100644 (file)
@@ -111,6 +111,7 @@ publicapishadereffectsdir = $(publicapidir)/shader-effects
 publicapibubbleeffectdir = $(publicapidir)/shader-effects/bubble-effect
 publicapistylingdir = $(publicapidir)/styling
 publicapitransitioneffectsdir = $(publicapidir)/transition-effects
+publicapiscriptingdir = $(publicapidir)/scripting
 
 publicapi_HEADERS = $(public_api_header_files)
 publicapicontrols_HEADERS = $(public_api_controls_header_files)
@@ -129,6 +130,7 @@ publicapinavigationframe_HEADERS = $(public_api_navigation_frame_header_files)
 publicapipageturnview_HEADERS = $(public_api_page_turn_view_header_files)
 publicapipopup_HEADERS = $(public_api_popup_header_files)
 publicapiscrollbar_HEADERS = $(public_api_scroll_bar_header_files)
+
 publicapiscrollcomponent_HEADERS = $(public_api_scroll_component_header_files)
 publicapiscrollable_HEADERS = $(public_api_scrollable_header_files)
 publicapiscrollview_HEADERS = $(public_api_scroll_view_header_files)
@@ -149,3 +151,5 @@ publicapishadereffects_HEADERS = $(public_api_shader_effects_header_files)
 publicapibubbleeffect_HEADERS = $(public_api_bubble_effect_header_files)
 publicapistyling_HEADERS = $(public_api_styling_header_files)
 publicapitransitioneffects_HEADERS = $(public_api_transition_effects_header_files)
+publicapiscripting_HEADERS = $(public_api_scripting_header_files)
+
diff --git a/build/tizen/plugins/Makefile.am b/build/tizen/plugins/Makefile.am
new file mode 100644 (file)
index 0000000..d80dd67
--- /dev/null
@@ -0,0 +1,61 @@
+#
+# Copyright (c) 2015 Samsung Electronics Co., Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# Build the Dali Toolkit library
+
+plugin_src_dir = ../../../plugins
+
+include ../../../plugins/dali-script-v8/file.list
+
+DALI_SCRIPTV8_LIBS="-lv8 -lpthread"
+
+lib_LTLIBRARIES = libdali-script-plugin-v8.la
+
+# force the source code to include the directory the wrapper file is in
+# e.g. actors/actor-api.h to copy the same include style as dali-core
+# The reason for including toolkit paths directly instead of just the
+# install path for dali-toolkit.h, is dali-toolkit.h is not installed yet.
+# It won't be installed until the rpm is installed, and unfortunately the
+# plugin is part of the same rpm
+script_plugin_v8_includes = -I../../../plugins/dali-script-v8/src \
+                         -I../../../plugins/dali-script-v8/src/utils \
+                         -I../../../
+
+
+libdali_script_plugin_v8_la_SOURCES = \
+                     $(script_v8_plugin_src_files)
+
+libdali_script_plugin_v8_la_DEPENDENCIES =
+
+libdali_script_plugin_v8_la_CXXFLAGS = -DDALI_COMPILATION \
+                            $(DALI_TOOLKIT_CFLAGS) \
+                            $(DALICORE_CFLAGS) \
+                            -DDALI_DATA_READ_ONLY_DIR="\"${dataReadOnlyDir}\"" \
+                            $(DALI_CFLAGS) \
+                            $(DLOG_CFLAGS) \
+                            $(DALI_SCRIPTV8_CFLAGS) \
+                            -I../../.. \
+                            $(script_plugin_v8_includes) \
+                            -Werror -Wall
+
+libdali_script_plugin_v8_la_LIBADD = \
+                            $(DALICORE_LIBS) \
+                            $(DALI_LIBS) \
+                            $(DLOG_LIBS) \
+                            $(DALI_SCRIPTV8_LIBS)
+
+libdali_script_plugin_v8_la_LDFLAGS = \
+                           -rdynamic
index 70f9652..2acf635 100644 (file)
@@ -21,7 +21,8 @@
 #include <dali/dali.h>
 
 // Toolkit
-
+#include <dali-toolkit/public-api/builder/builder.h>
+#include <dali-toolkit/public-api/builder/tree-node.h>
 #include <dali-toolkit/public-api/controls/alignment/alignment.h>
 #include <dali-toolkit/public-api/controls/bloom-view/bloom-view.h>
 #include <dali-toolkit/public-api/controls/bubble-effect/bubble-emitter.h>
@@ -85,6 +86,9 @@
 
 #include <dali-toolkit/public-api/markup-processor/markup-processor.h>
 
+#include <dali-toolkit/public-api/scripting/script.h>
+#include <dali-toolkit/public-api/scripting/script-plugin.h>
+
 #include <dali-toolkit/public-api/shader-effects/alpha-discard-effect.h>
 #include <dali-toolkit/public-api/shader-effects/bendy-effect.h>
 #include <dali-toolkit/public-api/shader-effects/blind-effect.h>
index da91a77..bebe657 100644 (file)
@@ -95,5 +95,8 @@ toolkit_src_files = \
    $(toolkit_src_dir)/transition-effects/cube-transition-effect-impl.cpp \
    $(toolkit_src_dir)/transition-effects/cube-transition-cross-effect-impl.cpp \
    $(toolkit_src_dir)/transition-effects/cube-transition-fold-effect-impl.cpp \
-   $(toolkit_src_dir)/transition-effects/cube-transition-wave-effect-impl.cpp
+   $(toolkit_src_dir)/transition-effects/cube-transition-wave-effect-impl.cpp \
+   $(toolkit_src_dir)/scripting/script-impl.cpp \
+   $(toolkit_src_dir)/scripting/script-plugin-proxy.cpp
+
 
diff --git a/dali-toolkit/internal/scripting/script-impl.cpp b/dali-toolkit/internal/scripting/script-impl.cpp
new file mode 100644 (file)
index 0000000..8b08f99
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// CLASS HEADER
+#include "script-impl.h"
+
+// INTERNAL INCLUDES
+#include <dali/integration-api/debug.h>
+#include "script-plugin-proxy.h"
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+namespace Internal
+{
+
+namespace
+{
+const char* PLUGIN_FILE = "libdali-script-plugin-v8.so";
+}
+
+void Script::ExecuteFile( const std::string& filename )
+{
+  if( mPlugin )
+  {
+    mPlugin->ExecuteFile(filename);
+  }
+}
+
+Script::Script(void) : mPlugin(NULL)
+{
+  ScriptPluginProxy *plugin = new ScriptPluginProxy( PLUGIN_FILE );
+
+  if( mPlugin )
+  {
+    DALI_LOG_WARNING("Reloading script plugin %s, is this what you wanted to do?",PLUGIN_FILE);
+    delete mPlugin;
+    mPlugin = NULL;
+  }
+
+  if( plugin->IsInitialized() )
+  {
+    mPlugin = plugin;
+  }
+  else
+  {
+    delete plugin;
+  }
+
+}
+
+Script::~Script()
+{
+  if( mPlugin )
+  {
+    delete mPlugin;
+  }
+}
+
+} // namespace Internal
+
+} // namespace Toolkit
+
+} // namespace Dali
diff --git a/dali-toolkit/internal/scripting/script-impl.h b/dali-toolkit/internal/scripting/script-impl.h
new file mode 100644 (file)
index 0000000..ba4094e
--- /dev/null
@@ -0,0 +1,104 @@
+#ifndef __DALI_TOOLKIT_INTERNAL_SCRIPT_H__
+#define __DALI_TOOLKIT_INTERNAL_SCRIPT_H__
+
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// INTERNAL INCLUDES
+#include <dali-toolkit/public-api/scripting/script.h>
+#include <dali-toolkit/public-api/scripting/script-plugin.h>
+
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+namespace Internal
+{
+
+class Script;
+
+/**
+ * @copydoc Toolkit::Script
+ */
+class Script : public Dali::BaseObject
+{
+public:
+
+  /**
+   * @brief Constructor
+   */
+  Script();
+
+  /**
+   * @copydoc Toolkit::Script::ExecuteFile
+   */
+  void ExecuteFile( const std::string& filename );
+
+protected:
+
+  /**
+   *  @brief virtual destructor
+   */
+  virtual ~Script();
+
+private:
+
+  /**
+   * @brief Undefined copy  constructor
+   */
+  Script(const Script&);
+
+  /**
+   * @brief Undefined assignment operator
+   */
+  Script& operator=(const Script& rhs);
+
+private: // data
+
+  ScriptPlugin* mPlugin;    ///< plugin
+
+};
+
+} // namespace Internal
+
+inline Internal::Script& GetImpl(Dali::Toolkit::Script& obj)
+{
+  DALI_ASSERT_ALWAYS(obj);
+
+  Dali::BaseObject& handle = obj.GetBaseObject();
+
+  return static_cast<Internal::Script&>(handle);
+}
+
+inline const Internal::Script& GetImpl(const Dali::Toolkit::Script& obj)
+{
+  DALI_ASSERT_ALWAYS(obj);
+
+  const Dali::BaseObject& handle = obj.GetBaseObject();
+
+  return static_cast<const Internal::Script&>(handle);
+}
+
+
+} // namespace Toolkit
+
+} // namespace Dali
+
+#endif // __DALI_TOOLKIT_INTERNAL_SCRIPT_H__
diff --git a/dali-toolkit/internal/scripting/script-plugin-proxy.cpp b/dali-toolkit/internal/scripting/script-plugin-proxy.cpp
new file mode 100644 (file)
index 0000000..1e0a6c2
--- /dev/null
@@ -0,0 +1,153 @@
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// CLASS HEADER
+#include "script-plugin-proxy.h"
+
+// INTERNAL INCLUDES
+#include <dali/integration-api/debug.h>
+
+// EXTERNAL INCLUDES
+#include <dlfcn.h>
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+namespace Internal
+{
+
+ScriptPluginProxy::ScriptPluginProxy( const std::string& sharedObjectName)
+: mLibHandle(NULL),
+  mCreatePluginFunctionPtr(NULL),
+  mDestroyPluginFunctionPtr(NULL),
+  mScriptingPlugin(NULL),
+  mSharedObjectName(sharedObjectName),
+  mIsInitialized(false)
+{
+  Initialize();
+}
+
+ScriptPluginProxy::~ScriptPluginProxy()
+{
+  UnInitialize();
+}
+
+void ScriptPluginProxy::SetFlags(const std::string& flags)
+{
+  if( mIsInitialized )
+  {
+    mScriptingPlugin->SetFlags( flags );
+  }
+}
+
+void ScriptPluginProxy::ExecuteBuffer(const std::string &buffer, const std::string &filename)
+{
+  if( mIsInitialized )
+  {
+    mScriptingPlugin->ExecuteBuffer( buffer, filename );
+  }
+}
+
+void ScriptPluginProxy::ExecuteFile(const std::string &filename)
+{
+  if( mIsInitialized )
+  {
+    mScriptingPlugin->ExecuteFile( filename );
+  }
+}
+
+bool ScriptPluginProxy::IsInitialized() const
+{
+  return mIsInitialized;
+};
+
+
+void ScriptPluginProxy::Initialize()
+{
+  if( mIsInitialized )
+  {
+    return;
+  }
+
+  // dl library maintains link counts if you call this twice on the same library
+  // (so its okay to do but we should close every handle we get too)
+  mLibHandle = dlopen( mSharedObjectName.c_str(), RTLD_NOW | RTLD_GLOBAL );
+  if( !mLibHandle )
+  {
+    DALI_LOG_ERROR( "Cannot load dali script plugin. %s\n", dlerror() );
+    return;
+  }
+
+  // reset errors
+  dlerror();
+
+  // load plugin
+  mCreatePluginFunctionPtr = reinterpret_cast<ScriptPlugin::Create*>( dlsym( mLibHandle, "CreateScriptPlugin" ) );
+  if( !mCreatePluginFunctionPtr )
+  {
+    DALI_LOG_ERROR( "Cannot load symbol CreateScriptPlugin(). %s\n", dlerror() );
+    return;
+  }
+
+  // reset errors
+  dlerror();
+
+  mDestroyPluginFunctionPtr = reinterpret_cast<ScriptPlugin::Destroy*>( dlsym( mLibHandle, "DestroyScriptPlugin" ) );
+  if( !mDestroyPluginFunctionPtr )
+  {
+    DALI_LOG_ERROR( "Cannot load symbol:DestroyScriptPlugin(). %s\n", dlerror() );
+    return;
+  }
+
+  // reset errors
+  dlerror();
+
+  mScriptingPlugin = mCreatePluginFunctionPtr();
+
+  if( !mScriptingPlugin )
+  {
+    DALI_LOG_ERROR( "Call to function CreateFeedbackPlugin() failed\n" );
+    return;
+  }
+
+  mIsInitialized = true;
+}
+
+void ScriptPluginProxy::UnInitialize()
+{
+  if( mScriptingPlugin )
+  {
+    mDestroyPluginFunctionPtr( mScriptingPlugin );
+  }
+
+  if( mLibHandle )
+  {
+    if( dlclose( mLibHandle ) )
+    {
+      DALI_LOG_ERROR( "Error closing dali plugin library: %s\n", dlerror() );
+    }
+  }
+  mIsInitialized = false;
+}
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
diff --git a/dali-toolkit/internal/scripting/script-plugin-proxy.h b/dali-toolkit/internal/scripting/script-plugin-proxy.h
new file mode 100644 (file)
index 0000000..72f5e15
--- /dev/null
@@ -0,0 +1,106 @@
+#ifndef __DALI_INTERNAL_SCRIPT_PLUGIN_PROXY_H__
+#define __DALI_INTERNAL_SCRIPT_PLUGIN_PROXY_H__
+
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <dali-toolkit/public-api/scripting/script-plugin.h>
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+namespace Internal
+{
+
+/**
+ * @brief Proxy class to dynamically load, use and unload script plugin.
+ *
+ *
+ */
+class ScriptPluginProxy : public ScriptPlugin
+{
+public:
+
+  /**
+   * @brief Constructor
+   * @param sharedObjectName so file to load
+   */
+  ScriptPluginProxy( const std::string& sharedObjectName);
+
+  /**
+   *  @brief destructor
+   */
+  virtual ~ScriptPluginProxy();
+
+  /**
+   * Set engine configuration flags
+   * @param [in] flags string. Format dependent on the scripting engine.
+   */
+  virtual void SetFlags( const std::string& flags );
+
+  /**
+   *  @brief Exececute the buffer contents as a script
+   * @param [in] buffer script file contents
+   * @param [in] filename a nominal name for the buffer contents.
+   * (NB filename extension may be used to disambiguate script language)
+   */
+  virtual void ExecuteBuffer( const std::string& buffer, const std::string& filename );
+
+  /**
+   * @brief  execture the file as a script
+   * @param [in] filename the filename to read and execute
+   */
+  virtual void ExecuteFile( const std::string& fileName );
+
+  /**
+   * @brief check if the plugin is initialized
+   * @return true if it's initialized
+   */
+  bool IsInitialized() const;
+
+private:
+  /**
+   * @brief Dynamically loads the script plugin.
+   */
+  void Initialize();
+
+  /**
+   * @brief Unloads the script plugin.
+   */
+  void UnInitialize();
+
+private:
+
+  void* mLibHandle;
+  ScriptPlugin::Create* mCreatePluginFunctionPtr;
+  ScriptPlugin::Destroy* mDestroyPluginFunctionPtr;
+  ScriptPlugin* mScriptingPlugin;
+  std::string mSharedObjectName;
+  bool mIsInitialized;
+
+};
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
+
+#endif // __DALI_INTERNAL_SCRIPT_PLUGIN_PROXY_H__
index 85a3702..cbe5e77 100755 (executable)
@@ -99,6 +99,7 @@ public_api_src_files = \
   $(public_api_src_dir)/transition-effects/cube-transition-effect.cpp \
   $(public_api_src_dir)/transition-effects/cube-transition-fold-effect.cpp \
   $(public_api_src_dir)/transition-effects/cube-transition-wave-effect.cpp \
+  $(public_api_src_dir)/scripting/script.cpp \
   $(public_api_src_dir)/dali-toolkit-version.cpp \
   $(public_api_src_dir)/enums.cpp
 
@@ -274,3 +275,7 @@ public_api_transition_effects_header_files = \
   $(public_api_src_dir)/transition-effects/cube-transition-fold-effect.h \
   $(public_api_src_dir)/transition-effects/cube-transition-wave-effect.h
 
+public_api_scripting_header_files = \
+  $(public_api_src_dir)/scripting/script.h \
+  $(public_api_src_dir)/scripting/script-plugin.h
+
diff --git a/dali-toolkit/public-api/scripting/script-plugin.h b/dali-toolkit/public-api/scripting/script-plugin.h
new file mode 100644 (file)
index 0000000..b40dcb4
--- /dev/null
@@ -0,0 +1,85 @@
+#ifndef __DALI_SCRIPT_PLUGIN_H__
+#define __DALI_SCRIPT_PLUGIN_H__
+
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <dali/public-api/common/dali-common.h>
+#include <string>
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+/**
+ * @brief Abstract interface to provide scripting support.
+ *
+ * A plugin must export the following functions to create / destroy the object
+ * CreateScriptPlugin()  // returns a pointer to a ScriptPlugin object
+ * DestroyScriptPlugin() // destroys the plugin
+ */
+class DALI_IMPORT_API ScriptPlugin
+{
+public:
+
+
+  /**
+   * Function pointer called in toolkit to create a ScriptPlugin plugin instance.
+   * @return Pointer to the newly created plugin object
+   */
+  typedef ScriptPlugin* Create();
+
+  /**
+   * Function pointer called in toolkit to Unload the plugin.
+   * @param plugin  The plugin object created and returned by CreateScriptPluginPlugin().
+   */
+  typedef void Destroy(ScriptPlugin* plugin);
+
+  /**
+   * virtual Destructor.
+   */
+  virtual ~ScriptPlugin() {};
+
+  /**
+   * Set engine configuration flags
+   * @param [in] flags string. Format dependent on the scripting engine.
+   */
+  virtual void SetFlags(const std::string& flags) = 0;
+
+  /**
+   * Exec buffer contents as a script
+   * @param buffer script file contents
+   * @param filename a nominal name for the buffer contents.
+   * (NB filename extension may be used to disambiguate script language)
+   */
+  virtual void ExecuteBuffer(const std::string& buffer, const std::string& filename) = 0;
+
+  /**
+   * Exec file as a script
+   * @param filename the filename to read and execute
+   */
+  virtual void ExecuteFile(const std::string& filename) = 0;
+
+}; // class ScriptPlugin
+
+} // namespace Toolkit
+
+} // namespace Dali
+
+#endif // __DALI_SCRIPT_PLUGIN_H__
diff --git a/dali-toolkit/public-api/scripting/script.cpp b/dali-toolkit/public-api/scripting/script.cpp
new file mode 100644 (file)
index 0000000..5fbb1e1
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// CLASS HEADER
+#include "script.h"
+
+// INTERNAL INCLUDES
+#include <dali/integration-api/debug.h>
+#include <dali-toolkit/internal/scripting/script-impl.h>
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+Script::Script()
+{
+}
+
+Script::~Script()
+{
+}
+
+Script Script::New(void)
+{
+  return Script(new Internal::Script());
+}
+
+Script::Script(Internal::Script *impl)
+  : BaseHandle(impl)
+{
+}
+
+void Script::ExecuteFile( const std::string &filename )
+{
+  GetImpl(*this).ExecuteFile( filename );
+}
+
+} // namespace Toolkit
+
+} // namespace Dali
+
diff --git a/dali-toolkit/public-api/scripting/script.h b/dali-toolkit/public-api/scripting/script.h
new file mode 100644 (file)
index 0000000..53c82aa
--- /dev/null
@@ -0,0 +1,91 @@
+#ifndef __DALI_TOOLKIT_SCRIPT_H__
+#define __DALI_TOOLKIT_SCRIPT_H__
+
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// INTERNAL INCLUDES
+#include <dali/public-api/common/dali-common.h>
+#include <dali.h>
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+namespace Internal DALI_INTERNAL
+{
+class Script;
+}
+
+/**
+ * Script
+ * This class provides the ability to execute script in a supported language.
+ * Specific script language support is provided through plugins.
+ *
+ * For Example.
+ *
+ * @code
+ *
+ * Script script = Script::New();
+ *
+ * script.ExecuteFile("bump-map.js");
+ *
+ * @endcode
+ *
+ */
+class DALI_IMPORT_API Script : public BaseHandle
+{
+
+public:
+
+  /**
+   * Create an Script handle; this can be initialised with Script::New()
+   * Calling member functions with an uninitialised handle is not allowed.
+   */
+  Script();
+
+  /**
+   * Creates an Script object.
+   * @return A handle to the Script control.
+   */
+  static Script New();
+
+  /**
+   * Virtual destructor.
+   */
+  ~Script();
+
+  /**
+   * Executes the contents of filename in a scripted environment.
+   * @pre A Dali Application object exists
+   * @param filename A filename of a script file to execute
+   */
+  void ExecuteFile( const std::string& filename );
+
+private:
+
+  Script(Internal::Script *impl);
+
+}; // class Script
+
+} // namespace Toolkit
+
+} // namespace Dali
+
+#endif // __DALI_TOOLKIT_SCRIPT_H__
index d42964d..913d9f0 100644 (file)
Binary files a/docs/content/images/screenshot.png and b/docs/content/images/screenshot.png differ
diff --git a/docs/content/shared-javascript-and-cpp-documentation/multi-touch-guide.md b/docs/content/shared-javascript-and-cpp-documentation/multi-touch-guide.md
new file mode 100644 (file)
index 0000000..ba1fc6d
--- /dev/null
@@ -0,0 +1,148 @@
+/**
+ *
+
+Multi-Touch Events
+==================
+
+Touch events are received via signals.
+
+For C++ API see Dali::Actor::TouchedSignal() and Dali::Actor::HoveredSignal() for more details.
+
+For JavaScript use actor.connect( "touched", myCallback ) and actor.connect("hovered", myCallback );
+
+### Hit Testing Rules Summary:
+
+ - An actor is only hittable if the actor's touch signal has a connection.
+ - An actor is only hittable when it is between the camera's near and far planes.
+ - If an actor is made insensitive, then the actor and its children are not hittable; see Dali::Actor::IsSensitive()
+ - If an actor's visibility flag is unset, then none of its children are hittable either; see Dali::Actor::IsVisible()
+ - To be hittable, an actor must have a non-zero size.
+ - If an actor's world color is fully transparent, then it is not hittable; see GetCurrentWorldColor()
+
+### Hit Test Algorithm:
+
+ - RenderTasks
+   - Hit testing is dependent on the camera used, which is specific to each RenderTask.
+
+ - Layers
+   - For each RenderTask, hit testing starts from the top-most layer and we go through all the
+     layers until we have a hit or there are none left.
+   - Before we perform a hit test within a layer, we check if all the layer's parents are visible
+     and sensitive.
+   - If they are not, we skip hit testing the actors in that layer altogether.
+   - If a layer is set to consume all touch, then we do not check any layers behind this layer.
+
+ - Actors
+   - The final part of hit testing is performed by walking through the actor tree within a layer.
+   - The following pseudocode shows the algorithm used:
+
+
+~~~
+ HIT-TEST-WITHIN-LAYER( ACTOR )
+ {
+   // Only hit-test the actor and its children if it is sensitive and visible
+   IF ( ACTOR-IS-SENSITIVE &&
+           ACTOR-IS-VISIBLE )
+      {
+         // Depth-first traversal within current layer, visiting parent first
+
+         // Check whether current actor should be hit-tested
+         IF ( TOUCH-SIGNAL-NOT-EMPTY &&
+             ACTOR-HAS-NON-ZERO-SIZE &&
+             ACTOR-WORLD-COLOR-IS-NOT-TRANSPARENT )
+         {
+           // Hit-test current actor
+           IF ( ACTOR-HIT )
+           {
+               IF ( ACTOR-IS-OVERLAY || ( DISTANCE-TO-ACTOR < DISTANCE-TO-LAST-HIT-ACTOR ) )
+               {
+                 // The current actor is the closest actor that was underneath the touch
+                 LAST-HIT-ACTOR = CURRENT-ACTOR
+               }
+           }
+         }
+
+       // Keep checking children, in case we hit something closer
+        FOR-EACH CHILD (in order)
+       {
+         IF ( CHILD-IS-NOT-A-LAYER )
+         {
+             // Continue traversal for this child's sub-tree
+             HIT-TEST-WITHIN-LAYER ( CHILD )
+         }
+          // else we skip hit-testing the child's sub-tree altogether
+       }
+     }
+   }
+~~~
+ - Overlays always take priority (i.e. they're considered closer) regardless of distance.
+     The overlay children take priority over their parents, and overlay siblings take priority
+     over their previous siblings (i.e. reverse of rendering order):
+
+~~~
+      1
+     / \
+    /   \
+   2     5
+  / \     \
+ /   \     \
+3     4     6
+
+Hit Priority of above Actor tree (all overlays): 1 - Lowest. 6 - Highest.
+~~~
+
+ - Stencil Actors can be used to influence the result of hits within a layer.
+     If a Stencil Actor exists on a layer and that Actor is marked visible then a successful
+     hit can only take place in the area that the stencil Actor marks as visible.
+     The hit can be in any Stencil Actor in that layer, but must be in the region of one of them.
+     Stencil Actor inheritance behaves as with rendering in that any child of a Stencil Actor will
+     also be considered a Stencil Actor.
+
+ <i>Touch Event Delivery:</i>
+
+ - Delivery
+   - The hit actor's touch signal is emitted first; if it is not consumed by any of the listeners,
+     the parent's touch signal is emitted, and so on.
+   - If there are several touch points, then the delivery is only to the first touch point's hit
+     actor (and its parents).  There will be NO touch signal delivery for the hit actors of the
+     other touch points.
+   - The local coordinates are from the top-left (0.0f, 0.0f, 0.5f) of the hit actor.
+   - The following pseudocode shows the delivery mechanism:
+
+~~~
+  EMIT-TOUCH-SIGNAL( ACTOR )
+  {
+    IF ( TOUCH-SIGNAL-NOT-EMPTY )
+    {
+      // Only do the emission if touch signal of actor has connections.
+        CONSUMED = TOUCHED-SIGNAL( TOUCH-EVENT )
+    }
+
+    IF ( NOT-CONSUMED )
+    {
+        // If event is not consumed then deliver it to the parent unless we reach the root actor
+        IF ( ACTOR-PARENT )
+        {
+          EMIT-TOUCH-SIGNAL( ACTOR-PARENT )
+        }
+    }
+  }
+~~~
+ - Leave State
+   - A "Leave" state is set when the first point exits the bounds of the previous first point's
+     hit actor (primary hit actor).
+   - When this happens, the last primary hit actor's touch signal is emitted with a "Leave" state
+     (only if it requires leave signals); see the actor property leaveRequired.
+
+
+ - Interrupted State
+   - If a system event occurs which interrupts the touch processing, then the last primary hit
+     actor's touch signals are emitted with an "Interrupted" state.
+   - If the last primary hit actor, or one of its parents, is no longer touchable, then its
+     touch signals are also emitted with an "Interrupted" state.
+   - If the consumed actor on touch-down is not the same as the consumed actor on touch-up, then
+     touch signals are also emitted from the touch-down actor with an "Interrupted" state.
+
+@class MultiTouch
+*
+*/
diff --git a/plugins/dali-script-v8/.gitignore b/plugins/dali-script-v8/.gitignore
new file mode 100644 (file)
index 0000000..9884cf9
--- /dev/null
@@ -0,0 +1 @@
+docs/generated
diff --git a/plugins/dali-script-v8/docs/.gitignore b/plugins/dali-script-v8/docs/.gitignore
new file mode 100644 (file)
index 0000000..8f030d1
--- /dev/null
@@ -0,0 +1,6 @@
+/generated/*
+
+
+
+
+
diff --git a/plugins/dali-script-v8/docs/README.txt b/plugins/dali-script-v8/docs/README.txt
new file mode 100644 (file)
index 0000000..c2322b3
--- /dev/null
@@ -0,0 +1,11 @@
+// Follow instructions on the internets on how to install yuidoc
+// Then run this command
+
+yuidoc --config yuidoc.json -e ".cpp,.js,.md"  -o generated .. ../../../docs/content/shared-javascript-and-cpp-documentation/
+
+// -e says what extensions to pass, we have comments in js and cpp files
+// -o specifies output directory ( in this case we output to a folder called generated)
+// The list of directories after the generated, is the folders to scan for documentation
+
+To view the output
+firefox generated/index.html &
diff --git a/plugins/dali-script-v8/docs/content/actor.js b/plugins/dali-script-v8/docs/content/actor.js
new file mode 100644 (file)
index 0000000..ce095cd
--- /dev/null
@@ -0,0 +1,647 @@
+/**
+ *
+ ## Actor API
+
+  Actor is the primary object with which Dali applications interact. UI controls can be built by combining multiple actors.
+
+  There are different types of Actors supported by Dali. They all have the same
+  base functionality of the actor class.
+
+```
+var actor = new dali.Actor();
+var imageActor = new dali.ImageActor();
+var textActor = new dali.TextActor("hello world");
+var meshActor = new dali.MeshActor();
+var camera = new dali.CameraActor();
+var layer = new dali.Layer();
+```
+
+### Hello world example </h3>
+```
+var myActor = new dali.TextActor("hello-world");
+
+myActor.name = "my first actor";
+myActor.color = [ 1, 0, 0, 1];    // Red,Green,Blue, Alpha ( 1 == max, 0 = none )
+myActor.scale = [ 2, 2, 1];      // double the width and height
+
+// by default an actor is anchored to the top-left of it's parent actor
+// change it to the middle
+
+myActor.parentOrigin = [0.5,0.5,0.5];
+
+// add to the stage
+dali.stage.add( myActor );
+```
+
+
+### Positioning Actors
+
+An actor inherits its parent's position.  The relative position between the actor & parent is determined by 3 properties:
+
+1) ParentOrigin.  This Vector3 property defines a point within the parent actor's area.
+
+<img src="../assets/img/shared/parent-origin.png">
+
+The default is "top-left", which can be visualized in 2D as (0, 0), but is actually Vector3(0, 0, 0.5) in the 3D DALi world.  The actor's position is relative to this point.
+```
+// to change parent origin to the centre
+myActor.parentOrigin = [0.5, 0.5, 0.5];
+```
+
+2) AnchorPoint.  This Vector3 property defines a point within the child actor's area.
+
+<img src="../assets/img/shared/anchor-point.png">
+
+The default is "center", which can be visualized in 2D as (0.5, 0.5), but is actually Vector3(0.5, 0.5, 0.5) in the 3D DALi world.  The actor's position is also relative to this point.
+```
+// setting anchor point to the centre
+myActor.anchorPoint = [0.5, 0.5, 0.5];
+```
+
+3) Position.  This is the position vector between the parent-origin and anchor-point.
+
+<img src="../assets/img/shared/actor-position.png">
+
+Therefore by default, an actors position is the distance between its center and the top-left corner of its parent.
+
+An actor added directly to the stage with position (X = stageWidth*0.5, Y = stageHeight*0.5), would appear in the center of the screen.  Likewise an actor with position (X = actorWidth*0.5, Y = actorWidth*0.5), would appear at the top-left of the screen.
+
+Note that since DALi is a 3D toolkit, this behaviour is the result of a default perspective camera setup.
+
+### Actor callback events
+
+The actor provides the following call back events
+
+| Name              | Description                            | Parameters passed to call back |
+|-------------------|----------------------------------------|--------------------------|
+|touched            | touch event                            | (actor, touchEvent )     |
+|hovered            | mouse or pointer hovering over actor   | (actor, hoverEvent)      |
+|mouse-wheel-event  | mouse wheel events                     | (actor, wheelEvent)      |
+|on-stage           | actor has been moved on stage          | (actor)                  |
+|off-stage          | actor has been moved off stage         | (actor)                  |
+
+
+#### Touch event
+
+Used to detect multiple touch events on the actor. The state of each touch point can be:
++ "down"        = touch down
++ "up"          = Touch up
++ "motion"      = Finger dragged or hovered
++ "leave"       =  Leave the boundary of an actor
++ "stationary"  = No change from last event.  Useful when a multi-point event occurs where
+all points are sent but indicates that this particular point has not changed since the last time
++ "interrupted"  = A system event has occurred which has interrupted the touch or hover event sequence
+
+
+
+```
+touchEvent = {
+  
+  pointCount: int,  // number of points touched ( multi-touch )
+  time: int,        // The time in milliseconds that the touch event occurred.
+  points = [ touchPoints ],    // array of TouchPoints, to support
+  
+  TouchPoint = {
+  
+    "deviceId" : int,      // Each touch point has a unique device ID
+    "state" : string,      // touch state ="down,up,motion,leave,stationary, interrupted }
+    "sourceActor" : actor, // the actor that is emitting the callback (the actor that is hit maybe a child of it)
+    "hitActor" : actor,    // actor that was hit
+    "local" :  {x,y},      // co-ordinates of top left of hit actor (local.x, local.y)
+    "screen" : {x,y}       // co-ordinates of top left of hit actor (screen.x, screen.y)
+    }
+}
+
+function OnPressed( actor, touchEvent )
+{
+  var firstPoint = touchEvent.points[0];
+  log("first touch point = " + firstPoint.screen.x + "," +firstPoint.screen.x + "actor= "+firstPoint.hitActor );
+  
+  var anim = new dali.Animation( 4 );
+  var rotation = new dali.Rotation( 90, 0, 0 ); // pitch, yaw, roll
+  anim.animateBy( actor, "rotation", rotation );
+  anim.play();
+  return true;
+}
+  
+// connect to touch events
+myActor.connect( "touched", onPressed );
+
+```
+
+#### Hover event
+
+```
+hoverEvent = {
+  
+  pointCount  // number of points hovered over
+  time        // The time in milliseconds that the hover event occurred.
+  points[]    // array of TouchPoints
+  
+  TouchPoint = {
+      // See touchEvent TouchPoint object
+  }
+}
+```
+      // connect to touch events
+      myActor.connect( "hovered", onHover);
+
+#### Mouse wheel event
+
+```
+mouseWheelEvent = {
+  
+  direction,       // "vertical" or "horizontal" direction the wheel is being rolled
+  shiftPressed,    // boolean, shift key is held
+  ctrlPressed,     // boolean, ctrl key is held
+  altPressed,      // boolean, alt key is held
+  keyModifiers,    // bitmask of keys pressed
+  point {x,y},     // The co-ordinates of the mouse cursor relative to the top-left of the screen when the wheel is being rolled.
+  rolled,          // offset of mouse wheel rolling, positive = rolling down, negative = rolling up
+  timestamp        // The time in milliseconds that the mouse event occurred
+}
+  
+// connect to touch events
+myActor.connect( "mouse-wheel-event", onMouseWheel );
+```
+#### Key events
+
+Key events are performed using the dali.stage object and dali.keyboardFocusManager.
+ - {{#crossLink "stage"}}Stage{{/crossLink}}
+
+
+#### Multi-touch events
+
+See
+ - {{#crossLink "MultiTouch"}}Multi Touch Events.{{/crossLink}}
+
+
+### Actor Properties
+
+ Name                   |    Type    | Writable     | Animatable
+------------------------|------------|--------------|-----------
+ anchorPoint            |VECTOR3     | &#10004;     | &#10008;
+ anchorPointX           |FLOAT       | &#10004;     | &#10008;
+ anchorPointY           |FLOAT       | &#10004;     | &#10008;
+ anchorPointZ           |FLOAT       | &#10004;     | &#10008;
+ size                   |VECTOR3     | &#10004;     | &#10004;
+ sizeWidth              |FLOAT       | &#10004;     | &#10004;
+ sizeHeight             |FLOAT       | &#10004;     | &#10004;
+ sizeDepth              |FLOAT       | &#10004;     | &#10004;
+ position               |VECTOR3     | &#10004;     | &#10004;
+ positionX              |FLOAT       | &#10004;     | &#10004;
+ positionY              |FLOAT       | &#10004;     | &#10004;
+ positionZ              |FLOAT       | &#10004;     | &#10004;
+ worldPosition          |VECTOR3     | &#10008;     | &#10008;
+ worldPositionX         |FLOAT       | &#10008;     | &#10008;
+ worldPositionY         |FLOAT       | &#10008;     | &#10008;
+ worldPositionZ         |FLOAT       | &#10008;     | &#10008;
+ rotation               |ROTATION    | &#10004;     | &#10004;
+ worldRotation          |ROTATION    | &#10008;     | &#10008;
+ scale                  |VECTOR3     | &#10004;     | &#10004;
+ scaleX                 |FLOAT       | &#10004;     | &#10004;
+ scaleY                 |FLOAT       | &#10004;     | &#10004;
+ scaleZ                 |FLOAT       | &#10004;     | &#10004;
+ worldScale             |VECTOR3     | &#10008;     | &#10008;
+ visible                |BOOLEAN     | &#10004;     | &#10004;
+ color                  |VECTOR4     | &#10004;     | &#10004;
+ colorRed               |FLOAT       | &#10004;     | &#10004;
+ colorGreen             |FLOAT       | &#10004;     | &#10004;
+ colorBlue              |FLOAT       | &#10004;     | &#10004;
+ colorAlpha             |FLOAT       | &#10004;     | &#10004;
+ worldColor             |VECTOR4     | &#10008;     | &#10008;
+ worldMatrix            |MATRIX      | &#10008;     | &#10008;
+ name                   |STRING      | &#10004;     | &#10008;
+ sensitive              |BOOLEAN     | &#10004;     | &#10008;
+ leaveRequired          |BOOLEAN     | &#10004;     | &#10008;
+ inheritRotation        |BOOLEAN     | &#10004;     | &#10008;
+ inheritScale           |BOOLEAN     | &#10004;     | &#10008;
+ colorMode              |NUMBER      | &#10004;     | &#10008;
+ positionInheritance    |NUMBER      | &#10004;     | &#10008;
+ drawMode               |NUMBER      | &#10004;     | &#10008;
+ sizeMode               |NUMBER      | &#10004;     | &#10008;
+ sizeModeFactor         |VECTOR3     | &#10004;     | &#10008;
+
+
+
+
+ * @class Actor
+ */
+
+
+/**
+ * Actors parent origin
+ *
+ * @property parentOrigin
+ * @type dali Vector3
+ * @default TOP_LEFT (0.0, 0.0, 0.5).
+ */
+parentOrigin
+
+/**
+ * Actors parent origin X
+ *
+ * @property parentOriginX
+ * @readOnly
+ * @type Number
+ */
+parent - origin - x
+
+/**
+ * Actors parent origin-y
+ * @property parentOriginY
+ * @readOnly
+ * @type Number
+ */
+parent - origin - y
+
+/**
+ * Actors parent origin-z
+ * @property parentOriginZ
+ * @readOnly
+ * @type Number
+ */
+parent - origin - z
+
+/**
+ * Actors anchor point
+ * @property anchorPoint
+ * @type dali Vector3
+ * @default CENTER (0.5, 0.5, 0.5)
+ */
+ANCHOR_POINT;
+
+/**
+ * Actors anchor point x
+ * @property anchorPointX
+ * @type Number
+ */
+ANCHOR_POINT_X
+
+/**
+ * Actors anchor point y
+ * @property anchorPointY
+ * @type Number
+ */
+ANCHOR_POINT_Y
+
+/**
+ * Actors anchor point z
+ * @property anchorPointZ
+ * @type Number
+ */
+ANCHOR_POINT_Z
+
+/**
+ * Actors size
+ * @property size
+ * @type dali Vector3
+ */
+SIZE
+
+
+/**
+ * Actors width
+ * @property sizeWidth
+ * @type Number
+ */
+SIZE_WIDTH
+
+/**
+ * Actors height
+ * @property sizeHeight
+ * @type Number
+ */
+SIZE_HEIGHT
+
+/**
+ * Actors depth
+ * @property sizeDepth
+ * @type Number
+ */
+SIZE_DEPTH
+
+
+/**
+ * Actors position
+ * @property position
+ * @type dali Vector3
+ */
+POSITION
+
+/**
+ * Actors x position
+ * @property positionX
+ * @type Number
+ */
+POSITION_X
+
+/**
+ * Actors y position
+ * @property positionY
+ * @type Number
+ */
+POSITION_Y
+
+/**
+ * Actors z position
+ * @property positionZ
+ * @type Number
+ */
+POSITION_Z
+
+
+/**
+ * Actors world position
+ * @property position
+ * @type dali Vector3  ( read-only, not animatable )
+ */
+WORLD_POSITION
+
+/**
+ * Actors world x position
+ * @property worldPositionX
+ * @type Number ( read-only )
+ */
+WORLD_POSITION_X
+
+/**
+ * Actors world y position
+ * @property worldPositionY
+ * @type Number ( read-only )
+ */
+WORLD_POSITION_Y
+
+/**
+ * Actors world z position
+ * @property worldPositionZ
+ * @type Number ( read-only )
+ */
+WORLD_POSITION_Z
+
+
+/**
+ * Actors rotation
+ * @property rotation
+ * @type dali Rotation object
+ */
+ROTATION
+
+
+/**
+ * Actors world-rotation
+ * @property worldRotation
+ * @type dali Rotation object ( read only)
+ */
+WORLD_ROTATION
+
+/**
+ * Actors scale
+ * @property scale
+ * @type dali Vector3
+ */
+SCALE
+
+/**
+ * Actors x scale
+ * @property scaleX
+ * @type Number
+ */
+SCALE_X
+
+/**
+ * Actors y scale
+ * @property scaleY
+ * @type Number
+ */
+SCALE_Y
+
+/**
+ * Actors z scale
+ * @property scaleZ
+ * @type Number
+ */
+SCALE_Z
+
+/**
+ * Actors world scale
+ * @property worldScale
+ * @type dali Vector3 ( read only )
+ */
+WORLD_SCALE
+
+/**
+ * Actors visible flag
+ * If an actor is not visible, then the actor and its children will not be rendered.
+ * This is regardless of the individual visibility values of the children i.e. an actor will only be
+ * rendered if all of its parents have visibility set to true.
+ *
+ * @property visible
+ * @type Boolean
+ */
+VISIBLE
+
+/**
+ * Actors color.
+ * The final color of the actor depends on its color mode.
+ * 4 components, red, green, blue and alpha. Each range from 0..1
+ * @property color
+ * @type dali Vector 4
+ */
+COLOR
+
+/**
+ * Actors red color
+ * @property colorRed
+ * @type Number  ( 0..1)
+ */
+COLOR_RED
+
+/**
+ * Actors green color
+ * @property colorGreen
+ * @type Number  ( 0..1)
+ */
+COLOR_GREEN
+
+/**
+ * Actors blue color
+ * @property colorBlue
+ * @type Number  ( 0..1)
+ */
+COLOR_BLUE
+
+/**
+ * Actors world color.
+ * 4 components, red, green, blue and alpha. Each range from 0..1
+ * @property worldColor
+ * @type dali Vector 4 ( read only)
+ */
+WORLD_COLOR
+
+/**
+ * Actors name
+ * @property name
+ * @type String
+ */
+
+/**
+ * Actors sensitive flag
+ * brief Sets whether an actor should emit touch event signals; @see SignalTouched().
+ *
+ * An actor is sensitive by default, which means that as soon as an application connects to the SignalTouched(),
+ * the touch event signal will be emitted.
+ *
+ * If the application wishes to temporarily disable the touch event signal emission, then they can do so by calling
+ *
+ *    actor.sensitve = false;
+ *
+ * Then, to re-enable the touch event signal emission, the application should call:
+ *
+ *    actor.sensitive = true;
+ *
+ * @property sensitive
+ * @type Boolean
+ * @default true ( is sensistive )
+ */
+SENSITIVE
+
+/**
+ * Controls whether the actor should receive a notification when touch motion events leave
+ * the boundary of the actor.
+ *
+ * Note: Need to connect to the SignalTouch to actually receive this event.
+ *  Should be set to true if a Leave event is required
+ * @type Boolean
+ * @property leaveRequired
+ * @default false, this is set to false as most actors do not require this.
+ */
+LEAVE_REQUIRED
+
+/**
+ * Set whether a child actor inherits it's parent's orientation.
+ * @type Boolean
+ * @property inheritRotation
+ * @default true
+ */
+INHERIT_ROTATION,
+
+
+/**
+ * Set whether a child actor inherits it's parent's scale.
+ * @type Boolean
+ * @property inheritScale
+ * @default true
+ */
+INHERIT_SCALE,
+
+
+/**
+ * Set how the actor and its children should be drawn.
+ *
+ * Not all actors are renderable, but DrawMode can be inherited from any actor.
+ * By default a renderable actor will be drawn as a 3D object. It will be depth-tested against
+ * other objects in the world i.e. it may be obscured if other objects are in front.
+ *
+ * If OVERLAY is used, the actor and its children will be drawn as a 2D overlay.
+ * Overlay actors are drawn in a separate pass, after all non-overlay actors within the Layer.
+ * For overlay actors, the drawing order is determined by the hierachy (depth-first search order),
+ * and depth-testing will not be used.
+ *
+ * If STENCIL is used, the actor and its children will be used to stencil-test other actors
+ * within the Layer. Stencil actors are therefore drawn into the stencil buffer before any other
+ * actors within the Layer.
+ *
+ * @example
+ *
+ *      var actor.drawMode = dali.DRAW_MODE_NORMAL;  // binary 00. The default draw-mode
+ *      var actor.drawMode = dali.DRAW_MODE_OVERLAY; // binary 01. Draw the actor and its children as an overlay
+ *      var actor.drawMode = dali.DRAW_MODE_STENCIL ;// binary 11. Draw the actor and its children into the stencil buffer
+ *
+ *
+ * @type Number
+ * @property drawMode
+ * @default 0 (Normal )
+ */
+DRAW_MODE,
+
+
+/**
+ * Sets the actor's color mode.
+ *
+ * This specifies whether the Actor uses its own color, or inherits
+ * its parent color. The default is USE_OWN_MULTIPLY_PARENT_ALPHA.
+ *
+ * @example
+ *    actor.colorMode = dali.COLOR_MODE_USE_OWN_COLOR; // Actor will use its own color
+ *    actor.colorMode = dali.COLOR_MODE_USE_PARENT_COLOR;  // Actor will use its parent color
+ *    actor.colorMode = dali. COLOR_MODE_USE_OWN_MULTIPLY_PARENT_COLOR; // Actor will blend its color with its parents color.
+ *    actor.colorMode = dali.COLOR_MODE_USE_OWN_MULTIPLY_PARENT_ALPHA ;  // Actor will blend its alpha with its parents alpha. This means when parent fades in or out child does as well. This is the default.
+ *
+ *
+ * @type Number
+ * @property colorMode
+ * @default 2 (USE_OWN_MULTIPLY_PARENT_ALPHA )
+ */
+COLOR_MODE
+
+/**
+ * Set the actors position inheritance mode.
+ *
+ * @example
+ *    actor.positionInheritance = dali.POSITION_INHERITANCE_INHERIT_PARENT_POSITION;  // Actor will inherit its parent position. This is the default
+ *    actor.positionInheritance = dali.POSITION_INHERITANCE_USE_PARENT_POSITION;      // Actor will copy its parent position. This is useful if many actors are stacked together in the same place. This option ignores parent origin and anchor point.
+ *    actor.positionInheritance = dali.POSITION_INHERITANCE_USE_PARENT_POSITION_PLUS_LOCAL_POSITION; // Actor will copy its parent position and add local position. This is useful if many actors are stacked together in the same place with an offset.  This option ignores parent origin and anchor point.
+ *    actor.positionInheritance = dali.POSITION_INHERITANCE_DONT_INHERIT_POSITION;           // Actor will not inherit position. Local position is treated as world position. This is useful if a constraint is used to override local position or if an actor is positioned globally. This option ignores parent origin, anchor point and local position.
+ *
+ * Switching this off means that using SetPosition() sets the actor's world position.
+ * @type Number
+ * @property positionInheritance
+ * @default 0 (INHERIT_PARENT_POSITION )
+ */
+POSTITION_INHERITANCE
+
+
+/**
+ *  Defines how a child actor's size is affected by its parent's size.
+ *
+ * The default is to ignore the parent's size and use the size property of this actor.
+ *
+ * If USE_OWN_SIZE is used, this option is bypassed and the actor's size
+ *     property is used.
+ *
+ * If SIZE_EQUAL_TO_PARENT is used, this actor's size will be equal to that
+ *     of its parent. The actor's size property is ignored.
+ *
+ * If SIZE_RELATIVE_TO_PARENT is used, this actor's size will be based on
+ *     its parent's size by multiplying the parent size by
+ *     SizeModeFactor.
+ *
+ * If SIZE_FIXED_OFFSET_FROM_PARENT is used, this actor's size will be based on
+ *     its parent's size plus SizeModeFactor.
+ *
+ *
+ * @example
+ *    actor.sizeMode = dali.USE_OWN_SIZE;
+ *    actor.sizeMode = dali.SIZE_EQUAL_TO_PARENT;
+ *    actor.sizeMode = dali.SIZE_RELATIVE_TO_PARENT;
+ *    actor.sizeMode = dali.SIZE_FIXED_OFFSET_FROM_PARENT
+ *
+ * @type Number
+ * @property sizeMode
+ * @default 0 (dali.SIZE_MODE_USE_OWN_SIZE; )
+ */
+ SIZE_MODE
+
+/**
+ *
+ * @brief Sets the relative to parent size factor of the actor.
+ *
+ * This factor is only used when SizeMode is set to either:
+ * SIZE_RELATIVE_TO_PARENT or SIZE_FIXED_OFFSET_FROM_PARENT.
+ * This actor's size is set to the actor's parent size multipled by or added to this factor,
+ * depending on SideMode (See SetSizeMode).
+ * @type Vector3
+ * @property sizeModeFactor
+ */
+SIZE_MODE_FACTOR
\ No newline at end of file
diff --git a/plugins/dali-script-v8/docs/content/animation.js b/plugins/dali-script-v8/docs/content/animation.js
new file mode 100644 (file)
index 0000000..ec587fe
--- /dev/null
@@ -0,0 +1,257 @@
+/**
+ *
+## Animation API
+
+   DALi Animation can be used to animate the properties of any number of objects, typically Actors.
+
+The API supports functionality such as:
+
+ - {{#crossLink "animation/play:method"}}{{/crossLink}}
+ - {{#crossLink "animation/pause:method"}}{{/crossLink}}
+ - {{#crossLink "animation/stop:method"}}{{/crossLink}}
+ - {{#crossLink "animation/setLooping:method"}}{{/crossLink}}, set whether the animation should loop
+ - {{#crossLink "animation/setSpeedFactor:method"}}{{/crossLink}}, speeds / slows down an animation
+ - {{#crossLink "animation/setPlayRange:method"}}{{/crossLink}}, only play part of the animation between a set range
+ - Key frame support. See {{#crossLink "animation/animateBetween:method"}}{{/crossLink}}
+ - Path Animations. See {{#crossLink "path"}}Path {{/crossLink}}
+ - Signals to be informed when an animation has finished.
+ - animate multiple properties, owned by multiple objects with a single animation object
+  
+### Simple example of moving an actor to a set position
+
+```
+var myActor = new dali.TextActor( "hello world" );
+  
+myActor.parentOrigin = dali.CENTER;
+dali.stage.add( myActor );
+  
+var anim = new dali.Animation( 2 ); // 2 seconds
+  
+// we're animation the property position of the actor.
+anim.animateTo( myActor, "position", [100, 100, 0] );
+  
+function finished( animation )
+{
+  log("Animation finished \n");
+}
+  
+anim.connect("finished", finished );
+  
+anim.play();
+```
+
+### Multiple actor example
+
+```
+// Following demonstrates:
+// - aimating multiple properties on an object (actor properties in this example)
+// - animating multiple objects at the same time (2 actors in the example)
+// - using the optional, animation options object to set a delay time and alpha function (easing)
+  
+// Sets the original position to be rotated and pushed into the distance
+  
+var myActor1 = new dali.TextActor( "Hello" );
+var myActor2 = new dali.TextActor( "from DALi" );
+  
+// centre both actors to the middle of the screen
+myActor1.parentOrigin = dali.CENTER;
+myActor2.parentOrigin =  dali.CENTER;
+myActor1.scale=[2,2,1]; // scale up x and y by 2
+myActor2.scale=[2,2,1]; // scale up x and y by 2
+
+  
+// reposition them to the left / right, and push them away from the camera
+myActor1.position=[-100,0,-2000];  // x = -100, y = 0 , z = -2000
+myActor2.position=[ 100,0,-2000];  // x = 100, y = 0 , z = -2000
+  
+// start with actor rotated by 180 about x & y axis, so they can twist into place
+function createAnimation() {
+  
+  var startRotation = new dali.Rotation(180, -180, 0);
+  myActor1.rotation = startRotation;
+  myActor2.rotation = startRotation;
+  
+  dali.stage.add( myActor1 );
+  dali.stage.add( myActor2 );
+  
+
+  var anim = new dali.Animation(1); // default duration is increased if length of all animations is greater than it.
+  
+  var animOptions = {
+      alpha: "linear",
+      delay: 0.5,     // used to delay the start of the animation
+      duration: 3,    // duration of the animation
+      };
+  
+  // move myActor1 z position back to 0
+  anim.animateTo(myActor1, "positionZ", 0, animOptions);
+  
+  //  rotate back to correct orientation
+  var endRotation = new dali.Rotation(0,0,0);
+  
+  animOptions.alpha = "easeInOutSine";
+  anim.animateTo(myActor1, "rotation", endRotation, animOptions);
+  
+  // Delay the myActor2  by  a second
+  animOptions.delay = 0.0;
+  animOptions.alpha = "linear";
+  anim.animateTo(myActor2, "positionZ", 0, animOptions);
+  
+  //  rotate back to correct orientation
+  animOptions.alpha = "easeInOutSine";
+  anim.animateTo(myActor2, "rotation", endRotation, animOptions);
+
+  return anim;
+}
+
+
+var anim = createAnimation();
+
+anim.play();
+
+```
+
+### GL-ES shader animation example
+
+The example below does the following with a single animation object:
+
+ - rotates the image actor
+ - magnifies and color shifts the image using a fragment shader
+  
+<img src="../assets/img/shader-animation.png">
+  
+
+```
+// create an image actor in the centre of the stage
+createImageActor = function() {
+  
+  var image = new dali.ResourceImage({ url:getImageDirectory()+"gallery-medium-50.jpg"});
+  var imageActor = new dali.ImageActor( image );
+  imageActor.parentOrigin = dali.CENTER;
+  dali.stage.add( imageActor );
+  
+  return imageActor;
+}
+  
+// Creates a simple fragment shader that has 2 uniforms.
+// uColorShift which can add a color to pixel
+// uScale which can simulate zooming into the texture
+  
+createColorShiftAndZoomEffect = function() {
+  
+    var fragShader =
+  " uniform lowp vec4 uColorShift; \
+    uniform lowp vec2 uScale;    \
+                     \
+    void main() \
+    {           \
+      gl_FragColor = texture2D( sTexture, vTexCoord * uScale ) * uColor + uColorShift; \
+    }"
+  
+  // Shader API
+  // geometryType = "image", "text", "mesh", "textured-mesh"
+  // fragmentPrefex ="" // prefix             ( optional)
+  // fragmentShader = ""  // fragment shader   ( optional)
+  // geometryHints = [ "gridX", "gridY", "grid","depthBuffer","blending" ]   ( optional)
+  //
+  var shaderOptions = {
+      geometryType: "image",
+      fragmentShader: fragShader,
+      geometryHints: ["blending"]
+  };
+  
+  // create a new shader effect
+  var shader = new dali.ShaderEffect(shaderOptions);
+  
+  // add the color shift uniform so we can animate it
+  // default the color shift to zero, so it has no effect
+  shader.setUniform("uColorShift", [0, 0, 0, 0]);
+  
+  // add the zoom uniform so we can animate it
+  // default to 1,1 so no zoom is applied
+  var scale = new dali.Vector2([1, 1]);
+  shader.setUniform("uScale", scale);
+  
+  return shader;
+}
+
+createShaderAnimation = function( shader, color, zoom, duration, delay )
+{
+    var shaderAnim = new dali.Animation(duration+delay);
+
+    var animOptions = {
+        alpha: "doubleEaseInOutSine60",
+        delay: delay,
+        duration: duration,
+    };
+
+    // animate the color uniform
+    shaderAnim.animateTo( shader, "uColorShift", color, animOptions);
+
+    // zoom in and out of the image while applying the color shift
+    shaderAnim.animateTo( shader, "uScale", zoom, animOptions);
+
+    return shaderAnim;
+}
+  
+var imageActor = createImageActor();
+var shaderEffect = createColorShiftAndZoomEffect();
+  
+// assign the shader effect to the actor ( it can be assigned to multiple actors).
+imageActor.setShaderEffect( shaderEffect );
+  
+// create the shader animation
+var zoom = [0.5,0.5];  // zoom into the image by 2
+var color = dali.COLOR_BLUE; // color shift the image to blue
+var duration = 5; // 5 seconds
+var delay = 5; // wait 1 second before starting
+var shaderAnim = createShaderAnimation( shaderEffect, color,zoom, duration, delay);
+  
+// also rotate the imageActor 90 degrees at the same time.
+var rotation = new dali.Rotation(90,0,0,1);
+shaderAnim.animateTo(imageActor, "rotation", rotation, { alpha:"linear", duration:duration, delay:delay });
+
+
+shaderAnim.play();
+
+```
+
+
+### Animation alpha functions
+
+| Name               | Description  |
+|--------------------|--------------|
+|default             |Linear          |
+|linear              |Linear          |
+|square              |Square (x^2)    |
+|reverse             |Reverse linear  |
+|easeIn              |Speeds up and comes to a sudden stop |
+|easeOut             |Sudden start and slows to a gradual stop|
+|easeInOut           |Speeds up and slows to a gradual stop|
+|easeInSine          |Speeds up and comes to a sudden stop|
+|easeOutSine         |Sudden start and slows to a gradual stop|
+|easeInOutSine       |Speeds up and slows to a gradual stop |
+|easeInSine33        |Speeds up and comes to a sudden stop  |
+|easeOutSine33       |Sudden start and slows to a gradual stop |
+|easeInOutSine33     |Speeds up and slows to a gradual stop |
+|easeInOutSine50     |Speeds up and slows to a gradual stop |
+|easeInOutSine60     |Speeds up and slows to a gradual stop |
+|easeInOutSine70     |Speeds up and slows to a gradual stop |
+|easeInOutSine80     |Speeds up and slows to a gradual stop |
+|easeInOutSine90     |Speeds up and slows to a gradual stop |
+|doubleEaseInOutSine6|Speeds up and slows to a gradual stop, then speeds up again and slows to a gradual stop |
+|easeOutQuint50      |Sudden start and slows to a gradual stop  |
+|easeOutQuint80      |Sudden start and slows to a gradual stop  |
+|bounce              |Sudden start, loses momentum and ** Returns to start position ** |
+|bounceBack          |Sudden start, loses momentum and returns to exceed start position ** Returns to start position ** |
+|easeInBack          |Slow start, exceed start position and quickly reach destination |
+|easeOutBack         |Sudden start, exceed end position and return to a gradual stop|
+|easeInOutBack       |Slow start, exceed start position, fast middle, exceed end position and return to a gradual stop|
+|sin                 |full 360 revolution ** Returns to start position ** |
+|sin2x               |full 720 revolution ** Returns to start position ** |
+
+
+
+ @class Animation
+
+*/
diff --git a/plugins/dali-script-v8/docs/content/camera-actor.js b/plugins/dali-script-v8/docs/content/camera-actor.js
new file mode 100644 (file)
index 0000000..818bc85
--- /dev/null
@@ -0,0 +1,51 @@
+/**
+ ## Camera Actor API ( extends Actor API)
+
+
+Allows the developer to use actor semantics to control a camera.
+
+There are two types of camera actor, FREE_LOOK and LOOK_AT_TARGET. By default
+the camera actor will be FREE_LOOK.
+
+A FREE_LOOK camera uses actor's rotation to control where the camera is looking.
+If no additional rotations are specified, the camera looks in the negative Z direction.
+
+For LOOK_AT_TARGET the actor's rotation is ignored, instead the camera looks at TARGET_POSITION
+in world coordinates.
+```
+// get the camera currently used
+var defaultCamera = dali.stage.getRenderTaskList().getTask(0).getCameraActor();
+  
+var fov = defaultCamera.fieldOfView;
+  
+// increase field of view by 10%
+defaultCamera.fieldOfView = fov * 1.1;
+  
+// shift the camera to the left, the rendered scene will shift to the right
+defaultCamera.x -= 10;
+```
+  
+### Camera Actor Specific Properties
+
+| Name                   |    Type    | Writable     | Animatable|
+|------------------------|------------|--------------|-----------|
+| type                  |  dali.CAMERA_FREE_LOOK or  dali.CAMERA_LOOK_AT_TARGET  | &#10004; | &#10008; |
+| projectionMode        | dali.CAMERA_ORTHOGRAPHIC_PROJECTION or dali.CAMERA_PERSPECTIVE_PROJECTION  | &#10004;| &#10008; |
+| fieldOfView           | FLOAT      | &#10004; | &#10008;  |
+| aspectRatio           | FLOAT      | &#10004; | &#10008;  |
+| nearPlaneDistance     | FLOAT      | &#10004; | &#10008;  |
+| farPlaneDistance      | FLOAT      | &#10004; | &#10008;  |
+| leftPlaneDistance     | FLOAT      | &#10004; | &#10008;  |
+| rightPlaneDistance    | FLOAT      | &#10004; | &#10008;  |
+| topPlaneDistance      | FLOAT      | &#10004; | &#10008;  |
+| bottomPlaneDistance   | FLOAT      | &#10004; | &#10008;  |
+| targetPosition        | VECTOR3    | &#10004; | &#10008;  |
+| projectionMatrix      | MATRIX     | &#10004; | &#10008;  |
+| viewMatrix            | MATRIX     | &#10004; | &#10008;  |
+| invertYAxis           | BOOLEAN    | &#10004; | &#10008;  |
+
+
+
+  @class CameraActor
+  @extends Actor
+ */
diff --git a/plugins/dali-script-v8/docs/content/constants.js b/plugins/dali-script-v8/docs/content/constants.js
new file mode 100644 (file)
index 0000000..a6b2e1e
--- /dev/null
@@ -0,0 +1,173 @@
+/**
+ *
+<h3> Dali Constants </h3>
+
+Constants accessible under the dali global object.
+  
+    actor.parentOrigin = dali.BACK_TOP_LEFT;
+    actor.color = dali.COLOR_RED;
+    actor.setBlendFunc( dali.BLEND_FACTOR_ONE_MINUS_SRC_COLOR, dali.BLEND_FACTOR_SRC_ALPHA_SATURATE );
+
+
+| Constant Name | value |
+|---------------|-------|
+|  ** actor.parentOrigin and actor.anchorPoint  **      |                      |
+|BACK_TOP_LEFT      |  (0.0f, 0.0f, 0.0f)  |
+|BACK_TOP_CENTER    |  (0.5f, 0.0f, 0.0f)  |
+|BACK_TOP_RIGHT     |  (1.0f, 0.0f, 0.0f)  |
+|BACK_CENTER_LEFT   |  (0.0f, 0.5f, 0.0f)  |
+|BACK_CENTER        |  (0.5f, 0.5f, 0.0f)  |
+|BACK_CENTER_RIGHT  |  (1.0f, 0.5f, 0.0f)  |
+|BACK_BOTTOM_LEFT   |  (0.0f, 1.0f, 0.0f)  |
+|BACK_BOTTOM_CENTER  |  (0.5f, 1.0f, 0.0f)  |
+|BACK_BOTTOM_RIGHT   |  (1.0f, 1.0f, 0.0f)  |
+|TOP_LEFT            |  (0.0f, 0.0f, 0.5f)  |
+|TOP_CENTER          |  (0.5f, 0.0f, 0.5f)  |
+|TOP_RIGHT          |  (1.0f, 0.0f, 0.5f)  |
+|CENTER_LEFT         |  (0.0f, 0.5f, 0.5f)  |
+|CENTER              |  (0.5f, 0.5f, 0.5f)  |
+|CENTER_RIGHT        |  (1.0f, 0.5f, 0.5f)  |
+|BOTTOM_LEFT         |  (0.0f, 1.0f, 0.5f)  |
+|BOTTOM_CENTER       |  (0.5f, 1.0f, 0.5f)  |
+|BOTTOM_RIGHT        |  (1.0f, 1.0f, 0.5f)  |
+
+|FRONT_TOP_LEFT      |  (0.0f, 0.0f, 1.0f)  |
+|FRONT_TOP_CENTER    |  (0.5f, 0.0f, 1.0f)  |
+|FRONT_TOP_RIGHT     |  (1.0f, 0.0f, 1.0f)  |
+|FRONT_CENTER_LEFT   |  (0.0f, 0.5f, 1.0f)  |
+|FRONT_CENTER        |  (0.5f, 0.5f, 1.0f)  |
+|FRONT_CENTER_RIGHT  |  (1.0f, 0.5f, 1.0f)  |
+|FRONT_BOTTOM_LEFT   |  (0.0f, 1.0f, 1.0f)  |
+|FRONT_BOTTOM_CENTER |  (0.5f, 1.0f, 1.0f)  |
+|FRONT_BOTTOM_RIGHT  |  (1.0f, 1.0f, 1.0f)  |
+
+
+|** Vector3 ** | |
+|VECTOR3_ONE                  |  (1.0f, 1.0f, 1.0f)         |
+|VECTOR3_XAXIS                |  (1.0f, 0.0f, 0.0f)         |
+|VECTOR3_YAXIS                |  (0.0f, 1.0f, 0.0f)         |
+|VECTOR3_ZAXIS                |  (0.0f, 0.0f, 1.0f)         |
+|VECTOR3_NEGATIVE_XAXIS       |  (-1.0f, 0.0f, 0.0f)        |
+|VECTOR3_NEGATIVE_YAXIS       |   (0.0f, -1.0f, 0.0f)       |
+|VECTOR3_NEGATIVE_ZAXIS       |   (0.0f, 0.0f, -1.0f)       |
+|VECTOR3_ZERO                 |   (0.0f, 0.0f, 0.0f)        |
+
+|**  Colors **| -|
+|COLOR_BLACK              |    ( 0.0f, 0.0f, 0.0f, 1.0f )     |
+|COLOR_WHITE              |    ( 1.0f, 1.0f, 1.0f, 1.0f )     |
+|COLOR_RED                |    (   1.0f, 0.0f, 0.0f, 1.0f )   |
+|COLOR_GREEN              |    ( 0.0f, 1.0f, 0.0f, 1.0f )     |
+|COLOR_BLUE               |    (  0.0f, 0.0f, 1.0f, 1.0f )    |
+|COLOR_YELLOW             |    (  1.0f, 1.0f, 0.0f, 1.0f )    |
+|COLOR_MAGENTA            |     ( 1.0f, 0.0f, 1.0f, 1.0f )    |
+|COLOR_CYAN               |    (    0.0f, 1.0f, 1.0f, 1.0f )  |
+|COLOR_TRANSPARENT        |  ( 0.0f, 0.0f, 0.0f, 0.0f )       |
+
+| ** actor.colorMode constants  **  | -|
+| COLOR_MODE_USE_OWN_COLOR,                  | integer value  |
+| COLOR_MODE_USE_PARENT_COLOR,               | integer value  |
+| COLOR_MODE_USE_OWN_MULTIPLY_PARENT_COLOR,  | integer value  |
+| COLOR_MODE_USE_OWN_MULTIPLY_PARENT_ALPHA,  | integer value  |
+
+|**actor.positionInheritance  **| |
+|POSITION_INHERITANCE_INHERIT_PARENT_POSITION,       | integer value |
+|POSITION_INHERITANCE_USE_PARENT_POSITION,           | integer value |
+|POSITION_INHERITANCE_USE_PARENT_POSITION_PLUS_LOCAL_POSITION, | integer value |
+|POSITION_INHERITANCE_DONT_INHERIT_POSITION,         | integer value |
+
+|**actor.drawMode  **| |
+|DRAW_MODE_NORMAL                         | integer value |
+|DRAW_MODE_OVERLAY                        | integer value |
+|DRAW_MODE_STENCIL                        | integer value |
+
+|**Image load policy  **| |
+|IMAGE_LOAD_POLICY_IMMEDIATE              | integer value |
+|IMAGE_LOAD_POLICY_ON_DEMAND              | integer value |
+
+|**actor.SetBlendFunc() ** | |
+|BLEND_FACTOR_ZERO                        | integer value |
+|BLEND_FACTOR_ONE                         | integer value |
+|BLEND_FACTOR_SRC_COLOR                   | integer value |
+|BLEND_FACTOR_ONE_MINUS_SRC_COLOR         | integer value |
+|BLEND_FACTOR_SRC_ALPHA                   | integer value |
+|BLEND_FACTOR_ONE_MINUS_SRC_ALPHA         | integer value |
+|BLEND_FACTOR_DST_ALPHA                   | integer value |
+|BLEND_FACTOR_ONE_MINUS_DST_ALPHA         | integer value |
+|BLEND_FACTOR_DST_COLOR                   | integer value |
+|BLEND_FACTOR_ONE_MINUS_DST_COLOR         | integer value |
+|BLEND_FACTOR_SRC_ALPHA_SATURATE          | integer value |
+|BLEND_FACTOR_CONSTANT_COLOR              | integer value |
+|BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR    | integer value |
+|BLEND_FACTOR_CONSTANT_ALPHA              | integer value |
+|BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA    | integer value |
+
+|**actor.SetBlendMode()  **| |
+|BLENDING_OFF                              | integer value |
+|BLENDING_AUTO                             | integer value |
+|BLENDING_ON                               | integer value |
+
+|**actor.SetBlendEquation()  ** | |
+|BLEND_EQUATION_ADD                         | integer value  |
+|BLEND_EQUATION_SUBTRACT                    | integer value  |
+|BLEND_EQUATION_REVERSE_SUBTRACT            | integer value  |
+
+|**actor.SetCullFace()** | |
+|CULL_FACE_DISABLE          | integer value  |
+|CULL_FRONT_FACE           | integer value  |
+|CULL_BACK_FACE            | integer value  |
+|CULL_FRONT_AND_BACK_FACE  | integer value  |
+
+|**actor.sizeMode** | |
+|USE_OWN_SIZE                   | integer value  |
+|SIZE_EQUAL_TO_PARENT           | integer value  |
+|SIZE_RELATIVE_TO_PARENT        | integer value  |
+|SIZE_FIXED_OFFSET_FROM_PARENT  | integer value  |
+
+
+|**animation.SetEndAction( mode ) ** | |
+|ANIMATION_BAKE             | integer value  |
+|ANIMATION_DISCARD          | integer value  |
+|ANIMATION_BAKE_FINAL       | integer value  |
+
+|**camera.type ** | |
+|CAMERA_FREE_LOOK             | integer value  |
+|CAMERA_LOOK_AT_TARGET        | integer value  |
+
+|**camera.projectionMode ** | |
+|CAMERA_PERSPECTIVE_PROJECTION  | integer value  |
+|CAMERA_ORTHOGRAPHIC_PROJECTION | integer value  |
+
+
+|** Pixel formats     **          |  |
+| PIXEL_FORMAT_A8                            | integer value  |
+| PIXEL_FORMAT_L8                            | integer value  |
+| PIXEL_FORMAT_LA88                          | integer value  |
+| PIXEL_FORMAT_RGB565                        | integer value  |
+| PIXEL_FORMAT_BGR565                        | integer value  |
+| PIXEL_FORMAT_RGBA4444                      | integer value  |
+| PIXEL_FORMAT_BGRA4444                      | integer value  |
+| PIXEL_FORMAT_RGBA5551                      | integer value  |
+| PIXEL_FORMAT_BGRA5551                      | integer value  |
+| PIXEL_FORMAT_RGB888                        | integer value  |
+| PIXEL_FORMAT_RGB8888                       | integer value  |
+| PIXEL_FORMAT_BGR8888                       | integer value  |
+| PIXEL_FORMAT_RGBA8888                      | integer value  |
+| PIXEL_FORMAT_BGRA8888                      | integer value  |
+
+| **Pixel Compressed formats                 ** |  |
+| PIXEL_FORMAT_COMPRESSED_R11_EAC                 | integer value           |
+| PIXEL_FORMAT_COMPRESSED_SIGNED_R11_EAC          | integer value           |
+| PIXEL_FORMAT_COMPRESSED_RG11_EAC                | integer value           |
+| PIXEL_FORMAT_COMPRESSED_SIGNED_RG11_EAC         | integer value           |
+| PIXEL_FORMAT_COMPRESSED_RGB8_ETC2               | integer value           |
+| PIXEL_FORMAT_COMPRESSED_SRGB8_ETC2              | integer value           |
+| PIXEL_FORMAT_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2    | integer value  |
+| PIXEL_FORMAT_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2   | integer value  |
+| PIXEL_FORMAT_COMPRESSED_RGBA8_ETC2_EAC                   | integer value  |
+| PIXEL_FORMAT_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC            | integer value  |
+| PIXEL_FORMAT_COMPRESSED_RGB8_ETC1                        | integer value  |
+| PIXEL_FORMAT_COMPRESSED_RGB_PVRTC_4BPPV1                 | integer value  |
+</table>
+
+ * @class Constants
+ */
diff --git a/plugins/dali-script-v8/docs/content/dali.js b/plugins/dali-script-v8/docs/content/dali.js
new file mode 100644 (file)
index 0000000..578f6ae
--- /dev/null
@@ -0,0 +1,60 @@
+/**
+ *
+
+## DALi 3D ( Dynamic Animation Library )
+
+DALi is a quick and easy way of allowing developers to create Rich UI Applications like:
+
+ + Image & Video galleries
+ + Music players
+ + Games
+ + Maps
+ + Homescreens / launch pads
+ + Advanced watch faces for wearable devices
+  
+
+DALi is based on OpenGL ES 2.0 & 3.0, however it hides the complexity of
+the OpenGL API from developers and provides a clean cross-platform JavaScript framework.
+
++ Create Images, Text and Meshes
++ Create shaders using GLSL
++ Provide multiple cameras and render targets
++ Provides Layers to aid in 2D UI layout
++ Easy to use Animation framework
++ Automatic background loading of resources ( images / text / meshes )
++ Runs all animations in a seperate thread. This helps maintain 60 FPS even if JavaScript is performing a long operation ( e.g. Garbage Collection ).
++ Provides keyboard / touch / mouse handling
+  
+  
+<img src="../assets/img/shared/screenshot.png">
+
+## Running JavaScript from DALi C++ API
+```
+mScript = Dali::Toolkit::Script::New();
+  
+mScript.ExecuteFile( mScriptFileName);
+```
+
+## Actors and the Stage
+
+A DALi application uses a hierachy of Dali::Actor objects to position visible content.  An actor inherits a position relative to its parent, and can be moved relative to this point.  UI controls can be built by combining multiple actors.
+
+To display the contents of an actor, it must be connected to the Dali::Stage.  This provides an invisible root (top-level) actor, to which all other actors are added.  A direct or indirect child of the root actor is considered "on-stage".  Multi-touch events are received through signals emitted by on-stage actors.
+
+The following example shows how to connect a new actor to the stage:
+```
+       var actor = new dali.actor();
+  
+       dali.stage.add(actor);
+```
+## The Coordinate System
+
+The Stage has a 2D size, which matches the size of the application window.  The default coordinate system in DALi has the origin at the top-left corner, with positive X to right, and position Y going
+downwards.  This is intended to be convenient when laying-out 2D views.
+
+<img src="../assets/img/shared/coordinate-system-and-stage.png">
+
+
+ * @module DALi
+ * @main  DALi
+ */
diff --git a/plugins/dali-script-v8/docs/content/helpers.js b/plugins/dali-script-v8/docs/content/helpers.js
new file mode 100644 (file)
index 0000000..78b37c2
--- /dev/null
@@ -0,0 +1,5 @@
+module.exports = {
+    daliName: function() {
+        return "dali";
+    }
+};
diff --git a/plugins/dali-script-v8/docs/content/image-actor.js b/plugins/dali-script-v8/docs/content/image-actor.js
new file mode 100644 (file)
index 0000000..aebe46f
--- /dev/null
@@ -0,0 +1,64 @@
+/**
+## Image Actor API ( extends Actor API)
+
+An actor for displaying images.
+
+Allows the developer to add an actor to stage which displays the content of an Image object.
+
+By default CullFaceMode is set to CullNone to enable the ImageActor to be viewed from all angles.
+
+If an ImageActor is created without setting size, then the actor takes the size of the image -
+this is the natural size.
+Setting a size on the ImageActor, e.g through the SetSize api or through an animation will
+stop the natural size being used.
+
+Such a set size can be changed back to the image's size by calling {{#crossLink "ImageActor/setToNaturalSize:method"}}{{/crossLink}}  .
+
+If a pixel area is set on an ImageActor with natural size, the actor size will change
+to match the pixel area. If a pixel area is set on an ImageActor that has had it's size set,
+then the size doesn't change, and the partial image will be stretched to fill the set size.
+
+Clearing the pixel area on an Image actor with natural size will cause the actor to show the
+whole image again, and will change size back to that of the image.
+
+Clearing the pixel area on an Image actor with a set size will cause the actor to show the
+whole image again, but will not change the image size.
+
+### Simple example
+```
+var image = new dali.ResourceImage( {url:"background.png"} );
+var imageActor = new dali.ImageActor( image );
+  
+// by default an actor is anchored to the top-left of it's parent actor
+// change it to the middle
+imageActor.parentOrigin = dali.CENTER;
+  
+// scale it up by 2 times  in x,y
+imageActor.scale = [ 2, 2, 1  ];
+  
+// add to the stage
+dali.stage.add( imageActor );
+```
+
+### Example using a pixel area ( needed for displaying images from a Texture Atlas )
+
+```
+var imageAtlas = new dali.ResourceImage( {url:"atlas.png"} )
+```
+<img src="../assets/img/example-javascript-code.png">
+
+### Image Actor Specific Properties
+
+
+|Name                   |    Type    | Writable     | Animatable|
+|-----------------------|------------|--------------|-----------|
+| pixelArea             | RECTANGE   | &#10004;     | &#10008;  |
+| fadeIn                | BOOLEAN    | &#10004;     | &#10008;  |
+| fadeInDuration        | FLOAT      | &#10004;     | &#10008;  |
+| style                 | dali.IMAGE_ACTOR_STYLE_QUAD, dali.IMAGE_ACTOR_STYLE_NINE_PATCH, dali.IMAGE_ACTOR_STYLE_NINE_PATCH_NO_CENTER  | &#10004;     | &#10008;  |
+| border                | VECTOR4    | &#10004;     | &#10008;  |
+
+
+@class ImageActor
+@extends RenderableActor
+ */
\ No newline at end of file
diff --git a/plugins/dali-script-v8/docs/content/image.js b/plugins/dali-script-v8/docs/content/image.js
new file mode 100644 (file)
index 0000000..5d06d3e
--- /dev/null
@@ -0,0 +1,75 @@
+/**
+ *
+## Image API
+
+An Image object represents a resource that can be added to ImageActors and ShaderEffects.
+  
+The image is discarded when all ImageActors using the Image object are discarded or in case they
+were created with dali.IMAGE_RELEASE_POLICY_UNUSED, taken off stage.
+  
+Note: if a resource was shared between Image objects it exists until its last reference is gone.
+  
+Image objects are responsible for the underlying resource's lifetime.
+  
+### ReleasePolicies
+
+ - dali.IMAGE_RELEASE_POLICY_UNUSED: release resource once ImageActor using it is taken off stage.
+ - dali.IMAGE_RELEASE_POLICY_NEVER: keep resource alive until Image object is thrown away ( default).
+  
+#### Resolution of conflicting policies
+ - If the same image is created more than once with conflicting policies, ReleasePolicy "Never" overrides "Unused".
+  
+
+### The hierarchy of Image is:
+
+- {{#crossLink "image"}}Image base class {{/crossLink}} provides basic functionality
+ - {{#crossLink "ResourceImage"}}ResourceImage {{/crossLink}} used for loading image files and nine-patch files
+  - {{#crossLink "NinePatchImage"}}NinePatch {{/crossLink}} used just for nine patch files
+ - {{#crossLink "BufferImage"}}BufferImage {{/crossLink}} used for generating your own image
+ - {{#crossLink "FrameBufferImage"}}FrameBufferImage {{/crossLink}} contains the result of an 'off screen' render pass of a RenderTask.
+ - {{#crossLink "NativeImage"}}NativeImage {{/crossLink}} Its data is provided by native resources, such as shared bitmap memory or pixmap from X11 or ECORE-X11, etc.
+
+  
+### Example:
+```
+var image = new dali.ResourceImage( {url: "background.png"} );
+  
+var imageActor1 = new dali.ImageActor( image );
+var imageActor2 = new dali.ImageActor( image );
+  
+shaderEffect.setEffectImage( image );
+
+
+```
+The API supports functionality such as:
+
++ {{#crossLink "image/Image:method"}}new dali.ResourceImage{{/crossLink}}
++ {{#crossLink "image/getWidth:method"}}{{/crossLink}}
++ {{#crossLink "image/getHeight:method"}}{{/crossLink}}
+  
+### 9 patch images
+
+The Image class also has support for loading 9 patch Images if the filename contains .9.
+e.g.
+```
+var blackFrame = new dali.ResourceImage( url:"black-frame.9.png"});
+var borderNinePatch = new dali.ResourceImage( {url:"border.9.png"} );
+// or if the image doesn't have a .9 filename, you can use the NinePatchImage class
+var image = new dali.NinePatchImage( {url:"my_image.png"})
+```
+The nine patch image will scale automatically with the size of the actor.
+
+Tool for making 9 patches
+
+  http://romannurik.github.io/AndroidAssetStudio/nine-patches.html
+
+More information on them:
+
+  http://radleymarx.com/blog/simple-guide-to-9-patch/
+
+  http://developer.android.com/tools/help/draw9patch.html
+
+
+
+ @class Image
+ */
diff --git a/plugins/dali-script-v8/docs/content/keyboard-focus-manager.js b/plugins/dali-script-v8/docs/content/keyboard-focus-manager.js
new file mode 100644 (file)
index 0000000..465e249
--- /dev/null
@@ -0,0 +1,66 @@
+/**
+ *
+
+## Keyboard Focus Manager API
+
+Keyboard focus manager controls the keyboard focus flow.
+
+It also allows you to set an actor that is used to high light the focused actor.
+
+{{#crossLink "KeyboardFocusManager/setFocusIndicatorActor:method"}}{{/crossLink}}
+
+The application is required to help the manager when moving focus.
+
+<img src="../assets/img/focus-manager.png">
+
+### keyboard-pre-focus-change
+
+Connect to the pre-focus-change call back as follows:
+```
+// listen for pre-focus change events
+dali.keyboardFocusManager.connect("keyboard-pre-focus-change", this.preFocusChanged);
+  
+// example call back handler
+  
+// currentFocusedActor =  currently focused actor
+// proposed = keyboard focus managers guess at what actor should be next
+// direction = the direction of the focus is moving in
+//
+myApp.preFocusChanged = function( currentFocusedActor, proposedActorToFocus, direction)
+{
+  
+  if (direction == "up" )
+  {
+    return actor above current actor;
+    }
+  if (direction == "right" )
+  {
+    return actor to the right of current actor;
+  }
+}
+  
+dali.keyboardFocusManager.connect("keyboard-pre-focus-change", myCallback)
+```
+
+KeyboardFocusManager makes the best guess for which actor to focus towards the given direction, but applications might want to change that.
+
+By connecting with this signal, they can check the proposed actor to focus and return a different actor if they wish.
+
+This signal is only emitted when the navigation key is pressed and KeyboardFocusManager tries to move the focus automatically.
+
+It won't be emitted for focus movement by calling setCurrentFocusActor directly.
+
+### keyboard-focus-changed
+
+This signal is emitted after the current focused actor has been changed.
+```
+myCallback( originalFocusedActor, currentFocusedActor)
+{
+}
+  
+dali.keyboardFocusManager.connect("keyboard-focus-change", myCallback)
+```
+
+@class KeyboardFocusManager
+
+ */
diff --git a/plugins/dali-script-v8/docs/content/layer-actor.js b/plugins/dali-script-v8/docs/content/layer-actor.js
new file mode 100644 (file)
index 0000000..bcbf696
--- /dev/null
@@ -0,0 +1,45 @@
+/**
+## Layer Actor API ( extends Actor API)
+
+ Layers provide a mechanism for overlaying groups of actors on top of each other.
+
+ When added to the stage, a layer can be ordered relative to other layers. The bottom
+ layer is at depth zero. The stage provides a default layer for it's children.
+
+ Layered actors inherit position etc. as normal, but are drawn in an order determined
+ by the layers. The depth buffer is cleared before each layer is rendered unless depth
+ test is disabled or there's no need for it based on the layers contents;
+ actors in lower layers cannot obscure actors in higher layers.
+
+ If depth test is disabled, there is no performance overhead from clearing the depth buffer.
+
+
+### Simple example
+
+```
+
+var textActor1 = new dali.TextActor( "I'm above" );
+var textActor2 = new dali.TextActor( "I'm below" );
+  
+// add first actor to the stage
+dali.stage.add( textActor1 );
+  
+// create a layer and add second actor
+var layer = new dali.Layer();
+layer.add( textActor2 );
+dali.stage.add( layer );  // textActor2 is now above textActor1
+  
+// shift layer to bottom
+layer.lowerToBottom();   // textActor2 is now below textActor1
+```
+
+### Layer Actor Specific Properties
+
+| Name                   |    Type    | Writable     | Animatable|
+|------------------------|------------|--------------|-----------|
+| clippingEnabled        |BOOLEAN     | &#10004;     |  &#10008; |
+| clippingBox            | RECTANGLE ([0,0,400,600]) | &#10004; | &#10008;|
+
+  @class Layer
+  @extends Actor
+ */
diff --git a/plugins/dali-script-v8/docs/content/module-loader.js b/plugins/dali-script-v8/docs/content/module-loader.js
new file mode 100644 (file)
index 0000000..181d8dc
--- /dev/null
@@ -0,0 +1,8 @@
+/**
+ ## Module loader
+
+ See {{#crossLink "ModuleLoader/require:method"}}{{/crossLink}}
+
+ @class ModuleLoader
+ */
+
diff --git a/plugins/dali-script-v8/docs/content/pan-gesture-detector.js b/plugins/dali-script-v8/docs/content/pan-gesture-detector.js
new file mode 100644 (file)
index 0000000..3285651
--- /dev/null
@@ -0,0 +1,41 @@
+/**
+ *
+## PanGestureDetector API
+
+
+PanGestureDetector analyse a stream of touch events and looks for panning (or dragging) gestures.
+If an actor is attached to the pan gesture detector, the detector will emit a detected signal to
+the application when it recognises a pan gesture on the attached actor in its analysis.
+
+### Simple example
+
+```
+// Create a pan gesture detector
+var panGestureDetector = new dali.PanGestureDetector();
+
+var actor = new dali.Actor();
+dali.stage.add(actor);
+
+// Attach an actor to the detector
+panGestureDetector.attach(actor);
+
+// Connect the detected signal
+panGestureDetector.connect("pan-detected", onPan);
+
+onPan = function(actor, panGesture)
+{
+    log("Pan gesture state: " + panGesture.state + ", number of touches: " + panGesture.numberOfTouches + ", time stamp: " + panGesture.time + "\n");
+    log("local position: " + panGesture.position.x + ", " + panGesture.position.y + "\n");
+    log("local displacement: " + panGesture.displacement.x + ", " + panGesture.displacement.y + "\n");
+    log("local velocity: " + panGesture.velocity.x + ", " + panGesture.velocity.y + "\n");
+    log("screen position: " + panGesture.screenPosition.x + ", " + panGesture.screenPosition.y + "\n");
+    log("screen displacement: " + panGesture.screenDisplacement.x + ", " + panGesture.screenDisplacement.y + "\n");
+    log("screen velocity: " + panGesture.screenVelocity.x + ", " + panGesture.screenVelocity.y + "\n");
+}
+
+// Detach the actor from the detector
+panGestureDetector.detach(actor);
+```
+@class PanGestureDetector
+
+*/
\ No newline at end of file
diff --git a/plugins/dali-script-v8/docs/content/path-animation.js b/plugins/dali-script-v8/docs/content/path-animation.js
new file mode 100644 (file)
index 0000000..36d7986
--- /dev/null
@@ -0,0 +1,46 @@
+/**
+ *
+## Path Animation API
+
+Paths can be used to animate position and orientation of actors.
+
+<img src="../assets/img/path.png"/>
+  
+Example
+
+```
+log("Path animation test\n");
+  
+var point0 = [ 0.0, 80.0, 0.0 ];
+var point1 = [ 200.0, 200.0, 0.0 ];
+var point2 = [ 400.0, 80.0, 0.0 ];
+  
+//Create a path
+var myPath = new dali.Path();
+myPath.points = [ point0, point1, point2 ];
+myPath.generateControlPoints( 0.25 );
+  
+function begin()
+{
+  
+  var image = new dali.ResourceImage( {url:"gallery-small-45.jpg"} );
+  
+  var actor = new dali.ImageActor(image);
+  
+  actor.position = [100,100,0];
+  dali.stage.add( actor );
+  
+  var animation = new dali.Animation(2.0);
+  var animOptions = { alpha:"easeInOutSine", delay:0.5, duration:1.5 };
+  var forward = new dali.Vector3(1,0,0);
+  animation.animate( actor, myPath, forward, animOptions );
+  
+  animation.setLooping( true );
+  animation.play();
+}
+  
+begin();
+```
+@class Path
+
+*/
\ No newline at end of file
diff --git a/plugins/dali-script-v8/docs/content/render-task.js b/plugins/dali-script-v8/docs/content/render-task.js
new file mode 100644 (file)
index 0000000..c410fdf
--- /dev/null
@@ -0,0 +1,87 @@
+/**
+ *
+
+## RenderTask API
+
+
+RenderTasks describe how the Dali scene should be rendered.
+
+The {{#crossLink "Stage/getRenderTaskList:method"}}{{/crossLink}} method provides access to an ordered list of render-tasks.
+
+Each RenderTask must specify the source actors to be rendered, and a camera actor from
+which the scene is viewed.
+
+
+RenderTasks may optionally target a frame-buffer, otherwise the default GL surface is used;
+typically this is a window provided by the native system.
+
+
+By default Dali provides a single RenderTask, which renders the entire actor hierachy using
+a default camera actor and GL surface. If stereoscopic rendering is enabled, Dali will create
+two additional render tasks, on for each eye. Each render task will have its own camera parented
+to the default camera actor.
+
+The first RenderTask used for input handling will be the last one rendered, which also has input enabled,
+and has a valid source & camera actor; see {{#crossLink "RenderTask/setInputEnabled:method"}}{{/crossLink}}.
+
+If none of the actors are hit in the last RenderTask rendered, then input handling will continue
+with the second last RenderTask rendered, and so on.
+
+All RenderTasks which target a frame-buffer (i.e. off screen) will be rendered before all RenderTasks
+which target the default GL surface. This allows the user to render intermediate targets which are used
+later when targetting the screen.
+
+A RenderTask targetting a frame-buffer can still be hit-tested, provided that the
+screen->frame-buffer coordinate conversion is successful; see SetScreenToFrameBufferMappingActor().
+```
+var tasklist = dali.stage.getRenderTaskList();
+  
+var renderTask0 = tasklist.createTask();
+
+renderTask0.setSourceActor( myActor );
+renderTask0.setClearEnabled( true );
+renderTask0.clearColor = [1.0,0.0,0.0,0.0];
+
+renderTask0.clearColor = [1.0,0.0,0.0,0.0];
+
+var camera = new dali.CameraActor();
+
+renderTask0.setCameraActor( camera );
+```
+
+### Render Task Specific Properties
+
+
+| Name                   |    Type    | Writable     | Animatable|
+|------------------------|------------|--------------|-----------|
+|viewportPosition       | VECTOR2    | &#10004;     | &#10008; |
+|viewportSize           | VECTOR2    | &#10004;     | &#10008; |
+|clearColor             | VECTOR4    | &#10004;     | &#10008; |
+
+
+@class RenderTask
+*/
+
+/**
+ * View port position
+ *
+ * @property viewportPosition
+ * @type dali Vector2
+ */
+viewportPosition
+
+/**
+ * View port size
+ *
+ * @property parentOrigin
+ * @type dali Vector3
+ */
+viewportSize
+
+ /**
+ * clear color
+ *
+ * @property clearColor
+ * @type dali Vector4
+ */
+ clearColor
\ No newline at end of file
diff --git a/plugins/dali-script-v8/docs/content/renderable-actor.js b/plugins/dali-script-v8/docs/content/renderable-actor.js
new file mode 100644 (file)
index 0000000..add11aa
--- /dev/null
@@ -0,0 +1,17 @@
+/**
+ *
+ * <h2> Renderable Actor ( Extends Actor API )</h2>
+ * Renderable actors are actors that can be drawn.
+ * These currently are:
+ * - {{#crossLink "ImageActor"}}{{/crossLink}}
+ * - {{#crossLink "TextActor"}}{{/crossLink}}
+ * - {{#crossLink "MeshActor"}}{{/crossLink}}
+ *
+ * @class RenderableActor
+ * @extends Actor
+ */
+
+
+
+
+
diff --git a/plugins/dali-script-v8/docs/content/resource-image.js b/plugins/dali-script-v8/docs/content/resource-image.js
new file mode 100644 (file)
index 0000000..618f3cf
--- /dev/null
@@ -0,0 +1,43 @@
+/**
+ *
+## ResourceImage (extends Image)
+
+A resource image extends the basic {{#crossLink "image"}}Image class{{/crossLink}} with
+the ability to load an image from a file.
+
+ResourceImage supports two types of load policies
+
+- dali.IMAGE_LOAD_POLICY_IMMEDIATE //  load image once it is created (default)
+- dali.IMAGE_LOAD_POLICY_ON_DEMAND // delay loading until the image is being used (a related actor is added to Stage)
+  
+### Simple example
+```
+
+var image = new dali.ResourceImage( { url:"my_image.png" } );
+
+var imageActor = new dali.ImageActor( image );
+
+```
+### Advanced example
+```
+
+function imageLoaded( image )
+{
+  log("image loaded " +image.url + "\n");
+}
+
+var options = {
+  url:"my_image.png",
+  loadPolicy:dali.IMAGE_LOAD_POLICY_IMMEDIATE,
+  releasePolicy: dali.IMAGE_RELEASE_POLICY_UNUSED
+}
+var image = new dali.ResourceImage( options );
+
+image.connect("image-loading-finished", finished );
+
+var imageActor = new dali.ImageActor( image );
+
+```
+@class ResourceImage
+@extends Image
+ */
\ No newline at end of file
diff --git a/plugins/dali-script-v8/docs/content/shader-effect.js b/plugins/dali-script-v8/docs/content/shader-effect.js
new file mode 100644 (file)
index 0000000..ea1eba8
--- /dev/null
@@ -0,0 +1,259 @@
+/**
+ *
+
+## Shader Effects API
+
+Shader effects provide a visual effect for actors.
+
+For a Custom shader you can provide the vertex and fragment shader code as strings.
+Each shader is provided with default uniforms and attributes.
+For a vertex shader this part contains the following code:
+```
+precision highp float;
+attribute vec3  aPosition;
+attribute vec2  aTexCoord;
+uniform   mat4  uMvpMatrix;
+uniform   mat4  uModelMatrix;
+uniform   mat4  uViewMatrix;
+uniform   mat4  uModelView;
+uniform   mat3  uNormalMatrix;
+uniform   mat4  uProjection;
+uniform   vec4  uColor;
+varying   vec2  vTexCoord;
+```
+The custom shader part is expected to output the vertex position and texture coordinate.
+A basic custom vertex shader would contain the following code:
+```
+void main()
+{
+    gl_Position = uProjection * uModelView * vec4(aPosition, 1.0);
+    vTexCoord = aTexCoord;
+}
+```
+For an Image fragment shader the default attributes and uniforms are:
+```
+precision mediump float;
+uniform   sampler2D sTexture;
+uniform   sampler2D sEffect;
+uniform   vec4      uColor;
+varying   vec2      vTexCoord;
+```
+The custom shader is expected to output the fragment color.
+The basic fragment shader for images would contain:
+```
+void main()
+{
+  gl_FragColor = texture2D( sTexture, vTexCoord ) * uColor;
+}
+```
+The API supports functionality such as:
+
++ new dali.{{#crossLink "ShaderEffect/ShaderEffect:method"}}{{/crossLink}}
++ {{#crossLink "ShaderEffect/setUniform:method"}}{{/crossLink}}
+
+### Example of using a custom uniform to brighten an Image (Fragment Shader)
+
+<img src="../assets/img/fragment-shader-color.png">
+```
+createColorEffect = function()
+{
+  
+  // add uColorShift to the pixel color
+  
+  var fragShader =
+    "uniform lowp vec4 uColorShift; \
+    \
+    void main()             \
+    {                  \
+      gl_FragColor = texture2D( sTexture, vTexCoord ) * uColor + uColorShift; \
+    }"
+  
+    var shaderOptions = {
+        geometryType: "image",
+        fragmentShader: fragShader
+    };
+  
+  // create a new shader effect
+    var shader = new dali.ShaderEffect(shaderOptions);
+  
+  // add the color shift uniform so we can modify and animate it
+    shader.setUniform("uColorShift", [0.0, 0.0, 0.0, 0]);
+    return shader;
+}
+// create an image actor and add an image to it
+var image = new dali.ResourceImage( { url: getImageDirectory() +"gallery-medium-50.jpg"});
+var imageActor = new dali.ImageActor( image );
+imageActor.parentOrigin = dali.CENTER;
+dali.stage.add( imageActor );
+  
+var colorShift = createColorEffect();
+  
+colorShift.setUniform( "uColorShift", [0.5,0.5,0.5,0.0] );  // increase RGB by 50%
+  
+imageActor.setShaderEffect( colorShift );
+```
+
+For an example of animating we can just do:
+```
+var shaderAnim = new dali.Animation(10);
+  
+var animOptions = {
+    alpha: "doubleEaseInOutSine60",
+};
+  
+// animate the color uniform to full white
+shaderAnim.animateTo( colorShift, "uColorShift", dali.COLOR_WHITE, animOptions);
+  
+shaderAnim.play();
+```
+Like all animatable properties we can also use keyframes to animate the value.
+* * *
+
+### Example of animating a custom uniform to perform a mask operation (Fragment Shader)
+
+In this example we are using the OpenGL discard function to draw an image with a circular mask.
+
+<img src="../assets/img/fragment-shader-reveal.png">
+```
+createRevealEffect = function()
+{
+// texture co-ordinate is from 0..1
+// we shift the texture co-ordinate to -0.5 to 0.5 to center it
+// then work out the radius from the centre, using ( a^2 + b^2) = c^2
+// we use the dot product to perform the a^2 + b^2
+// then just perform uRadius * uRadius to workout c^2
+  
+    var fragShader =
+      " uniform lowp float uRadius; \
+      \
+       void main()             \
+       {                  \
+         lowp vec2 pos= vec2(vTexCoord.x-0.5,vTexCoord.y-0.5);    \
+         lowp float radius = dot(pos, pos ) ; \
+         if( radius > (uRadius*uRadius) )\
+           discard; \
+         gl_FragColor = texture2D( sTexture, vTexCoord ) * uColor ; \
+       }"
+
+      var shaderOptions = {
+          geometryType: "image",
+          fragmentShader: fragShader
+      };
+  
+    // create a new shader effect
+      var shader = new dali.ShaderEffect(shaderOptions);
+  
+      // set the uniform
+      shader.setUniform("uRadius",0.0);
+      return shader;
+}
+// create an image actor and add an image to it
+var filename = getImageDirectory() +"gallery-medium-50.jpg;
+var image = new dali.ResourceImage( {url: filename });
+var imageActor = new dali.ImageActor( image );
+imageActor.parentOrigin = dali.CENTER;
+dali.stage.add( imageActor );
+  
+var revealEffect = createRevealEffect();
+  
+imageActor.setShaderEffect( revealEffect );
+  
+var shaderAnim = new dali.Animation(5);
+  
+var animOptions = {
+          alpha: "easeInOutSine",
+      };
+  
+// animate up to radius = 0.5 ( a full circle )
+// if we go to 1.0 then it will go to a full box
+shaderAnim.animateTo( revealEffect, "uRadius", 0.5,animOptions);
+shaderAnim.play();
+
+* * *
+### Example of paper twisting in the wind with color (Vertex + Fragment Shader)
+
+<img src="../assets/img/vertex-shader.png"><br>
+
+The example does the following:
+
++ Creates a varying variable called vColor in the vertex shader.
+ + The vColor is set to the position of the vertex, so the color changes depending on its position
++ Create a uniform called uOffset which modifies the xPosition of each vertex, creating a twist effect
+
+An ImageActor normally only has 4 vertices ( quad ). To allow the image to twist and bend we need it to have more
+vertices. To do this we can break the image into a grid using the gridX and gridY geometry hints.
+
+<img src="../assets/img/shader-grid-hint.png">
+
+
+createTwistEffect = function()
+{
+
+    // do some maths on the x-position to move it based on y,z pos + uOffset
+    var vertexShader =
+    " \
+      varying lowp vec4  vColor; \
+      uniform lowp float uOffset; \
+      \
+      void main() \
+      {   \
+        vec4 pos = uProjection * uModelView * vec4(aPosition, 1.0); \
+        pos.x= 3*pos.z*(sin(1.57+uOffset+pos.y/1000.0)); \
+        gl_Position =pos; \
+          vColor = pos/500.0;\
+          vTexCoord = aTexCoord; \
+    }"
+  
+    // add the vColor to the pixel color to tint it
+    var fragShader =
+      " \
+       varying lowp vec4 vColor; \
+       void main()               \
+       {                         \
+         gl_FragColor = texture2D( sTexture, vTexCoord ) *uColor + vColor*0.2;  \
+       }"
+  
+    var shaderOptions = {
+          geometryType: "image",
+          vertexShader: vertexShader,
+          fragmentShader: fragShader,
+          geometryHints: ["grid"]
+    };
+  
+    // create a new shader effect
+    var shader = new dali.ShaderEffect(shaderOptions);
+  
+    // set the uniform
+    shader.setUniform("uOffset",0.0);
+    return shader;
+}
+  
+
+dali.stage.setBackgroundColor( dali.COLOR_WHITE);
+
+var image = new dali.ResourceImage( { url:getImageDirectory() +"gallery-medium-50.jpg"});
+var imageActor = new dali.ImageActor( image );
+imageActor.parentOrigin = dali.CENTER;
+imageActor.setCullFace( dali.CULL_FACE_DISABLE ); // disable face culling so we can see both sides
+dali.stage.add( imageActor );
+  
+// start it of tilted around the y-axis
+imageActor.rotation=new dali.Rotation(90, 0, 1, 0);
+  
+var twistEffect = createTwistEffect();
+imageActor.setShaderEffect( twistEffect );
+  
+var shaderAnim = new dali.Animation(1);
+var animOptions = {
+          alpha: "bounce",
+          duration:20
+      };
+shaderAnim.animateTo( twistEffect, "uOffset",20,animOptions);
+  
+shaderAnim.play();
+```
+Note: In order for fade and color animations to work, the fragment shader needs to multiply the fragment color
+with the uniform color "uColor" of the node
+
+@class ShaderEffect
+*/
\ No newline at end of file
diff --git a/plugins/dali-script-v8/docs/content/stage.js b/plugins/dali-script-v8/docs/content/stage.js
new file mode 100644 (file)
index 0000000..dcacca6
--- /dev/null
@@ -0,0 +1,67 @@
+/**
+## Stage API
+
+The Stage is a top-level object used for displaying a tree of Actors.
+
+ - Stage is a static object used by accessing the dali.stage object.
+ - Stage provides a top-level "root" actor.
+ - Stage provides Key Events to the application
+ - Stage has a background color you can set, see  {{#crossLink "stage/setBackgroundColor:method"}}{{/crossLink}}
+  
+When an actor is not required, remove it from the stage to save memory and help performance.
+```
+dali.stage.setBackgroundColor( dali.COLOR_WHITE);
+  
+var stageSize = dali.stage.getSize();
+  
+var imageActor = new dali.ImageActor( );
+  
+dali.stage.add( imageActor );
+  
+// when the actor is no longer required
+dali.stage.remove( imageActor );
+```
+
+<img src="../assets/img/stage.png"/>
+
+### Key Events
+
+Key events are received through the key-event callback.
+
+```
+daliApp.myCallback = function (keyEvent)
+{
+  switch (keyEvent.keyDescription) {
+          case "Up": log("up");
+              break;
+  
+          case "Down": log("down");
+              break;
+  
+          case "Left": log("left");
+              break;
+  
+          case "Right": log("right");
+              break;
+  
+  }
+}
+
+dali.stage.connect("key-event", daliApp.myCallback);
+```
+
+The key event object has the following properties
+```
+  KeyEvent = {
+    state,             // boolean  = "down" or "up" key state
+    shiftPressed,      // boolean, shift key is held
+    ctrlPressed,       // boolean, ctrl key is held
+    altPressed,        // boolean, alt key is held
+    keyModifiers,      // key modifiers
+    keyCode,           // key code
+    keyDescription,    // key description
+    timestamp          // The time in milli-seconds when the event occured
+  }
+```
+ @class Stage
+*/
\ No newline at end of file
diff --git a/plugins/dali-script-v8/docs/content/text-actor.js b/plugins/dali-script-v8/docs/content/text-actor.js
new file mode 100644 (file)
index 0000000..7aa2b04
--- /dev/null
@@ -0,0 +1,79 @@
+/**
+## Text Actor API
+TextActor is a basic actor for displaying a text label
+
+By default the text actor always uses the natural size of the text, when the text property is set,
+unless SetSize is called to override the size or size is animated to some other size.
+
+Natural size for TextActor is the same as the size returned by dali.font.MeasureText( string )
+using the font that the TextActor is using.
+
+By default {{#crossLink "RenderableActor/setCullFace:method"}}CullFaceMode{{/crossLink}} is set to CullNone to enable the TextActor to be viewed from all angles.
+
+### Simple example
+```
+var textActor = new dali.TextActor( "Hello world" );
+  
+// by default an actor is anchored to the top-left of it's parent actor
+// change it to the middle
+textActor.parentOrigin = [0.5,0.5,0.5];
+  
+// scale it up by 4 times  in x,y
+textActor.scale = [ 4, 4, 1  ];
+  
+// add to the stage
+dali.stage.add( textActor );
+```
+
+### Example using a font and text options ###
+```
+var fontInfo =
+{
+  family : "Arial",
+  style :"Bold",
+  pointSize:20
+}
+  
+var arialFont = new dali.Font( fontInfo );
+var textOptions =
+{
+  font: arialFont,
+  isRightToLeft: true,
+  fontDetection: true       // default is true
+}
+  
+var textActor1 = new dali.TextActor( "Hello-world" , textOptions );
+  
+// this will automatically chose a different font that can display the text
+var textActor2 = new dali.TextActor( "繁體中文" , textOptions );
+```
+
+| Name                   |    Type    | Writable     | Animatable|
+|------------------------|------------|--------------|-----------|
+| text                   |  STRING    | &#10004;     |&#10008;   |
+| font                   |  STRING    | &#10004;     |&#10008;   |
+| font-style             |  STRING    | &#10004;     |&#10008;   |
+| outline-enable         |  BOOLEAN   | &#10004;     |&#10008;   |
+| outline-color          |  VECTOR4   | &#10004;     |&#10008;   |
+| outline-thickness-width| VECTOR2    | &#10004;     |&#10008;   |
+| smooth-edge            | FLOAT      | &#10004;     |&#10008;   |
+| glow-enable            | BOOLEAN    | &#10004;     |&#10008;   |
+| glow-color             | VECTOR4    | &#10004;     |&#10008;   |
+| glow-intensity         | FLOAT      | &#10004;     |&#10008;   |
+| shadow-enable          | BOOLEAN    | &#10004;     |&#10008;   |
+| shadow-color           | VECTOR4    | &#10004;     |&#10008;   |
+| shadow-offset          | VECTOR2    | &#10004;     |&#10008;   |
+| italics-angle          | FLOAT      | &#10004;     |&#10008;   |
+| underline              | BOOLEAN    | &#10004;     |&#10008;   |
+| weight                 | INTEGER    | &#10004;     |&#10008;   |
+| font-detection-automati| BOOLEAN    | &#10004;     |&#10008;   |
+| gradient-color         | VECTOR4    | &#10004;     |&#10008;   |
+| gradient-start-point   | VECTOR2    | &#10004;     |&#10008;   |
+| gradient-end-point     | VECTOR2    | &#10004;     |&#10008;   |
+| shadow-size            |  FLOAT     | &#10004;     |&#10008;   |
+| text-color             |  VECTOR4   | &#10004;     |&#10008;   |
+
+@class TextActor
+@extends RenderableActor
+ */
+
diff --git a/plugins/dali-script-v8/docs/content/texture-atlases.js b/plugins/dali-script-v8/docs/content/texture-atlases.js
new file mode 100644 (file)
index 0000000..7005fca
--- /dev/null
@@ -0,0 +1,149 @@
+/**
+ *
+
+## Using Texture Atlases in DALi
+
+
+### Example demo application
+
+<img src="../assets/img/shared/texture-atlas/image-wall.jpg">
+
+
+### Application above is running slow as there are many small individual images displayed (50)
+
+
+<table>
+  <tr>
+    <td> Launch Time </td>
+    <td> Slow </td>
+    <td> Has to perform: <br>- 50 file open requests and multiple reads for each image</td>
+  </tr>
+  <tr>
+    <td> Memory Usage </td>
+    <td> High </td>
+    <td> Has to create:
+      <br>- 50 Dali::Image objects
+      <br>- 50 OpenGL Textures
+    </td>
+  </tr>
+  <tr>
+    <td>Rendering Performance </td>
+    <td> Slow </td>
+    <td> Has to perform:
+      <br>- 50 glBindTexture calls per frame ( each OpenGL calls takes time)
+      <br>- 50 a frame = 3000 calls per second @60 FPS.
+      <br>- Texture switching is a major state change in the GPU
+    </td>
+  </tr>
+</table>
+<br><br>
+
+
+### Solutions to problem: Use a Texture Atlas
+
+A texture atlas is simply one larger image that contains smaller images.<br>
+A texture atlas is sometimes called a sprite sheet, bitmap sheet or texture pack.
+<br><br>
+<img src="../assets/img/shared/texture-atlas/atlas.jpg">
+<br><br>
+Dali::ImageActor has the ability to display a portion of an image using ImageActor::PixelArea setting.
+For example to display the first 3 image in the atlas
+<br><br>
+```
+var imageAtlas = new dali.ResourceImage( {url:"atlas.png"} )
+```
+<img src="../assets/img/example-javascript-code.png">
+<br>
+### Result of using an Atlas
+<table>
+  <tr>
+    <td> Launch Time </td>
+    <td> Fast </td>
+    <td> Has to perform: <br>- 1 file open request </td>
+  </tr>
+  <tr>
+    <td> Memory Usage </td>
+    <td> Better </td>
+    <td> Has to create:
+      <br>- 1 Dali::Image objects
+      <br>- 1 OpenGL Textures
+    </td>
+  </tr>
+  <tr>
+    <td>Rendering Performance </td>
+    <td> Fast </td>
+    <td> Has to perform:
+      <br>- 1 glBindTexture calls per frame ( each OpenGL calls takes time)
+      <br>- 1 a frame = 6- calls per second @60 FPS.
+    </td>
+  </tr>
+</table>
+<br>
+## Atlas creation guide
+
+Many tools exist for creating texture atlases.<br>
+In the following example we are using a tool called TexturePacker as DALi has an exporter script for it.
+The exporter automatically generates a source file that has the ImageActor::PixelArea pre-defined.
+<br>
+
++ Download http://www.codeandweb.com/texturepacker
++ Launch TexturePacker
++ Go to the menu File -> Preferences
++ Set the "Exporter directory" to be the location of <b>dali-toolkit/texture-atlas-exporter</b>  <br>
+  
+ <img src="../assets/img/shared/texture-atlas/texture-packer-preferences.jpg"> <br>
++ <b> Restart the application! </b>
++ Select DALi 3D framework for new project
+  
+ <img src="../assets/img/shared/texture-atlas/texture-packer-startup.jpg"><br>
++ <h3> Create the atlas </h3>
+   <img src="../assets/img/shared/texture-atlas/texture-packer-add-sprites.jpg">
++ <h3> Click publish to produce the files </h3><br><br>
+   <img src="../assets/img/shared/texture-atlas/texture-packer-publish.jpg">
+  
+## Using the generated cpp file
+
+The generated cpp file contains 3 different ways of describing the atlas.
+2 ways are designed for the DALi C++ API, the 3rd way is for JavaScript.
+Example exported property map from TexturePacker:
+```
+var ATLAS_IMAGE_LIST : [
+    { name: "add_user_usericon_bg", x: 2, y:109, w:105, h:105, dali.BLENDING_ON  },
+    { name: "app_background", x: 180, y:183, w:1, h:1, dali.BLENDING_OFF  },
+    { name: "btn_arrow_left", x: 141, y:183, w:11, h:20, dali.BLENDING_ON  },
+    { name: "btn_arrow_right", x: 154, y:183, w:11, h:20, dali.BLENDING_ON  },
+    { name: "icn_app_foc", x: 194, y:2, w:72, h:72, dali.BLENDING_ON  },
+    { name: "icn_app_nor", x: 109, y:109, w:72, h:72, dali.BLENDING_ON  }
+    ]
+var atlas = new dali.ResourceImage( { url: "atlas_filename.png" });
+
+// display the user icon using the size / position data in the ATLAS_IMAGE_LIST
+var userIconData = ATLAS_IMAGE_LIST[0];
+var userIconRect = [ userIconData.x, userIconData.y,userIconData.w,userIconData.h];
+
+var btnArrowLeft = new dali.ImageActor( atlas, userIconRect );
+```
+
+## Atlas creation tips
+
+
+ - Compress the atlas
+ - Avoid adding large images to the Atlas.
+    E.g. don't add background images to it. Medium to large images should
+    be kept seperate. <br><br>
+   <img src="../assets/img/shared/texture-atlas/atlas-size.jpg">
+
+ - Try to ensure the atlas contains only images that are frequently used. <br>
+    There's no point in having images taking up GPU texture memory if they're not displayed.<br>
+
+ - Avoid very large atlases <br>
+    Try to create multiple atlases based on how they are used within your application.<br>
+    <br>
+    Alternatively Texture packer has the option to split atlases ( search help for Multipack)
+ -
+
+
+
+  @class TextureAtlases
+ */
+
diff --git a/plugins/dali-script-v8/docs/content/texture-compression.js b/plugins/dali-script-v8/docs/content/texture-compression.js
new file mode 100644 (file)
index 0000000..4d9588f
--- /dev/null
@@ -0,0 +1,58 @@
+
+/**
+ *
+
+## Texture Compression
+
+Using compressing the textures will:
+
+- Speed up rendering in time the GPU == less power used due to less texture data being transferred.
+- Reduce texture memory usage.
+- Speed up load times. Smaller files mean quicker load times.
+  
+DALi supports the KTX file format.
+You just load the compressed texture like you would any other image.
+
+    var image = new dali.ResourceImage({url:"my_compressed_file.ktx"});
+
+ARMS texture compression tool<br>
+http://malideveloper.arm.com/develop-for-mali/tools/asset-creation/mali-gpu-texture-compression-tool/  <br>
+
+Here is an example of using the ARM compression tool.
+
+<img src="../assets/img/shared/texture-atlas/compression-options.jpg">
+
+<img src="../assets/img/shared/texture-atlas/compression-example.jpg">
+
+As shown above the ETC-1 compression format does not support alpha.<br> As a work around the tool will export
+the alpha as a seperate compressed image.
+In order to combine both the images you need to use a custom shader.
+Here is an example shader:
+```
+var fragSource = "  \
+void main()                                                   \
+{                                                             \
+    vec4 v4Color  = (texture2D(sTexture, vTexCoord) * uColor); \
+    v4Color.a =  texture2D(sEffect, vTexCoord ).r;             \
+   gl_FragColor = v4Color;                                     \
+}";
+  
+var shaderEffect = new dali.ShaderEffect( "", fragSource);
+  
+var atlasImageRGB = new dali.ResourceImage( { url:"ATLAS_RGB_FILENAME.KTX"} );
+  
+var atlasImageAlpha = new dali.ResourceImage( { url:"ATLAS_ALPHA_FILENAME.KTX"} );
+  
+shaderEffect.setEffectImage( atlasImageAlpha );
+  
+// to create Image Actor
+ImageActor  imageActor = ImageActor::New( mAtlasImageRGB, GetImagePosition( info) );
+  
+imageActor.setShaderEffect( shaderEffect );
+  
+imageActor.setBlendMode( dali.BLENDING_ON );
+```
+ @class TextureCompression
+
+
+ */
diff --git a/plugins/dali-script-v8/docs/dali-theme/assets/css/external-small.png b/plugins/dali-script-v8/docs/dali-theme/assets/css/external-small.png
new file mode 100644 (file)
index 0000000..759a1cd
Binary files /dev/null and b/plugins/dali-script-v8/docs/dali-theme/assets/css/external-small.png differ
diff --git a/plugins/dali-script-v8/docs/dali-theme/assets/css/logo.png b/plugins/dali-script-v8/docs/dali-theme/assets/css/logo.png
new file mode 100644 (file)
index 0000000..eda5c9f
Binary files /dev/null and b/plugins/dali-script-v8/docs/dali-theme/assets/css/logo.png differ
diff --git a/plugins/dali-script-v8/docs/dali-theme/assets/css/main.css b/plugins/dali-script-v8/docs/dali-theme/assets/css/main.css
new file mode 100644 (file)
index 0000000..cdfe209
--- /dev/null
@@ -0,0 +1,783 @@
+/*
+Font sizes for all selectors other than the body are given in percentages,
+with 100% equal to 13px. To calculate a font size percentage, multiply the
+desired size in pixels by 7.6923076923.
+
+Here's a quick lookup table:
+
+10px - 76.923%
+11px - 84.615%
+12px - 92.308%
+13px - 100%
+14px - 107.692%
+15px - 115.385%
+16px - 123.077%
+17px - 130.769%
+18px - 138.462%
+19px - 146.154%
+20px - 153.846%
+*/
+
+html {
+    background: #fff;
+    color: #333;
+    overflow-y: scroll;
+}
+
+body {
+    /*font: 13px/1.4 'Lucida Grande', 'Lucida Sans Unicode', 'DejaVu Sans', 'Bitstream Vera Sans', 'Helvetica', 'Arial', sans-serif;*/
+    font: 13px/1.4 'Helvetica', 'Arial', sans-serif;
+    margin: 0;
+    padding: 0;
+}
+
+/* -- Links ----------------------------------------------------------------- */
+a {
+    color: #356de4;
+    text-decoration: none;
+}
+
+.hidden {
+    display: none;
+}
+
+a:hover { text-decoration: underline; }
+
+/* "Jump to Table of Contents" link is shown to assistive tools, but hidden from
+   sight until it's focused. */
+.jump {
+    position: absolute;
+    padding: 3px 6px;
+    left: -99999px;
+    top: 0;
+}
+
+.jump:focus { left: 40%; }
+
+/* -- Paragraphs ------------------------------------------------------------ */
+p { margin: 1.3em 0; }
+dd p, td p { margin-bottom: 0; }
+dd p:first-child, td p:first-child { margin-top: 0; }
+
+/* -- Headings -------------------------------------------------------------- */
+h1, h2, h3, h4, h5, h6 {
+    color: #D98527;/*was #f80*/
+    font-family: 'Trebuchet MS', sans-serif;
+    font-weight: bold;
+    line-height: 1.1;
+    margin: 1.1em 0 0.5em;
+}
+
+h1 {
+    font-size: 184.6%;
+    color: #30418C;
+    margin: 0.75em 0 0.5em;
+}
+
+h2 {
+    font-size: 153.846%;
+    color: #E48A2B;
+}
+
+h3 { font-size: 138.462%; }
+
+h4 {
+    border-bottom: 1px solid #DBDFEA;
+    color: #E48A2B;
+    font-size: 115.385%;
+    font-weight: normal;
+    padding-bottom: 2px;
+}
+
+h5, h6 { font-size: 107.692%; }
+
+/* -- Code and examples ----------------------------------------------------- */
+code, kbd, pre, samp {
+    font-family: Menlo, Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;
+    font-size: 92.308%;
+    line-height: 1.35;
+}
+
+p code, p kbd, p samp, li code {
+    background: #FCFBFA;
+    border: 1px solid #EFEEED;
+    padding: 0 3px;
+}
+
+a code, a kbd, a samp,
+pre code, pre kbd, pre samp,
+table code, table kbd, table samp,
+.intro code, .intro kbd, .intro samp,
+.toc code, .toc kbd, .toc samp {
+    background: none;
+    border: none;
+    padding: 0;
+}
+
+pre.code, pre.terminal, pre.cmd {
+    overflow-x: auto;
+    *overflow-x: scroll;
+    padding: 0.3em 0.6em;
+}
+
+pre.code {
+    background: #FCFBFA;
+    border: 1px solid #EFEEED;
+    border-left-width: 5px;
+}
+
+pre.terminal, pre.cmd {
+    background: #F0EFFC;
+    border: 1px solid #D0CBFB;
+    border-left: 5px solid #D0CBFB;
+}
+
+/* Don't reduce the font size of <code>/<kbd>/<samp> elements inside <pre>
+   blocks. */
+pre code, pre kbd, pre samp { font-size: 100%; }
+
+/* Used to denote text that shouldn't be selectable, such as line numbers or
+   shell prompts. Guess which browser this doesn't work in. */
+.noselect {
+    -moz-user-select: -moz-none;
+    -khtml-user-select: none;
+    -webkit-user-select: none;
+    -o-user-select: none;
+    user-select: none;
+}
+
+/* -- Lists ----------------------------------------------------------------- */
+dd { margin: 0.2em 0 0.7em 1em; }
+dl { margin: 1em 0; }
+dt { font-weight: bold; }
+
+/* -- Tables ---------------------------------------------------------------- */
+caption, th { text-align: left; }
+
+table {
+    border-collapse: collapse;
+    width: 100%;
+}
+
+td, th {
+    border: 1px solid #fff;
+    padding: 5px 12px;
+    vertical-align: top;
+}
+
+td { background: #E6E9F5; }
+td dl { margin: 0; }
+td dl dl { margin: 1em 0; }
+td pre:first-child { margin-top: 0; }
+
+th {
+    background: #D2D7E6;/*#97A0BF*/
+    border-bottom: none;
+    border-top: none;
+    color: #000;/*#FFF1D5*/
+    font-family: 'Trebuchet MS', sans-serif;
+    font-weight: bold;
+    line-height: 1.3;
+    white-space: nowrap;
+}
+
+
+/* -- Layout and Content ---------------------------------------------------- */
+#doc {
+    margin: auto;
+    min-width: 1024px;
+}
+
+.content { padding: 0 20px 0 25px; }
+
+.sidebar {
+    padding: 0 15px 0 10px;
+}
+#bd {
+    padding: 7px 0 130px;
+    position: relative;
+    width: 99%;
+}
+
+/* -- Table of Contents ----------------------------------------------------- */
+
+/* The #toc id refers to the single global table of contents, while the .toc
+   class refers to generic TOC lists that could be used throughout the page. */
+
+.toc code, .toc kbd, .toc samp { font-size: 100%; }
+.toc li { font-weight: bold; }
+.toc li li { font-weight: normal; }
+
+/* -- Intro and Example Boxes ----------------------------------------------- */
+/*
+.intro, .example { margin-bottom: 2em; }
+.example {
+    -moz-border-radius: 4px;
+    -webkit-border-radius: 4px;
+    border-radius: 4px;
+    -moz-box-shadow: 0 0 5px #bfbfbf;
+    -webkit-box-shadow: 0 0 5px #bfbfbf;
+    box-shadow: 0 0 5px #bfbfbf;
+    padding: 1em;
+}
+.intro {
+    background: none repeat scroll 0 0 #F0F1F8; border: 1px solid #D4D8EB; padding: 0 1em;
+}
+*/
+
+/* -- Other Styles ---------------------------------------------------------- */
+
+/* These are probably YUI-specific, and should be moved out of Selleck's default
+   theme. */
+
+.button {
+    border: 1px solid #dadada;
+    -moz-border-radius: 3px;
+    -webkit-border-radius: 3px;
+    border-radius: 3px;
+    color: #444;
+    display: inline-block;
+    font-family: Helvetica, Arial, sans-serif;
+    font-size: 92.308%;
+    font-weight: bold;
+    padding: 4px 13px 3px;
+    -moz-text-shadow: 1px 1px 0 #fff;
+    -webkit-text-shadow: 1px 1px 0 #fff;
+    text-shadow: 1px 1px 0 #fff;
+    white-space: nowrap;
+
+    background: #EFEFEF; /* old browsers */
+    background: -moz-linear-gradient(top, #f5f5f5 0%, #efefef 50%, #e5e5e5 51%, #dfdfdf 100%); /* firefox */
+    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f5f5f5), color-stop(50%,#efefef), color-stop(51%,#e5e5e5), color-stop(100%,#dfdfdf)); /* webkit */
+    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f5f5f5', endColorstr='#dfdfdf',GradientType=0 ); /* ie */
+}
+
+.button:hover {
+    border-color: #466899;
+    color: #fff;
+    text-decoration: none;
+    -moz-text-shadow: 1px 1px 0 #222;
+    -webkit-text-shadow: 1px 1px 0 #222;
+    text-shadow: 1px 1px 0 #222;
+
+    background: #6396D8; /* old browsers */
+    background: -moz-linear-gradient(top, #6396D8 0%, #5A83BC 50%, #547AB7 51%, #466899 100%); /* firefox */
+    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#6396D8), color-stop(50%,#5A83BC), color-stop(51%,#547AB7), color-stop(100%,#466899)); /* webkit */
+    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#6396D8', endColorstr='#466899',GradientType=0 ); /* ie */
+}
+
+.newwindow { text-align: center; }
+
+.header .version em {
+    display: block;
+    text-align: right;
+}
+
+
+#classdocs .item {
+    border-bottom: 1px solid #466899;
+    margin: 1em 0;
+    padding: 1.5em;
+}
+
+#classdocs .item .params p,
+    #classdocs .item .returns p,{
+    display: inline;
+}
+
+#classdocs .item em code, #classdocs .item em.comment {
+    color: green;
+}
+
+#classdocs .item em.comment a {
+    color: green;
+    text-decoration: underline;
+}
+
+#classdocs .foundat {
+    font-size: 11px;
+    font-style: normal;
+}
+
+.attrs .emits {
+    margin-left: 2em;
+    padding: .5em;
+    border-left: 1px dashed #ccc;
+}
+
+abbr {
+    border-bottom: 1px dashed #ccc;
+    font-size: 80%;
+    cursor: help;
+}
+
+.prettyprint li.L0, 
+.prettyprint li.L1, 
+.prettyprint li.L2, 
+.prettyprint li.L3, 
+.prettyprint li.L5, 
+.prettyprint li.L6, 
+.prettyprint li.L7, 
+.prettyprint li.L8 {
+    list-style: decimal;
+}
+
+ul li p {
+    margin-top: 0;
+}
+
+.method .name {
+    font-size: 110%;
+}
+
+.apidocs .methods .extends .method,
+.apidocs .properties .extends .property,
+.apidocs .attrs .extends .attr,
+.apidocs .events .extends .event {
+    font-weight: bold;
+}
+
+.apidocs .methods .extends .inherited,
+.apidocs .properties .extends .inherited,
+.apidocs .attrs .extends .inherited,
+.apidocs .events .extends .inherited {
+    font-weight: normal;
+}
+
+#hd {
+    background: whiteSmoke;
+    background: -moz-linear-gradient(top,#DCDBD9 0,#F6F5F3 100%);
+    background: -webkit-gradient(linear,left top,left bottom,color-stop(0%,#DCDBD9),color-stop(100%,#F6F5F3));
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#dcdbd9',endColorstr='#F6F5F3',GradientType=0);
+    border-bottom: 1px solid #DFDFDF;
+    padding: 0 15px 1px 20px;
+    margin-bottom: 15px;
+}
+
+#hd img {
+    margin-right: 10px;
+    vertical-align: middle;
+}
+
+
+/* -- API Docs CSS ---------------------------------------------------------- */
+
+/*
+This file is organized so that more generic styles are nearer the top, and more
+specific styles are nearer the bottom of the file. This allows us to take full
+advantage of the cascade to avoid redundant style rules. Please respect this
+convention when making changes.
+*/
+
+/* -- Generic TabView styles ------------------------------------------------ */
+
+/*
+These styles apply to all API doc tabviews. To change styles only for a
+specific tabview, see the other sections below.
+*/
+
+.yui3-js-enabled .apidocs .tabview {
+    visibility: hidden; /* Hide until the TabView finishes rendering. */
+    _visibility: visible;
+}
+
+.apidocs .tabview.yui3-tabview-content { visibility: visible; }
+.apidocs .tabview .yui3-tabview-panel { background: #fff; }
+
+/* -- Generic Content Styles ------------------------------------------------ */
+
+/* Headings */
+h2, h3, h4, h5, h6 {
+    border: none;
+    color: #30418C;
+    font-weight: bold;
+    text-decoration: none;
+}
+
+.link-docs {
+    float: right;
+    font-size: 15px;
+    margin: 4px 4px 6px;
+    padding: 6px 30px 5px;
+}
+
+.apidocs { zoom: 1; }
+
+/* Generic box styles. */
+.apidocs .box {
+    border: 1px solid;
+    border-radius: 3px;
+    margin: 1em 0;
+    padding: 0 1em;
+}
+
+/* A flag is a compact, capsule-like indicator of some kind. It's used to
+   indicate private and protected items, item return types, etc. in an
+   attractive and unobtrusive way. */
+.apidocs .flag {
+    background: #bababa;
+    border-radius: 3px;
+    color: #fff;
+    font-size: 11px;
+    margin: 0 0.5em;
+    padding: 2px 4px 1px;
+}
+
+/* Class/module metadata such as "Uses", "Extends", "Defined in", etc. */
+.apidocs .meta {
+    background: #f9f9f9;
+    border-color: #efefef;
+    color: #555;
+    font-size: 11px;
+    padding: 3px 6px;
+}
+
+.apidocs .meta p { margin: 0; }
+
+/* Deprecation warning. */
+.apidocs .box.deprecated,
+.apidocs .flag.deprecated {
+    background: #fdac9f;
+    border: 1px solid #fd7775;
+}
+
+.apidocs .box.deprecated p { margin: 0.5em 0; }
+.apidocs .flag.deprecated { color: #333; }
+
+/* Module/Class intro description. */
+.apidocs .intro {
+    background: #f0f1f8;
+    border-color: #d4d8eb;
+}
+
+/* Loading spinners. */
+#bd.loading .apidocs,
+#api-list.loading .yui3-tabview-panel {
+    background: #fff url(../img/spinner.gif) no-repeat center 70px;
+    min-height: 150px;
+}
+
+#bd.loading .apidocs .content,
+#api-list.loading .yui3-tabview-panel .apis {
+    display: none;
+}
+
+.apidocs .no-visible-items { color: #666; }
+
+/* Generic inline list. */
+.apidocs ul.inline {
+    display: inline;
+    list-style: none;
+    margin: 0;
+    padding: 0;
+}
+
+.apidocs ul.inline li { display: inline; }
+
+/* Comma-separated list. */
+.apidocs ul.commas li:after { content: ','; }
+.apidocs ul.commas li:last-child:after { content: ''; }
+
+/* Keyboard shortcuts. */
+kbd .cmd { font-family: Monaco, Helvetica; }
+
+/* -- Generic Access Level styles ------------------------------------------- */
+.apidocs .item.protected,
+.apidocs .item.private,
+.apidocs .index-item.protected,
+.apidocs .index-item.deprecated,
+.apidocs .index-item.private {
+    display: none;
+}
+
+.show-deprecated .item.deprecated,
+.show-deprecated .index-item.deprecated,
+.show-protected .item.protected,
+.show-protected .index-item.protected,
+.show-private .item.private,
+.show-private .index-item.private {
+    display: block;
+}
+
+.hide-inherited .item.inherited,
+.hide-inherited .index-item.inherited {
+    display: none;
+}
+
+/* -- Generic Item Index styles --------------------------------------------- */
+.apidocs .index { margin: 1.5em 0 3em; }
+
+.apidocs .index h3 {
+    border-bottom: 1px solid #efefef;
+    color: #333;
+    font-size: 13px;
+    margin: 2em 0 0.6em;
+    padding-bottom: 2px;
+}
+
+.apidocs .index .no-visible-items { margin-top: 2em; }
+
+.apidocs .index-list {
+    border-color: #efefef;
+    font-size: 12px;
+    list-style: none;
+    margin: 0;
+    padding: 0;
+    -moz-column-count: 4;
+    -moz-column-gap: 10px;
+    -moz-column-width: 170px;
+    -ms-column-count: 4;
+    -ms-column-gap: 10px;
+    -ms-column-width: 170px;
+    -o-column-count: 4;
+    -o-column-gap: 10px;
+    -o-column-width: 170px;
+    -webkit-column-count: 4;
+    -webkit-column-gap: 10px;
+    -webkit-column-width: 170px;
+    column-count: 4;
+    column-gap: 10px;
+    column-width: 170px;
+}
+
+.apidocs .no-columns .index-list {
+    -moz-column-count: 1;
+    -ms-column-count: 1;
+    -o-column-count: 1;
+    -webkit-column-count: 1;
+    column-count: 1;
+}
+
+.apidocs .index-item { white-space: nowrap; }
+
+.apidocs .index-item .flag {
+    background: none;
+    border: none;
+    color: #afafaf;
+    display: inline;
+    margin: 0 0 0 0.2em;
+    padding: 0;
+}
+
+/* -- Generic API item styles ----------------------------------------------- */
+.apidocs .args {
+    display: inline;
+    margin: 0 0.5em;
+}
+
+.apidocs .flag.chainable { background: #46ca3b; }
+.apidocs .flag.protected { background: #9b86fc; }
+.apidocs .flag.private { background: #fd6b1b; }
+.apidocs .flag.async { background: #356de4; }
+.apidocs .flag.required { background: #e60923; }
+
+.apidocs .item {
+    border-bottom: 1px solid #efefef;
+    margin: 1.5em 0 2em;
+    padding-bottom: 2em;
+}
+
+.apidocs .item h4,
+.apidocs .item h5,
+.apidocs .item h6 {
+    color: #333;
+    font-family: inherit;
+    font-size: 100%;
+}
+
+.apidocs .item .description p,
+.apidocs .item pre.code {
+    margin: 1em 0 0;
+}
+
+.apidocs .item .meta {
+    background: none;
+    border: none;
+    padding: 0;
+}
+
+.apidocs .item .name {
+    display: inline;
+    font-size: 14px;
+}
+
+.apidocs .item .type,
+.apidocs .item .type a,
+.apidocs .returns-inline {
+    color: #555;
+}
+
+.apidocs .item .type,
+.apidocs .returns-inline {
+    font-size: 11px;
+    margin: 0 0 0 0;
+}
+
+.apidocs .item .type a { border-bottom: 1px dotted #afafaf; }
+.apidocs .item .type a:hover { border: none; }
+
+/* -- Item Parameter List --------------------------------------------------- */
+.apidocs .params-list {
+    list-style: square;
+    margin: 1em 0 0 2em;
+    padding: 0;
+}
+
+.apidocs .param { margin-bottom: 1em; }
+
+.apidocs .param .type,
+.apidocs .param .type a {
+    color: #666;
+}
+
+.apidocs .param .type {
+    margin: 0 0 0 0.5em;
+    *margin-left: 0.5em;
+}
+
+.apidocs .param-name { font-weight: bold; }
+
+/* -- Item "Emits" block ---------------------------------------------------- */
+.apidocs .item .emits {
+    background: #f9f9f9;
+    border-color: #eaeaea;
+}
+
+/* -- Item "Returns" block -------------------------------------------------- */
+.apidocs .item .returns .type,
+.apidocs .item .returns .type a {
+    font-size: 100%;
+    margin: 0;
+}
+
+/* -- Class Constructor block ----------------------------------------------- */
+.apidocs .constructor .item {
+    border: none;
+    padding-bottom: 0;
+}
+
+/* -- File Source View ------------------------------------------------------ */
+.apidocs .file pre.code,
+#doc .apidocs .file pre.prettyprint {
+    background: inherit;
+    border: none;
+    overflow: visible;
+    padding: 0;
+}
+
+.apidocs .L0,
+.apidocs .L1,
+.apidocs .L2,
+.apidocs .L3,
+.apidocs .L4,
+.apidocs .L5,
+.apidocs .L6,
+.apidocs .L7,
+.apidocs .L8,
+.apidocs .L9 {
+    background: inherit;
+}
+
+/* -- Submodule List -------------------------------------------------------- */
+.apidocs .module-submodule-description {
+    font-size: 12px;
+    margin: 0.3em 0 1em;
+}
+
+.apidocs .module-submodule-description p:first-child { margin-top: 0; }
+
+/* -- Sidebar TabView ------------------------------------------------------- */
+#api-tabview { margin-top: 0.6em; }
+
+#api-tabview-filter,
+#api-tabview-panel {
+    border: 1px solid #dfdfdf;
+}
+
+#api-tabview-filter {
+    border-bottom: none;
+    border-top: none;
+    padding: 0.6em 10px 0 10px;
+}
+
+#api-tabview-panel { border-top: none; }
+#api-filter { width: 97%; }
+
+/* -- Content TabView ------------------------------------------------------- */
+#classdocs .yui3-tabview-panel { border: none; }
+
+/* -- Source File Contents -------------------------------------------------- */
+.prettyprint li.L0,
+.prettyprint li.L1,
+.prettyprint li.L2,
+.prettyprint li.L3,
+.prettyprint li.L5,
+.prettyprint li.L6,
+.prettyprint li.L7,
+.prettyprint li.L8 {
+    list-style: decimal;
+}
+
+/* -- API options ----------------------------------------------------------- */
+#api-options {
+    font-size: 11px;
+    margin-top: 2.2em;
+    position: absolute;
+    right: 1.5em;
+}
+
+/*#api-options label { margin-right: 0.6em; }*/
+
+/* -- API list -------------------------------------------------------------- */
+#api-list {
+    margin-top: 1.5em;
+    *zoom: 1;
+}
+
+.apis {
+    font-size: 12px;
+    line-height: 1.4;
+    list-style: none;
+    margin: 0;
+    padding: 0.5em 0 0.5em 0.4em;
+}
+
+.apis a {
+    border: 1px solid transparent;
+    display: block;
+    margin: 0 0 0 -4px;
+    padding: 1px 4px 0;
+    text-decoration: none;
+    _border: none;
+    _display: inline;
+}
+
+.apis a:hover,
+.apis a:focus {
+    background: #E8EDFC;
+    background: -moz-linear-gradient(top, #e8edfc 0%, #becef7 100%);
+    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#E8EDFC), color-stop(100%,#BECEF7));
+    border-color: #AAC0FA;
+    border-radius: 3px;
+    color: #333;
+    outline: none;
+}
+
+.api-list-item a:hover,
+.api-list-item a:focus {
+    font-weight: bold;
+    text-shadow: 1px 1px 1px #fff;
+}
+
+.apis .message { color: #888; }
+.apis .result a { padding: 3px 5px 2px; }
+
+.apis .result .type {
+    right: 4px;
+    top: 7px;
+}
+
+.api-list-item .yui3-highlight {
+    font-weight: bold;
+}
+
diff --git a/plugins/dali-script-v8/docs/dali-theme/assets/favicon.png b/plugins/dali-script-v8/docs/dali-theme/assets/favicon.png
new file mode 100644 (file)
index 0000000..5a95dda
Binary files /dev/null and b/plugins/dali-script-v8/docs/dali-theme/assets/favicon.png differ
diff --git a/plugins/dali-script-v8/docs/dali-theme/assets/img/example-javascript-code.png b/plugins/dali-script-v8/docs/dali-theme/assets/img/example-javascript-code.png
new file mode 100644 (file)
index 0000000..3888761
Binary files /dev/null and b/plugins/dali-script-v8/docs/dali-theme/assets/img/example-javascript-code.png differ
diff --git a/plugins/dali-script-v8/docs/dali-theme/assets/img/focus-manager.png b/plugins/dali-script-v8/docs/dali-theme/assets/img/focus-manager.png
new file mode 100644 (file)
index 0000000..8320dd9
Binary files /dev/null and b/plugins/dali-script-v8/docs/dali-theme/assets/img/focus-manager.png differ
diff --git a/plugins/dali-script-v8/docs/dali-theme/assets/img/fragment-shader-color.png b/plugins/dali-script-v8/docs/dali-theme/assets/img/fragment-shader-color.png
new file mode 100644 (file)
index 0000000..2e38b24
Binary files /dev/null and b/plugins/dali-script-v8/docs/dali-theme/assets/img/fragment-shader-color.png differ
diff --git a/plugins/dali-script-v8/docs/dali-theme/assets/img/fragment-shader-reveal.png b/plugins/dali-script-v8/docs/dali-theme/assets/img/fragment-shader-reveal.png
new file mode 100644 (file)
index 0000000..8855ba6
Binary files /dev/null and b/plugins/dali-script-v8/docs/dali-theme/assets/img/fragment-shader-reveal.png differ
diff --git a/plugins/dali-script-v8/docs/dali-theme/assets/img/keyframe-animation.png b/plugins/dali-script-v8/docs/dali-theme/assets/img/keyframe-animation.png
new file mode 100644 (file)
index 0000000..37c3ebc
Binary files /dev/null and b/plugins/dali-script-v8/docs/dali-theme/assets/img/keyframe-animation.png differ
diff --git a/plugins/dali-script-v8/docs/dali-theme/assets/img/path.png b/plugins/dali-script-v8/docs/dali-theme/assets/img/path.png
new file mode 100644 (file)
index 0000000..3671f73
Binary files /dev/null and b/plugins/dali-script-v8/docs/dali-theme/assets/img/path.png differ
diff --git a/plugins/dali-script-v8/docs/dali-theme/assets/img/shader-animation.png b/plugins/dali-script-v8/docs/dali-theme/assets/img/shader-animation.png
new file mode 100644 (file)
index 0000000..0512a01
Binary files /dev/null and b/plugins/dali-script-v8/docs/dali-theme/assets/img/shader-animation.png differ
diff --git a/plugins/dali-script-v8/docs/dali-theme/assets/img/shader-grid-hint.png b/plugins/dali-script-v8/docs/dali-theme/assets/img/shader-grid-hint.png
new file mode 100644 (file)
index 0000000..a0982f8
Binary files /dev/null and b/plugins/dali-script-v8/docs/dali-theme/assets/img/shader-grid-hint.png differ
diff --git a/plugins/dali-script-v8/docs/dali-theme/assets/img/shared b/plugins/dali-script-v8/docs/dali-theme/assets/img/shared
new file mode 120000 (symlink)
index 0000000..6eab915
--- /dev/null
@@ -0,0 +1 @@
+../../../../../../docs/content/images/
\ No newline at end of file
diff --git a/plugins/dali-script-v8/docs/dali-theme/assets/img/spinner.gif b/plugins/dali-script-v8/docs/dali-theme/assets/img/spinner.gif
new file mode 100644 (file)
index 0000000..44f96ba
Binary files /dev/null and b/plugins/dali-script-v8/docs/dali-theme/assets/img/spinner.gif differ
diff --git a/plugins/dali-script-v8/docs/dali-theme/assets/img/stage.png b/plugins/dali-script-v8/docs/dali-theme/assets/img/stage.png
new file mode 100644 (file)
index 0000000..67e0dc5
Binary files /dev/null and b/plugins/dali-script-v8/docs/dali-theme/assets/img/stage.png differ
diff --git a/plugins/dali-script-v8/docs/dali-theme/assets/img/vertex-shader.png b/plugins/dali-script-v8/docs/dali-theme/assets/img/vertex-shader.png
new file mode 100644 (file)
index 0000000..96009d2
Binary files /dev/null and b/plugins/dali-script-v8/docs/dali-theme/assets/img/vertex-shader.png differ
diff --git a/plugins/dali-script-v8/docs/dali-theme/assets/index.html b/plugins/dali-script-v8/docs/dali-theme/assets/index.html
new file mode 100644 (file)
index 0000000..487fe15
--- /dev/null
@@ -0,0 +1,10 @@
+<!doctype html>
+<html>
+    <head>
+        <title>Redirector</title>
+        <meta http-equiv="refresh" content="0;url=../">
+    </head>
+    <body>
+        <a href="../">Click here to redirect</a>
+    </body>
+</html>
diff --git a/plugins/dali-script-v8/docs/dali-theme/assets/js/api-filter.js b/plugins/dali-script-v8/docs/dali-theme/assets/js/api-filter.js
new file mode 100644 (file)
index 0000000..37aefba
--- /dev/null
@@ -0,0 +1,52 @@
+YUI.add('api-filter', function (Y) {
+
+Y.APIFilter = Y.Base.create('apiFilter', Y.Base, [Y.AutoCompleteBase], {
+    // -- Initializer ----------------------------------------------------------
+    initializer: function () {
+        this._bindUIACBase();
+        this._syncUIACBase();
+    },
+    getDisplayName: function(name) {
+
+        Y.each(Y.YUIDoc.meta.allModules, function(i) {
+            if (i.name === name && i.displayName) {
+                name = i.displayName;
+            }
+        });
+
+        return name;
+    }
+
+}, {
+    // -- Attributes -----------------------------------------------------------
+    ATTRS: {
+        resultHighlighter: {
+            value: 'phraseMatch'
+        },
+
+        // May be set to "classes" or "modules".
+        queryType: {
+            value: 'classes'
+        },
+
+        source: {
+            valueFn: function() {
+                var self = this;
+                return function(q) {
+                    var data = Y.YUIDoc.meta[self.get('queryType')],
+                        out = [];
+                    Y.each(data, function(v) {
+                        if (v.toLowerCase().indexOf(q.toLowerCase()) > -1) {
+                            out.push(v);
+                        }
+                    });
+                    return out;
+                };
+            }
+        }
+    }
+});
+
+}, '3.4.0', {requires: [
+    'autocomplete-base', 'autocomplete-highlighters', 'autocomplete-sources'
+]});
diff --git a/plugins/dali-script-v8/docs/dali-theme/assets/js/api-list.js b/plugins/dali-script-v8/docs/dali-theme/assets/js/api-list.js
new file mode 100644 (file)
index 0000000..88905b5
--- /dev/null
@@ -0,0 +1,251 @@
+YUI.add('api-list', function (Y) {
+
+var Lang   = Y.Lang,
+    YArray = Y.Array,
+
+    APIList = Y.namespace('APIList'),
+
+    classesNode    = Y.one('#api-classes'),
+    inputNode      = Y.one('#api-filter'),
+    modulesNode    = Y.one('#api-modules'),
+    tabviewNode    = Y.one('#api-tabview'),
+
+    tabs = APIList.tabs = {},
+
+    filter = APIList.filter = new Y.APIFilter({
+        inputNode : inputNode,
+        maxResults: 1000,
+
+        on: {
+            results: onFilterResults
+        }
+    }),
+
+    search = APIList.search = new Y.APISearch({
+        inputNode : inputNode,
+        maxResults: 100,
+
+        on: {
+            clear  : onSearchClear,
+            results: onSearchResults
+        }
+    }),
+
+    tabview = APIList.tabview = new Y.TabView({
+        srcNode  : tabviewNode,
+        panelNode: '#api-tabview-panel',
+        render   : true,
+
+        on: {
+            selectionChange: onTabSelectionChange
+        }
+    }),
+
+    focusManager = APIList.focusManager = tabviewNode.plug(Y.Plugin.NodeFocusManager, {
+        circular   : true,
+        descendants: '#api-filter, .yui3-tab-panel-selected .api-list-item a, .yui3-tab-panel-selected .result a',
+        keys       : {next: 'down:40', previous: 'down:38'}
+    }).focusManager,
+
+    LIST_ITEM_TEMPLATE =
+        '<li class="api-list-item {typeSingular}">' +
+            '<a href="{rootPath}{typePlural}/{name}.html">{displayName}</a>' +
+        '</li>';
+
+// -- Init ---------------------------------------------------------------------
+
+// Duckpunch FocusManager's key event handling to prevent it from handling key
+// events when a modifier is pressed.
+Y.before(function (e, activeDescendant) {
+    if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey) {
+        return new Y.Do.Prevent();
+    }
+}, focusManager, '_focusPrevious', focusManager);
+
+Y.before(function (e, activeDescendant) {
+    if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey) {
+        return new Y.Do.Prevent();
+    }
+}, focusManager, '_focusNext', focusManager);
+
+// Create a mapping of tabs in the tabview so we can refer to them easily later.
+tabview.each(function (tab, index) {
+    var name = tab.get('label').toLowerCase();
+
+    tabs[name] = {
+        index: index,
+        name : name,
+        tab  : tab
+    };
+});
+
+// Switch tabs on Ctrl/Cmd-Left/Right arrows.
+tabviewNode.on('key', onTabSwitchKey, 'down:37,39');
+
+// Focus the filter input when the `/` key is pressed.
+Y.one(Y.config.doc).on('key', onSearchKey, 'down:83');
+
+// Keep the Focus Manager up to date.
+inputNode.on('focus', function () {
+    focusManager.set('activeDescendant', inputNode);
+});
+
+// Update all tabview links to resolved URLs.
+tabview.get('panelNode').all('a').each(function (link) {
+    link.setAttribute('href', link.get('href'));
+});
+
+// -- Private Functions --------------------------------------------------------
+function getFilterResultNode() {
+    return filter.get('queryType') === 'classes' ? classesNode : modulesNode;
+}
+
+// -- Event Handlers -----------------------------------------------------------
+function onFilterResults(e) {
+    var frag         = Y.one(Y.config.doc.createDocumentFragment()),
+        resultNode   = getFilterResultNode(),
+        typePlural   = filter.get('queryType'),
+        typeSingular = typePlural === 'classes' ? 'class' : 'module';
+
+    if (e.results.length) {
+        YArray.each(e.results, function (result) {
+            frag.append(Lang.sub(LIST_ITEM_TEMPLATE, {
+                rootPath    : APIList.rootPath,
+                displayName : filter.getDisplayName(result.highlighted),
+                name        : result.text,
+                typePlural  : typePlural,
+                typeSingular: typeSingular
+            }));
+        });
+    } else {
+        frag.append(
+            '<li class="message">' +
+                'No ' + typePlural + ' found.' +
+            '</li>'
+        );
+    }
+
+    resultNode.empty(true);
+    resultNode.append(frag);
+
+    focusManager.refresh();
+}
+
+function onSearchClear(e) {
+
+    focusManager.refresh();
+}
+
+function onSearchKey(e) {
+    var target = e.target;
+
+    if (target.test('input,select,textarea')
+            || target.get('isContentEditable')) {
+        return;
+    }
+
+    e.preventDefault();
+
+    inputNode.focus();
+    focusManager.refresh();
+}
+
+function onSearchResults(e) {
+    var frag = Y.one(Y.config.doc.createDocumentFragment());
+
+    if (e.results.length) {
+        YArray.each(e.results, function (result) {
+            frag.append(result.display);
+        });
+    } else {
+        frag.append(
+            '<li class="message">' +
+                'No results found. Maybe you\'ll have better luck with a ' +
+                'different query?' +
+            '</li>'
+        );
+    }
+
+
+    focusManager.refresh();
+}
+
+function onTabSelectionChange(e) {
+    var tab  = e.newVal,
+        name = tab.get('label').toLowerCase();
+
+    tabs.selected = {
+        index: tab.get('index'),
+        name : name,
+        tab  : tab
+    };
+
+    switch (name) {
+    case 'classes': // fallthru
+    case 'modules':
+        filter.setAttrs({
+            minQueryLength: 0,
+            queryType     : name
+        });
+
+        search.set('minQueryLength', -1);
+
+        // Only send a request if this isn't the initially-selected tab.
+        if (e.prevVal) {
+            filter.sendRequest(filter.get('value'));
+        }
+        break;
+
+    case 'everything':
+        filter.set('minQueryLength', -1);
+        search.set('minQueryLength', 1);
+
+        if (search.get('value')) {
+            search.sendRequest(search.get('value'));
+        } else {
+            inputNode.focus();
+        }
+        break;
+
+    default:
+        // WTF? We shouldn't be here!
+        filter.set('minQueryLength', -1);
+        search.set('minQueryLength', -1);
+    }
+
+    if (focusManager) {
+        setTimeout(function () {
+            focusManager.refresh();
+        }, 1);
+    }
+}
+
+function onTabSwitchKey(e) {
+    var currentTabIndex = tabs.selected.index;
+
+    if (!(e.ctrlKey || e.metaKey)) {
+        return;
+    }
+
+    e.preventDefault();
+
+    switch (e.keyCode) {
+    case 37: // left arrow
+        if (currentTabIndex > 0) {
+            tabview.selectChild(currentTabIndex - 1);
+            inputNode.focus();
+        }
+        break;
+
+    case 39: // right arrow
+        if (currentTabIndex < (Y.Object.size(tabs) - 2)) {
+            tabview.selectChild(currentTabIndex + 1);
+            inputNode.focus();
+        }
+        break;
+    }
+}
+
+}, '3.4.0', {requires: [
+    'api-filter', 'api-search', 'event-key', 'node-focusmanager', 'tabview'
+]});
diff --git a/plugins/dali-script-v8/docs/dali-theme/assets/js/api-search.js b/plugins/dali-script-v8/docs/dali-theme/assets/js/api-search.js
new file mode 100644 (file)
index 0000000..175f6a6
--- /dev/null
@@ -0,0 +1,98 @@
+YUI.add('api-search', function (Y) {
+
+var Lang   = Y.Lang,
+    Node   = Y.Node,
+    YArray = Y.Array;
+
+Y.APISearch = Y.Base.create('apiSearch', Y.Base, [Y.AutoCompleteBase], {
+    // -- Public Properties ----------------------------------------------------
+    RESULT_TEMPLATE:
+        '<li class="result {resultType}">' +
+            '<a href="{url}">' +
+                '<h3 class="title">{name}</h3>' +
+                '<span class="type">{resultType}</span>' +
+                '<div class="description">{description}</div>' +
+                '<span class="className">{class}</span>' +
+            '</a>' +
+        '</li>',
+
+    // -- Initializer ----------------------------------------------------------
+    initializer: function () {
+        this._bindUIACBase();
+        this._syncUIACBase();
+    },
+
+    // -- Protected Methods ----------------------------------------------------
+    _apiResultFilter: function (query, results) {
+        // Filter components out of the results.
+        return YArray.filter(results, function (result) {
+            return result.raw.resultType === 'component' ? false : result;
+        });
+    },
+
+    _apiResultFormatter: function (query, results) {
+        return YArray.map(results, function (result) {
+            var raw  = Y.merge(result.raw), // create a copy
+                desc = raw.description || '';
+
+            // Convert description to text and truncate it if necessary.
+            desc = Node.create('<div>' + desc + '</div>').get('text');
+
+            if (desc.length > 65) {
+                desc = Y.Escape.html(desc.substr(0, 65)) + ' &hellip;';
+            } else {
+                desc = Y.Escape.html(desc);
+            }
+
+            raw['class'] || (raw['class'] = '');
+            raw.description = desc;
+
+            // Use the highlighted result name.
+            raw.name = result.highlighted;
+
+            return Lang.sub(this.RESULT_TEMPLATE, raw);
+        }, this);
+    },
+
+    _apiTextLocator: function (result) {
+        return result.displayName || result.name;
+    }
+}, {
+    // -- Attributes -----------------------------------------------------------
+    ATTRS: {
+        resultFormatter: {
+            valueFn: function () {
+                return this._apiResultFormatter;
+            }
+        },
+
+        resultFilters: {
+            valueFn: function () {
+                return this._apiResultFilter;
+            }
+        },
+
+        resultHighlighter: {
+            value: 'phraseMatch'
+        },
+
+        resultListLocator: {
+            value: 'data.results'
+        },
+
+        resultTextLocator: {
+            valueFn: function () {
+                return this._apiTextLocator;
+            }
+        },
+
+        source: {
+            value: '/api/v1/search?q={query}&count={maxResults}'
+        }
+    }
+});
+
+}, '3.4.0', {requires: [
+    'autocomplete-base', 'autocomplete-highlighters', 'autocomplete-sources',
+    'escape'
+]});
diff --git a/plugins/dali-script-v8/docs/dali-theme/assets/js/apidocs.js b/plugins/dali-script-v8/docs/dali-theme/assets/js/apidocs.js
new file mode 100644 (file)
index 0000000..e00591c
--- /dev/null
@@ -0,0 +1,370 @@
+YUI().use(
+    'yuidoc-meta',
+    'api-list', 'history-hash', 'node-screen', 'node-style', 'pjax',
+function (Y) {
+
+var win          = Y.config.win,
+    localStorage = win.localStorage,
+
+    bdNode = Y.one('#bd'),
+
+    pjax,
+    defaultRoute,
+
+    classTabView,
+    selectedTab;
+
+// Kill pjax functionality unless serving over HTTP.
+if (!Y.getLocation().protocol.match(/^https?\:/)) {
+    Y.Router.html5 = false;
+}
+
+// Create the default route with middleware which enables syntax highlighting
+// on the loaded content.
+defaultRoute = Y.Pjax.defaultRoute.concat(function (req, res, next) {
+    prettyPrint();
+    bdNode.removeClass('loading');
+
+    next();
+});
+
+pjax = new Y.Pjax({
+    container      : '#docs-main',
+    contentSelector: '#docs-main > .content',
+    linkSelector   : '#bd a',
+    titleSelector  : '#xhr-title',
+
+    navigateOnHash: true,
+    root          : '/',
+    routes        : [
+        // -- / ----------------------------------------------------------------
+        {
+            path     : '/(index.html)?',
+            callbacks: defaultRoute
+        },
+
+        // -- /classes/* -------------------------------------------------------
+        {
+            path     : '/classes/:class.html*',
+            callbacks: [defaultRoute, 'handleClasses']
+        },
+
+        // -- /files/* ---------------------------------------------------------
+        {
+            path     : '/files/*file',
+            callbacks: [defaultRoute, 'handleFiles']
+        },
+
+        // -- /modules/* -------------------------------------------------------
+        {
+            path     : '/modules/:module.html*',
+            callbacks: defaultRoute
+        }
+    ]
+});
+
+// -- Utility Functions --------------------------------------------------------
+
+pjax.checkVisibility = function (tab) {
+    tab || (tab = selectedTab);
+
+    if (!tab) { return; }
+
+    var panelNode = tab.get('panelNode'),
+        visibleItems;
+
+    // If no items are visible in the tab panel due to the current visibility
+    // settings, display a message to that effect.
+    visibleItems = panelNode.all('.item,.index-item').some(function (itemNode) {
+        if (itemNode.getComputedStyle('display') !== 'none') {
+            return true;
+        }
+    });
+
+    panelNode.all('.no-visible-items').remove();
+
+    if (!visibleItems) {
+        if (Y.one('#index .index-item')) {
+            panelNode.append(
+                '<div class="no-visible-items">' +
+                    '<p>' +
+                    'Some items are not shown due to the current visibility ' +
+                    'settings. Use the checkboxes at the upper right of this ' +
+                    'page to change the visibility settings.' +
+                    '</p>' +
+                '</div>'
+            );
+        } else {
+            panelNode.append(
+                '<div class="no-visible-items">' +
+                    '<p>' +
+                    'This class doesn\'t provide any methods, properties, ' +
+                    'attributes, or events.' +
+                    '</p>' +
+                '</div>'
+            );
+        }
+    }
+
+    // Hide index sections without any visible items.
+    Y.all('.index-section').each(function (section) {
+        var items        = 0,
+            visibleItems = 0;
+
+        section.all('.index-item').each(function (itemNode) {
+            items += 1;
+
+            if (itemNode.getComputedStyle('display') !== 'none') {
+                visibleItems += 1;
+            }
+        });
+
+        section.toggleClass('hidden', !visibleItems);
+        section.toggleClass('no-columns', visibleItems < 4);
+    });
+};
+
+pjax.initClassTabView = function () {
+    if (!Y.all('#classdocs .api-class-tab').size()) {
+        return;
+    }
+
+    if (classTabView) {
+        classTabView.destroy();
+        selectedTab = null;
+    }
+
+    classTabView = new Y.TabView({
+        srcNode: '#classdocs',
+
+        on: {
+            selectionChange: pjax.onTabSelectionChange
+        }
+    });
+
+    pjax.updateTabState();
+    classTabView.render();
+};
+
+pjax.initLineNumbers = function () {
+    var hash      = win.location.hash.substring(1),
+        container = pjax.get('container'),
+        hasLines, node;
+
+    // Add ids for each line number in the file source view.
+    container.all('.linenums>li').each(function (lineNode, index) {
+        lineNode.set('id', 'l' + (index + 1));
+        lineNode.addClass('file-line');
+        hasLines = true;
+    });
+
+    // Scroll to the desired line.
+    if (hasLines && /^l\d+$/.test(hash)) {
+        if ((node = container.getById(hash))) {
+            win.scroll(0, node.getY());
+        }
+    }
+};
+
+pjax.initRoot = function () {
+    var terminators = /^(?:classes|files|modules)$/,
+        parts       = pjax._getPathRoot().split('/'),
+        root        = [],
+        i, len, part;
+
+    for (i = 0, len = parts.length; i < len; i += 1) {
+        part = parts[i];
+
+        if (part.match(terminators)) {
+            // Makes sure the path will end with a "/".
+            root.push('');
+            break;
+        }
+
+        root.push(part);
+    }
+
+    pjax.set('root', root.join('/'));
+};
+
+pjax.updateTabState = function (src) {
+    var hash = win.location.hash.substring(1),
+        defaultTab, node, tab, tabPanel;
+
+    function scrollToNode() {
+        if (node.hasClass('protected')) {
+            Y.one('#api-show-protected').set('checked', true);
+            pjax.updateVisibility();
+        }
+
+        if (node.hasClass('private')) {
+            Y.one('#api-show-private').set('checked', true);
+            pjax.updateVisibility();
+        }
+
+        setTimeout(function () {
+            // For some reason, unless we re-get the node instance here,
+            // getY() always returns 0.
+            var node = Y.one('#classdocs').getById(hash);
+            win.scrollTo(0, node.getY() - 70);
+        }, 1);
+    }
+
+    if (!classTabView) {
+        return;
+    }
+
+    if (src === 'hashchange' && !hash) {
+        defaultTab = 'index';
+    } else {
+        if (localStorage) {
+            defaultTab = localStorage.getItem('tab_' + pjax.getPath()) ||
+                'index';
+        } else {
+            defaultTab = 'index';
+        }
+    }
+
+    if (hash && (node = Y.one('#classdocs').getById(hash))) {
+        if ((tabPanel = node.ancestor('.api-class-tabpanel', true))) {
+            if ((tab = Y.one('#classdocs .api-class-tab.' + tabPanel.get('id')))) {
+                if (classTabView.get('rendered')) {
+                    Y.Widget.getByNode(tab).set('selected', 1);
+                } else {
+                    tab.addClass('yui3-tab-selected');
+                }
+            }
+        }
+
+        // Scroll to the desired element if this is a hash URL.
+        if (node) {
+            if (classTabView.get('rendered')) {
+                scrollToNode();
+            } else {
+                classTabView.once('renderedChange', scrollToNode);
+            }
+        }
+    } else {
+        tab = Y.one('#classdocs .api-class-tab.' + defaultTab);
+
+        // When the `defaultTab` node isn't found, `localStorage` is stale.
+        if (!tab && defaultTab !== 'index') {
+            tab = Y.one('#classdocs .api-class-tab.index');
+        }
+
+        if (classTabView.get('rendered')) {
+            Y.Widget.getByNode(tab).set('selected', 1);
+        } else {
+            tab.addClass('yui3-tab-selected');
+        }
+    }
+};
+
+pjax.updateVisibility = function () {
+    var container = pjax.get('container');
+
+    container.toggleClass('hide-inherited',
+            !Y.one('#api-show-inherited').get('checked'));
+
+    container.toggleClass('show-deprecated',
+            Y.one('#api-show-deprecated').get('checked'));
+
+    container.toggleClass('show-protected',
+            Y.one('#api-show-protected').get('checked'));
+
+    container.toggleClass('show-private',
+            Y.one('#api-show-private').get('checked'));
+
+    pjax.checkVisibility();
+};
+
+// -- Route Handlers -----------------------------------------------------------
+
+pjax.handleClasses = function (req, res, next) {
+    var status = res.ioResponse.status;
+
+    // Handles success and local filesystem XHRs.
+    if (res.ioResponse.readyState === 4 && (!status || (status >= 200 && status < 300))) {
+        pjax.initClassTabView();
+    }
+
+    next();
+};
+
+pjax.handleFiles = function (req, res, next) {
+    var status = res.ioResponse.status;
+
+    // Handles success and local filesystem XHRs.
+    if (res.ioResponse.readyState === 4 && (!status || (status >= 200 && status < 300))) {
+        pjax.initLineNumbers();
+    }
+
+    next();
+};
+
+// -- Event Handlers -----------------------------------------------------------
+
+pjax.onNavigate = function (e) {
+    var hash         = e.hash,
+        originTarget = e.originEvent && e.originEvent.target,
+        tab;
+
+    if (hash) {
+        tab = originTarget && originTarget.ancestor('.yui3-tab', true);
+
+        if (hash === win.location.hash) {
+            pjax.updateTabState('hashchange');
+        } else if (!tab) {
+            win.location.hash = hash;
+        }
+
+        e.preventDefault();
+        return;
+    }
+
+    // Only scroll to the top of the page when the URL doesn't have a hash.
+    this.set('scrollToTop', !e.url.match(/#.+$/));
+
+    bdNode.addClass('loading');
+};
+
+pjax.onOptionClick = function (e) {
+    pjax.updateVisibility();
+};
+
+pjax.onTabSelectionChange = function (e) {
+    var tab   = e.newVal,
+        tabId = tab.get('contentBox').getAttribute('href').substring(1);
+
+    selectedTab = tab;
+
+    // If switching from a previous tab (i.e., this is not the default tab),
+    // replace the history entry with a hash URL that will cause this tab to
+    // be selected if the user navigates away and then returns using the back
+    // or forward buttons.
+    if (e.prevVal && localStorage) {
+        localStorage.setItem('tab_' + pjax.getPath(), tabId);
+    }
+
+    pjax.checkVisibility(tab);
+};
+
+// -- Init ---------------------------------------------------------------------
+
+pjax.on('navigate', pjax.onNavigate);
+
+pjax.initRoot();
+pjax.upgrade();
+pjax.initClassTabView();
+pjax.initLineNumbers();
+pjax.updateVisibility();
+
+Y.APIList.rootPath = pjax.get('root');
+
+Y.one('#api-options').delegate('click', pjax.onOptionClick, 'input');
+
+Y.on('hashchange', function (e) {
+    pjax.updateTabState('hashchange');
+}, win);
+
+});
diff --git a/plugins/dali-script-v8/docs/dali-theme/assets/js/yui-prettify.js b/plugins/dali-script-v8/docs/dali-theme/assets/js/yui-prettify.js
new file mode 100644 (file)
index 0000000..18de864
--- /dev/null
@@ -0,0 +1,17 @@
+YUI().use('node', function(Y) {
+    var code = Y.all('.prettyprint.linenums');
+    if (code.size()) {
+        code.each(function(c) {
+            var lis = c.all('ol li'),
+                l = 1;
+            lis.each(function(n) {
+                n.prepend('<a name="LINENUM_' + l + '"></a>');
+                l++;
+            });
+        });
+        var h = location.hash;
+        location.hash = '';
+        h = h.replace('LINE_', 'LINENUM_');
+        location.hash = h;
+    }
+});
diff --git a/plugins/dali-script-v8/docs/dali-theme/assets/vendor/prettify/CHANGES.html b/plugins/dali-script-v8/docs/dali-theme/assets/vendor/prettify/CHANGES.html
new file mode 100644 (file)
index 0000000..b50b841
--- /dev/null
@@ -0,0 +1,130 @@
+<html>
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>Change Log</title>
+  </head>
+  <body bgcolor="white">
+    <a style="float:right" href="README.html">README</a>
+
+    <h1>Known Issues</h1>
+    <ul>
+      <li>Perl formatting is really crappy.  Partly because the author is lazy and
+      partly because Perl is
+      <a href="http://www.perlmonks.org/?node_id=663393">hard</a> to parse.
+      <li>On some browsers, <code>&lt;code&gt;</code> elements with newlines in the text
+      which use CSS to specify <code>white-space:pre</code> will have the newlines
+      improperly stripped if the element is not attached to the document at the time
+      the stripping is done.  Also, on IE 6, all newlines will be stripped from
+      <code>&lt;code&gt;</code> elements because of the way IE6 produces
+      <code>innerHTML</code>.  Workaround: use <code>&lt;pre&gt;</code> for code with
+      newlines.
+    </ul>
+
+    <h1>Change Log</h1>
+    <h2>29 March 2007</h2>
+    <ul>
+      <li>Added <a href="tests/prettify_test.html#PHP">tests</a> for PHP support
+        to address 
+      <a href="http://code.google.com/p/google-code-prettify/issues/detail?id=3"
+       >issue 3</a>.
+      <li>Fixed
+      <a href="http://code.google.com/p/google-code-prettify/issues/detail?id=6"
+       >bug</a>: <code>prettyPrintOne</code> was not halting.  This was not
+        reachable through the normal entry point.
+      <li>Fixed
+      <a href="http://code.google.com/p/google-code-prettify/issues/detail?id=4"
+       >bug</a>: recursing into a script block or PHP tag that was not properly
+        closed would not silently drop the content.
+        (<a href="tests/prettify_test.html#issue4">test</a>)
+      <li>Fixed
+      <a href="http://code.google.com/p/google-code-prettify/issues/detail?id=8"
+       >bug</a>: was eating tabs
+        (<a href="tests/prettify_test.html#issue8">test</a>)
+      <li>Fixed entity handling so that the caveat
+        <blockquote>
+          <p>Caveats: please properly escape less-thans.  <tt>x&amp;lt;y</tt>
+          instead of <tt>x&lt;y</tt>, and use <tt>&quot;</tt> instead of 
+          <tt>&amp;quot;</tt> for string delimiters.</p>
+        </blockquote>
+        is no longer applicable.
+      <li>Added noisefree's C#
+      <a href="http://code.google.com/p/google-code-prettify/issues/detail?id=4"
+       >patch</a>
+      <li>Added a <a href="http://google-code-prettify.googlecode.com/files/prettify-small.zip">distribution</a> that has comments and
+        whitespace removed to reduce download size from 45.5kB to 12.8kB.
+    </ul>
+    <h2>4 Jul 2008</h2>
+    <ul>
+      <li>Added <a href="http://code.google.com/p/google-code-prettify/issues/detail?id=17">language specific formatters</a> that are triggered by the presence
+      of a <code>lang-&lt;language-file-extension&gt;</code></li>
+      <li>Fixed <a href="http://code.google.com/p/google-code-prettify/issues/detail?id=29">bug</a>: python handling of <code>'''string'''</code>
+      <li>Fixed bug: <code>/</code> in regex <code>[charsets] should not end regex</code>
+    </ul>
+    <h2>5 Jul 2008</h2>
+    <ul>
+      <li>Defined language extensions for Lisp and Lua</code>
+    </ul>
+    <h2>14 Jul 2008</h2>
+    <ul>
+      <li>Language handlers for F#, OCAML, SQL</code>
+      <li>Support for <code>nocode</code> spans to allow embedding of line
+      numbers and code annotations which should not be styled or otherwise
+      affect the tokenization of prettified code.
+      See the issue 22
+      <a href="tests/prettify_test.html#issue22">testcase</a>.</code>
+    </ul>
+    <h2>6 Jan 2009</h2>
+    <ul>
+      <li>Language handlers for Visual Basic, Haskell, CSS, and WikiText</li>
+      <li>Added <tt>.mxml</tt> extension to the markup style handler for
+        Flex <a href="http://en.wikipedia.org/wiki/MXML">MXML files</a>.  See
+        <a
+        href="http://code.google.com/p/google-code-prettify/issues/detail?id=37"
+        >issue 37</a>.
+      <li>Added <tt>.m</tt> extension to the C style handler so that Objective
+        C source files properly highlight.  See
+        <a
+        href="http://code.google.com/p/google-code-prettify/issues/detail?id=58"
+       >issue 58</a>.
+      <li>Changed HTML lexer to use the same embedded source mechanism as the
+        wiki language handler, and changed to use the registered
+        CSS handler for STYLE element content.
+    </ul>
+    <h2>21 May 2009</h2>
+    <ul>
+      <li>Rewrote to improve performance on large files.
+        See <a href="http://mikesamuel.blogspot.com/2009/05/efficient-parsing-in-javascript.html">benchmarks</a>.</li>
+      <li>Fixed bugs with highlighting of Haskell line comments, Lisp
+        number literals, Lua strings, C preprocessor directives,
+        newlines in Wiki code on Windows, and newlines in IE6.</li>
+    </ul>
+    <h2>14 August 2009</h2>
+    <ul>
+      <li>Fixed prettifying of <code>&lt;code&gt;</code> blocks with embedded newlines.
+    </ul>
+    <h2>3 October 2009</h2>
+    <ul>
+      <li>Fixed prettifying of XML/HTML tags that contain uppercase letters.
+    </ul>
+    <h2>19 July 2010</h2>
+    <ul>
+      <li>Added support for line numbers.  Bug
+        <a href="http://code.google.com/p/google-code-prettify/issues/detail?id=22"
+         >22</a></li>
+      <li>Added YAML support.  Bug
+        <a href="http://code.google.com/p/google-code-prettify/issues/detail?id=123"
+         >123</a></li>
+      <li>Added VHDL support courtesy Le Poussin.</li>
+      <li>IE performance improvements.  Bug
+        <a href="http://code.google.com/p/google-code-prettify/issues/detail?id=102"
+         >102</a> courtesy jacobly.</li>
+      <li>A variety of markup formatting fixes courtesy smain and thezbyg.</li>
+      <li>Fixed copy and paste in IE[678].
+      <li>Changed output to use <code>&amp;#160;</code> instead of
+        <code>&amp;nbsp;</code> so that the output works when embedded in XML.
+        Bug
+        <a href="http://code.google.com/p/google-code-prettify/issues/detail?id=108"
+         >108</a>.</li>
+    </ul>
+  </body>
+</html>
diff --git a/plugins/dali-script-v8/docs/dali-theme/assets/vendor/prettify/COPYING b/plugins/dali-script-v8/docs/dali-theme/assets/vendor/prettify/COPYING
new file mode 100644 (file)
index 0000000..d645695
--- /dev/null
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
diff --git a/plugins/dali-script-v8/docs/dali-theme/assets/vendor/prettify/prettify-min.css b/plugins/dali-script-v8/docs/dali-theme/assets/vendor/prettify/prettify-min.css
new file mode 100644 (file)
index 0000000..d44b3a2
--- /dev/null
@@ -0,0 +1 @@
+.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}
\ No newline at end of file
diff --git a/plugins/dali-script-v8/docs/dali-theme/assets/vendor/prettify/prettify-min.js b/plugins/dali-script-v8/docs/dali-theme/assets/vendor/prettify/prettify-min.js
new file mode 100644 (file)
index 0000000..4845d05
--- /dev/null
@@ -0,0 +1 @@
+window.PR_SHOULD_USE_CONTINUATION=true;var prettyPrintOne;var prettyPrint;(function(){var O=window;var j=["break,continue,do,else,for,if,return,while"];var v=[j,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];var q=[v,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"];var m=[q,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"];var y=[q,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"];var T=[y,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,let,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var,virtual,where"];var s="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes";var x=[q,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"];var t="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END";var J=[j,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"];var g=[j,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"];var I=[j,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"];var B=[m,T,x,t+J,g,I];var f=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)\b/;var D="str";var A="kwd";var k="com";var Q="typ";var H="lit";var M="pun";var G="pln";var n="tag";var F="dec";var K="src";var R="atn";var o="atv";var P="nocode";var N="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function l(ab){var af=0;var U=false;var ae=false;for(var X=0,W=ab.length;X<W;++X){var ag=ab[X];if(ag.ignoreCase){ae=true}else{if(/[a-z]/i.test(ag.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){U=true;ae=false;break}}}var aa={b:8,t:9,n:10,v:11,f:12,r:13};function ad(aj){var ai=aj.charCodeAt(0);if(ai!==92){return ai}var ah=aj.charAt(1);ai=aa[ah];if(ai){return ai}else{if("0"<=ah&&ah<="7"){return parseInt(aj.substring(1),8)}else{if(ah==="u"||ah==="x"){return parseInt(aj.substring(2),16)}else{return aj.charCodeAt(1)}}}}function V(ah){if(ah<32){return(ah<16?"\\x0":"\\x")+ah.toString(16)}var ai=String.fromCharCode(ah);return(ai==="\\"||ai==="-"||ai==="]"||ai==="^")?"\\"+ai:ai}function Z(an){var ar=an.substring(1,an.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g"));var ah=[];var ap=ar[0]==="^";var ao=["["];if(ap){ao.push("^")}for(var at=ap?1:0,al=ar.length;at<al;++at){var aj=ar[at];if(/\\[bdsw]/i.test(aj)){ao.push(aj)}else{var ai=ad(aj);var am;if(at+2<al&&"-"===ar[at+1]){am=ad(ar[at+2]);at+=2}else{am=ai}ah.push([ai,am]);if(!(am<65||ai>122)){if(!(am<65||ai>90)){ah.push([Math.max(65,ai)|32,Math.min(am,90)|32])}if(!(am<97||ai>122)){ah.push([Math.max(97,ai)&~32,Math.min(am,122)&~32])}}}}ah.sort(function(aw,av){return(aw[0]-av[0])||(av[1]-aw[1])});var ak=[];var aq=[];for(var at=0;at<ah.length;++at){var au=ah[at];if(au[0]<=aq[1]+1){aq[1]=Math.max(aq[1],au[1])}else{ak.push(aq=au)}}for(var at=0;at<ak.length;++at){var au=ak[at];ao.push(V(au[0]));if(au[1]>au[0]){if(au[1]+1>au[0]){ao.push("-")}ao.push(V(au[1]))}}ao.push("]");return ao.join("")}function Y(an){var al=an.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g"));var aj=al.length;var ap=[];for(var am=0,ao=0;am<aj;++am){var ai=al[am];if(ai==="("){++ao}else{if("\\"===ai.charAt(0)){var ah=+ai.substring(1);if(ah){if(ah<=ao){ap[ah]=-1}else{al[am]=V(ah)}}}}}for(var am=1;am<ap.length;++am){if(-1===ap[am]){ap[am]=++af}}for(var am=0,ao=0;am<aj;++am){var ai=al[am];if(ai==="("){++ao;if(!ap[ao]){al[am]="(?:"}}else{if("\\"===ai.charAt(0)){var ah=+ai.substring(1);if(ah&&ah<=ao){al[am]="\\"+ap[ah]}}}}for(var am=0;am<aj;++am){if("^"===al[am]&&"^"!==al[am+1]){al[am]=""}}if(an.ignoreCase&&U){for(var am=0;am<aj;++am){var ai=al[am];var ak=ai.charAt(0);if(ai.length>=2&&ak==="["){al[am]=Z(ai)}else{if(ak!=="\\"){al[am]=ai.replace(/[a-zA-Z]/g,function(aq){var ar=aq.charCodeAt(0);return"["+String.fromCharCode(ar&~32,ar|32)+"]"})}}}}return al.join("")}var ac=[];for(var X=0,W=ab.length;X<W;++X){var ag=ab[X];if(ag.global||ag.multiline){throw new Error(""+ag)}ac.push("(?:"+Y(ag)+")")}return new RegExp(ac.join("|"),ae?"gi":"g")}function b(aa,Y){var W=/(?:^|\s)nocode(?:\s|$)/;var ab=[];var Z=0;var X=[];var V=0;function U(ac){switch(ac.nodeType){case 1:if(W.test(ac.className)){return}for(var af=ac.firstChild;af;af=af.nextSibling){U(af)}var ae=ac.nodeName.toLowerCase();if("br"===ae||"li"===ae){ab[V]="\n";X[V<<1]=Z++;X[(V++<<1)|1]=ac}break;case 3:case 4:var ad=ac.nodeValue;if(ad.length){if(!Y){ad=ad.replace(/[ \t\r\n]+/g," ")}else{ad=ad.replace(/\r\n?/g,"\n")}ab[V]=ad;X[V<<1]=Z;Z+=ad.length;X[(V++<<1)|1]=ac}break}}U(aa);return{sourceCode:ab.join("").replace(/\n$/,""),spans:X}}function C(U,W,Y,V){if(!W){return}var X={sourceCode:W,basePos:U};Y(X);V.push.apply(V,X.decorations)}var w=/\S/;function p(U){var X=undefined;for(var W=U.firstChild;W;W=W.nextSibling){var V=W.nodeType;X=(V===1)?(X?U:W):(V===3)?(w.test(W.nodeValue)?U:X):X}return X===U?undefined:X}function h(W,V){var U={};var X;(function(){var af=W.concat(V);var aj=[];var ai={};for(var ad=0,ab=af.length;ad<ab;++ad){var aa=af[ad];var ae=aa[3];if(ae){for(var ag=ae.length;--ag>=0;){U[ae.charAt(ag)]=aa}}var ah=aa[1];var ac=""+ah;if(!ai.hasOwnProperty(ac)){aj.push(ah);ai[ac]=null}}aj.push(/[\0-\uffff]/);X=l(aj)})();var Z=V.length;var Y=function(aj){var ab=aj.sourceCode,aa=aj.basePos;var af=[aa,G];var ah=0;var ap=ab.match(X)||[];var al={};for(var ag=0,at=ap.length;ag<at;++ag){var ai=ap[ag];var ar=al[ai];var ak=void 0;var ao;if(typeof ar==="string"){ao=false}else{var ac=U[ai.charAt(0)];if(ac){ak=ai.match(ac[1]);ar=ac[0]}else{for(var aq=0;aq<Z;++aq){ac=V[aq];ak=ai.match(ac[1]);if(ak){ar=ac[0];break}}if(!ak){ar=G}}ao=ar.length>=5&&"lang-"===ar.substring(0,5);if(ao&&!(ak&&typeof ak[1]==="string")){ao=false;ar=K}if(!ao){al[ai]=ar}}var ad=ah;ah+=ai.length;if(!ao){af.push(aa+ad,ar)}else{var an=ak[1];var am=ai.indexOf(an);var ae=am+an.length;if(ak[2]){ae=ai.length-ak[2].length;am=ae-an.length}var au=ar.substring(5);C(aa+ad,ai.substring(0,am),Y,af);C(aa+ad+am,an,r(au,an),af);C(aa+ad+ae,ai.substring(ae),Y,af)}}aj.decorations=af};return Y}function i(V){var Y=[],U=[];if(V.tripleQuotedStrings){Y.push([D,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""])}else{if(V.multiLineStrings){Y.push([D,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"])}else{Y.push([D,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"])}}if(V.verbatimStrings){U.push([D,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null])}var ab=V.hashComments;if(ab){if(V.cStyleComments){if(ab>1){Y.push([k,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"])}else{Y.push([k,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"])}U.push([D,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])}else{Y.push([k,/^#[^\r\n]*/,null,"#"])}}if(V.cStyleComments){U.push([k,/^\/\/[^\r\n]*/,null]);U.push([k,/^\/\*[\s\S]*?(?:\*\/|$)/,null])}if(V.regexLiterals){var aa=("/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/");U.push(["lang-regex",new RegExp("^"+N+"("+aa+")")])}var X=V.types;if(X){U.push([Q,X])}var W=(""+V.keywords).replace(/^ | $/g,"");if(W.length){U.push([A,new RegExp("^(?:"+W.replace(/[\s,]+/g,"|")+")\\b"),null])}Y.push([G,/^\s+/,null," \r\n\t\xA0"]);var Z=/^.[^\s\w\.$@\'\"\`\/\\]*/;U.push([H,/^@[a-z_$][a-z_$@0-9]*/i,null],[Q,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[G,/^[a-z_$][a-z_$@0-9]*/i,null],[H,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[G,/^\\[\s\S]?/,null],[M,Z,null]);return h(Y,U)}var L=i({keywords:B,hashComments:true,cStyleComments:true,multiLineStrings:true,regexLiterals:true});function S(W,ah,aa){var V=/(?:^|\s)nocode(?:\s|$)/;var ac=/\r\n?|\n/;var ad=W.ownerDocument;var ag=ad.createElement("li");while(W.firstChild){ag.appendChild(W.firstChild)}var X=[ag];function af(am){switch(am.nodeType){case 1:if(V.test(am.className)){break}if("br"===am.nodeName){ae(am);if(am.parentNode){am.parentNode.removeChild(am)}}else{for(var ao=am.firstChild;ao;ao=ao.nextSibling){af(ao)}}break;case 3:case 4:if(aa){var an=am.nodeValue;var ak=an.match(ac);if(ak){var aj=an.substring(0,ak.index);am.nodeValue=aj;var ai=an.substring(ak.index+ak[0].length);if(ai){var al=am.parentNode;al.insertBefore(ad.createTextNode(ai),am.nextSibling)}ae(am);if(!aj){am.parentNode.removeChild(am)}}}break}}function ae(al){while(!al.nextSibling){al=al.parentNode;if(!al){return}}function aj(am,at){var ar=at?am.cloneNode(false):am;var ap=am.parentNode;if(ap){var aq=aj(ap,1);var ao=am.nextSibling;aq.appendChild(ar);for(var an=ao;an;an=ao){ao=an.nextSibling;aq.appendChild(an)}}return ar}var ai=aj(al.nextSibling,0);for(var ak;(ak=ai.parentNode)&&ak.nodeType===1;){ai=ak}X.push(ai)}for(var Z=0;Z<X.length;++Z){af(X[Z])}if(ah===(ah|0)){X[0].setAttribute("value",ah)}var ab=ad.createElement("ol");ab.className="linenums";var Y=Math.max(0,((ah-1))|0)||0;for(var Z=0,U=X.length;Z<U;++Z){ag=X[Z];ag.className="L"+((Z+Y)%10);if(!ag.firstChild){ag.appendChild(ad.createTextNode("\xA0"))}ab.appendChild(ag)}W.appendChild(ab)}function E(af){var X=/\bMSIE\s(\d+)/.exec(navigator.userAgent);X=X&&+X[1]<=8;var ao=/\n/g;var an=af.sourceCode;var ap=an.length;var Y=0;var ad=af.spans;var V=ad.length;var aj=0;var aa=af.decorations;var ab=aa.length;var ac=0;aa[ab]=ap;var av,at;for(at=av=0;at<ab;){if(aa[at]!==aa[at+2]){aa[av++]=aa[at++];aa[av++]=aa[at++]}else{at+=2}}ab=av;for(at=av=0;at<ab;){var aw=aa[at];var ae=aa[at+1];var Z=at+2;while(Z+2<=ab&&aa[Z+1]===ae){Z+=2}aa[av++]=aw;aa[av++]=ae;at=Z}ab=aa.length=av;var au=af.sourceNode;var ak;if(au){ak=au.style.display;au.style.display="none"}try{var ah=null;while(aj<V){var ai=ad[aj];var U=ad[aj+2]||ap;var ar=aa[ac+2]||ap;var Z=Math.min(U,ar);var am=ad[aj+1];var W;if(am.nodeType!==1&&(W=an.substring(Y,Z))){if(X){W=W.replace(ao,"\r")}am.nodeValue=W;var al=am.ownerDocument;var aq=al.createElement("span");aq.className=aa[ac+1];var ag=am.parentNode;ag.replaceChild(aq,am);aq.appendChild(am);if(Y<U){ad[aj+1]=am=al.createTextNode(an.substring(Z,U));ag.insertBefore(am,aq.nextSibling)}}Y=Z;if(Y>=U){aj+=2}if(Y>=ar){ac+=2}}}finally{if(au){au.style.display=ak}}}var u={};function d(W,X){for(var U=X.length;--U>=0;){var V=X[U];if(!u.hasOwnProperty(V)){u[V]=W}else{if(O.console){console.warn("cannot override language handler %s",V)}}}}function r(V,U){if(!(V&&u.hasOwnProperty(V))){V=/^\s*</.test(U)?"default-markup":"default-code"}return u[V]}d(L,["default-code"]);d(h([],[[G,/^[^<?]+/],[F,/^<!\w[^>]*(?:>|$)/],[k,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[M,/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);d(h([[G,/^[\s]+/,null," \t\r\n"],[o,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[[n,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[R,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[M,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]);d(h([],[[o,/^[\s\S]+/]]),["uq.val"]);d(i({keywords:m,hashComments:true,cStyleComments:true,types:f}),["c","cc","cpp","cxx","cyc","m"]);d(i({keywords:"null,true,false"}),["json"]);d(i({keywords:T,hashComments:true,cStyleComments:true,verbatimStrings:true,types:f}),["cs"]);d(i({keywords:y,cStyleComments:true}),["java"]);d(i({keywords:I,hashComments:true,multiLineStrings:true}),["bsh","csh","sh"]);d(i({keywords:J,hashComments:true,multiLineStrings:true,tripleQuotedStrings:true}),["cv","py"]);d(i({keywords:t,hashComments:true,multiLineStrings:true,regexLiterals:true}),["perl","pl","pm"]);d(i({keywords:g,hashComments:true,multiLineStrings:true,regexLiterals:true}),["rb"]);d(i({keywords:x,cStyleComments:true,regexLiterals:true}),["js"]);d(i({keywords:s,hashComments:3,cStyleComments:true,multilineStrings:true,tripleQuotedStrings:true,regexLiterals:true}),["coffee"]);d(h([],[[D,/^[\s\S]+/]]),["regex"]);function e(X){var W=X.langExtension;try{var U=b(X.sourceNode,X.pre);var V=U.sourceCode;X.sourceCode=V;X.spans=U.spans;X.basePos=0;r(W,V)(X);E(X)}catch(Y){if(O.console){console.log(Y&&Y.stack?Y.stack:Y)}}}function z(Y,X,W){var U=document.createElement("pre");U.innerHTML=Y;if(W){S(U,W,true)}var V={langExtension:X,numberLines:W,sourceNode:U,pre:1};e(V);return U.innerHTML}function c(aj){function ab(al){return document.getElementsByTagName(al)}var ah=[ab("pre"),ab("code"),ab("xmp")];var V=[];for(var ae=0;ae<ah.length;++ae){for(var ac=0,Y=ah[ae].length;ac<Y;++ac){V.push(ah[ae][ac])}}ah=null;var Z=Date;if(!Z.now){Z={now:function(){return +(new Date)}}}var aa=0;var U;var af=/\blang(?:uage)?-([\w.]+)(?!\S)/;var ak=/\bprettyprint\b/;var W=/\bprettyprinted\b/;var ag=/pre|xmp/i;var ai=/^code$/i;var ad=/^(?:pre|code|xmp)$/i;function X(){var ar=(O.PR_SHOULD_USE_CONTINUATION?Z.now()+250:Infinity);for(;aa<V.length&&Z.now()<ar;aa++){var at=V[aa];var au=at.className;if(ak.test(au)&&!W.test(au)){var aw=false;for(var ao=at.parentNode;ao;ao=ao.parentNode){var ax=ao.tagName;if(ad.test(ax)&&ao.className&&ak.test(ao.className)){aw=true;break}}if(!aw){at.className+=" prettyprinted";var aq=au.match(af);var am;if(!aq&&(am=p(at))&&ai.test(am.tagName)){aq=am.className.match(af)}if(aq){aq=aq[1]}var ap;if(ag.test(at.tagName)){ap=1}else{var an=at.currentStyle;var al=(an?an.whiteSpace:(document.defaultView&&document.defaultView.getComputedStyle)?document.defaultView.getComputedStyle(at,null).getPropertyValue("white-space"):0);ap=al&&"pre"===al.substring(0,3)}var av=at.className.match(/\blinenums\b(?::(\d+))?/);av=av?av[1]&&av[1].length?+av[1]:true:false;if(av){S(at,av,ap)}U={langExtension:aq,sourceNode:at,numberLines:av,pre:ap};e(U)}}}if(aa<V.length){setTimeout(X,250)}else{if(aj){aj()}}}X()}var a=O.PR={createSimpleLexer:h,registerLangHandler:d,sourceDecorator:i,PR_ATTRIB_NAME:R,PR_ATTRIB_VALUE:o,PR_COMMENT:k,PR_DECLARATION:F,PR_KEYWORD:A,PR_LITERAL:H,PR_NOCODE:P,PR_PLAIN:G,PR_PUNCTUATION:M,PR_SOURCE:K,PR_STRING:D,PR_TAG:n,PR_TYPE:Q,prettyPrintOne:O.prettyPrintOne=z,prettyPrint:O.prettyPrint=c};if(typeof define==="function"&&define.amd){define("google-code-prettify",[],function(){return a})}})();PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_DECLARATION,/^<!\w[^>]*(?:>|$)/],[PR.PR_COMMENT,/^<\!--[\s\S]*?(?:-\->|$)/],[PR.PR_PUNCTUATION,/^(?:<[%?]|[%?]>)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-handlebars",/^<script\b[^>]*type\s*=\s*['"]?text\/x-handlebars-template['"]?\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i],[PR.PR_DECLARATION,/^{{[#^>/]?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{&?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{{>?\s*[\w.][^}]*}}}/],[PR.PR_COMMENT,/^{{![^}]*}}/]]),["handlebars","hbs"]);PR.registerLangHandler(PR.createSimpleLexer([[PR.PR_PLAIN,/^[ \t\r\n\f]+/,null," \t\r\n\f"]],[[PR.PR_STRING,/^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/,null],[PR.PR_STRING,/^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/,null],["lang-css-str",/^url\(([^\)\"\']*)\)/i],[PR.PR_KEYWORD,/^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],[PR.PR_COMMENT,/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],[PR.PR_COMMENT,/^(?:<!--|-->)/],[PR.PR_LITERAL,/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],[PR.PR_LITERAL,/^#(?:[0-9a-f]{3}){1,2}/i],[PR.PR_PLAIN,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],[PR.PR_PUNCTUATION,/^[^\s\w\'\"]+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_KEYWORD,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_STRING,/^[^\)\"\']+/]]),["css-str"]);
\ No newline at end of file
diff --git a/plugins/dali-script-v8/docs/dali-theme/layouts/main.handlebars b/plugins/dali-script-v8/docs/dali-theme/layouts/main.handlebars
new file mode 100644 (file)
index 0000000..7ea2bd4
--- /dev/null
@@ -0,0 +1,55 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="utf-8">
+    <title>{{htmlTitle}}</title>
+    <link rel="stylesheet" href="{{yuiGridsUrl}}">
+    <link rel="stylesheet" href="{{projectAssets}}/vendor/prettify/prettify-min.css">
+    <link rel="stylesheet" href="{{projectAssets}}/css/main.css" id="site_styles">
+    <link rel="shortcut icon" type="image/png" href="{{projectAssets}}/favicon.png">
+    <script src="{{yuiSeedUrl}}"></script>
+</head>
+<body class="yui3-skin-sam">
+
+<div id="doc">
+    <div id="hd" class="yui3-g header">
+        <div class="yui3-u-3-4">
+            {{#if projectLogo}}
+                <h1><img src="{{projectLogo}}" title="{{projectName}}"></h1>
+            {{else}}
+                <h1><img src="{{projectAssets}}/css/logo.png" title="{{projectName}}"></h1>
+            {{/if}}
+        </div>
+        <div class="yui3-u-1-4 version">
+            <em>API Docs for: {{projectVersion}}</em>
+        </div>
+    </div>
+    <div id="bd" class="yui3-g">
+
+        <div class="yui3-u-1-4">
+            <div id="docs-sidebar" class="sidebar apidocs">
+                {{>sidebar}}
+            </div>
+        </div>
+        <div class="yui3-u-3-4">
+            {{>options}}
+            <div class="apidocs">
+                <div id="docs-main">
+                    <div class="content">
+{{>layout_content}}
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+<script src="{{projectAssets}}/vendor/prettify/prettify-min.js"></script>
+<script>prettyPrint();</script>
+<script src="{{projectAssets}}/js/yui-prettify.js"></script>
+<script src="{{projectAssets}}/../api.js"></script>
+<script src="{{projectAssets}}/js/api-filter.js"></script>
+<script src="{{projectAssets}}/js/api-list.js"></script>
+<script src="{{projectAssets}}/js/api-search.js"></script>
+<script src="{{projectAssets}}/js/apidocs.js"></script>
+</body>
+</html>
diff --git a/plugins/dali-script-v8/docs/dali-theme/layouts/xhr.handlebars b/plugins/dali-script-v8/docs/dali-theme/layouts/xhr.handlebars
new file mode 100644 (file)
index 0000000..c66f7d3
--- /dev/null
@@ -0,0 +1,7 @@
+<div id="docs-main">
+    <div class="content">
+{{>layout_content}}
+    </div>
+</div>
+
+<div id="xhr-title" class="hidden">{{title}}</div>
diff --git a/plugins/dali-script-v8/docs/dali-theme/partials/attrs.handlebars b/plugins/dali-script-v8/docs/dali-theme/partials/attrs.handlebars
new file mode 100644 (file)
index 0000000..a957ce0
--- /dev/null
@@ -0,0 +1,141 @@
+<div id="attr_{{name}}" class="attr item{{#if access}} {{access}}{{/if}}{{#if deprecated}} deprecated{{/if}}{{#if extended_from}} inherited{{/if}}">
+    <a name="config_{{name}}"></a> {{! For backwards compatibility }}
+    <h3 class="name"><code>{{name}}</code></h3>
+    <span class="type">{{#crossLink type}}{{/crossLink}}</span>
+
+    {{#if deprecated}}
+        <span class="flag deprecated"{{#if deprecationMessage}} title="{{deprecationMessage}}"{{/if}}>deprecated</span>
+    {{/if}}
+
+    {{#if access}}
+        <span class="flag {{access}}">{{access}}</span>
+    {{/if}}
+
+    {{#if final}}
+        <span class="flag final">final</span>
+    {{/if}}
+
+    {{#if static}}
+        <span class="flag static">static</span>
+    {{/if}}
+
+    {{#if optional}}
+        <span class="flag optional">optional</span>
+    {{/if}}
+
+    {{#if required}}
+        <span class="flag required">required</span>
+    {{/if}}
+
+    {{#if readonly}}
+        <span class="flag readonly">readonly</span>
+    {{/if}}
+
+    <div class="meta">
+        {{#if overwritten_from}}
+            <p>Inherited from
+            <a href="{{crossLinkRaw overwritten_from/class}}#attr_{{overwritten_from/name}}">
+                {{overwritten_from/class}}
+            </a>
+            {{#if foundAt}}
+            but overwritten in
+            {{/if}}
+        {{else}}
+            {{#if extended_from}}
+                <p>Inherited from
+                <a href="{{crossLinkRaw extended_from}}#attr_{{name}}">{{extended_from}}</a>:
+            {{else}}
+                {{#providedBy}}
+                    <p>Provided by the <a href="../modules/{{.}}.html">{{.}}</a> module.</p>
+                {{/providedBy}}
+                <p>
+                {{#if foundAt}}
+                Defined in
+                {{/if}}
+            {{/if}}
+        {{/if}}
+        {{#if foundAt}}
+        <a href="{{foundAt}}">`{{{file}}}:{{{line}}}`</a>
+        {{/if}}
+        </p>
+
+        {{#if deprecationMessage}}
+            <p>Deprecated: {{deprecationMessage}}</p>
+        {{/if}}
+
+        {{#if since}}
+            <p>Available since {{since}}</p>
+        {{/if}}
+    </div>
+
+    <div class="description">
+        {{{attrDescription}}}
+    </div>
+
+    {{#if default}}
+        <p><strong>Default:</strong> {{default}}</p>
+    {{/if}}
+
+    {{#if emit}}
+        <div class="emits box">
+            <h4>Fires event <code>{{name}}Change</code></h4>
+
+            <p>
+            Fires when the value for the configuration attribute `{{{name}}}` is
+            changed. You can listen for the event using the `on` method if you
+            wish to be notified before the attribute's value has changed, or
+            using the `after` method if you wish to be notified after the
+            attribute's value has changed.
+            </p>
+
+            <div class="params">
+                <h4>Parameters:</h4>
+
+                <ul class="params-list">
+                    <li class="param">
+                        <code class="param-name">e</code>
+                        <span class="type">{{#crossLink "EventFacade"}}{{/crossLink}}</span>
+
+                        <div class="param-description">
+                            An Event Facade object with the following
+                            attribute-specific properties added:
+                        </div>
+
+                        <ul class="params-list">
+                            <li class="param">
+                                <code class="param-name">prevVal</code>
+                                <span class="type">Any</span>
+                                <div class="param-description">The value of the attribute, prior to it being set.</div>
+                            </li>
+                            <li class="param">
+                                <code class="param-name">newVal</code>
+                                <span class="type">Any</span>
+                                <div class="param-description">The value the attribute is to be set to.</div>
+                            </li>
+                            <li class="param">
+                                <code class="param-name">attrName</code>
+                                <span class="type">{{#crossLink "String"}}{{/crossLink}}</span>
+                                <div class="param-description">The name of the attribute being set.</div>
+                            </li>
+                            <li class="param">
+                                <code class="param-name">subAttrName</code>
+                                <span class="type">{{#crossLink "String"}}{{/crossLink}}</span>
+                                <div class="param-description">If setting a property within the attribute's value, the name of the sub-attribute property being set.</div>
+                            </li>
+                        </ul>
+                    </li>
+                </ul>
+            </div>
+        </div>
+    {{/if}}
+
+    {{#example}}
+        <div class="example">
+            <h4>Example:</h4>
+
+            <div class="example-content">
+                {{{.}}}
+            </div>
+        </div>
+    {{/example}}
+</div>
diff --git a/plugins/dali-script-v8/docs/dali-theme/partials/classes.handlebars b/plugins/dali-script-v8/docs/dali-theme/partials/classes.handlebars
new file mode 100644 (file)
index 0000000..0d0a937
--- /dev/null
@@ -0,0 +1,203 @@
+<h1>{{name}} Class</h1>
+<div class="box meta">
+    {{#if uses}}
+        <div class="uses">
+            Uses
+            <ul class="inline commas">
+                {{#uses}}
+                    <li><a href="{{.}}.html">{{.}}</a></li>
+                {{/uses}}
+            </ul>
+        </div>
+    {{/if}}
+
+    {{#if extends}}
+        <div class="extends">
+            Extends {{#crossLink extends}}{{/crossLink}}
+        </div>
+    {{/if}}
+
+    {{#if foundAt}}
+        <div class="foundat">
+            Defined in: <a href="{{foundAt}}">`{{{file}}}:{{{line}}}`</a>
+        </div>
+    {{/if}}
+
+    {{#if module}}
+        {{#if submodule}}
+            Module: {{#crossLinkModule submodule}}{{/crossLinkModule}}<br>
+            Parent Module: {{#crossLinkModule module}}{{/crossLinkModule}}
+        {{else}}
+            Module: {{#crossLinkModule module}}{{/crossLinkModule}}
+        {{/if}}
+    {{/if}}
+
+    {{#if since}}
+        <p>Available since {{since}}</p>
+    {{/if}}
+</div>
+
+{{#if deprecated}}
+    <div class="box deprecated">
+        <p>
+        {{#if deprecationMessage}}
+            <strong>Deprecated:</strong> {{deprecationMessage}}
+        {{else}}
+            This class is deprecated.
+        {{/if}}
+        </p>
+    </div>
+{{/if}}
+
+<div class="box intro">
+    {{{classDescription}}}
+</div>
+
+{{#is_constructor}}
+    <div class="constructor">
+        <h2>Constructor</h2>
+        {{>method}}
+    </div>
+{{/is_constructor}}
+
+<div id="classdocs" class="tabview">
+    <ul class="api-class-tabs">
+        <li class="api-class-tab index"><a href="#index">Index</a></li>
+
+        {{#if methods}}
+            <li class="api-class-tab methods"><a href="#methods">Methods</a></li>
+        {{/if}}
+        {{#if properties}}
+            <li class="api-class-tab properties"><a href="#properties">Properties</a></li>
+        {{/if}}
+        {{#if attrs}}
+            <li class="api-class-tab attrs"><a href="#attrs">Attributes</a></li>
+        {{/if}}
+        {{#if events}}
+            <li class="api-class-tab events"><a href="#events">Events</a></li>
+        {{/if}}
+    </ul>
+
+    <div>
+        <div id="index" class="api-class-tabpanel index">
+            <h2 class="off-left">Item Index</h2>
+
+            {{#if methods}}
+                <div class="index-section methods">
+                    <h3>Methods</h3>
+
+                    <ul class="index-list methods{{#if extends}} extends{{/if}}">
+                        {{#methods}}
+                            <li class="index-item method{{#if access}} {{access}}{{/if}}{{#if deprecated}} deprecated{{/if}}{{#if overwritten_from}} inherited{{/if}}{{#if extended_from}} inherited{{/if}}">
+                                <a href="#method_{{name}}">{{name}}</a>
+
+                                {{#if static}}
+                                    <span class="flag static">static</span>
+                                {{/if}}
+                                {{#if deprecated}}
+                                    <span class="flag deprecated">deprecated</span>
+                                {{/if}}
+                            </li>
+                        {{/methods}}
+                    </ul>
+                </div>
+            {{/if}}
+
+            {{#if properties}}
+                <div class="index-section properties">
+                    <h3>Properties</h3>
+
+                    <ul class="index-list properties{{#if extends}} extends{{/if}}">
+                        {{#properties}}
+                            <li class="index-item property{{#if access}} {{access}}{{/if}}{{#if deprecated}} deprecated{{/if}}{{#if overwritten_from}} inherited{{/if}}{{#if extended_from}} inherited{{/if}}">
+                                <a href="#property_{{name}}">{{name}}</a>
+
+                                {{#if static}}
+                                    <span class="flag static">static</span>
+                                {{/if}}
+                                {{#if deprecated}}
+                                    <span class="flag deprecated">deprecated</span>
+                                {{/if}}
+                            </li>
+                        {{/properties}}
+                    </ul>
+                </div>
+            {{/if}}
+
+            {{#if attrs}}
+                <div class="index-section attrs">
+                    <h3>Attributes</h3>
+
+                    <ul class="index-list attrs{{#if extends}} extends{{/if}}">
+                        {{#attrs}}
+                            <li class="index-item attr{{#if access}} {{access}}{{/if}}{{#if deprecated}} deprecated{{/if}}{{#if overwritten_from}} inherited{{/if}}{{#if extended_from}} inherited{{/if}}">
+                                <a href="#attr_{{name}}">{{name}}</a>
+                            </li>
+                        {{/attrs}}
+                    </ul>
+                </div>
+            {{/if}}
+
+            {{#if events}}
+                <div class="index-section events">
+                    <h3>Events</h3>
+
+                    <ul class="index-list events{{#if extends}} extends{{/if}}">
+                        {{#events}}
+                            <li class="index-item event{{#if access}} {{access}}{{/if}}{{#if deprecated}} deprecated{{/if}}{{#if overwritten_from}} inherited{{/if}}{{#if extended_from}} inherited{{/if}}">
+                                <a href="#event_{{name}}">{{name}}</a>
+
+                                {{#if static}}
+                                    <span class="flag static">static</span>
+                                {{/if}}
+                                {{#if deprecated}}
+                                    <span class="flag deprecated">deprecated</span>
+                                {{/if}}
+                            </li>
+                        {{/events}}
+                    </ul>
+                </div>
+            {{/if}}
+        </div>
+
+        {{#if methods}}
+            <div id="methods" class="api-class-tabpanel">
+                <h2 class="off-left">Methods</h2>
+
+                {{#methods}}
+{{>method}}
+                {{/methods}}
+            </div>
+        {{/if}}
+
+        {{#if properties}}
+            <div id="properties" class="api-class-tabpanel">
+                <h2 class="off-left">Properties</h2>
+
+                {{#properties}}
+                    {{>props}}
+                {{/properties}}
+            </div>
+        {{/if}}
+
+        {{#if attrs}}
+            <div id="attrs" class="api-class-tabpanel">
+                <h2 class="off-left">Attributes</h2>
+
+                {{#attrs}}
+                    {{>attrs}}
+                {{/attrs}}
+            </div>
+        {{/if}}
+
+        {{#if events}}
+            <div id="events" class="api-class-tabpanel">
+                <h2 class="off-left">Events</h2>
+
+                {{#events}}
+                    {{>events}}
+                {{/events}}
+            </div>
+        {{/if}}
+    </div>
+</div>
diff --git a/plugins/dali-script-v8/docs/dali-theme/partials/events.handlebars b/plugins/dali-script-v8/docs/dali-theme/partials/events.handlebars
new file mode 100644 (file)
index 0000000..cb7a6b5
--- /dev/null
@@ -0,0 +1,137 @@
+<div id="event_{{name}}" class="events item{{#if access}} {{access}}{{/if}}{{#if deprecated}} deprecated{{/if}}{{#if extended_from}} inherited{{/if}}">
+    <h3 class="name"><code>{{name}}</code></h3>
+    <span class="type">{{#crossLink type}}{{/crossLink}}</span>
+
+    {{#if deprecated}}
+        <span class="flag deprecated"{{#if deprecationMessage}} title="{{deprecationMessage}}"{{/if}}>deprecated</span>
+    {{/if}}
+
+    {{#if access}}
+        <span class="flag {{access}}">{{access}}</span>
+    {{/if}}
+
+    {{#if final}}
+        <span class="flag final">final</span>
+    {{/if}}
+
+    {{#if static}}
+        <span class="flag static">static</span>
+    {{/if}}
+
+    <div class="meta">
+        {{#if overwritten_from}}
+            <p>Inherited from
+            <a href="{{crossLinkRaw overwritten_from/class}}#event_{{overwritten_from/name}}">
+                {{overwritten_from/class}}
+            </a>
+            {{#if foundAt}}
+            but overwritten in
+            {{/if}}
+        {{else}}
+            {{#if extended_from}}
+                <p>Inherited from
+                <a href="{{crossLinkRaw extended_from}}#event_{{name}}">{{extended_from}}</a>:
+            {{else}}
+                {{#providedBy}}
+                    <p>Provided by the <a href="../modules/{{.}}.html">{{.}}</a> module.</p>
+                {{/providedBy}}
+                <p>
+                {{#if foundAt}}
+                Defined in
+                {{/if}}
+            {{/if}}
+        {{/if}}
+        {{#if foundAt}}
+        <a href="{{foundAt}}">`{{{file}}}:{{{line}}}`</a>
+        {{/if}}
+        </p>
+
+        {{#if deprecationMessage}}
+            <p>Deprecated: {{deprecationMessage}}</p>
+        {{/if}}
+
+        {{#if since}}
+            <p>Available since {{since}}</p>
+        {{/if}}
+    </div>
+
+    <div class="description">
+        {{{eventDescription}}}
+    </div>
+
+    {{#if params}}
+        <div class="params">
+            <h4>Event Payload:</h4>
+
+            <ul class="params-list">
+            {{#params}}
+                <li class="param">
+                    {{#if optional}}
+                        <code class="param-name optional">[{{name}}{{#if optdefault}}={{optdefault}}{{/if}}]</code>
+                        <span class="type">{{#crossLink type}}{{/crossLink}}</span>
+                        <span class="flag optional" title="This parameter is optional.">optional</span>
+                    {{else}}
+                        <code class="param-name">{{name}}</code>
+                        <span class="type">{{#crossLink type}}{{/crossLink}}</span>
+                    {{/if}}
+
+                    {{#if multiple}}
+                        <span class="flag multiple" title="This parameter may occur one or more times.">Multiple</span>
+                    {{/if}}
+
+                    <div class="param-description">
+                        {{{description}}}
+                    </div>
+
+                    {{#if props}}
+                        <ul class="params-list">
+                            {{#props}}
+                            <li class="param">
+                                {{#if optional}}
+                                    <code class="param-name optional">[{{name}}{{#if optdefault}}={{optdefault}}{{/if}}]</code>
+                                    <span class="type">{{#crossLink type}}{{/crossLink}}</span>
+                                    <span class="flag optional" title="This parameter is optional.">optional</span>
+                                {{else}}
+                                    <code class="param-name">{{name}}</code>
+                                    <span class="type">{{#crossLink type}}{{/crossLink}}</span>
+                                {{/if}}
+
+                                <div class="param-description">
+                                    {{{description}}}
+                                </div>
+
+                                {{#if props}}
+                                    <ul class="params-list">
+                                        {{#props}}
+                                        <li class="param">
+                                            <code class="param-name">{{name}}</code>
+                                            <span class="type">{{#crossLink type}}{{/crossLink}}</span>
+
+                                            <div class="param-description">
+                                                {{{description}}}
+                                            </div>
+                                        </li>
+                                        {{/props}}
+                                    </ul>
+                                {{/if}}
+                            </li>
+                            {{/props}}
+                        </ul>
+                    {{/if}}
+                </li>
+            {{/params}}
+            </ul>
+        </div>
+    {{/if}}
+
+
+    {{#example}}
+        <div class="example">
+            <h4>Example:</h4>
+
+            <div class="example-content">
+                {{{.}}}
+            </div>
+        </div>
+    {{/example}}
+</div>
diff --git a/plugins/dali-script-v8/docs/dali-theme/partials/files.handlebars b/plugins/dali-script-v8/docs/dali-theme/partials/files.handlebars
new file mode 100644 (file)
index 0000000..fccd476
--- /dev/null
@@ -0,0 +1,7 @@
+<h1 class="file-heading">File: {{fileName}}</h1>
+
+<div class="file">
+    <pre class="code prettyprint linenums">
+{{fileData}}
+    </pre>
+</div>
diff --git a/plugins/dali-script-v8/docs/dali-theme/partials/index.handlebars b/plugins/dali-script-v8/docs/dali-theme/partials/index.handlebars
new file mode 100644 (file)
index 0000000..29a0e85
--- /dev/null
@@ -0,0 +1,21 @@
+    <div class="apidocs">
+        <div id="docs-main" class="content">
+            <p>
+            Browse to a module or class using the sidebar to view its API documentation.
+            </p>
+
+            <h2>Keyboard Shortcuts</h2>
+
+            <ul>
+                <li><p>Press <kbd>s</kbd> to focus the API search box.</p></li>
+
+                <li><p>Use <kbd>Up</kbd> and <kbd>Down</kbd> to select classes, modules, and search results.</p></li>
+
+                <li class="mac-only"><p>With the API search box or sidebar focused, use <kbd><span class="cmd">&#x2318;</span>-Left</kbd> or <kbd><span class="cmd">&#x2318;</span>-Right</kbd> to switch sidebar tabs.</p></li>
+
+                <li class="pc-only"><p>With the API search box or sidebar focused, use <kbd>Ctrl+Left</kbd> and <kbd>Ctrl+Right</kbd> to switch sidebar tabs.</p></li>
+            </ul>
+        </div>
+    </div>
+
+
diff --git a/plugins/dali-script-v8/docs/dali-theme/partials/method.handlebars b/plugins/dali-script-v8/docs/dali-theme/partials/method.handlebars
new file mode 100644 (file)
index 0000000..664d79b
--- /dev/null
@@ -0,0 +1,212 @@
+<div id="method_{{name}}" class="method item{{#if access}} {{access}}{{/if}}{{#if deprecated}} deprecated{{/if}}{{#if extended_from}} inherited{{/if}}">
+    <h3 class="name"><code>{{name}}</code></h3>
+
+    {{#if params}}
+        <div class="args">
+            <span class="paren">(</span><ul class="args-list inline commas">
+            {{#params}}
+                <li class="arg">
+                    {{#if optional}}
+                        <code class="optional">[{{name}}{{#if optdefault}}={{optdefault}}{{/if}}]</code>
+                    {{else}}
+                        <code>{{name}}</code>
+                    {{/if}}
+                </li>
+            {{/params}}
+            </ul><span class="paren">)</span>
+        </div>
+    {{else}}
+        <span class="paren">()</span>
+    {{/if}}
+
+    {{#if return}}
+        <span class="returns-inline">
+            <span class="type">{{#crossLink returnType}}{{/crossLink}}</span>
+        </span>
+    {{/if}}
+
+    {{#if deprecated}}
+        <span class="flag deprecated"{{#if deprecationMessage}} title="{{deprecationMessage}}"{{/if}}>deprecated</span>
+    {{/if}}
+
+    {{#if access}}
+        <span class="flag {{access}}">{{access}}</span>
+    {{/if}}
+
+    {{#if final}}
+        <span class="flag final">final</span>
+    {{/if}}
+
+    {{#if static}}
+        <span class="flag static">static</span>
+    {{/if}}
+
+    {{#if chainable}}
+        <span class="flag chainable">chainable</span>
+    {{/if}}
+
+    {{#if async}}
+        <span class="flag async">async</span>
+    {{/if}}
+
+    <div class="meta">
+        {{#if overwritten_from}}
+            <p>Inherited from
+            <a href="{{crossLinkRaw overwritten_from/class}}#method_{{overwritten_from/name}}">
+                {{overwritten_from/class}}
+            </a>
+            {{#if foundAt}}
+            but overwritten in
+            {{/if}}
+        {{else}}
+            {{#if extended_from}}
+                <p>Inherited from
+                <a href="{{crossLinkRaw extended_from}}#method_{{name}}">{{extended_from}}</a>:
+            {{else}}
+                {{#providedBy}}
+                    <p>Provided by the <a href="../modules/{{.}}.html">{{.}}</a> module.</p>
+                {{/providedBy}}
+                <p>
+                {{#if foundAt}}
+                Defined in
+                {{/if}}
+            {{/if}}
+        {{/if}}
+        {{#if foundAt}}
+        <a href="{{foundAt}}">`{{{file}}}:{{{line}}}`</a>
+        {{/if}}
+        </p>
+
+
+        {{#if deprecationMessage}}
+            <p>Deprecated: {{deprecationMessage}}</p>
+        {{/if}}
+
+        {{#if since}}
+            <p>Available since {{since}}</p>
+        {{/if}}
+    </div>
+
+    <div class="description">
+        {{{methodDescription}}}
+    </div>
+
+    {{#if params}}
+        <div class="params">
+            <h4>Parameters:</h4>
+
+            <ul class="params-list">
+            {{#params}}
+                <li class="param">
+                    {{#if optional}}
+                        <code class="param-name optional">[{{name}}{{#if optdefault}}={{optdefault}}{{/if}}]</code>
+                        <span class="type">{{#crossLink type}}{{/crossLink}}</span>
+                        <span class="flag optional" title="This parameter is optional.">optional</span>
+                    {{else}}
+                        <code class="param-name">{{name}}</code>
+                        <span class="type">{{#crossLink type}}{{/crossLink}}</span>
+                    {{/if}}
+
+                    {{#if multiple}}
+                        <span class="flag multiple" title="This argument may occur one or more times.">multiple</span>
+                    {{/if}}
+
+                    <div class="param-description">
+                        {{{description}}}
+                    </div>
+
+                    {{#if props}}
+                        <ul class="params-list">
+                            {{#props}}
+                            <li class="param">
+                                {{#if optional}}
+                                    <code class="param-name optional">[{{name}}{{#if optdefault}}={{optdefault}}{{/if}}]</code>
+                                    <span class="type">{{#crossLink type}}{{/crossLink}}</span>
+                                    <span class="flag optional" title="This parameter is optional.">optional</span>
+                                {{else}}
+                                    <code class="param-name">{{name}}</code>
+                                    <span class="type">{{#crossLink type}}{{/crossLink}}</span>
+                                {{/if}}
+
+                                <div class="param-description">
+                                    {{{description}}}
+                                </div>
+
+                                {{#if props}}
+                                    <ul class="params-list">
+                                        {{#props}}
+                                        <li class="param">
+                                            {{#if optional}}
+                                                <code class="param-name optional">[{{name}}{{#if optdefault}}={{optdefault}}{{/if}}]</code>
+                                                <span class="type">{{#crossLink type}}{{/crossLink}}</span>
+                                                <span class="flag optional" title="This parameter is optional.">optional</span>
+                                            {{else}}
+                                                <code class="param-name">{{name}}</code>
+                                                <span class="type">{{#crossLink type}}{{/crossLink}}</span>
+                                            {{/if}}
+
+                                            <div class="param-description">
+                                                {{{description}}}
+                                            </div>
+                                        </li>
+                                        {{/props}}
+                                    </ul>
+                                {{/if}}
+                            </li>
+                            {{/props}}
+                        </ul>
+                    {{/if}}
+                </li>
+            {{/params}}
+            </ul>
+        </div>
+    {{/if}}
+
+    {{#return}}
+        <div class="returns">
+            <h4>Returns:</h4>
+
+            <div class="returns-description">
+                {{#if description}}
+                    {{#if type}}
+                        <span class="type">{{#crossLink type}}{{/crossLink}}</span>:
+                    {{/if}}
+                    {{{description}}}
+                {{else}}
+                    {{#if type}}
+                        <span class="type">{{#crossLink type}}{{/crossLink}}</span>:
+                    {{/if}}
+                {{/if}}
+            </div>
+        </div>
+    {{/return}}
+
+    {{#throws}}
+        <div class="throws">
+            <h4>Throws:</h4>
+
+            <div class="throws-description">
+                {{#if description}}
+                    {{#if type}}
+                        <span class="type">{{#crossLink type}}{{/crossLink}}</span>:
+                    {{/if}}
+                    {{{description}}}
+                {{else}}
+                    {{#if type}}
+                        <span class="type">{{#crossLink type}}{{/crossLink}}</span>:
+                    {{/if}}
+                {{/if}}
+            </div>
+        </div>
+    {{/throws}}
+
+    {{#example}}
+        <div class="example">
+            <h4>Example:</h4>
+
+            <div class="example-content">
+                {{{.}}}
+            </div>
+        </div>
+    {{/example}}
+</div>
diff --git a/plugins/dali-script-v8/docs/dali-theme/partials/module.handlebars b/plugins/dali-script-v8/docs/dali-theme/partials/module.handlebars
new file mode 100644 (file)
index 0000000..190007f
--- /dev/null
@@ -0,0 +1,92 @@
+<h1>{{name}} Module</h1>
+<div class="box clearfix meta">
+    {{#extra}}
+        {{#selleck}}
+            <a class="button link-docs" href="/yui/docs/{{name}}">User Guide &amp; Examples</a>
+        {{/selleck}}
+    {{/extra}}
+
+    {{#if requires}}
+        <div class="uses">
+            Requires
+            <ul class="inline commas">
+                {{#requires}}
+                    <li>{{#crossLinkModule .}}{{/crossLinkModule}}</li>
+                {{/requires}}
+            </ul>
+        </div>
+    {{/if}}
+
+    {{#if foundAt}}
+        <div class="foundat">
+            Defined in: <a href="{{foundAt}}">`{{{file}}}:{{{line}}}`</a>
+        </div>
+    {{/if}}
+
+    {{#if since}}
+        <p>Available since {{since}}</p>
+    {{/if}}
+</div>
+
+{{#if deprecated}}
+    <div class="box deprecated">
+        <p>
+        {{#if deprecationMessage}}
+            <strong>Deprecated:</strong> {{deprecationMessage}}
+        {{else}}
+            This module is deprecated.
+        {{/if}}
+        </p>
+    </div>
+{{/if}}
+
+<div class="box intro">
+    {{{moduleDescription}}}
+</div>
+
+{{#example}}
+    <div class="example">
+        <h4>Example:</h4>
+        <div class="example-content">
+            {{{.}}}
+        </div>
+    </div>
+{{/example}}
+
+<div class="yui3-g">
+    <div class="yui3-u-1-2">
+        {{#if moduleClasses}}
+            <p>This module provides the following classes:</p>
+
+            <ul class="module-classes">
+            {{#moduleClasses}}
+                <li class="module-class">
+                    <a href="{{../projectRoot}}classes/{{name}}.html">
+                        {{displayName}}
+                    </a>
+                </li>
+            {{/moduleClasses}}
+            </ul>
+        {{/if}}
+    </div>
+
+    <div class="yui3-u-1-2">
+        {{#if subModules}}
+            <p>This module is a rollup of the following modules:</p>
+
+            <ul class="module-submodules">
+            {{#subModules}}
+                <li class="module-submodule">
+                    <a href="{{../projectRoot}}modules/{{name}}.html">
+                        {{displayName}}
+                    </a>
+
+                    <div class="module-submodule-description">
+                        {{{description}}}
+                    </div>
+                </li>
+            {{/subModules}}
+            </ul>
+        {{/if}}
+    </div>
+</div>
diff --git a/plugins/dali-script-v8/docs/dali-theme/partials/options.handlebars b/plugins/dali-script-v8/docs/dali-theme/partials/options.handlebars
new file mode 100644 (file)
index 0000000..2b26210
--- /dev/null
@@ -0,0 +1,23 @@
+    <div id="api-options">
+        Show:
+        <label for="api-show-inherited">
+            <input type="checkbox" id="api-show-inherited" checked>
+            Inherited
+        </label>
+
+        <label for="api-show-protected">
+            <input type="checkbox" id="api-show-protected">
+            Protected
+        </label>
+
+        <label for="api-show-private">
+            <input type="checkbox" id="api-show-private">
+            Private
+        </label>
+        <label for="api-show-deprecated">
+            <input type="checkbox" id="api-show-deprecated">
+            Deprecated
+        </label>
+
+    </div>
+
diff --git a/plugins/dali-script-v8/docs/dali-theme/partials/props.handlebars b/plugins/dali-script-v8/docs/dali-theme/partials/props.handlebars
new file mode 100644 (file)
index 0000000..696e720
--- /dev/null
@@ -0,0 +1,119 @@
+<div id="property_{{name}}" class="property item{{#if access}} {{access}}{{/if}}{{#if deprecated}} deprecated{{/if}}{{#if extended_from}} inherited{{/if}}">
+    <h3 class="name"><code>{{name}}</code></h3>
+    <span class="type">{{#crossLink type}}{{/crossLink}}</span>
+
+    {{#if deprecated}}
+        <span class="flag deprecated"{{#if deprecationMessage}} title="{{deprecationMessage}}"{{/if}}>deprecated</span>
+    {{/if}}
+
+    {{#if access}}
+        <span class="flag {{access}}">{{access}}</span>
+    {{/if}}
+
+    {{#if final}}
+        <span class="flag final">final</span>
+    {{/if}}
+
+    {{#if static}}
+        <span class="flag static">static</span>
+    {{/if}}
+
+    <div class="meta">
+        {{#if overwritten_from}}
+            <p>Inherited from
+            <a href="{{crossLinkRaw overwritten_from/class}}#property_{{overwritten_from/name}}">
+                {{overwritten_from/class}}
+            </a>
+            {{#if foundAt}}
+            but overwritten in
+            {{/if}}
+        {{else}}
+            {{#if extended_from}}
+                <p>Inherited from
+                <a href="{{crossLinkRaw extended_from}}#property_{{name}}">{{extended_from}}</a>:
+            {{else}}
+                {{#providedBy}}
+                    <p>Provided by the <a href="../modules/{{.}}.html">{{.}}</a> module.</p>
+                {{/providedBy}}
+                <p>
+                {{#if foundAt}}
+                Defined in
+                {{/if}}
+            {{/if}}
+        {{/if}}
+        {{#if foundAt}}
+        <a href="{{foundAt}}">`{{{file}}}:{{{line}}}`</a>
+        {{/if}}
+        </p>
+
+        {{#if deprecationMessage}}
+            <p>Deprecated: {{deprecationMessage}}</p>
+        {{/if}}
+
+        {{#if since}}
+            <p>Available since {{since}}</p>
+        {{/if}}
+    </div>
+
+    <div class="description">
+        {{{propertyDescription}}}
+    </div>
+
+    {{#if default}}
+        <p><strong>Default:</strong> {{default}}</p>
+    {{/if}}
+
+    {{#example}}
+        <div class="example">
+            <h4>Example:</h4>
+
+            <div class="example-content">
+                {{{.}}}
+            </div>
+        </div>
+    {{/example}}
+
+    {{#if subprops}}
+        <h4>Sub-properties:</h4>
+
+        <ul class="params-list">
+            {{#subprops}}
+            <li class="param">
+                {{#if optional}}
+                    <code class="param-name optional">[{{name}}{{#if optdefault}}={{optdefault}}{{/if}}]</code>
+                    <span class="type">{{#crossLink type}}{{/crossLink}}</span>
+                    <span class="flag optional" title="This property is optional.">optional</span>
+                {{else}}
+                    <code class="param-name">{{name}}</code>
+                    <span class="type">{{#crossLink type}}{{/crossLink}}</span>
+                {{/if}}
+
+                <div class="param-description">
+                    {{{description}}}
+                </div>
+
+                {{#if subprops}}
+                    <ul class="params-list">
+                        {{#subprops}}
+                        <li class="param">
+                            {{#if optional}}
+                                <code class="param-name optional">[{{name}}{{#if optdefault}}={{optdefault}}{{/if}}]</code>
+                                <span class="type">{{#crossLink type}}{{/crossLink}}</span>
+                                <span class="flag optional" title="This property is optional.">optional</span>
+                            {{else}}
+                                <code class="param-name">{{name}}</code>
+                                <span class="type">{{#crossLink type}}{{/crossLink}}</span>
+                            {{/if}}
+
+                            <div class="param-description">
+                                {{{description}}}
+                            </div>
+                        </li>
+                        {{/subprops}}
+                    </ul>
+                {{/if}}
+            </li>
+            {{/subprops}}
+        </ul>
+    {{/if}}
+</div>
diff --git a/plugins/dali-script-v8/docs/dali-theme/partials/sidebar.handlebars b/plugins/dali-script-v8/docs/dali-theme/partials/sidebar.handlebars
new file mode 100644 (file)
index 0000000..a8500c5
--- /dev/null
@@ -0,0 +1,27 @@
+<div id="api-list">
+    <h2 class="off-left">APIs</h2>
+    <div id="api-tabview" class="tabview">
+        <ul class="tabs">
+            <li><a href="#api-classes">Classes</a></li>
+            <li><a href="#api-modules">Modules</a></li>
+        </ul>
+
+        <div id="api-tabview-filter">
+            <input type="search" id="api-filter" placeholder="Type to filter APIs">
+        </div>
+
+        <div id="api-tabview-panel">
+            <ul id="api-classes" class="apis classes">
+            {{#classes}}
+                <li><a href="{{../projectRoot}}classes/{{name}}.html">{{displayName}}</a></li>
+            {{/classes}}
+            </ul>
+
+            <ul id="api-modules" class="apis modules">
+            {{#allModules}}
+                <li><a href="{{../projectRoot}}modules/{{name}}.html">{{displayName}}</a></li>
+            {{/allModules}}
+            </ul>
+        </div>
+    </div>
+</div>
diff --git a/plugins/dali-script-v8/docs/dali-theme/theme.json b/plugins/dali-script-v8/docs/dali-theme/theme.json
new file mode 100644 (file)
index 0000000..d540f15
--- /dev/null
@@ -0,0 +1,4 @@
+{
+    "yuiGridsUrl": "http://yui.yahooapis.com/3.9.1/build/cssgrids/cssgrids-min.css",
+    "yuiSeedUrl": "http://yui.yahooapis.com/combo?3.9.1/build/yui/yui-min.js"
+}
diff --git a/plugins/dali-script-v8/docs/gmon.out b/plugins/dali-script-v8/docs/gmon.out
new file mode 100644 (file)
index 0000000..04ee467
Binary files /dev/null and b/plugins/dali-script-v8/docs/gmon.out differ
diff --git a/plugins/dali-script-v8/docs/yuidoc.json b/plugins/dali-script-v8/docs/yuidoc.json
new file mode 100644 (file)
index 0000000..89a27cb
--- /dev/null
@@ -0,0 +1,13 @@
+{
+    "name": "DALI JavaScript API",
+    "description": "DALI is a dynamic animtaion library for building advanced 3D applications",
+    "version": "1.0.0",
+    "themedir": "dali-theme",
+    "url": "https://review.tizen.org/gerrit/platform/core/uifw/dali-core",
+    "options": {
+        "outdir": "generated",
+        "markdown": {
+          "gfm":"true"
+       }
+    }
+}
diff --git a/plugins/dali-script-v8/file.list b/plugins/dali-script-v8/file.list
new file mode 100644 (file)
index 0000000..13300ef
--- /dev/null
@@ -0,0 +1,57 @@
+# Add local source files here
+
+v8_plugin_dir =\
+ $(plugin_src_dir)/dali-script-v8/src
+
+script_v8_plugin_src_files = \
+   $(v8_plugin_dir)/dali-script-v8.cpp \
+   $(v8_plugin_dir)/utils/v8-utils.cpp \
+   $(v8_plugin_dir)/dali-wrapper.cpp \
+   $(v8_plugin_dir)/shared/base-wrapped-object.cpp \
+   $(v8_plugin_dir)/shared/object-template-helper.cpp \
+   $(v8_plugin_dir)/actors/actor-wrapper.cpp \
+   $(v8_plugin_dir)/actors/actor-api.cpp \
+   $(v8_plugin_dir)/actors/layer-api.cpp \
+   $(v8_plugin_dir)/actors/text-actor-api.cpp \
+   $(v8_plugin_dir)/actors/image-actor-api.cpp \
+   $(v8_plugin_dir)/actors/camera-actor-api.cpp \
+   $(v8_plugin_dir)/actors/mesh-actor-api.cpp \
+   $(v8_plugin_dir)/actors/renderable-actor-api.cpp \
+   $(v8_plugin_dir)/constants/constants-wrapper.cpp \
+   $(v8_plugin_dir)/text/font-api.cpp \
+   $(v8_plugin_dir)/text/font-wrapper.cpp \
+   $(v8_plugin_dir)/animation/animation-api.cpp \
+   $(v8_plugin_dir)/animation/animation-wrapper.cpp \
+   $(v8_plugin_dir)/animation/path-api.cpp \
+   $(v8_plugin_dir)/animation/path-wrapper.cpp \
+   $(v8_plugin_dir)/stage/stage-wrapper.cpp \
+   $(v8_plugin_dir)/events/event-object-generator.cpp \
+   $(v8_plugin_dir)/events/pan-gesture-detector-api.cpp \
+   $(v8_plugin_dir)/events/pan-gesture-detector-wrapper.cpp \
+   $(v8_plugin_dir)/stage/stage-api.cpp \
+   $(v8_plugin_dir)/image/image-attributes-api.cpp \
+   $(v8_plugin_dir)/shader-effects/shader-effect-api.cpp \
+   $(v8_plugin_dir)/shader-effects/shader-effect-wrapper.cpp \
+   $(v8_plugin_dir)/image/image-attributes-wrapper.cpp \
+   $(v8_plugin_dir)/image/image-wrapper.cpp \
+   $(v8_plugin_dir)/image/image-api.cpp \
+   $(v8_plugin_dir)/image/buffer-image-api.cpp \
+   $(v8_plugin_dir)/image/native-image-api.cpp \
+   $(v8_plugin_dir)/image/frame-buffer-image-api.cpp \
+   $(v8_plugin_dir)/image/resource-image-api.cpp \
+   $(v8_plugin_dir)/image/nine-patch-image-api.cpp \
+   $(v8_plugin_dir)/object/handle-wrapper.cpp \
+   $(v8_plugin_dir)/object/property-value-wrapper.cpp \
+   $(v8_plugin_dir)/signals/signal-manager.cpp \
+   $(v8_plugin_dir)/render-tasks/render-task-list-api.cpp \
+   $(v8_plugin_dir)/render-tasks/render-task-list-wrapper.cpp \
+   $(v8_plugin_dir)/render-tasks/render-task-api.cpp \
+   $(v8_plugin_dir)/render-tasks/render-task-wrapper.cpp \
+   $(v8_plugin_dir)/toolkit/builder/builder-api.cpp \
+   $(v8_plugin_dir)/toolkit/builder/builder-wrapper.cpp \
+   $(v8_plugin_dir)/toolkit/focus-manager/keyboard-focus-manager-api.cpp \
+   $(v8_plugin_dir)/toolkit/focus-manager/keyboard-focus-manager-wrapper.cpp \
+   $(v8_plugin_dir)/signals/dali-any-javascript-converter.cpp \
+   $(v8_plugin_dir)/garbage-collector/garbage-collector.cpp \
+   $(v8_plugin_dir)/module-loader/module.cpp \
+   $(v8_plugin_dir)/module-loader/module-loader.cpp
diff --git a/plugins/dali-script-v8/src/actors/actor-api.cpp b/plugins/dali-script-v8/src/actors/actor-api.cpp
new file mode 100644 (file)
index 0000000..ebc1fa7
--- /dev/null
@@ -0,0 +1,715 @@
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// CLASS HEADER
+#include "actor-api.h"
+
+// EXTERNAL INCLUDES
+#include <dali-toolkit/public-api/controls/text-view/text-view.h>
+
+// INTERNAL INCLUDES
+#include <v8-utils.h>
+#include <actors/actor-wrapper.h>
+
+namespace Dali
+{
+
+namespace V8Plugin
+{
+
+namespace  // unanmed namespace
+{
+Actor GetActor( v8::Isolate* isolate, const v8::FunctionCallbackInfo<v8::Value>& args )
+{
+  HandleWrapper* handleWrapper = HandleWrapper::Unwrap( isolate, args.This() );
+  return Actor::DownCast( handleWrapper->mHandle );
+}
+} //unanmed namespace
+
+
+namespace TextViewApi
+{
+ Actor New( const v8::FunctionCallbackInfo< v8::Value >& args )
+ {
+   return Dali::Toolkit::TextView::New();
+ }
+}
+
+/***************************************
+ * ACTOR API FUNCTIONS
+ ****************************************/
+/**
+ * Constructor
+ *
+ * @for Actor
+ * @constructor
+ * @method Actor
+ * @return {Object} actor
+ */
+Actor ActorApi::New( const v8::FunctionCallbackInfo< v8::Value >& args )
+{
+  return Actor::New();
+}
+
+/**
+ * get the actors unique id
+ *
+ * @for Actor
+ * @method getId
+ * @return {Integer} id
+ */
+void ActorApi::GetId( const v8::FunctionCallbackInfo<v8::Value>& args )
+{
+  v8::Isolate* isolate = args.GetIsolate();
+  v8::HandleScope handleScope( isolate );
+  Actor actor = GetActor( isolate, args );
+
+  args.GetReturnValue().Set( v8::Integer::New( isolate, actor.GetId() ) );
+}
+
+/**
+ * Query whether an actor is the root actor, which is owned by the Stage
+ *
+ * @for Actor
+ * @method isRoot
+ * @return {Boolean} true if it is root
+ *
+ */
+void ActorApi::IsRoot( const v8::FunctionCallbackInfo<v8::Value>& args )
+{
+  v8::Isolate* isolate = args.GetIsolate();
+  v8::HandleScope handleScope( isolate );
+  Actor actor = GetActor( isolate, args );
+
+  args.GetReturnValue().Set( v8::Boolean::New( isolate, actor.IsRoot() ) );
+}
+
+/**
+ *
+ * Query whether the actor is connected to the Stage.
+ * When an actor is connected, it will be directly or indirectly parented to the root Actor.
+ * The root Actor is provided automatically by dali.stage, and is always considered to be connected.
+ *
+ * @for Actor
+ * @method onStage
+ * @return {Boolean} True if the actor is connected to the Stage
+ */
+void ActorApi::OnStage( const v8::FunctionCallbackInfo<v8::Value>& args )
+{
+  v8::Isolate* isolate = args.GetIsolate();
+  v8::HandleScope handleScope( isolate );
+  Actor actor = GetActor( isolate, args );
+
+  args.GetReturnValue().Set( v8::Boolean::New( isolate, actor.OnStage() ) );
+}
+
+/**
+ * Query whether an actor is a layer
+ *
+ * @for Actor
+ * @method isLayer
+ * @return {Boolean} true if it is a layer
+ */
+void ActorApi::IsLayer( const v8::FunctionCallbackInfo<v8::Value>& args )
+{
+  v8::Isolate* isolate = args.GetIsolate();
+  v8::HandleScope handleScope( isolate );
+  Actor actor = GetActor( isolate, args );
+
+  args.GetReturnValue().Set( v8::Boolean::New( isolate, actor.IsLayer() ) );
+}
+
+/**
+ * Gets the layer in which the actor is present.
+ *
+ * @for Actor
+ * @method getLayer
+ * @return {Object} Layer
+ */
+void ActorApi::GetLayer( const v8::FunctionCallbackInfo<v8::Value>& args )
+{
+  v8::Isolate* isolate = args.GetIsolate();
+  v8::HandleScope handleScope( isolate );
+  Actor actor = GetActor( isolate, args );
+  Layer layer = actor.GetLayer();
+  if( layer ) // actors don't always have a layer
+  {
+    v8::Handle < v8::Object > wrappedLayer = ActorWrapper::ActorWrapper::WrapActor( isolate, layer, ActorWrapper::LAYER_ACTOR );
+    args.GetReturnValue().Set( wrappedLayer );
+  }
+  // else return an empty object
+}
+
+/**
+ * Adds a child Actor to this Actor.
+ *
+ * NOTE! if the child already has a parent, it will be removed from old parent
+ * and reparented to this actor. This may change childs position, color, shader effect,
+ * scale etc as it now inherits them from this actor
+ *
+ * Pre-conditions
+ * - The child actor is not the same as the parent actor.
+ * - The actor is not the Root actor
+
+ * Once added The child will be referenced by its parent. This means that the child will be kept alive,
+ * even if the handle passed into this method is reset or destroyed.
+ *
+ * @for Actor
+ * @method add
+ * @param {Object} Actor
+ */
+void ActorApi::AddActor( const v8::FunctionCallbackInfo<v8::Value>& args )
+{
+  v8::Isolate* isolate = args.GetIsolate();
+  v8::HandleScope handleScope( isolate );
+  Actor parent = GetActor( isolate, args );
+  bool found(false);
+  Actor child = V8Utils::GetActorParameter( PARAMETER_0, found, isolate, args );
+  if( found )
+  {
+    parent.Add( child );
+  }
+  else
+  {
+    DALI_SCRIPT_EXCEPTION( isolate, "child parameter missing" );
+  }
+}
+
+/**
+ * Removes a child Actor from this Actor.
+ *
+ * If the actor was not a child of this actor, this is a no-op.
+ *
+ * Preconditions:
+ * -  The child actor is not the same as the parent actor.
+ *
+ * @for Actor
+ * @param{Object} Actor the child actor
+ * @method Remove
+ */
+void ActorApi::RemoveActor( const v8::FunctionCallbackInfo<v8::Value>& args )
+{
+  v8::Isolate* isolate = args.GetIsolate();
+  v8::HandleScope handleScope( isolate );
+  Actor parent = GetActor( isolate, args );
+  bool found( false );
+  Actor child = V8Utils::GetActorParameter( PARAMETER_0, found, isolate, args );
+
+  if( found )
+  {
+    parent.Remove( child );
+  }
+  else
+  {
+    DALI_SCRIPT_EXCEPTION( isolate, "child parameter missing" );
+  }
+}
+
+/**
+ * Checks whether an Actor is equal to this Actor.
+ *
+ * @for Actor
+ * @method iIsEqualTo
+ * @param {Object} Actor
+ */
+void ActorApi::IsEqualTo( const v8::FunctionCallbackInfo<v8::Value>& args )
+{
+  v8::Isolate* isolate = args.GetIsolate();
+  v8::HandleScope handleScope( isolate );
+  Actor self = GetActor( isolate, args );
+  bool found( false );
+
+  Actor actor = V8Utils::GetActorParameter( PARAMETER_0, found, isolate, args );
+  if( found )
+  {
+    args.GetReturnValue().Set( v8::Boolean::New( isolate, (actor == self) ) );
+  }
+  else
+  {
+    DALI_SCRIPT_EXCEPTION( isolate, "actor parameter missing" );
+  }
+}
+
+/** Removes an actor from its parent.
+ *
+ * If the actor has no parent, this method does nothing.
+ *
+ * @for Actor
+ * @method Unparent
+ */
+void ActorApi::Unparent( const v8::FunctionCallbackInfo< v8::Value >& args)
+{
+  v8::Isolate* isolate = args.GetIsolate();
+  v8::HandleScope handleScope( isolate );
+  Actor actor = GetActor( isolate, args );
+  actor.Unparent();
+}
+
+/**
+ * get number of child actors
+ *
+ * @for Actor
+ * @method getChildCount
+ * @return {Integer} count
+ */
+void ActorApi::GetChildCount( const v8::FunctionCallbackInfo<v8::Value>& args )
+{
+  v8::Isolate* isolate = args.GetIsolate();
+  v8::HandleScope handleScope( isolate );
+  Actor actor = GetActor( isolate, args );
+
+  args.GetReturnValue().Set( v8::Integer::New( isolate, actor.GetChildCount() ) );
+}
+
+/**
+ * Retrieve and child actor by index.
+ *
+ * @for Actor
+ * @method getChildAt
+ * @param {Integer} actor index
+ * @return {Object} actor on success, empty actor handle if not found
+ */
+void ActorApi::GetChildAt( const v8::FunctionCallbackInfo<v8::Value>& args )
+{
+  v8::Isolate* isolate = args.GetIsolate();
+  v8::HandleScope handleScope( isolate );
+  Actor parent = GetActor( isolate, args );
+  bool found( false );
+  int id = V8Utils::GetIntegerParameter( PARAMETER_0, found, isolate, args, 0 );
+  if( !found )
+  {
+    DALI_SCRIPT_EXCEPTION( isolate, "Integer parameter missing" );
+    return;
+  }
+  Actor childActor = parent.GetChildAt( id );
+  if( childActor )
+  {
+    // wrap the child
+    v8::Handle < v8::Object > wrappedActor = ActorWrapper::WrapActor( isolate, childActor );
+    args.GetReturnValue().Set( wrappedActor );
+  }
+}
+
+/**
+ * Search through this actor's hierarchy for an actor with the given name
+ * The actor itself is also considered in the search
+ *
+ * @for Actor
+ * @method findChildByName
+ * @param {String} actor name
+ * @return {Object} actor on success, empty actor handle if not found
+ */
+void ActorApi::FindChildByName( const v8::FunctionCallbackInfo<v8::Value>& args )
+{
+  v8::Isolate* isolate = args.GetIsolate();
+  v8::HandleScope handleScope( isolate );
+  Actor parent = GetActor( isolate, args );
+  bool found( false );
+  std::string name = V8Utils::GetStringParameter( PARAMETER_0, found, isolate, args );
+  if( !found )
+  {
+    DALI_SCRIPT_EXCEPTION( isolate, "string parameter missing" );
+    return;
+  }
+  Actor childActor = parent.FindChildByName( name );
+  if( childActor )
+  {
+    // wrap the child
+    v8::Handle < v8::Object > wrappedLayer = ActorWrapper::WrapActor( isolate, childActor );
+    args.GetReturnValue().Set( wrappedLayer );
+  }
+}
+
+/**
+ * Search through this actor's hierarchy for an actor with the given name or alias.
+ *
+ * Actors can customize this function to provide actors with preferred alias'
+ * For example 'previous' could return the last selected child.
+ * If no aliased actor is found then FindChildByName() is called.
+ *
+ * @for Actor
+ * @method findChildByAlias
+ * @param {String} actor alias
+ * @return {Object} actor on success, empty actor handle if not found
+ */
+void ActorApi::FindChildByAlias( const v8::FunctionCallbackInfo<v8::Value>& args )
+{
+  v8::Isolate* isolate = args.GetIsolate();
+  v8::HandleScope handleScope( isolate );
+  Actor parent = GetActor( isolate, args );
+  bool found( false );
+  std::string name = V8Utils::GetStringParameter( PARAMETER_0, found, isolate, args );
+  if( !found )
+  {
+    DALI_SCRIPT_EXCEPTION( isolate, "String parameter not found" );
+    return;
+  }
+  Actor childActor = parent.FindChildByAlias( name );
+  if( childActor )
+  {
+    // wrap the child
+    v8::Local < v8::Object > wrappedLayer = ActorWrapper::WrapActor( isolate, childActor );
+    args.GetReturnValue().Set( wrappedLayer );
+  }
+}
+
+/**
+ * Search through this actor's hierarchy for an actor with the given unique ID.
+ * The actor itself is also considered in the search
+ *
+ * @for Actor
+ * @method findChildById
+ * @param {Integer} id
+ * @return {Object} actor on success, empty actor handle if not found
+ */
+void ActorApi::FindChildById( const v8::FunctionCallbackInfo<v8::Value>& args )
+{
+  v8::Isolate* isolate = args.GetIsolate();
+  v8::HandleScope handleScope( isolate );
+  Actor parent = GetActor( isolate, args );
+
+  bool found( false );
+  int id = V8Utils::GetIntegerParameter( PARAMETER_0, found, isolate, args, 0 );
+  if( !found )
+  {
+    DALI_SCRIPT_EXCEPTION( isolate, "Integer parameter missing" );
+    return;
+  }
+  Actor childActor = parent.FindChildById( id );
+  if( childActor )
+  {
+    // wrap the child
+    v8::Local < v8::Object > wrappedLayer = ActorWrapper::WrapActor( isolate, childActor );
+    args.GetReturnValue().Set( wrappedLayer );
+  }
+}
+
+
+/**
+ * retrieve the actor's parent.
+ *
+ * @for Actor
+ * @method getParent
+ * @return {Object} actor on success, empty actor handle if actor has no parent
+ */
+void ActorApi::GetParent( const v8::FunctionCallbackInfo<v8::Value>& args )
+{
+  v8::Isolate* isolate = args.GetIsolate();
+  v8::HandleScope handleScope( isolate );
+  Actor actor = GetActor( isolate, args );
+  Actor parent = actor.GetParent();
+
+  if( parent )
+  {
+    v8::Local < v8::Object > wrappedLayer = ActorWrapper::WrapActor( isolate, parent );
+    args.GetReturnValue().Set( wrappedLayer );
+  }
+}
+/**
+ * Converts screen coordinates into the actor's coordinate system using the default camera.
+ *
+ * The actor coordinates are relative to the top-left (0.0, 0.0, 0.5)
+ *
+ * @example
+ *    var local = actor.screenToLocal( [ 10, 53 ]);
+ *    var xPos = local.x;
+ *    var yPos = local.y;
+ *
+ *
+ * @for Actor
+ * @method screenToLocal
+ * @param {Object}  ScreenCoordinates array of 2 objects
+ * @return {Object} local coordinates object with x,y properties
+ */
+void ActorApi::ScreenToLocal( const v8::FunctionCallbackInfo<v8::Value>& args )
+{
+  v8::Isolate* isolate = args.GetIsolate();
+  v8::HandleScope handleScope( isolate );
+  Actor actor = GetActor( isolate, args );
+
+  //ool ScreenToLocal(float& localX, float& localY, float screenX, float screenY) const;
+  bool found( false );
+
+  int argCount( args.Length() );
+  Vector2 vector;
+
+  if( argCount == 1 )
+  {
+    vector = V8Utils::GetVector2Parameter( PARAMETER_0, found, isolate, args );
+    if( !found )
+    {
+      DALI_SCRIPT_EXCEPTION( isolate, "invalid parameters (x,y)" );
+      return;
+    }
+  }
+  else
+  {
+    DALI_SCRIPT_EXCEPTION( isolate, "invalid parameters (x,y)" );
+    return;
+  }
+  float localX, localY;
+  actor.ScreenToLocal( localX, localY, vector.x, vector.y );
+
+  v8::Local < v8::Object > localCoordinates = v8::Object::New( isolate );
+
+  localCoordinates->Set( v8::String::NewFromUtf8( isolate, "x" ), v8::Number::New( isolate, localX ) );
+  localCoordinates->Set( v8::String::NewFromUtf8( isolate, "y" ), v8::Number::New( isolate, localY ) );
+
+  args.GetReturnValue().Set( localCoordinates );
+
+}
+
+/**
+ * Sets whether the actor should be focusable by keyboard navigation.
+ *
+ * @for Actor
+ * @method setKeyboardFocusable
+ * @param {Boolean}  folcusable
+ */
+void ActorApi::SetKeyboardFocusable( const v8::FunctionCallbackInfo<v8::Value>& args )
+{
+  v8::Isolate* isolate = args.GetIsolate();
+  v8::HandleScope handleScope( isolate );
+  Actor actor = GetActor( isolate, args );
+  bool parameterFound( false );
+  bool focus = V8Utils::GetBooleanParameter( PARAMETER_0, parameterFound, isolate, args );
+  if( !parameterFound )
+  {
+    DALI_SCRIPT_EXCEPTION( isolate, "boolean parameter missing" );
+    return;
+  }
+
+  actor.SetKeyboardFocusable( focus );
+}
+
+/**
+ * Returns whether the actor is focusable by keyboard navigation.
+ *
+ *
+ * @for Actor
+ * @method isKeyboardFocusable
+ * @return {Boolean}  folcusable
+ */
+void ActorApi::IsKeyboardFocusable( const v8::FunctionCallbackInfo<v8::Value>& args )
+{
+  v8::Isolate* isolate = args.GetIsolate();
+  v8::HandleScope handleScope( isolate );
+  Actor actor = GetActor( isolate, args );
+
+  args.GetReturnValue().Set( v8::Boolean::New( isolate, actor.IsKeyboardFocusable() ) );
+
+}
+/**
+ * retrieve the actor type
+ *
+ * @for Actor
+ * @method getActorType
+ * @return {String} Actor, ImageActor, TextActor, MeshActor, Layer, CameraActor ...
+ */
+void ActorApi::GetActorType( const v8::FunctionCallbackInfo<v8::Value>& args )
+{
+  v8::Isolate* isolate = args.GetIsolate();
+  v8::HandleScope handleScope( isolate );
+  Actor actor = GetActor( isolate, args );
+
+  std::string name = actor.GetTypeName();
+  v8::Local < v8::String > v8String = v8::String::NewFromUtf8( isolate, name.c_str() );
+  args.GetReturnValue().Set( v8String );
+}
+/**
+ * Move an actor relative to its existing position.
+ * @example
+ *
+ *    // using an array
+ *    actor.moveBy( [20,40,0] );
+ *
+ * @for Actor
+ * @method moveBy
+ * @param {object} an array of 3 numbers
+ */
+void ActorApi::MoveBy( const v8::FunctionCallbackInfo<v8::Value>& args )
+{
+  v8::Isolate* isolate = args.GetIsolate();
+  v8::HandleScope handleScope( isolate );
+  Actor actor = GetActor( isolate, args );
+
+  //Get displacement vector
+  Vector3 vector;
+  int argCount( args.Length() );
+  if( argCount == 1 )
+  {
+    bool found(false);
+    vector = V8Utils::GetVector3Parameter( PARAMETER_0, found, isolate, args );
+    if( !found )
+    {
+      DALI_SCRIPT_EXCEPTION( isolate, "Vector3 move parameter missing" );
+      return;
+    }
+  }
+  else
+  {
+    DALI_SCRIPT_EXCEPTION( isolate, "Vector3 move parameter missing" );
+    return;
+  }
+  actor.MoveBy( vector );
+
+}
+
+
+/**
+ * Apply a relative rotation to an actor.
+ * @example
+ *
+ *     var rotation =new dali.Rotation( pitch, roll, yaw );
+ *     actor.rotateBy( rotation );
+ *
+ * @for Actor
+ * @method rotateBy
+ * @param {object} dali rotation object
+ */
+void ActorApi::RotateBy( const v8::FunctionCallbackInfo<v8::Value>& args )
+{
+  v8::Isolate* isolate = args.GetIsolate();
+  v8::HandleScope handleScope( isolate );
+  Actor actor = GetActor( isolate, args );
+
+  bool found( false );
+  Property::Value rotation = V8Utils::GetPropertyValueParameter( PARAMETER_0, found, isolate, args );
+
+  if( rotation.GetType() != Property::ROTATION )
+  {
+    DALI_SCRIPT_EXCEPTION( isolate, "Rotation parameter missing" );
+    return;
+  }
+  // the rotation parameter has to be either a AngleAxis or a Quaternion
+  // both will work when calling Get( Quaternion);
+
+  Quaternion quaternionValue;
+  rotation.Get( quaternionValue );
+
+  actor.RotateBy( quaternionValue );
+}
+
+/**
+ * Apply a relative scale to an actor.
+ * @example
+ *    // Double actor width and height ( keep depth the same )
+ *    // using an array
+ *    actor.scaleBy( [2,2,1] );
+ *
+ *
+ * @for Actor
+ * @method scaleBy
+ * @param {object} JavaScript array
+ */
+void ActorApi::ScaleBy( const v8::FunctionCallbackInfo<v8::Value>& args )
+{
+  v8::Isolate* isolate = args.GetIsolate();
+  v8::HandleScope handleScope( isolate );
+  Actor actor = GetActor( isolate, args );
+
+  Vector3 vector;
+  int argCount( args.Length() );
+  if( argCount == 1 )
+  {
+    bool found(false);
+    vector = V8Utils::GetVector3Parameter( PARAMETER_0, found, isolate, args );
+    if( !found )
+    {
+      DALI_SCRIPT_EXCEPTION( isolate, "Vector3 move parameter missing" );
+      return;
+    }
+  }
+  else
+  {
+    DALI_SCRIPT_EXCEPTION( isolate, "Vector3 parameter missing" );
+    return;
+  }
+  actor.ScaleBy( vector );
+}
+/**
+ * Apply a relative scale to an actor.
+ * Actor opacity ranges from 0 (see through ) to 1 ( solid )
+ * @example
+ *    // reduce actor opactiy by a half
+ *    actor.opaictyBy(-0.5);
+ *
+ * @for Actor
+ * @method OpacityBy
+ * @param {float} relative opacity
+ */
+void ActorApi::OpacityBy( const v8::FunctionCallbackInfo<v8::Value>& args )
+{
+  v8::Isolate* isolate = args.GetIsolate();
+  v8::HandleScope handleScope( isolate );
+  Actor actor = GetActor( isolate, args );
+
+  // void OpacityBy(float relativeOpacity);
+  bool found;
+  float opacity = V8Utils::GetFloatParameter( PARAMETER_0, found, isolate, args, 0.f );
+  if( !found )
+  {
+    DALI_SCRIPT_EXCEPTION( isolate, "float parameter missing" );
+    return;
+  }
+  actor.OpacityBy( opacity );
+}
+
+/**
+ * Apply a relative color change to an actor.
+ *
+ * @example
+ *    // increase actor red by half
+ *    actor.colorBy( [0.5, 0, 0, 0]);
+ *
+ *
+ * @for Actor
+ * @method colorBy
+ * @param {Object} Color JavaScript array
+ */
+void ActorApi::ColorBy( const v8::FunctionCallbackInfo<v8::Value>& args )
+{
+  v8::Isolate* isolate = args.GetIsolate();
+  v8::HandleScope handleScope( isolate );
+  Actor actor = GetActor( isolate, args );
+
+  bool found;
+  int argCount( args.Length() );
+  Vector4 color;
+
+  if( argCount == 1 )
+  {
+    color = V8Utils::GetVector4Parameter( PARAMETER_0, found, isolate, args );
+    if( !found )
+    {
+      DALI_SCRIPT_EXCEPTION( isolate, "Vector4 parameter missing" );
+      return;
+    }
+  }
+  else
+  {
+    DALI_SCRIPT_EXCEPTION( isolate, "Vector4 parameter missing" );
+    return;
+  }
+
+  actor.ColorBy( color );
+}
+
+
+} // namespace V8Plugin
+
+} // namespace Dali
diff --git a/plugins/dali-script-v8/src/actors/actor-api.h b/plugins/dali-script-v8/src/actors/actor-api.h
new file mode 100644 (file)
index 0000000..38bc95a
--- /dev/null
@@ -0,0 +1,85 @@
+#ifndef __DALI_V8PLUGIN_ACTOR_API_H__
+#define __DALI_V8PLUGIN_ACTOR_API_H__
+
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// EXTERNAL INCLUDES
+#include <v8.h>
+#include <dali/public-api/actors/actor.h>
+
+namespace Dali
+{
+
+namespace V8Plugin
+{
+
+namespace TextViewApi
+{
+  /**
+   * Temporary TextView constructor
+   */
+  Actor New( const v8::FunctionCallbackInfo< v8::Value >& args );
+}
+
+namespace ActorApi
+{
+
+  /**
+   * constructor
+   */
+  Actor New( const v8::FunctionCallbackInfo< v8::Value >& args );
+
+  /**
+   * Actor API. See actor.h for description of functions
+   */
+  void IsRoot( const v8::FunctionCallbackInfo< v8::Value >& args );
+  void GetId( const v8::FunctionCallbackInfo< v8::Value >& args);
+  void OnStage( const v8::FunctionCallbackInfo< v8::Value >& args );
+  void IsLayer( const v8::FunctionCallbackInfo< v8::Value >& args );
+  void GetLayer( const v8::FunctionCallbackInfo< v8::Value >& args);
+  void AddActor( const v8::FunctionCallbackInfo< v8::Value >& args);
+  void RemoveActor( const v8::FunctionCallbackInfo< v8::Value >& args);
+  void IsEqualTo( const v8::FunctionCallbackInfo<v8::Value>& args );
+  void Unparent( const v8::FunctionCallbackInfo< v8::Value >& args);
+  void GetChildAt( const v8::FunctionCallbackInfo< v8::Value >& args);
+  void FindChildByName( const v8::FunctionCallbackInfo< v8::Value >& args);
+  void FindChildByAlias( const v8::FunctionCallbackInfo< v8::Value >& args);
+  void FindChildById( const v8::FunctionCallbackInfo< v8::Value >& args);
+  void GetParent( const v8::FunctionCallbackInfo< v8::Value >& args );
+  void GetChildCount( const v8::FunctionCallbackInfo< v8::Value >& args );
+  void ScreenToLocal( const v8::FunctionCallbackInfo< v8::Value >& args );
+  void SetKeyboardFocusable( const v8::FunctionCallbackInfo< v8::Value >& args );
+  void IsKeyboardFocusable( const v8::FunctionCallbackInfo< v8::Value >& args );
+  void MoveBy( const v8::FunctionCallbackInfo< v8::Value >& args );
+  void RotateBy( const v8::FunctionCallbackInfo< v8::Value >& args );
+  void ScaleBy( const v8::FunctionCallbackInfo< v8::Value >& args );
+  void OpacityBy( const v8::FunctionCallbackInfo< v8::Value >& args );
+  void ColorBy( const v8::FunctionCallbackInfo< v8::Value >& args );
+
+  // new function just for JavaScript API, to help developers know what type of actor
+  // they're dealing with, returns actor name as a string
+  void GetActorType( const v8::FunctionCallbackInfo< v8::Value >& args );
+
+
+}; // namespace ActorApi
+
+} // namespace V8Plugin
+
+} // namespace Dali
+
+#endif // header __DALI_V8PLUGIN_ACTOR_API_H__
diff --git a/plugins/dali-script-v8/src/actors/actor-wrapper.cpp b/plugins/dali-script-v8/src/actors/actor-wrapper.cpp
new file mode 100644 (file)
index 0000000..9ed0edb
--- /dev/null
@@ -0,0 +1,528 @@
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// CLASS HEADER
+#include "actor-wrapper.h"
+
+// EXTERNAL INCLUDES
+#include <dali/public-api/object/type-registry.h>
+
+// INTERNAL INCLUDES
+#include <actors/layer-api.h>
+#include <actors/actor-api.h>
+#include <actors/image-actor-api.h>
+#include <actors/text-actor-api.h>
+#include <actors/mesh-actor-api.h>
+#include <actors/camera-actor-api.h>
+#include <actors/renderable-actor-api.h>
+#include <v8-utils.h>
+#include <dali-wrapper.h>
+
+namespace Dali
+{
+
+namespace V8Plugin
+{
+
+v8::Persistent<v8::ObjectTemplate> ActorWrapper::mActorTemplate;
+v8::Persistent<v8::ObjectTemplate> ActorWrapper::mImageActorTemplate;
+v8::Persistent<v8::ObjectTemplate> ActorWrapper::mTextActorTemplate;
+v8::Persistent<v8::ObjectTemplate> ActorWrapper::mMeshActorTemplate;
+v8::Persistent<v8::ObjectTemplate> ActorWrapper::mCameraActorTemplate;
+v8::Persistent<v8::ObjectTemplate> ActorWrapper::mLayerActorTemplate;
+v8::Persistent<v8::ObjectTemplate> ActorWrapper::mTextViewTemplate;
+
+namespace
+{
+
+
+/**
+ * pointer to a persistent template handle
+ */
+struct ActorTemplate
+{
+  v8::Persistent<v8::ObjectTemplate>* actorTemplate;
+};
+
+/**
+ * array of templates for each type of actor
+ */
+const ActorTemplate ActorTemplateLookup[]=
+{
+    { &ActorWrapper::mActorTemplate },        // ACTOR
+    { &ActorWrapper::mImageActorTemplate },   // IMAGE_ACTOR
+    { &ActorWrapper::mTextActorTemplate  },   // TEXT_ACTOR
+    { &ActorWrapper::mMeshActorTemplate  },   // MESH_ACTOR
+    { &ActorWrapper::mLayerActorTemplate },   // LAYER_ACTOR
+    { &ActorWrapper::mCameraActorTemplate},   // CAMERA_ACTOR
+    { &ActorWrapper::mTextViewTemplate }
+};
+
+/**
+ * Bitmask of API's that an actor can support
+ */
+enum ActorApiBitMask
+{
+  ACTOR_API              = 1 << 0,
+  RENDERABLE_ACTOR_API   = 1 << 1,
+  IMAGE_ACTOR_API        = 1 << 2,
+  TEXT_ACTOR_API         = 1 << 3,
+  MESH_ACTOR_API         = 1 << 4,
+  LAYER_API              = 1 << 5,
+  CAMERA_ACTOR_API       = 1 << 6,
+};
+
+/**
+ * structure used for the ActorApiLookup.
+ */
+struct ActorApiStruct
+{
+  const char* actorName;
+  ActorWrapper::ActorType actorType;
+  Actor (*constructor)( const v8::FunctionCallbackInfo< v8::Value >& args);
+  int supportApis;
+};
+
+/**
+ * Lookup table to match a actor type with a constructor and supported API's.
+ */
+const ActorApiStruct ActorApiLookup[]=
+{
+  {"Actor",      ActorWrapper::ACTOR,        ActorApi::New,       ACTOR_API },
+  {"ImageActor", ActorWrapper::IMAGE_ACTOR,  ImageActorApi::New,  ACTOR_API | RENDERABLE_ACTOR_API | IMAGE_ACTOR_API   },
+  {"TextActor",  ActorWrapper::TEXT_ACTOR,   TextActorApi::New,   ACTOR_API | RENDERABLE_ACTOR_API | TEXT_ACTOR_API    },
+  {"MeshActor",  ActorWrapper::MESH_ACTOR,   MeshActorApi::New,   ACTOR_API | RENDERABLE_ACTOR_API | MESH_ACTOR_API    },
+  {"Layer",      ActorWrapper::LAYER_ACTOR,  LayerApi::New,       ACTOR_API | LAYER_API                                },
+  {"CameraActor",ActorWrapper::CAMERA_ACTOR, CameraActorApi::New, ACTOR_API | CAMERA_ACTOR_API                         },
+  {"TextView",   ActorWrapper::TEXT_VIEW,    TextViewApi::New,    ACTOR_API },
+
+};
+
+const unsigned int ActorApiLookupCount = sizeof(ActorApiLookup)/sizeof(ActorApiLookup[0]);
+
+
+
+/**
+ * Creates an actor given a type name
+ * Uses the type registry to create an actor of the correct type
+ */
+Actor CreateActor( const v8::FunctionCallbackInfo< v8::Value >& args,
+                        const std::string& typeName )
+{
+  Actor actor;
+
+  ActorWrapper::ActorType actorType = ActorWrapper::GetActorType( typeName );
+
+  // if we don't currently support the actor type, then use type registry to create it
+  if( actorType == ActorWrapper::UNKNOWN_ACTOR )
+  {
+    Dali::TypeInfo typeInfo = Dali::TypeRegistry::Get().GetTypeInfo( typeName );
+    if( typeInfo ) // handle, check if it has a value
+    {
+      Dali::BaseHandle handle = typeInfo.CreateInstance();
+      if( handle )
+      {
+        actor = Actor::DownCast( handle );
+      }
+    }
+    else
+    {
+      DALI_SCRIPT_EXCEPTION(args.GetIsolate(),"Unknown actor type");
+      return Actor();
+    }
+  }
+  else
+  {
+    // run the constructor for this type of actor so it can pull out
+    // custom parameters, e.g. new TextActor("hello world"); or ImageActor( MyImage );
+    actor = (ActorApiLookup[actorType].constructor)( args );
+  }
+  return actor;
+}
+
+
+
+/**
+ * given an actor type return what api's it supports
+ */
+int GetActorSupportedApis( ActorWrapper::ActorType type )
+{
+  return ActorApiLookup[ type].supportApis;
+}
+
+/**
+ * Used for the ActorFunctionTable to map function names to functions
+ * with for a specific API
+ */
+struct ActorFunctions
+{
+  const char* name;               ///< function name
+  void (*function)( const v8::FunctionCallbackInfo< v8::Value >& args);
+  ActorApiBitMask api;
+};
+
+/**
+ * Contains a list of all functions that can be called an
+ * actor / image-actor / mesh-actor/ layer / camera-actor
+ */
+const ActorFunctions ActorFunctionTable[]=
+{
+    /**************************************
+    * Actor API (in order of actor.h)
+    * Any properties that have accessor functions are ignored to avoid duplication
+    **************************************/
+    // ignore. GetName()  use Actor.name
+    // ignore. SetName()  use Actor.name
+    { "GetId",             ActorApi::GetId,            ACTOR_API },
+    { "IsRoot",            ActorApi::IsRoot,           ACTOR_API },
+    { "OnStage",           ActorApi::OnStage,          ACTOR_API },
+    { "IsLayer",           ActorApi::IsLayer,          ACTOR_API },
+    { "GetLayer",          ActorApi::GetLayer,         ACTOR_API },
+    { "Add",               ActorApi::AddActor,         ACTOR_API },
+    { "Remove",            ActorApi::RemoveActor,      ACTOR_API },
+    { "IsEqualTo" ,        ActorApi::IsEqualTo,        ACTOR_API },
+    { "Unparent",          ActorApi::Unparent,         ACTOR_API },
+    { "GetChildCount",     ActorApi::GetChildCount,    ACTOR_API },
+    { "GetChildAt"   ,     ActorApi::GetChildAt,       ACTOR_API },
+    { "FindChildByName",   ActorApi::FindChildByName,  ACTOR_API },
+    { "FindChildByAlias",  ActorApi::FindChildByAlias, ACTOR_API },
+    { "FindChildById",     ActorApi::FindChildById,    ACTOR_API },
+    { "GetParent" ,        ActorApi::GetParent,        ACTOR_API },
+    { "GetActorType" ,     ActorApi::GetActorType,     ACTOR_API }, // custom for javascript
+
+    // ignore. SetParentOrigin() use Actor.parentOrigin
+    // ignore. GetCurrentParentOrigin()  use Actor.parentOrigin
+    // ignore. SetAnchorPoint()  use Actor.anchorPoint
+    // ignore. GetCurrentAnchorPoint()  use Actor.anchorPoint
+    // ignore. SetSize() use Actor.size
+    // ignore. GetCurrentSize() use Actor.size
+    // ignore. SetPosition(....) use Actor.position
+    // ignore. SetX, SetY, SetZ,  use Actor.position.x, Actor.position.y, Actor.position.z
+    { "MoveBy",         ActorApi::MoveBy,              ACTOR_API },
+    // ignore GetCurrentPosition(). use Actor.position
+    // ignore GetCurrentWorldPosition() use Actor.worldPosition
+    // ignore SetPositionInheritanceMode() use Actor.positionInheritance
+    // ignore GetPositionInheritanceMode()  use Actor.positionInheritance
+    // ignore SetRotation() use Actor.rotation
+    { "RotateBy",         ActorApi::RotateBy,          ACTOR_API },
+    // ignore GetCurrentRotation() use Actor.rotation
+    // ignore SetInheritRotation() use Actor.inheritRotation
+    // ignore IsRotationInherited() use Actor.inheritRotation
+    // ignore GetCurrentWorldRotation() use Actor.worldRotation
+    // ignore SetScale() use Actor.scale
+    { "ScaleBy",         ActorApi::ScaleBy,            ACTOR_API },
+    // ignore GetCurrentScale() use Actor.scale
+    // ignore GetCurrentWorldScale() use Actor.worldScale
+    // ignore SetInheritScale() use Actor.inheritScale
+    // ignore IsScaleInherited() use Actor.inheritScale
+    // ignore GetCurrentWorldMatrix() use Actor.worldMatrix
+    // ignore SetVisible() use Actor.visible
+    // ignore IsVisible() use Actor.visible
+    // ignore SetOpacity() use Actor.opacity
+    { "OpactiyBy",         ActorApi::OpacityBy,        ACTOR_API },
+    // ignore GetCurrentOpacity() use Actor.opacity
+    // ignore SetColor() use Actor.color
+    { "ColorBy",         ActorApi::ColorBy,            ACTOR_API },
+    // ignore GetCurrentColor() use Actor.color
+    // ignore SetColorMode() use Actor.colorMode
+    // ignore GetColorMode() use Actor.colorMode
+    // ignore GetCurrentWorldColor() use Actor.worldColor
+    // ignore SetInheritShaderEffect() use Actor.inheritShaderEffect
+    // ignore GetInheritShaderEffect() use Actor.inheritShaderEffect
+    // ignore SetDrawMode() use Actor.drawMode
+    // ignore GetDrawMode() use Actor.drawMode
+    // ignore SetSensitive() use Actor.sensitve
+    // ignore IsSensitive() use Actor.sensitive
+    { "ScreenToLocal"       , ActorApi::ScreenToLocal,         ACTOR_API},
+    // ignore SetLeaveRequired() use Actor.leaveRequired
+    // ignore GetLeaveRequired() use Actor.leaveRequired
+    { "SetKeyboardFocusable", ActorApi::SetKeyboardFocusable,  ACTOR_API }, //-- should this be a property???
+    { "IsKeyboardFocusable" , ActorApi::IsKeyboardFocusable,   ACTOR_API }, //-- should this be a property???
+
+    /**************************************
+     * Renderable Actor API (in order of renderable-actor.h)
+     **************************************/
+    { "SetSortModifier",    RenderableActorApi::SetSortModifier,   RENDERABLE_ACTOR_API  },
+    { "GetSortModifier",    RenderableActorApi::GetSortModifier,   RENDERABLE_ACTOR_API  },
+    { "SetCullFace",        RenderableActorApi::SetCullFace,       RENDERABLE_ACTOR_API  },
+    { "GetCullFace",        RenderableActorApi::GetCullFace,       RENDERABLE_ACTOR_API  },
+    { "SetBlendMode",       RenderableActorApi::SetBlendMode,      RENDERABLE_ACTOR_API  },
+    { "GetBlendMode",       RenderableActorApi::GetBlendMode,      RENDERABLE_ACTOR_API  },
+    { "SetBlendFunc",       RenderableActorApi::SetBlendFunc,      RENDERABLE_ACTOR_API  },
+    { "GetBlendFunc",       RenderableActorApi::GetBlendFunc,      RENDERABLE_ACTOR_API  },
+    { "SetBlendEquation",   RenderableActorApi::SetBlendEquation,  RENDERABLE_ACTOR_API  },
+    { "GetBlendEquation",   RenderableActorApi::GetBlendEquation,  RENDERABLE_ACTOR_API  },
+    { "SetBlendColor",      RenderableActorApi::SetBlendColor,     RENDERABLE_ACTOR_API  },
+    { "GetBlendColor",      RenderableActorApi::GetBlendColor,     RENDERABLE_ACTOR_API  },
+    { "SetShaderEffect",    RenderableActorApi::SetShaderEffect,   RENDERABLE_ACTOR_API  },
+    { "GetShaderEffect",    RenderableActorApi::GetShaderEffect,   RENDERABLE_ACTOR_API  },
+    { "RemoveShaderEffect", RenderableActorApi::RemoveShaderEffect,RENDERABLE_ACTOR_API  },
+
+
+
+
+    /**************************************
+     * Layer  API (in order of layer.h)
+     **************************************/
+    { "GetDepth",           LayerApi::GetDepth,                 LAYER_API  },
+    { "Raise",              LayerApi::Raise,                    LAYER_API  },
+    { "Lower",              LayerApi::Lower,                    LAYER_API  },
+    { "RaiseAbove",         LayerApi::RaiseAbove,               LAYER_API  },
+    { "RaiseBelow",         LayerApi::LowerBelow,               LAYER_API  },
+    { "RaiseToTop",         LayerApi::RaiseToTop,               LAYER_API  },
+    { "LowerToBottom",      LayerApi::ToBottom,                 LAYER_API  },
+    { "MoveAbove",          LayerApi::MoveAbove,                LAYER_API  },
+    { "MoveBelow",          LayerApi::MoveBelow,                LAYER_API  },
+    // ignore SetClipping, use layer.clippingEnable
+    // ignore IsClipping, use layer.clippingEnable
+    // ignore SetClippingBox, use layer.clippingBox
+    { "SetDepthTestDisabled", LayerApi::SetDepthTestDisabled,   LAYER_API },
+    { "IsDepthTestDisabled",  LayerApi::IsDepthTestDisabled,    LAYER_API },
+    // @todo SetSortFunction
+
+    /**************************************
+     * Image Actor API (in order of image-actor.h)
+     **************************************/
+
+    { "SetImage",           ImageActorApi::SetImage,              IMAGE_ACTOR_API },
+    { "GetImage",           ImageActorApi::GetImage,              IMAGE_ACTOR_API },
+    { "SetToNaturalSize",   ImageActorApi::SetToNaturalSize,      IMAGE_ACTOR_API },
+    // ignore SetPixelArea, use imageActor.pixelArea
+    // ignore GetPixelArea, use imageActor.pixelArea
+    { "IsPixelAreaSet",     ImageActorApi::IsPixelAreaSet,        IMAGE_ACTOR_API },
+    { "ClearPixelArea",     ImageActorApi::ClearPixelArea,        IMAGE_ACTOR_API },
+    // ignore SetStyle, use imageActor.style
+    // ignore GetStyle, use imageActor.style
+    // ignore SetNinePatchBorder use imageActor.border
+    // ignore GetNinePatchBorder use imageActor.border
+    // ignore SetFadeIn use imageActor.fadeIn
+    // ignore GetFadeIn use imageActor.fadeIn
+    // ignore SetFadeInDuration use imageActor.fadeInDuration
+    // ignore GetFadeInDuration use imageActor.fadeInDuration
+    //{ "GetCurrentImageSize", ImageActorApi::GetCurrentImageSize,  IMAGE_ACTOR_API },
+
+
+    /**************************************
+     * Text Actor API (in order of text-actor.h)
+     **************************************/
+    //ignore SetText use textActor.text
+    { "SetToNaturalSize",   TextActorApi::SetToNaturalSize,      TEXT_ACTOR_API },
+    // ignore GetFont use textActor.font
+    // ignore SetFont use textActor.font
+    // ignore SetGradient use textActor.gradientColor
+    // ignore GetGradient textActor.gradientColor
+    // ignore SetGradientStartPoint use textActor.gradientStartPoint
+    // ignore GetGradientStartPoint textActor.gradientStartPoint
+    // ignore SetGradientEndPoint use textActor.gradientEndPoint
+    // ignore GetGradientEndPoint textActor.gradientEndPoint
+    // @todo? SetTextStyle ( can use individual properties as a work around )
+    // @todo? GetTextStyle ( can use individual properties as a work around )
+    // ignore SetTextColor use textActor.textColor
+    // ignore GetTextColor use textActor.textColor
+    // ignore SetSmoothEdge use textActor.smoothEdge
+    // ignore SetOutline use textActor.outLineEnable, outlineColor, thicknessWidth
+    // ignore SetGlow use textActor.glowEnable, glowColor, glowIntensity
+    // ignore SetShadow use textActor.shadowEnable, shadowColor, shadowOffset, shadowSize
+    // ignore SetItalics use textActor.italicsAngle ?
+    // ignore GetItalics  @todo add italics flag? or just stick with angle
+    // ignore GetItalicsAngle  use textActor.italicsAngle
+    // ignore SetUnderline use textActor.underline
+    // ignore GetUnderline use textActor.underline
+    // ignore SetWeight use textActor.weight
+    // ignore GetWeight use textActor.weight
+    // ignore SetFontDetectionAutomatic use textActor.fontDetectionAutomatic
+    // ignore IsFontDetectionAutomatic use textActor.fontDetectionAutomatic
+    // ignore GetLoadingState text is loaded synchronously
+    // ignore TextAvailableSignal text is loaded synchronously
+
+    /**************************************
+     * Mesh Actor API (in order of mesh-actor.h)
+     **************************************/
+    // @todo a version of MeshActor::New( mesh )
+    // @todo a version of MeshActor::New( AnimatableMesh )
+    // @todo SetMaterial
+    // @todo GetMaterial
+    // SetAffectedByLighting  should be a property really
+    { "SetAffectedByLighting", MeshActorApi::SetAffectedByLighting, MESH_ACTOR_API },
+    { "IsAffectedByLighting",  MeshActorApi::IsAffectedByLighting,  MESH_ACTOR_API },
+    // @todo BindBonesToMesh
+
+    /**************************************
+     * Camera Actor API (in order of camera.h)
+     **************************************/
+    // ignore SetType use camera.type
+    // ignore GetType use camera.type
+    // ignore SetProjectionMode use camera.projectionMode
+    // ignore GetProjectionMode use camera.projectionMode
+    // ignore SetFieldOfView use camera.fieldOfView
+    // ignore GetFieldOfView use camera.fieldOfView
+    // ignore SetAspectRatio use camera.aspectRatio
+    // ignore GetAspectRatio use camera.aspectRatio
+    // ignore SetNearClippingPlane use camera.nearPlaneDistance
+    // ignore GetNearClippingPlane use camera.nearPlaneDistance
+    // ignore SetFarClippingPlane use camera.farPlaneDistance
+    // ignore GetFarClippingPlane use camera.farPlaneDistance
+    // ignore GetTargetPosition use camera.targetPosition
+    // ignore SetInvertYAxis use camera.invertYAxis
+    // ignore GetInvertYAxis use camera.invertYAxis
+    { "SetPerspectiveProjection",   CameraActorApi::SetPerspectiveProjection,   CAMERA_ACTOR_API },
+    { "SetOrthographicProjection",  CameraActorApi::SetOrthographicProjection,  CAMERA_ACTOR_API },
+
+};
+
+const unsigned int ActorFunctionTableCount = sizeof(ActorFunctionTable)/sizeof(ActorFunctionTable[0]);
+} //un-named space
+
+
+ActorWrapper::ActorWrapper( Actor actor,
+              GarbageCollectorInterface& gc )
+: HandleWrapper( BaseWrappedObject::ACTOR , actor, gc ),
+  mActor( actor )
+
+{
+}
+
+v8::Handle<v8::Object> ActorWrapper::WrapActor(v8::Isolate* isolate, Actor actor )
+{
+  v8::EscapableHandleScope handleScope( isolate );
+  v8::Local<v8::Object> object = WrapActor( isolate, actor, GetActorType( actor.GetTypeName() ) );
+
+  return handleScope.Escape( object );
+}
+
+Actor ActorWrapper::GetActor()
+{
+  return mActor;
+}
+
+v8::Handle<v8::Object> ActorWrapper::WrapActor( v8::Isolate* isolate, Actor actor, ActorType actorType )
+{
+  v8::EscapableHandleScope handleScope( isolate );
+  v8::Local<v8::ObjectTemplate> objectTemplate;
+
+  objectTemplate = GetActorTemplate( isolate, actorType );
+
+  // create an instance of the template
+  v8::Local<v8::Object> localObject = objectTemplate->NewInstance();
+
+  // create teh actor object
+  ActorWrapper* pointer = new ActorWrapper( actor, Dali::V8Plugin::DaliWrapper::Get().GetDaliGarbageCollector() );
+
+  // assign the JavaScript object to the wrapper.
+  // This also stores Dali object, in an internal field inside the JavaScript object.
+  pointer->SetJavascriptObject( isolate, localObject );
+
+  return handleScope.Escape( localObject );
+}
+
+v8::Local<v8::ObjectTemplate> ActorWrapper::GetActorTemplate( v8::Isolate* isolate, ActorWrapper::ActorType type )
+{
+  v8::EscapableHandleScope handleScope( isolate );
+  v8::Local<v8::ObjectTemplate> objectTemplate;
+
+  if( ActorTemplateLookup[type].actorTemplate->IsEmpty() )
+  {
+    objectTemplate = MakeDaliActorTemplate( isolate, type );
+    ActorTemplateLookup[type].actorTemplate->Reset( isolate, objectTemplate );
+  }
+  else
+  {
+    // get the object template
+    objectTemplate = v8::Local<v8::ObjectTemplate>::New( isolate, *ActorTemplateLookup[type].actorTemplate );
+  }
+
+  return handleScope.Escape( objectTemplate );
+}
+
+v8::Handle<v8::ObjectTemplate> ActorWrapper::MakeDaliActorTemplate( v8::Isolate* isolate, ActorType actorType )
+{
+  v8::EscapableHandleScope handleScope( isolate );
+
+  v8::Local<v8::ObjectTemplate> objTemplate = v8::ObjectTemplate::New();
+
+  objTemplate->SetInternalFieldCount( BaseWrappedObject::FIELD_COUNT );
+
+  // find out what API's this actor supports
+  int supportApis = GetActorSupportedApis( actorType );
+
+  // add our function properties
+  for( unsigned int i = 0; i < ActorFunctionTableCount; ++i )
+  {
+    const ActorFunctions property =  ActorFunctionTable[i];
+
+    // check to see if the actor supports a certain type of API
+    // e.g. ImageActor will support ACTOR_API, RENDERABLE_API and IMAGE_ACTOR_API
+    if( supportApis &  property.api )
+    {
+      std::string funcName = V8Utils::GetJavaScriptFunctionName( property.name);
+
+      objTemplate->Set( v8::String::NewFromUtf8(   isolate, funcName.c_str() ),
+                      v8::FunctionTemplate::New( isolate, property.function ) );
+    }
+  }
+
+  // property handle intercepts property getters and setters and signals
+  HandleWrapper::AddInterceptsToTemplate( isolate, objTemplate );
+
+
+  return handleScope.Escape( objTemplate );
+}
+
+void ActorWrapper::NewActor( const v8::FunctionCallbackInfo< v8::Value >& args)
+{
+  v8::Isolate* isolate = args.GetIsolate();
+  v8::HandleScope handleScope( isolate );
+
+  if( !args.IsConstructCall() )
+  {
+    DALI_SCRIPT_EXCEPTION( isolate, "constructor called without 'new" );
+    return;
+  }
+
+  // find out the callee function name...e.g. TextActor, ImageActor, MeshActor
+  v8::Local<v8::Function> callee = args.Callee();
+  v8::Local<v8::Value> v8String = callee->GetName();
+  std::string typeName = V8Utils::v8StringToStdString( v8String );
+
+  // create a new actor based on type, using the type registry.
+  Actor actor = CreateActor( args, typeName );
+
+  v8::Local<v8::Object> localObject = WrapActor( isolate, actor );
+
+  args.GetReturnValue().Set( localObject );
+}
+
+/**
+ * given an actor type name, e.g. ImageActor returns the type, e.g. ActorWrapper::IMAGE_ACTOR
+ */
+ActorWrapper::ActorType ActorWrapper::GetActorType( const std::string& name )
+{
+  for( unsigned int i = 0 ; i < ActorApiLookupCount ; i++ )
+  {
+    if( ActorApiLookup[i].actorName == name )
+    {
+      return ActorApiLookup[i].actorType;
+    }
+  }
+  return ActorWrapper::UNKNOWN_ACTOR;
+}
+
+
+
+} // namespace V8Plugin
+
+} // namespace Dali
diff --git a/plugins/dali-script-v8/src/actors/actor-wrapper.h b/plugins/dali-script-v8/src/actors/actor-wrapper.h
new file mode 100644 (file)
index 0000000..79381ba
--- /dev/null
@@ -0,0 +1,131 @@
+#ifndef __DALI_V8PLUGIN_ACTOR_WRAPPER_H__
+#define __DALI_V8PLUGIN_ACTOR_WRAPPER_H__
+
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// EXTERNAL INCLUDES
+#include <v8.h>
+#include <dali/public-api/actors/actor.h>
+
+// INTERNAL INCLUDES
+#include <object/handle-wrapper.h>
+
+namespace Dali
+{
+
+namespace V8Plugin
+{
+
+
+/**
+ * Wraps a Dali Actor.
+ */
+class ActorWrapper : public HandleWrapper
+{
+
+public:
+
+  /**
+   * Actor type use