Move VISUAL_STATE promise to activation
[chromium-blink-merge.git] / ui / ozone / platform / caca / caca_event_source.h
blob180031475aafd0080afd1ac5f5b0730183afa1c8
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_OZONE_PLATFORM_CACA_CACA_EVENT_SOURCE_H_
6 #define UI_OZONE_PLATFORM_CACA_CACA_EVENT_SOURCE_H_
8 #include <caca.h>
10 #include "base/memory/ref_counted.h"
11 #include "base/time/time.h"
12 #include "ui/events/platform/platform_event_source.h"
13 #include "ui/events/platform/scoped_event_dispatcher.h"
14 #include "ui/gfx/geometry/point_f.h"
16 namespace ui {
18 class CacaWindow;
20 class CacaEventSource : public PlatformEventSource {
21 public:
22 CacaEventSource();
23 ~CacaEventSource() override;
25 // Poll for an event on a particular window. Input events will be
26 // dispatched on the given dispatcher.
27 void TryProcessingEvent(CacaWindow* window);
29 // Process an input event on a particular window.
30 void OnInputEvent(caca_event_t* event, CacaWindow* window);
32 private:
33 // Keep track of last cursor position to dispatch correct mouse push/release
34 // events.
35 gfx::PointF last_cursor_location_;
37 int modifier_flags_;
39 DISALLOW_COPY_AND_ASSIGN(CacaEventSource);
42 } // namespace ui
44 #endif // UI_OZONE_PLATFORM_CACA_CACA_EVENT_SOURCE_H_