#include "ozone/platform/ozone_export_wayland.h"
#include "ui/events/event_constants.h"
-namespace ozonewayland {
+namespace ui {
class WindowChangeObserver;
class OutputChangeObserver;
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;
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,
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_