Merge "[4.0] Revert "[4.0] Update libunibreak to fix word wrap mode issue."" into...
authorminho.sun <minho.sun@samsung.com>
Wed, 24 Jan 2018 12:21:33 +0000 (12:21 +0000)
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>
Wed, 24 Jan 2018 12:21:33 +0000 (12:21 +0000)
22 files changed:
adaptors/common/application-impl.cpp
adaptors/common/style-monitor-impl.cpp
adaptors/common/style-monitor-impl.h
adaptors/devel-api/adaptor-framework/gif-loading.cpp
adaptors/devel-api/adaptor-framework/gif-loading.h
adaptors/devel-api/adaptor-framework/key-devel.h
adaptors/devel-api/adaptor-framework/style-monitor.cpp
adaptors/devel-api/adaptor-framework/style-monitor.h
adaptors/ecore/wayland/event-handler-ecore-wl.cpp
adaptors/ecore/wayland/key-mapping-ecore-wl.cpp
adaptors/ecore/wayland/window-impl-ecore-wl.cpp
adaptors/public-api/adaptor-framework/widget-impl.h
adaptors/public-api/dali-adaptor-version.cpp
adaptors/tv/key-mapping-tv.cpp
adaptors/ubuntu/key-mapping-ubuntu.cpp
adaptors/wayland/input/key-mapping-wl.cpp
adaptors/wearable/watch-application-impl.cpp
adaptors/wearable/watch-application-impl.h
adaptors/x11/ecore-x-event-handler.cpp
adaptors/x11/key-mapping-x.cpp
packaging/dali-adaptor.spec
text/dali/internal/text-abstraction/shaping-impl.cpp

index ebbbfa0..0a978a6 100644 (file)
@@ -184,6 +184,7 @@ void Application::Lower()
 void Application::Quit()
 {
   // Actually quit the application.
+  // Force a call to Quit even if adaptor is not running.
   Internal::Adaptor::Adaptor::GetImplementation(*mAdaptor).AddIdle( MakeCallback( this, &Application::QuitFromMainLoop ), true );
 }
 
@@ -264,6 +265,8 @@ void Application::DoLanguageChange()
 
 void Application::OnInit()
 {
+  DALI_LOG_RELEASE_INFO( "Application::OnInit has started.\n" );
+
   mFramework->AddAbortCallback( MakeCallback( this, &Application::QuitFromMainLoop ) );
 
   DoInit();
@@ -283,10 +286,14 @@ void Application::OnInit()
   mInitSignal.Emit( application );
 
   DoStart();
+
+  DALI_LOG_RELEASE_INFO( "Application::OnInit has finished.\n" );
 }
 
 void Application::OnTerminate()
 {
+  DALI_LOG_RELEASE_INFO( "Application::OnTerminate\n" );
+
   // we've been told to quit by AppCore, ecore_x_destroy has been called, need to quit synchronously
   // delete the window as ecore_x has been destroyed by AppCore
 
@@ -298,18 +305,20 @@ void Application::OnTerminate()
 
 void Application::OnPause()
 {
-  DALI_LOG_RELEASE_INFO( "Application::OnPause\n" );
+  DALI_LOG_RELEASE_INFO( "Application::OnPause has started.\n" );
 
   // A DALi app should handle Pause/Resume events.
   // DALi just delivers the framework Pause event to the application, but not actually pause DALi core.
   // Pausing DALi core only occurs on the Window Hidden framework event
   Dali::Application application(this);
   mPauseSignal.Emit( application );
+
+  DALI_LOG_RELEASE_INFO( "Application::OnPause has finished.\n" );
 }
 
 void Application::OnResume()
 {
-  DALI_LOG_RELEASE_INFO( "Application::OnResume\n" );
+  DALI_LOG_RELEASE_INFO( "Application::OnResume has started.\n" );
 
   // Emit the signal first so the application can queue any messages before we do an update/render
   // This ensures we do not just redraw the last frame before pausing if that's not required
@@ -318,6 +327,8 @@ void Application::OnResume()
 
   // DALi just delivers the framework Resume event to the application.
   // Resuming DALi core only occurs on the Window Show framework event
+
+  DALI_LOG_RELEASE_INFO( "Application::OnResume has finished.\n" );
 }
 
 void Application::OnReset()
@@ -332,8 +343,12 @@ void Application::OnReset()
 
 void Application::OnAppControl(void *data)
 {
+  DALI_LOG_RELEASE_INFO( "Application::OnAppControl has started.\n" );
+
   Dali::Application application(this);
   mAppControlSignal.Emit( application , data );
+
+  DALI_LOG_RELEASE_INFO( "Application::OnAppControl has finished.\n" );
 }
 
 void Application::OnLanguageChanged()
index f85e0b1..a8cc2d8 100644 (file)
@@ -86,7 +86,8 @@ Dali::StyleMonitor StyleMonitor::Get()
 }
 
 StyleMonitor::StyleMonitor()
