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, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
21 #if !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__
29 #include <gtk/gtkpapersize.h>
34 typedef struct _GtkPageSetup GtkPageSetup;
36 #define GTK_TYPE_PAGE_SETUP (gtk_page_setup_get_type ())
37 #define GTK_PAGE_SETUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_PAGE_SETUP, GtkPageSetup))
38 #define GTK_IS_PAGE_SETUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_PAGE_SETUP))
40 GType gtk_page_setup_get_type (void) G_GNUC_CONST;
41 GtkPageSetup * gtk_page_setup_new (void);
42 GtkPageSetup * gtk_page_setup_copy (GtkPageSetup *other);
43 GtkPageOrientation gtk_page_setup_get_orientation (GtkPageSetup *setup);
44 void gtk_page_setup_set_orientation (GtkPageSetup *setup,
45 GtkPageOrientation orientation);
46 GtkPaperSize * gtk_page_setup_get_paper_size (GtkPageSetup *setup);
47 void gtk_page_setup_set_paper_size (GtkPageSetup *setup,
49 gdouble gtk_page_setup_get_top_margin (GtkPageSetup *setup,
51 void gtk_page_setup_set_top_margin (GtkPageSetup *setup,
54 gdouble gtk_page_setup_get_bottom_margin (GtkPageSetup *setup,
56 void gtk_page_setup_set_bottom_margin (GtkPageSetup *setup,
59 gdouble gtk_page_setup_get_left_margin (GtkPageSetup *setup,
61 void gtk_page_setup_set_left_margin (GtkPageSetup *setup,
64 gdouble gtk_page_setup_get_right_margin (GtkPageSetup *setup,
66 void gtk_page_setup_set_right_margin (GtkPageSetup *setup,
70 void gtk_page_setup_set_paper_size_and_default_margins (GtkPageSetup *setup,
73 /* These take orientation, but not margins into consideration */
74 gdouble gtk_page_setup_get_paper_width (GtkPageSetup *setup,
76 gdouble gtk_page_setup_get_paper_height (GtkPageSetup *setup,
80 /* These take orientation, and margins into consideration */
81 gdouble gtk_page_setup_get_page_width (GtkPageSetup *setup,
83 gdouble gtk_page_setup_get_page_height (GtkPageSetup *setup,
86 /* Saving and restoring page setup */
87 GtkPageSetup *gtk_page_setup_new_from_file (const gchar *file_name,
89 gboolean gtk_page_setup_load_file (GtkPageSetup *setup,
90 const char *file_name,
92 gboolean gtk_page_setup_to_file (GtkPageSetup *setup,
93 const char *file_name,
95 GtkPageSetup *gtk_page_setup_new_from_key_file (GKeyFile *key_file,
96 const gchar *group_name,
98 gboolean gtk_page_setup_load_key_file (GtkPageSetup *setup,
100 const gchar *group_name,
102 void gtk_page_setup_to_key_file (GtkPageSetup *setup,
104 const gchar *group_name);
108 #endif /* __GTK_PAGE_SETUP_H__ */