X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=libdocument%2Fev-annotation.h;h=159dc2c8f4e9a9d73a48798b01f935c57ca4209a;hb=f9c2880d31bb2f5d4411849b9207c5d26a5c616a;hp=47d908dbadfe6c143a24acbe0b455ba9a8296271;hpb=0dd0c92a0acb3d4aaecb7fd56e6ca71e89fef54a;p=evince.git diff --git a/libdocument/ev-annotation.h b/libdocument/ev-annotation.h index 47d908db..159dc2c8 100644 --- a/libdocument/ev-annotation.h +++ b/libdocument/ev-annotation.h @@ -19,12 +19,17 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef EV_ANNOTATION_H #define EV_ANNOTATION_H #include #include "ev-document.h" +#include "ev-attachment.h" G_BEGIN_DECLS @@ -52,14 +57,25 @@ G_BEGIN_DECLS #define EV_IS_ANNOTATION_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), EV_TYPE_ANNOTATION_TEXT)) #define EV_ANNOTATION_TEXT_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS((object), EV_TYPE_ANNOTATION_TEXT, EvAnnotationTextClass)) -typedef struct _EvAnnotation EvAnnotation; -typedef struct _EvAnnotationClass EvAnnotationClass; +/* EvAnnotationText */ +#define EV_TYPE_ANNOTATION_ATTACHMENT (ev_annotation_attachment_get_type()) +#define EV_ANNOTATION_ATTACHMENT(object) (G_TYPE_CHECK_INSTANCE_CAST((object), EV_TYPE_ANNOTATION_ATTACHMENT, EvAnnotationAttachment)) +#define EV_ANNOTATION_ATTACHMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), EV_TYPE_ANNOTATION_ATTACHMENT, EvAnnotationAttachmentClass)) +#define EV_IS_ANNOTATION_ATTACHMENT(object) (G_TYPE_CHECK_INSTANCE_TYPE((object), EV_TYPE_ANNOTATION_ATTACHMENT)) +#define EV_IS_ANNOTATION_ATTACHMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), EV_TYPE_ANNOTATION_ATTACHMENT)) +#define EV_ANNOTATION_ATTACHMENT_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS((object), EV_TYPE_ANNOTATION_ATTACHMENT, EvAnnotationAttachmentClass)) + +typedef struct _EvAnnotation EvAnnotation; +typedef struct _EvAnnotationClass EvAnnotationClass; -typedef struct _EvAnnotationMarkup EvAnnotationMarkup; -typedef struct _EvAnnotationMarkupIface EvAnnotationMarkupIface; +typedef struct _EvAnnotationMarkup EvAnnotationMarkup; +typedef struct _EvAnnotationMarkupIface EvAnnotationMarkupIface; -typedef struct _EvAnnotationText EvAnnotationText; -typedef struct _EvAnnotationTextClass EvAnnotationTextClass; +typedef struct _EvAnnotationText EvAnnotationText; +typedef struct _EvAnnotationTextClass EvAnnotationTextClass; + +typedef struct _EvAnnotationAttachment EvAnnotationAttachment; +typedef struct _EvAnnotationAttachmentClass EvAnnotationAttachmentClass; struct _EvAnnotation { @@ -97,6 +113,18 @@ struct _EvAnnotationTextClass EvAnnotationClass parent_class; }; +struct _EvAnnotationAttachment +{ + EvAnnotation parent; + + EvAttachment *attachment; +}; + +struct _EvAnnotationAttachmentClass +{ + EvAnnotationClass parent_class; +}; + /* EvAnnotation */ GType ev_annotation_get_type (void) G_GNUC_CONST; @@ -108,6 +136,7 @@ void ev_annotation_markup_set_label (EvAnnotationMarkup *markup, gdouble ev_annotation_markup_get_opacity (EvAnnotationMarkup *markup); void ev_annotation_markup_set_opacity (EvAnnotationMarkup *markup, gdouble opacity); +gboolean ev_annotation_markup_has_popup (EvAnnotationMarkup *markup); void ev_annotation_markup_get_rectangle (EvAnnotationMarkup *markup, EvRectangle *ev_rect); gboolean ev_annotation_markup_get_is_open (EvAnnotationMarkup *markup); @@ -118,25 +147,10 @@ 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); +/* EvAnnotationText */ +GType ev_annotation_attachment_get_type (void) G_GNUC_CONST; +EvAnnotation *ev_annotation_attachment_new (EvPage *page, + EvAttachment *attachment); G_END_DECLS