EvAnnotation: Atril Document Library Reference Manual

## EvAnnotation

EvAnnotation

## Functions

EvAnnotationType | ev_annotation_get_annotation_type ()
EvPage * | ev_annotation_get_page ()
guint | ev_annotation_get_page_index ()
gboolean | ev_annotation_equal ()
const gchar * | ev_annotation_get_contents ()
gboolean | ev_annotation_set_contents ()
const gchar * | ev_annotation_get_name ()
gboolean | ev_annotation_set_name ()
const gchar * | ev_annotation_get_modified ()
gboolean | ev_annotation_set_modified ()
gboolean | ev_annotation_set_modified_from_time ()
void | ev_annotation_get_color ()
gboolean | ev_annotation_set_color ()
void | ev_annotation_get_rgba ()
gboolean | ev_annotation_set_rgba ()
const gchar * | ev_annotation_markup_get_label ()
gboolean | ev_annotation_markup_set_label ()
gdouble | ev_annotation_markup_get_opacity ()
gboolean | ev_annotation_markup_set_opacity ()
gboolean | ev_annotation_markup_has_popup ()
void | ev_annotation_markup_get_rectangle ()
gboolean | ev_annotation_markup_set_rectangle ()
EvAnnotation * | ev_annotation_text_new ()
EvAnnotationTextIcon | ev_annotation_text_get_icon ()
gboolean | ev_annotation_text_set_icon ()
gboolean | ev_annotation_text_get_is_open ()
gboolean | ev_annotation_text_set_is_open ()
EvAnnotation * | ev_annotation_attachment_new ()
EvAttachment * | ev_annotation_attachment_get_attachment ()
gboolean | ev_annotation_attachment_set_attachment ()

## Properties

gpointer | color | Read / Write
char * | contents | Read / Write
char * | modified | Read / Write
char * | name | Read / Write
EvPage * | page | Write / Construct Only
GdkRGBA * | rgba | Read / Write
gboolean | has-popup | Read / Write
char * | label | Read / Write
double | opacity | Read / Write
gboolean | popup-is-open | Read / Write
EvRectangle * | rectangle | Read / Write
EvAnnotationTextIcon | icon | Read / Write
gboolean | is-open | Read / Write
EvAttachment * | attachment | Read / Write / Construct

## Types and Values

| EvAnnotation
| EvAnnotationClass
| EvAnnotationMarkup
| EvAnnotationText
| EvAnnotationTextClass
| EvAnnotationAttachment
| EvAnnotationAttachmentClass

## Object Hierarchy

        GInterface
        ╰── EvAnnotationMarkup
        GObject
        ╰── EvAnnotation
            ├── EvAnnotationAttachment
            ╰── EvAnnotationText

## Prerequisites

EvAnnotationMarkup requires EvAnnotation.

## Known Derived Interfaces

EvAnnotation is required by EvAnnotationMarkup.

## Implemented Interfaces

EvAnnotationText implements EvAnnotationMarkup.

EvAnnotationAttachment implements EvAnnotationMarkup.

## Known Implementations

EvAnnotationMarkup is implemented by EvAnnotationAttachment and EvAnnotationText.

## Description

## Functions

### ev_annotation_get_annotation_type ()

    EvAnnotationType
    ev_annotation_get_annotation_type (EvAnnotation *annot);

### ev_annotation_get_page ()

    EvPage *
    ev_annotation_get_page (EvAnnotation *annot);

Get the page where `annot` appears.

#### Parameters

annot | an EvAnnotation |

#### Returns

the EvPage where `annot` appears.

[transfer none]

### ev_annotation_get_page_index ()

    guint
    ev_annotation_get_page_index (EvAnnotation *annot);

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

#### Parameters

annot | an EvAnnotation |

#### Returns

the page index.

### ev_annotation_equal ()

    gboolean
    ev_annotation_equal (EvAnnotation *annot,
                         EvAnnotation *other);

Compare `annot` and `other` .

#### Parameters

annot | an EvAnnotation |
other | another EvAnnotation |

#### Returns

`TRUE` if `annot` is equal to `other` , `FALSE` otherwise

### ev_annotation_get_contents ()

    const gchar *
    ev_annotation_get_contents (EvAnnotation *annot);

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

#### Parameters

annot | an EvAnnotation |

#### Returns

a string with the contents of the annotation or `NULL` if `annot` has no contents.

### ev_annotation_set_contents ()

    gboolean
    ev_annotation_set_contents (EvAnnotation *annot,
                                const gchar *contents);

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