-: mDefaultFontSize(-1)
+: mDefaultFontSize(-1),
+  mIgnoreGlobalFontSizeChange(-1)
 {
   mFontClient = TextAbstraction::FontClient::Get();
   GetSystemDefaultFontFamily( mFontClient, mDefaultFontFamily );
@@ -171,11 +172,6 @@ bool StyleMonitor::LoadThemeFile( const std::string& filename, std::string& outp
   return retval;
 }
 
-Dali::StyleMonitor::StyleChangeSignalType& StyleMonitor::StyleChangeSignal()
-{
-  return mStyleChangeSignal;
-}
-
 void StyleMonitor::EmitStyleChangeSignal( StyleChange::Type styleChange )
 {
   if( !mStyleChangeSignal.Empty() )
@@ -186,6 +182,21 @@ void StyleMonitor::EmitStyleChangeSignal( StyleChange::Type styleChange )
   }
 }
 
+int StyleMonitor::GetIgnoreGlobalFontSizeChange()
+{
+  return mIgnoreGlobalFontSizeChange;
+}
+
+void StyleMonitor::SetIgnoreGlobalFontSizeChange(int value)
+{
+  mIgnoreGlobalFontSizeChange = value;
+}
+
+Dali::StyleMonitor::StyleChangeSignalType& StyleMonitor::StyleChangeSignal()
+{
+  return mStyleChangeSignal;
+}
+
 } // namespace Adaptor
 
 } // namespace Internal
index 5fffbbe..8d2bf73 100644 (file)
@@ -96,6 +96,16 @@ public:
    */
   bool LoadThemeFile( const std::string& filename, std::string& output );
 
+  /**
+   * @copydoc Dali::StyleMonitor::GetIgnoreGlobalFontSizeChange()
+   */
+  int GetIgnoreGlobalFontSizeChange();
+
+  /**
+   * @copydoc Dali::StyleMonitor::SetIgnoreGlobalFontSizeChange()
+   */
+  void SetIgnoreGlobalFontSizeChange(int value);
+
   // Signals
 
   /**
@@ -127,6 +137,7 @@ private:
   std::string mDefaultFontStyle;         ///< The default font style
   std::string mUserDefinedThemeFilePath; ///< String containing the user defined theme file path
   int mDefaultFontSize;                  ///< The default accessibility font size e.g. 0 is smallest
+  int mIgnoreGlobalFontSizeChange;       ///< Ignore global font size change when it is 1
 };
 
 } // namespace Adaptor
index 9c1ec91..d6504e9 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 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.
@@ -136,7 +136,7 @@ struct LoaderInfo
 
     const char *fileName;  /**< The absolute path of the file. */
     unsigned char *globalMap ;      /**< A pointer to the entire contents of the file that have been mapped with mmap(2). */
-    unsigned long long length;  /**< The length of the file in bytes. */
+    long long length;  /**< The length of the file in bytes. */
     int fileDescriptor; /**< The file descriptor. */
   };
 
