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.c File Reference
#include "config.h"
#include "ev-annotation.h"
#include "ev-document-misc.h"
#include "ev-document-type-builtins.h"
+ Include dependency graph for ev-annotation.c:

Go to the source code of this file.

Data Structures

struct  _EvAnnotation
 
struct  _EvAnnotationClass
 
struct  _EvAnnotationMarkupInterface
 
struct  _EvAnnotationText
 
struct  _EvAnnotationTextClass
 
struct  _EvAnnotationAttachment
 
struct  _EvAnnotationAttachmentClass
 
struct  _EvAnnotationTextMarkup
 
struct  _EvAnnotationTextMarkupClass
 
struct  EvAnnotationMarkupProps
 

Enumerations

enum  {
  PROP_ANNOT_0, PROP_ANNOT_PAGE, PROP_ANNOT_CONTENTS, PROP_ANNOT_NAME,
  PROP_ANNOT_MODIFIED, PROP_ANNOT_COLOR, PROP_ANNOT_RGBA, PROP_ANNOT_AREA
}
 
enum  {
  PROP_MARKUP_0, PROP_MARKUP_LABEL, PROP_MARKUP_OPACITY, PROP_MARKUP_CAN_HAVE_POPUP,
  PROP_MARKUP_HAS_POPUP, PROP_MARKUP_RECTANGLE, PROP_MARKUP_POPUP_IS_OPEN
}
 
enum  { PROP_TEXT_ICON = PROP_MARKUP_POPUP_IS_OPEN + 1, PROP_TEXT_IS_OPEN }
 
enum  { PROP_ATTACHMENT_ATTACHMENT = PROP_MARKUP_POPUP_IS_OPEN + 1 }
 
enum  { PROP_TEXT_MARKUP_TYPE = PROP_MARKUP_POPUP_IS_OPEN + 1 }
 

Functions

static void ev_annotation_markup_default_init (EvAnnotationMarkupInterface *iface)
 
static void ev_annotation_text_markup_iface_init (EvAnnotationMarkupInterface *iface)
 
static void ev_annotation_attachment_markup_iface_init (EvAnnotationMarkupInterface *iface)
 
static void ev_annotation_text_markup_markup_iface_init (EvAnnotationMarkupInterface *iface)
 
 G_DEFINE_TYPE_WITH_CODE (EvAnnotationText, ev_annotation_text, EV_TYPE_ANNOTATION,{G_IMPLEMENT_INTERFACE(EV_TYPE_ANNOTATION_MARKUP, ev_annotation_text_markup_iface_init);})
 
 G_DEFINE_TYPE_WITH_CODE (EvAnnotationAttachment, ev_annotation_attachment, EV_TYPE_ANNOTATION,{G_IMPLEMENT_INTERFACE(EV_TYPE_ANNOTATION_MARKUP, ev_annotation_attachment_markup_iface_init);})
 
 G_DEFINE_TYPE_WITH_CODE (EvAnnotationTextMarkup, ev_annotation_text_markup, EV_TYPE_ANNOTATION,{G_IMPLEMENT_INTERFACE(EV_TYPE_ANNOTATION_MARKUP, ev_annotation_text_markup_markup_iface_init);})
 
static void ev_annotation_finalize (GObject *object)
 
static void ev_annotation_init (EvAnnotation *annot)
 
static void ev_annotation_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
 
static void ev_annotation_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
 
static void ev_annotation_class_init (EvAnnotationClass *klass)
 
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)
 
static void ev_annotation_markup_props_free (EvAnnotationMarkupProps *props)
 
static EvAnnotationMarkupPropsev_annotation_markup_get_properties (EvAnnotationMarkup *markup)
 
static void ev_annotation_markup_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
 
static void ev_annotation_markup_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
 
static void ev_annotation_markup_class_install_properties (GObjectClass *klass)
 
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)
 
static void ev_annotation_text_init (EvAnnotationText *annot)
 
static void ev_annotation_text_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
 
static void ev_annotation_text_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
 
static void ev_annotation_text_class_init (EvAnnotationTextClass *klass)
 
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)
 
static void ev_annotation_attachment_finalize (GObject *object)
 
static void ev_annotation_attachment_init (EvAnnotationAttachment *annot)
 
static void ev_annotation_attachment_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
 
static void ev_annotation_attachment_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
 
static void ev_annotation_attachment_class_init (EvAnnotationAttachmentClass *klass)
 
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)
 
