Evince
Evince is a document viewer capable of displaying multiple and single page document formats like PDF and Postscript.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ev-annotation.h File Reference
#include <glib-object.h>
#include "ev-document.h"
#include "ev-attachment.h"
#include "ev-macros.h"
+ Include dependency graph for ev-annotation.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define EV_TYPE_ANNOTATION   (ev_annotation_get_type())
 
#define EV_ANNOTATION(object)   (G_TYPE_CHECK_INSTANCE_CAST((object), EV_TYPE_ANNOTATION, EvAnnotation))
 
#define EV_ANNOTATION_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST((klass), EV_TYPE_ANNOTATION, EvAnnotationClass))
 
#define EV_IS_ANNOTATION(object)   (G_TYPE_CHECK_INSTANCE_TYPE((object), EV_TYPE_ANNOTATION))
 
#define EV_IS_ANNOTATION_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE((klass), EV_TYPE_ANNOTATION))
 
#define EV_ANNOTATION_GET_CLASS(object)   (G_TYPE_INSTANCE_GET_CLASS((object), EV_TYPE_ANNOTATION, EvAnnotationClass))
 
#define EV_TYPE_ANNOTATION_MARKUP   (ev_annotation_markup_get_type ())
 
#define EV_ANNOTATION_MARKUP(o)   (G_TYPE_CHECK_INSTANCE_CAST ((o), EV_TYPE_ANNOTATION_MARKUP, EvAnnotationMarkup))
 
#define EV_ANNOTATION_MARKUP_IFACE(k)   (G_TYPE_CHECK_CLASS_CAST((k), EV_TYPE_ANNOTATION_MARKUP, EvAnnotationMarkupInterface))
 
#define EV_IS_ANNOTATION_MARKUP(o)   (G_TYPE_CHECK_INSTANCE_TYPE ((o), EV_TYPE_ANNOTATION_MARKUP))
 
#define EV_IS_ANNOTATION_MARKUP_IFACE(k)   (G_TYPE_CHECK_CLASS_TYPE ((k), EV_TYPE_ANNOTATION_MARKUP))
 
#define EV_ANNOTATION_MARKUP_GET_IFACE(inst)   (G_TYPE_INSTANCE_GET_INTERFACE ((inst), EV_TYPE_ANNOTATION_MARKUP, EvAnnotationMarkupInterface))
 
#define EV_TYPE_ANNOTATION_TEXT   (ev_annotation_text_get_type())
 
#define EV_ANNOTATION_TEXT(object)   (G_TYPE_CHECK_INSTANCE_CAST((object), EV_TYPE_ANNOTATION_TEXT, EvAnnotationText))
 
#define EV_ANNOTATION_TEXT_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST((klass), EV_TYPE_ANNOTATION_TEXT, EvAnnotationTextClass))
 
#define EV_IS_ANNOTATION_TEXT(object)   (G_TYPE_CHECK_INSTANCE_TYPE((object), EV_TYPE_ANNOTATION_TEXT))
 
#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))
 
#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))
 
#define EV_TYPE_ANNOTATION_TEXT_MARKUP   (ev_annotation_text_markup_get_type ())
 
#define EV_ANNOTATION_TEXT_MARKUP(object)   (G_TYPE_CHECK_INSTANCE_CAST ((object), EV_TYPE_ANNOTATION_TEXT_MARKUP, EvAnnotationTextMarkup))
 
#define EV_ANNOTATION_TEXT_MARKUP_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST ((klass), EV_TYPE_ANNOTATION_TEXT_MARKUP, EvAnnotationTextMarkupClass))
 
#define EV_IS_ANNOTATION_TEXT_MARKUP(object)   (G_TYPE_CHECK_INSTANCE_TYPE ((object), EV_TYPE_ANNOTATION_TEXT_MARKUP))
 
#define EV_IS_ANNOTATION_TEXT_MARKUP_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), EV_TYPE_ANNOTATION_TEXT_MARKUP))
 
#define EV_ANNOTATION_TEXT_MARKUP_GET_CLASS(object)   (G_TYPE_INSTANCE_GET_CLASS ((object), EV_TYPE_ANNOTATION_TEXT_MARKUP, EvAnnotationTextMarkupClass))
 

Typedefs

typedef struct _EvAnnotation EvAnnotation
 
typedef struct _EvAnnotationClass EvAnnotationClass
 
typedef struct _EvAnnotationMarkup EvAnnotationMarkup
 
typedef struct
_EvAnnotationMarkupInterface 
EvAnnotationMarkupInterface
 
typedef struct _EvAnnotationText EvAnnotationText
 
typedef struct
_EvAnnotationTextClass 
EvAnnotationTextClass
 
typedef struct
_EvAnnotationAttachment 
EvAnnotationAttachment
 
typedef struct
_EvAnnotationAttachmentClass 
EvAnnotationAttachmentClass
 
typedef struct
_EvAnnotationTextMarkup 
EvAnnotationTextMarkup
 
typedef struct
_EvAnnotationTextMarkupClass 
EvAnnotationTextMarkupClass
 

Enumerations

enum  EvAnnotationType { EV_ANNOTATION_TYPE_UNKNOWN, EV_ANNOTATION_TYPE_TEXT, EV_ANNOTATION_TYPE_ATTACHMENT, EV_ANNOTATION_TYPE_TEXT_MARKUP }
 
