Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / ozone / ui / events / event_converter_in_process.h
index 2007e18..7eec205 100644 (file)
@@ -10,6 +10,7 @@
 #include "base/memory/scoped_ptr.h"
 #include "ozone/ui/events/event_converter_ozone_wayland.h"
 #include "ozone/ui/events/keyboard_code_conversion_ozone.h"
+#include "ozone/ui/events/keyboard_engine_xkb.h"
 #include "ui/events/event.h"
 #include "ui/events/platform/platform_event_source.h"
 
@@ -21,48 +22,57 @@ class EventConverterInProcess : public ui::EventConverterOzoneWayland,
   EventConverterInProcess();
   virtual ~EventConverterInProcess();
 
-  virtual void MotionNotify(float x, float y) OVERRIDE;
-  virtual void ButtonNotify(unsigned handle,
-                            ui::EventType type,
-                            ui::EventFlags flags,
-                            float x,
-                            float y) OVERRIDE;
-  virtual void AxisNotify(float x,
-                          float y,
-                          int xoffset,
-                          int yoffset) OVERRIDE;
-  virtual void PointerEnter(unsigned handle, float x, float y) OVERRIDE;
-  virtual void PointerLeave(unsigned handle, float x, float y) OVERRIDE;
-  virtual void KeyNotify(ui::EventType type,
-                         unsigned code,
-                         unsigned modifiers) OVERRIDE;
-  virtual void TouchNotify(ui::EventType type,
-                           float x,
-                           float y,
-                           int32_t touch_id,
-                           uint32_t time_stamp) OVERRIDE;
-  virtual void CloseWidget(unsigned handle) OVERRIDE;
+  void MotionNotify(float x, float y) override;
+  void ButtonNotify(unsigned handle,
+                    ui::EventType type,
+                    ui::EventFlags flags,
+                    float x,
+                    float y) override;
+  void AxisNotify(float x,
+                  float y,
+                  int xoffset,
+                  int yoffset) override;
+  void PointerEnter(unsigned handle, float x, float y) override;
+  void PointerLeave(unsigned handle, float x, float y) override;
+  void KeyNotify(ui::EventType type,
+                 unsigned code) override;
+  void VirtualKeyNotify(ui::EventType type,
+                        uint32_t key,
+                        uint32_t modifiers) override;
+  void KeyModifiers(uint32_t mods_depressed,
+                    uint32_t mods_latched,
+                    uint32_t mods_locked,
+                    uint32_t group) override;
+  void TouchNotify(ui::EventType type,
+                   float x,
+                   float y,
+                   int32_t touch_id,
+                   uint32_t time_stamp) override;
+  void CloseWidget(unsigned handle) override;
 
-  virtual void OutputSizeChanged(unsigned width, unsigned height) OVERRIDE;
-  virtual void WindowResized(unsigned windowhandle,
-                             unsigned width,
-                             unsigned height) OVERRIDE;
-  virtual void WindowUnminimized(unsigned windowhandle) OVERRIDE;
+  void OutputSizeChanged(unsigned width, unsigned height) override;
+  void WindowResized(unsigned windowhandle,
+                     unsigned width,
+                     unsigned height) override;
+  void WindowUnminimized(unsigned windowhandle) override;
+  void WindowDeActivated(unsigned windowhandle) override;
+  void WindowActivated(unsigned windowhandle) override;
 
-  virtual void Commit(unsigned handle, const std::string& text) OVERRIDE;
-  virtual void PreeditChanged(unsigned handle, const std::string& text,
-                              const std::string& commit) OVERRIDE;
-  virtual void PreeditEnd() OVERRIDE;
-  virtual void PreeditStart() OVERRIDE;
+  void Commit(unsigned handle, const std::string& text) override;
+  void PreeditChanged(unsigned handle,
+                      const std::string& text,
+                      const std::string& commit) override;
+  void PreeditEnd() override;
+  void PreeditStart() override;
+  void InitializeXKB(base::SharedMemoryHandle fd, uint32_t size) override;
 
-  virtual void SetWindowChangeObserver(
-      ui::WindowChangeObserver* observer) OVERRIDE;
-  virtual void SetOutputChangeObserver(
-      ui::OutputChangeObserver* observer) OVERRIDE;
+  void SetWindowChangeObserver(ui::WindowChangeObserver* observer) override;
+  void SetIMEChangeObserver(ui::IMEChangeObserver* observer) override;
+  void SetOutputChangeObserver(ui::OutputChangeObserver* observer) override;
 
  private:
   // PlatformEventSource:
-  virtual void OnDispatcherListChanged() OVERRIDE;
+  void OnDispatcherListChanged() override;
   static void NotifyMotion(EventConverterInProcess* data,
                            float x,
                            float y);
@@ -107,6 +117,10 @@ class EventConverterInProcess : public ui::EventConverterOzoneWayland,
                                   unsigned height);
   static void NotifyWindowUnminimized(EventConverterInProcess* data,
                                       unsigned handle);
+  static void NotifyWindowDeActivated(EventConverterInProcess* data,
+                                      unsigned handle);
+  static void NotifyWindowActivated(EventConverterInProcess* data,
+                                    unsigned handle);
   static void NotifyCommit(EventConverterInProcess* data, unsigned handle,
                            const std::string& text);
   static void NotifyPreeditChanged(EventConverterInProcess* data,
@@ -117,7 +131,9 @@ class EventConverterInProcess : public ui::EventConverterOzoneWayland,
   static void NotifyPreeditStart(EventConverterInProcess* data);
 
   ui::WindowChangeObserver* observer_;
+  ui::IMEChangeObserver* ime_observer_;
   ui::OutputChangeObserver* output_observer_;
+  ui::KeyboardEngineXKB* backend_;
   base::Callback<void(void*)> dispatch_callback_;  // NOLINT(readability/
                                                    // function)
   DISALLOW_COPY_AND_ASSIGN(EventConverterInProcess);