static void ev_annotation_text_markup_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
 
static void ev_annotation_text_markup_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
 
static void ev_annotation_text_markup_init (EvAnnotationTextMarkup *annot)
 
static void ev_annotation_text_markup_class_init (EvAnnotationTextMarkupClass *class)
 
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)
 

Enumeration Type Documentation

anonymous enum
Enumerator
PROP_ANNOT_0 
PROP_ANNOT_PAGE 
PROP_ANNOT_CONTENTS 
PROP_ANNOT_NAME 
PROP_ANNOT_MODIFIED 
PROP_ANNOT_COLOR 
PROP_ANNOT_RGBA 
PROP_ANNOT_AREA 

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

anonymous enum
Enumerator
PROP_MARKUP_0 
PROP_MARKUP_LABEL 
PROP_MARKUP_OPACITY 
PROP_MARKUP_CAN_HAVE_POPUP 
PROP_MARKUP_HAS_POPUP 
PROP_MARKUP_RECTANGLE 
PROP_MARKUP_POPUP_IS_OPEN 

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

anonymous enum
Enumerator
PROP_TEXT_ICON 
PROP_TEXT_IS_OPEN 

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

109  {
112 };
anonymous enum
Enumerator
PROP_ATTACHMENT_ATTACHMENT 

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

anonymous enum
Enumerator
PROP_TEXT_MARKUP_TYPE 

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

120  {
122 };

Function Documentation

static void ev_annotation_attachment_class_init ( EvAnnotationAttachmentClass klass)
static

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

1297 {
1298  GObjectClass *g_object_class = G_OBJECT_CLASS (klass);
1299 
1301 
1302  g_object_class->set_property = ev_annotation_attachment_set_property;
1303  g_object_class->get_property = ev_annotation_attachment_get_property;
1304  g_object_class->finalize = ev_annotation_attachment_finalize;
1305 
1306  g_object_class_install_property (g_object_class,
1308  g_param_spec_object ("attachment",
1309  "Attachment",
1310  "The attachment of the annotation",
1312  G_PARAM_CONSTRUCT |
1313  G_PARAM_READWRITE |
1314  G_PARAM_STATIC_STRINGS));
1315 }
static void ev_annotation_attachment_finalize ( GObject *  object)
static

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

1234 {
1236 
1237  if (annot->attachment) {
1238  g_object_unref (annot->attachment);
1239  annot->attachment = NULL;
1240  }
1241 
1242  G_OBJECT_CLASS (ev_annotation_attachment_parent_class)->finalize (object);
1243 }

+ Here is the caller graph for this function:

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:

static void ev_annotation_attachment_get_property ( GObject *  object,
guint  prop_id,
GValue *  value,
GParamSpec *  pspec 
)
static

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

1278 {
1280 
1281  if (prop_id < PROP_ATTACHMENT_ATTACHMENT) {
1282  ev_annotation_markup_get_property (object, prop_id, value, pspec);
1283  return;
1284  }
1285 
1286  switch (prop_id) {
1288  g_value_set_object (value, annot->attachment);
1289  break;
1290  default:
1291  G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
1292  }
1293 }

+ Here is the caller graph for this function:

static void ev_annotation_attachment_init ( EvAnnotationAttachment annot)
static

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

1247 {
1249 }
static void ev_annotation_attachment_markup_iface_init ( EvAnnotationMarkupInterface iface)
static

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

1319 {
1320 }
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:

static void ev_annotation_attachment_set_property ( GObject *  object,
guint  prop_id,
const GValue *  value,
GParamSpec *  pspec 
)
static

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

1256 {
1258 
1259  if (prop_id < PROP_ATTACHMENT_ATTACHMENT) {
1260  ev_annotation_markup_set_property (object, prop_id, value, pspec);
1261  return;
1262  }
1263 
1264  switch (prop_id) {
1266  ev_annotation_attachment_set_attachment (annot, g_value_get_object (value));
1267  break;
1268  default:
1269  G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
1270  }
1271 }

+ Here is the caller graph for this function:

static void ev_annotation_class_init ( EvAnnotationClass klass)
static

EvAnnotation:color:

The colour of the annotation as a #GdkColor.

Deprecated: 3.6: Use EvAnnotation:rgba instead.

EvAnnotation:rgba:

The colour of the annotation as a #GdkRGBA.

Since: 3.6