#### Parameters

annot | an EvAnnotation |

#### Returns

`TRUE` if the contents have been changed, `FALSE` otherwise.

### ev_annotation_get_name ()

    const gchar *
    ev_annotation_get_name (EvAnnotation *annot);

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

#### Parameters

annot | an EvAnnotation |

#### Returns

the string with the annotation's name.

### ev_annotation_set_name ()

    gboolean
    ev_annotation_set_name (EvAnnotation *annot,
                            const gchar *name);

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

#### Parameters

annot | an EvAnnotation |

#### Returns

`TRUE` when the name has been changed, `FALSE` otherwise.

### ev_annotation_get_modified ()

    const gchar *
    ev_annotation_get_modified (EvAnnotation *annot);

Get the last modification date of `annot` .

#### Parameters

annot | an EvAnnotation |

#### Returns

A string containing the last modification date.

### ev_annotation_set_modified ()

    gboolean
    ev_annotation_set_modified (EvAnnotation *annot,
                                const gchar *modified);

Set the last modification date of `annot` to `modified` . To set the last modification date using a gint64, 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 `annot` .

#### Parameters

annot | an EvAnnotation |
modified | string with the last modification date. |

#### Returns

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

### ev_annotation_set_modified_from_time ()

    gboolean
    ev_annotation_set_modified_from_time (EvAnnotation *annot,
                                          gint64 utime);

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

#### Parameters

annot | an EvAnnotation |
utime | a gint64 |

#### Returns

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

### ev_annotation_get_color ()

    void
    ev_annotation_get_color (EvAnnotation *annot,
                             GdkColor *color);

`ev_annotation_get_color` has been deprecated since version 1.2.1 and should not be used in newly-written code.

Use `ev_annotation_get_rgba()` instead.

Get the color of `annot` .

#### Parameters

annot | an EvAnnotation |
color | a GdkColor to be filled with the Annotation color. | [out]

### ev_annotation_set_color ()

    gboolean
    ev_annotation_set_color (EvAnnotation *annot,
                             const GdkColor *color);

`ev_annotation_set_color` has been deprecated since version 1.2.1 and should not be used in newly-written code.

Use `ev_annotation_set_rgba()` instead.

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

#### Parameters

annot | an Evannotation |
color | a GdkColor |

#### Returns

`TRUE` when the color has been changed, `FALSE` otherwise.

### ev_annotation_get_rgba ()

    void
    ev_annotation_get_rgba (EvAnnotation *annot,
                            GdkRGBA *rgba);

Gets the color of `annot` .

#### Parameters

annot | an EvAnnotation |
rgba | a GdkRGBA to be filled with the annotation color. | [out]

Since: 1.2.1

### ev_annotation_set_rgba ()

    gboolean
    ev_annotation_set_rgba (EvAnnotation *annot,
                            const GdkRGBA *rgba);

Set the color of the annotation to `rgba` .

#### Parameters

annot | an Evannotation |
rgba | a GdkRGBA |

#### Returns

`TRUE` if the color has been changed, `FALSE` otherwise

Since: 1.2.1

### ev_annotation_markup_get_label ()

    const gchar *
    ev_annotation_markup_get_label (EvAnnotationMarkup *markup);

### ev_annotation_markup_set_label ()

    gboolean
    ev_annotation_markup_set_label (EvAnnotationMarkup *markup,
                                    const gchar *label);

### ev_annotation_markup_get_opacity ()

    gdouble
    ev_annotation_markup_get_opacity (EvAnnotationMarkup *markup);

### ev_annotation_markup_set_opacity ()

    gboolean
    ev_annotation_markup_set_opacity (EvAnnotationMarkup *markup,
                                      gdouble opacity);

### ev_annotation_markup_has_popup ()

    gboolean
    ev_annotation_markup_has_popup (EvAnnotationMarkup *markup);

### ev_annotation_markup_get_rectangle ()

    void
    ev_annotation_markup_get_rectangle (EvAnnotationMarkup *markup,
                                        EvRectangle *ev_rect);

### ev_annotation_markup_set_rectangle ()

    gboolean
    ev_annotation_markup_set_rectangle (EvAnnotationMarkup *markup,
                                        const EvRectangle *ev_rect);

### ev_annotation_text_new ()

    EvAnnotation *
    ev_annotation_text_new (EvPage *page);

### ev_annotation_text_get_icon ()

    EvAnnotationTextIcon
    ev_annotation_text_get_icon (EvAnnotationText *text);

