Upstream version 9.38.204.0
[platform/framework/web/crosswalk.git] / src / ozone / ui / events / event_converter_ozone_wayland.h
index d474ca7..095ef79 100644 (file)
@@ -5,11 +5,13 @@
 #ifndef OZONE_UI_EVENTS_EVENT_CONVERTER_OZONE_WAYLAND_H_
 #define OZONE_UI_EVENTS_EVENT_CONVERTER_OZONE_WAYLAND_H_
 
+#include <string>
+
 #include "base/message_loop/message_loop.h"
 #include "ozone/platform/ozone_export_wayland.h"
 #include "ui/events/event_constants.h"
 
-namespace ozonewayland {
+namespace ui {
 
 class WindowChangeObserver;
 class OutputChangeObserver;
@@ -20,20 +22,14 @@ class OutputChangeObserver;
 // 2) Convert native events related to Window Activation and dispatch it to
 //    WindowChangeObserver
 class OZONE_WAYLAND_EXPORT EventConverterOzoneWayland {
 public:
+ public:
   EventConverterOzoneWayland();
   virtual ~EventConverterOzoneWayland();
 
-  // Returns the static instance last set using SetInstance().
-  static EventConverterOzoneWayland* GetInstance();
-
-  // Sets the implementation delegate. Ownership is retained by the caller.
-  static void SetInstance(EventConverterOzoneWayland* instance);
-
   virtual void MotionNotify(float x, float y) = 0;
   virtual void ButtonNotify(unsigned handle,
-                            ui::EventType type,
-                            ui::EventFlags flags,
+                            EventType type,
+                            EventFlags flags,
                             float x,
                             float y) = 0;
   virtual void AxisNotify(float x, float y, int xoffset, int yoffset) = 0;
@@ -42,24 +38,35 @@ class OZONE_WAYLAND_EXPORT EventConverterOzoneWayland {
   virtual void KeyNotify(ui::EventType type,
                          unsigned code,
                          unsigned modifiers) = 0;
+  virtual void TouchNotify(ui::EventType type,
+                           float x,
+                           float y,
+                           int32_t touch_id,
+                           uint32_t time_stamp) = 0;
 
   virtual void OutputSizeChanged(unsigned width, unsigned height) = 0;
   virtual void WindowResized(unsigned windowhandle,
                              unsigned width,
                              unsigned height) = 0;
+  virtual void WindowUnminimized(unsigned windowhandle) = 0;
   virtual void CloseWidget(unsigned handle) = 0;
+  virtual void Commit(unsigned handle, const std::string& text) = 0;
+  virtual void PreeditChanged(unsigned handle, const std::string& text,
+                              const std::string& commit) = 0;
+  virtual void PreeditEnd() = 0;
+  virtual void PreeditStart() = 0;
+
   // Sets the window change observer. Ownership is retained by the caller.
   virtual void SetWindowChangeObserver(WindowChangeObserver* observer);
   // Sets the output change observer. Ownership is retained by the caller.
   virtual void SetOutputChangeObserver(OutputChangeObserver* observer);
 
 protected:
+ protected:
   // Posts task to main loop of the thread on which Dispatcher was initialized.
   virtual void PostTaskOnMainLoop(const base::Closure& task);
   base::MessageLoop* loop_;
-  static EventConverterOzoneWayland* impl_;  // not owned
 };
 
-}  // namespace ozonewayland
+}  // namespace ui
 
 #endif  // OZONE_UI_EVENTS_EVENT_CONVERTER_OZONE_WAYLAND_H_