@@ -477,9 +477,9 @@ bool DecodeImage( GifFileType *gif, uint32_t *data, int rowpix, int xin, int yin
   uint32_t *p;
 
   // what we need is image size.
-  SavedImage *sp = nullptr;
+  SavedImage *sp;
   sp = &gif->SavedImages[ gif->ImageCount - 1 ];
-  if( sp != nullptr )
+  if( !sp )
   {
     goto on_error;
   }
@@ -638,8 +638,18 @@ bool ReadHeader( LoaderInfo &loaderInfo,
     return false;
   }
 
-  fileData.length = static_cast<unsigned long long> ( lseek( fileData.fileDescriptor, 0, SEEK_END ) );
-  lseek( fileData.fileDescriptor, 0, SEEK_SET );
+  fileData.length = lseek( fileData.fileDescriptor, 0, SEEK_END );
+  if( fileData.length <= -1 )
+  {
+    close( fileData.fileDescriptor );
+    return false;
+  }
+
+  if( lseek( fileData.fileDescriptor, 0, SEEK_SET ) == -1 )
+  {
+    close( fileData.fileDescriptor );
+    return false;
+  }
 
   // map the file and store/track info
   fileData.globalMap  = reinterpret_cast<unsigned char *>( mmap(NULL, fileData.length, PROT_READ, MAP_SHARED, fileData.fileDescriptor, 0 ));
@@ -995,7 +1005,6 @@ open_file:
           {
             FillFrame( thisFrame->data, prop.w, gif, frameInfo, x, y, w, h );
           }
-
           else if( frameInfo->dispose == DISPOSE_PREVIOUS ) // GIF_DISPOSE_RESTORE
           {
             int prevIndex = 2;
@@ -1003,6 +1012,10 @@ open_file:
             {
               // Find last preserved frame.
               lastPreservedFrame = FindFrame( animated, imageNumber - prevIndex );
+              if( ! lastPreservedFrame )
+              {
+                LOADERR( "LOAD_ERROR_LAST_PRESERVED_FRAME_NOT_FOUND" );
+              }
               prevIndex++;
             } while( lastPreservedFrame && lastPreservedFrame->info.dispose == DISPOSE_PREVIOUS );
 
index fb1da2f..dd0a94e 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_INTERNAL_GIF_LOADING_H__
 
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 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.
@@ -51,6 +51,13 @@ public:
    */
   GifLoading( const std::string& url );
 
+  // Moveable but not copyable
+
+  GifLoading( const GifLoading& ) = delete;
+  GifLoading& operator=( const GifLoading& ) = delete;
+  GifLoading( GifLoading&& ) = default;
+  GifLoading& operator=( GifLoading&& ) = default;
+
   /**
    * @brief Destructor
    */
index d5a7ca8..982c10d 100644 (file)
@@ -94,8 +94,12 @@ enum Key
   /**
    * @brief Source key.
    */
-  DALI_KEY_SOURCE = 72
+  DALI_KEY_SOURCE = 72,
 
+   /**
+    *  @brief Control Return key.
+    */
+  DALI_KEY_RETURN = 36
 };
 
 } // namespace DevelKey
index 4b08a2b..2e1e25a 100644 (file)
@@ -77,6 +77,16 @@ bool StyleMonitor::LoadThemeFile( const std::string& filename, std::string& outp
   return GetImplementation(*this).LoadThemeFile( filename, output );
 }
 
