Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / ozone / ui / events / event_converter_ozone_wayland.h
index d474ca7..6e4fd3f 100644 (file)
@@ -9,7 +9,7 @@
 #include "ozone/platform/ozone_export_wayland.h"
 #include "ui/events/event_constants.h"
 
-namespace ozonewayland {
+namespace ui {
 
 class WindowChangeObserver;
 class OutputChangeObserver;
@@ -24,16 +24,10 @@ class OZONE_WAYLAND_EXPORT EventConverterOzoneWayland {
   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,6 +36,11 @@ 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,
@@ -52,14 +51,16 @@ class OZONE_WAYLAND_EXPORT EventConverterOzoneWayland {
   virtual void SetWindowChangeObserver(WindowChangeObserver* observer);
   // Sets the output change observer. Ownership is retained by the caller.
   virtual void SetOutputChangeObserver(OutputChangeObserver* observer);
+  // Sets the in-process event dispatcher. Ownership is retained by the caller.
+  virtual void SetDispatchCallback(
+      base::Callback<void(void*)> callback);  // NOLINT(readability/function)
 
   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_