1 /* GTK - The GIMP Toolkit
2 * gtkpagesetup.h: Page Setup
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, see <http://www.gnu.org/licenses/>.
19 #ifndef __GTK_PAGE_SETUP_H__
20 #define __GTK_PAGE_SETUP_H__
23 #if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
24 #error "Only <gtk/gtk.h> can be included directly."
27 #include <gtk/gtkpapersize.h>
32 typedef struct _GtkPageSetup GtkPageSetup;
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))
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,
47 gdouble gtk_page_setup_get_top_margin (GtkPageSetup *setup,
49 void gtk_page_setup_set_top_margin (GtkPageSetup *setup,
52 gdouble gtk_page_setup_get_bottom_margin (GtkPageSetup *setup,
54 void gtk_page_setup_set_bottom_margin (GtkPageSetup *setup,
57 gdouble gtk_page_setup_get_left_margin (GtkPageSetup *setup,
59 void gtk_page_setup_set_left_margin (GtkPageSetup *setup,
62 gdouble gtk_page_setup_get_right_margin (GtkPageSetup *setup,
64 void gtk_page_setup_set_right_margin (GtkPageSetup *setup,
68 void gtk_page_setup_set_paper_size_and_default_margins (GtkPageSetup *setup,
71 /* These take orientation, but not margins into consideration */
72 gdouble gtk_page_setup_get_paper_width (GtkPageSetup *setup,
74 gdouble gtk_page_setup_get_paper_height (GtkPageSetup *setup,
78 /* These take orientation, and margins into consideration */
79 gdouble gtk_page_setup_get_page_width (GtkPageSetup *setup,
81 gdouble gtk_page_setup_get_page_height (GtkPageSetup *setup,
84 /* Saving and restoring page setup */
85 GtkPageSetup *gtk_page_setup_new_from_file (const gchar *file_name,
87 gboolean gtk_page_setup_load_file (GtkPageSetup *setup,
88 const char *file_name,
90 gboolean gtk_page_setup_to_file (GtkPageSetup *setup,
91 const char *file_name,
93 GtkPageSetup *gtk_page_setup_new_from_key_file (GKeyFile *key_file,
94 const gchar *group_name,
96 gboolean gtk_page_setup_load_key_file (GtkPageSetup *setup,
98 const gchar *group_name,
100 void gtk_page_setup_to_key_file (GtkPageSetup *setup,
102 const gchar *group_name);
106 #endif /* __GTK_PAGE_SETUP_H__ */