1/* GTK - The GIMP Toolkit
2 * gtkprintoperationpreview.h: Abstract print preview interface
3 * Copyright (C) 2006, Red Hat, Inc.
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifndef __GTK_PRINT_OPERATION_PREVIEW_H__
20#define __GTK_PRINT_OPERATION_PREVIEW_H__
21
22#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
23#error "Only <gtk/gtk.h> can be included directly."
24#endif
25
26#include <cairo.h>
27#include <gtk/gtkprintcontext.h>
28
29G_BEGIN_DECLS
30
31#define GTK_TYPE_PRINT_OPERATION_PREVIEW (gtk_print_operation_preview_get_type ())
32#define GTK_PRINT_OPERATION_PREVIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_PRINT_OPERATION_PREVIEW, GtkPrintOperationPreview))
33#define GTK_IS_PRINT_OPERATION_PREVIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_PRINT_OPERATION_PREVIEW))
34#define GTK_PRINT_OPERATION_PREVIEW_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GTK_TYPE_PRINT_OPERATION_PREVIEW, GtkPrintOperationPreviewIface))
35
36typedef struct _GtkPrintOperationPreview GtkPrintOperationPreview; /*dummy typedef */
37typedef struct _GtkPrintOperationPreviewIface GtkPrintOperationPreviewIface;
38
39
40struct _GtkPrintOperationPreviewIface
41{
42 GTypeInterface g_iface;
43
44 /* signals */
45 void (*ready) (GtkPrintOperationPreview *preview,
46 GtkPrintContext *context);
47 void (*got_page_size) (GtkPrintOperationPreview *preview,
48 GtkPrintContext *context,
49 GtkPageSetup *page_setup);
50
51 /* methods */
52 void (*render_page) (GtkPrintOperationPreview *preview,
53 gint page_nr);
54 gboolean (*is_selected) (GtkPrintOperationPreview *preview,
55 gint page_nr);
56 void (*end_preview) (GtkPrintOperationPreview *preview);
57
58 /* Padding for future expansion */
59 void (*_gtk_reserved1) (void);
60 void (*_gtk_reserved2) (void);
61 void (*_gtk_reserved3) (void);
62 void (*_gtk_reserved4) (void);
63 void (*_gtk_reserved5) (void);
64 void (*_gtk_reserved6) (void);
65 void (*_gtk_reserved7) (void);
66 void (*_gtk_reserved8) (void);
67};
68
69GDK_AVAILABLE_IN_ALL
70GType gtk_print_operation_preview_get_type (void) G_GNUC_CONST;
71
72GDK_AVAILABLE_IN_ALL
73void gtk_print_operation_preview_render_page (GtkPrintOperationPreview *preview,
74 gint page_nr);
75GDK_AVAILABLE_IN_ALL
76void gtk_print_operation_preview_end_preview (GtkPrintOperationPreview *preview);
77GDK_AVAILABLE_IN_ALL
78gboolean gtk_print_operation_preview_is_selected (GtkPrintOperationPreview *preview,
79 gint page_nr);
80
81G_END_DECLS
82
83#endif /* __GTK_PRINT_OPERATION_PREVIEW_H__ */
84

source code of include/gtk-3.0/gtk/gtkprintoperationpreview.h