2008-05-28 15:35:43 +00:00
|
|
|
/* GtkPrintJob
|
|
|
|
* Copyright (C) 2006 Red Hat,Inc.
|
2006-04-21 15:09:32 +00:00
|
|
|
*
|
|
|
|
* 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
|
2012-02-27 13:01:10 +00:00
|
|
|
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
2006-04-21 15:09:32 +00:00
|
|
|
*/
|
2008-05-28 15:07:04 +00:00
|
|
|
|
2012-12-28 14:57:34 +00:00
|
|
|
#ifndef __GTK_PRINT_JOB_H__
|
|
|
|
#define __GTK_PRINT_JOB_H__
|
|
|
|
|
2009-10-21 18:30:04 +00:00
|
|
|
#if !defined (__GTK_UNIX_PRINT_H_INSIDE__) && !defined (GTK_COMPILATION)
|
2008-05-29 09:34:53 +00:00
|
|
|
#error "Only <gtk/gtkunixprint.h> can be included directly."
|
|
|
|
#endif
|
|
|
|
|
2006-04-21 15:09:32 +00:00
|
|
|
#include <cairo.h>
|
|
|
|
|
2008-05-28 15:07:04 +00:00
|
|
|
#include <gtk/gtk.h>
|
2006-04-21 15:09:32 +00:00
|
|
|
#include <gtk/gtkprinter.h>
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
#define GTK_TYPE_PRINT_JOB (gtk_print_job_get_type ())
|
|
|
|
#define GTK_PRINT_JOB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_PRINT_JOB, GtkPrintJob))
|
|
|
|
#define GTK_IS_PRINT_JOB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_PRINT_JOB))
|
|
|
|
|
2006-04-24 09:27:40 +00:00
|
|
|
typedef struct _GtkPrintJob GtkPrintJob;
|
2006-04-21 15:09:32 +00:00
|
|
|
|
2011-01-14 23:39:01 +00:00
|
|
|
/**
|
|
|
|
* GtkPrintJobCompleteFunc:
|
2021-05-20 13:17:04 +00:00
|
|
|
* @print_job: the `GtkPrintJob`
|
2011-01-14 23:39:01 +00:00
|
|
|
* @user_data: user data that has been passed to gtk_print_job_send()
|
2021-05-20 13:17:04 +00:00
|
|
|
* @error: a `GError` that contains error information if the sending
|
2021-05-18 21:05:26 +00:00
|
|
|
* of the print job failed, otherwise %NULL
|
2011-01-14 23:39:01 +00:00
|
|
|
*
|
|
|
|
* The type of callback that is passed to gtk_print_job_send().
|
2021-02-27 15:54:35 +00:00
|
|
|
*
|
2011-01-14 23:39:01 +00:00
|
|
|
* It is called when the print job has been completely sent.
|
|
|
|
*/
|
2010-06-07 12:52:38 +00:00
|
|
|
typedef void (*GtkPrintJobCompleteFunc) (GtkPrintJob *print_job,
|
|
|
|
gpointer user_data,
|
|
|
|
const GError *error);
|
2006-04-21 15:09:32 +00:00
|
|
|
|
|
|
|
|
2013-03-20 22:17:32 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2006-06-11 00:23:57 +00:00
|
|
|
GType gtk_print_job_get_type (void) G_GNUC_CONST;
|
2013-03-20 22:17:32 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2020-07-24 18:40:36 +00:00
|
|
|
GtkPrintJob *gtk_print_job_new (const char *title,
|
2006-05-15 16:22:38 +00:00
|
|
|
GtkPrinter *printer,
|
|
|
|
GtkPrintSettings *settings,
|
|
|
|
GtkPageSetup *page_setup);
|
2013-03-20 22:17:32 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2006-05-15 16:22:38 +00:00
|
|
|
GtkPrintSettings *gtk_print_job_get_settings (GtkPrintJob *job);
|
2013-03-20 22:17:32 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2006-05-15 16:22:38 +00:00
|
|
|
GtkPrinter *gtk_print_job_get_printer (GtkPrintJob *job);
|
2013-03-20 22:17:32 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2020-07-24 18:40:36 +00:00
|
|
|
const char * gtk_print_job_get_title (GtkPrintJob *job);
|
2013-03-20 22:17:32 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2006-05-15 16:22:38 +00:00
|
|
|
GtkPrintStatus gtk_print_job_get_status (GtkPrintJob *job);
|
2013-03-20 22:17:32 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2006-05-15 16:22:38 +00:00
|
|
|
gboolean gtk_print_job_set_source_file (GtkPrintJob *job,
|
2020-07-24 18:40:36 +00:00
|
|
|
const char *filename,
|
2006-05-15 16:22:38 +00:00
|
|
|
GError **error);
|
2018-02-05 19:13:20 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2016-07-04 04:04:38 +00:00
|
|
|
gboolean gtk_print_job_set_source_fd (GtkPrintJob *job,
|
|
|
|
int fd,
|
|
|
|
GError **error);
|
2013-03-20 22:17:32 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2006-05-15 16:22:38 +00:00
|
|
|
cairo_surface_t *gtk_print_job_get_surface (GtkPrintJob *job,
|
|
|
|
GError **error);
|
2013-03-20 22:17:32 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2006-05-15 16:22:38 +00:00
|
|
|
void gtk_print_job_set_track_print_status (GtkPrintJob *job,
|
|
|
|
gboolean track_status);
|
2013-03-20 22:17:32 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2006-05-15 16:22:38 +00:00
|
|
|
gboolean gtk_print_job_get_track_print_status (GtkPrintJob *job);
|
2013-03-20 22:17:32 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2006-06-21 18:16:58 +00:00
|
|
|
void gtk_print_job_send (GtkPrintJob *job,
|
2006-05-15 16:22:38 +00:00
|
|
|
GtkPrintJobCompleteFunc callback,
|
|
|
|
gpointer user_data,
|
2006-06-21 18:16:58 +00:00
|
|
|
GDestroyNotify dnotify);
|
2006-05-15 16:22:38 +00:00
|
|
|
|
2013-03-20 22:17:32 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2010-12-18 22:45:31 +00:00
|
|
|
GtkPrintPages gtk_print_job_get_pages (GtkPrintJob *job);
|
2013-03-20 22:17:32 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2010-12-18 22:45:31 +00:00
|
|
|
void gtk_print_job_set_pages (GtkPrintJob *job,
|
|
|
|
GtkPrintPages pages);
|
2013-03-20 22:17:32 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2010-12-18 22:45:31 +00:00
|
|
|
GtkPageRange * gtk_print_job_get_page_ranges (GtkPrintJob *job,
|
2020-07-24 13:54:49 +00:00
|
|
|
int *n_ranges);
|
2013-03-20 22:17:32 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2010-12-18 22:45:31 +00:00
|
|
|
void gtk_print_job_set_page_ranges (GtkPrintJob *job,
|
|
|
|
GtkPageRange *ranges,
|
2020-07-24 13:54:49 +00:00
|
|
|
int n_ranges);
|
2013-03-20 22:17:32 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2010-12-18 22:45:31 +00:00
|
|
|
GtkPageSet gtk_print_job_get_page_set (GtkPrintJob *job);
|
2013-03-20 22:17:32 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2010-12-18 22:45:31 +00:00
|
|
|
void gtk_print_job_set_page_set (GtkPrintJob *job,
|
|
|
|
GtkPageSet page_set);
|
2013-03-20 22:17:32 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2020-07-24 13:54:49 +00:00
|
|
|
int gtk_print_job_get_num_copies (GtkPrintJob *job);
|
2013-03-20 22:17:32 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2010-12-18 22:45:31 +00:00
|
|
|
void gtk_print_job_set_num_copies (GtkPrintJob *job,
|
2020-07-24 13:54:49 +00:00
|
|
|
int num_copies);
|
2013-03-20 22:17:32 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2020-07-24 20:32:16 +00:00
|
|
|
double gtk_print_job_get_scale (GtkPrintJob *job);
|
2013-03-20 22:17:32 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2010-12-18 22:45:31 +00:00
|
|
|
void gtk_print_job_set_scale (GtkPrintJob *job,
|
2020-07-24 20:32:16 +00:00
|
|
|
double scale);
|
2013-03-20 22:17:32 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2010-12-18 22:45:31 +00:00
|
|
|
guint gtk_print_job_get_n_up (GtkPrintJob *job);
|
2013-03-20 22:17:32 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2010-12-18 22:45:31 +00:00
|
|
|
void gtk_print_job_set_n_up (GtkPrintJob *job,
|
|
|
|
guint n_up);
|
2013-03-20 22:17:32 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2010-12-18 22:45:31 +00:00
|
|
|
GtkNumberUpLayout gtk_print_job_get_n_up_layout (GtkPrintJob *job);
|
2013-03-20 22:17:32 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2010-12-18 22:45:31 +00:00
|
|
|
void gtk_print_job_set_n_up_layout (GtkPrintJob *job,
|
|
|
|
GtkNumberUpLayout layout);
|
2013-03-20 22:17:32 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2010-12-18 22:45:31 +00:00
|
|
|
gboolean gtk_print_job_get_rotate (GtkPrintJob *job);
|
2013-03-20 22:17:32 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2010-12-18 22:45:31 +00:00
|
|
|
void gtk_print_job_set_rotate (GtkPrintJob *job,
|
|
|
|
gboolean rotate);
|
2013-03-20 22:17:32 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2010-12-18 22:45:31 +00:00
|
|
|
gboolean gtk_print_job_get_collate (GtkPrintJob *job);
|
2013-03-20 22:17:32 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2010-12-18 22:45:31 +00:00
|
|
|
void gtk_print_job_set_collate (GtkPrintJob *job,
|
|
|
|
gboolean collate);
|
2013-03-20 22:17:32 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2010-12-18 22:45:31 +00:00
|
|
|
gboolean gtk_print_job_get_reverse (GtkPrintJob *job);
|
2013-03-20 22:17:32 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2010-12-18 22:45:31 +00:00
|
|
|
void gtk_print_job_set_reverse (GtkPrintJob *job,
|
|
|
|
gboolean reverse);
|
|
|
|
|
2006-04-21 15:09:32 +00:00
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __GTK_PRINT_JOB_H__ */
|