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