ozone: evdev: Sync caps lock LED state to evdev
[chromium-blink-merge.git] / ui / ozone / platform / dri / dri_window_delegate.h
blob75f9d95b93240e1c8cca697d867bbd559c255f92
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_DRI_DRI_WINDOW_DELEGATE_H_
6 #define UI_OZONE_PLATFORM_DRI_DRI_WINDOW_DELEGATE_H_
8 #include <vector>
10 #include "ui/gfx/native_widget_types.h"
12 class SkBitmap;
14 namespace gfx {
15 class Point;
16 class Rect;
17 } // namespace gfx
19 namespace ui {
21 class HardwareDisplayController;
23 // Interface for the display-server half of a DriWindow.
25 // The main implementation of this lives in the process that owns the display
26 // connection (usually the GPU process) and associates a platform window
27 // (DriWindow) with a display. A window is associated with the display whose
28 // bounds contains the window bounds. If there's no suitable display, the window
29 // is disconnected and its contents will not be visible.
31 // In software mode, this is owned directly on DriWindow because the display
32 // controller object is in the same process.
34 // In accelerated mode, there's a proxy implementation and calls are forwarded
35 // to the real object in the GPU process via IPC.
36 class DriWindowDelegate {
37 public:
38 virtual ~DriWindowDelegate() {}
40 virtual void Initialize() = 0;
42 virtual void Shutdown() = 0;
44 // Returns the accelerated widget associated with the delegate.
45 virtual gfx::AcceleratedWidget GetAcceleratedWidget() = 0;
47 // Returns the current controller the window is displaying on. Callers should
48 // not cache the result as the controller may change as the window is moved.
49 virtual HardwareDisplayController* GetController() = 0;
51 // Called when the window is resized/moved.
52 virtual void OnBoundsChanged(const gfx::Rect& bounds) = 0;
54 // Update the HW cursor bitmap & move to specified location. If
55 // the bitmap is empty, the cursor is hidden.
56 virtual void SetCursor(const std::vector<SkBitmap>& bitmaps,
57 const gfx::Point& location,
58 int frame_delay_ms) = 0;
60 // Update the HW cursor bitmap & move to specified location. If
61 // the bitmap is empty, the cursor is hidden.
62 virtual void SetCursorWithoutAnimations(const std::vector<SkBitmap>& bitmaps,
63 const gfx::Point& location) = 0;
65 // Move the HW cursor to the specified location.
66 virtual void MoveCursor(const gfx::Point& location) = 0;
69 } // namespace ui
71 #endif // UI_OZONE_PLATFORM_DRI_DRI_WINDOW_DELEGATE_H_