EvAnnotation:area:

The area of the page where the annotation is placed.

Since 3.18

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

254 {
255  GObjectClass *g_object_class = G_OBJECT_CLASS (klass);
256 
257  g_object_class->finalize = ev_annotation_finalize;
258  g_object_class->set_property = ev_annotation_set_property;
259  g_object_class->get_property = ev_annotation_get_property;
260 
261  g_object_class_install_property (g_object_class,
263  g_param_spec_object ("page",
264  "Page",
265  "The page wehere the annotation is",
266  EV_TYPE_PAGE,
267  G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY |
268  G_PARAM_STATIC_STRINGS));
269  g_object_class_install_property (g_object_class,
271  g_param_spec_string ("contents",
272  "Contents",
273  "The annotation contents",
274  NULL,
275  G_PARAM_READWRITE |
276  G_PARAM_STATIC_STRINGS));
277  g_object_class_install_property (g_object_class,
279  g_param_spec_string ("name",
280  "Name",
281  "The annotation unique name",
282  NULL,
283  G_PARAM_READWRITE |
284  G_PARAM_STATIC_STRINGS));
285  g_object_class_install_property (g_object_class,
287  g_param_spec_string ("modified",
288  "Modified",
289  "Last modified date as string",
290  NULL,
291  G_PARAM_READWRITE |
292  G_PARAM_STATIC_STRINGS));
300  g_object_class_install_property (g_object_class,
302  g_param_spec_pointer ("color",
303  "Color",
304  "The annotation color",
305  G_PARAM_READWRITE |
306  G_PARAM_STATIC_STRINGS));
307 
315  g_object_class_install_property (g_object_class,
317  g_param_spec_boxed ("rgba", NULL, NULL,
318  GDK_TYPE_RGBA,
319  G_PARAM_READWRITE |
320  G_PARAM_STATIC_STRINGS));
321 
329  g_object_class_install_property (g_object_class,
331  g_param_spec_boxed ("area",
332  "Area",
333  "The area of the page where the annotation is placed",
335  G_PARAM_READWRITE |
336  G_PARAM_STATIC_STRINGS));
337 }
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:

static void ev_annotation_finalize ( GObject *  object)
static

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

145 {
146  EvAnnotation *annot = EV_ANNOTATION (object);
147 
148  if (annot->page) {
149  g_object_unref (annot->page);
150  annot->page = NULL;
151  }
152 
153  if (annot->contents) {
154  g_free (annot->contents);
155  annot->contents = NULL;
156  }
157 
158  if (annot->name) {
159  g_free (annot->name);
160  annot->name = NULL;
161  }
162 
163  if (annot->modified) {
164  g_free (annot->modified);
165  annot->modified = NULL;
166  }
167 
168  G_OBJECT_CLASS (ev_annotation_parent_class)->finalize (object);
169 }

+ 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:

static void ev_annotation_get_property ( GObject *  object,
guint  prop_id,
GValue *  value,
GParamSpec *  pspec 
)
static

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

221 {
222  EvAnnotation *annot = EV_ANNOTATION (object);
223 
224  switch (prop_id) {
225  case PROP_ANNOT_CONTENTS:
226  g_value_set_string (value, ev_annotation_get_contents (annot));
227  break;
228  case PROP_ANNOT_NAME:
229  g_value_set_string (value, ev_annotation_get_name (annot));
230  break;
231  case PROP_ANNOT_MODIFIED:
232  g_value_set_string (value, ev_annotation_get_modified (annot));
233  break;
234  case PROP_ANNOT_COLOR: {
235  GdkColor color;
236 
237  ev_annotation_get_color (annot, &color);
238  g_value_set_pointer (value, &color);
239  break;
240  }
241  case PROP_ANNOT_RGBA:
242  g_value_set_boxed (value, &annot->rgba);
243  break;
244  case PROP_ANNOT_AREA:
245  g_value_set_boxed (value, &annot->area);
246  break;
247  default:
248  G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
249  }
250 }

+ 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:

static void ev_annotation_init ( EvAnnotation annot)
static

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

173 {
175  annot->area.x1 = -1;
176  annot->area.y1 = -1;
177  annot->area.x2 = -1;
178  annot->area.y2 = -1;
179 }
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:

static void ev_annotation_markup_class_install_properties ( GObjectClass *  klass)
static

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