enum  EvAnnotationTextIcon {
  EV_ANNOTATION_TEXT_ICON_NOTE, EV_ANNOTATION_TEXT_ICON_COMMENT, EV_ANNOTATION_TEXT_ICON_KEY, EV_ANNOTATION_TEXT_ICON_HELP,
  EV_ANNOTATION_TEXT_ICON_NEW_PARAGRAPH, EV_ANNOTATION_TEXT_ICON_PARAGRAPH, EV_ANNOTATION_TEXT_ICON_INSERT, EV_ANNOTATION_TEXT_ICON_CROSS,
  EV_ANNOTATION_TEXT_ICON_CIRCLE, EV_ANNOTATION_TEXT_ICON_UNKNOWN
}
 
enum  EvAnnotationTextMarkupType { EV_ANNOTATION_TEXT_MARKUP_HIGHLIGHT, EV_ANNOTATION_TEXT_MARKUP_STRIKE_OUT, EV_ANNOTATION_TEXT_MARKUP_UNDERLINE, EV_ANNOTATION_TEXT_MARKUP_SQUIGGLY }
 

Functions

GType ev_annotation_get_type (void) G_GNUC_CONST
 
EvAnnotationType ev_annotation_get_annotation_type (EvAnnotation *annot)
 
EvPageev_annotation_get_page (EvAnnotation *annot)
 
guint ev_annotation_get_page_index (EvAnnotation *annot)
 
gboolean ev_annotation_equal (EvAnnotation *annot, EvAnnotation *other)
 
const gchar * ev_annotation_get_contents (EvAnnotation *annot)
 
gboolean ev_annotation_set_contents (EvAnnotation *annot, const gchar *contents)
 
const gchar * ev_annotation_get_name (EvAnnotation *annot)
 
gboolean ev_annotation_set_name (EvAnnotation *annot, const gchar *name)
 
const gchar * ev_annotation_get_modified (EvAnnotation *annot)
 
gboolean ev_annotation_set_modified (EvAnnotation *annot, const gchar *modified)
 
gboolean ev_annotation_set_modified_from_time (EvAnnotation *annot, GTime utime)
 
void ev_annotation_get_color (EvAnnotation *annot, GdkColor *color)
 
gboolean ev_annotation_set_color (EvAnnotation *annot, const GdkColor *color)
 
void ev_annotation_get_rgba (EvAnnotation *annot, GdkRGBA *rgba)
 
gboolean ev_annotation_set_rgba (EvAnnotation *annot, const GdkRGBA *rgba)
 
void ev_annotation_get_area (EvAnnotation *annot, EvRectangle *area)
 
gboolean ev_annotation_set_area (EvAnnotation *annot, const EvRectangle *area)
 
GType ev_annotation_markup_get_type (void) G_GNUC_CONST
 
const gchar * ev_annotation_markup_get_label (EvAnnotationMarkup *markup)
 
gboolean ev_annotation_markup_set_label (EvAnnotationMarkup *markup, const gchar *label)
 
gdouble ev_annotation_markup_get_opacity (EvAnnotationMarkup *markup)
 
gboolean ev_annotation_markup_set_opacity (EvAnnotationMarkup *markup, gdouble opacity)
 
gboolean ev_annotation_markup_can_have_popup (EvAnnotationMarkup *markup)
 
gboolean ev_annotation_markup_has_popup (EvAnnotationMarkup *markup)
 
gboolean ev_annotation_markup_set_has_popup (EvAnnotationMarkup *markup, gboolean has_popup)
 
void ev_annotation_markup_get_rectangle (EvAnnotationMarkup *markup, EvRectangle *ev_rect)
 
gboolean ev_annotation_markup_set_rectangle (EvAnnotationMarkup *markup, const EvRectangle *ev_rect)
 
gboolean ev_annotation_markup_get_popup_is_open (EvAnnotationMarkup *markup)
 
gboolean ev_annotation_markup_set_popup_is_open (EvAnnotationMarkup *markup, gboolean is_open)
 
GType ev_annotation_text_get_type (void) G_GNUC_CONST
 
EvAnnotationev_annotation_text_new (EvPage *page)
 
EvAnnotationTextIcon ev_annotation_text_get_icon (EvAnnotationText *text)
 
gboolean ev_annotation_text_set_icon (EvAnnotationText *text, EvAnnotationTextIcon icon)
 
gboolean ev_annotation_text_get_is_open (EvAnnotationText *text)
 
gboolean ev_annotation_text_set_is_open (EvAnnotationText *text, gboolean is_open)
 
GType ev_annotation_attachment_get_type (void) G_GNUC_CONST
 
EvAnnotationev_annotation_attachment_new (EvPage *page, EvAttachment *attachment)
 
EvAttachmentev_annotation_attachment_get_attachment (EvAnnotationAttachment *annot)
 
gboolean ev_annotation_attachment_set_attachment (EvAnnotationAttachment *annot, EvAttachment *attachment)
 
GType ev_annotation_text_markup_get_type (void) G_GNUC_CONST
 
EvAnnotationev_annotation_text_markup_highlight_new (EvPage *page)
 
EvAnnotationev_annotation_text_markup_strike_out_new (EvPage *page)
 
EvAnnotationev_annotation_text_markup_underline_new (EvPage *page)
 
EvAnnotationev_annotation_text_markup_squiggly_new (EvPage *page)
 
EvAnnotationTextMarkupType ev_annotation_text_markup_get_markup_type (EvAnnotationTextMarkup *annot)
 
gboolean ev_annotation_text_markup_set_markup_type (EvAnnotationTextMarkup *annot, EvAnnotationTextMarkupType markup_type)
 

Macro Definition Documentation

#define EV_ANNOTATION (   object)    (G_TYPE_CHECK_INSTANCE_CAST((object), EV_TYPE_ANNOTATION, EvAnnotation))

Definition at line 39 of file ev-annotation.h.

