Merge branch 'devel/master' into tizen
authorminho.sun <minho.sun@samsung.com>
Thu, 2 Aug 2018 01:20:09 +0000 (10:20 +0900)
committerminho.sun <minho.sun@samsung.com>
Thu, 2 Aug 2018 01:20:09 +0000 (10:20 +0900)
19 files changed:
build/tizen/adaptor/Makefile.am
build/tizen/adaptor/module.list
dali/devel-api/adaptor-framework/keyboard.h [new file with mode: 0755]
dali/devel-api/adaptor-framework/thread-settings.cpp [new file with mode: 0644]
dali/devel-api/adaptor-framework/thread-settings.h [new file with mode: 0755]
dali/devel-api/file.list
dali/internal/adaptor/common/combined-update-render-controller.cpp
dali/internal/input/common/keyboard.cpp [new file with mode: 0644]
dali/internal/input/file.list
dali/internal/system/common/widget-application-impl.cpp
dali/internal/thread/common/thread-settings-impl.cpp [new file with mode: 0644]
dali/internal/thread/common/thread-settings-impl.h [new file with mode: 0644]
dali/internal/thread/file.list [new file with mode: 0644]
dali/internal/window-system/common/window-system.h
dali/internal/window-system/tizen-wayland/ecore-wl/window-system-ecore-wl.cpp
dali/internal/window-system/tizen-wayland/ecore-wl2/window-system-ecore-wl2.cpp
dali/internal/window-system/ubuntu-x11/window-system-ecore-x.cpp
dali/public-api/dali-adaptor-version.cpp
packaging/dali-adaptor.spec

index d681b0f..2fad247 100644 (file)
@@ -66,6 +66,7 @@ LIBDALI_ADAPTOR_LA_SOURCES = \
                   $(adaptor_video_common_src_files) \
                   $(adaptor_window_system_common_src_files) \
                   $(adaptor_trace_common_src_files) \
+                  $(adaptor_thread_common_src_files) \
                   $(adaptor_window_system_ubuntu_x11_src_files) \
                   $(devel_api_text_abstraction_src_files) \
                   $(static_libraries_glyphy_src_files) \
@@ -119,6 +120,7 @@ LIBDALI_ADAPTOR_LA_SOURCES = \
                   $(adaptor_window_system_tizen_src_files) \
                   $(adaptor_window_system_tizen_wayland_src_files) \
                   $(adaptor_trace_common_src_files) \
+                  $(adaptor_thread_common_src_files) \
                   $(devel_api_text_abstraction_src_files) \
                   $(static_libraries_glyphy_src_files) \
                   $(static_libraries_libunibreak_src_files)
@@ -180,6 +182,7 @@ LIBDALI_ADAPTOR_LA_SOURCES = \
                   $(adaptor_window_system_tizen_src_files) \
                   $(adaptor_window_system_tizen_wayland_src_files) \
                   $(adaptor_trace_common_src_files) \
+                  $(adaptor_thread_common_src_files) \
                   $(devel_api_text_abstraction_src_files) \
                   $(static_libraries_glyphy_src_files) \
                   $(static_libraries_libunibreak_src_files)
@@ -240,6 +243,7 @@ LIBDALI_ADAPTOR_LA_SOURCES = \
                   $(adaptor_window_system_tizen_src_files) \
                   $(adaptor_window_system_tizen_wayland_src_files) \
                   $(adaptor_trace_common_src_files) \
+                  $(adaptor_thread_common_src_files) \
                   $(devel_api_text_abstraction_src_files) \
                   $(static_libraries_glyphy_src_files) \
                   $(static_libraries_libunibreak_src_files)
@@ -299,6 +303,7 @@ LIBDALI_ADAPTOR_LA_SOURCES = \
                   $(adaptor_window_system_tizen_src_files) \
                   $(adaptor_window_system_tizen_wayland_src_files) \
                   $(adaptor_trace_common_src_files) \
