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, write to the |
17 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
18 | * Boston, MA 02111-1307, USA. |
19 | */ |
20 | |
21 | #ifndef __GTK_PAGE_SETUP_H__ |
22 | #define __GTK_PAGE_SETUP_H__ |
23 | |
24 | |
25 | #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION) |
26 | #error "Only <gtk/gtk.h> can be included directly." |
27 | #endif |
28 | |
29 | #include <gtk/gtkpapersize.h> |
30 | |
31 | |
32 | G_BEGIN_DECLS |
33 | |
34 | typedef struct _GtkPageSetup GtkPageSetup; |
35 | |
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)) |
39 | |
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, |
48 | GtkPaperSize *size); |
49 | gdouble gtk_page_setup_get_top_margin (GtkPageSetup *setup, |
50 | GtkUnit unit); |
51 | void gtk_page_setup_set_top_margin (GtkPageSetup *setup, |
52 | gdouble margin, |
53 | GtkUnit unit); |
54 | gdouble gtk_page_setup_get_bottom_margin (GtkPageSetup *setup, |
55 | GtkUnit unit); |
56 | void gtk_page_setup_set_bottom_margin (GtkPageSetup *setup, |
57 | gdouble margin, |
58 | GtkUnit unit); |
59 | gdouble gtk_page_setup_get_left_margin (GtkPageSetup *setup, |
60 | GtkUnit unit); |
61 | void gtk_page_setup_set_left_margin (GtkPageSetup *setup, |
62 | gdouble margin, |
63 | GtkUnit unit); |
64 | gdouble gtk_page_setup_get_right_margin (GtkPageSetup *setup, |
65 | GtkUnit unit); |
66 | void gtk_page_setup_set_right_margin (GtkPageSetup *setup, |
67 | gdouble margin, |
68 | GtkUnit unit); |
69 | |
70 | void gtk_page_setup_set_paper_size_and_default_margins (GtkPageSetup *setup, |
71 | GtkPaperSize *size); |
72 | |
73 | /* These take orientation, but not margins into consideration */ |
74 | gdouble gtk_page_setup_get_paper_width (GtkPageSetup *setup, |
75 | GtkUnit unit); |
76 | gdouble gtk_page_setup_get_paper_height (GtkPageSetup *setup, |
77 | GtkUnit unit); |
78 | |
79 | |
80 | /* These take orientation, and margins into consideration */ |
81 | gdouble gtk_page_setup_get_page_width (GtkPageSetup *setup, |
82 | GtkUnit unit); |
83 | gdouble gtk_page_setup_get_page_height (GtkPageSetup *setup, |
84 | GtkUnit unit); |
85 | |
86 | /* Saving and restoring page setup */ |
87 | GtkPageSetup *gtk_page_setup_new_from_file (const gchar *file_name, |
88 | GError **error); |
89 | gboolean gtk_page_setup_load_file (GtkPageSetup *setup, |
90 | const char *file_name, |
91 | GError **error); |
92 | gboolean gtk_page_setup_to_file (GtkPageSetup *setup, |
93 | const char *file_name, |
94 | GError **error); |
95 | GtkPageSetup *gtk_page_setup_new_from_key_file (GKeyFile *key_file, |
96 | const gchar *group_name, |
97 | GError **error); |
98 | gboolean gtk_page_setup_load_key_file (GtkPageSetup *setup, |
99 | GKeyFile *key_file, |
100 | const gchar *group_name, |
101 | GError **error); |
102 | void gtk_page_setup_to_key_file (GtkPageSetup *setup, |
103 | GKeyFile *key_file, |
104 | const gchar *group_name); |
105 | |
106 | G_END_DECLS |
107 | |
108 | #endif /* __GTK_PAGE_SETUP_H__ */ |
109 | |