From: Paul Wisbey
Date: Fri, 20 Mar 2015 17:04:31 +0000 (+0000)
Subject: Merge remote-tracking branch 'origin/tizen' into new_text
X-Git-Tag: dali_1.0.38~11^2~39
X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=3e17d9f63dedb5d669409301f8d9a3d8c393f979;hp=428bd47c26043ccaabab1a64cbc7cbd7ce3c7427
Merge remote-tracking branch 'origin/tizen' into new_text
Conflicts:
build/tizen/configure.ac
Change-Id: Id18adef88fdd0edca9ccb6a1225ab4def1bedf32
---
diff --git a/build/tizen/configure.ac b/build/tizen/configure.ac
index 7a90b2a..006e192 100644
--- a/build/tizen/configure.ac
+++ b/build/tizen/configure.ac
@@ -45,25 +45,29 @@ AC_ARG_ENABLE([debug],
[enable_debug=$enableval],
[enable_debug=no])
-# option for JavaScript plugin
-AC_ARG_ENABLE(javascript,
+# option to build JavaScript plugin
+# configure settings and output
+# --enable-javascript // enable_javascript = yes
+# --enable-javascript=yes // enable_javascript = yes
+# --enable-javascript=no // enable_javascript = no
+# --disable-javascript // enable_javascript = no
+# no setting // enable_javascript = automatic ( enable if v8 present)
+AC_ARG_ENABLE([javascript],
[AC_HELP_STRING([--enable-javascript],
- [Enable JavaScript plugin])] ,
- [enable_javascript=yes],
- [enable_javascript=no])
+ [Enable JavaScript plugin])] ,
+ [enable_javascript=$enableval],
+ [enable_javascript=automatic])
+
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
@@ -89,11 +93,37 @@ DALI_TOOLKIT_CFLAGS="$DALI_TOOLKIT_CFLAGS -DDALI_PROFILE_${enable_profile}"
AM_CONDITIONAL([COMMON_PROFILE], [test x$enable_profile = xCOMMON])
AM_CONDITIONAL([MOBILE_PROFILE], [test x$enable_profile = xMOBILE])
+# v8 version 4+ requires c++11
+PKG_CHECK_MODULES(V8, v8 = 3.32.7, [ pkg_check_v8=yes ], [ pkg_check_v8=no ] )
+
+# Rules for building JavaScript plugin
+# If enable_javascript=yes and v8 installed = build javascript
+# If enable_javascript=automatic and v8 installed = build javascript
+# If enable_javascript=yes and v8 not installed = throw an error
+build_javascript_plugin=no
+if test x$enable_javascript = xyes; then
+ if test x$pkg_check_v8 = xno; then
+ [build_javascript_plugin=no]
+ AC_MSG_ERROR("V8 not found or incorrect version installed")
+ AC_MSG_NOTICE("To disable building of JavaScript plugin use --disable-javascript")
+ else
+ [build_javascript_plugin=yes]
+ AC_MSG_NOTICE(V8 library found. Building DALi JavaScript plugin)
+ fi
+fi
+if test x$enable_javascript = xautomatic && test x$pkg_check_v8 = xyes; then
+ [build_javascript_plugin=yes]
+ AC_MSG_NOTICE( V8 library found. Automatic building of JavaScript plugin. Use use --disable-javascript to disable)
+fi
+
+
+#set a variable for the makefile to force compile the JAvaSplugin
+AM_CONDITIONAL([ENABLE_JAVASCRIPT_PLUGIN], [test x$build_javascript_plugin = xyes])
+
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
@@ -122,7 +152,7 @@ Configuration
-------------
Prefix: $prefix
Debug Build: $enable_debug
- JavaScript support (V8 required) $enable_javascript
+ JavaScript support (V8 required) $build_javascript_plugin
Profile: $dali_profile
Data Dir (Read/Write): $dataReadWriteDir
Data Dir (Read Only): $dataReadOnlyDir
diff --git a/build/tizen/plugins/Makefile.am b/build/tizen/plugins/Makefile.am
index d80dd67..1ca51e4 100644
--- a/build/tizen/plugins/Makefile.am
+++ b/build/tizen/plugins/Makefile.am
@@ -20,7 +20,6 @@ plugin_src_dir = ../../../plugins
include ../../../plugins/dali-script-v8/file.list
-DALI_SCRIPTV8_LIBS="-lv8 -lpthread"
lib_LTLIBRARIES = libdali-script-plugin-v8.la
@@ -46,16 +45,16 @@ libdali_script_plugin_v8_la_CXXFLAGS = -DDALI_COMPILATION \
-DDALI_DATA_READ_ONLY_DIR="\"${dataReadOnlyDir}\"" \
$(DALI_CFLAGS) \
$(DLOG_CFLAGS) \
- $(DALI_SCRIPTV8_CFLAGS) \
-I../../.. \
$(script_plugin_v8_includes) \
+ $(V8_CFLAGS) \
-Werror -Wall
libdali_script_plugin_v8_la_LIBADD = \
$(DALICORE_LIBS) \
$(DALI_LIBS) \
$(DLOG_LIBS) \
- $(DALI_SCRIPTV8_LIBS)
+ $(V8_LIBS)
libdali_script_plugin_v8_la_LDFLAGS = \
-rdynamic
diff --git a/dali-toolkit/public-api/dali-toolkit-version.cpp b/dali-toolkit/public-api/dali-toolkit-version.cpp
index 78fc9df..89d0637 100644
--- a/dali-toolkit/public-api/dali-toolkit-version.cpp
+++ b/dali-toolkit/public-api/dali-toolkit-version.cpp
@@ -31,7 +31,7 @@ namespace Toolkit
const unsigned int TOOLKIT_MAJOR_VERSION = 1;
const unsigned int TOOLKIT_MINOR_VERSION = 0;
-const unsigned int TOOLKIT_MICRO_VERSION = 33;
+const unsigned int TOOLKIT_MICRO_VERSION = 34;
const char * const TOOLKIT_BUILD_DATE = __DATE__ " " __TIME__;
#ifdef DEBUG_ENABLED
diff --git a/packaging/dali-toolkit.spec b/packaging/dali-toolkit.spec
index 921e2dc..fb616da 100644
--- a/packaging/dali-toolkit.spec
+++ b/packaging/dali-toolkit.spec
@@ -1,6 +1,6 @@
Name: dali-toolkit
Summary: The OpenGLES Canvas Core Library Toolkit
-Version: 1.0.33
+Version: 1.0.34
Release: 1
Group: System/Libraries
License: Apache-2.0
diff --git a/plugins/dali-script-v8/docs/content/actor.js b/plugins/dali-script-v8/docs/content/actor.js
index 7bd5b20..b2ea595 100644
--- a/plugins/dali-script-v8/docs/content/actor.js
+++ b/plugins/dali-script-v8/docs/content/actor.js
@@ -119,7 +119,7 @@ function OnPressed( actor, touchEvent )
var anim = new dali.Animation( 4 );
var rotation = new dali.Rotation( 90, 0, 0 ); // pitch, yaw, roll
- anim.animateBy( actor, "rotation", rotation );
+ anim.animateBy( actor, "orientation", rotation );
anim.play();
return true;
}
diff --git a/plugins/dali-script-v8/docs/content/animation.js b/plugins/dali-script-v8/docs/content/animation.js
index ec587fe..33c64f8 100644
--- a/plugins/dali-script-v8/docs/content/animation.js
+++ b/plugins/dali-script-v8/docs/content/animation.js
@@ -68,8 +68,8 @@ myActor2.position=[ 100,0,-2000]; // x = 100, y = 0 , z = -2000
function createAnimation() {
var startRotation = new dali.Rotation(180, -180, 0);
- myActor1.rotation = startRotation;
- myActor2.rotation = startRotation;
+ myActor1.orientation = startRotation;
+ myActor2.orientation = startRotation;
dali.stage.add( myActor1 );
dali.stage.add( myActor2 );
@@ -90,7 +90,7 @@ function createAnimation() {
var endRotation = new dali.Rotation(0,0,0);
animOptions.alpha = "easeInOutSine";
- anim.animateTo(myActor1, "rotation", endRotation, animOptions);
+ anim.animateTo(myActor1, "orientation", endRotation, animOptions);
// Delay the myActor2 by a second
animOptions.delay = 0.0;
@@ -99,7 +99,7 @@ function createAnimation() {
// rotate back to correct orientation
animOptions.alpha = "easeInOutSine";
- anim.animateTo(myActor2, "rotation", endRotation, animOptions);
+ anim.animateTo(myActor2, "orientation", endRotation, animOptions);
return anim;
}
@@ -209,7 +209,7 @@ var shaderAnim = createShaderAnimation( shaderEffect, color,zoom, duration, dela
// 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.animateTo(imageActor, "orientation", rotation, { alpha:"linear", duration:duration, delay:delay });
shaderAnim.play();
diff --git a/plugins/dali-script-v8/docs/content/shader-effect.js b/plugins/dali-script-v8/docs/content/shader-effect.js
index eedfafa..a83df51 100644
--- a/plugins/dali-script-v8/docs/content/shader-effect.js
+++ b/plugins/dali-script-v8/docs/content/shader-effect.js
@@ -238,7 +238,7 @@ imageActor.setCullFace( dali.CULL_FACE_DISABLE ); // disable face culling so we
dali.stage.add( imageActor );
// start it of tilted around the y-axis
-imageActor.rotation=new dali.Rotation(90, 0, 1, 0);
+imageActor.orientation=new dali.Rotation(90, 0, 1, 0);
var twistEffect = createTwistEffect();
imageActor.setShaderEffect( twistEffect );
diff --git a/plugins/dali-script-v8/file.list b/plugins/dali-script-v8/file.list
index 13300ef..ef35cf9 100644
--- a/plugins/dali-script-v8/file.list
+++ b/plugins/dali-script-v8/file.list
@@ -12,14 +12,11 @@ script_v8_plugin_src_files = \
$(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 \
diff --git a/plugins/dali-script-v8/src/actors/actor-api.cpp b/plugins/dali-script-v8/src/actors/actor-api.cpp
index 4027a1b..c169b2a 100644
--- a/plugins/dali-script-v8/src/actors/actor-api.cpp
+++ b/plugins/dali-script-v8/src/actors/actor-api.cpp
@@ -19,7 +19,7 @@
#include "actor-api.h"
// EXTERNAL INCLUDES
-#include
+#include
// INTERNAL INCLUDES
#include
@@ -41,11 +41,11 @@ Actor GetActor( v8::Isolate* isolate, const v8::FunctionCallbackInfo&
} //unanmed namespace
-namespace TextViewApi
+namespace TextLabelApi
{
Actor New( const v8::FunctionCallbackInfo< v8::Value >& args )
{
- return Dali::Toolkit::TextView::New();
+ return Dali::Toolkit::TextLabel::New();
}
}
@@ -485,7 +485,7 @@ void ActorApi::IsKeyboardFocusable( const v8::FunctionCallbackInfo& a
*
* @for Actor
* @method getActorType
- * @return {String} Actor, ImageActor, TextActor, MeshActor, Layer, CameraActor ...
+ * @return {String} Actor, ImageActor, MeshActor, Layer, CameraActor ...
*/
void ActorApi::GetActorType( const v8::FunctionCallbackInfo& args )
{
@@ -557,7 +557,7 @@ void ActorApi::RotateBy( const v8::FunctionCallbackInfo& args )
bool found( false );
Property::Value rotation = V8Utils::GetPropertyValueParameter( PARAMETER_0, found, isolate, args );
- if( rotation.GetType() != Property::ORIENTATION )
+ if( rotation.GetType() != Property::ROTATION )
{
DALI_SCRIPT_EXCEPTION( isolate, "Rotation parameter missing" );
return;
diff --git a/plugins/dali-script-v8/src/actors/actor-api.h b/plugins/dali-script-v8/src/actors/actor-api.h
index 9d1bb16..8543f11 100644
--- a/plugins/dali-script-v8/src/actors/actor-api.h
+++ b/plugins/dali-script-v8/src/actors/actor-api.h
@@ -28,7 +28,7 @@ namespace Dali
namespace V8Plugin
{
-namespace TextViewApi
+namespace TextLabelApi
{
/**
* Temporary TextView constructor
diff --git a/plugins/dali-script-v8/src/actors/actor-wrapper.cpp b/plugins/dali-script-v8/src/actors/actor-wrapper.cpp
index 6f2d6f0..5916dd2 100644
--- a/plugins/dali-script-v8/src/actors/actor-wrapper.cpp
+++ b/plugins/dali-script-v8/src/actors/actor-wrapper.cpp
@@ -25,7 +25,6 @@
#include
#include
#include
-#include
#include
#include
#include
@@ -40,11 +39,10 @@ namespace V8Plugin
v8::Persistent ActorWrapper::mActorTemplate;
v8::Persistent ActorWrapper::mImageActorTemplate;
-v8::Persistent ActorWrapper::mTextActorTemplate;
v8::Persistent ActorWrapper::mMeshActorTemplate;
v8::Persistent ActorWrapper::mCameraActorTemplate;
v8::Persistent ActorWrapper::mLayerActorTemplate;
-v8::Persistent ActorWrapper::mTextViewTemplate;
+v8::Persistent ActorWrapper::mTextLabelTemplate;
namespace
{
@@ -65,11 +63,10 @@ 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 }
+ { &ActorWrapper::mTextLabelTemplate }
};
/**
@@ -80,10 +77,9 @@ 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,
+ MESH_ACTOR_API = 1 << 3,
+ LAYER_API = 1 << 4,
+ CAMERA_ACTOR_API = 1 << 5,
};
/**
@@ -104,11 +100,10 @@ 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 },
+ {"TextLabel", ActorWrapper::TEXT_LABEL, TextLabelApi::New, ACTOR_API },
};
@@ -148,7 +143,7 @@ Actor CreateActor( const v8::FunctionCallbackInfo< v8::Value >& args,
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 );
+ // custom parameters, e.g. new ImageActor( MyImage );
actor = (ActorApiLookup[actorType].constructor)( args );
}
return actor;
@@ -312,40 +307,6 @@ const ActorFunctions ActorFunctionTable[]=
// 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)
**************************************/
@@ -487,7 +448,7 @@ void ActorWrapper::NewActor( const v8::FunctionCallbackInfo< v8::Value >& args)
return;
}
- // find out the callee function name...e.g. TextActor, ImageActor, MeshActor
+ // find out the callee function name...e.g. ImageActor, MeshActor
v8::Local callee = args.Callee();
v8::Local v8String = callee->GetName();
std::string typeName = V8Utils::v8StringToStdString( v8String );
diff --git a/plugins/dali-script-v8/src/actors/actor-wrapper.h b/plugins/dali-script-v8/src/actors/actor-wrapper.h
index 79381ba..ab6999b 100644
--- a/plugins/dali-script-v8/src/actors/actor-wrapper.h
+++ b/plugins/dali-script-v8/src/actors/actor-wrapper.h
@@ -48,12 +48,11 @@ public:
UNKNOWN_ACTOR = -1,
ACTOR = 0,
IMAGE_ACTOR =1,
- TEXT_ACTOR =2,
- MESH_ACTOR =3,
- LAYER_ACTOR =4,
- CAMERA_ACTOR =5,
- LIGHT_ACTOR =6,
- TEXT_VIEW =7
+ MESH_ACTOR =2,
+ LAYER_ACTOR =3,
+ CAMERA_ACTOR =4,
+ LIGHT_ACTOR =5,
+ TEXT_LABEL =6
};
/**
@@ -91,11 +90,10 @@ public:
// The Actor ObjectTemplates.
static v8::Persistent mActorTemplate;
static v8::Persistent mImageActorTemplate;
- static v8::Persistent mTextActorTemplate;
static v8::Persistent mMeshActorTemplate;
static v8::Persistent mCameraActorTemplate;
static v8::Persistent mLayerActorTemplate;
- static v8::Persistent mTextViewTemplate;
+ static v8::Persistent mTextLabelTemplate;
/**
* @return the wrapped actor
diff --git a/plugins/dali-script-v8/src/actors/text-actor-api.cpp b/plugins/dali-script-v8/src/actors/text-actor-api.cpp
deleted file mode 100644
index 483b345..0000000
--- a/plugins/dali-script-v8/src/actors/text-actor-api.cpp
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * 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 "text-actor-api.h"
-
-// EXTERNAL INCLUDES
-#include
-
-// INTERNAL INCLUDES
-#include