]> Pileus Git - ~andy/gtk/blob - gtk/gtkprintoperation-private.h
Added new symbols
[~andy/gtk] / gtk / gtkprintoperation-private.h
1 /* GTK - The GIMP Toolkit
2  * gtkprintoperation.h: Print Operation
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, write to the
17  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18  * Boston, MA 02111-1307, USA.
19  */
20
21 #ifndef __GTK_PRINT_OPERATION_PRIVATE_H__
22 #define __GTK_PRINT_OPERATION_PRIVATE_H__
23
24 #include "gtkprintoperation.h"
25
26 G_BEGIN_DECLS
27
28 struct _GtkPrintOperationPrivate
29 {
30   GtkPrintStatus status;
31   char *status_string;
32   GtkPageSetup *default_page_setup;
33   GtkPrintSettings *print_settings;
34   char *job_name;
35   int nr_of_pages;
36   int current_page;
37   gboolean use_full_page;
38   GtkUnit unit;
39   gboolean show_dialog;
40   char *pdf_target;
41
42   /* Data for the print job: */
43   cairo_surface_t *surface;
44   double dpi_x, dpi_y;
45
46   GtkPrintPages print_pages;
47   GtkPageRange *page_ranges;
48   int num_page_ranges;
49   
50   int manual_num_copies;
51   gboolean manual_collation;
52   gboolean manual_reverse;
53   gboolean manual_orientation;
54   double manual_scale;
55   GtkPageSet manual_page_set;
56  
57   void *platform_data;
58
59   void (*start_page) (GtkPrintOperation *operation,
60                       GtkPrintContext *print_context,
61                       GtkPageSetup *page_setup);
62   void (*end_page) (GtkPrintOperation *operation,
63                     GtkPrintContext *print_context);
64   void (*end_run) (GtkPrintOperation *operation,
65                    gboolean wait);
66   GDestroyNotify free_platform_data;
67 };
68
69 GtkPrintOperationResult _gtk_print_operation_platform_backend_run_dialog (GtkPrintOperation *operation,
70                                                                           GtkWindow         *parent,
71                                                                           gboolean          *do_print,
72                                                                           GError           **error);
73
74 typedef void (* GtkPrintOperationPrintFunc) (GtkPrintOperation *op,
75                                              gboolean wait);
76
77 void _gtk_print_operation_platform_backend_run_dialog_async (GtkPrintOperation          *op,
78                                                              GtkWindow                  *parent,
79                                                              GtkPrintOperationPrintFunc  print_cb);
80
81 void _gtk_print_operation_set_status (GtkPrintOperation *op,
82                                       GtkPrintStatus status,
83                                       const char *string);
84
85 /* GtkPrintContext private functions: */
86
87 GtkPrintContext *_gtk_print_context_new                             (GtkPrintOperation *op);
88 void             _gtk_print_context_set_page_setup                  (GtkPrintContext   *context,
89                                                                      GtkPageSetup      *page_setup);
90 void             _gtk_print_context_translate_into_margin           (GtkPrintContext   *context);
91 void             _gtk_print_context_rotate_according_to_orientation (GtkPrintContext   *context);
92
93 G_END_DECLS
94
95 #endif /* __GTK_PRINT_OPERATION_PRIVATE_H__ */