summaryrefslogtreecommitdiff
path: root/gtk/gtkpapersize.h
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2006-04-21 15:09:32 +0000
committerAlexander Larsson <alexl@src.gnome.org>2006-04-21 15:09:32 +0000
commit27f746fbd0e56872a8d3b4bfff2588ad0b7cd7c4 (patch)
treedcf0769596bd36a76b7dcea7eed46b378a634f72 /gtk/gtkpapersize.h
parentea32742b93348e1ce47cd92a26afe5317b37dd73 (diff)
downloadgtk+-27f746fbd0e56872a8d3b4bfff2588ad0b7cd7c4.tar.gz
Merge the gtk-printing branch. For more detailed ChangeLog entries, see
2006-04-21 Alexander Larsson <alexl@redhat.com> Merge the gtk-printing branch. For more detailed ChangeLog entries, see the branch. * .cvsignore: * Makefile.am: * configure.in: * docs/tools/widgets.c: * gtk+-unix-print-2.0.pc.in: * gtk/Makefile.am: * gtk/gen-paper-names.c: * gtk/gtk.h: * gtk/gtk.symbols: * gtk/gtkenums.h: * gtk/gtkiconfactory.c: * gtk/gtkmarshalers.list: * gtk/gtkpagesetup.[ch]: * gtk/gtkpagesetupunixdialog.[ch]: * gtk/gtkpapersize.[ch]: * gtk/gtkprint-win32.[ch]: * gtk/gtkprintbackend.[ch]: * gtk/gtkprintcontext.[ch]: * gtk/gtkprinter-private.h: * gtk/gtkprinter.[ch]: * gtk/gtkprinteroption.[ch]: * gtk/gtkprinteroptionset.[ch]: * gtk/gtkprinteroptionwidget.[ch]: * gtk/gtkprintjob.[ch]: * gtk/gtkprintoperation-private.h: * gtk/gtkprintoperation-unix.c: * gtk/gtkprintoperation-win32.c: * gtk/gtkprintoperation.[ch]: * gtk/gtkprintsettings.[ch]: * gtk/gtkprintunixdialog.[ch]: * gtk/paper_names.c: * gtk/paper_names_offsets.c: Platform independent printing API and implementations for unix and windows. * gtk/gtkstock.h: * gtk/stock-icons/24/gtk-orientation-landscape.png: * gtk/stock-icons/24/gtk-orientation-portrait.png: * gtk/stock-icons/24/gtk-orientation-reverse-landscape.png: Add stock icons for page orientation. * modules/Makefile.am: * modules/printbackends/Makefile.am: * modules/printbackends/cups/Makefile.am: * modules/printbackends/cups/gtkcupsutils.[ch]: * modules/printbackends/cups/gtkprintbackendcups.[ch]: * modules/printbackends/cups/gtkprintercups.[ch]: Cups printing backend for unix. * modules/printbackends/lpr/Makefile.am: * modules/printbackends/lpr/gtkprintbackendlpr.[ch]: lpr printing backend for unix. * modules/printbackends/pdf/Makefile.am: * modules/printbackends/pdf/gtkprintbackendpdf.[ch]: print-to-pdf printing backend for unix. * tests/.cvsignore: * tests/Makefile.am: * tests/print-editor.c: Test application for printing. * gdk/gdk.symbols: * gdk/win32/gdkevents-win32.c: * gdk/win32/gdkwin32.h: Add gdk_win32_set_modal_dialog_libgtk_only so that we can pump the mainloop while displaying a win32 common dialog. * gdk/directfb/Makefile.am: Whitespace cleanup.
Diffstat (limited to 'gtk/gtkpapersize.h')
-rw-r--r--gtk/gtkpapersize.h88
1 files changed, 88 insertions, 0 deletions
diff --git a/gtk/gtkpapersize.h b/gtk/gtkpapersize.h
new file mode 100644
index 0000000000..094d2aeee9
--- /dev/null
+++ b/gtk/gtkpapersize.h
@@ -0,0 +1,88 @@
+/* GTK - The GIMP Toolkit
+ * gtkpapersize.h: Paper Size
+ * Copyright (C) 2006, Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __GTK_PAPER_SIZE_H__
+#define __GTK_PAPER_SIZE_H__
+
+#include <glib-object.h>
+#include "gtkenums.h"
+
+G_BEGIN_DECLS
+
+typedef struct _GtkPaperSize GtkPaperSize;
+
+#define GTK_TYPE_PAPER_SIZE (gtk_paper_size_get_type ())
+
+/* Common names, from PWG 5101.1-2002 PWG: Standard for Media Standardized Names */
+#define GTK_PAPER_NAME_A3 "iso_a3"
+#define GTK_PAPER_NAME_A4 "iso_a4"
+#define GTK_PAPER_NAME_A5 "iso_a5"
+#define GTK_PAPER_NAME_B5 "iso_b5"
+#define GTK_PAPER_NAME_LETTER "na_letter"
+#define GTK_PAPER_NAME_EXECUTIVE "na_executive"
+#define GTK_PAPER_NAME_LEGAL "na_legal"
+
+GType gtk_paper_size_get_type (void) G_GNUC_CONST;
+
+GtkPaperSize *gtk_paper_size_new (const char *name);
+GtkPaperSize *gtk_paper_size_new_from_ppd (const char *ppd_name,
+ const char *ppd_display_name,
+ double width,
+ double height);
+GtkPaperSize *gtk_paper_size_new_custom (const char *name,
+ const char *display_name,
+ double width,
+ double height,
+ GtkUnit unit);
+GtkPaperSize *gtk_paper_size_copy (GtkPaperSize *other);
+void gtk_paper_size_free (GtkPaperSize *size);
+gboolean gtk_paper_size_is_equal (GtkPaperSize *size1,
+ GtkPaperSize *size2);
+
+
+/* The width is always the shortest side, measure in mm */
+G_CONST_RETURN char * gtk_paper_size_get_name (GtkPaperSize *size);
+G_CONST_RETURN char * gtk_paper_size_get_display_name (GtkPaperSize *size);
+G_CONST_RETURN char * gtk_paper_size_get_ppd_name (GtkPaperSize *size);
+
+double gtk_paper_size_get_width (GtkPaperSize *size, GtkUnit unit);
+double gtk_paper_size_get_height (GtkPaperSize *size, GtkUnit unit);
+gboolean gtk_paper_size_is_custom (GtkPaperSize *size);
+
+/* Only for custom sizes: */
+void gtk_paper_size_set_size (GtkPaperSize *size,
+ double width,
+ double height,
+ GtkUnit unit);
+
+double gtk_paper_size_get_default_top_margin (GtkPaperSize *size,
+ GtkUnit unit);
+double gtk_paper_size_get_default_bottom_margin (GtkPaperSize *size,
+ GtkUnit unit);
+double gtk_paper_size_get_default_left_margin (GtkPaperSize *size,
+ GtkUnit unit);
+double gtk_paper_size_get_default_right_margin (GtkPaperSize *size,
+ GtkUnit unit);
+
+G_CONST_RETURN char * gtk_paper_size_get_default (void);
+
+G_END_DECLS
+
+#endif /* __GTK_PAPER_SIZE_H__ */