+                  $(adaptor_thread_common_src_files) \
                   $(devel_api_text_abstraction_src_files) \
                   $(static_libraries_glyphy_src_files) \
                   $(static_libraries_libunibreak_src_files)
@@ -361,6 +366,7 @@ LIBDALI_ADAPTOR_LA_SOURCES = \
                   $(adaptor_window_system_tizen_src_files) \
                   $(adaptor_window_system_tizen_wayland_src_files) \
                   $(adaptor_trace_common_src_files) \
+                  $(adaptor_thread_common_src_files) \
                   $(devel_api_text_abstraction_src_files) \
                   $(static_libraries_glyphy_src_files) \
                   $(static_libraries_libunibreak_src_files)
index a326b6e..f174bc1 100644 (file)
@@ -63,6 +63,10 @@ include ../../../dali/internal/window-system/file.list
 adaptor_trace_dir = ../../../dali/internal/trace
 include ../../../dali/internal/trace/file.list
 
+# Module: thread
+adaptor_thread_dir = ../../../dali/internal/thread
+include ../../../dali/internal/thread/file.list
+
 # Module: public-api
 adaptor_public_api_dir = ../../../dali/public-api
 include ../../../dali/public-api/file.list
diff --git a/dali/devel-api/adaptor-framework/keyboard.h b/dali/devel-api/adaptor-framework/keyboard.h
new file mode 100755 (executable)
index 0000000..9fc3d82
--- /dev/null
@@ -0,0 +1,63 @@
+#ifndef DALI_KEYBOARD_H
+#define DALI_KEYBOARD_H
+
+/*
+ * 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.
+ * 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/dali-adaptor-common.h>
+
+namespace Dali
+{
+/**
+ * @addtogroup dali_adaptor_framework
+ * @{
+ */
+
+/**
+ * @brief Keyboard functions.
+ */
+namespace Keyboard
+{
+
+/**
+ * @brief Sets keyboard repeat information.
+ *
+ * @param[in] rate The key repeat rate value in seconds
+ * @param[in] delay The key repeat delay value in seconds
+ * @return true if setting the keyboard repeat succeeds
+ */
+DALI_ADAPTOR_API bool SetRepeatInfo( float rate, float delay );
+
+
+/**
+ * @brief Gets keyboard repeat information.
+ *
+ * @param[in] rate The key repeat rate value in seconds
+ * @param[in] delay The key repeat delay value in seconds
+ * @return true if getting the keyboard repeat succeeds, false otherwise
+ */
+DALI_ADAPTOR_API bool GetRepeatInfo( float& rate, float& delay );
+
+} // namespace Keyboard
+
+/**
+ * @}
+ */
+} // namespace Dali
+
+#endif // DALI_KEYBOARD_H
diff --git a/dali/devel-api/adaptor-framework/thread-settings.cpp b/dali/devel-api/adaptor-framework/thread-settings.cpp
new file mode 100644 (file)
index 0000000..84fc940
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2017 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 <dali/devel-api/adaptor-framework/thread-settings.h>
+
+// INTERNAL INCLUDES
+#include <dali/internal/thread/common/thread-settings-impl.h>
+
+namespace Dali
+{
+void SetThreadName(const std::string& threadName)
+{
+  Internal::Adaptor::ThreadSettings::SetThreadName( threadName );
+}
+} // namespace Dali
diff --git a/dali/devel-api/adaptor-framework/thread-settings.h b/dali/devel-api/adaptor-framework/thread-settings.h
new file mode 100755 (executable)
index 0000000..78c63a0
--- /dev/null
@@ -0,0 +1,37 @@
+#ifndef DALI_THREAD_SETTINGS_H
+#define DALI_THREAD_SETTINGS_H
+
+/*
+ * 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.
+ * 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/dali-adaptor-common.h>
+
+// EXTERNAL INCLUDES
+#include <string>
+
+namespace Dali
+{
+/**
+ * @brief Set the thread name.
+ *
+ * @param [in] threadName The name of thread. The name can be up to 16 bytes long, and should be null-terminated if it contains fewer bytes.
+ */
+DALI_ADAPTOR_API void SetThreadName(const std::string& threadName);
+
+} // Dali
+
+#endif // DALI_THREAD_SETTINGS_H
\ No newline at end of file
index 4fc7506..a98a7be 100755 (executable)
@@ -26,7 +26,9 @@ devel_api_src_files = \
   $(adaptor_devel_api_dir)/adaptor-framework/tilt-sensor.cpp \
   $(adaptor_devel_api_dir)/adaptor-framework/lifecycle-controller.cpp \
   $(adaptor_devel_api_dir)/adaptor-framework/video-player.cpp \
