1 /* GTK - The GIMP Toolkit
2 * gtkprintoperationpreview.c: Abstract print preview interface
3 * Copyright (C) 2006, Red Hat, Inc.
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.
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.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
23 #include "gtkprintoperationpreview.h"
24 #include "gtkmarshalers.h"
29 static void gtk_print_operation_preview_base_init (gpointer g_iface);
32 gtk_print_operation_preview_get_type (void)
34 static GType print_operation_preview_type = 0;
36 if (!print_operation_preview_type)
38 static const GTypeInfo print_operation_preview_info =
40 sizeof (GtkPrintOperationPreviewIface), /* class_size */
41 gtk_print_operation_preview_base_init, /* base_init */
42 NULL, /* base_finalize */
44 NULL, /* class_finalize */
45 NULL, /* class_data */
51 print_operation_preview_type =
52 g_type_register_static (G_TYPE_INTERFACE, I_("GtkPrintOperationPreview"),
53 &print_operation_preview_info, 0);
55 g_type_interface_add_prerequisite (print_operation_preview_type, G_TYPE_OBJECT);
58 return print_operation_preview_type;
62 gtk_print_operation_preview_base_init (gpointer g_iface)
64 static gboolean initialized = FALSE;
68 g_signal_new (I_("ready"),
69 GTK_TYPE_PRINT_OPERATION_PREVIEW,
71 G_STRUCT_OFFSET (GtkPrintOperationPreviewIface, ready),
73 g_cclosure_marshal_VOID__OBJECT,
77 g_signal_new (I_("got-page-size"),
78 GTK_TYPE_PRINT_OPERATION_PREVIEW,
80 G_STRUCT_OFFSET (GtkPrintOperationPreviewIface, ready),
82 _gtk_marshal_VOID__OBJECT_OBJECT,
84 GTK_TYPE_PRINT_CONTEXT,
93 gtk_print_operation_preview_render_page (GtkPrintOperationPreview *preview,
96 g_return_if_fail (GTK_IS_PRINT_OPERATION_PREVIEW (preview));
98 GTK_PRINT_OPERATION_PREVIEW_GET_IFACE (preview)->render_page (preview,
103 gtk_print_operation_preview_end_preview (GtkPrintOperationPreview *preview)
105 g_return_if_fail (GTK_IS_PRINT_OPERATION_PREVIEW (preview));
107 GTK_PRINT_OPERATION_PREVIEW_GET_IFACE (preview)->end_preview (preview);
111 gtk_print_operation_preview_is_selected (GtkPrintOperationPreview *preview,
114 g_return_if_fail (GTK_IS_PRINT_OPERATION_PREVIEW (preview));
116 return GTK_PRINT_OPERATION_PREVIEW_GET_IFACE (preview)->is_selected (preview, page_nr);
120 #define __GTK_PRINT_OPERATION_PREVIEW_C__
121 #include "gtkaliasdef.c"