From b3a12a6b9bacdbb9f8c4c55dfe2c3ce81c94c96e Mon Sep 17 00:00:00 2001 From: Seoyeon Kim Date: Mon, 28 May 2018 15:15:36 +0900 Subject: [PATCH] [4.0] Add to set / get Keyboard Repeat value - Added to set and get keyboard repeat information in ecore wayland Change-Id: I209251e2da631e77ef9b016c79836828f4610bce Signed-off-by: Seoyeon Kim --- adaptors/ecore/wayland/file.list | 3 +- adaptors/ecore/wayland/keyboard-ecore-wl.cpp | 46 ++++++++++++++++++++ adaptors/tizen/file-3.list | 3 ++ adaptors/tizen/file.list | 3 ++ adaptors/tizen/keyboard.h | 63 ++++++++++++++++++++++++++++ build/tizen/adaptor/Makefile.am | 1 + 6 files changed, 118 insertions(+), 1 deletion(-) create mode 100755 adaptors/ecore/wayland/keyboard-ecore-wl.cpp create mode 100755 adaptors/tizen/keyboard.h diff --git a/adaptors/ecore/wayland/file.list b/adaptors/ecore/wayland/file.list index 23081e3..e2f8203 100644 --- a/adaptors/ecore/wayland/file.list +++ b/adaptors/ecore/wayland/file.list @@ -12,7 +12,8 @@ adaptor_ecore_wayland_tizen_internal_src_files = \ $(adaptor_ecore_wayland_dir)/virtual-keyboard-impl-ecore-wl.cpp \ $(adaptor_ecore_wayland_dir)/window-impl-ecore-wl.cpp \ $(adaptor_ecore_wayland_dir)/window-render-surface-ecore-wl.cpp \ - $(adaptor_ecore_wayland_dir)/key-grab-ecore-wl.cpp + $(adaptor_ecore_wayland_dir)/key-grab-ecore-wl.cpp \ + $(adaptor_ecore_wayland_dir)/keyboard-ecore-wl.cpp adaptor_ecore_wayland_tizen_common_internal_default_profile_src_files = \ $(adaptor_ecore_wayland_dir)/render-surface-factory-ecore-wl.cpp \ diff --git a/adaptors/ecore/wayland/keyboard-ecore-wl.cpp b/adaptors/ecore/wayland/keyboard-ecore-wl.cpp new file mode 100755 index 0000000..5653f86 --- /dev/null +++ b/adaptors/ecore/wayland/keyboard-ecore-wl.cpp @@ -0,0 +1,46 @@ +/* + * 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 + +// EXTERNAL INCLUDES +#include + + +namespace Dali +{ + +namespace Keyboard +{ + + +bool SetKeyboardRepeatInfo( double rate, double delay ) +{ + return ecore_wl_keyboard_repeat_info_set( rate, delay ); +} + +bool GetKeyboardRepeatInfo( double& rate, double& delay ) +{ + return ecore_wl_keyboard_repeat_info_get( &rate, &delay ); +} + + +} // namespace Keyboard + +} // namespace Dali + diff --git a/adaptors/tizen/file-3.list b/adaptors/tizen/file-3.list index e8d0224..fa8e657 100644 --- a/adaptors/tizen/file-3.list +++ b/adaptors/tizen/file-3.list @@ -24,3 +24,6 @@ adaptor_tizen_internal_native_image_src_files = \ public_api_adaptor_tizen_header_files = \ $(adaptor_tizen_dir)/key-grab.h + +devel_api_adaptor_tizen_header_files = \ + $(adaptor_tizen_dir)/keyboard.h diff --git a/adaptors/tizen/file.list b/adaptors/tizen/file.list index dbe41c9..53944f7 100644 --- a/adaptors/tizen/file.list +++ b/adaptors/tizen/file.list @@ -28,3 +28,6 @@ public_api_adaptor_tizen_header_files = \ adaptor_tizen_internal_capture_src_files = \ $(adaptor_tizen_dir)/capture-impl-tizen.cpp + +devel_api_adaptor_tizen_header_files = \ + $(adaptor_tizen_dir)/keyboard.h diff --git a/adaptors/tizen/keyboard.h b/adaptors/tizen/keyboard.h new file mode 100755 index 0000000..764e5ee --- /dev/null +++ b/adaptors/tizen/keyboard.h @@ -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 + +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_IMPORT_API bool SetKeyboardRepeatInfo( double rate, double 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_IMPORT_API bool GetKeyboardRepeatInfo( double& rate, double& delay ); + +} // namespace Keyboard + +/** + * @} + */ +} // namespace Dali + +#endif // __DALI_KEYBOARD_H__ diff --git a/build/tizen/adaptor/Makefile.am b/build/tizen/adaptor/Makefile.am index 2564c88..2bc0588 100644 --- a/build/tizen/adaptor/Makefile.am +++ b/build/tizen/adaptor/Makefile.am @@ -566,6 +566,7 @@ tizentextabstractiondevelapi_HEADERS = $(text_abstraction_header_files) if !UBUNTU_PROFILE tizenadaptorframeworkpublicapi_HEADERS += $(public_api_adaptor_tizen_header_files) +tizenadaptorframeworkdevelapi_HEADERS += $(devel_api_adaptor_tizen_header_files) if !WAYLAND tizenadaptorframeworkdevelapi_HEADERS += $(devel_api_adaptor_tizen_x11_header_files) -- 2.7.4