Evince
Evince is a document viewer capable of displaying multiple and single page document formats like PDF and Postscript.
Main Page
Related Pages
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
ev-jobs.h
Go to the documentation of this file.
1
/* this file is part of evince, a gnome document viewer
2
*
3
* Copyright (C) 2008 Carlos Garcia Campos <carlosgc@gnome.org>
4
* Copyright (C) 2005 Red Hat, Inc
5
*
6
* Evince is free software; you can redistribute it and/or modify it
7
* under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or
9
* (at your option) any later version.
10
*
11
* Evince is distributed in the hope that it will be useful, but
12
* WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
* General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19
*/
20
21
#if !defined (__EV_EVINCE_VIEW_H_INSIDE__) && !defined (EVINCE_COMPILATION)
22
#error "Only <evince-view.h> can be included directly."
23
#endif
24
25
#ifndef __EV_JOBS_H__
26
#define __EV_JOBS_H__
27
28
#include <gio/gio.h>
29
#include <gtk/gtk.h>
30
#include <cairo.h>
31
32
#include <
evince-document.h
>
33
34
G_BEGIN_DECLS
35
36
typedef
struct
_EvJob
EvJob
;
37
typedef
struct
_EvJobClass
EvJobClass
;
38
39
typedef
struct
_EvJobRender
EvJobRender
;
40
typedef
struct
_EvJobRenderClass
EvJobRenderClass
;
41
42
typedef
struct
_EvJobPageData
EvJobPageData
;
43
typedef
struct
_EvJobPageDataClass
EvJobPageDataClass
;
44
45
typedef
struct
_EvJobThumbnail
EvJobThumbnail
;
46
typedef
struct
_EvJobThumbnailClass
EvJobThumbnailClass
;
47
48
typedef
struct
_EvJobLinks
EvJobLinks
;
49
typedef
struct
_EvJobLinksClass
EvJobLinksClass
;
50
51
typedef
struct
_EvJobAttachments
EvJobAttachments
;
52
typedef
struct
_EvJobAttachmentsClass
EvJobAttachmentsClass
;
53
54
typedef
struct
_EvJobAnnots
EvJobAnnots
;
55
typedef
struct
_EvJobAnnotsClass
EvJobAnnotsClass
;
56
57
typedef
struct
_EvJobFonts
EvJobFonts
;
58
typedef
struct
_EvJobFontsClass
EvJobFontsClass
;
59
60
typedef
struct
_EvJobLoad
EvJobLoad
;
61
typedef
struct
_EvJobLoadClass
EvJobLoadClass
;
62
63
typedef
struct
_EvJobLoadStream
EvJobLoadStream
;
64
typedef
struct
_EvJobLoadStreamClass
EvJobLoadStreamClass
;
65
66
typedef
struct
_EvJobLoadGFile
EvJobLoadGFile
;
67
typedef
struct
_EvJobLoadGFileClass
EvJobLoadGFileClass
;
68
69
typedef
struct
_EvJobSave
EvJobSave
;
70
typedef
struct
_EvJobSaveClass
EvJobSaveClass
;
71
72
typedef
struct
_EvJobFind
EvJobFind
;
73
typedef
struct
_EvJobFindClass
EvJobFindClass
;
74
75
typedef
struct
_EvJobLayers
EvJobLayers
;
76
typedef
struct
_EvJobLayersClass
EvJobLayersClass
;
77
78
typedef
struct
_EvJobExport
EvJobExport
;
79
typedef
struct
_EvJobExportClass
EvJobExportClass
;
80
81
typedef
struct
_EvJobPrint
EvJobPrint
;
82
typedef
struct
_EvJobPrintClass
EvJobPrintClass
;
83
84
#define EV_TYPE_JOB (ev_job_get_type())
85
#define EV_JOB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EV_TYPE_JOB, EvJob))
86
#define EV_IS_JOB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EV_TYPE_JOB))
87
#define EV_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EV_TYPE_JOB, EvJobClass))
88
#define EV_IS_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EV_TYPE_JOB))
89
#define EV_JOB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EV_TYPE_JOB, EvJobClass))
90
91
#define EV_TYPE_JOB_LINKS (ev_job_links_get_type())
92
#define EV_JOB_LINKS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EV_TYPE_JOB_LINKS, EvJobLinks))
93
#define EV_IS_JOB_LINKS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EV_TYPE_JOB_LINKS))
94
#define EV_JOB_LINKS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EV_TYPE_JOB_LINKS, EvJobLinksClass))
95
#define EV_IS_JOB_LINKS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EV_TYPE_JOB_LINKS))
96
#define EV_JOB_LINKS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EV_TYPE_JOB_LINKS, EvJobLinksClass))
97
98
#define EV_TYPE_JOB_ATTACHMENTS (ev_job_attachments_get_type())
99
#define EV_JOB_ATTACHMENTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EV_TYPE_JOB_ATTACHMENTS, EvJobAttachments))
100
#define EV_IS_JOB_ATTACHMENTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EV_TYPE_JOB_ATTACHMENTS))
101
#define EV_JOB_ATTACHMENTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EV_TYPE_JOB_ATTACHMENTS, EvJobAttachmentsClass))
102
#define EV_IS_JOB_ATTACHMENTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EV_TYPE_JOB_ATTACHMENTS))
103
#define EV_JOB_ATTACHMENTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EV_TYPE_JOB_ATTACHMENTS, EvJobAttachmentsClass))
104
105
#define EV_TYPE_JOB_ANNOTS (ev_job_annots_get_type())
106
#define EV_JOB_ANNOTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EV_TYPE_JOB_ANNOTS, EvJobAnnots))
107
#define EV_IS_JOB_ANNOTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EV_TYPE_JOB_ANNOTS))
108
#define EV_JOB_ANNOTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EV_TYPE_JOB_ANNOTS, EvJobAnnotsClass))
109
#define EV_IS_JOB_ANNOTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EV_TYPE_JOB_ANNOTS))
110
#define EV_JOB_ANNOTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EV_TYPE_JOB_ANNOTS, EvJobAnnotsClass))
111
112
#define EV_TYPE_JOB_RENDER (ev_job_render_get_type())
113
#define EV_JOB_RENDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EV_TYPE_JOB_RENDER, EvJobRender))
114
#define EV_IS_JOB_RENDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EV_TYPE_JOB_RENDER))
115
#define EV_JOB_RENDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EV_TYPE_JOB_RENDER, EvJobRenderClass))
116
#define EV_IS_JOB_RENDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EV_TYPE_JOB_RENDER))
117
#define EV_JOB_RENDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EV_TYPE_JOB_RENDER, EvJobRenderClass))
118
119
#define EV_TYPE_JOB_PAGE_DATA (ev_job_page_data_get_type())
120
#define EV_JOB_PAGE_DATA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EV_TYPE_JOB_PAGE_DATA, EvJobPageData))
121
#define EV_IS_JOB_PAGE_DATA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EV_TYPE_JOB_PAGE_DATA))
122
#define EV_JOB_PAGE_DATA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EV_TYPE_JOB_PAGE_DATA, EvJobPageDataClass))
123
#define EV_IS_JOB_PAGE_DATA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EV_TYPE_JOB_PAGE_DATA))
124
#define EV_JOB_PAGE_DATA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EV_TYPE_JOB_PAGE_DATA, EvJobPageDataClass))
125
126
#define EV_TYPE_JOB_THUMBNAIL (ev_job_thumbnail_get_type())
127
#define EV_JOB_THUMBNAIL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EV_TYPE_JOB_THUMBNAIL, EvJobThumbnail))
128
#define EV_IS_JOB_THUMBNAIL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EV_TYPE_JOB_THUMBNAIL))
129
#define EV_JOB_THUMBNAIL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EV_TYPE_JOB_THUMBNAIL, EvJobThumbnailClass))
130
#define EV_IS_JOB_THUMBNAIL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EV_TYPE_JOB_THUMBNAIL))
131
#define EV_JOB_THUMBNAIL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EV_TYPE_JOB_THUMBNAIL, EvJobThumbnailClass))
132
133
#define EV_TYPE_JOB_FONTS (ev_job_fonts_get_type())
134
#define EV_JOB_FONTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EV_TYPE_JOB_FONTS, EvJobFonts))
135
#define EV_IS_JOB_FONTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EV_TYPE_JOB_FONTS))
136
#define EV_JOB_FONTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EV_TYPE_JOB_FONTS, EvJobFontsClass))
137
#define EV_IS_JOB_FONTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EV_TYPE_JOB_FONTS))
138
#define EV_JOB_FONTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EV_TYPE_JOB_FONTS, EvJobFontsClass))
139
140
141
#define EV_TYPE_JOB_LOAD (ev_job_load_get_type())
142
#define EV_JOB_LOAD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EV_TYPE_JOB_LOAD, EvJobLoad))
143
#define EV_IS_JOB_LOAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EV_TYPE_JOB_LOAD))
144
#define EV_JOB_LOAD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EV_TYPE_JOB_LOAD, EvJobLoadClass))
145
#define EV_IS_JOB_LOAD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EV_TYPE_JOB_LOAD))
146
#define EV_JOB_LOAD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EV_TYPE_JOB_LOAD, EvJobLoadClass))
147
148
#define EV_TYPE_JOB_LOAD_STREAM (ev_job_load_stream_get_type())
149
#define EV_JOB_LOAD_STREAM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EV_TYPE_JOB_LOAD_STREAM, EvJobLoadStream))
150
#define EV_IS_JOB_LOAD_STREAM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EV_TYPE_JOB_LOAD_STREAM))
151
#define EV_JOB_LOAD_STREAM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EV_TYPE_JOB_LOAD_STREAM, EvJobLoadStreamClass))
152
#define EV_IS_JOB_LOAD_STREAM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EV_TYPE_JOB_LOAD_STREAM))
153
#define EV_JOB_LOAD_STREAM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EV_TYPE_JOB_LOAD_STREAM, EvJobLoadStreamClass))
154
155
#define EV_TYPE_JOB_LOAD_GFILE (ev_job_load_gfile_get_type())
156
#define EV_JOB_LOAD_GFILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EV_TYPE_JOB_LOAD_GFILE, EvJobLoadGFile))
157
#define EV_IS_JOB_LOAD_GFILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EV_TYPE_JOB_LOAD_GFILE))
158
#define EV_JOB_LOAD_GFILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EV_TYPE_JOB_LOAD_GFILE, EvJobLoadGFileClass))
159
#define EV_IS_JOB_LOAD_GFILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EV_TYPE_JOB_LOAD_GFILE))
160
#define EV_JOB_LOAD_GFILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EV_TYPE_JOB_LOAD_GFILE, EvJobLoadGFileClass))
161
162
#define EV_TYPE_JOB_SAVE (ev_job_save_get_type())
163
#define EV_JOB_SAVE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EV_TYPE_JOB_SAVE, EvJobSave))
164
#define EV_IS_JOB_SAVE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EV_TYPE_JOB_SAVE))
165
#define EV_JOB_SAVE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EV_TYPE_JOB_SAVE, EvJobSaveClass))
166
#define EV_IS_JOB_SAVE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EV_TYPE_JOB_SAVE))
167
#define EV_JOB_SAVE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EV_TYPE_JOB_SAVE, EvJobSaveClass))
168
169
#define EV_TYPE_JOB_FIND (ev_job_find_get_type())
170
#define EV_JOB_FIND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EV_TYPE_JOB_FIND, EvJobFind))
171
#define EV_IS_JOB_FIND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EV_TYPE_JOB_FIND))
172
#define EV_JOB_FIND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EV_TYPE_JOB_FIND, EvJobFindClass))
173
#define EV_IS_JOB_FIND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EV_TYPE_JOB_FIND))
174
#define EV_JOB_FIND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EV_TYPE_JOB_FIND, EvJobFindClass))
175
176
#define EV_TYPE_JOB_LAYERS (ev_job_layers_get_type())
177
#define EV_JOB_LAYERS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EV_TYPE_JOB_LAYERS, EvJobLayers))
178
#define EV_IS_JOB_LAYERS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EV_TYPE_JOB_LAYERS))
179
#define EV_JOB_LAYERS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EV_TYPE_JOB_LAYERS, EvJobLayersClass))
180
#define EV_IS_JOB_LAYERS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EV_TYPE_JOB_LAYERS))
181
#define EV_JOB_LAYERS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EV_TYPE_JOB_LAYERS, EvJobLayersClass))
182
183
#define EV_TYPE_JOB_EXPORT (ev_job_export_get_type())
184
#define EV_JOB_EXPORT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EV_TYPE_JOB_EXPORT, EvJobExport))
185
#define EV_IS_JOB_EXPORT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EV_TYPE_JOB_EXPORT))
186
#define EV_JOB_EXPORT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EV_TYPE_JOB_EXPORT, EvJobExportClass))
187
#define EV_IS_JOB_EXPORT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EV_TYPE_JOB_EXPORT))
188
#define EV_JOB_EXPORT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EV_TYPE_JOB_EXPORT, EvJobExportClass))
189
190
#define EV_TYPE_JOB_PRINT (ev_job_print_get_type())
191
#define EV_JOB_PRINT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EV_TYPE_JOB_PRINT, EvJobPrint))
192
#define EV_IS_JOB_PRINT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EV_TYPE_JOB_PRINT))
193
#define EV_JOB_PRINT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EV_TYPE_JOB_PRINT, EvJobPrintClass))
194
#define EV_IS_JOB_PRINT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EV_TYPE_JOB_PRINT))
195
#define EV_JOB_PRINT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EV_TYPE_JOB_PRINT, EvJobPrintClass))
196
197
typedef
enum
{
198
EV_JOB_RUN_THREAD
,
199
EV_JOB_RUN_MAIN_LOOP
200
}
EvJobRunMode
;
201
202
struct
_EvJob
203
{
204
GObject
parent
;
205
206
EvDocument
*
document
;
207
208
EvJobRunMode
run_mode
;
209
210
guint
cancelled
: 1;
211
guint
finished
: 1;
212
guint
failed
: 1;
213
214
GError *
error
;
215
GCancellable *
cancellable
;
216
217
guint
idle_finished_id
;
218
guint
idle_cancelled_id
;
219
};
220
221
struct
_EvJobClass
222
{
223
GObjectClass
parent_class
;
224
225
gboolean (*
run
) (
EvJob
*job);
226
227
/* Signals */
228
void (*
cancelled
) (
EvJob
*job);
229
void (*
finished
) (
EvJob
*job);
230
};
231
232
struct
_EvJobLinks
233
{
234
EvJob
parent
;
235
236
GtkTreeModel *
model
;
237
};
238
239
struct
_EvJobLinksClass
240
{
241
EvJobClass
parent_class
;
242
};
243
244
struct
_EvJobAttachments
245
{
246
EvJob
parent
;
247
248
GList *
attachments
;
249
};
250
251
struct
_EvJobAttachmentsClass
252
{
253
EvJobClass
parent_class
;
254
};
255
256
struct
_EvJobAnnots
257
{
258
EvJob
parent
;
259
260
GList *
annots
;
261
};
262
263
struct
_EvJobAnnotsClass
264
{
265
EvJobClass
parent_class
;
266
};
267
268
struct
_EvJobRender
269
{
270
EvJob
parent
;
271
272
gint
page
;
273
gint
rotation
;
274
gdouble
scale
;
275
276
gboolean
page_ready
;
277
gint
target_width
;
278
gint
target_height
;
279
cairo_surface_t *
surface
;
280
281
gboolean
include_selection
;
282
cairo_surface_t *
selection
;
283
cairo_region_t *
selection_region
;
284
EvRectangle
selection_points
;
285
EvSelectionStyle
selection_style
;
286
GdkColor
base
;
287
GdkColor
text
;
288
};
289
290
struct
_EvJobRenderClass
291
{
292
EvJobClass
parent_class
;
293
};
294
295
typedef
enum
{
296
EV_PAGE_DATA_INCLUDE_NONE
= 0,
297
EV_PAGE_DATA_INCLUDE_LINKS
= 1 << 0,
298
EV_PAGE_DATA_INCLUDE_TEXT
= 1 << 1,
299
EV_PAGE_DATA_INCLUDE_TEXT_MAPPING
= 1 << 2,
300
EV_PAGE_DATA_INCLUDE_TEXT_LAYOUT
= 1 << 3,
301
EV_PAGE_DATA_INCLUDE_TEXT_ATTRS
= 1 << 4,
302
EV_PAGE_DATA_INCLUDE_TEXT_LOG_ATTRS
= 1 << 5,
303
EV_PAGE_DATA_INCLUDE_IMAGES
= 1 << 6,
304
EV_PAGE_DATA_INCLUDE_FORMS
= 1 << 7,
305
EV_PAGE_DATA_INCLUDE_ANNOTS
= 1 << 8,
306
EV_PAGE_DATA_INCLUDE_MEDIA
= 1 << 9,
307
EV_PAGE_DATA_INCLUDE_ALL
= (1 << 10) - 1
308
}
EvJobPageDataFlags
;
309
310
struct
_EvJobPageData
311
{
312
EvJob
parent
;
313
314
gint
page
;
315
EvJobPageDataFlags
flags
;
316
317
EvMappingList
*
link_mapping
;
318
EvMappingList
*
image_mapping
;
319
EvMappingList
*
form_field_mapping
;
320
EvMappingList
*
annot_mapping
;
321
EvMappingList
*
media_mapping
;
322
cairo_region_t *
text_mapping
;
323
gchar *
text
;
324
EvRectangle
*
text_layout
;
325
guint
text_layout_length
;
326
PangoAttrList *
text_attrs
;
327
PangoLogAttr *
text_log_attrs
;
328
gulong
text_log_attrs_length
;
329
};
330
331
struct
_EvJobPageDataClass
332
{
333
EvJobClass
parent_class
;
334
};
335
336
typedef
enum
{
337
EV_JOB_THUMBNAIL_PIXBUF
,
338
EV_JOB_THUMBNAIL_SURFACE
339
}
EvJobThumbnailFormat
;
340
341
struct
_EvJobThumbnail
342
{
343
EvJob
parent
;
344
345
gint
page
;
346
gint
rotation
;
347
gdouble
scale
;
348
gint
target_width
;
349
gint
target_height
;
350
351
GdkPixbuf *
thumbnail
;
352
gboolean
has_frame
;
353
354
EvJobThumbnailFormat
format
;
355
cairo_surface_t *
thumbnail_surface
;
356
};
357
358
struct
_EvJobThumbnailClass
359
{
360
EvJobClass
parent_class
;
361
};
362
363
struct
_EvJobFonts
364
{
365
EvJob
parent
;
366
gboolean
scan_completed
;
367
};
368
369
struct
_EvJobFontsClass
370
{
371
EvJobClass
parent_class
;
372
373
/* Signals */
374
void (*
updated
) (
EvJobFonts
*job,
375
gdouble progress);
376
};
377
378
struct
_EvJobLoad
379
{
380
EvJob
parent
;
381
382
gchar *
uri
;
383
gchar *
password
;
384
};
385
386
struct
_EvJobLoadClass
387
{
388
EvJobClass
parent_class
;
389
};
390
391
struct
_EvJobLoadStream
392
{
393
EvJob
parent
;
394
395
char
*
password
;
396
GInputStream *
stream
;
397
EvDocumentLoadFlags
flags
;
398
};
399
400
struct
_EvJobLoadStreamClass
401
{
402
EvJobClass
parent_class
;
403
};
404
405
struct
_EvJobLoadGFile
406
{
407
EvJob
parent
;
408
409
char
*
password
;
410
GFile *
gfile
;
411
EvDocumentLoadFlags
flags
;
412
};
413
414
struct
_EvJobLoadGFileClass
415
{
416
EvJobClass
parent_class
;
417
};
418
419
struct
_EvJobSave
420
{
421
EvJob
parent
;
422
423
gchar *
uri
;
424
gchar *
document_uri
;
425
};
426
427
struct
_EvJobSaveClass
428
{
429
EvJobClass
parent_class
;
430
};
431
432
struct
_EvJobFind
433
{
434
EvJob
parent
;
435
436
gint
start_page
;
437
gint
current_page
;
438
gint
n_pages
;
439
GList **
pages
;
440
gchar *
text
;
441
gboolean
case_sensitive
;
442
gboolean
has_results
;
443
EvFindOptions
options
;
444
};
445
446
struct
_EvJobFindClass
447
{
448
EvJobClass
parent_class
;
449
450
/* Signals */
451
void (*
updated
) (
EvJobFind
*job,
452
gint page);
453
};
454
455
struct
_EvJobLayers
456
{
457
EvJob
parent
;
458
459
GtkTreeModel *
model
;
460
};
461
462
struct
_EvJobLayersClass
463
{
464
EvJobClass
parent_class
;
465
};
466
467
struct
_EvJobExport
468
{
469
EvJob
parent
;
470
471
gint
page
;
472
EvRenderContext
*
rc
;
473
};
474
475
struct
_EvJobExportClass
476
{
477
EvJobClass
parent_class
;
478
};
479
480
struct
_EvJobPrint
481
{
482
EvJob
parent
;
483
484
gint
page
;
485
cairo_t *
cr
;
486
};
487
488
struct
_EvJobPrintClass
489
{
490
EvJobClass
parent_class
;
491
};
492
493
/* Base job class */
494
GType
ev_job_get_type
(
void
) G_GNUC_CONST;
495
gboolean
ev_job_run
(
EvJob
*job);
496
void
ev_job_cancel
(
EvJob
*job);
497
void
ev_job_failed
(
EvJob
*job,
498
GQuark domain,
499
gint code,
500
const gchar *format,
501
...)
G_GNUC_PRINTF
(4, 5);
502
void
ev_job_failed_from_error
(
EvJob
*job,
503
GError *error);
504
void
ev_job_succeeded
(
EvJob
*job);
505
gboolean
ev_job_is_finished
(
EvJob
*job);
506
gboolean
ev_job_is_failed
(
EvJob
*job);
507
EvJobRunMode
ev_job_get_run_mode
(
EvJob
*job);
508
void
ev_job_set_run_mode
(
EvJob
*job,
509
EvJobRunMode
run_mode);
510
511
/* EvJobLinks */
512
GType
ev_job_links_get_type
(
void
) G_GNUC_CONST;
513
EvJob
*
ev_job_links_new
(
EvDocument
*document);
514
GtkTreeModel *
ev_job_links_get_model
(
EvJobLinks
*job);
515
516
/* EvJobAttachments */
517
GType
ev_job_attachments_get_type
(
void
) G_GNUC_CONST;
518
EvJob
*
ev_job_attachments_new
(
EvDocument
*document);
519
520
/* EvJobAnnots */
521
GType
ev_job_annots_get_type
(
void
) G_GNUC_CONST;
522
EvJob
*
ev_job_annots_new
(
EvDocument
*document);
523
524
/* EvJobRender */
525
GType
ev_job_render_get_type
(
void
) G_GNUC_CONST;
526
EvJob
*
ev_job_render_new
(
EvDocument
*document,
527
gint page,
528
gint rotation,
529
gdouble scale,
530
gint width,
531
gint height);
532
void
ev_job_render_set_selection_info
(
EvJobRender
*job,
533
EvRectangle
*selection_points,
534
EvSelectionStyle
selection_style,
535
GdkColor *text,
536
GdkColor *base);
537
/* EvJobPageData */
538
GType
ev_job_page_data_get_type
(
void
) G_GNUC_CONST;
539
EvJob
*
ev_job_page_data_new
(
EvDocument
*document,
540
gint page,
541
EvJobPageDataFlags
flags);
542
543
/* EvJobThumbnail */
544
GType
ev_job_thumbnail_get_type
(
void
) G_GNUC_CONST;
545
EvJob
*
ev_job_thumbnail_new
(
EvDocument
*document,
546
gint page,
547
gint rotation,
548
gdouble scale);
549
EvJob
*
ev_job_thumbnail_new_with_target_size
(
EvDocument
*document,
550
gint page,
551
gint rotation,
552
gint target_width,
553
gint target_height);
554
void
ev_job_thumbnail_set_has_frame
(
EvJobThumbnail
*job,
555
gboolean has_frame);
556
void
ev_job_thumbnail_set_output_format
(
EvJobThumbnail
*job,
557
EvJobThumbnailFormat
format);
558
/* EvJobFonts */
559
GType
ev_job_fonts_get_type
(
void
) G_GNUC_CONST;
560
EvJob
*
ev_job_fonts_new
(
EvDocument
*document);
561
562
/* EvJobLoad */
563
GType
ev_job_load_get_type
(
void
) G_GNUC_CONST;
564
EvJob
*
ev_job_load_new
(const gchar *uri);
565
void
ev_job_load_set_uri
(
EvJobLoad
*load,
566
const gchar *uri);
567
void
ev_job_load_set_password
(
EvJobLoad
*job,
568
const gchar *password);
569
570
/* EvJobLoadStream */
571
GType
ev_job_load_stream_get_type
(
void
) G_GNUC_CONST;
572
EvJob
*
ev_job_load_stream_new
(GInputStream *stream,
573
EvDocumentLoadFlags
flags);
574
void
ev_job_load_stream_set_stream
(
EvJobLoadStream
*job,
575
GInputStream *stream);
576
void
ev_job_load_stream_set_load_flags
(
EvJobLoadStream
*job,
577
EvDocumentLoadFlags
flags);
578
void
ev_job_load_stream_set_password
(
EvJobLoadStream
*job,
579
const gchar *password);
580
581
/* EvJobLoadGFile */
582
GType
ev_job_load_gfile_get_type
(
void
) G_GNUC_CONST;
583
EvJob
*
ev_job_load_gfile_new
(GFile *gfile,
584
EvDocumentLoadFlags
flags);
585
void
ev_job_load_gfile_set_gfile
(
EvJobLoadGFile
*job,
586
GFile *gfile);
587
void
ev_job_load_gfile_set_load_flags
(
EvJobLoadGFile
*job,
588
EvDocumentLoadFlags
flags);
589
void
ev_job_load_gfile_set_password
(
EvJobLoadGFile
*job,
590
const gchar *password);
591
592
/* EvJobSave */
593
GType
ev_job_save_get_type
(
void
) G_GNUC_CONST;
594
EvJob
*
ev_job_save_new
(
EvDocument
*document,
595
const gchar *uri,
596
const gchar *document_uri);
597
/* EvJobFind */
598
GType
ev_job_find_get_type
(
void
) G_GNUC_CONST;
599
EvJob
*
ev_job_find_new
(
EvDocument
*document,
600
gint start_page,
601
gint n_pages,
602
const gchar *text,
603
gboolean case_sensitive);
604
void
ev_job_find_set_options
(
EvJobFind
*job,
605
EvFindOptions
options);
606
EvFindOptions
ev_job_find_get_options
(
EvJobFind
*job);
607
gint
ev_job_find_get_n_results
(
EvJobFind
*job,
608
gint pages);
609
gdouble
ev_job_find_get_progress
(
EvJobFind
*job);
610
gboolean
ev_job_find_has_results
(
EvJobFind
*job);
611
GList **
ev_job_find_get_results
(
EvJobFind
*job);
612
613
/* EvJobLayers */
614
GType
ev_job_layers_get_type
(
void
) G_GNUC_CONST;
615
EvJob
*
ev_job_layers_new
(
EvDocument
*document);
616
617
/* EvJobExport */
618
GType
ev_job_export_get_type
(
void
) G_GNUC_CONST;
619
EvJob
*
ev_job_export_new
(
EvDocument
*document);
620
void
ev_job_export_set_page
(
EvJobExport
*job,
621
gint page);
622
/* EvJobPrint */
623
GType
ev_job_print_get_type
(
void
) G_GNUC_CONST;
624
EvJob
*
ev_job_print_new
(
EvDocument
*document);
625
void
ev_job_print_set_page
(
EvJobPrint
*job,
626
gint page);
627
void
ev_job_print_set_cairo
(
EvJobPrint
*job,
628
cairo_t *cr);
629
630
G_END_DECLS
631
632
#endif
/* __EV_JOBS_H__ */
evince-master
libview
ev-jobs.h
Generated on Thu Jul 13 2017 13:41:46 for Evince by
1.8.4