/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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 Dali
{
-
InputMethodContext::InputMethodContext() = default;
InputMethodContext::~InputMethodContext() = default;
InputMethodContext InputMethodContext::New()
{
- Internal::Adaptor::InputMethodContextPtr inputMethodContext = Internal::Adaptor::InputMethodContext::New();
+ return InputMethodContext::New(Actor());
+}
+
+InputMethodContext InputMethodContext::New(Actor actor)
+{
+ Internal::Adaptor::InputMethodContextPtr inputMethodContext = Internal::Adaptor::InputMethodContext::New(actor);
- if( inputMethodContext )
+ if(inputMethodContext)
{
inputMethodContext->Initialize();
}
- return InputMethodContext( inputMethodContext.Get() );
+ return InputMethodContext(inputMethodContext.Get());
}
-InputMethodContext::InputMethodContext( const InputMethodContext& inputMethodContext )
-: BaseHandle( inputMethodContext )
+InputMethodContext::InputMethodContext(const InputMethodContext& inputMethodContext)
+: BaseHandle(inputMethodContext)
{
}
-InputMethodContext& InputMethodContext::operator=( const InputMethodContext& inputMethodContext )
+InputMethodContext& InputMethodContext::operator=(const InputMethodContext& inputMethodContext)
{
- if( *this != inputMethodContext )
- {
- BaseHandle::operator=( inputMethodContext );
- }
- return *this;
+ if(*this != inputMethodContext)
+ {
+ BaseHandle::operator=(inputMethodContext);
+ }
+ return *this;
}
-InputMethodContext InputMethodContext::DownCast( BaseHandle handle )
+InputMethodContext InputMethodContext::DownCast(BaseHandle handle)
{
- return InputMethodContext( dynamic_cast< Internal::Adaptor::InputMethodContext* >( handle.GetObjectPtr() ) );
+ return InputMethodContext(dynamic_cast<Internal::Adaptor::InputMethodContext*>(handle.GetObjectPtr()));
}
void InputMethodContext::Finalize()
return Internal::Adaptor::InputMethodContext::GetImplementation(*this).RestoreAfterFocusLost();
}
-void InputMethodContext::SetRestoreAfterFocusLost( bool toggle )
+void InputMethodContext::SetRestoreAfterFocusLost(bool toggle)
{
- Internal::Adaptor::InputMethodContext::GetImplementation(*this).SetRestoreAfterFocusLost( toggle );
+ Internal::Adaptor::InputMethodContext::GetImplementation(*this).SetRestoreAfterFocusLost(toggle);
}
void InputMethodContext::Reset()
Internal::Adaptor::InputMethodContext::GetImplementation(*this).NotifyCursorPosition();
}
-void InputMethodContext::SetCursorPosition( unsigned int SetCursorPosition )
+void InputMethodContext::SetCursorPosition(unsigned int SetCursorPosition)
{
- Internal::Adaptor::InputMethodContext::GetImplementation(*this).SetCursorPosition( SetCursorPosition );
+ Internal::Adaptor::InputMethodContext::GetImplementation(*this).SetCursorPosition(SetCursorPosition);
}
unsigned int InputMethodContext::GetCursorPosition() const
return Internal::Adaptor::InputMethodContext::GetImplementation(*this).GetCursorPosition();
}
-void InputMethodContext::SetSurroundingText( const std::string& text )
+void InputMethodContext::SetSurroundingText(const std::string& text)
{
- Internal::Adaptor::InputMethodContext::GetImplementation(*this).SetSurroundingText( text );
+ Internal::Adaptor::InputMethodContext::GetImplementation(*this).SetSurroundingText(text);
}
const std::string& InputMethodContext::GetSurroundingText() const
return Internal::Adaptor::InputMethodContext::GetImplementation(*this).GetSurroundingText();
}
-void InputMethodContext::NotifyTextInputMultiLine( bool multiLine )
+void InputMethodContext::NotifyTextInputMultiLine(bool multiLine)
{
- Internal::Adaptor::InputMethodContext::GetImplementation(*this).NotifyTextInputMultiLine( multiLine );
+ Internal::Adaptor::InputMethodContext::GetImplementation(*this).NotifyTextInputMultiLine(multiLine);
}
InputMethodContext::TextDirection InputMethodContext::GetTextDirection()
return Internal::Adaptor::InputMethodContext::GetImplementation(*this).GetInputMethodArea();
}
-void InputMethodContext::ApplyOptions( const InputMethodOptions& options )
+void InputMethodContext::ApplyOptions(const InputMethodOptions& options)
{
- Internal::Adaptor::InputMethodContext::GetImplementation(*this).ApplyOptions( options );
+ Internal::Adaptor::InputMethodContext::GetImplementation(*this).ApplyOptions(options);
}
-void InputMethodContext::SetInputPanelData( const std::string& data )
+void InputMethodContext::SetInputPanelData(const std::string& data)
{
- Internal::Adaptor::InputMethodContext::GetImplementation(*this).SetInputPanelData( data );
+ Internal::Adaptor::InputMethodContext::GetImplementation(*this).SetInputPanelData(data);
}
-void InputMethodContext::GetInputPanelData( std::string& data )
+void InputMethodContext::GetInputPanelData(std::string& data)
{
- Internal::Adaptor::InputMethodContext::GetImplementation(*this).GetInputPanelData( data );
+ Internal::Adaptor::InputMethodContext::GetImplementation(*this).GetInputPanelData(data);
}
Dali::InputMethodContext::State InputMethodContext::GetInputPanelState()
return Internal::Adaptor::InputMethodContext::GetImplementation(*this).GetInputPanelState();
}
-void InputMethodContext::SetReturnKeyState( bool visible )
+void InputMethodContext::SetReturnKeyState(bool visible)
{
- Internal::Adaptor::InputMethodContext::GetImplementation(*this).SetReturnKeyState( visible );
+ Internal::Adaptor::InputMethodContext::GetImplementation(*this).SetReturnKeyState(visible);
}
-void InputMethodContext::AutoEnableInputPanel( bool enabled )
+void InputMethodContext::AutoEnableInputPanel(bool enabled)
{
- Internal::Adaptor::InputMethodContext::GetImplementation(*this).AutoEnableInputPanel( enabled );
+ Internal::Adaptor::InputMethodContext::GetImplementation(*this).AutoEnableInputPanel(enabled);
}
void InputMethodContext::ShowInputPanel()
return Internal::Adaptor::InputMethodContext::GetImplementation(*this).GetInputPanelLocale();
}
-bool InputMethodContext::FilterEventKey( const Dali::KeyEvent& keyEvent )
+void InputMethodContext::SetContentMIMETypes(const std::string& mimeTypes)
{
- return Internal::Adaptor::InputMethodContext::GetImplementation(*this).FilterEventKey( keyEvent );
+ Internal::Adaptor::InputMethodContext::GetImplementation(*this).SetContentMIMETypes(mimeTypes);
}
-void InputMethodContext::AllowTextPrediction( bool prediction )
+bool InputMethodContext::FilterEventKey(const Dali::KeyEvent& keyEvent)
{
- Internal::Adaptor::InputMethodContext::GetImplementation(*this).AllowTextPrediction( prediction );
+ return Internal::Adaptor::InputMethodContext::GetImplementation(*this).FilterEventKey(keyEvent);
+}
+
+void InputMethodContext::AllowTextPrediction(bool prediction)
+{
+ Internal::Adaptor::InputMethodContext::GetImplementation(*this).AllowTextPrediction(prediction);
}
bool InputMethodContext::IsTextPredictionAllowed() const
return Internal::Adaptor::InputMethodContext::GetImplementation(*this).IsTextPredictionAllowed();
}
-void InputMethodContext::SetInputPanelLanguage( Dali::InputMethodContext::InputPanelLanguage language )
+void InputMethodContext::SetInputPanelLanguage(Dali::InputMethodContext::InputPanelLanguage language)
{
- Internal::Adaptor::InputMethodContext::GetImplementation(*this).SetInputPanelLanguage( language );
+ Internal::Adaptor::InputMethodContext::GetImplementation(*this).SetInputPanelLanguage(language);
}
Dali::InputMethodContext::InputPanelLanguage InputMethodContext::GetInputPanelLanguage() const
return Internal::Adaptor::InputMethodContext::GetImplementation(*this).GetInputPanelLanguage();
}
+void InputMethodContext::SetInputPanelPosition(unsigned int x, unsigned int y)
+{
+ Internal::Adaptor::InputMethodContext::GetImplementation(*this).SetInputPanelPosition(x, y);
+}
+
+bool InputMethodContext::SetInputPanelPositionAlign(int x, int y, Dali::InputMethodContext::InputPanelAlign align)
+{
+ return Internal::Adaptor::InputMethodContext::GetImplementation(*this).SetInputPanelPositionAlign(x, y, align);
+}
+
+void InputMethodContext::GetPreeditStyle(PreEditAttributeDataContainer& attrs) const
+{
+ Internal::Adaptor::InputMethodContext::GetImplementation(*this).GetPreeditStyle(attrs);
+}
+
// Signals
InputMethodContext::ActivatedSignalType& InputMethodContext::ActivatedSignal()
{
return Internal::Adaptor::InputMethodContext::GetImplementation(*this).KeyboardTypeChangedSignal();
}
-InputMethodContext::InputMethodContext(Internal::Adaptor::InputMethodContext *impl)
- : BaseHandle(impl)
+InputMethodContext::ContentReceivedSignalType& InputMethodContext::ContentReceivedSignal()
+{
+ return Internal::Adaptor::InputMethodContext::GetImplementation(*this).ContentReceivedSignal();
+}
+
+InputMethodContext::InputMethodContext(Internal::Adaptor::InputMethodContext* impl)
+: BaseHandle(impl)
{
}
} // namespace Dali