-  $(adaptor_devel_api_dir)/adaptor-framework/virtual-keyboard.cpp
+  $(adaptor_devel_api_dir)/adaptor-framework/virtual-keyboard.cpp \
+  $(adaptor_devel_api_dir)/adaptor-framework/thread-settings.cpp
+
 
 
 devel_api_adaptor_framework_header_files = \
@@ -50,6 +52,7 @@ devel_api_adaptor_framework_header_files = \
   $(adaptor_devel_api_dir)/adaptor-framework/gif-loading.h \
   $(adaptor_devel_api_dir)/adaptor-framework/input-method-context.h \
   $(adaptor_devel_api_dir)/adaptor-framework/input-method-options.h \
+  $(adaptor_devel_api_dir)/adaptor-framework/keyboard.h \
   $(adaptor_devel_api_dir)/adaptor-framework/lifecycle-controller.h \
   $(adaptor_devel_api_dir)/adaptor-framework/orientation.h \
   $(adaptor_devel_api_dir)/adaptor-framework/performance-logger.h \
@@ -63,7 +66,8 @@ devel_api_adaptor_framework_header_files = \
   $(adaptor_devel_api_dir)/adaptor-framework/key-extension-plugin.h \
   $(adaptor_devel_api_dir)/adaptor-framework/virtual-keyboard.h \
   $(adaptor_devel_api_dir)/adaptor-framework/physical-keyboard.h \
-  $(adaptor_devel_api_dir)/adaptor-framework/key-devel.h
+  $(adaptor_devel_api_dir)/adaptor-framework/key-devel.h \
+  $(adaptor_devel_api_dir)/adaptor-framework/thread-settings.h
 
 devel_api_text_abstraction_src_files = \
    $(adaptor_devel_api_dir)/text-abstraction/bidirectional-support.cpp \
index eb59399..72aa9da 100644 (file)
@@ -28,6 +28,7 @@
 #include <dali/internal/system/common/environment-options.h>
 #include <dali/internal/system/common/time-service.h>
 #include <dali/internal/adaptor/common/adaptor-internal-services.h>
