InputMethodContextEfl.h [plain text]
#ifndef InputMethodContextEfl_h
#define InputMethodContextEfl_h
#include <Ecore_IMF.h>
#include <Evas.h>
#include <wtf/OwnPtr.h>
#include <wtf/PassOwnPtr.h>
class EwkView;
namespace WebKit {
class WebPageProxy;
class InputMethodContextEfl {
public:
static PassOwnPtr<InputMethodContextEfl> create(EwkView* viewImpl, Evas* canvas)
{
OwnPtr<Ecore_IMF_Context> context = createIMFContext(canvas);
if (!context)
return nullptr;
return adoptPtr(new InputMethodContextEfl(viewImpl, context.release()));
}
~InputMethodContextEfl();
void handleMouseUpEvent(const Evas_Event_Mouse_Up* upEvent);
void handleKeyDownEvent(const Evas_Event_Key_Down* downEvent, bool* isFiltered);
void updateTextInputState();
private:
InputMethodContextEfl(EwkView*, PassOwnPtr<Ecore_IMF_Context>);
static PassOwnPtr<Ecore_IMF_Context> createIMFContext(Evas* canvas);
static void onIMFInputSequenceComplete(void* data, Ecore_IMF_Context*, void* eventInfo);
static void onIMFPreeditSequenceChanged(void* data, Ecore_IMF_Context*, void* eventInfo);
EwkView* m_view;
OwnPtr<Ecore_IMF_Context> m_context;
bool m_focused;
};
}
#endif // InputMethodContextEfl_h