[evince] [libdcoument] Remove all Ev*Mapping types



commit 44205a9ede6bde99d7594a9c531521540acc7e81
Author: Carlos Garcia Campos <carlosgc gnome org>
Date:   Sat May 23 19:13:54 2009 +0200

    [libdcoument] Remove all Ev*Mapping types
---
 libdocument/ev-annotation.c |   59 ---------------------------------
 libdocument/ev-annotation.h |   20 -----------
 libdocument/ev-form-field.c |   75 -------------------------------------------
 libdocument/ev-form-field.h |   20 -----------
 libdocument/ev-image.c      |   38 ----------------------
 libdocument/ev-image.h      |   15 --------
 libdocument/ev-link.c       |   66 -------------------------------------
 libdocument/ev-link.h       |   18 ----------
 8 files changed, 0 insertions(+), 311 deletions(-)

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;
-		}
-	}
-}
diff --git a/libdocument/ev-annotation.h b/libdocument/ev-annotation.h
index 456710c..10c032e 100644
--- a/libdocument/ev-annotation.h
+++ b/libdocument/ev-annotation.h
@@ -122,26 +122,6 @@ void          ev_annotation_markup_set_is_open   (EvAnnotationMarkup *markup,
 GType         ev_annotation_text_get_type        (void) G_GNUC_CONST;
 EvAnnotation *ev_annotation_text_new             (EvPage             *page);
 
-
-/* Annotation Mapping stuff */
-typedef struct _EvAnnotationMapping   EvAnnotationMapping;
-struct _EvAnnotationMapping
-{
-	        EvAnnotation *annotation;
-	        gdouble       x1;
-	        gdouble       y1;
-	        gdouble       x2;
-	        gdouble       y2;
-};
-
-void          ev_annotation_mapping_free     (GList       *annotation_mapping);
-EvAnnotation *ev_annotation_mapping_find     (GList       *annotation_mapping,
-					      gdouble       x,
-					      gdouble       y);
-void          ev_annotation_mapping_get_area (GList        *annotation_mapping,
-					      EvAnnotation *annotation,
-					      EvRectangle  *area);
-
 G_END_DECLS
 
 #endif /* EV_ANNOTATION_H */
diff --git a/libdocument/ev-form-field.c b/libdocument/ev-form-field.c
index 130b6c0..413fbdd 100644
--- a/libdocument/ev-form-field.c
+++ b/libdocument/ev-form-field.c
@@ -207,78 +207,3 @@ ev_form_field_signature_new (gint id)
 	return field;
 }
 
-/* EvFormFieldMapping */
-static void
-ev_form_field_mapping_free_foreach (EvFormFieldMapping *mapping)
-{
-	g_object_unref (mapping->field);
-	g_free (mapping);
-}
-
-void
-ev_form_field_mapping_free (GList *field_mapping)
-{
-	if (!field_mapping)
-		return;
-
-	g_list_foreach (field_mapping, (GFunc)ev_form_field_mapping_free_foreach, NULL);
-	g_list_free (field_mapping);
-}
-
-EvFormField *
-ev_form_field_mapping_find (GList   *field_mapping,
-			    gdouble  x,
-			    gdouble  y)
-{
-	GList *list;
-
-	for (list = field_mapping; list; list = list->next) {
-		EvFormFieldMapping *mapping = list->data;
-
-		if ((x >= mapping->x1) &&
-		    (y >= mapping->y1) &&
-		    (x <= mapping->x2) &&
-		    (y <= mapping->y2)) {
-			return mapping->field;
-		}
-	}
-
-	return NULL;
-}
-
-void
-ev_form_field_mapping_get_area (GList       *field_mapping,
-				EvFormField *field,
-				EvRectangle *area)
-{
-	GList *list;
-
-	for (list = field_mapping; list; list = list->next) {
-		EvFormFieldMapping *mapping = list->data;
-
-		if (mapping->field->id == field->id) {
-			area->x1 = mapping->x1;
-			area->y1 = mapping->y1;
-			area->x2 = mapping->x2;
-			area->y2 = mapping->y2;
-
-			break;
-		}
-	}
-}
-
-EvFormField *
-ev_form_field_mapping_find_by_id (GList *field_mapping,
-				  gint   id)
-{
-	GList *list;
-	
-	for (list = field_mapping; list; list = list->next) {
-		EvFormFieldMapping *mapping = list->data;
-
-		if (id == mapping->field->id)
-			return mapping->field;
-	}
-	
-	return NULL;
-}
diff --git a/libdocument/ev-form-field.h b/libdocument/ev-form-field.h
index 92dd9fd..1e5114e 100644
--- a/libdocument/ev-form-field.h
+++ b/libdocument/ev-form-field.h
@@ -208,26 +208,6 @@ GType        ev_form_field_signature_get_type (void) G_GNUC_CONST;
 EvFormField *ev_form_field_signature_new      (gint                  id);
 
 
-/* FormField Mapping stuff */
-typedef struct _EvFormFieldMapping EvFormFieldMapping;
-struct _EvFormFieldMapping {
-	EvFormField *field;
-	gdouble x1;
-	gdouble y1;
-	gdouble x2;
-	gdouble y2;
-};
-
-void         ev_form_field_mapping_free       (GList        *field_mapping);
-EvFormField *ev_form_field_mapping_find       (GList        *field_mapping,
-					       gdouble       x,
-					       gdouble       y);
-void         ev_form_field_mapping_get_area   (GList        *field_mapping,
-					       EvFormField  *field,
-					       EvRectangle  *area);
-EvFormField *ev_form_field_mapping_find_by_id (GList        *form_field_mapping,
-					       gint          id);
-
 G_END_DECLS
 
 #endif /* !EV_FORM_FIELD_H */
