Added initial support for displaying on Wayland compositors.
[vuplus_xbmc] / xbmc / windowing / DllWaylandEgl.h
1 #pragma once
2
3 /*
4  *      Copyright (C) 2005-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 #if (defined HAVE_CONFIG_H) && (!defined TARGET_WINDOWS)
24   #include "config.h"
25 #endif
26 #include "utils/log.h"
27 #include "DynamicDll.h"
28
29 struct wl_surface;
30 struct wl_egl_window;
31
32 class IDllWaylandEGL
33 {
34 public:
35   virtual ~IDllWaylandEGL() {}
36   virtual struct wl_egl_window * wl_egl_window_create(struct wl_surface *,
37                                                       int width,
38                                                       int height) = 0;
39   virtual void wl_egl_window_destroy(struct wl_egl_window *) = 0;
40   virtual void wl_egl_window_resize(struct wl_egl_window *,
41                                     int width, int height,
42                                     int dx, int dy) = 0;
43 };
44
45 class DllWaylandEGL : public DllDynamic, public IDllWaylandEGL
46 {
47   DECLARE_DLL_WRAPPER(DllWaylandEGL, DLL_PATH_WAYLAND_EGL)
48   
49   DEFINE_METHOD3(struct wl_egl_window *,
50                  wl_egl_window_create,
51                  (struct wl_surface *p1, int p2, int p3));
52   DEFINE_METHOD1(void, wl_egl_window_destroy, (struct wl_egl_window *p1));
53   DEFINE_METHOD5(void,
54                  wl_egl_window_resize,
55                  (struct wl_egl_window *p1,
56                   int p2,
57                   int p3,
58                   int p4,
59                   int p5));
60   BEGIN_METHOD_RESOLVE()
61     RESOLVE_METHOD(wl_egl_window_create)
62     RESOLVE_METHOD(wl_egl_window_destroy)
63     RESOLVE_METHOD(wl_egl_window_resize)
64   END_METHOD_RESOLVE()
65 };