2 * Copyright © 2013 TOYOTA MOTOR CORPORATION
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.
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
23 * @brief Header file for uint test common routines
28 #ifndef _TEST_COMMON_H_
29 #define _TEST_COMMON_H_
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 */
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 char *skip_spaces(char *buf);
41 int pars_command(char *buf, char *pt[], const int len);
42 void wayland_dispatch_nonblock(struct wl_display *display);
43 void sleep_with_wayland(struct wl_display *display, int msec);
44 void wait_with_wayland(struct wl_display *display, int msec, int *endflag);
45 int sec_str_2_value(const char *ssec);
46 EGLDisplay opengl_init(struct wl_display *display, EGLConfig *rconf, EGLContext *rctx);
47 EGLSurface opengl_create_window(struct wl_display *display, struct wl_surface *surface,
48 EGLDisplay dpy, EGLConfig conf, EGLContext ctx,
49 const int width, const int height, const int color);
50 void opengl_clear_window(const unsigned int color);
51 void opengl_swap_buffer(struct wl_display *display, EGLDisplay dpy, EGLSurface egl_surface);
52 void opengl_thumbnail(struct wl_display *display, uint32_t surfaceid, EGLDisplay dpy,
53 EGLConfig conf, EGLSurface egl_surface, EGLContext ctx, uint32_t name,
54 int width, int height, int stride, uint32_t format);
56 #endif /*_TEST_COMMON_H_*/