Added initial support for displaying on Wayland compositors.
[vuplus_xbmc] / xbmc / windowing / egl / EGLNativeTypeWayland.h
1 #pragma once
2
3 /*
4  *      Copyright (C) 2011-2013 Team XBMC
5  *      http://www.xbmc.org
6  *
7  *  This Program is free software; you can redistribute it and/or modify
8  *  it under the terms of the GNU General Public License as published by
9  *  the Free Software Foundation; either version 2, or (at your option)
10  *  any later version.
11  *
12  *  This Program is distributed in the hope that it will be useful,
13  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  *  GNU General Public License for more details.
16  *
17  *  You should have received a copy of the GNU General Public License
18  *  along with XBMC; see the file COPYING.  If not, see
19  *  <http://www.gnu.org/licenses/>.
20  *
21  */
22
23 #include <boost/scoped_ptr.hpp>
24
25 #include <EGL/egl.h>
26 #include "EGLNativeType.h"
27
28 class CEGLNativeTypeWayland : public CEGLNativeType
29 {
30 public:
31   CEGLNativeTypeWayland();
32   virtual ~CEGLNativeTypeWayland();
33   virtual std::string GetNativeName() const { return "wayland"; };
34   virtual bool  CheckCompatibility();
35   virtual void  Initialize();
36   virtual void  Destroy();
37   virtual int   GetQuirks() { return EGL_QUIRK_NONE; };
38
39   virtual bool  CreateNativeDisplay();
40   virtual bool  CreateNativeWindow();
41   virtual bool  GetNativeDisplay(XBNativeDisplayType **nativeDisplay) const;
42   virtual bool  GetNativeWindow(XBNativeWindowType **nativeWindow) const;
43
44   virtual bool  DestroyNativeWindow();
45   virtual bool  DestroyNativeDisplay();
46
47   virtual bool  GetNativeResolution(RESOLUTION_INFO *res) const;
48   virtual bool  SetNativeResolution(const RESOLUTION_INFO &res);
49   virtual bool  ProbeResolutions(std::vector<RESOLUTION_INFO> &resolutions);
50   virtual bool  GetPreferredResolution(RESOLUTION_INFO *res) const;
51
52   virtual bool  ShowWindow(bool show);
53 private:
54
55   class Private;
56
57   boost::scoped_ptr <Private> priv;
58 };