### ev_annotation_text_set_icon ()

    gboolean
    ev_annotation_text_set_icon (EvAnnotationText *text,
                                 EvAnnotationTextIcon icon);

### ev_annotation_text_get_is_open ()

    gboolean
    ev_annotation_text_get_is_open (EvAnnotationText *text);

### ev_annotation_text_set_is_open ()

    gboolean
    ev_annotation_text_set_is_open (EvAnnotationText *text,
                                    gboolean is_open);

### ev_annotation_attachment_new ()

    EvAnnotation *
    ev_annotation_attachment_new (EvPage *page,
                                  EvAttachment *attachment);

### ev_annotation_attachment_get_attachment ()

    EvAttachment *
    ev_annotation_attachment_get_attachment
                                   (EvAnnotationAttachment *annot);

#### Parameters

annot | an EvAnnotationAttachment |

#### Returns

an EvAttachment.

[transfer none]

### ev_annotation_attachment_set_attachment ()

    gboolean
    ev_annotation_attachment_set_attachment
                                   (EvAnnotationAttachment *annot,
                                    EvAttachment *attachment);

## Types and Values

### EvAnnotation

    typedef struct _EvAnnotation EvAnnotation;

### EvAnnotationClass

    typedef struct _EvAnnotationClass EvAnnotationClass;

### EvAnnotationMarkup

    typedef struct _EvAnnotationMarkup EvAnnotationMarkup;

### EvAnnotationText

    typedef struct _EvAnnotationText EvAnnotationText;

### EvAnnotationTextClass

    typedef struct _EvAnnotationTextClass EvAnnotationTextClass;

### EvAnnotationAttachment

    typedef struct _EvAnnotationAttachment EvAnnotationAttachment;

### EvAnnotationAttachmentClass

    typedef struct _EvAnnotationAttachmentClass EvAnnotationAttachmentClass;

## Property Details

### The `“color”` property

      “color”                    gpointer

The colour of the annotation as a GdkColor.

`EvAnnotation:color` has been deprecated since version 1.2.1 and should not be used in newly-written code.

Use “rgba” instead.

Owner: EvAnnotation

Flags: Read / Write

### The `“contents”` property

      “contents”                 char *

The annotation contents.

Owner: EvAnnotation

Flags: Read / Write

Default value: NULL

### The `“modified”` property

      “modified”                 char *

Last modified date as string.

Owner: EvAnnotation

Flags: Read / Write

Default value: NULL

### The `“name”` property

      “name”                     char *

The annotation unique name.

Owner: EvAnnotation

Flags: Read / Write

Default value: NULL

### The `“page”` property

      “page”                     EvPage *

The page wehere the annotation is.

Owner: EvAnnotation

Flags: Write / Construct Only

### The `“rgba”` property

      “rgba”                     GdkRGBA *

The colour of the annotation as a GdkRGBA.

Owner: EvAnnotation

Flags: Read / Write

Since: 1.2.1

### The `“has-popup”` property

      “has-popup”                gboolean

Whether the markup annotation has a popup window associated.

Owner: EvAnnotationMarkup

Flags: Read / Write

Default value: TRUE

### The `“label”` property

      “label”                    char *

Label of the markup annotation.

Owner: EvAnnotationMarkup

Flags: Read / Write

Default value: NULL

### The `“opacity”` property

      “opacity”                  double

Opacity of the markup annotation.

Owner: EvAnnotationMarkup

Flags: Read / Write

Allowed values: >= 0

Default value: 1

### The `“popup-is-open”` property

      “popup-is-open”            gboolean

Whether the popup associated to the markup annotation is open.

Owner: EvAnnotationMarkup

Flags: Read / Write

Default value: FALSE

### The `“rectangle”` property

      “rectangle”                EvRectangle *

The Rectangle of the popup associated to the markup annotation.

Owner: EvAnnotationMarkup

Flags: Read / Write

### The `“icon”` property

      “icon”                     EvAnnotationTextIcon

The icon fo the text annotation.

Owner: EvAnnotationText

Flags: Read / Write

Default value: EV_ANNOTATION_TEXT_ICON_NOTE

### The `“is-open”` property

      “is-open”                  gboolean

Whether text annot is initially open.

Owner: EvAnnotationText

Flags: Read / Write

Default value: FALSE

### The `“attachment”` property

      “attachment”               EvAttachment *

The attachment of the annotation.

Owner: EvAnnotationAttachment

Flags: Read / Write / Construct