Bug fix TIVI-976 ,TIVI-974 and addition of the window animation interface.
[profile/ivi/ico-uxf-weston-plugin.git] / tests / test-common.h
1 /*
2  * Copyright © 2013 TOYOTA MOTOR CORPORATION
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  * @brief   Header file for uint test common routines
24  *
25  * @date    Feb-08-2013
26  */
27
28 #ifndef _TEST_COMMON_H_
29 #define _TEST_COMMON_H_
30
31 #include    <GLES2/gl2.h>               /* OpenGL ES 2.x                    */
32 #include    <EGL/egl.h>                 /* EGL                              */
33 #include    <wayland-client.h>          /* Wayland client library           */
34 #include    <wayland-egl.h>             /* Wayland EGL library              */
35 #include    <wayland-util.h>            /* Wayland Misc library             */
36
37 /* Function prototype           */
38 int getdata(void *window_mgr, const char *prompt, int fd, char *buf, const int size);
39 void print_log(const char *fmt, ...);
40 void wayland_dispatch_nonblock(struct wl_display *display);
41 void sleep_with_wayland(struct wl_display *display, int msec);
42 void wait_with_wayland(struct wl_display *display, int msec, int *endflag);
43 int sec_str_2_value(const char *ssec);
44 EGLDisplay opengl_init(struct wl_display *display, EGLConfig *rconf, EGLContext *rctx);
45 EGLSurface opengl_create_window(struct wl_display *display, struct wl_surface *surface,
46                                 EGLDisplay dpy, EGLConfig conf, EGLContext ctx,
47                                 const int width, const int height, const int color);
48 void opengl_clear_window(const unsigned int color);
49 void opengl_swap_buffer(struct wl_display *display, EGLDisplay dpy, EGLSurface egl_surface);
50
51 #endif /*_TEST_COMMON_H_*/
52