LibreOffice Module vcl (master)  1
gtkprintwrapper.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  */
9 
10 #ifndef INCLUDED_VCL_UNX_GTK_INC_GTKPRINTWRAPPER_HXX
11 #define INCLUDED_VCL_UNX_GTK_INC_GTKPRINTWRAPPER_HXX
12 
13 #include <gtk/gtk.h>
14 
15 #include <gtk/gtkunixprint.h>
16 
17 #include <osl/module.hxx>
18 #include <sal/types.h>
19 
20 namespace vcl
21 {
22 namespace unx
23 {
24 
26 {
27 private:
28  GtkPrintWrapper(const GtkPrintWrapper&) = delete;
29  GtkPrintWrapper& operator=(const GtkPrintWrapper&) = delete;
30 public:
33 
34  bool supportsPrinting() const;
35  bool supportsPrintSelection() const;
36 
37  // general printing support, since 2.10.0
38  GtkPageSetup* page_setup_new() const;
39 
40  GtkPrintJob* print_job_new(const gchar* title, GtkPrinter* printer, GtkPrintSettings* settings, GtkPageSetup* page_setup) const;
41  void print_job_send(GtkPrintJob* job, GtkPrintJobCompleteFunc callback, gpointer user_data, GDestroyNotify dnotify) const;
42  gboolean print_job_set_source_file(GtkPrintJob* job, const gchar* filename, GError** error) const;
43 
44  const gchar* print_settings_get(GtkPrintSettings* settings, const gchar* key) const;
45  gboolean print_settings_get_collate(GtkPrintSettings* settings) const;
46  void print_settings_set_collate(GtkPrintSettings* settings, gboolean collate) const;
47  gint print_settings_get_n_copies(GtkPrintSettings* settings) const;
48  void print_settings_set_n_copies(GtkPrintSettings* settings, gint num_copies) const;
49  GtkPageRange* print_settings_get_page_ranges(GtkPrintSettings* settings, gint* num_ranges) const;
50  void print_settings_set_print_pages(GtkPrintSettings* settings, GtkPrintPages pages) const;
51 
52  GtkWidget* print_unix_dialog_new() const;
53  void print_unix_dialog_add_custom_tab(GtkPrintUnixDialog* dialog, GtkWidget* child, GtkWidget* tab_label) const;
54  GtkPrinter* print_unix_dialog_get_selected_printer(GtkPrintUnixDialog* dialog) const;
55  void print_unix_dialog_set_manual_capabilities(GtkPrintUnixDialog* dialog, GtkPrintCapabilities capabilities) const;
56  GtkPrintSettings* print_unix_dialog_get_settings(GtkPrintUnixDialog* dialog) const;
57  void print_unix_dialog_set_settings(GtkPrintUnixDialog* dialog, GtkPrintSettings* settings) const;
58 
59  // print selection support, since 2.17.4
60  void print_unix_dialog_set_support_selection(GtkPrintUnixDialog* dialog, gboolean support_selection) const;
61  void print_unix_dialog_set_has_selection(GtkPrintUnixDialog* dialog, gboolean has_selection) const;
62 };
63 
64 }
65 }
66 
67 #endif // INCLUDED_VCL_UNX_GTK_INC_GTKPRINTWRAPPER_HXX
68 
69 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const gchar * print_settings_get(GtkPrintSettings *settings, const gchar *key) const
gboolean print_settings_get_collate(GtkPrintSettings *settings) const
void print_unix_dialog_set_settings(GtkPrintUnixDialog *dialog, GtkPrintSettings *settings) const
GtkPrintWrapper & operator=(const GtkPrintWrapper &)=delete
void print_unix_dialog_set_manual_capabilities(GtkPrintUnixDialog *dialog, GtkPrintCapabilities capabilities) const
void print_job_send(GtkPrintJob *job, GtkPrintJobCompleteFunc callback, gpointer user_data, GDestroyNotify dnotify) const
GtkWidget * print_unix_dialog_new() const
GtkPrintJob * print_job_new(const gchar *title, GtkPrinter *printer, GtkPrintSettings *settings, GtkPageSetup *page_setup) const
GtkPrintSettings * print_unix_dialog_get_settings(GtkPrintUnixDialog *dialog) const
void print_unix_dialog_set_has_selection(GtkPrintUnixDialog *dialog, gboolean has_selection) const
gint print_settings_get_n_copies(GtkPrintSettings *settings) const
bool supportsPrinting() const
void print_unix_dialog_set_support_selection(GtkPrintUnixDialog *dialog, gboolean support_selection) const
GtkPageSetup * page_setup_new() const
bool supportsPrintSelection() const
void print_settings_set_print_pages(GtkPrintSettings *settings, GtkPrintPages pages) const
gboolean print_job_set_source_file(GtkPrintJob *job, const gchar *filename, GError **error) const
void print_settings_set_n_copies(GtkPrintSettings *settings, gint num_copies) const
void print_unix_dialog_add_custom_tab(GtkPrintUnixDialog *dialog, GtkWidget *child, GtkWidget *tab_label) const
GtkPrinter * print_unix_dialog_get_selected_printer(GtkPrintUnixDialog *dialog) const
GtkPageRange * print_settings_get_page_ranges(GtkPrintSettings *settings, gint *num_ranges) const
void print_settings_set_collate(GtkPrintSettings *settings, gboolean collate) const