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=260a9ca46906c2b03370a0c6e27468a281d72698;hb=d76bef42ca0d292a7a04d61663d4da7536136479;hp=9a7336c63765ed46e0ed18289e36668687fbc355;hpb=982600bbceb76a22d5c7b3e0cbe6e20421105ad6;p=evince.git diff --git a/libdocument/ev-selection.c b/libdocument/ev-selection.c index 9a7336c6..260a9ca4 100644 --- a/libdocument/ev-selection.c +++ b/libdocument/ev-selection.c @@ -14,7 +14,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ @@ -22,40 +22,13 @@ #include "ev-selection.h" -static void ev_selection_base_init (gpointer g_class); - -GType -ev_selection_get_type (void) -{ - static GType type = 0; - - if (G_UNLIKELY (type == 0)) - { - const GTypeInfo our_info = - { - sizeof (EvSelectionIface), - ev_selection_base_init, - NULL, - }; - - type = g_type_register_static (G_TYPE_INTERFACE, - "EvSelection", - &our_info, (GTypeFlags)0); - } - - return type; -} +G_DEFINE_INTERFACE (EvSelection, ev_selection, 0) static void -ev_selection_base_init (gpointer g_class) +ev_selection_default_init (EvSelectionInterface *klass) { - static gboolean initialized = FALSE; - - if (!initialized) { - } } - void ev_selection_render_selection (EvSelection *selection, EvRenderContext *rc, @@ -66,7 +39,7 @@ ev_selection_render_selection (EvSelection *selection, GdkColor *text, GdkColor *base) { - EvSelectionIface *iface = EV_SELECTION_GET_IFACE (selection); + EvSelectionInterface *iface = EV_SELECTION_GET_IFACE (selection); if (!iface->render_selection) return; @@ -84,7 +57,7 @@ ev_selection_get_selected_text (EvSelection *selection, EvSelectionStyle style, EvRectangle *points) { - EvSelectionIface *iface = EV_SELECTION_GET_IFACE (selection); + EvSelectionInterface *iface = EV_SELECTION_GET_IFACE (selection); return iface->get_selected_text (selection, rc, style, points); } @@ -95,7 +68,7 @@ ev_selection_get_selection_region (EvSelection *selection, EvSelectionStyle style, EvRectangle *points) { - EvSelectionIface *iface = EV_SELECTION_GET_IFACE (selection); + EvSelectionInterface *iface = EV_SELECTION_GET_IFACE (selection); if (!iface->get_selection_region) return NULL; @@ -104,13 +77,13 @@ ev_selection_get_selection_region (EvSelection *selection, } GdkRegion * -ev_selection_get_selection_map (EvSelection *selection, - EvRenderContext *rc) +ev_selection_get_selection_map (EvSelection *selection, + EvPage *page) { - EvSelectionIface *iface = EV_SELECTION_GET_IFACE (selection); + EvSelectionInterface *iface = EV_SELECTION_GET_IFACE (selection); if (!iface->get_selection_map) return NULL; - - return iface->get_selection_map (selection, rc); + + return iface->get_selection_map (selection, page); }