b2645e5e97dfa873a8f42ea16c168a5372b144d1
[platform/framework/web/crosswalk.git] / src / ozone / ui / ime / input_method_context_impl_wayland.h
1 // Copyright 2014 Intel Corporation. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef OZONE_UI_IME_INPUT_METHOD_CONTEXT_IMPL_WAYLAND_H_
6 #define OZONE_UI_IME_INPUT_METHOD_CONTEXT_IMPL_WAYLAND_H_
7
8 #include "ozone/platform/ozone_export_wayland.h"
9 #include "ui/base/ime/linux/linux_input_method_context.h"
10 #include "ui/gfx/rect.h"
11
12 namespace ui {
13
14 // An implementation of LinuxInputMethodContext for IME support on Ozone
15 // platform using Wayland.
16 class OZONE_WAYLAND_EXPORT InputMethodContextImplWayland
17     : public LinuxInputMethodContext {
18  public:
19   explicit InputMethodContextImplWayland(
20       ui::LinuxInputMethodContextDelegate* delegate);
21   virtual ~InputMethodContextImplWayland();
22
23   // Overriden from ui::LinuxInputMethodContext
24   virtual bool DispatchKeyEvent(const ui::KeyEvent& key_event) OVERRIDE;
25   virtual void Reset() OVERRIDE;
26   virtual void OnTextInputTypeChanged(ui::TextInputType text_input_type)
27       OVERRIDE;
28   virtual void OnCaretBoundsChanged(const gfx::Rect& caret_bounds) OVERRIDE;
29
30  private:
31   // Must not be NULL.
32   LinuxInputMethodContextDelegate* delegate_;
33   DISALLOW_COPY_AND_ASSIGN(InputMethodContextImplWayland);
34 };
35
36 }  // namespace ui
37
38 #endif  // OZONE_UI_IME_INPUT_METHOD_CONTEXT_IMPL_WAYLAND_H_