Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
gtkpapersize.h
Go to the documentation of this file.
1/* GTK - The GIMP Toolkit
2 * gtkpapersize.h: Paper Size
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, see <http://www.gnu.org/licenses/>.
17 */
18
19#pragma once
20
21
22#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
23#error "Only <gtk/gtk.h> can be included directly."
24#endif
25
26#include <gdk/gdk.h>
27#include <gtk/gtkenums.h>
28
29
31
32typedef struct _GtkPaperSize GtkPaperSize;
33
34#define GTK_TYPE_PAPER_SIZE (gtk_paper_size_get_type ())
35
36/* Common names, from PWG 5101.1-2002 PWG: Standard for Media Standardized Names */
37/**
38 * GTK_PAPER_NAME_A3:
39 *
40 * Name for the A3 paper size.
41 */
42#define GTK_PAPER_NAME_A3 "iso_a3"
43
44/**
45 * GTK_PAPER_NAME_A4:
46 *
47 * Name for the A4 paper size.
48 */
49#define GTK_PAPER_NAME_A4 "iso_a4"
50
51/**
52 * GTK_PAPER_NAME_A5:
53 *
54 * Name for the A5 paper size.
55 */
56#define GTK_PAPER_NAME_A5 "iso_a5"
57
58/**
59 * GTK_PAPER_NAME_B5:
60 *
61 * Name for the B5 paper size.
62 */
63#define GTK_PAPER_NAME_B5 "iso_b5"
64
65/**
66 * GTK_PAPER_NAME_LETTER:
67 *
68 * Name for the Letter paper size.
69 */
70#define GTK_PAPER_NAME_LETTER "na_letter"
71
72/**
73 * GTK_PAPER_NAME_EXECUTIVE:
74 *
75 * Name for the Executive paper size.
76 */
77#define GTK_PAPER_NAME_EXECUTIVE "na_executive"
78
79/**
80 * GTK_PAPER_NAME_LEGAL:
81 *
82 * Name for the Legal paper size.
83 */
84#define GTK_PAPER_NAME_LEGAL "na_legal"
85
88
93 const char *ppd_display_name,
94 double width,
95 double height);
98 double width,
99 double height);
102 const char *display_name,
103 double width,
104 double height,
105 GtkUnit unit);
112 GtkPaperSize *size2);
113
116
117/* The width is always the shortest side, measure in mm */
124
133
134/* Only for custom sizes: */
137 double width,
138 double height,
139 GtkUnit unit);
140
143 GtkUnit unit);
146 GtkUnit unit);
149 GtkUnit unit);
152 GtkUnit unit);
153
155const char *gtk_paper_size_get_default (void);
156
159 const char *group_name,
160 GError **error);
163 GKeyFile *key_file,
164 const char *group_name);
165
170
172
174
#define GDK_AVAILABLE_IN_ALL
struct _GKeyFile GKeyFile
Definition gkeyfile.h:50
typedefG_BEGIN_DECLS struct _GList GList
Definition glist.h:39
#define G_END_DECLS
Definition gmacros.h:910
#define G_BEGIN_DECLS
Definition gmacros.h:909
#define G_GNUC_CONST
Definition gmacros.h:637
#define G_DEFINE_AUTOPTR_CLEANUP_FUNC(TypeName, func)
Definition gmacros.h:1400
GtkUnit
Definition gtkenums.h:759
GDK_AVAILABLE_IN_ALL GtkPaperSize * gtk_paper_size_copy(GtkPaperSize *other)
GDK_AVAILABLE_IN_ALL double gtk_paper_size_get_default_bottom_margin(GtkPaperSize *size, GtkUnit unit)
GDK_AVAILABLE_IN_ALL GtkPaperSize * gtk_paper_size_new_from_ppd(const char *ppd_name, const char *ppd_display_name, double width, double height)
GDK_AVAILABLE_IN_ALL GList * gtk_paper_size_get_paper_sizes(gboolean include_custom)
GDK_AVAILABLE_IN_ALL gboolean gtk_paper_size_is_equal(GtkPaperSize *size1, GtkPaperSize *size2)
GDK_AVAILABLE_IN_ALL const char * gtk_paper_size_get_default(void)
GDK_AVAILABLE_IN_ALL GtkPaperSize * gtk_paper_size_new_from_gvariant(GVariant *variant)
GDK_AVAILABLE_IN_ALL GType gtk_paper_size_get_type(void) G_GNUC_CONST
GDK_AVAILABLE_IN_ALL GVariant * gtk_paper_size_to_gvariant(GtkPaperSize *paper_size)
GDK_AVAILABLE_IN_ALL void gtk_paper_size_to_key_file(GtkPaperSize *size, GKeyFile *key_file, const char *group_name)
GDK_AVAILABLE_IN_ALL double gtk_paper_size_get_default_left_margin(GtkPaperSize *size, GtkUnit unit)
GDK_AVAILABLE_IN_ALL void gtk_paper_size_set_size(GtkPaperSize *size, double width, double height, GtkUnit unit)
GDK_AVAILABLE_IN_ALL double gtk_paper_size_get_width(GtkPaperSize *size, GtkUnit unit)
typedefG_BEGIN_DECLS struct _GtkPaperSize GtkPaperSize
GDK_AVAILABLE_IN_ALL double gtk_paper_size_get_height(GtkPaperSize *size, GtkUnit unit)
GDK_AVAILABLE_IN_ALL gboolean gtk_paper_size_is_ipp(GtkPaperSize *size)
GDK_AVAILABLE_IN_ALL const char * gtk_paper_size_get_ppd_name(GtkPaperSize *size)
GDK_AVAILABLE_IN_ALL const char * gtk_paper_size_get_display_name(GtkPaperSize *size)
GDK_AVAILABLE_IN_ALL GtkPaperSize * gtk_paper_size_new_from_key_file(GKeyFile *key_file, const char *group_name, GError **error)
GDK_AVAILABLE_IN_ALL GtkPaperSize * gtk_paper_size_new_from_ipp(const char *ipp_name, double width, double height)
GDK_AVAILABLE_IN_ALL double gtk_paper_size_get_default_right_margin(GtkPaperSize *size, GtkUnit unit)
GDK_AVAILABLE_IN_ALL gboolean gtk_paper_size_is_custom(GtkPaperSize *size)
GDK_AVAILABLE_IN_ALL double gtk_paper_size_get_default_top_margin(GtkPaperSize *size, GtkUnit unit)
GDK_AVAILABLE_IN_ALL const char * gtk_paper_size_get_name(GtkPaperSize *size)
GDK_AVAILABLE_IN_ALL void gtk_paper_size_free(GtkPaperSize *size)
GDK_AVAILABLE_IN_ALL GtkPaperSize * gtk_paper_size_new(const char *name)
GDK_AVAILABLE_IN_ALL GtkPaperSize * gtk_paper_size_new_custom(const char *name, const char *display_name, double width, double height, GtkUnit unit)
gsize GType
Definition gtype.h:427
gint gboolean
Definition gtypes.h:56
typedefG_BEGIN_DECLS struct _GVariant GVariant
Definition gvariant.h:36
const char * name
Definition lsqlite3.c:2154
static void error(LoadState *S, const char *why)