Tizen 2.0 Release
[framework/graphics/cairo.git] / test / cairo-test-private.h
1 /*
2  * Copyright © 2004 Red Hat, Inc.
3  * Copyright © 2008 Chris Wilson
4  *
5  * Permission to use, copy, modify, distribute, and sell this software
6  * and its documentation for any purpose is hereby granted without
7  * fee, provided that the above copyright notice appear in all copies
8  * and that both that copyright notice and this permission notice
9  * appear in supporting documentation, and that the name of
10  * Red Hat, Inc. not be used in advertising or publicity pertaining to
11  * distribution of the software without specific, written prior
12  * permission. Red Hat, Inc. makes no representations about the
13  * suitability of this software for any purpose.  It is provided "as
14  * is" without express or implied warranty.
15  *
16  * RED HAT, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
17  * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
18  * FITNESS, IN NO EVENT SHALL RED HAT, INC. BE LIABLE FOR ANY SPECIAL,
19  * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
20  * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
21  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
22  * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
23  *
24  * Author: Carl D. Worth <cworth@cworth.org>
25  *         Chris Wilson <chris@chris-wilson.co.uk>
26  */
27
28 #ifndef _CAIRO_TEST_PRIVATE_H_
29 #define _CAIRO_TEST_PRIVATE_H_
30
31 #include "cairo-test.h"
32
33 /* For communication between the core components of cairo-test and not
34  * for the tests themselves.
35  */
36
37 CAIRO_BEGIN_DECLS
38
39 typedef enum {
40     DIRECT,
41     SIMILAR
42 } cairo_test_similar_t;
43
44 cairo_test_similar_t
45 cairo_test_target_has_similar (const cairo_test_context_t *ctx,
46                                const cairo_boilerplate_target_t *target);
47
48 cairo_test_status_t
49 _cairo_test_context_run_for_target (cairo_test_context_t *ctx,
50                                     const cairo_boilerplate_target_t *target,
51                                     cairo_bool_t similar,
52                                     int dev_offset);
53
54 void
55 _cairo_test_context_init_for_test (cairo_test_context_t *ctx,
56                                    const cairo_test_context_t *parent,
57                                    const cairo_test_t *test);
58
59 void
60 cairo_test_init (cairo_test_context_t *ctx,
61                  const char *test_name,
62                  const char *output);
63
64 void
65 cairo_test_fini (cairo_test_context_t *ctx);
66
67 void
68 _cairo_test_runner_register_tests (void);
69
70 CAIRO_END_DECLS
71
72 #endif /* _CAIRO_TEST_PRIVATE_H_ */