1 /* this file is part of evince, a gnome document viewer
3 * Copyright (C) 2005 Red Hat, Inc
5 * Evince is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * Evince is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
24 #include "ev-document.h"
28 typedef struct _EvJob EvJob;
29 typedef struct _EvJobClass EvJobClass;
31 typedef struct _EvJobRender EvJobRender;
32 typedef struct _EvJobRenderClass EvJobRenderClass;
34 typedef struct _EvJobThumbnail EvJobThumbnail;
35 typedef struct _EvJobThumbnailClass EvJobThumbnailClass;
37 typedef struct _EvJobLinks EvJobLinks;
38 typedef struct _EvJobLinksClass EvJobLinksClass;
40 typedef struct _EvJobLoad EvJobLoad;
41 typedef struct _EvJobLoadClass EvJobLoadClass;
43 typedef struct _EvJobFonts EvJobFonts;
44 typedef struct _EvJobFontsClass EvJobFontsClass;
46 #define EV_TYPE_JOB (ev_job_get_type())
47 #define EV_JOB(object) (G_TYPE_CHECK_INSTANCE_CAST((object), EV_TYPE_JOB, EvJob))
48 #define EV_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), EV_TYPE_JOB, EvJobClass))
49 #define EV_IS_JOB(object) (G_TYPE_CHECK_INSTANCE_TYPE((object), EV_TYPE_JOB))
51 #define EV_TYPE_JOB_LINKS (ev_job_links_get_type())
52 #define EV_JOB_LINKS(object) (G_TYPE_CHECK_INSTANCE_CAST((object), EV_TYPE_JOB_LINKS, EvJobLinks))
53 #define EV_JOB_LINKS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), EV_TYPE_JOB_LINKS, EvJobLinksClass))
54 #define EV_IS_JOB_LINKS(object) (G_TYPE_CHECK_INSTANCE_TYPE((object), EV_TYPE_JOB_LINKS))
56 #define EV_TYPE_JOB_RENDER (ev_job_render_get_type())
57 #define EV_JOB_RENDER(object) (G_TYPE_CHECK_INSTANCE_CAST((object), EV_TYPE_JOB_RENDER, EvJobRender))
58 #define EV_JOB_RENDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), EV_TYPE_JOB_RENDER, EvJobRenderClass))
59 #define EV_IS_JOB_RENDER(object) (G_TYPE_CHECK_INSTANCE_TYPE((object), EV_TYPE_JOB_RENDER))
61 #define EV_TYPE_JOB_THUMBNAIL (ev_job_thumbnail_get_type())
62 #define EV_JOB_THUMBNAIL(object) (G_TYPE_CHECK_INSTANCE_CAST((object), EV_TYPE_JOB_THUMBNAIL, EvJobThumbnail))
63 #define EV_JOB_THUMBNAIL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), EV_TYPE_JOB_THUMBNAIL, EvJobThumbnailClass))
64 #define EV_IS_JOB_THUMBNAIL(object) (G_TYPE_CHECK_INSTANCE_TYPE((object), EV_TYPE_JOB_THUMBNAIL))
66 #define EV_TYPE_JOB_LOAD (ev_job_load_get_type())
67 #define EV_JOB_LOAD(object) (G_TYPE_CHECK_INSTANCE_CAST((object), EV_TYPE_JOB_LOAD, EvJobLoad))
68 #define EV_JOB_LOAD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), EV_TYPE_JOB_LOAD, EvJobLoadClass))
69 #define EV_IS_JOB_LOAD(object) (G_TYPE_CHECK_INSTANCE_TYPE((object), EV_TYPE_JOB_LOAD))
71 #define EV_TYPE_JOB_FONTS (ev_job_fonts_get_type())
72 #define EV_JOB_FONTS(object) (G_TYPE_CHECK_INSTANCE_CAST((object), EV_TYPE_JOB_FONTS, EvJobFonts))
73 #define EV_JOB_FONTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), EV_TYPE_JOB_FONTS, EvJobFontsClass))
74 #define EV_IS_JOB_FONTS(object) (G_TYPE_CHECK_INSTANCE_TYPE((object), EV_TYPE_JOB_FONTS))
91 GObjectClass parent_class;
93 void (* finished) (EvJob *job);
103 struct _EvJobLinksClass
105 EvJobClass parent_class;
119 GdkPixbuf *selection;
120 EvRectangle selection_points;
122 gint include_links : 1;
123 gint include_selection : 1;
126 struct _EvJobRenderClass
128 EvJobClass parent_class;
131 struct _EvJobThumbnail
136 gint requested_width;
137 GdkPixbuf *thumbnail;
140 struct _EvJobThumbnailClass
142 EvJobClass parent_class;
152 struct _EvJobLoadClass
154 EvJobClass parent_class;
160 gboolean scan_completed;
163 struct _EvJobFontsClass
165 EvJobClass parent_class;
169 GType ev_job_get_type (void);
170 void ev_job_finished (EvJob *job);
173 GType ev_job_links_get_type (void);
174 EvJob *ev_job_links_new (EvDocument *document);
175 void ev_job_links_run (EvJobLinks *thumbnail);
178 GType ev_job_render_get_type (void);
179 EvJob *ev_job_render_new (EvDocument *document,
183 EvRectangle *selection_points,
184 gboolean include_links,
185 gboolean include_selection);
186 void ev_job_render_run (EvJobRender *thumbnail);
189 GType ev_job_thumbnail_get_type (void);
190 EvJob *ev_job_thumbnail_new (EvDocument *document,
192 gint requested_width);
193 void ev_job_thumbnail_run (EvJobThumbnail *thumbnail);
196 GType ev_job_load_get_type (void);
197 EvJob *ev_job_load_new (EvDocument *document,
199 void ev_job_load_run (EvJobLoad *load);
202 GType ev_job_fonts_get_type (void);
203 EvJob *ev_job_fonts_new (EvDocument *document);
204 void ev_job_fonts_run (EvJobFonts *fonts);
208 #endif /* __EV_JOBS_H__ */