2 * Copyright © 2012 Intel Corporation
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice (including the next
12 * paragraph) shall be included in all copies or substantial portions of the
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
26 #include "piglit_wfl_framework.h"
29 * Abstract class. Use winsys_framework_factory() to create a concrete
32 struct piglit_winsys_framework
{
33 struct piglit_wfl_framework wfl_fw
;
36 * Has the user requested a redisplay with
37 * piglit_gl_framework::post_redisplay?
42 * Must be implemented by subclasses.
44 * TODO(chad): This could be removed.
47 (*show_window
)(struct piglit_winsys_framework
*winsys_fw
);
50 (*enter_event_loop
)(struct piglit_winsys_framework
*winsys_fw
);
53 * Set with piglit_gl_framework::set_keyboard_func. May be null.
56 (*user_keyboard_func
)(unsigned char key
, int x
, int y
);
59 * Set with piglit_gl_framework::user_reshape_func. May be null.
62 (*user_reshape_func
)(int width
, int height
);
68 struct piglit_winsys_framework
*
69 piglit_winsys_framework(struct piglit_gl_framework
*gl_fw
);
71 struct piglit_gl_framework
*
72 piglit_winsys_framework_factory(const struct piglit_gl_test_config
*test_config
);
75 * @param platform must be one of WAFFLE_PLATFORM_*.
78 piglit_winsys_framework_init(struct piglit_winsys_framework
*winsys_fw
,
79 const struct piglit_gl_test_config
*test_config
,
83 piglit_winsys_framework_teardown(struct piglit_winsys_framework
*winsys_fw
);