Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/ev-jobs.h
diff options
context:
space:
mode:
authorCarlos Garcia Campos <carlosgc@gnome.org>2008-04-14 18:37:14 (GMT)
committer Carlos Garcia Campos <carlosgc@src.gnome.org>2008-04-14 18:37:14 (GMT)
commitcd2d4116a78ef055ea5dacfbb9a38bc77618b329 (patch)
tree9d74f52129aaebba1c91cc57f15c760ee6743675 /shell/ev-jobs.h
parentb8aebf2e1ba5b4f9ff1e1256b28acb3e23947c51 (diff)
Create the render context needed for rendering a page in the render thread
2008-04-14 Carlos Garcia Campos <carlosgc@gnome.org> * shell/ev-jobs.[ch]: (ev_job_render_dispose), (ev_job_render_new), (ev_job_render_set_selection_info), (ev_job_render_run): * shell/ev-pixbuf-cache.c: (job_page_ready_cb), (job_finished_cb), (check_job_size_and_unref), (copy_job_page_and_selection_to_job_info), (copy_job_to_job_info), (add_job), (ev_pixbuf_cache_get_selection_surface): Create the render context needed for rendering a page in the render thread so that we don't block the main thread. Simplify EvJobRender API. svn path=/trunk/; revision=3005
Diffstat (limited to 'shell/ev-jobs.h')
-rw-r--r--shell/ev-jobs.h35
1 files changed, 22 insertions, 13 deletions
diff --git a/shell/ev-jobs.h b/shell/ev-jobs.h
index 1647154..c63a32c 100644
--- a/shell/ev-jobs.h
+++ b/shell/ev-jobs.h
@@ -123,11 +123,25 @@ struct _EvJobLinksClass
EvJobClass parent_class;
};
+typedef enum {
+ EV_RENDER_INCLUDE_NONE = 0,
+ EV_RENDER_INCLUDE_LINKS = 1 << 0,
+ EV_RENDER_INCLUDE_TEXT = 1 << 1,
+ EV_RENDER_INCLUDE_SELECTION = 1 << 2,
+ EV_RENDER_INCLUDE_IMAGES = 1 << 3,
+ EV_RENDER_INCLUDE_FORMS = 1 << 4,
+ EV_RENDER_INCLUDE_ALL = (1 << 5) - 1
+} EvRenderFlags;
+
struct _EvJobRender
{
EvJob parent;
- EvRenderContext *rc;
+ gint page;
+ gint rotation;
+ gdouble scale;
+
+ EvPage *ev_page;
gboolean page_ready;
gint target_width;
gint target_height;
@@ -145,11 +159,7 @@ struct _EvJobRender
GdkColor base;
GdkColor text;
- gint include_forms : 1;
- gint include_links : 1;
- gint include_text : 1;
- gint include_selection : 1;
- gint include_images : 1;
+ EvRenderFlags flags;
};
struct _EvJobRenderClass
@@ -251,18 +261,17 @@ void ev_job_links_run (EvJobLinks *thumbnail);
/* EvJobRender */
GType ev_job_render_get_type (void) G_GNUC_CONST;
EvJob *ev_job_render_new (EvDocument *document,
- EvRenderContext *rc,
+ gint page,
+ gint rotation,
+ gdouble scale,
gint width,
gint height,
+ EvRenderFlags flags);
+void ev_job_render_set_selection_info (EvJobRender *job,
EvRectangle *selection_points,
EvSelectionStyle selection_style,
GdkColor *text,
- GdkColor *base,
- gboolean include_forms,
- gboolean include_links,
- gboolean include_images,
- gboolean include_text,
- gboolean include_selection);
+ GdkColor *base);
void ev_job_render_run (EvJobRender *thumbnail);
/* EvJobThumbnail */