diff --git a/libdocument/ev-image.c b/libdocument/ev-image.c
index fa4cccf..4fa2225 100644
--- a/libdocument/ev-image.c
+++ b/libdocument/ev-image.c
@@ -167,43 +167,5 @@ ev_image_get_tmp_uri (EvImage *image)
 	return image->priv->tmp_uri;
 }
 
-/* EvImageMapping */
-static void
-ev_image_mapping_free_foreach (EvImageMapping *mapping)
-{
-	g_object_unref (mapping->image);
-	g_free (mapping);
-}
-
-void
-ev_image_mapping_free (GList *image_mapping)
-{
-	if (!image_mapping)
-		return;
-
-	g_list_foreach (image_mapping, (GFunc) ev_image_mapping_free_foreach, NULL);
-	g_list_free (image_mapping);
-}
-
-EvImage *
-ev_image_mapping_find (GList   *image_mapping,
-		       gdouble  x,
-		       gdouble  y)
-{
-	GList *list;
-
-	for (list = image_mapping; list; list = list->next) {
-		EvImageMapping *mapping = list->data;
-
-		if ((x >= mapping->x1) &&
-		    (y >= mapping->y1) &&
-		    (x <= mapping->x2) &&
-		    (y <= mapping->y2)) {
-			return mapping->image;
-		}
-	}
-
-	return NULL;
-}
 
 
diff --git a/libdocument/ev-image.h b/libdocument/ev-image.h
index 29c1deb..412a853 100644
--- a/libdocument/ev-image.h
+++ b/libdocument/ev-image.h
@@ -63,21 +63,6 @@ const gchar *ev_image_save_tmp         (EvImage         *image,
 const gchar *ev_image_get_tmp_uri      (EvImage         *image);
 
 
-/* Image Mapping stuff */
-typedef struct _EvImageMapping EvImageMapping;
-struct _EvImageMapping {
-	EvImage *image;
-	gdouble x1;
-	gdouble y1;
-	gdouble x2;
-	gdouble y2;
-};
-
-void     ev_image_mapping_free (GList   *image_mapping);
-EvImage *ev_image_mapping_find (GList   *image_mapping,
-				gdouble  x,
-				gdouble  y);
-
 G_END_DECLS
 
 #endif /* __EV_IMAGE_H__ */
diff --git a/libdocument/ev-link.c b/libdocument/ev-link.c
index 423f264..768b687 100644
--- a/libdocument/ev-link.c
+++ b/libdocument/ev-link.c
@@ -180,72 +180,6 @@ ev_link_new (const char   *title,
 				      NULL));
 }
 
-/* Link Mapping stuff */
-static void
-ev_link_mapping_free_foreach (EvLinkMapping *mapping)
-{
-	g_object_unref (G_OBJECT (mapping->link));
-	g_free (mapping);
-}
-
-void
-ev_link_mapping_free (GList *link_mapping)
-{
-	if (link_mapping == NULL)
-		return;
-
-	g_list_foreach (link_mapping, (GFunc) (ev_link_mapping_free_foreach), NULL);
-	g_list_free (link_mapping);
-}
-
-EvLink *
-ev_link_mapping_find (GList   *link_mapping,
-		      gdouble  x,
-		      gdouble  y)
-{
-	GList *list;
-	EvLink *link = NULL;
-	int i;
-	
-	i = 0;
-
-	for (list = link_mapping; list; list = list->next) {
-		EvLinkMapping *mapping = list->data;
-
-		i++;
-		if ((x >= mapping->x1) &&
-		    (y >= mapping->y1) &&
-		    (x <= mapping->x2) &&
-		    (y <= mapping->y2)) {
-			link = mapping->link;
-			break;
-		}
-	}
-
-	return link;
-}
-
-void
-ev_link_mapping_get_area (GList       *link_mapping,
-			  EvLink      *link,
-			  EvRectangle *area)
-{
-	GList *list;
-
-	for (list = link_mapping; list; list = list->next) {
-		EvLinkMapping *mapping = list->data;
-
-		if (mapping->link == link) {
-			area->x1 = mapping->x1;
-			area->y1 = mapping->y1;
-			area->x2 = mapping->x2;
-			area->y2 = mapping->y2;
-
-			break;
-		}
-	}
-}
-
 gint
 ev_link_get_page (EvLink *link)
 {
diff --git a/libdocument/ev-link.h b/libdocument/ev-link.h
index cb3733a..c59259a 100644
--- a/libdocument/ev-link.h
+++ b/libdocument/ev-link.h
@@ -50,24 +50,6 @@ const gchar  *ev_link_get_title  (EvLink       *self);
 EvLinkAction *ev_link_get_action (EvLink       *self);
 gint	      ev_link_get_page   (EvLink       *link);
 
-/* Link Mapping stuff */
-typedef struct _EvLinkMapping	  EvLinkMapping;
-struct _EvLinkMapping
-{
-	EvLink *link;
-	gdouble x1;
-	gdouble y1;
-	gdouble x2;
-	gdouble y2;
-};
-
-void    ev_link_mapping_free     (GList       *link_mapping);
-EvLink *ev_link_mapping_find     (GList       *link_mapping,
-				  gdouble      x,
-				  gdouble      y);
-void    ev_link_mapping_get_area (GList       *link_mapping,
-				  EvLink      *link,
-				  EvRectangle *area);
 G_END_DECLS
 
 #endif /* !EV_LINK_H */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]