- Moved all InputMethod enumerations from devel API to public API.
Change-Id: Ia1e728a640d7cc799ba5524510339dc41ea478c4
Signed-off-by: Seoyeon Kim <seoyeon2.kim@samsung.com>
+++ /dev/null
-#ifndef __DALI_INPUT_MEHTOD_DEVEL_H__
-#define __DALI_INPUT_MEHTOD_DEVEL_H__
-
-/*
- * 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.
- *
- */
-
-// EXTERNAL INCLUDES
-#include <dali/public-api/common/dali-common.h>
-
-namespace Dali
-{
-/**
- * @addtogroup dali_adaptor_framework
- * @{
- */
-namespace InputMethod
-{
-
-/**
- * @brief SetType that can be changed in the system Input Method
- *
- * Key types of map to change virtual keyboard settings in INPUT_METHOD_SETTINGS property
- *
- */
-namespace Category
-{
- enum Type
- {
- PANEL_LAYOUT, ///< Set Keyboard layout
- ACTION_BUTTON_TITLE, ///< Set Action button title
- AUTO_CAPITALISE, ///< Set Auto capitalise of input
- VARIATION, ///< Set variation
- };
-}
-
-/**
- * @brief Autocapitalization Types
- *
- */
-namespace AutoCapital
-{
- enum Type
- {
- NONE, ///< No auto-capitalization when typing
- WORD, ///< Autocapitalize each word typed
- SENTENCE, ///< Autocapitalize the start of each sentence
- ALLCHARACTER, ///< Autocapitalize all letters
- };
-}
-
-/**
- * @brief Input panel (virtual keyboard) layout types.
- *
- */
-namespace PanelLayout
-{
- enum Type
- {
- NORMAL, ///< Default layout
- NUMBER, ///< Number layout
- EMAIL, ///< Email layout
- URL, ///< URL layout
- PHONENUMBER, ///< Phone Number layout
- IP, ///< IP layout
- MONTH, ///< Month layout
- NUMBERONLY, ///< Number Only layout
- HEX, ///< Hexadecimal layout
- TERMINAL, ///< Command-line terminal layout including ESC, Alt, Ctrl key, so on (no auto-correct, no auto-capitalization)
- PASSWORD, ///< Like normal, but no auto-correct, no auto-capitalization etc
- DATETIME, ///< Date and time layout
- EMOTICON, ///< Emoticon layout
- };
-}
-
-/**
- * @brief Specifies what the Input Method "action" button functionality is set to.
- *
- * The 'Action' button is traditionally the [RETURN] or [DONE] button.
- *
- */
-namespace ActionButtonTitle
-{
- enum Type
- {
- DEFAULT, ///< Default action
- DONE, ///< Done
- GO, ///< Go action
- JOIN, ///< Join action
- LOGIN, ///< Login action
- NEXT, ///< Next action
- PREVIOUS, ///< Previous action
- SEARCH, ///< Search action
- SEND, ///< Send action
- SIGNIN, ///< Sign in action
- UNSPECIFIED, ///< Unspecified action
- NONE ///< Nothing to do
- };
-}
-
-/**
- * @brief Available variation for Normal layout
- *
- *
- */
-namespace NormalLayout
-{
- enum Type
- {
- NORMAL, ///< The plain normal layout
- WITH_FILENAME, ///< Filename layout. Symbols such as '/' should be disabled
- WITH_PERSON_NAME ///< The name of a person
- };
-}
-
-/**
- * @brief Available variation for Number only layout
- *
- *
- */
-namespace NumberOnlyLayout
-{
- enum Type
- {
- NORMAL, ///< The plain normal number layout
- WITH_SIGNED, ///< The number layout to allow a positive or negative sign at the start
- WITH_DECIMAL, ///< The number layout to allow decimal point to provide fractional value
- WITH_SIGNED_AND_DECIMAL ///< The number layout to allow decimal point and negative sign
- };
-}
-
-/**
- * @brief Available variation for Password layout
- *
- *
- */
-namespace PasswordLayout
-{
- enum Type
- {
- NORMAL, ///< The normal password layout
- WITH_NUMBERONLY ///< The password layout to allow only number
- };
-}
-
-} // namespace InputMethod
-
-/**
- * @}
- */
-} // namespace Dali
-
-#endif // __DALI_INPUT_MEHTOD_DEVEL_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.
// CLASS HEADER
#include <dali/devel-api/adaptor-framework/input-method-options.h>
-// INTERNAL INCLUDES
-#include <dali/devel-api/adaptor-framework/input-method-devel.h>
-
using namespace Dali::InputMethod;
using namespace Dali::InputMethod::Category;
{
mPanelLayout = PanelLayout::NORMAL;
mAutoCapital = AutoCapital::SENTENCE;
- mActionButton = ActionButtonTitle::DEFAULT;
+ mButtonAction = ButtonAction::DEFAULT;
mVariation = NormalLayout::NORMAL;
}
PanelLayout::Type mPanelLayout;
AutoCapital::Type mAutoCapital;
- ActionButtonTitle::Type mActionButton;
+ ButtonAction::Type mButtonAction;
int mVariation:4;
};
mImpl->mPanelLayout = static_cast<InputMethod::PanelLayout::Type>(value);
}
}
- else if ( key == TOKEN_STRING( AUTO_CAPITALISE ) )
+ else if ( key == TOKEN_STRING( BUTTON_ACTION ) )
{
if ( item.GetType() == Property::INTEGER )
{
int value = item.Get< int >();
- mImpl->mAutoCapital = static_cast<InputMethod::AutoCapital::Type>(value);
+ mImpl->mButtonAction = static_cast<InputMethod::ButtonAction::Type>(value);
}
}
- else if ( key == TOKEN_STRING( ACTION_BUTTON ) )
+ else if ( key == TOKEN_STRING( AUTO_CAPITALIZE ) )
{
if ( item.GetType() == Property::INTEGER )
{
int value = item.Get< int >();
- mImpl->mActionButton = static_cast<InputMethod::ActionButtonTitle::Type>(value);
+ mImpl->mAutoCapital = static_cast<InputMethod::AutoCapital::Type>(value);
}
}
else if( key == TOKEN_STRING( VARIATION ) )
void InputMethodOptions::RetrieveProperty( Property::Map& settings )
{
settings[TOKEN_STRING( PANEL_LAYOUT )] = mImpl->mPanelLayout;
- settings[TOKEN_STRING( AUTO_CAPITALISE )] = mImpl->mAutoCapital;
- settings[TOKEN_STRING( ACTION_BUTTON )] = mImpl->mActionButton;
+ settings[TOKEN_STRING( BUTTON_ACTION )] = mImpl->mButtonAction;
+ settings[TOKEN_STRING( AUTO_CAPITALIZE )] = mImpl->mAutoCapital;
settings[TOKEN_STRING( VARIATION )] = mImpl->mVariation;
}
}
break;
}
- case AUTO_CAPITALISE:
+ case BUTTON_ACTION:
{
- if ( options.mImpl->mAutoCapital != mImpl->mAutoCapital )
+ if ( options.mImpl->mButtonAction != mImpl->mButtonAction )
{
- mImpl->mAutoCapital = options.mImpl->mAutoCapital;
- index = static_cast<int>(mImpl->mAutoCapital);
+ mImpl->mButtonAction = options.mImpl->mButtonAction;
+ index = static_cast<int>(mImpl->mButtonAction);
updated = true;
}
break;
}
- case ACTION_BUTTON_TITLE:
+ case AUTO_CAPITALIZE:
{
- if ( options.mImpl->mActionButton != mImpl->mActionButton )
+ if ( options.mImpl->mAutoCapital != mImpl->mAutoCapital )
{
- mImpl->mActionButton = options.mImpl->mActionButton;
- index = static_cast<int>(mImpl->mActionButton);
+ mImpl->mAutoCapital = options.mImpl->mAutoCapital;
+ index = static_cast<int>(mImpl->mAutoCapital);
updated = true;
}
break;
#define __DALI_VIRTUAL_KEYBOARD_OPTIONS_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.
#include <dali/public-api/object/property-map.h>
// INTERNAL INCLUDES
-#include <dali/devel-api/adaptor-framework/input-method-devel.h>
+#include <dali/public-api/adaptor-framework/input-method.h>
namespace Dali
{
/*
- * 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.
Internal::Adaptor::VirtualKeyboard::ApplySettings( settingsMap );
}
-void SetReturnKeyType( const InputMethod::ActionButton type )
+void SetReturnKeyType( const InputMethod::ButtonAction::Type type )
{
Internal::Adaptor::VirtualKeyboard::SetReturnKeyType( type );
}
-InputMethod::ActionButton GetReturnKeyType()
+InputMethod::ButtonAction::Type GetReturnKeyType()
{
return Internal::Adaptor::VirtualKeyboard::GetReturnKeyType();
}
#define __DALI_VIRTUAL_KEYBOARD_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.
* @brief Set the specific return key into the virtual keyboard.
* @param[in] type the kind of return key types.
*/
-DALI_IMPORT_API void SetReturnKeyType( const InputMethod::ActionButton type );
+DALI_IMPORT_API void SetReturnKeyType( const InputMethod::ButtonAction::Type type );
/**
* @brief Retrieve the current return key type.
* @return the type of retun key.
*/
-DALI_IMPORT_API InputMethod::ActionButton GetReturnKeyType();
+DALI_IMPORT_API InputMethod::ButtonAction::Type GetReturnKeyType();
/**
* @brief Enable/disable prediction (predictive text).
$(adaptor_devel_api_dir)/adaptor-framework/image-loading.h \
$(adaptor_devel_api_dir)/adaptor-framework/gif-loading.h \
$(adaptor_devel_api_dir)/adaptor-framework/imf-manager.h \
- $(adaptor_devel_api_dir)/adaptor-framework/input-method-devel.h \
$(adaptor_devel_api_dir)/adaptor-framework/input-method-options.h \
$(adaptor_devel_api_dir)/adaptor-framework/lifecycle-controller.h \
$(adaptor_devel_api_dir)/adaptor-framework/orientation.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
-
+
devel_api_text_abstraction_src_files = \
$(adaptor_devel_api_dir)/text-abstraction/bidirectional-support.cpp \
$(adaptor_devel_api_dir)/text-abstraction/font-client.cpp \
#define __DALI_INTERNAL_VIRTUAL_KEYBOARD_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.
/**
* @copydoc Dali::VirtualKeyboard::SetReturnKeyType()
*/
-void SetReturnKeyType( const Dali::InputMethod::ActionButton type );
+void SetReturnKeyType( const Dali::InputMethod::ButtonAction::Type type );
/**
* @copydoc Dali::VirtualKeyboard::GetReturnKeyType()
*/
-Dali::InputMethod::ActionButton GetReturnKeyType();
+Dali::InputMethod::ButtonAction::Type GetReturnKeyType();
/**
* @copydoc Dali::VirtualKeyboard::EnablePrediction()
Property::Value item = settingsMap.GetValue(i);
- if ( key == TOKEN_STRING( ACTION_BUTTON ) )
+ if ( key == TOKEN_STRING( BUTTON_ACTION ) )
{
if ( item.GetType() == Property::INTEGER )
{
int value = item.Get< int >();
- VirtualKeyboard::SetReturnKeyType( static_cast<InputMethod::ActionButton>(value) );
+ VirtualKeyboard::SetReturnKeyType( static_cast<InputMethod::ButtonAction::Type>(value) );
}
}
else
#include <dali/integration-api/debug.h>
// INTERNAL INCLUDES
-#include <dali/devel-api/adaptor-framework/input-method-devel.h>
#include <dali/integration-api/adaptor.h>
#include <dali/internal/system/common/locale-utils.h>
#include <dali/internal/window-system/tizen-wayland/window-render-surface-ecore-wl.h>
#include <dali/internal/adaptor/common/adaptor-impl.h>
#include <dali/internal/system/common/singleton-service-impl.h>
+#include <dali/public-api/adaptor-framework/input-method.h>
#define TOKEN_STRING(x) #x
{
ecore_imf_context_input_panel_layout_set( mIMFContext, panelLayoutMap[index] );
}
- if ( mOptions.CompareAndSet(AUTO_CAPITALISE, options, index) )
+ if ( mOptions.CompareAndSet(BUTTON_ACTION, options, index) )
{
- ecore_imf_context_autocapital_type_set( mIMFContext, autoCapitalMap[index] );
+ ecore_imf_context_input_panel_return_key_type_set( mIMFContext, returnKeyTypeMap[index] );
}
- if ( mOptions.CompareAndSet(ACTION_BUTTON_TITLE, options, index) )
+ if ( mOptions.CompareAndSet(AUTO_CAPITALIZE, options, index) )
{
- ecore_imf_context_input_panel_return_key_type_set( mIMFContext, returnKeyTypeMap[index] );
+ ecore_imf_context_autocapital_type_set( mIMFContext, autoCapitalMap[index] );
}
if ( mOptions.CompareAndSet(VARIATION, options, index) )
{
/*
- * Copyright (c) 2014 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.
namespace VirtualKeyboard
{
-Dali::InputMethod::ActionButton gActionButtonFunction = Dali::InputMethod::ACTION_DEFAULT;
+Dali::InputMethod::ButtonAction::Type gButtonActionFunction = Dali::InputMethod::ButtonAction::DEFAULT;
-Ecore_IMF_Input_Panel_Return_Key_Type actionButtonMapping(Dali::InputMethod::ActionButton actionButton )
+Ecore_IMF_Input_Panel_Return_Key_Type buttonActionMapping(Dali::InputMethod::ButtonAction::Type buttonAction )
{
- switch( actionButton )
+ switch( buttonAction )
{
- case InputMethod::ACTION_DEFAULT: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT;
- case InputMethod::ACTION_DONE: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DONE;
- case InputMethod::ACTION_GO: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_GO;
- case InputMethod::ACTION_JOIN: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_JOIN;
- case InputMethod::ACTION_LOGIN: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_LOGIN;
- case InputMethod::ACTION_NEXT: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_NEXT;
- case InputMethod::ACTION_PREVIOUS: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT;
- case InputMethod::ACTION_SEARCH: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_SEARCH;
- case InputMethod::ACTION_SEND: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_SEND;
- case InputMethod::ACTION_SIGNIN: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT;
- case InputMethod::ACTION_UNSPECIFIED: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT;
- case InputMethod::ACTION_NONE: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT;
- default: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT;
+ case InputMethod::ButtonAction::DEFAULT: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT;
+ case InputMethod::ButtonAction::DONE: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DONE;
+ case InputMethod::ButtonAction::GO: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_GO;
+ case InputMethod::ButtonAction::JOIN: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_JOIN;
+ case InputMethod::ButtonAction::LOGIN: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_LOGIN;
+ case InputMethod::ButtonAction::NEXT: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_NEXT;
+ case InputMethod::ButtonAction::PREVIOUS: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT;
+ case InputMethod::ButtonAction::SEARCH: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_SEARCH;
+ case InputMethod::ButtonAction::SEND: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_SEND;
+ case InputMethod::ButtonAction::SIGNIN: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT;
+ case InputMethod::ButtonAction::UNSPECIFIED: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT;
+ case InputMethod::ButtonAction::NONE: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT;
+ default: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT;
}
}
{
}
-void SetReturnKeyType( const InputMethod::ActionButton type )
+void SetReturnKeyType( const InputMethod::ButtonAction::Type type )
{
Dali::ImfManager imfManager = ImfManager::Get(); // Create ImfManager instance (if required) when setting values
Ecore_IMF_Context* imfContext = reinterpret_cast<Ecore_IMF_Context*>(ImfManager::GetImplementation( imfManager ).GetContext());
if( imfContext )
{
- gActionButtonFunction = type;
- ecore_imf_context_input_panel_return_key_type_set( imfContext, actionButtonMapping( type ) );
+ gButtonActionFunction = type;
+ ecore_imf_context_input_panel_return_key_type_set( imfContext, buttonActionMapping( type ) );
}
}
-Dali::InputMethod::ActionButton GetReturnKeyType()
+Dali::InputMethod::ButtonAction::Type GetReturnKeyType()
{
- return gActionButtonFunction;
+ return gButtonActionFunction;
}
} // namespace VirtualKeyboard
if ( mOptions.CompareAndSet(PANEL_LAYOUT, options, index) )
{
}
- if ( mOptions.CompareAndSet(AUTO_CAPITALISE, options, index) )
+ if ( mOptions.CompareAndSet(BUTTON_ACTION, options, index) )
{
}
- if ( mOptions.CompareAndSet(ACTION_BUTTON_TITLE, options, index) )
+ if ( mOptions.CompareAndSet(AUTO_CAPITALIZE, options, index) )
{
}
if ( mOptions.CompareAndSet(VARIATION, options, index) )
/*
- * Copyright (c) 2014 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.
namespace VirtualKeyboard
{
-Dali::InputMethod::ActionButton gActionButtonFunction = Dali::InputMethod::ACTION_DEFAULT;
+Dali::InputMethod::ButtonAction::Type gButtonActionFunction = Dali::InputMethod::ButtonAction::DEFAULT;
-Ecore_IMF_Input_Panel_Return_Key_Type actionButtonMapping(Dali::InputMethod::ActionButton actionButton )
+Ecore_IMF_Input_Panel_Return_Key_Type buttonActionMapping(Dali::InputMethod::ButtonAction::Type buttonAction )
{
- switch( actionButton )
+ switch( buttonAction )
{
- case InputMethod::ACTION_DEFAULT: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT;
- case InputMethod::ACTION_DONE: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DONE;
- case InputMethod::ACTION_GO: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_GO;
- case InputMethod::ACTION_JOIN: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_JOIN;
- case InputMethod::ACTION_LOGIN: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_LOGIN;
- case InputMethod::ACTION_NEXT: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_NEXT;
- case InputMethod::ACTION_PREVIOUS: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT;
- case InputMethod::ACTION_SEARCH: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_SEARCH;
- case InputMethod::ACTION_SEND: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_SEND;
- case InputMethod::ACTION_SIGNIN: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT;
- case InputMethod::ACTION_UNSPECIFIED: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT;
- case InputMethod::ACTION_NONE: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT;
- default: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT;
+ case InputMethod::ButtonAction::DEFAULT: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT;
+ case InputMethod::ButtonAction::DONE: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DONE;
+ case InputMethod::ButtonAction::GO: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_GO;
+ case InputMethod::ButtonAction::JOIN: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_JOIN;
+ case InputMethod::ButtonAction::LOGIN: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_LOGIN;
+ case InputMethod::ButtonAction::NEXT: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_NEXT;
+ case InputMethod::ButtonAction::PREVIOUS: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT;
+ case InputMethod::ButtonAction::SEARCH: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_SEARCH;
+ case InputMethod::ButtonAction::SEND: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_SEND;
+ case InputMethod::ButtonAction::SIGNIN: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT;
+ case InputMethod::ButtonAction::UNSPECIFIED: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT;
+ case InputMethod::ButtonAction::NONE: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT;
+ default: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT;
}
}
}
}
-void SetReturnKeyType( const InputMethod::ActionButton type )
+void SetReturnKeyType( const InputMethod::ButtonAction::Type type )
{
Dali::ImfManager imfManager = ImfManager::Get(); // Create ImfManager instance (if required) when setting values
Ecore_IMF_Context* imfContext = reinterpret_cast<Ecore_IMF_Context*>(ImfManager::GetImplementation( imfManager ).GetContext());
if( imfContext )
{
- gActionButtonFunction = type;
- ecore_imf_context_input_panel_return_key_type_set( imfContext, actionButtonMapping( type ) );
+ gButtonActionFunction = type;
+ ecore_imf_context_input_panel_return_key_type_set( imfContext, buttonActionMapping( type ) );
}
}
-Dali::InputMethod::ActionButton GetReturnKeyType()
+Dali::InputMethod::ButtonAction::Type GetReturnKeyType()
{
- return gActionButtonFunction;
+ return gButtonActionFunction;
}
} // namespace VirtualKeyboard
#define __DALI_INPUT_MEHTOD_H__
/*
- * Copyright (c) 2015 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.
*/
namespace InputMethod
{
+
+/**
+ * @brief Enumeration for settings that can be changed in the system Input Method.
+ *
+ * Key types of map to change virtual keyboard settings in INPUT_METHOD_SETTINGS property.
+ * @SINCE_1_3.20
+ */
+namespace Category
+{
+
+/**
+* @brief Enumeration for Category type.
+*
+* @SINCE_1_3.20
+*/
+enum Type
+{
+ PANEL_LAYOUT, ///< Set Keyboard layout @SINCE_1_3.20
+ BUTTON_ACTION, ///< Set Button Action @SINCE_1_3.20
+ AUTO_CAPITALIZE, ///< Set Auto capitalize of input @SINCE_1_3.20
+ VARIATION ///< Set variation @SINCE_1_3.20
+};
+
+} // namespace Category
+
+///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+/////////////////////////// The enumerations below is to set each type of Category. ///////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/**
+ * @brief Sets Input panel (virtual keyboard) layout types.
+ *
+ * @SINCE_1_3.20
+ */
+namespace PanelLayout
+{
+
+/**
+* @brief Enumeration for PanelLayout type.
+*
+* @SINCE_1_3.20
+*/
+enum Type
+{
+ NORMAL, ///< Default layout @SINCE_1_3.20
+ NUMBER, ///< Number layout @SINCE_1_3.20
+ EMAIL, ///< Email layout @SINCE_1_3.20
+ URL, ///< URL layout @SINCE_1_3.20
+ PHONENUMBER, ///< Phone Number layout @SINCE_1_3.20
+ IP, ///< IP layout @SINCE_1_3.20
+ MONTH, ///< Month layout @SINCE_1_3.20
+ NUMBER_ONLY, ///< Number Only layout @SINCE_1_3.20
+ HEX, ///< Hexadecimal layout @SINCE_1_3.20
+ TERMINAL, ///< Command-line terminal layout including ESC, Alt, Ctrl key, so on (no auto-correct, no auto-capitalization) @SINCE_1_3.20
+ PASSWORD, ///< Like normal, but no auto-correct, no auto-capitalization etc @SINCE_1_3.20
+ DATE_TIME, ///< Date and time layout @SINCE_1_3.20
+ EMOTICON ///< Emoticon layout @SINCE_1_3.20
+};
+
+} // namespace PanelLayout
+
+/**
+ * @brief Enumeration for specifying what the Input Method "action" button functionality is set to.
+ *
+ * The 'Action' button is traditionally the [RETURN] or [DONE] button.
+ * Not all these actions are supported by all systems.
+ * Setting a custom label will still require one of these actions to be set.
+ * @SINCE_1_3.20
+ */
+namespace ButtonAction
+{
+
+/**
+* @brief Enumeration for ButtonAction type.
+*
+* @SINCE_1_3.20
+*/
+enum Type
+{
+ DEFAULT, ///< Default action @SINCE_1_3.20
+ DONE, ///< Done @SINCE_1_3.20
+ GO, ///< Go action @SINCE_1_3.20
+ JOIN, ///< Join action @SINCE_1_3.20
+ LOGIN, ///< Login action @SINCE_1_3.20
+ NEXT, ///< Next action @SINCE_1_3.20
+ PREVIOUS, ///< Previous action @SINCE_1_3.20
+ SEARCH, ///< Search action @SINCE_1_3.20
+ SEND, ///< Send action @SINCE_1_3.20
+ SIGNIN, ///< Sign in action @SINCE_1_3.20
+ UNSPECIFIED, ///< Unspecified action @SINCE_1_3.20
+ NONE ///< Nothing to do @SINCE_1_3.20
+};
+
+} // namespace ButtonAction
+
+
+/**
+ * @brief Sets Autocapitalization Types.
+ *
+ * @SINCE_1_3.20
+ */
+namespace AutoCapital
+{
+
+/**
+* @brief Enumeration for AutoCapital type.
+*
+* @SINCE_1_3.20
+*/
+enum Type
+{
+ NONE, ///< No auto-capitalization when typing @SINCE_1_3.20
+ WORD, ///< Autocapitalize each word typed @SINCE_1_3.20
+ SENTENCE, ///< Autocapitalize the start of each sentence @SINCE_1_3.20
+ ALL_CHARACTER ///< Autocapitalize all letters @SINCE_1_3.20
+};
+
+} // namespace AutoCapital
+
+
+/////////////////////////// VARIATION based on PANEL_LAYOUT //////////////////////////////////
+
+/**
+ * @brief Available variation for Normal layout.
+ *
+ * @SINCE_1_3.20
+ */
+namespace NormalLayout
+{
+
+/**
+* @brief Enumeration for NormalLayout Variation type.
+*
+* @SINCE_1_3.20
+*/
+enum Type
+{
+ NORMAL, ///< The plain normal layout @SINCE_1_3.20
+ WITH_FILENAME, ///< Filename layout. Symbols such as '/' should be disabled @SINCE_1_3.20
+ WITH_PERSON_NAME ///< The name of a person @SINCE_1_3.20
+};
+
+} // namespace NormalLayout
+
+/**
+ * @brief Available variation for Number only layout.
+ *
+ * @SINCE_1_3.20
+ */
+namespace NumberOnlyLayout
+{
+
+/**
+* @brief Enumeration for NumberOnlyLayout Variation type.
+*
+* @SINCE_1_3.20
+*/
+enum Type
+{
+ NORMAL, ///< The plain normal number layout @SINCE_1_3.20
+ WITH_SIGNED, ///< The number layout to allow a positive or negative sign at the start @SINCE_1_3.20
+ WITH_DECIMAL, ///< The number layout to allow decimal point to provide fractional value @SINCE_1_3.20
+ WITH_SIGNED_AND_DECIMAL ///< The number layout to allow decimal point and negative sign @SINCE_1_3.20
+};
+
+} // namespace NumberOnlyLayout
+
+/**
+ * @brief Available variation for Password layout.
+ *
+ * @SINCE_1_3.20
+ */
+namespace PasswordLayout
+{
+
+/**
+* @brief Enumeration for PasswordLayout Variation type.
+*
+* @SINCE_1_3.20
+*/
+enum Type
+{
+ NORMAL, ///< The normal password layout @SINCE_1_3.20
+ WITH_NUMBER_ONLY ///< The password layout to allow only number @SINCE_1_3.20
+};
+
+} // namespace PasswordLayout
+
+
/**
+ * @DEPRECATED_1_3.20 Use ButtonAction instead.
* @brief Enumeration for specifying what the Input Method "action" button functionality is set to.
*
* The 'Action' button is traditionally the [RETURN] or [DONE] button.
};
/**
+ * @DEPRECATED_1_3.20 Use Category instead.
* @brief Enumeration for settings that can be changed in the system Input Method.
*
* Not all these settings are supported by all systems.