#define EV_ANNOTATION_ATTACHMENT (   object)    (G_TYPE_CHECK_INSTANCE_CAST((object), EV_TYPE_ANNOTATION_ATTACHMENT, EvAnnotationAttachment))

Definition at line 63 of file ev-annotation.h.

#define EV_ANNOTATION_ATTACHMENT_CLASS (   klass)    (G_TYPE_CHECK_CLASS_CAST((klass), EV_TYPE_ANNOTATION_ATTACHMENT, EvAnnotationAttachmentClass))

Definition at line 64 of file ev-annotation.h.

#define EV_ANNOTATION_ATTACHMENT_GET_CLASS (   object)    (G_TYPE_INSTANCE_GET_CLASS((object), EV_TYPE_ANNOTATION_ATTACHMENT, EvAnnotationAttachmentClass))

Definition at line 67 of file ev-annotation.h.

#define EV_ANNOTATION_CLASS (   klass)    (G_TYPE_CHECK_CLASS_CAST((klass), EV_TYPE_ANNOTATION, EvAnnotationClass))

Definition at line 40 of file ev-annotation.h.

#define EV_ANNOTATION_GET_CLASS (   object)    (G_TYPE_INSTANCE_GET_CLASS((object), EV_TYPE_ANNOTATION, EvAnnotationClass))

Definition at line 43 of file ev-annotation.h.

#define EV_ANNOTATION_MARKUP (   o)    (G_TYPE_CHECK_INSTANCE_CAST ((o), EV_TYPE_ANNOTATION_MARKUP, EvAnnotationMarkup))

Definition at line 47 of file ev-annotation.h.

#define EV_ANNOTATION_MARKUP_GET_IFACE (   inst)    (G_TYPE_INSTANCE_GET_INTERFACE ((inst), EV_TYPE_ANNOTATION_MARKUP, EvAnnotationMarkupInterface))

Definition at line 51 of file ev-annotation.h.

#define EV_ANNOTATION_MARKUP_IFACE (   k)    (G_TYPE_CHECK_CLASS_CAST((k), EV_TYPE_ANNOTATION_MARKUP, EvAnnotationMarkupInterface))

Definition at line 48 of file ev-annotation.h.

#define EV_ANNOTATION_TEXT (   object)    (G_TYPE_CHECK_INSTANCE_CAST((object), EV_TYPE_ANNOTATION_TEXT, EvAnnotationText))

Definition at line 55 of file ev-annotation.h.

#define EV_ANNOTATION_TEXT_CLASS (   klass)    (G_TYPE_CHECK_CLASS_CAST((klass), EV_TYPE_ANNOTATION_TEXT, EvAnnotationTextClass))

Definition at line 56 of file ev-annotation.h.

#define EV_ANNOTATION_TEXT_GET_CLASS (   object)    (G_TYPE_INSTANCE_GET_CLASS((object), EV_TYPE_ANNOTATION_TEXT, EvAnnotationTextClass))

Definition at line 59 of file ev-annotation.h.

#define EV_ANNOTATION_TEXT_MARKUP (   object)    (G_TYPE_CHECK_INSTANCE_CAST ((object), EV_TYPE_ANNOTATION_TEXT_MARKUP, EvAnnotationTextMarkup))

Definition at line 71 of file ev-annotation.h.

#define EV_ANNOTATION_TEXT_MARKUP_CLASS (   klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), EV_TYPE_ANNOTATION_TEXT_MARKUP, EvAnnotationTextMarkupClass))

Definition at line 72 of file ev-annotation.h.

#define EV_ANNOTATION_TEXT_MARKUP_GET_CLASS (   object)    (G_TYPE_INSTANCE_GET_CLASS ((object), EV_TYPE_ANNOTATION_TEXT_MARKUP, EvAnnotationTextMarkupClass))

Definition at line 75 of file ev-annotation.h.

#define EV_IS_ANNOTATION (   object)    (G_TYPE_CHECK_INSTANCE_TYPE((object), EV_TYPE_ANNOTATION))

Definition at line 41 of file ev-annotation.h.

#define EV_IS_ANNOTATION_ATTACHMENT (   object)    (G_TYPE_CHECK_INSTANCE_TYPE((object), EV_TYPE_ANNOTATION_ATTACHMENT))

Definition at line 65 of file ev-annotation.h.

#define EV_IS_ANNOTATION_ATTACHMENT_CLASS (   klass)    (G_TYPE_CHECK_CLASS_TYPE((klass), EV_TYPE_ANNOTATION_ATTACHMENT))

Definition at line 66 of file ev-annotation.h.

#define EV_IS_ANNOTATION_CLASS (   klass)    (G_TYPE_CHECK_CLASS_TYPE((klass), EV_TYPE_ANNOTATION))

Definition at line 42 of file ev-annotation.h.

#define EV_IS_ANNOTATION_MARKUP (   o)    (G_TYPE_CHECK_INSTANCE_TYPE ((o), EV_TYPE_ANNOTATION_MARKUP))

Definition at line 49 of file ev-annotation.h.

#define EV_IS_ANNOTATION_MARKUP_IFACE (   k)    (G_TYPE_CHECK_CLASS_TYPE ((k), EV_TYPE_ANNOTATION_MARKUP))

Definition at line 50 of file ev-annotation.h.

#define EV_IS_ANNOTATION_TEXT (   object)    (G_TYPE_CHECK_INSTANCE_TYPE((object), EV_TYPE_ANNOTATION_TEXT))

Definition at line 57 of file ev-annotation.h.

#define EV_IS_ANNOTATION_TEXT_CLASS (   klass)    (G_TYPE_CHECK_CLASS_TYPE((klass), EV_TYPE_ANNOTATION_TEXT))

