| 1 |
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
| 2 |
/* vim: set sw=4 sts=4 ts=4 expandtab: */ |
| 3 |
|
| 4 |
#ifndef TEST_UTILS_H |
| 5 |
#define TEST_UTILS_H |
| 6 |
|
| 7 |
#include <cairo.h> |
| 8 |
#include <gio/gio.h> |
| 9 |
|
| 10 |
#ifdef HAVE_PIXBUF |
| 11 |
#include <gdk-pixbuf/gdk-pixbuf.h> |
| 12 |
#endif |
| 13 |
|
| 14 |
G_BEGIN_DECLS |
| 15 |
|
| 16 |
typedef struct { |
| 17 |
unsigned int pixels_changed; |
| 18 |
unsigned int max_diff; |
| 19 |
} TestUtilsBufferDiffResult; |
| 20 |
|
| 21 |
void test_utils_compare_surfaces (cairo_surface_t *surface_a, |
| 22 |
cairo_surface_t *surface_b, |
| 23 |
cairo_surface_t *surface_diff, |
| 24 |
TestUtilsBufferDiffResult *result); |
| 25 |
|
| 26 |
#ifdef HAVE_PIXBUF |
| 27 |
cairo_surface_t *test_utils_cairo_surface_from_pixbuf (const GdkPixbuf *pixbuf); |
| 28 |
#endif |
| 29 |
|
| 30 |
typedef gboolean (* AddTestFunc) (GFile *file); |
| 31 |
|
| 32 |
const gchar *test_utils_get_test_data_path (void); |
| 33 |
|
| 34 |
void test_utils_print_dependency_versions (void); |
| 35 |
|
| 36 |
void test_utils_setup_font_map (void); |
| 37 |
|
| 38 |
G_END_DECLS |
| 39 |
|
| 40 |
#endif /* TEST_UTILS_H */ |