1 /+
2  +  Wayland copyright:
3  +  Copyright © 2011 Kristian Høgsberg
4  +  Copyright © 2011 Benjamin Franzke
5  +
6  +  Permission is hereby granted, free of charge, to any person
7  +  obtaining a copy of this software and associated documentation files
8  +  (the "Software"), to deal in the Software without restriction,
9  +  including without limitation the rights to use, copy, modify, merge,
10  +  publish, distribute, sublicense, and/or sell copies of the Software,
11  +  and to permit persons to whom the Software is furnished to do so,
12  +  subject to the following conditions:
13  +
14  +  The above copyright notice and this permission notice (including the
15  +  next paragraph) shall be included in all copies or substantial
16  +  portions of the Software.
17  +
18  +  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19  +  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20  +  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21  +  NONINFRINGEMENT.  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
22  +  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
23  +  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24  +  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25  +  SOFTWARE.
26  +/
27 /+
28  +  D bindings copyright:
29  +  Copyright © 2015 Rémi Thebault
30  +/
31 module wayland.client.egl;
32 
33 import wayland.client.protocol : wl_surface;
34 
35 extern(C) {
36 
37     struct wl_egl_window;
38 
39 }
40 
41 version (Dynamic) {
42     extern (C) {
43         alias da_wl_egl_window_create = wl_egl_window *function(wl_surface *surface,
44                             int width, int height);
45         alias da_wl_egl_window_destroy = void function(wl_egl_window *egl_window);
46         alias da_wl_egl_window_resize = void function(wl_egl_window *egl_window,
47                             int width, int height,
48                             int dx, int dy);
49         alias da_wl_egl_window_get_attached_size = void function(
50                     wl_egl_window *egl_window,
51                     int *width, int *height);
52     }
53     __gshared {
54 
55         da_wl_egl_window_create wl_egl_window_create;
56         da_wl_egl_window_destroy wl_egl_window_destroy;
57         da_wl_egl_window_resize wl_egl_window_resize;
58         da_wl_egl_window_get_attached_size wl_egl_window_get_attached_size;
59 
60     }
61 
62 }
63 else {
64     extern (C) {
65         wl_egl_window *
66         wl_egl_window_create(wl_surface *surface,
67                             int width, int height);
68 
69         void
70         wl_egl_window_destroy(wl_egl_window *egl_window);
71 
72         void
73         wl_egl_window_resize(wl_egl_window *egl_window,
74                             int width, int height,
75                             int dx, int dy);
76 
77         void
78         wl_egl_window_get_attached_size(wl_egl_window *egl_window,
79                                         int *width, int *height);
80     }
81 }