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.
5 #ifndef OZONE_UI_EVENTS_EVENT_FACTORY_OZONE_WAYLAND_H_
6 #define OZONE_UI_EVENTS_EVENT_FACTORY_OZONE_WAYLAND_H_
8 #include "ozone/ui/events/event_converter_ozone_wayland.h"
9 #include "ozone/platform/ozone_export_wayland.h"
10 #include "ui/ozone/public/event_factory_ozone.h"
14 class WindowChangeObserver;
15 class OutputChangeObserver;
17 class OZONE_WAYLAND_EXPORT EventFactoryOzoneWayland : public EventFactoryOzone {
19 EventFactoryOzoneWayland();
20 virtual ~EventFactoryOzoneWayland();
22 // Returns the static instance last set using SetInstance().
23 static EventFactoryOzoneWayland* GetInstance();
25 // Sets the implementation delegate. Ownership is retained by the caller.
26 static void SetInstance(EventFactoryOzoneWayland* instance);
28 // Sets the window change observer. Ownership is retained by the caller.
29 void SetWindowChangeObserver(WindowChangeObserver* observer);
30 WindowChangeObserver* GetWindowChangeObserver() const;
31 // Sets the output change observer. Ownership is retained by the caller.
32 void SetOutputChangeObserver(OutputChangeObserver* observer);
33 // Registered OutputChangeObserver. Ownership is not passed to the caller.
34 OutputChangeObserver* GetOutputChangeObserver() const;
35 void SetEventConverterOzoneWayland(EventConverterOzoneWayland* converter);
36 // EventConverter used to convert native input events to |ui::Event|.
37 // Ownership is not passed to the caller.
38 EventConverterOzoneWayland* EventConverter() const;
41 EventConverterOzoneWayland* event_converter_;
42 WindowChangeObserver* observer_;
43 OutputChangeObserver* output_observer_;
44 static EventFactoryOzoneWayland* impl_; // not owned
49 #endif // OZONE_UI_EVENTS_EVENT_FACTORY_OZONE_WAYLAND_H_