3 * This program is free software; you can redistribute it and/or modify it
4 * under the terms of the GNU Lesser General Public License as published by
5 * the Free Software Foundation.
7 * This program is distributed in the hope that it will be useful, but
8 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
9 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * You should have received a copy of the GNU Lesser General Public License
13 * along with this program; if not, see <http://www.gnu.org/licenses/>.
17 * Chris Lahey <clahey@ximian.com>
19 * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
23 #if !defined (__E_UTIL_H_INSIDE__) && !defined (LIBEUTIL_COMPILATION)
24 #error "Only <e-util/e-util.h> should be included directly."
32 /* Standard GObject macros */
33 #define E_TYPE_PRINTABLE \
34 (e_printable_get_type ())
35 #define E_PRINTABLE(obj) \
36 (G_TYPE_CHECK_INSTANCE_CAST \
37 ((obj), E_TYPE_PRINTABLE, EPrintable))
38 #define E_PRINTABLE_CLASS(cls) \
39 (G_TYPE_CHECK_CLASS_CAST \
40 ((cls), E_TYPE_PRINTABLE, EPrintableClass))
41 #define E_IS_PRINTABLE(obj) \
42 (G_TYPE_CHECK_INSTANCE_TYPE \
43 ((obj), E_TYPE_PRINTABLE))
44 #define E_IS_PRINTABLE_CLASS(cls) \
45 (G_TYPE_CHECK_CLASS_TYPE \
46 ((cls), E_TYPE_PRINTABLE))
47 #define E_PRINTABLE_GET_CLASS(obj) \
48 (G_TYPE_INSTANCE_GET_CLASS \
49 ((obj), E_TYPE_PRINTABLE, EPrintableClass))
53 typedef struct _EPrintable EPrintable
;
54 typedef struct _EPrintableClass EPrintableClass
;
60 struct _EPrintableClass
{
61 GObjectClass parent_class
;
64 void (*print_page
) (EPrintable
*printable
,
65 GtkPrintContext
*context
,
69 gboolean (*data_left
) (EPrintable
*printable
);
70 void (*reset
) (EPrintable
*printable
);
71 gdouble (*height
) (EPrintable
*printable
,
72 GtkPrintContext
*context
,
77 /* e_printable_will_fit (ep, ...) should be equal in value to
78 * (e_printable_print_page (ep, ...),
79 * !e_printable_data_left(ep)) except that the latter has the
80 * side effect of doing the printing and advancing the
81 * position of the printable.
83 gboolean (*will_fit
) (EPrintable
*printable
,
84 GtkPrintContext
*context
,
90 GType
e_printable_get_type (void) G_GNUC_CONST
;
91 EPrintable
* e_printable_new (void);
92 void e_printable_print_page (EPrintable
*e_printable
,
93 GtkPrintContext
*context
,
97 gboolean
e_printable_data_left (EPrintable
*printable
);
98 void e_printable_reset (EPrintable
*printable
);
99 gdouble
e_printable_height (EPrintable
*printable
,
100 GtkPrintContext
*context
,
104 gboolean
e_printable_will_fit (EPrintable
*printable
,
105 GtkPrintContext
*context
,
112 #endif /* E_PRINTABLE_H */