PROP_0,
PROP_DOCUMENT,
PROP_CURRENT_PAGE,
- PROP_ROTATION
+ PROP_ROTATION,
+ PROP_INVERTED_COLORS
};
enum {
cairo_surface_t *current_surface;
EvDocument *document;
guint rotation;
+ gboolean inverted_colors;
EvPresentationState state;
gdouble scale;
gint monitor_width;
{
EvJobRender *job_render = EV_JOB_RENDER (job);
+ if (pview->inverted_colors)
+ ev_document_misc_invert_surface (job_render->surface);
+
if (job != pview->curr_job)
return;
case PROP_ROTATION:
pview->rotation = g_value_get_uint (value);
break;
+ case PROP_INVERTED_COLORS:
+ pview->inverted_colors = g_value_get_boolean (value);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
0, 360, 0,
G_PARAM_WRITABLE |
G_PARAM_CONSTRUCT_ONLY));
+ g_object_class_install_property (gobject_class,
+ PROP_INVERTED_COLORS,
+ g_param_spec_boolean ("inverted_colors",
+ "Inverted Colors",
+ "Whether presentation is displayed with inverted colors",
+ FALSE,
+ G_PARAM_WRITABLE |
+ G_PARAM_CONSTRUCT_ONLY));
signals[CHANGE_PAGE] =
g_signal_new ("change_page",
GtkWidget *
ev_view_presentation_new (EvDocument *document,
guint current_page,
- guint rotation)
+ guint rotation,
+ gboolean inverted_colors)
{
g_return_val_if_fail (EV_IS_DOCUMENT (document), NULL);
g_return_val_if_fail (current_page < ev_document_get_n_pages (document), NULL);
"document", document,
"current_page", current_page,
"rotation", rotation,
+ "inverted_colors", inverted_colors,
NULL));
}