1/*
2 * "$Id: gutenprint-internal.h,v 1.3 2010/08/04 00:33:56 rlk Exp $"
3 *
4 *   Print plug-in header file for the GIMP.
5 *
6 *   Copyright 1997-2000 Michael Sweet (mike@easysw.com) and
7 *	Robert Krawitz (rlk@alum.mit.edu)
8 *
9 *   This program is free software; you can redistribute it and/or modify it
10 *   under the terms of the GNU General Public License as published by the Free
11 *   Software Foundation; either version 2 of the License, or (at your option)
12 *   any later version.
13 *
14 *   This program is distributed in the hope that it will be useful, but
15 *   WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16 *   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
17 *   for more details.
18 *
19 *   You should have received a copy of the GNU General Public License
20 *   along with this program; if not, write to the Free Software
21 *   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 *
23 * Revision History:
24 *
25 *   See ChangeLog
26 */
27
28/*
29 * This file must include only standard C header files.  The core code must
30 * compile on generic platforms that don't support glib, gimp, gtk, etc.
31 */
32
33#ifndef GUTENPRINT_INTERNAL_INTERNAL_H
34#define GUTENPRINT_INTERNAL_INTERNAL_H
35
36#ifdef __cplusplus
37extern "C" {
38#endif
39
40#ifdef HAVE_CONFIG_H
41#include <config.h>
42#endif
43
44#include <gutenprint/gutenprint-module.h>
45
46/**
47 * Utility functions (internal).
48 *
49 * @defgroup util_internal util-internal
50 * @{
51 */
52
53extern void stpi_init_paper(void);
54extern void stpi_init_dither(void);
55extern void stpi_init_printer(void);
56#define BUFFER_FLAG_FLIP_X	0x1
57#define BUFFER_FLAG_FLIP_Y	0x2
58extern stp_image_t* stpi_buffer_image(stp_image_t* image, unsigned int flags);
59
60#define STPI_ASSERT(x,v)						\
61do									\
62{									\
63  if (stp_get_debug_level() & STP_DBG_ASSERTIONS)			\
64    stp_erprintf("DEBUG: Testing assertion %s file %s line %d\n",	\
65		 #x, __FILE__, __LINE__);				\
66  if (!(x))								\
67    {									\
68      stp_erprintf("\nERROR: ***Gutenprint %s assertion %s failed!"	\
69		   " file %s, line %d.  %s\n", PACKAGE_VERSION,		\
70		   #x, __FILE__, __LINE__, "Please report this bug!");	\
71      stp_abort();							\
72    }									\
73} while (0)
74
75/** @} */
76
77
78#ifdef __cplusplus
79  }
80#endif
81
82#endif /* GUTENPRINT_INTERNAL_INTERNAL_H */
83/*
84 * End of "$Id: gutenprint-internal.h,v 1.3 2010/08/04 00:33:56 rlk Exp $".
85 */
86