1 // Copyright (c) 2013 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_OZONE_PUBLIC_EVENT_FACTORY_OZONE_H_
6 #define UI_OZONE_PUBLIC_EVENT_FACTORY_OZONE_H_
10 #include "base/memory/scoped_ptr.h"
11 #include "base/message_loop/message_pump_libevent.h"
12 #include "ui/gfx/native_widget_types.h"
13 #include "ui/ozone/ozone_base_export.h"
23 // Creates and dispatches |ui.Event|'s. Ozone assumes that events arrive on file
24 // descriptors with one |EventConverterOzone| instance for each descriptor.
25 // Ozone presumes that the set of file descriptors can vary at runtime so this
26 // class supports dynamically adding and removing |EventConverterOzone|
27 // instances as necessary.
28 class OZONE_BASE_EXPORT EventFactoryOzone
{
31 virtual ~EventFactoryOzone();
33 // Warp the cursor to a location within an AccelerateWidget.
34 // If the cursor actually moves, the implementation must dispatch a mouse
35 // move event with the new location.
36 virtual void WarpCursorTo(gfx::AcceleratedWidget widget
,
37 const gfx::PointF
& location
);
39 // Returns the singleton instance.
40 static EventFactoryOzone
* GetInstance();
43 static EventFactoryOzone
* impl_
; // not owned
45 DISALLOW_COPY_AND_ASSIGN(EventFactoryOzone
);
50 #endif // UI_OZONE_PUBLIC_EVENT_FACTORY_OZONE_H_