1 /* GTK - The GTK+ 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, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
21 #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
22 #error "Only <gtk/gtk.h> can be included directly."
25 #ifndef __GTK_PAGE_SETUP_H__
26 #define __GTK_PAGE_SETUP_H__
28 #include <gtk/gtkenums.h>
29 #include <gtk/gtkpapersize.h>
33 typedef struct _GtkPageSetup GtkPageSetup;
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))
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,
48 gdouble gtk_page_setup_get_top_margin (GtkPageSetup *setup,
50 void gtk_page_setup_set_top_margin (GtkPageSetup *setup,
53 gdouble gtk_page_setup_get_bottom_margin (GtkPageSetup *setup,
55 void gtk_page_setup_set_bottom_margin (GtkPageSetup *setup,
58 gdouble gtk_page_setup_get_left_margin (GtkPageSetup *setup,
60 void gtk_page_setup_set_left_margin (GtkPageSetup *setup,
63 gdouble gtk_page_setup_get_right_margin (GtkPageSetup *setup,
65 void gtk_page_setup_set_right_margin (GtkPageSetup *setup,
69 void gtk_page_setup_set_paper_size_and_default_margins (GtkPageSetup *setup,
72 /* These take orientation, but not margins into consideration */
73 gdouble gtk_page_setup_get_paper_width (GtkPageSetup *setup,
75 gdouble gtk_page_setup_get_paper_height (GtkPageSetup *setup,
79 /* These take orientation, and margins into consideration */
80 gdouble gtk_page_setup_get_page_width (GtkPageSetup *setup,
82 gdouble gtk_page_setup_get_page_height (GtkPageSetup *setup,
85 /* Saving and restoring page setup */
86 GtkPageSetup *gtk_page_setup_new_from_file (const gchar *file_name,
88 gboolean gtk_page_setup_load_file (GtkPageSetup *setup,
89 const char *file_name,
91 gboolean gtk_page_setup_to_file (GtkPageSetup *setup,
92 const char *file_name,
94 GtkPageSetup *gtk_page_setup_new_from_key_file (GKeyFile *key_file,
95 const gchar *group_name,
97 gboolean gtk_page_setup_load_key_file (GtkPageSetup *setup,
99 const gchar *group_name,
101 void gtk_page_setup_to_key_file (GtkPageSetup *setup,
103 const gchar *group_name);
107 #endif /* __GTK_PAGE_SETUP_H__ */