1 // Copyright 2014 The Chromium Authors. 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 UI_EVENTS_OZONE_EVDEV_EVENT_CONVERTER_EVDEV_H_
6 #define UI_EVENTS_OZONE_EVDEV_EVENT_CONVERTER_EVDEV_H_
8 #include "base/basictypes.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "ui/events/ozone/evdev/events_ozone_evdev_export.h"
16 class EventModifiersEvdev
;
18 typedef base::Callback
<void(Event
*)> EventDispatchCallback
;
20 // Base class for device-specific evdev event conversion.
21 class EVENTS_OZONE_EVDEV_EXPORT EventConverterEvdev
{
23 EventConverterEvdev();
24 explicit EventConverterEvdev(const EventDispatchCallback
& callback
);
25 virtual ~EventConverterEvdev();
27 // Start converting events.
28 virtual void Start() = 0;
30 // Stop converting events.
31 virtual void Stop() = 0;
34 // Dispatches an event using the dispatch-callback set using
35 // |SetDispatchCalback()|.
36 virtual void DispatchEventToCallback(ui::Event
* event
);
39 EventDispatchCallback dispatch_callback_
;
41 DISALLOW_COPY_AND_ASSIGN(EventConverterEvdev
);
46 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_CONVERTER_EVDEV_H_