2
* Copyright (C) 2012 Igalia S.L.
4
* This library is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU Library General Public
6
* License as published by the Free Software Foundation; either
7
* version 2 of the License, or (at your option) any later version.
9
* This library is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
* Library General Public License for more details.
14
* You should have received a copy of the GNU Library General Public License
15
* along with this library; see the file COPYING.LIB. If not, write to
16
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17
* Boston, MA 02110-1301, USA.
20
#if !defined(__WEBKIT2_H_INSIDE__) && !defined(WEBKIT2_COMPILATION)
21
#error "Only <webkit2/webkit2.h> can be included directly."
24
#ifndef WebKitPrintOperation_h
25
#define WebKitPrintOperation_h
27
#include <glib-object.h>
28
#include <webkit2/WebKitDefines.h>
29
#include <webkit2/WebKitWebView.h>
33
#define WEBKIT_TYPE_PRINT_OPERATION (webkit_print_operation_get_type())
34
#define WEBKIT_PRINT_OPERATION(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_PRINT_OPERATION, WebKitPrintOperation))
35
#define WEBKIT_IS_PRINT_OPERATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_PRINT_OPERATION))
36
#define WEBKIT_PRINT_OPERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), WEBKIT_TYPE_PRINT_OPERATION, WebKitPrintOperationClass))
37
#define WEBKIT_IS_PRINT_OPERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), WEBKIT_TYPE_PRINT_OPERATION))
38
#define WEBKIT_PRINT_OPERATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), WEBKIT_TYPE_PRINT_OPERATION, WebKitPrintOperationClass))
40
typedef struct _WebKitPrintOperationClass WebKitPrintOperationClass;
41
typedef struct _WebKitPrintOperationPrivate WebKitPrintOperationPrivate;
44
* WebKitPrintOperationResponse:
45
* @WEBKIT_PRINT_OPERATION_RESPONSE_PRINT: Print button was cliked in print dialog
46
* @WEBKIT_PRINT_OPERATION_RESPONSE_CANCEL: Print dialog was cancelled
48
* Enum values representing the response of the print dialog shown with
49
* webkit_print_operation_run_dialog().
52
WEBKIT_PRINT_OPERATION_RESPONSE_PRINT,
53
WEBKIT_PRINT_OPERATION_RESPONSE_CANCEL
54
} WebKitPrintOperationResponse;
56
struct _WebKitPrintOperation {
59
WebKitPrintOperationPrivate *priv;
62
struct _WebKitPrintOperationClass {
63
GObjectClass parent_class;
67
webkit_print_operation_get_type (void);
69
WEBKIT_API WebKitPrintOperation *
70
webkit_print_operation_new (WebKitWebView *web_view);
72
WEBKIT_API GtkPrintSettings *
73
webkit_print_operation_get_print_settings (WebKitPrintOperation *print_operation);
76
webkit_print_operation_set_print_settings (WebKitPrintOperation *print_operation,
77
GtkPrintSettings *print_settings);
79
WEBKIT_API GtkPageSetup *
80
webkit_print_operation_get_page_setup (WebKitPrintOperation *print_operation);
83
webkit_print_operation_set_page_setup (WebKitPrintOperation *print_operation,
84
GtkPageSetup *page_setup);
86
WEBKIT_API WebKitPrintOperationResponse
87
webkit_print_operation_run_dialog (WebKitPrintOperation *print_operation,
91
webkit_print_operation_print (WebKitPrintOperation *print_operation);