Definition at line 58 of file ev-annotation.h.

#define EV_IS_ANNOTATION_TEXT_MARKUP (   object)    (G_TYPE_CHECK_INSTANCE_TYPE ((object), EV_TYPE_ANNOTATION_TEXT_MARKUP))

Definition at line 73 of file ev-annotation.h.

#define EV_IS_ANNOTATION_TEXT_MARKUP_CLASS (   klass)    (G_TYPE_CHECK_CLASS_TYPE ((klass), EV_TYPE_ANNOTATION_TEXT_MARKUP))

Definition at line 74 of file ev-annotation.h.

#define EV_TYPE_ANNOTATION   (ev_annotation_get_type())

Definition at line 38 of file ev-annotation.h.

#define EV_TYPE_ANNOTATION_ATTACHMENT   (ev_annotation_attachment_get_type())

Definition at line 62 of file ev-annotation.h.

#define EV_TYPE_ANNOTATION_MARKUP   (ev_annotation_markup_get_type ())

Definition at line 46 of file ev-annotation.h.

#define EV_TYPE_ANNOTATION_TEXT   (ev_annotation_text_get_type())

Definition at line 54 of file ev-annotation.h.

#define EV_TYPE_ANNOTATION_TEXT_MARKUP   (ev_annotation_text_markup_get_type ())

Definition at line 70 of file ev-annotation.h.

Typedef Documentation

typedef struct _EvAnnotation EvAnnotation

Definition at line 77 of file ev-annotation.h.

Definition at line 86 of file ev-annotation.h.

Definition at line 87 of file ev-annotation.h.

Definition at line 78 of file ev-annotation.h.

typedef struct _EvAnnotationMarkup EvAnnotationMarkup

Definition at line 80 of file ev-annotation.h.

Definition at line 81 of file ev-annotation.h.

Definition at line 83 of file ev-annotation.h.

Definition at line 84 of file ev-annotation.h.

Definition at line 89 of file ev-annotation.h.

Definition at line 90 of file ev-annotation.h.

Enumeration Type Documentation

Enumerator
EV_ANNOTATION_TEXT_ICON_NOTE 
EV_ANNOTATION_TEXT_ICON_COMMENT 
EV_ANNOTATION_TEXT_ICON_KEY 
EV_ANNOTATION_TEXT_ICON_HELP 
EV_ANNOTATION_TEXT_ICON_NEW_PARAGRAPH 
EV_ANNOTATION_TEXT_ICON_PARAGRAPH 
EV_ANNOTATION_TEXT_ICON_INSERT 
EV_ANNOTATION_TEXT_ICON_CROSS 
EV_ANNOTATION_TEXT_ICON_CIRCLE 
EV_ANNOTATION_TEXT_ICON_UNKNOWN 

Definition at line 99 of file ev-annotation.h.

Enumerator
EV_ANNOTATION_TEXT_MARKUP_HIGHLIGHT 
EV_ANNOTATION_TEXT_MARKUP_STRIKE_OUT 
EV_ANNOTATION_TEXT_MARKUP_UNDERLINE 
EV_ANNOTATION_TEXT_MARKUP_SQUIGGLY 

Definition at line 112 of file ev-annotation.h.

Enumerator
EV_ANNOTATION_TYPE_UNKNOWN 
EV_ANNOTATION_TYPE_TEXT 
EV_ANNOTATION_TYPE_ATTACHMENT 
EV_ANNOTATION_TYPE_TEXT_MARKUP 

Definition at line 92 of file ev-annotation.h.

Function Documentation

EvAttachment* ev_annotation_attachment_get_attachment ( EvAnnotationAttachment annot)

ev_annotation_attachment_get_attachment: : an EvAnnotationAttachment

Returns: (transfer none): an EvAttachment

Definition at line 1341 of file ev-annotation.c.

1342 {
1343  g_return_val_if_fail (EV_IS_ANNOTATION_ATTACHMENT (annot), NULL);
1344 
1345  return annot->attachment;
1346 }

+ Here is the caller graph for this function:

GType ev_annotation_attachment_get_type ( void  )
EvAnnotation* ev_annotation_attachment_new ( EvPage page,
EvAttachment attachment 
)

Definition at line 1323 of file ev-annotation.c.

1325 {
1326  g_return_val_if_fail (EV_IS_ATTACHMENT (attachment), NULL);
1327 
1328  return EV_ANNOTATION (g_object_new (EV_TYPE_ANNOTATION_ATTACHMENT,
1329  "page", page,
1330  "attachment", attachment,
1331  NULL));
1332 }

+ Here is the caller graph for this function:

gboolean ev_annotation_attachment_set_attachment ( EvAnnotationAttachment annot,
EvAttachment attachment 
)

Definition at line 1349 of file ev-annotation.c.

1351 {
1352  g_return_val_if_fail (EV_IS_ANNOTATION_ATTACHMENT (annot), FALSE);
1353 
1354  if (annot->attachment == attachment)
1355  return FALSE;
1356 
1357  if (annot->attachment)
1358  g_object_unref (annot->attachment);
1359  annot->attachment = attachment ? g_object_ref (attachment) : NULL;
1360 
1361  g_object_notify (G_OBJECT (annot), "attachment");
1362 
1363  return TRUE;
1364 }

+ Here is the caller graph for this function:

gboolean ev_annotation_equal ( EvAnnotation annot,
EvAnnotation other 
)

ev_annotation_equal: : an EvAnnotation : another EvAnnotation

Compare and .

Returns: TRUE if is equal to , FALSE otherwise

