1/* -*- Mode: C; c-basic-offset: 2; -*- */
2/* GdkPixbuf library - test loaders
3 *
4 * Copyright (C) 2014 Red Hat, Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
19 *
20 * Author: Matthias Clasen
21 */
22
23#ifndef __TEST_COMMON_H__
24
25#include <glib.h>
26#include <gdk-pixbuf/gdk-pixbuf.h>
27
28G_BEGIN_DECLS
29
30typedef gboolean (* AddTestFunc) (GFile *file);
31
32gboolean format_supported (const gchar *filename);
33gboolean file_supported (GFile *file);
34gboolean find_format (const gchar *filename, gchar **found_format);
35gboolean skip_if_insufficient_memory (GError **err);
36gboolean pixdata_equal (GdkPixbuf *test, GdkPixbuf *ref, GError **error);
37GdkPixbuf *make_checkerboard (int width, int height);
38GdkPixbuf *make_rg (int width, int height);
39void add_test_for_all_images (const gchar *prefix,
40 GFile *base,
41 GFile *file,
42 GTestDataFunc test_func,
43 AddTestFunc add_test_func);
44
45
46G_END_DECLS
47
48#endif /* __TEST_COMMON_H__ */
49

source code of gtk/subprojects/gdk-pixbuf/tests/test-common.h