+int StyleMonitor::GetIgnoreGlobalFontSizeChange()
+{
+  return GetImplementation(*this).GetIgnoreGlobalFontSizeChange();
+}
+
+void StyleMonitor::SetIgnoreGlobalFontSizeChange(int value)
+{
+  GetImplementation(*this).SetIgnoreGlobalFontSizeChange( value );
+}
+
 StyleMonitor::StyleChangeSignalType& StyleMonitor::StyleChangeSignal()
 {
   return GetImplementation(*this).StyleChangeSignal();
index bf63048..692fe73 100644 (file)
@@ -142,6 +142,18 @@ public: // Style Information
    */
   bool LoadThemeFile( const std::string& filename, std::string& output );
 
+  /**
+   * Return the value of mIgnoreGlobalFontSizeChange.
+   * @return Return mIgnoreGlobalFontSizeChange.
+   */
+  int GetIgnoreGlobalFontSizeChange();
+
+  /**
+   * Informs the Style Monitor that the style has changed.
+   * @param[in]  value The value of mIgnoreGlobalFontSizeChange.
+   */
+  void SetIgnoreGlobalFontSizeChange(int value);
+
 public: // Signals
 
   /**
index 964524e..e8664cf 100644 (file)
@@ -169,6 +169,33 @@ const unsigned int DirectionStringsTotal = sizeof( ElDBusAccessibilityDirectionS
 #endif // DALI_ELDBUS_AVAILABLE
 
 /**
+ * EcoreInputModifierToEcoreIMFLock function converts from Ecore_Event_Modifier to Ecore_IMF_Keyboard_Locks enums.
+ * @param[in] modifier the Ecore_Event_Modifier input.
+ * @return the Ecore_IMF_Keyboard_Locks output.
+ */
+Ecore_IMF_Keyboard_Locks EcoreInputModifierToEcoreIMFLock( unsigned int modifier )
+{
+    unsigned int lock( ECORE_IMF_KEYBOARD_LOCK_NONE ); // If no other matches, returns NONE.
+
+    if( modifier & ECORE_EVENT_LOCK_NUM )
+    {
+      lock |= ECORE_IMF_KEYBOARD_LOCK_NUM; // Num lock is active.
+    }
+
+    if( modifier & ECORE_EVENT_LOCK_CAPS )
+    {
+      lock |= ECORE_IMF_KEYBOARD_LOCK_CAPS; // Caps lock is active.
+    }
+
+    if( modifier & ECORE_EVENT_LOCK_SCROLL )
+    {
+      lock |= ECORE_IMF_KEYBOARD_LOCK_SCROLL; // Scroll lock is active.
+    }
+
+    return static_cast<Ecore_IMF_Keyboard_Locks>( lock );
+}
+
+/**
  * Ecore_Event_Modifier enums in Ecore_Input.h do not match Ecore_IMF_Keyboard_Modifiers in Ecore_IMF.h.
  * This function converts from Ecore_Event_Modifier to Ecore_IMF_Keyboard_Modifiers enums.
  * @param[in] ecoreModifier the Ecore_Event_Modifier input.
@@ -176,7 +203,7 @@ const unsigned int DirectionStringsTotal = sizeof( ElDBusAccessibilityDirectionS
  */
 Ecore_IMF_Keyboard_Modifiers EcoreInputModifierToEcoreIMFModifier(unsigned int ecoreModifier)
 {
-   int modifier( ECORE_IMF_KEYBOARD_MODIFIER_NONE );  // If no other matches returns NONE.
+   unsigned int modifier( ECORE_IMF_KEYBOARD_MODIFIER_NONE );  // If no other matches returns NONE.
 
 
    if ( ecoreModifier & ECORE_EVENT_MODIFIER_SHIFT )  // enums from ecore_input/Ecore_Input.h
@@ -664,7 +691,7 @@ struct EventHandler::Impl
         ecoreKeyDownEvent.compose   = keyEvent->compose;
         ecoreKeyDownEvent.timestamp = keyEvent->timestamp;
         ecoreKeyDownEvent.modifiers = EcoreInputModifierToEcoreIMFModifier ( keyEvent->modifiers );
-        ecoreKeyDownEvent.locks     = (Ecore_IMF_Keyboard_Locks) ECORE_IMF_KEYBOARD_LOCK_NONE;
+        ecoreKeyDownEvent.locks     = EcoreInputModifierToEcoreIMFLock( keyEvent->modifiers );
         ecoreKeyDownEvent.dev_name  = ecore_device_name_get( keyEvent->dev );
         ecoreKeyDownEvent.dev_class = static_cast<Ecore_IMF_Device_Class>( ecore_device_class_get( keyEvent->dev ) );
         ecoreKeyDownEvent.dev_subclass = static_cast<Ecore_IMF_Device_Subclass>( ecore_device_subclass_get( keyEvent->dev ) );
@@ -769,7 +796,7 @@ struct EventHandler::Impl
         ecoreKeyUpEvent.compose   = keyEvent->compose;
         ecoreKeyUpEvent.timestamp = keyEvent->timestamp;
         ecoreKeyUpEvent.modifiers = EcoreInputModifierToEcoreIMFModifier ( keyEvent->modifiers );
-        ecoreKeyUpEvent.locks     = (Ecore_IMF_Keyboard_Locks) ECORE_IMF_KEYBOARD_LOCK_NONE;
+        ecoreKeyUpEvent.locks     = EcoreInputModifierToEcoreIMFLock( keyEvent->modifiers );
         ecoreKeyUpEvent.dev_name  = ecore_device_name_get( keyEvent->dev );
         ecoreKeyUpEvent.dev_class = static_cast<Ecore_IMF_Device_Class>( ecore_device_class_get( keyEvent->dev ) );
         ecoreKeyUpEvent.dev_subclass = static_cast<Ecore_IMF_Device_Subclass>( ecore_device_subclass_get( keyEvent->dev ) );
index 39b29a3..6311e35 100644 (file)
@@ -88,7 +88,8 @@ KeyLookup KeyLookupTable[]=
   { "Delete",                static_cast<Dali::KEY>( DevelKey::DALI_KEY_DELETE ),        false },
   { "Control_L",             static_cast<Dali::KEY>( DevelKey::DALI_KEY_CONTROL_LEFT ),  false },
   { "Control_R",             static_cast<Dali::KEY>( DevelKey::DALI_KEY_CONTROL_RIGHT ), false },
-  { "XF86Display",           static_cast<Dali::KEY>( DevelKey::DALI_KEY_SOURCE ), true  }
+  { "XF86Display",           static_cast<Dali::KEY>( DevelKey::DALI_KEY_SOURCE ),        true  },
+  { "Return",                static_cast<Dali::KEY>( DevelKey::DALI_KEY_RETURN ),        false }
 };
 
 const std::size_t KEY_LOOKUP_COUNT = (sizeof( KeyLookupTable ))/ (sizeof( KeyLookup ));
index b3343f8..0e01ff2 100644 (file)
@@ -780,16 +780,22 @@ void Window::Raise()
 {
   // Use ecore_wl_window_activate to prevent the window shown without rendering
   ecore_wl_window_activate( mEventHandler->mEcoreWindow );
+
+  DALI_LOG_RELEASE_INFO( "Window::Raise is called.\n" );
 }
 
 void Window::Lower()
 {
   ecore_wl_window_lower( mEventHandler->mEcoreWindow );
+
+  DALI_LOG_RELEASE_INFO( "Window::Lower is called.\n" );
 }
 
 void Window::Activate()
 {
   ecore_wl_window_activate( mEventHandler->mEcoreWindow );
+
+  DALI_LOG_RELEASE_INFO( "Window::Activate is called.\n" );
 }
 
 Dali::DragAndDropDetector Window::GetDragAndDropDetector() const
@@ -849,11 +855,11 @@ void Window::AddAvailableOrientation(Dali::Window::WindowOrientation orientation
 {
   bool found = false;
 
-  if ((orientation >= Dali::Window::PORTRAIT) && (orientation <= Dali::Window::LANDSCAPE_INVERSE))
+  if ( orientation <= Dali::Window::LANDSCAPE_INVERSE )
   {
-    for( std::size_t i=0; i<mAvailableOrientations.size(); i++ )
+    for( std::size_t i = 0; i < mAvailableOrientations.size(); i++ )
     {
-      if(mAvailableOrientations[i] == orientation)
+      if( mAvailableOrientations[i] == orientation )
       {
         found = true;
         break;
@@ -926,7 +932,7 @@ void Window::Show()
   mVisible = true;
   ecore_wl_window_show( mEventHandler->mEcoreWindow );
 
-  DALI_LOG_RELEASE_INFO( "Window::Show: mIconified [%d]\n", mIconified );
+  DALI_LOG_RELEASE_INFO( "Window::Show is called : mIconified [%d]\n", mIconified );
 
   if( !mIconified )
   {
@@ -943,7 +949,7 @@ void Window::Hide()
   mVisible = false;
   ecore_wl_window_hide( mEventHandler->mEcoreWindow );
 
-  DALI_LOG_RELEASE_INFO( "Window::Hide: mIconified [%d]\n", mIconified );
+  DALI_LOG_RELEASE_INFO( "Window::Hide is called : mIconified [%d]\n", mIconified );
 
   if( !mIconified )
   {
index b592c38..a907f54 100644 (file)
@@ -151,7 +151,7 @@ protected:
 public:
   class Impl; // Class declaration is public so we can internally add devel API's to the WidgetImpl
 
-  /*
+  /**
    * Set pointer of WidgetImpl Internal.
    * @SINCE_1_3_5
    */
index 811aec5..2317c67 100755 (executable)
@@ -28,7 +28,7 @@ namespace Dali
 
 const unsigned int ADAPTOR_MAJOR_VERSION = 1;
 const unsigned int ADAPTOR_MINOR_VERSION = 2;
-const unsigned int ADAPTOR_MICRO_VERSION = 81;
+const unsigned int ADAPTOR_MICRO_VERSION = 82;
 const char * const ADAPTOR_BUILD_DATE    = __DATE__ " " __TIME__;
 
 #ifdef DEBUG_ENABLED
index 88da0fc..07794e8 100644 (file)
@@ -87,7 +87,8 @@ KeyLookup KeyLookupTable[]=
   { "Shift_R",               DALI_KEY_SHIFT_RIGHT,                                       false },
   { "Delete",                static_cast<Dali::KEY>( DevelKey::DALI_KEY_DELETE ),        false },
   { "Control_L",             static_cast<Dali::KEY>( DevelKey::DALI_KEY_CONTROL_LEFT ),  false },
-  { "Control_R",             static_cast<Dali::KEY>( DevelKey::DALI_KEY_CONTROL_RIGHT ), false }
+  { "Control_R",             static_cast<Dali::KEY>( DevelKey::DALI_KEY_CONTROL_RIGHT ), false },
+  { "Return",                static_cast<Dali::KEY>( DevelKey::DALI_KEY_RETURN ),        false }
 };
 
 const std::size_t KEY_LOOKUP_COUNT = (sizeof( KeyLookupTable ))/ (sizeof( KeyLookup ));
index 73f3e81..73f033a 100644 (file)
@@ -85,7 +85,8 @@ KeyLookup KeyLookupTable[]=
   { "Shift_R",               DALI_KEY_SHIFT_RIGHT,                                       false },
   { "Delete",                static_cast<Dali::KEY>( DevelKey::DALI_KEY_DELETE ),        false },
   { "Control_L",             static_cast<Dali::KEY>( DevelKey::DALI_KEY_CONTROL_LEFT ),  false },
-  { "Control_R",             static_cast<Dali::KEY>( DevelKey::DALI_KEY_CONTROL_RIGHT ), false }
+  { "Control_R",             static_cast<Dali::KEY>( DevelKey::DALI_KEY_CONTROL_RIGHT ), false },
+  { "Return",                static_cast<Dali::KEY>( DevelKey::DALI_KEY_RETURN ),        false }
 };
 
 const std::size_t KEY_LOOKUP_COUNT = (sizeof( KeyLookupTable ))/ (sizeof( KeyLookup ));
index 4152e83..e9724bb 100644 (file)
@@ -87,7 +87,8 @@ KeyLookup KeyLookupTable[]=
   { "Shift_R",               DALI_KEY_SHIFT_RIGHT,                                       false },
   { "Delete",                static_cast<Dali::KEY>( DevelKey::DALI_KEY_DELETE ),        false },
   { "Control_L",             static_cast<Dali::KEY>( DevelKey::DALI_KEY_CONTROL_LEFT ),  false },
-  { "Control_R",             static_cast<Dali::KEY>( DevelKey::DALI_KEY_CONTROL_RIGHT ), false }
+  { "Control_R",             static_cast<Dali::KEY>( DevelKey::DALI_KEY_CONTROL_RIGHT ), false },
+  { "Return",                static_cast<Dali::KEY>( DevelKey::DALI_KEY_RETURN ),        false }
 };
 
 const std::size_t KEY_LOOKUP_COUNT = (sizeof( KeyLookupTable ))/ (sizeof( KeyLookup ));
index dd5b004..0c89bfc 100755 (executable)
@@ -17,6 +17,7 @@
 
 // CLASS HEADER
 #include "watch-application-impl.h"
+#include <style-monitor.h>
 
 namespace Dali
 {
@@ -38,8 +39,10 @@ WatchApplicationPtr WatchApplication::New(
 }
 
 WatchApplication::WatchApplication( int* argc, char** argv[], const std::string& stylesheet, Dali::Application::WINDOW_MODE windowMode )
-: Application(argc, argv, stylesheet, windowMode, PositionSize(), Framework::WATCH)
+: Application(argc, argv, stylesheet, windowMode, PositionSize(), Framework::WATCH),
+  mState( UNINITIALIZED )
 {
+  Dali::StyleMonitor::Get().SetIgnoreGlobalFontSizeChange(1);
 }
 
 WatchApplication::~WatchApplication()
index 0c9b723..9c162b4 100755 (executable)
@@ -37,6 +37,7 @@ typedef IntrusivePtr<WatchApplication> WatchApplicationPtr;
 
 enum WatchApplicationState
 {
+  UNINITIALIZED,
   INITIALIZED,
   PAUSED,
   RESUMED = INITIALIZED,
index e63bf5d..2c71a89 100644 (file)
@@ -207,6 +207,33 @@ const unsigned int DirectionStringsTotal = sizeof( ElDBusAccessibilityDirectionS
 #endif // DALI_ELDBUS_AVAILABLE
 
 /**
+ * EcoreInputModifierToEcoreIMFLock function converts from Ecore_Event_Modifier to Ecore_IMF_Keyboard_Locks enums.
+ * @param[in] modifier the Ecore_Event_Modifier input.
+ * @return the Ecore_IMF_Keyboard_Locks output.
+ */
+Ecore_IMF_Keyboard_Locks EcoreInputModifierToEcoreIMFLock( unsigned int modifier )
+{
+    unsigned int lock( ECORE_IMF_KEYBOARD_LOCK_NONE ); // If no other matches, returns NONE.
+
+    if( modifier & ECORE_EVENT_LOCK_NUM )
+    {
+      lock |= ECORE_IMF_KEYBOARD_LOCK_NUM; // Num lock is active.
+    }
+
+    if( modifier & ECORE_EVENT_LOCK_CAPS )
+    {
+      lock |= ECORE_IMF_KEYBOARD_LOCK_CAPS; // Caps lock is active.
+    }
+
+    if( modifier & ECORE_EVENT_LOCK_SCROLL )
+    {
+      lock |= ECORE_IMF_KEYBOARD_LOCK_SCROLL; // Scroll lock is active.
+    }
+
+    return static_cast<Ecore_IMF_Keyboard_Locks>( lock );
+}
+
+/**
  * Ecore_Event_Modifier enums in Ecore_Input.h do not match Ecore_IMF_Keyboard_Modifiers in Ecore_IMF.h.
  * This function converts from Ecore_Event_Modifier to Ecore_IMF_Keyboard_Modifiers enums.
  * @param[in] ecoreModifier the Ecore_Event_Modifier input.
@@ -214,7 +241,7 @@ const unsigned int DirectionStringsTotal = sizeof( ElDBusAccessibilityDirectionS
  */
 Ecore_IMF_Keyboard_Modifiers EcoreInputModifierToEcoreIMFModifier(unsigned int ecoreModifier)
 {
-   int modifier( ECORE_IMF_KEYBOARD_MODIFIER_NONE );  // If no other matches returns NONE.
+   unsigned int modifier( ECORE_IMF_KEYBOARD_MODIFIER_NONE );  // If no other matches returns NONE.
 
 
    if ( ecoreModifier & ECORE_EVENT_MODIFIER_SHIFT )  // enums from ecore_input/Ecore_Input.h
@@ -672,7 +699,7 @@ struct EventHandler::Impl
         ecoreKeyDownEvent.compose   = keyEvent->compose;
         ecoreKeyDownEvent.timestamp = keyEvent->timestamp;
         ecoreKeyDownEvent.modifiers = EcoreInputModifierToEcoreIMFModifier ( keyEvent->modifiers );
-        ecoreKeyDownEvent.locks     = (Ecore_IMF_Keyboard_Locks) ECORE_IMF_KEYBOARD_LOCK_NONE;
+        ecoreKeyDownEvent.locks     = EcoreInputModifierToEcoreIMFLock( keyEvent->modifiers );
 #ifdef ECORE_IMF_1_13
         ecoreKeyDownEvent.dev_name  = "";
         ecoreKeyDownEvent.dev_class = ECORE_IMF_DEVICE_CLASS_KEYBOARD;
@@ -752,7 +779,7 @@ struct EventHandler::Impl
         ecoreKeyUpEvent.compose   = keyEvent->compose;
         ecoreKeyUpEvent.timestamp = keyEvent->timestamp;
         ecoreKeyUpEvent.modifiers = EcoreInputModifierToEcoreIMFModifier ( keyEvent->modifiers );
-        ecoreKeyUpEvent.locks     = (Ecore_IMF_Keyboard_Locks) ECORE_IMF_KEYBOARD_LOCK_NONE;
+        ecoreKeyUpEvent.locks     = EcoreInputModifierToEcoreIMFLock( keyEvent->modifiers );
 #ifdef ECORE_IMF_1_13
         ecoreKeyUpEvent.dev_name  = "";
 #endif // ECORE_IMF_1_13
index f280088..dd7f8f2 100644 (file)
@@ -87,7 +87,8 @@ KeyLookup KeyLookupTable[]=
   { "Shift_R",               DALI_KEY_SHIFT_RIGHT,                                       false },
   { "Delete",                static_cast<Dali::KEY>( DevelKey::DALI_KEY_DELETE ),        false },
   { "Control_L",             static_cast<Dali::KEY>( DevelKey::DALI_KEY_CONTROL_LEFT ),  false },
-  { "Control_R",             static_cast<Dali::KEY>( DevelKey::DALI_KEY_CONTROL_RIGHT ), false }
+  { "Control_R",             static_cast<Dali::KEY>( DevelKey::DALI_KEY_CONTROL_RIGHT ), false },
+  { "Return",                static_cast<Dali::KEY>( DevelKey::DALI_KEY_RETURN ),        false }
 };
 
 const std::size_t KEY_LOOKUP_COUNT = (sizeof( KeyLookupTable ))/ (sizeof( KeyLookup ));
index 9016524..070312e 100755 (executable)
@@ -19,7 +19,7 @@
 
 Name:       dali-adaptor
 Summary:    The DALi Tizen Adaptor
-Version:    1.2.81
+Version:    1.2.82
 Release:    1
 Group:      System/Libraries
 License:    Apache-2.0 and BSD-3-Clause and MIT
index 3eb3488..24c542c 100644 (file)
@@ -29,6 +29,7 @@
 #include <harfbuzz/hb-ft.h>
 
 #include <ft2build.h>
+#include <iostream>
 
 namespace Dali
 {
@@ -194,9 +195,13 @@ struct Shaping::Plugin
     hb_buffer_set_script( harfBuzzBuffer,
                           SCRIPT_TO_HARFBUZZ[ script ] ); /* see hb-unicode.h */
 
-    hb_buffer_set_language( harfBuzzBuffer,
-                            hb_language_from_string( DEFAULT_LANGUAGE,
-                                                     DEFAULT_LANGUAGE_LENGTH ) );
+
+    char* currentLocale = setlocale(LC_MESSAGES,NULL);
+
+    std::istringstream stringStream( currentLocale );
+    std::string localeString;
+    std::getline(stringStream, localeString, '_');
+    hb_buffer_set_language( harfBuzzBuffer, hb_language_from_string( localeString.c_str(), localeString.size() ) );
 
     /* Layout the text */
     hb_buffer_add_utf32( harfBuzzBuffer, text, numberOfCharacters, 0u, numberOfCharacters );