+#include <dali/devel-api/adaptor-framework/thread-settings.h>
 
 namespace Dali
 {
@@ -374,6 +375,8 @@ void CombinedUpdateRenderController::ProcessSleepRequest()
 
 void CombinedUpdateRenderController::UpdateRenderThread()
 {
+  SetThreadName("RenderThread\0");
+
   // Install a function for logging
   mEnvironmentOptions.InstallLogFunction();
 
diff --git a/dali/internal/input/common/keyboard.cpp b/dali/internal/input/common/keyboard.cpp
new file mode 100644 (file)
index 0000000..5731d39
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * 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.
+ * 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 <dali/devel-api/adaptor-framework/keyboard.h>
+
+// INTERNAL INCLUDES
+#include <dali/internal/window-system/common/window-system.h>
+
+namespace Dali
+{
+
+namespace Keyboard
+{
+
+bool SetRepeatInfo( float rate, float delay )
+{
+  return Dali::Internal::Adaptor::WindowSystem::SetKeyboardRepeatInfo( rate, delay );
+}
+
+bool GetRepeatInfo( float& rate, float& delay )
+{
+  return Dali::Internal::Adaptor::WindowSystem::GetKeyboardRepeatInfo( rate, delay );
+}
+
+} // namespace Keyboard
+
+} // namespace Dali
+
index 6f0ea5d..1d45842 100755 (executable)
@@ -7,6 +7,7 @@ adaptor_input_common_src_files=\
     ${adaptor_input_dir}/common/input-method-context-impl.cpp \
     ${adaptor_input_dir}/common/key-grab.cpp \
     ${adaptor_input_dir}/common/key-impl.cpp \
+    ${adaptor_input_dir}/common/keyboard.cpp \
     ${adaptor_input_dir}/common/long-press-gesture-detector.cpp \
     ${adaptor_input_dir}/common/pan-gesture-detector-base.cpp \
     ${adaptor_input_dir}/common/pan-gesture-detector.cpp \
index dd1101c..da34463 100644 (file)
@@ -51,7 +51,7 @@ WidgetApplicationPtr WidgetApplication::New(
 }
 
 WidgetApplication::WidgetApplication( int* argc, char** argv[], const std::string& stylesheet )
-: Application(argc, argv, stylesheet, Dali::WidgetApplication::OPAQUE, PositionSize(), Framework::NORMAL)
+: Application(argc, argv, stylesheet, Dali::WidgetApplication::OPAQUE, PositionSize(), Framework::WIDGET)
 {
   DALI_LOG_ERROR("WidgetApplication is not implemented in UBUNTU profile.\n");
 }
diff --git a/dali/internal/thread/common/thread-settings-impl.cpp b/dali/internal/thread/common/thread-settings-impl.cpp
new file mode 100644 (file)
index 0000000..849cb4d
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * 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 <dali/internal/thread/common/thread-settings-impl.h>
+
+// INTERNAL INCLUDES
+#include <dali/integration-api/debug.h>
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+namespace ThreadSettings
+{
+
+void SetThreadName(const std::string& threadName)
+{
+  int err = prctl(PR_SET_NAME, threadName.c_str());
+  if ( err )
+  {
+    DALI_LOG_ERROR( "prctl(PR_SET_NAME, %s) failed\n", threadName.c_str() );
+  }
+}
+
+} // namespace ThreadSettings
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
diff --git a/dali/internal/thread/common/thread-settings-impl.h b/dali/internal/thread/common/thread-settings-impl.h
new file mode 100644 (file)
index 0000000..2766982
--- /dev/null
@@ -0,0 +1,55 @@
+#ifndef __DALI_INTERNAL_THREAD_SETTINGS_H__
+#define __DALI_INTERNAL_THREAD_SETTINGS_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.
+ *
+ */
+
+// EXTERNAL INCLUDES
+#include <string>
+#include <sys/prctl.h>
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+/**
+ * Implementation of the Thread Settings
+ */
+namespace ThreadSettings
+{
+
+/**
+ * @brief Set the thread name.
+ *
+ * @param [in] threadName The name of thread. The name can be up to 16 bytes long, and should be null-terminated if it contains fewer bytes.
+ */
+void SetThreadName(const std::string& threadName);
+
+} // namespace ThreadSettings
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
+
+#endif // __DALI_INTERNAL_THREAD_SETTINGS_H__
diff --git a/dali/internal/thread/file.list b/dali/internal/thread/file.list
new file mode 100644 (file)
index 0000000..7daaf03
--- /dev/null
@@ -0,0 +1,4 @@
+# module: trace, backend: common
+adaptor_thread_common_src_files=\
+    ${adaptor_thread_dir}/common/thread-settings-impl.cpp
+
index fc5f983..978e334 100644 (file)
@@ -43,6 +43,16 @@ void Shutdown();
  */
 void GetScreenSize( int& width, int& height );
 
+/**
+ * @copydoc Dali::Keyboard::SetRepeatInfo()
+ */
+bool SetKeyboardRepeatInfo( float rate, float delay );
+
+/**
+ * @copydoc Dali::Keyboard::GetRepeatInfo()
+ */
+bool GetKeyboardRepeatInfo( float& rate, float& delay );
+
 } // namespace WindowSystem
 
 } // namespace Adaptor