Definition at line 390 of file ev-annotation.c.

392 {
393  g_return_val_if_fail (EV_IS_ANNOTATION (annot), FALSE);
394  g_return_val_if_fail (EV_IS_ANNOTATION (other), FALSE);
395 
396  return (annot == other || g_strcmp0 (annot->name, other->name) == 0);
397 }

+ Here is the caller graph for this function:

EvAnnotationType ev_annotation_get_annotation_type ( EvAnnotation annot)

Definition at line 340 of file ev-annotation.c.

341 {
342  g_return_val_if_fail (EV_IS_ANNOTATION (annot), 0);
343 
344  return annot->type;
345 }

+ Here is the caller graph for this function:

void ev_annotation_get_area ( EvAnnotation annot,
EvRectangle area 
)

ev_annotation_set_area: : an EvAnnotation : (out): a EvRectangle to be filled with the annotation area

Gets the area of .

Since: 3.18

Definition at line 694 of file ev-annotation.c.

696 {
697  g_return_if_fail (EV_IS_ANNOTATION (annot));
698  g_return_if_fail (area != NULL);
699 
700  *area = annot->area;
701 }

+ Here is the caller graph for this function:

void ev_annotation_get_color ( EvAnnotation annot,
GdkColor *  color 
)

ev_annotation_get_color: : an EvAnnotation : (out): a #GdkColor to be filled with the Annotation color.

Get the color of .

Deprecated: 3.6: Use ev_annotation_get_rgba() instead.

Definition at line 585 of file ev-annotation.c.

587 {
588  GdkRGBA rgba;
589 
590  g_return_if_fail (EV_IS_ANNOTATION (annot));
591  g_return_if_fail (color != NULL);
592 
593  ev_annotation_get_rgba (annot, &rgba);
594 
595  color->pixel = 0;
596  color->red = CLAMP (rgba.red * 65535. + 0.5, 0, 65535);
597  color->green = CLAMP (rgba.green * 65535. + 0.5, 0, 65535);
598  color->blue = CLAMP (rgba.blue * 65535. + 0.5, 0, 65535);
599 }

+ Here is the caller graph for this function:

const gchar* ev_annotation_get_contents ( EvAnnotation annot)

ev_annotation_get_contents: : an EvAnnotation

Get the contents of . The contents of is the text that is displayed in the annotation, or an alternate description of the annotation's content for non-text annotations

Returns: a string with the contents of the annotation or NULL if has no contents.

Definition at line 411 of file ev-annotation.c.

412 {
413  g_return_val_if_fail (EV_IS_ANNOTATION (annot), NULL);
414 
415  return annot->contents;
416 }

+ Here is the caller graph for this function:

const gchar* ev_annotation_get_modified ( EvAnnotation annot)

ev_annotation_get_modified: : an EvAnnotation

Get the last modification date of .

Returns: A string containing the last modification date.

Definition at line 501 of file ev-annotation.c.

502 {
503  g_return_val_if_fail (EV_IS_ANNOTATION (annot), NULL);
504 
505  return annot->modified;
506 }

+ Here is the caller graph for this function:

const gchar* ev_annotation_get_name ( EvAnnotation annot)

ev_annotation_get_name: : an EvAnnotation

Get the name of . The name of the annotation is a string that uniquely indenftifies amongs all the annotations in the same page.

Returns: the string with the annotation's name.

Definition at line 457 of file ev-annotation.c.

458 {
459  g_return_val_if_fail (EV_IS_ANNOTATION (annot), NULL);
460 
461  return annot->name;
462 }

+ Here is the caller graph for this function:

EvPage* ev_annotation_get_page ( EvAnnotation annot)

ev_annotation_get_page: : an EvAnnotation

Get the page where appears.

Returns: (transfer none): the EvPage where appears

Definition at line 356 of file ev-annotation.c.

357 {
358  g_return_val_if_fail (EV_IS_ANNOTATION (annot), NULL);
359 
360  return annot->page;
361 }

+ Here is the caller graph for this function:

guint ev_annotation_get_page_index ( EvAnnotation annot)

ev_annotation_get_page_index: : an EvAnnotation

Get the index of the page where appears. Note that the index is 0 based.

Returns: the page index.

Definition at line 373 of file ev-annotation.c.

374 {
375  g_return_val_if_fail (EV_IS_ANNOTATION (annot), 0);
376 
377  return annot->page->index;
378 }

+ Here is the caller graph for this function:

void ev_annotation_get_rgba ( EvAnnotation annot,
GdkRGBA *  rgba 
)

ev_annotation_get_rgba: : an EvAnnotation : (out): a #GdkRGBA to be filled with the annotation color

Gets the color of .

Since: 3.6

Definition at line 647 of file ev-annotation.c.

649 {
650  g_return_if_fail (EV_IS_ANNOTATION (annot));
651  g_return_if_fail (rgba != NULL);
652 
653  *rgba = annot->rgba;
654 }

+ Here is the caller graph for this function:

GType ev_annotation_get_type ( void  )
gboolean ev_annotation_markup_can_have_popup ( EvAnnotationMarkup markup)

Definition at line 978 of file ev-annotation.c.

979 {
981 
982  g_return_val_if_fail (EV_IS_ANNOTATION_MARKUP (markup), FALSE);
983 
984  props = ev_annotation_markup_get_properties (markup);
985  return props->can_have_popup;
986 }

+ Here is the caller graph for this function:

const gchar* ev_annotation_markup_get_label ( EvAnnotationMarkup markup)

Definition at line 915 of file ev-annotation.c.

