]> Pileus Git - ~andy/gtk/blob - gtk/gtkpagesetup.h
0759e35b0b10169bd8910a39ec023661f44750ce
[~andy/gtk] / gtk / gtkpagesetup.h
1 /* GTK - The GTK+ Toolkit
2  * gtkpagesetup.h: Page Setup
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 #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
22 #error "Only <gtk/gtk.h> can be included directly."
23 #endif
24
25 #ifndef __GTK_PAGE_SETUP_H__
26 #define __GTK_PAGE_SETUP_H__
27
28 #include <gtk/gtkenums.h>
29 #include <gtk/gtkpapersize.h>
30
31 G_BEGIN_DECLS
32
33 typedef struct _GtkPageSetup GtkPageSetup;
34
35 #define GTK_TYPE_PAGE_SETUP    (gtk_page_setup_get_type ())
36 #define GTK_PAGE_SETUP(obj)    (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_PAGE_SETUP, GtkPageSetup))
37 #define GTK_IS_PAGE_SETUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_PAGE_SETUP))
38
39 GType              gtk_page_setup_get_type          (void) G_GNUC_CONST;
40 GtkPageSetup *     gtk_page_setup_new               (void);
41 GtkPageSetup *     gtk_page_setup_copy              (GtkPageSetup       *other);
42 GtkPageOrientation gtk_page_setup_get_orientation   (GtkPageSetup       *setup);
43 void               gtk_page_setup_set_orientation   (GtkPageSetup       *setup,
44                                                      GtkPageOrientation  orientation);
45 GtkPaperSize *     gtk_page_setup_get_paper_size    (GtkPageSetup       *setup);
46 void               gtk_page_setup_set_paper_size    (GtkPageSetup       *setup,
47                                                      GtkPaperSize       *size);
48 gdouble            gtk_page_setup_get_top_margin    (GtkPageSetup       *setup,
49                                                      GtkUnit             unit);
50 void               gtk_page_setup_set_top_margin    (GtkPageSetup       *setup,
51                                                      gdouble             margin,
52                                                      GtkUnit             unit);
53 gdouble            gtk_page_setup_get_bottom_margin (GtkPageSetup       *setup,
54                                                      GtkUnit             unit);
55 void               gtk_page_setup_set_bottom_margin (GtkPageSetup       *setup,
56                                                      gdouble             margin,
57                                                      GtkUnit             unit);
58 gdouble            gtk_page_setup_get_left_margin   (GtkPageSetup       *setup,
59                                                      GtkUnit             unit);
60 void               gtk_page_setup_set_left_margin   (GtkPageSetup       *setup,
61                                                      gdouble             margin,
62                                                      GtkUnit             unit);
63 gdouble            gtk_page_setup_get_right_margin  (GtkPageSetup       *setup,
64                                                      GtkUnit             unit);
65 void               gtk_page_setup_set_right_margin  (GtkPageSetup       *setup,
66                                                      gdouble             margin,
67                                                      GtkUnit             unit);
68
69 void gtk_page_setup_set_paper_size_and_default_margins (GtkPageSetup    *setup,
70                                                         GtkPaperSize    *size);
71
72 /* These take orientation, but not margins into consideration */
73 gdouble            gtk_page_setup_get_paper_width   (GtkPageSetup       *setup,
74                                                      GtkUnit             unit);
75 gdouble            gtk_page_setup_get_paper_height  (GtkPageSetup       *setup,
76                                                      GtkUnit             unit);
77
78
79 /* These take orientation, and margins into consideration */
80 gdouble            gtk_page_setup_get_page_width    (GtkPageSetup       *setup,
81                                                      GtkUnit             unit);
82 gdouble            gtk_page_setup_get_page_height   (GtkPageSetup       *setup,
83                                                      GtkUnit             unit);
84
85 /* Saving and restoring page setup */
86 GtkPageSetup      *gtk_page_setup_new_from_file     (const gchar         *file_name,
87                                                      GError              **error);
88 gboolean           gtk_page_setup_load_file         (GtkPageSetup        *setup,
89                                                      const char          *file_name,
90                                                      GError             **error);
91 gboolean           gtk_page_setup_to_file           (GtkPageSetup        *setup,
92                                                      const char          *file_name,
93                                                      GError             **error);
94 GtkPageSetup      *gtk_page_setup_new_from_key_file (GKeyFile            *key_file,
95                                                      const gchar         *group_name,
96                                                      GError             **error);
97 gboolean           gtk_page_setup_load_key_file     (GtkPageSetup        *setup,
98                                                      GKeyFile            *key_file,
99                                                      const gchar         *group_name,
100                                                      GError             **error);
101 void               gtk_page_setup_to_key_file       (GtkPageSetup        *setup,
102                                                      GKeyFile            *key_file,
103                                                      const gchar         *group_name);
104
105 G_END_DECLS
106
107 #endif /* __GTK_PAGE_SETUP_H__ */