#include "gtkpagesetup.h"
#include "gtkprintsettings.h"
#include "gtkprintcontext.h"
+#include "gtkprintoperationpreview.h"
G_BEGIN_DECLS
GTK_PRINT_STATUS_FINISHED_ABORTED
} GtkPrintStatus;
+typedef enum {
+ GTK_PRINT_OPERATION_RESULT_ERROR,
+ GTK_PRINT_OPERATION_RESULT_APPLY,
+ GTK_PRINT_OPERATION_RESULT_CANCEL,
+ GTK_PRINT_OPERATION_RESULT_IN_PROGRESS
+} GtkPrintOperationResult;
+
+typedef enum {
+ GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG,
+ GTK_PRINT_OPERATION_ACTION_PRINT,
+ GTK_PRINT_OPERATION_ACTION_PREVIEW,
+ GTK_PRINT_OPERATION_ACTION_EXPORT
+} GtkPrintOperationAction;
+
+
struct _GtkPrintOperation
{
GObject parent_instance;
{
GObjectClass parent_class;
+ void (*done) (GtkPrintOperation *operation,
+ GtkPrintOperationResult result);
void (*begin_print) (GtkPrintOperation *operation,
GtkPrintContext *context);
gboolean (*paginate) (GtkPrintOperation *operation,
GtkWidget *(*create_custom_widget) (GtkPrintOperation *operation);
void (*custom_widget_apply) (GtkPrintOperation *operation,
GtkWidget *widget);
+
+ gboolean (*preview) (GtkPrintOperation *operation,
+ GtkPrintOperationPreview *preview,
+ GtkPrintContext *context,
+ GtkWindow *parent);
+
/* Padding for future expansion */
void (*_gtk_reserved1) (void);
void (*_gtk_reserved2) (void);
void (*_gtk_reserved7) (void);
};
-typedef enum {
- GTK_PRINT_OPERATION_RESULT_ERROR,
- GTK_PRINT_OPERATION_RESULT_APPLY,
- GTK_PRINT_OPERATION_RESULT_CANCEL
-} GtkPrintOperationResult;
-
#define GTK_PRINT_ERROR gtk_print_error_quark ()
typedef enum
gboolean full_page);
void gtk_print_operation_set_unit (GtkPrintOperation *op,
GtkUnit unit);
-void gtk_print_operation_set_show_dialog (GtkPrintOperation *op,
- gboolean show_dialog);
-void gtk_print_operation_set_pdf_target (GtkPrintOperation *op,
+void gtk_print_operation_set_export_filename (GtkPrintOperation *op,
const gchar *filename);
void gtk_print_operation_set_track_print_status (GtkPrintOperation *op,
gboolean track_status);
+void gtk_print_operation_set_show_progress (GtkPrintOperation *op,
+ gboolean show_progress);
+void gtk_print_operation_set_allow_async (GtkPrintOperation *op,
+ gboolean allow_async);
+void gtk_print_operation_set_custom_tab_label (GtkPrintOperation *op,
+ const gchar *label);
GtkPrintOperationResult gtk_print_operation_run (GtkPrintOperation *op,
+ GtkPrintOperationAction action,
GtkWindow *parent,
GError **error);
+void gtk_print_operation_get_error (GtkPrintOperation *op,
+ GError **error);
GtkPrintStatus gtk_print_operation_get_status (GtkPrintOperation *op);
G_CONST_RETURN gchar * gtk_print_operation_get_status_string (GtkPrintOperation *op);
gboolean gtk_print_operation_is_finished (GtkPrintOperation *op);
typedef void (* GtkPageSetupDoneFunc) (GtkPageSetup *page_setup,
gpointer data);
-void gtk_print_operation_run_async (GtkPrintOperation *op,
- GtkWindow *parent);
void gtk_print_run_page_setup_dialog_async (GtkWindow *parent,
GtkPageSetup *page_setup,
GtkPrintSettings *settings,