916 {
918 
919  g_return_val_if_fail (EV_IS_ANNOTATION_MARKUP (markup), NULL);
920 
921  props = ev_annotation_markup_get_properties (markup);
922  return props->label;
923 }

+ Here is the caller graph for this function:

gdouble ev_annotation_markup_get_opacity ( EvAnnotationMarkup markup)

Definition at line 948 of file ev-annotation.c.

949 {
951 
952  g_return_val_if_fail (EV_IS_ANNOTATION_MARKUP (markup), 1.0);
953 
954  props = ev_annotation_markup_get_properties (markup);
955  return props->opacity;
956 }

+ Here is the caller graph for this function:

gboolean ev_annotation_markup_get_popup_is_open ( EvAnnotationMarkup markup)

Definition at line 1055 of file ev-annotation.c.

1056 {
1057  EvAnnotationMarkupProps *props;
1058 
1059  g_return_val_if_fail (EV_IS_ANNOTATION_MARKUP (markup), FALSE);
1060 
1061  props = ev_annotation_markup_get_properties (markup);
1062  return props->popup_is_open;
1063 }

+ Here is the caller graph for this function:

void ev_annotation_markup_get_rectangle ( EvAnnotationMarkup markup,
EvRectangle ev_rect 
)

Definition at line 1019 of file ev-annotation.c.

1021 {
1022  EvAnnotationMarkupProps *props;
1023 
1024  g_return_if_fail (EV_IS_ANNOTATION_MARKUP (markup));
1025  g_return_if_fail (ev_rect != NULL);
1026 
1027  props = ev_annotation_markup_get_properties (markup);
1028  *ev_rect = props->rectangle;
1029 }

+ Here is the caller graph for this function:

GType ev_annotation_markup_get_type ( void  )
gboolean ev_annotation_markup_has_popup ( EvAnnotationMarkup markup)

Definition at line 989 of file ev-annotation.c.

990 {
992 
993  g_return_val_if_fail (EV_IS_ANNOTATION_MARKUP (markup), FALSE);
994 
995  props = ev_annotation_markup_get_properties (markup);
996  return props->has_popup;
997 }

+ Here is the caller graph for this function:

gboolean ev_annotation_markup_set_has_popup ( EvAnnotationMarkup markup,
gboolean  has_popup 
)

Definition at line 1000 of file ev-annotation.c.

1002 {
1003  EvAnnotationMarkupProps *props;
1004 
1005  g_return_val_if_fail (EV_IS_ANNOTATION_MARKUP (markup), FALSE);
1006 
1007  props = ev_annotation_markup_get_properties (markup);
1008  if (props->has_popup == has_popup)
1009  return FALSE;
1010 
1011  props->has_popup = has_popup;
1012 
1013  g_object_notify (G_OBJECT (markup), "has-popup");
1014 
1015  return TRUE;
1016 }

+ Here is the caller graph for this function:

gboolean ev_annotation_markup_set_label ( EvAnnotationMarkup markup,
const gchar *  label 
)

Definition at line 926 of file ev-annotation.c.

928 {
930 
931  g_return_val_if_fail (EV_IS_ANNOTATION_MARKUP (markup), FALSE);
932  g_return_val_if_fail (label != NULL, FALSE);
933 
934  props = ev_annotation_markup_get_properties (markup);
935  if (g_strcmp0 (props->label, label) == 0)
936  return FALSE;
937 
938  if (props->label)
939  g_free (props->label);
940  props->label = g_strdup (label);
941 
942  g_object_notify (G_OBJECT (markup), "label");
943 
944  return TRUE;
945 }

+ Here is the caller graph for this function:

gboolean ev_annotation_markup_set_opacity ( EvAnnotationMarkup markup,
gdouble  opacity 
)

Definition at line 959 of file ev-annotation.c.

961 {
963 
964  g_return_val_if_fail (EV_IS_ANNOTATION_MARKUP (markup), FALSE);
965 
966  props = ev_annotation_markup_get_properties (markup);
967  if (props->opacity == opacity)
968  return FALSE;
969 
970  props->opacity = opacity;
971 
972  g_object_notify (G_OBJECT (markup), "opacity");
973 
974  return TRUE;
975 }

+ Here is the caller graph for this function:

gboolean ev_annotation_markup_set_popup_is_open ( EvAnnotationMarkup markup,
gboolean  is_open 
)

Definition at line 1066 of file ev-annotation.c.

1068 {
1069  EvAnnotationMarkupProps *props;
1070 
1071  g_return_val_if_fail (EV_IS_ANNOTATION_MARKUP (markup), FALSE);
1072 
1073  props = ev_annotation_markup_get_properties (markup);
1074  if (props->popup_is_open == is_open)
1075  return FALSE;
1076 
1077  props->popup_is_open = is_open;
1078 
1079  g_object_notify (G_OBJECT (markup), "popup_is_open");
1080 
1081  return TRUE;
1082 }

+ Here is the caller graph for this function:

gboolean ev_annotation_markup_set_rectangle ( EvAnnotationMarkup markup,
const EvRectangle ev_rect 
)

Definition at line 1032 of file ev-annotation.c.

1034 {
1035  EvAnnotationMarkupProps *props;
1036 
1037  g_return_val_if_fail (EV_IS_ANNOTATION_MARKUP (markup), FALSE);
1038  g_return_val_if_fail (ev_rect != NULL, FALSE);
1039 
1040  props = ev_annotation_markup_get_properties (markup);
1041  if (props->rectangle.x1 == ev_rect->x1 &&
1042  props->rectangle.y1 == ev_rect->y1 &&
1043  props->rectangle.x2 == ev_rect->x2 &&
1044  props->rectangle.y2 == ev_rect->y2)
1045  return FALSE;
1046 
1047  props->rectangle = *ev_rect;
1048 
1049  g_object_notify (G_OBJECT (markup), "rectangle");
1050 
1051  return TRUE;
1052 }