index b515bc7..a38aa6e 100644 (file)
@@ -48,6 +48,21 @@ void GetScreenSize( int& width, int& height )
   ecore_wl_screen_size_get( &width, &height );
 }
 
+bool SetKeyboardRepeatInfo( float rate, float delay )
+{
+  return ecore_wl_keyboard_repeat_info_set( static_cast<double>( rate ), static_cast<double>( delay ) );
+}
+
+bool GetKeyboardRepeatInfo( float& rate, float& delay )
+{
+  double rateVal, delayVal;
+  bool ret = ecore_wl_keyboard_repeat_info_get( &rateVal, &delayVal );
+  rate = static_cast<float>( rateVal );
+  delay = static_cast<float>( delayVal );
+
+  return ret;
+}
+
 } // namespace WindowSystem
 
 } // namespace Adaptor
index 5ccf6cd..2c733db 100644 (file)
@@ -17,6 +17,7 @@
 
 // INTERNAL HEADERS
 #include <dali/internal/window-system/common/window-system.h>
+#include <dali/devel-api/adaptor-framework/keyboard.h>
 
 // EXTERNAL_HEADERS
 #include <Ecore_Wl2.h>
@@ -52,6 +53,23 @@ void GetScreenSize( int& width, int& height )
   }
 }
 
+bool SetKeyboardRepeatInfo( float rate, float delay )
+{
+  Ecore_Wl2_Input* input = ecore_wl2_input_default_input_get( ecore_wl2_connected_display_get( NULL ) );
+  return ecore_wl2_input_keyboard_repeat_set( input, static_cast<double>( rate ), static_cast<double>( delay ) );
+}
+
+bool GetKeyboardRepeatInfo( float& rate, float& delay )
+{
+  Ecore_Wl2_Input* input = ecore_wl2_input_default_input_get( ecore_wl2_connected_display_get( NULL ) );
+  double rateVal, delayVal;
+  bool ret = ecore_wl2_input_keyboard_repeat_get( input, &rateVal, &delayVal );
+  rate = static_cast<float>( rateVal );
+  delay = static_cast<float>( delayVal );
+
+  return ret;
+}
+
 } // namespace WindowSystem
 
 } // namespace Adaptor
index f38402d..23341c5 100644 (file)
@@ -17,6 +17,7 @@
 
 // INTERNAL HEADERS
 #include <dali/internal/window-system/common/window-system.h>
+#include <dali/devel-api/adaptor-framework/keyboard.h>
 
 // EXTERNAL_HEADERS
 #include <Ecore_X.h>
@@ -48,6 +49,16 @@ void GetScreenSize( int& width, int& height )
   ecore_x_screen_size_get( ecore_x_default_screen_get(), &width, &height );
 }
 
+bool SetKeyboardRepeatInfo( float rate, float delay )
+{
+  return false;
+}
+
+bool GetKeyboardRepeatInfo( float& rate, float& delay )
+{
+  return false;
+}
+
 } // namespace WindowSystem
 
 } // namespace Adaptor
index a1e9b3e..4f6756d 100644 (file)
@@ -28,7 +28,7 @@ namespace Dali
 
 const unsigned int ADAPTOR_MAJOR_VERSION = 1;
 const unsigned int ADAPTOR_MINOR_VERSION = 3;
-const unsigned int ADAPTOR_MICRO_VERSION = 33;
+const unsigned int ADAPTOR_MICRO_VERSION = 34;
 const char * const ADAPTOR_BUILD_DATE    = __DATE__ " " __TIME__;
 
 #ifdef DEBUG_ENABLED
index 424c02c..d34beea 100644 (file)
@@ -19,7 +19,7 @@
 
 Name:       dali-adaptor
 Summary:    The DALi Tizen Adaptor
-Version:    1.3.33
+Version:    1.3.34
 Release:    1
 Group:      System/Libraries
 License:    Apache-2.0 and BSD-3-Clause and MIT