From 44205a9ede6bde99d7594a9c531521540acc7e81 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Campos Date: Sat, 23 May 2009 17:13:54 +0000 Subject: [libdcoument] Remove all Ev*Mapping types --- (limited to 'libdocument/ev-annotation.c') diff --git a/libdocument/ev-annotation.c b/libdocument/ev-annotation.c index 3245593..7d2810f 100644 --- a/libdocument/ev-annotation.c +++ b/libdocument/ev-annotation.c @@ -359,62 +359,3 @@ ev_annotation_text_markup_iface_init (EvAnnotationMarkupIface *iface) { } -/* Annotation Mapping stuff */ -static void -ev_annotation_mapping_free_foreach (EvAnnotationMapping *mapping) -{ - g_object_unref (mapping->annotation); - g_free (mapping); -} - -void -ev_annotation_mapping_free (GList *annotation_mapping) -{ - if (!annotation_mapping) - return; - - g_list_foreach (annotation_mapping, (GFunc) ev_annotation_mapping_free_foreach, NULL); - g_list_free (annotation_mapping); -} - -EvAnnotation * -ev_annotation_mapping_find (GList *annotation_mapping, - gdouble x, - gdouble y) -{ - GList *list; - - for (list = annotation_mapping; list; list = list->next) { - EvAnnotationMapping *mapping = list->data; - - if ((x >= mapping->x1) && - (y >= mapping->y1) && - (x <= mapping->x2) && - (y <= mapping->y2)) { - return mapping->annotation; - } - } - - return NULL; -} - -void -ev_annotation_mapping_get_area (GList *annotation_mapping, - EvAnnotation *annotation, - EvRectangle *area) -{ - GList *list; - - for (list = annotation_mapping; list; list = list->next) { - EvAnnotationMapping *mapping = list->data; - - if (mapping->annotation == annotation) { - area->x1 = mapping->x1; - area->y1 = mapping->y1; - area->x2 = mapping->x2; - area->y2 = mapping->y2; - - break; - } - } -} -- cgit v0.9.1