902 {
903  klass->set_property = ev_annotation_markup_set_property;
904  klass->get_property = ev_annotation_markup_get_property;
905 
906  g_object_class_override_property (klass, PROP_MARKUP_LABEL, "label");
907  g_object_class_override_property (klass, PROP_MARKUP_OPACITY, "opacity");
908  g_object_class_override_property (klass, PROP_MARKUP_CAN_HAVE_POPUP, "can-have-popup");
909  g_object_class_override_property (klass, PROP_MARKUP_HAS_POPUP, "has-popup");
910  g_object_class_override_property (klass, PROP_MARKUP_RECTANGLE, "rectangle");
911  g_object_class_override_property (klass, PROP_MARKUP_POPUP_IS_OPEN, "popup-is-open");
912 }

+ Here is the caller graph for this function:

static void ev_annotation_markup_default_init ( EvAnnotationMarkupInterface iface)
static

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

747 {
748  static gboolean initialized = FALSE;
749 
750  if (!initialized) {
751  g_object_interface_install_property (iface,
752  g_param_spec_string ("label",
753  "Label",
754  "Label of the markup annotation",
755  NULL,
756  G_PARAM_READWRITE |
757  G_PARAM_STATIC_STRINGS));
758  g_object_interface_install_property (iface,
759  g_param_spec_double ("opacity",
760  "Opacity",
761  "Opacity of the markup annotation",
762  0,
763  G_MAXDOUBLE,
764  1.,
765  G_PARAM_READWRITE |
766  G_PARAM_STATIC_STRINGS));
767  g_object_interface_install_property (iface,
768  g_param_spec_boolean ("can-have-popup",
769  "Can have popup",
770  "Whether it is allowed to have a popup "
771  "window for this type of markup annotation",
772  FALSE,
773  G_PARAM_READWRITE |
774  G_PARAM_STATIC_STRINGS));
775  g_object_interface_install_property (iface,
776  g_param_spec_boolean ("has-popup",
777  "Has popup",
778  "Whether the markup annotation has "
779  "a popup window associated",
780  TRUE,
781  G_PARAM_READWRITE |
782  G_PARAM_STATIC_STRINGS));
783  g_object_interface_install_property (iface,
784  g_param_spec_boxed ("rectangle",
785  "Rectangle",
786  "The Rectangle of the popup associated "
787  "to the markup annotation",
789  G_PARAM_READWRITE |
790  G_PARAM_STATIC_STRINGS));
791  g_object_interface_install_property (iface,
792  g_param_spec_boolean ("popup-is-open",
793  "PopupIsOpen",
794  "Whether the popup associated to "
795  "the markup annotation is open",
796  FALSE,
797  G_PARAM_READWRITE |
798  G_PARAM_STATIC_STRINGS));
799  initialized = TRUE;
800  }
801 }
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:

static EvAnnotationMarkupProps* ev_annotation_markup_get_properties ( EvAnnotationMarkup markup)
static

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

812 {
814  static GQuark props_key = 0;
815 
816  if (!props_key)
817  props_key = g_quark_from_static_string ("ev-annotation-markup-props");
818 
819  props = g_object_get_qdata (G_OBJECT (markup), props_key);
820  if (!props) {
821  props = g_slice_new0 (EvAnnotationMarkupProps);
822  g_object_set_qdata_full (G_OBJECT (markup),
823  props_key, props,
824  (GDestroyNotify) ev_annotation_markup_props_free);
825  }
826 
827  return props;
828 }

+ Here is the caller graph for this function:

static void ev_annotation_markup_get_property ( GObject *  object,
guint  prop_id,
GValue *  value,
GParamSpec *  pspec 
)
static

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

871 {
873 
875 
876  switch (prop_id) {
877  case PROP_MARKUP_LABEL:
878  g_value_set_string (value, props->label);
879  break;
880  case PROP_MARKUP_OPACITY:
881  g_value_set_double (value, props->opacity);
882  break;
884  g_value_set_boolean (value, props->can_have_popup);
885  break;
887  g_value_set_boolean (value, props->has_popup);
888  break;
890  g_value_set_boxed (value, &props->rectangle);
891  break;
893  g_value_set_boolean (value, props->popup_is_open);
894  break;
895  default:
896  G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
897  }
898 }

+ 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:

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:

static void ev_annotation_markup_props_free ( EvAnnotationMarkupProps props)
static

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

