Internal::Adaptor::InputMethodContext::GetImplementation(*this).SetInputPanelPosition( x, y );
}
-Dali::InputMethodContext::PreeditStyle InputMethodContext::GetPreeditStyle() const
-{
- return Internal::Adaptor::InputMethodContext::GetImplementation(*this).GetPreeditStyle();
-}
-
// Signals
InputMethodContext::ActivatedSignalType& InputMethodContext::ActivatedSignal()
{
HARDWARE_KEYBOARD ///< Hardware keyboard
};
- /**
- * @brief Enumeration for the language mode of the input panel.
- */
enum class InputPanelLanguage
{
AUTOMATIC, ///< IME Language automatically set depending on the system display
};
/**
- * @brief Enumeration for the preedit style types.
- */
- enum class PreeditStyle
- {
- NONE, ///< None style
- UNDERLINE, ///< Underline substring style
- REVERSE, ///< Reverse substring style
- HIGHLIGHT ///< Highlight substring style
- };
-
- /**
* @brief This structure is used to pass on data from the InputMethodContext regarding predictive text.
*/
struct EventData
*/
void SetInputPanelPosition( unsigned int x, unsigned int y );
- /**
- * @brief Gets the preedit type.
- *
- * @return The preedit style type
- */
- PreeditStyle GetPreeditStyle() const;
-
public:
// Signals
*/
virtual void SetInputPanelPosition( unsigned int x, unsigned int y ) {}
- /**
- * @copydoc Dali::InputMethodContext::GetPreeditStyle()
- */
- virtual Dali::InputMethodContext::PreeditStyle GetPreeditStyle() const { return Dali::InputMethodContext::PreeditStyle(); }
-
public: // Signals
/**
mSurroundingText(),
mRestoreAfterFocusLost( false ),
mIdleCallbackConnected( false ),
- mPreeditType( Dali::InputMethodContext::PreeditStyle::NONE ),
mWindowId( GetWindowIdFromActor( actor ) )
{
ecore_imf_init();
// iterate through the list of attributes getting the type, start and end position.
for ( l = attrs, (attr = static_cast<Ecore_IMF_Preedit_Attr*>( eina_list_data_get(l) ) ); l; l = eina_list_next(l), ( attr = static_cast<Ecore_IMF_Preedit_Attr*>( eina_list_data_get(l) ) ))
{
- switch( attr->preedit_type )
- {
- case ECORE_IMF_PREEDIT_TYPE_NONE:
- {
- mPreeditType = Dali::InputMethodContext::PreeditStyle::NONE;
- break;
- }
- case ECORE_IMF_PREEDIT_TYPE_SUB1:
- {
- mPreeditType = Dali::InputMethodContext::PreeditStyle::UNDERLINE;
- break;
- }
- case ECORE_IMF_PREEDIT_TYPE_SUB2:
- {
- mPreeditType = Dali::InputMethodContext::PreeditStyle::REVERSE;
- break;
- }
- case ECORE_IMF_PREEDIT_TYPE_SUB3:
- {
- mPreeditType = Dali::InputMethodContext::PreeditStyle::HIGHLIGHT;
- break;
- }
- default:
- {
- break;
- }
- }
-
#ifdef DALI_PROFILE_UBUNTU
if ( attr->preedit_type == ECORE_IMF_PREEDIT_TYPE_SUB3 ) // (Ecore_IMF)
#else // DALI_PROFILE_UBUNTU
}
}
-Dali::InputMethodContext::PreeditStyle InputMethodContextEcoreWl::GetPreeditStyle() const
-{
- DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextEcoreWl::GetPreeditStyle\n" );
- return mPreeditType;
-}
-
bool InputMethodContextEcoreWl::ProcessEventKeyDown( const KeyEvent& keyEvent )
{
bool eventHandled( false );
*/
void SetInputPanelPosition( unsigned int x, unsigned int y ) override;
- /**
- * @copydoc Dali::InputMethodContext::GetPreeditStyle()
- */
- Dali::InputMethodContext::PreeditStyle GetPreeditStyle() const override;
-
private:
/**
* Context created the first time and kept until deleted.
std::vector<Dali::Integration::KeyEvent> mKeyEvents; ///< Stores key events to be sent from idle call-back.
InputMethodOptions mOptions;
- Dali::InputMethodContext::PreeditStyle mPreeditType;
int mWindowId;
};
mIMFCursorPosition( 0 ),
mSurroundingText(),
mRestoreAfterFocusLost( false ),
- mIdleCallbackConnected( false ),
- mPreeditType( Dali::InputMethodContext::PreeditStyle::NONE )
+ mIdleCallbackConnected( false )
{
ecore_imf_init();
// iterate through the list of attributes getting the type, start and end position.
for ( l = attrs, (attr = static_cast<Ecore_IMF_Preedit_Attr*>( eina_list_data_get(l) ) ); l; l = eina_list_next(l), ( attr = static_cast<Ecore_IMF_Preedit_Attr*>( eina_list_data_get(l) ) ))
{
- switch( attr->preedit_type )
- {
- case ECORE_IMF_PREEDIT_TYPE_NONE:
- {
- mPreeditType = Dali::InputMethodContext::PreeditStyle::NONE;
- break;
- }
- case ECORE_IMF_PREEDIT_TYPE_SUB1:
- {
- mPreeditType = Dali::InputMethodContext::PreeditStyle::UNDERLINE;
- break;
- }
- case ECORE_IMF_PREEDIT_TYPE_SUB2:
- {
- mPreeditType = Dali::InputMethodContext::PreeditStyle::REVERSE;
- break;
- }
- case ECORE_IMF_PREEDIT_TYPE_SUB3:
- {
- mPreeditType = Dali::InputMethodContext::PreeditStyle::HIGHLIGHT;
- break;
- }
- default:
- {
- break;
- }
- }
-
#ifdef DALI_PROFILE_UBUNTU
if ( attr->preedit_type == ECORE_IMF_PREEDIT_TYPE_SUB3 ) // (Ecore_IMF)
#else // DALI_PROFILE_UBUNTU
// ecore_imf_context_input_panel_position_set() is supported from ecore-imf 1.21.0 version.
}
-Dali::InputMethodContext::PreeditStyle InputMethodContextX::GetPreeditStyle() const
-{
- DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextX::GetPreeditStyle\n" );
- return mPreeditType;
-}
-
bool InputMethodContextX::ProcessEventKeyDown( const KeyEvent& keyEvent )
{
bool eventHandled( false );
*/
void SetInputPanelPosition( unsigned int x, unsigned int y ) override;
- /**
- * @copydoc Dali::InputMethodContext::GetPreeditStyle()
- */
- Dali::InputMethodContext::PreeditStyle GetPreeditStyle() const override;
-
private:
/**
* Context created the first time and kept until deleted.
bool mRestoreAfterFocusLost:1; ///< Whether the keyboard needs to be restored (activated ) after focus regained.
bool mIdleCallbackConnected:1; ///< Whether the idle callback is already connected.
InputMethodOptions mOptions;
- Dali::InputMethodContext::PreeditStyle mPreeditType;
};
} // namespace Adaptor
mIMFCursorPosition( 0 ),\r
mSurroundingText(),\r
mRestoreAfterFocusLost( false ),\r
- mIdleCallbackConnected( false ),\r
- mPreeditType( Dali::InputMethodContext::PreeditStyle::NONE )\r
+ mIdleCallbackConnected( false )\r
{\r
\r
actor.OnStageSignal().Connect( this, &InputMethodContextWin::OnStaged );\r
DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextWin::SetInputPanelPosition\n" );\r
}\r
\r
-Dali::InputMethodContext::PreeditStyle InputMethodContextWin::GetPreeditStyle() const\r
-{\r
- DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextWin::GetPreeditStyle\n" );\r
- return mPreeditType;\r
-}\r
-\r
bool InputMethodContextWin::ProcessEventKeyDown( const KeyEvent& keyEvent )\r
{\r
bool eventHandled( false );\r
*/\r
void SetInputPanelPosition( unsigned int x, unsigned int y ) override;\r
\r
- /**\r
- * @copydoc Dali::InputMethodContext::GetPreeditStyle()\r
- */\r
- Dali::InputMethodContext::PreeditStyle GetPreeditStyle() const override;\r
-\r
private:\r
/**\r
* Context created the first time and kept until deleted.\r
bool mRestoreAfterFocusLost:1; ///< Whether the keyboard needs to be restored (activated ) after focus regained.\r
bool mIdleCallbackConnected:1; ///< Whether the idle callback is already connected.\r
InputMethodOptions mOptions;\r
- Dali::InputMethodContext::PreeditStyle mPreeditType;\r
};\r
\r
} // namespace Adaptor\r