Merge branch 'devel/master' into tizen 00/182300/1
authorminho.sun <minho.sun@samsung.com>
Fri, 22 Jun 2018 01:09:01 +0000 (10:09 +0900)
committerminho.sun <minho.sun@samsung.com>
Fri, 22 Jun 2018 01:13:49 +0000 (10:13 +0900)
Change-Id: I1c7841144f6a8a0eebd3a5436fd9d71a1b4dea43

dali/internal/adaptor/common/adaptor-impl.cpp
dali/internal/adaptor/common/adaptor-impl.h
dali/internal/network/common/automation.cpp

index 0a2708a..83d91a1 100755 (executable)
@@ -831,12 +831,14 @@ void Adaptor::IndicatorSizeChanged(int height)
   mCore->SetTopMargin(height);
 }
 
-void Adaptor::ProcessCoreEventsFromIdle()
+bool Adaptor::ProcessCoreEventsFromIdle()
 {
   ProcessCoreEvents();
 
   // the idle handle automatically un-installs itself
   mNotificationOnIdleInstalled = false;
+
+  return false;
 }
 
 Adaptor::Adaptor(Any nativeWindow, Dali::Adaptor& adaptor, RenderSurface* surface, EnvironmentOptions* environmentOptions)
index 432bdcd..3359746 100755 (executable)
@@ -524,7 +524,7 @@ private:
   /**
    * Sends an notification message from main loop idle handler
    */
-  void ProcessCoreEventsFromIdle();
+  bool ProcessCoreEventsFromIdle();
 
   /**
    * Gets path for data/resource storage.
index e4c779a..ce17605 100644 (file)
@@ -26,6 +26,9 @@
 #include <dali/public-api/dali-core.h>
 #include <dali/integration-api/debug.h>
 
+using Dali::Property;
+using Dali::Matrix;
+using Dali::Matrix3;
 
 namespace  // un-named namespace
 {
@@ -198,6 +201,29 @@ int SetProperties( const std::string& setPropertyMessage )
 }
 
 
+void MatrixToStream( Property::Value value, std::ostream& o )
+{
+  Matrix m4(false);
+  Matrix3 m3;
+
+  if( value.Get(m4) )
+  {
+    float* matrix = m4.AsFloat();
+    o << "[ [" << matrix[0] << ", " << matrix[1] << ", " << matrix[2]  << ", " << matrix[3] << "], "
+      << "[" << matrix[4] << ", " << matrix[5] << ", " << matrix[6]  << ", " << matrix[7] << "], "
+      << "[" << matrix[8] << ", " << matrix[9] << ", " << matrix[10] << ", " << matrix[11] << "], "
+      << "[" << matrix[12] << ", " << matrix[13] << ", " << matrix[14] << ", " << matrix[15] << "] ]";
+  }
+  else if( value.Get(m3) )
+  {
+    float* matrix = m3.AsFloat();
+    o << "[ [" << matrix[0] << ", " << matrix[1] << ", " << matrix[2]  << "], "
+      << "[" << matrix[3] << ", " << matrix[4] << ", " << matrix[5]  << "], "
+      << "[" << matrix[6] << ", " << matrix[7] << ", " << matrix[8]  << "] ]";
+  }
+}
+
+
 }; //   un-named namespace
 
 inline std::string Quote( const std::string& in )
@@ -219,38 +245,54 @@ std::string ToString( T i )
 std::string GetPropertyValueString( Dali::Handle handle, int propertyIndex )
 {
   std::ostringstream valueStream;
-  Dali::Property::Value value = handle.GetProperty( propertyIndex );
-  valueStream << value;
-  std::string valueString = valueStream.str();
-
-  if( value.GetType() == Dali::Property::STRING )
+  if( propertyIndex != Dali::Property::INVALID_INDEX )
   {
-    // Escape the string (to ensure valid json)
-    // Write out quotes, escapes and control characters using unicode syntax \uXXXX
-    std::ostringstream escapedValue;
-    for( std::string::iterator c = valueString.begin() ; c != valueString.end(); ++c )
+    Dali::Property::Value value = handle.GetProperty( propertyIndex );
+
+    if( value.GetType() == Dali::Property::STRING )
     {
-      if( *c == '"' )
+      // Escape the string (to ensure valid json)
+      // Write out quotes, escapes and control characters using unicode syntax \uXXXX
+      std::ostringstream unescapedValue;
+      unescapedValue << value;
+      std::string valueString = unescapedValue.str();
+      std::ostringstream escapedValue;
+      for( std::string::iterator c = valueString.begin() ; c != valueString.end(); ++c )
       {
-        escapedValue << "\\\"";
-      }
-      else if( *c == '\\' )
-      {
-        escapedValue << "\\\\";
-      }
-      else if( '\x00' <= *c && *c <= '\x1f' )
-      {
-        escapedValue << "\\u" << std::hex << std::setw(4) << std::setfill('0') << int(*c);
-      }
-      else
-      {
-        escapedValue << *c;
+        if( *c == '"' )
+        {
+          escapedValue << "\\\"";
+        }
+        else if( *c == '\\' )
+        {
+          escapedValue << "\\\\";
+        }
+        else if( '\x00' <= *c && *c <= '\x1f' )
+        {
+          escapedValue << "\\u" << std::hex << std::setw(4) << std::setfill('0') << int(*c);
+        }
+        else
+        {
+          escapedValue << *c;
+        }
       }
+      valueStream << escapedValue.str();
     }
-
-    valueString = escapedValue.str();
+    else if( value.GetType() == Dali::Property::MATRIX || value.GetType() == Dali::Property::MATRIX3 )
+    {
+      MatrixToStream( value, valueStream );
+    }
+    else
+    {
+      valueStream << value;
+    }
+  }
+  else
+  {
+    valueStream << "INVALID";
   }
-  return valueString;
+
+  return valueStream.str();
 }
 
 // currently rotations are output in Euler format ( may change)
@@ -354,6 +396,9 @@ std::string GetActorTree()
   std::string str = DumpJson( actor, 0 );
   return str;
 }
+
+
+
 namespace Dali
 {