eb29a0f098695da574a001610b7d2c4acf8d954f
[platform/framework/web/crosswalk.git] / src / ozone / ui / gfx / ozone_display.h
1 // Copyright 2013 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.
4
5 #ifndef OZONE_UI_GFX_OZONE_DISPLAY_H_
6 #define OZONE_UI_GFX_OZONE_DISPLAY_H_
7
8 #include "ozone/platform/ozone_export_wayland.h"
9 #include "ui/gfx/native_widget_types.h"
10 #include "ui/gfx/ozone/surface_factory_ozone.h"
11
12 namespace gfx {
13
14 class OZONE_WAYLAND_EXPORT OzoneDisplay {
15  public:
16   OzoneDisplay();
17   virtual ~OzoneDisplay();
18
19   // Returns the static instance last set using SetInstance().
20   static OzoneDisplay* GetInstance();
21
22   // Sets the implementation delegate. Ownership is retained by the caller.
23   static void SetInstance(OzoneDisplay* instance);
24
25   virtual SurfaceFactoryOzone::HardwareState InitializeHardware() = 0;
26   virtual void ShutdownHardware() = 0;
27   virtual intptr_t GetNativeDisplay() = 0;
28   virtual void FlushDisplay() = 0;
29
30   virtual gfx::AcceleratedWidget GetAcceleratedWidget() = 0;
31   virtual gfx::AcceleratedWidget RealizeAcceleratedWidget(
32       gfx::AcceleratedWidget w) = 0;
33   virtual bool AttemptToResizeAcceleratedWidget(gfx::AcceleratedWidget w,
34                                                 const gfx::Rect& bounds) = 0;
35   virtual void DestroyWidget(gfx::AcceleratedWidget w) = 0;
36   virtual void LookAheadOutputGeometry() = 0;
37
38  private:
39   static OzoneDisplay* instance_;
40   DISALLOW_COPY_AND_ASSIGN(OzoneDisplay);
41 };
42
43 }  // namespace gfx
44
45 #endif  // OZONE_UI_GFX_OZONE_DISPLAY_H_