a17e3addb9d2addec1999a567a4cdf1c28335c15
[profile/ivi/ico-uxf-device-input-controller.git] / tests / test-common.h
1 /*
2  * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
3  *
4  * This program is licensed under the terms and conditions of the
5  * Apache License, version 2.0.  The full text of the Apache License is at
6  * http://www.apache.org/licenses/LICENSE-2.0
7  *
8  */
9 /**
10  * @brief   Header file for uint test common routines
11  *
12  * @date    Feb-08-2013
13  */
14
15 #ifndef _TEST_COMMON_H_
16 #define _TEST_COMMON_H_
17
18 #include    <GLES2/gl2.h>               /* OpenGL ES 2.x                    */
19 #include    <EGL/egl.h>                 /* EGL                              */
20 #include    <wayland-client.h>          /* Wayland client library           */
21 #include    <wayland-egl.h>             /* Wayland EGL library              */
22 #include    <wayland-util.h>            /* Wayland Misc library             */
23
24 /* Function prototype           */
25 int getdata(void *window_mgr, const char *prompt, int fd, char *buf, const int size);
26 void print_log(const char *fmt, ...);
27 void wayland_dispatch_nonblock(struct wl_display *display);
28 void sleep_with_wayland(struct wl_display *display, int msec);
29 void wait_with_wayland(struct wl_display *display, int msec, int *endflag);
30 int sec_str_2_value(const char *ssec);
31 EGLDisplay opengl_init(struct wl_display *display, EGLConfig *rconf, EGLContext *rctx);
32 EGLSurface opengl_create_window(struct wl_display *display, struct wl_surface *surface,
33                                 EGLDisplay dpy, EGLConfig conf, EGLContext ctx,
34                                 const int width, const int height, const int color);
35 void opengl_clear_window(const unsigned int color);
36 void opengl_swap_buffer(struct wl_display *display, EGLDisplay dpy, EGLSurface egl_surface);
37
38 #endif /*_TEST_COMMON_H_*/