compositor-x11: Rename the output make to "weston-X11"
[platform/upstream/weston.git] / clients / wscreensaver.h
1 /*
2  * Copyright © 2011 Collabora, Ltd.
3  *
4  * Permission to use, copy, modify, distribute, and sell this software and its
5  * documentation for any purpose is hereby granted without fee, provided that
6  * the above copyright notice appear in all copies and that both that copyright
7  * notice and this permission notice appear in supporting documentation, and
8  * that the name of the copyright holders not be used in advertising or
9  * publicity pertaining to distribution of the software without specific,
10  * written prior permission.  The copyright holders make no representations
11  * about the suitability of this software for any purpose.  It is provided "as
12  * is" without express or implied warranty.
13  *
14  * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
16  * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
17  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
18  * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
19  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
20  * OF THIS SOFTWARE.
21  */
22
23 #ifndef WSCREENSAVER_H
24 #define WSCREENSAVER_H
25
26 #include "config.h"
27
28 #define MESA_EGL_NO_X11_HEADERS
29 #include <EGL/egl.h>
30
31 extern const char *progname;
32
33 struct wscreensaver;
34
35 struct ModeInfo {
36         struct wscreensaver *priv;
37         EGLContext eglctx;
38         int swap_buffers;
39
40         struct window *window;
41         struct widget *widget;
42
43         int instance_number;
44         int width;
45         int height;
46
47         unsigned long polygon_count;
48         int fps_p;
49 };
50
51 struct wscreensaver_plugin {
52         const char *name;
53         void (*init)(struct ModeInfo *mi);
54         void (*draw)(struct ModeInfo *mi);
55         void (*reshape)(struct ModeInfo *mi, int w, int h);
56 /*      void (*refresh)(struct ModeInfo *mi);
57         void (*finish)(struct ModeInfo *mi);*/
58 };
59
60 EGLContext *
61 init_GL(struct ModeInfo *mi);
62
63 #endif /* WSCREENSAVER_H */