File: GtkPageSetup.xs

package info (click to toggle)
libgtk2-perl 2:1.2499-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 4,668 kB
  • ctags: 594
  • sloc: perl: 22,100; ansic: 122; makefile: 17
file content (124 lines) | stat: -rw-r--r-- 4,079 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
/*
 * Copyright (c) 2006 by the gtk2-perl team (see the file AUTHORS)
 *
 * Licensed under the LGPL, see LICENSE file for more information.
 *
 * $Id$
 */

#include "gtk2perl.h"

MODULE = Gtk2::PageSetup	PACKAGE = Gtk2::PageSetup	PREFIX = gtk_page_setup_

# GtkPageSetup * gtk_page_setup_new (void);
GtkPageSetup_noinc * gtk_page_setup_new (class)
    C_ARGS:
	/* void */

# FIXME: needed?
# GtkPageSetup * gtk_page_setup_copy (GtkPageSetup *other);

GtkPageOrientation gtk_page_setup_get_orientation (GtkPageSetup *setup);

void gtk_page_setup_set_orientation (GtkPageSetup *setup, GtkPageOrientation orientation);

# setup still owns the size object
GtkPaperSize * gtk_page_setup_get_paper_size (GtkPageSetup *setup);

# setup takes a copy of the size object
void gtk_page_setup_set_paper_size (GtkPageSetup *setup, GtkPaperSize *size);

gdouble gtk_page_setup_get_top_margin (GtkPageSetup *setup, GtkUnit unit);

void gtk_page_setup_set_top_margin (GtkPageSetup *setup, gdouble margin, GtkUnit unit);

gdouble gtk_page_setup_get_bottom_margin (GtkPageSetup *setup, GtkUnit unit);

void gtk_page_setup_set_bottom_margin (GtkPageSetup *setup, gdouble margin, GtkUnit unit);

gdouble gtk_page_setup_get_left_margin (GtkPageSetup *setup, GtkUnit unit);

void gtk_page_setup_set_left_margin (GtkPageSetup *setup, gdouble margin, GtkUnit unit);

gdouble gtk_page_setup_get_right_margin (GtkPageSetup *setup, GtkUnit unit);

void gtk_page_setup_set_right_margin (GtkPageSetup *setup, gdouble margin, GtkUnit unit);

# setup takes a copy of the size object
void gtk_page_setup_set_paper_size_and_default_margins (GtkPageSetup *setup, GtkPaperSize *size);

gdouble gtk_page_setup_get_paper_width (GtkPageSetup *setup, GtkUnit unit);

gdouble gtk_page_setup_get_paper_height (GtkPageSetup *setup, GtkUnit unit);

gdouble gtk_page_setup_get_page_width (GtkPageSetup *setup, GtkUnit unit);

gdouble gtk_page_setup_get_page_height (GtkPageSetup *setup, GtkUnit unit);

#if GTK_CHECK_VERSION (2, 12, 0)

# GtkPageSetup * gtk_page_setup_new_from_file (const gchar *file_name, GError **error);
=for apidoc __gerror__
=cut
GtkPageSetup_noinc * gtk_page_setup_new_from_file (class, GPerlFilename file_name)
    PREINIT:
	GError *error = NULL;
    CODE:
	RETVAL = gtk_page_setup_new_from_file (file_name, &error);
	if (error)
		gperl_croak_gerror (NULL, error);
    OUTPUT:
	RETVAL

# gboolean gtk_page_setup_to_file (GtkPageSetup *setup, const char *file_name, GError **error);
=for apidoc __gerror__
=cut
void gtk_page_setup_to_file (GtkPageSetup *setup, GPerlFilename file_name)
    PREINIT:
	GError *error = NULL;
    CODE:
	if (!gtk_page_setup_to_file (setup, file_name, &error))
		gperl_croak_gerror (NULL, error);

# GtkPageSetup * gtk_page_setup_new_from_key_file (GKeyFile *key_file, const gchar *group_name, GError **error);
=for apidoc __gerror__
=cut
GtkPageSetup_noinc * gtk_page_setup_new_from_key_file (class, GKeyFile *key_file, const gchar_ornull *group_name)
    PREINIT:
	GError *error = NULL;
    CODE:
	RETVAL = gtk_page_setup_new_from_key_file (key_file, group_name, &error);
	if (error)
		gperl_croak_gerror (NULL, error);
    OUTPUT:
	RETVAL

void gtk_page_setup_to_key_file (GtkPageSetup *setup, GKeyFile *key_file, const gchar_ornull *group_name);

#endif

#if GTK_CHECK_VERSION (2, 14, 0)

=for apidoc __gerror__
=cut
# gboolean gtk_page_setup_load_file (GtkPageSetup *setup, const char *file_name, GError **error);
void
gtk_page_setup_load_file (GtkPageSetup *setup, const char *file_name)
    PREINIT:
	GError *error = NULL;
    CODE:
	if (!gtk_page_setup_load_file (setup, file_name, &error))
		gperl_croak_gerror (NULL, error);

=for apidoc __gerror__
=cut
# gboolean gtk_page_setup_load_key_file (GtkPageSetup *setup, GKeyFile *key_file, const gchar *group_name, GError **error);
void
gtk_page_setup_load_key_file (GtkPageSetup *setup, GKeyFile *key_file, const gchar_ornull *group_name)
    PREINIT:
	GError *error = NULL;
    CODE:
	if (!gtk_page_setup_load_key_file (setup, key_file, group_name, &error))
		gperl_croak_gerror (NULL, error);

#endif /* 2.14 */