+ Here is the caller graph for this function:

gboolean ev_annotation_set_area ( EvAnnotation annot,
const EvRectangle area 
)

ev_annotation_set_area: : an #Evannotation : a EvRectangle

Set the area of the annotation to .

Returns: TRUE if the area has been changed, FALSE otherwise

Since: 3.18

Definition at line 715 of file ev-annotation.c.

717 {
718  gboolean was_initial;
719 
720  g_return_val_if_fail (EV_IS_ANNOTATION (annot), FALSE);
721  g_return_val_if_fail (area != NULL, FALSE);
722 
723  if (ev_rect_cmp ((EvRectangle *)area, &annot->area) == 0)
724  return FALSE;
725 
726  was_initial = annot->area.x1 == -1 && annot->area.x2 == -1
727  && annot->area.y1 == -1 && annot->area.y2 == -1;
728  annot->area = *area;
729  if (!was_initial)
730  g_object_notify (G_OBJECT (annot), "area");
731 
732  return TRUE;
733 }

+ Here is the caller graph for this function:

gboolean ev_annotation_set_color ( EvAnnotation annot,
const GdkColor *  color 
)

ev_annotation_set_color: : an #Evannotation : a #GdkColor

Set the color of the annotation to . You can monitor changes to the annotation's color by connecting to notify::color signal on .

Returns: TRUE when the color has been changed, FALSE otherwise.

Deprecated: 3.6: Use ev_annotation_set_rgba() instead.

Definition at line 615 of file ev-annotation.c.

617 {
618  GdkColor annot_color;
619  GdkRGBA rgba;
620 
621  g_return_val_if_fail (EV_IS_ANNOTATION (annot), FALSE);
622 
623  ev_annotation_get_color (annot, &annot_color);
624  if (color == NULL || gdk_color_equal (color, &annot_color))
625  return FALSE;
626 
627  rgba.red = color->red / 65535.;
628  rgba.green = color->green / 65535.;
629  rgba.blue = color->blue / 65535.;
630  rgba.alpha = 1.;
631 
632  ev_annotation_set_rgba (annot, &rgba);
633 
634  return TRUE;
635 }

+ Here is the caller graph for this function:

gboolean ev_annotation_set_contents ( EvAnnotation annot,
const gchar *  contents 
)

ev_annotation_set_contents: : an EvAnnotation

Set the contents of . You can monitor changes in the annotation's contents by connecting to notify::contents signal of .

Returns: TRUE if the contents have been changed, FALSE otherwise.

Definition at line 429 of file ev-annotation.c.

431 {
432  g_return_val_if_fail (EV_IS_ANNOTATION (annot), FALSE);
433 
434  if (g_strcmp0 (annot->contents, contents) == 0)
435  return FALSE;
436 
437  if (annot->contents)
438  g_free (annot->contents);
439  annot->contents = contents ? g_strdup (contents) : NULL;
440 
441  g_object_notify (G_OBJECT (annot), "contents");
442 
443  return TRUE;
444 }

+ Here is the caller graph for this function:

gboolean ev_annotation_set_modified ( EvAnnotation annot,
const gchar *  modified 
)

ev_annotation_set_modified: : an EvAnnotation : string with the last modification date.

Set the last modification date of to . To set the last modification date using a #GTime, use ev_annotation_set_modified_from_time() instead. You can monitor changes to the last modification date by connecting to the notify::modified signal on .

Returns: TRUE if the last modification date has been updated, FALSE otherwise.

Definition at line 522 of file ev-annotation.c.

524 {
525  g_return_val_if_fail (EV_IS_ANNOTATION (annot), FALSE);
526 
527  if (g_strcmp0 (annot->modified, modified) == 0)
528  return FALSE;
529 
530  if (annot->modified)
531  g_free (annot->modified);
532  annot->modified = modified ? g_strdup (modified) : NULL;
533 
534  g_object_notify (G_OBJECT (annot), "modified");
535 
536  return TRUE;
537 }

+ Here is the caller graph for this function:

gboolean ev_annotation_set_modified_from_time ( EvAnnotation annot,
GTime  utime 
)

ev_annotation_set_modified_from_time: : an EvAnnotation : a #GTime

Set the last modification date of to . You can monitor changes to the last modification date by connectin to the notify::modified sinal on . For the time-format used, see ev_document_misc_format_date().

Returns: TRUE if the last modified date has been updated, FALSE otherwise.

Definition at line 552 of file ev-annotation.c.

554 {
555  gchar *modified;
556 
557  g_return_val_if_fail (EV_IS_ANNOTATION (annot), FALSE);
558 
559  modified = ev_document_misc_format_date (utime);
560 
561  if (g_strcmp0 (annot->modified, modified) == 0) {
562  g_free (modified);
563  return FALSE;
564  }
565 
566  if (annot->modified)
567  g_free (annot->modified);
568  annot->modified = modified;
569 
570  g_object_notify (G_OBJECT (annot), "modified");
571 
572  return TRUE;
573 }

+ Here is the caller graph for this function:

gboolean ev_annotation_set_name ( EvAnnotation annot,
const gchar *  name 
)

ev_annotation_set_name: : an EvAnnotation

Set the name of . You can monitor changes of the annotation name by connecting to the notify::name signal on .

Returns: TRUE when the name has been changed, FALSE otherwise.

Definition at line 475 of file ev-annotation.c.