805 {
806  g_free (props->label);
807  g_slice_free (EvAnnotationMarkupProps, props);
808 }

+ 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:

static void ev_annotation_markup_set_property ( GObject *  object,
guint  prop_id,
const GValue *  value,
GParamSpec *  pspec 
)
static

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

835 {
836  EvAnnotationMarkup *markup = EV_ANNOTATION_MARKUP (object);
837 
838  switch (prop_id) {
839  case PROP_MARKUP_LABEL:
840  ev_annotation_markup_set_label (markup, g_value_get_string (value));
841  break;
842  case PROP_MARKUP_OPACITY:
843  ev_annotation_markup_set_opacity (markup, g_value_get_double (value));
844  break;
847 
848  props = ev_annotation_markup_get_properties (markup);
849  props->can_have_popup = g_value_get_boolean (value);
850  break;
851  }
853  ev_annotation_markup_set_has_popup (markup, g_value_get_boolean (value));
854  break;
856  ev_annotation_markup_set_rectangle (markup, g_value_get_boxed (value));
857  break;
859  ev_annotation_markup_set_popup_is_open (markup, g_value_get_boolean (value));
860  break;
861  default:
862  G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
863  }
864 }

+ 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:

static void ev_annotation_set_property ( GObject *  object,
guint  prop_id,
const GValue *  value,
GParamSpec *  pspec 
)
static

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

186 {
187  EvAnnotation *annot = EV_ANNOTATION (object);
188 
189  switch (prop_id) {
190  case PROP_ANNOT_PAGE:
191  annot->page = g_value_dup_object (value);
192  break;
193  case PROP_ANNOT_CONTENTS:
194  ev_annotation_set_contents (annot, g_value_get_string (value));
195  break;
196  case PROP_ANNOT_NAME:
197  ev_annotation_set_name (annot, g_value_get_string (value));
198  break;
199  case PROP_ANNOT_MODIFIED:
200  ev_annotation_set_modified (annot, g_value_get_string (value));
201  break;
202  case PROP_ANNOT_COLOR:
203  ev_annotation_set_color (annot, g_value_get_pointer (value));
204  break;
205  case PROP_ANNOT_RGBA:
206  ev_annotation_set_rgba (annot, g_value_get_boxed (value));
207  break;
208  case PROP_ANNOT_AREA:
209  ev_annotation_set_area (annot, g_value_get_boxed (value));
210  break;
211  default:
212  G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
213  }
214 }

+ 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:

static void ev_annotation_text_class_init ( EvAnnotationTextClass klass)
static

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

1143 {
1144  GObjectClass *g_object_class = G_OBJECT_CLASS (klass);
1145 
1147 
1148  g_object_class->set_property = ev_annotation_text_set_property;
1149  g_object_class->get_property = ev_annotation_text_get_property;
1150 
1151  g_object_class_install_property (g_object_class,
1153  g_param_spec_enum ("icon",
1154  "Icon",
1155  "The icon fo the text annotation",
1156  EV_TYPE_ANNOTATION_TEXT_ICON,
1158  G_PARAM_READWRITE |
1159  G_PARAM_STATIC_STRINGS));
1160  g_object_class_install_property (g_object_class,
1162  g_param_spec_boolean ("is-open",
1163  "IsOpen",
1164  "Whether text annot is initially open",
1165  FALSE,
1166  G_PARAM_READWRITE |
1167  G_PARAM_STATIC_STRINGS));
1168 }
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:

static void ev_annotation_text_get_property ( GObject *  object,
guint  prop_id,
GValue *  value,
GParamSpec *  pspec 
)
static

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

1121 {
1122  EvAnnotationText *annot = EV_ANNOTATION_TEXT (object);
1123 
1124  if (prop_id < PROP_ATTACHMENT_ATTACHMENT) {
1125  ev_annotation_markup_get_property (object, prop_id, value, pspec);
1126  return;
1127  }
1128 
1129  switch (prop_id) {
1130  case PROP_TEXT_ICON:
1131  g_value_set_enum (value, annot->icon);
1132  break;
1133  case PROP_TEXT_IS_OPEN:
1134  g_value_set_boolean (value, annot->is_open);
1135  break;
1136  default:
1137  G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
1138  }
1139 }

+ Here is the caller graph for this function:

static void ev_annotation_text_init ( EvAnnotationText annot)
static

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

