]> git.street.me.uk Git - andy/viking.git/blob - src/print-preview.h
Fix compiler warning for dynamic copyright.
[andy/viking.git] / src / print-preview.h
1 /* GIMP - The GNU Image Manipulation Program
2  * Copyright (C) 1995 Spencer Kimball and Peter Mattis
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17  */
18
19 #if GTK_CHECK_VERSION(2,10,0)
20
21 #ifndef __VIK_PRINT_PREVIEW_H__
22 #define __VIK_PRINT_PREVIEW_H__
23
24 G_BEGIN_DECLS
25
26
27 #define VIK_TYPE_PRINT_PREVIEW            (vik_print_preview_get_type ())
28 #define VIK_PRINT_PREVIEW(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), VIK_TYPE_PRINT_PREVIEW, VikPrintPreview))
29 #define VIK_PRINT_PREVIEW_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), VIK_TYPE_PRINT_PREVIEW, VikPrintPreviewClass))
30 #define VIK_IS_PRINT_PREVIEW(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VIK_TYPE_PRINT_PREVIEW))
31 #define VIK_IS_PRINT_PREVIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VIK_TYPE_PRINT_PREVIEW))
32 #define VIK_PRINT_PREVIEW_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), VIK_TYPE_PRINT_PREVIEW, VikPrintPreviewClass))
33
34 typedef struct _VikPrintPreview       VikPrintPreview;
35 typedef struct _VikPrintPreviewClass  VikPrintPreviewClass;
36
37 struct _VikPrintPreview
38 {
39   GtkAspectFrame  parent_instance;
40
41   GtkWidget      *area;
42   GtkPageSetup   *page;
43   GdkPixbuf      *pixbuf;
44   gboolean        dragging;
45
46   GdkDrawable    *drawable;
47
48   gdouble         image_offset_x;
49   gdouble         image_offset_y;
50   gdouble         image_offset_x_max;
51   gdouble         image_offset_y_max;
52   gdouble         image_xres;
53   gdouble         image_yres;
54
55   gboolean        use_full_page;
56 };
57
58 struct _VikPrintPreviewClass
59 {
60   GtkAspectFrameClass  parent_class;
61
62   void (* offsets_changed)  (VikPrintPreview *print_preview,
63                              gint              offset_x,
64                              gint              offset_y);
65 };
66
67
68 GType       vik_print_preview_get_type          (void) G_GNUC_CONST;
69
70 GtkWidget * vik_print_preview_new               (GtkPageSetup     *page,
71                                                   GdkDrawable     *drawable);
72
73 void        vik_print_preview_set_image_dpi     (VikPrintPreview *preview,
74                                                   gdouble           xres,
75                                                   gdouble           yres);
76
77 void        vik_print_preview_set_page_setup    (VikPrintPreview *preview,
78                                                   GtkPageSetup     *page);
79
80 void        vik_print_preview_set_image_offsets (VikPrintPreview *preview,
81                                                   gdouble           offset_x,
82                                                   gdouble           offset_y);
83
84 void        vik_print_preview_set_image_offsets_max (VikPrintPreview *preview,
85                                                       gdouble           offset_x_max,
86                                                       gdouble           offset_y_max);
87
88 void        vik_print_preview_set_use_full_page (VikPrintPreview *preview,
89                                                   gboolean          full_page);
90
91 G_END_DECLS
92
93 #endif /* __VIK_PRINT_PREVIEW_H__ */
94
95 #endif