477 {
478  g_return_val_if_fail (EV_IS_ANNOTATION (annot), FALSE);
479 
480  if (g_strcmp0 (annot->name, name) == 0)
481  return FALSE;
482 
483  if (annot->name)
484  g_free (annot->name);
485  annot->name = name ? g_strdup (name) : NULL;
486 
487  g_object_notify (G_OBJECT (annot), "name");
488 
489  return TRUE;
490 }

+ Here is the caller graph for this function:

gboolean ev_annotation_set_rgba ( EvAnnotation annot,
const GdkRGBA *  rgba 
)

ev_annotation_set_rgba: : an #Evannotation : a #GdkRGBA

Set the color of the annotation to .

Returns: TRUE if the color has been changed, FALSE otherwise

Since: 3.6

Definition at line 668 of file ev-annotation.c.

670 {
671  g_return_val_if_fail (EV_IS_ANNOTATION (annot), FALSE);
672  g_return_val_if_fail (rgba != NULL, FALSE);
673 
674  if (gdk_rgba_equal (rgba, &annot->rgba))
675  return FALSE;
676 
677  annot->rgba = *rgba;
678  g_object_notify (G_OBJECT (annot), "rgba");
679  g_object_notify (G_OBJECT (annot), "color");
680 
681  return TRUE;
682 }

+ Here is the caller graph for this function:

EvAnnotationTextIcon ev_annotation_text_get_icon ( EvAnnotationText text)

Definition at line 1184 of file ev-annotation.c.

1185 {
1186  g_return_val_if_fail (EV_IS_ANNOTATION_TEXT (text), 0);
1187 
1188  return text->icon;
1189 }

+ Here is the caller graph for this function:

gboolean ev_annotation_text_get_is_open ( EvAnnotationText text)

Definition at line 1208 of file ev-annotation.c.

1209 {
1210  g_return_val_if_fail (EV_IS_ANNOTATION_TEXT (text), FALSE);
1211 
1212  return text->is_open;
1213 }

+ Here is the caller graph for this function:

GType ev_annotation_text_get_type ( void  )
EvAnnotationTextMarkupType ev_annotation_text_markup_get_markup_type ( EvAnnotationTextMarkup annot)

Definition at line 1485 of file ev-annotation.c.

1486 {
1487  g_return_val_if_fail (EV_IS_ANNOTATION_TEXT_MARKUP (annot), EV_ANNOTATION_TEXT_MARKUP_HIGHLIGHT);
1488 
1489  return annot->type;
1490 }

+ Here is the caller graph for this function:

GType ev_annotation_text_markup_get_type ( void  )
EvAnnotation* ev_annotation_text_markup_highlight_new ( EvPage page)

Definition at line 1445 of file ev-annotation.c.

1446 {
1448  "page", page,
1450  NULL));
1451  return annot;
1452 }

+ Here is the caller graph for this function:

gboolean ev_annotation_text_markup_set_markup_type ( EvAnnotationTextMarkup annot,
EvAnnotationTextMarkupType  markup_type 
)

Definition at line 1493 of file ev-annotation.c.

1495 {
1496  g_return_val_if_fail (EV_IS_ANNOTATION_TEXT_MARKUP (annot), FALSE);
1497 
1498  if (annot->type == markup_type)
1499  return FALSE;
1500 
1501  annot->type = markup_type;
1502  g_object_notify (G_OBJECT (annot), "type");
1503 
1504  return TRUE;
1505 }

+ Here is the caller graph for this function:

EvAnnotation* ev_annotation_text_markup_squiggly_new ( EvPage page)

Definition at line 1475 of file ev-annotation.c.

1476 {
1478  "page", page,
1480  NULL));
1481  return annot;
1482 }

+ Here is the caller graph for this function:

EvAnnotation* ev_annotation_text_markup_strike_out_new ( EvPage page)

Definition at line 1455 of file ev-annotation.c.

1456 {
1458  "page", page,
1460  NULL));
1461  return annot;
1462 }

+ Here is the caller graph for this function:

EvAnnotation* ev_annotation_text_markup_underline_new ( EvPage page)

Definition at line 1465 of file ev-annotation.c.

1466 {
1468  "page", page,
1470  NULL));
1471  return annot;
1472 }

+ Here is the caller graph for this function:

EvAnnotation* ev_annotation_text_new ( EvPage page)

Definition at line 1176 of file ev-annotation.c.

1177 {
1178  return EV_ANNOTATION (g_object_new (EV_TYPE_ANNOTATION_TEXT,
1179  "page", page,
1180  NULL));
1181 }

+ Here is the caller graph for this function:

gboolean ev_annotation_text_set_icon ( EvAnnotationText text,
EvAnnotationTextIcon  icon 
)

Definition at line 1192 of file ev-annotation.c.

1194 {
1195  g_return_val_if_fail (EV_IS_ANNOTATION_TEXT (text), FALSE);
1196 
1197  if (text->icon == icon)
1198  return FALSE;
1199 
1200  text->icon = icon;
1201 
1202  g_object_notify (G_OBJECT (text), "icon");
1203 
1204  return TRUE;
1205 }

+ Here is the caller graph for this function:

gboolean ev_annotation_text_set_is_open ( EvAnnotationText text,
gboolean  is_open 
)

Definition at line 1216 of file ev-annotation.c.

1218 {
1219  g_return_val_if_fail (EV_IS_ANNOTATION_TEXT (text), FALSE);
1220 
1221  if (text->is_open == is_open)
1222  return FALSE;
1223 
1224  text->is_open = is_open;
1225 
1226  g_object_notify (G_OBJECT (text), "is_open");
1227 
1228  return TRUE;
1229 }

+ Here is the caller graph for this function: