X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;ds=sidebyside;f=libdocument%2Fev-selection.c;h=9a7336c63765ed46e0ed18289e36668687fbc355;hb=49172d645c265e3fd301ca15f75adb17c7337331;hp=2aa45a7cafbd86710695389202ad107a6fead542;hpb=13a06349251874bd35d2f03c3fc93217cee749a2;p=evince.git diff --git a/libdocument/ev-selection.c b/libdocument/ev-selection.c index 2aa45a7c..9a7336c6 100644 --- a/libdocument/ev-selection.c +++ b/libdocument/ev-selection.c @@ -59,28 +59,48 @@ ev_selection_base_init (gpointer g_class) void ev_selection_render_selection (EvSelection *selection, EvRenderContext *rc, - GdkPixbuf **pixbuf, + cairo_surface_t **surface, EvRectangle *points, EvRectangle *old_points, - GdkColor *text, - GdkColor *base) + EvSelectionStyle style, + GdkColor *text, + GdkColor *base) { EvSelectionIface *iface = EV_SELECTION_GET_IFACE (selection); + if (!iface->render_selection) + return; + iface->render_selection (selection, rc, - pixbuf, + surface, points, old_points, + style, text, base); } +gchar * +ev_selection_get_selected_text (EvSelection *selection, + EvRenderContext *rc, + EvSelectionStyle style, + EvRectangle *points) +{ + EvSelectionIface *iface = EV_SELECTION_GET_IFACE (selection); + + return iface->get_selected_text (selection, rc, style, points); +} + GdkRegion * ev_selection_get_selection_region (EvSelection *selection, EvRenderContext *rc, + EvSelectionStyle style, EvRectangle *points) { EvSelectionIface *iface = EV_SELECTION_GET_IFACE (selection); - return iface->get_selection_region (selection, rc, points); + if (!iface->get_selection_region) + return NULL; + + return iface->get_selection_region (selection, rc, style, points); } GdkRegion * @@ -89,5 +109,8 @@ ev_selection_get_selection_map (EvSelection *selection, { EvSelectionIface *iface = EV_SELECTION_GET_IFACE (selection); + if (!iface->get_selection_map) + return NULL; + return iface->get_selection_map (selection, rc); }