1087 {
1088  EV_ANNOTATION (annot)->type = EV_ANNOTATION_TYPE_TEXT;
1089 }
static void ev_annotation_text_markup_class_init ( EvAnnotationTextMarkupClass class)
static

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

1419 {
1420  GObjectClass *g_object_class = G_OBJECT_CLASS (class);
1421 
1423 
1424  g_object_class->get_property = ev_annotation_text_markup_get_property;
1425  g_object_class->set_property = ev_annotation_text_markup_set_property;
1426 
1427  g_object_class_install_property (g_object_class,
1429  g_param_spec_enum ("type",
1430  "Type",
1431  "The text markup annotation type",
1432  EV_TYPE_ANNOTATION_TEXT_MARKUP_TYPE,
1434  G_PARAM_READWRITE |
1435  G_PARAM_CONSTRUCT |
1436  G_PARAM_STATIC_STRINGS));
1437 }
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:

static void ev_annotation_text_markup_get_property ( GObject *  object,
guint  prop_id,
GValue *  value,
GParamSpec *  pspec 
)
static

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

1372 {
1374 
1375  if (prop_id < PROP_TEXT_MARKUP_TYPE) {
1376  ev_annotation_markup_get_property (object, prop_id, value, pspec);
1377  return;
1378  }
1379 
1380  switch (prop_id) {
1381  case PROP_TEXT_MARKUP_TYPE:
1382  g_value_set_enum (value, annot->type);
1383  break;
1384  default:
1385  G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
1386  }
1387 }

+ Here is the caller graph for this function:

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:

static void ev_annotation_text_markup_iface_init ( EvAnnotationMarkupInterface iface)
static

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

1172 {
1173 }
static void ev_annotation_text_markup_init ( EvAnnotationTextMarkup annot)
static

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

1413 {
1415 }
static void ev_annotation_text_markup_markup_iface_init ( EvAnnotationMarkupInterface iface)
static

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

1441 {
1442 }
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:

static void ev_annotation_text_markup_set_property ( GObject *  object,
guint  prop_id,
const GValue *  value,
GParamSpec *  pspec 
)
static

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

1394 {
1396 
1397  if (prop_id < PROP_TEXT_MARKUP_TYPE) {
1398  ev_annotation_markup_set_property (object, prop_id, value, pspec);
1399  return;
1400  }
1401 
1402  switch (prop_id) {
1403  case PROP_TEXT_MARKUP_TYPE:
1404  annot->type = g_value_get_enum (value);
1405  break;
1406  default:
1407  G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
1408  }
1409 }

+ 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:

static void ev_annotation_text_set_property ( GObject *  object,
guint  prop_id,
const GValue *  value,
GParamSpec *  pspec 
)
static

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

1096 {
1097  EvAnnotationText *annot = EV_ANNOTATION_TEXT (object);
1098 
1099  if (prop_id < PROP_ATTACHMENT_ATTACHMENT) {
1100  ev_annotation_markup_set_property (object, prop_id, value, pspec);
1101  return;
1102  }
1103 
1104  switch (prop_id) {
1105  case PROP_TEXT_ICON:
1106  ev_annotation_text_set_icon (annot, g_value_get_enum (value));
1107  break;
1108  case PROP_TEXT_IS_OPEN:
1109  ev_annotation_text_set_is_open (annot, g_value_get_boolean (value));
1110  break;
1111  default:
1112  G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
1113  }
1114 }

+ Here is the caller graph for this function:

G_DEFINE_TYPE_WITH_CODE ( EvAnnotationText  ,
ev_annotation_text  ,
EV_TYPE_ANNOTATION  ,
{G_IMPLEMENT_INTERFACE(EV_TYPE_ANNOTATION_MARKUP, ev_annotation_text_markup_iface_init);}   
)
G_DEFINE_TYPE_WITH_CODE ( EvAnnotationAttachment  ,
ev_annotation_attachment  ,
EV_TYPE_ANNOTATION  ,
{G_IMPLEMENT_INTERFACE(EV_TYPE_ANNOTATION_MARKUP, ev_annotation_attachment_markup_iface_init);}   
)
G_DEFINE_TYPE_WITH_CODE ( EvAnnotationTextMarkup  ,
ev_annotation_text_markup  ,
EV_TYPE_ANNOTATION  ,
{G_IMPLEMENT_INTERFACE(EV_TYPE_ANNOTATION_MARKUP, ev_annotation_text_markup_markup_iface_init);}   
)