-#ifndef __DALI_INTERNAL_INPUT_METHOD_CONTEXT_IMPL_X_H
-#define __DALI_INTERNAL_INPUT_METHOD_CONTEXT_IMPL_X_H
+#ifndef DALI_INTERNAL_INPUT_METHOD_CONTEXT_IMPL_X_H
+#define DALI_INTERNAL_INPUT_METHOD_CONTEXT_IMPL_X_H
/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
*/
// EXTERNAL INCLUDES
-#include <Ecore_IMF.h>
-#include <Ecore_X.h>
+#include <dali/internal/input/linux/dali-ecore-imf.h>
+#include <dali/internal/system/linux/dali-ecore-x.h>
#include <dali/public-api/object/base-object.h>
namespace Adaptor
{
-class InputMethodContextX : public Dali::Internal::Adaptor::InputMethodContext
+class InputMethodContextX : public Dali::Internal::Adaptor::InputMethodContext, public Dali::ConnectionTracker
{
public:
/**
* @brief Creates a new InputMethodContext handle
*
+ * @param[in] actor The actor that uses the new InputMethodContext instance.
* @return InputMethodContext pointer
*/
- static InputMethodContextPtr New();
+ static InputMethodContextPtr New( Dali::Actor actor );
/**
* Constructor
- * @param[in] ecoreXwin, The window is created by application.
+ * @param[in] actor The actor that uses the new InputMethodContext instance.
*/
- explicit InputMethodContextX( Ecore_X_Window ecoreXwin );
+ explicit InputMethodContextX( Dali::Actor actor );
public:
/**
* @copydoc Dali::InputMethodContext::PreEditChanged()
*/
- void PreEditChanged( void* data, ImfContext* imfContext, void* event_info ) override;
+ void PreEditChanged( void* data, ImfContext* imfContext, void* eventInfo ) override;
/**
* @copydoc Dali::InputMethodContext::NotifyCursorPosition()
*/
- void CommitReceived( void* data, ImfContext* imfContext, void* event_info ) override;
+ void CommitReceived( void* data, ImfContext* imfContext, void* eventInfo ) override;
/**
* @copydoc Dali::InputMethodContext::NotifyCursorPosition()
/**
* @copydoc Dali::InputMethodContext::DeleteSurrounding()
*/
- void DeleteSurrounding( void* data, ImfContext* imfContext, void* event_info ) override;
+ void DeleteSurrounding( void* data, ImfContext* imfContext, void* eventInfo ) override;
/**
* @copydoc Dali::InputMethodContext::SendPrivateCommand()
*/
- void SendPrivateCommand( void* data, ImfContext* imfContext, void* event_info ) override
+ void SendPrivateCommand( void* data, ImfContext* imfContext, void* eventInfo ) override
+ {}
+
+ /**
+ * @copydoc Dali::InputMethodContext::SendCommitContent()
+ */
+ void SendCommitContent( void* data, ImfContext* imfContext, void* eventInfo ) override
{}
// Cursor related
std::string GetInputPanelLocale() override;
/**
+ * @copydoc Dali::InputMethodContext::SetContentMIMETypes()
+ */
+ void SetContentMIMETypes( const std::string& mimeTypes ) override;
+
+ /**
* @copydoc Dali::InputMethodContext::FilterEventKey()
*/
bool FilterEventKey( const Dali::KeyEvent& keyEvent ) override;
* @copydoc Dali::InputMethodContext::IsTextPredictionAllowed()
*/
bool IsTextPredictionAllowed() const override;
+
+ /**
+ * @copydoc Dali::InputMethodContext::SetInputPanelLanguage()
+ */
+ void SetInputPanelLanguage( Dali::InputMethodContext::InputPanelLanguage language ) override;
+
+ /**
+ * @copydoc Dali::InputMethodContext::GetInputPanelLanguage()
+ */
+ Dali::InputMethodContext::InputPanelLanguage GetInputPanelLanguage() const override;
+
private:
/**
* Context created the first time and kept until deleted.
- * @param[in] ecoreXwin, The window is created by application.
*/
- void CreateContext( Ecore_X_Window ecoreXwin );
+ void CreateContext();
/**
* @copydoc Dali::InputMethodContext::DeleteContext()
*/
Ecore_IMF_Keyboard_Locks EcoreInputModifierToEcoreIMFLock( unsigned int modifier );
+ /**
+ * Called when the binded actor is added to a window.
+ */
+ void OnStaged( Dali::Actor actor );
+
public:
/**
} // namespace Dali
-#endif // __DALI_INTERNAL_INPUT_METHOD_CONTEXT_IMPL_X_H
+#endif // DALI_INTERNAL_INPUT_METHOD_CONTEXT_IMPL_X_H