1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; c-indent-level: 8 -*- */
3 * Copyright (C) 2005 Red Hat, Inc.
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2, or (at your option)
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU 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.
23 #include "ev-selection.h"
25 EV_DEFINE_INTERFACE (EvSelection, ev_selection, 0)
28 ev_selection_class_init (EvSelectionIface *klass)
33 ev_selection_render_selection (EvSelection *selection,
35 cairo_surface_t **surface,
37 EvRectangle *old_points,
38 EvSelectionStyle style,
42 EvSelectionIface *iface = EV_SELECTION_GET_IFACE (selection);
44 if (!iface->render_selection)
47 iface->render_selection (selection, rc,
55 ev_selection_get_selected_text (EvSelection *selection,
57 EvSelectionStyle style,
60 EvSelectionIface *iface = EV_SELECTION_GET_IFACE (selection);
62 return iface->get_selected_text (selection, rc, style, points);
66 ev_selection_get_selection_region (EvSelection *selection,
68 EvSelectionStyle style,
71 EvSelectionIface *iface = EV_SELECTION_GET_IFACE (selection);
73 if (!iface->get_selection_region)
76 return iface->get_selection_region (selection, rc, style, points);
80 ev_selection_get_selection_map (EvSelection *selection,
83 EvSelectionIface *iface = EV_SELECTION_GET_IFACE (selection);
85 if (!iface->get_selection_map)
88 return iface->get_selection_map (selection, page);