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-link-dest.h File Reference
#include <glib-object.h>
+ Include dependency graph for ev-link-dest.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define EV_TYPE_LINK_DEST   (ev_link_dest_get_type())
 
#define EV_LINK_DEST(object)   (G_TYPE_CHECK_INSTANCE_CAST((object), EV_TYPE_LINK_DEST, EvLinkDest))
 
#define EV_LINK_DEST_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST((klass), EV_TYPE_LINK_DEST, EvLinkDestClass))
 
#define EV_IS_LINK_DEST(object)   (G_TYPE_CHECK_INSTANCE_TYPE((object), EV_TYPE_LINK_DEST))
 
#define EV_IS_LINK_DEST_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE((klass), EV_TYPE_LINK_DEST))
 
#define EV_LINK_DEST_GET_CLASS(object)   (G_TYPE_INSTANCE_GET_CLASS((object), EV_TYPE_LINK_DEST, EvLinkDestClass))
 

Typedefs

typedef typedefG_BEGIN_DECLS
struct _EvLinkDest 
EvLinkDest
 
typedef struct _EvLinkDestClass EvLinkDestClass
 
typedef struct _EvLinkDestPrivate EvLinkDestPrivate
 

Enumerations

enum  EvLinkDestType {
  EV_LINK_DEST_TYPE_PAGE, EV_LINK_DEST_TYPE_XYZ, EV_LINK_DEST_TYPE_FIT, EV_LINK_DEST_TYPE_FITH,
  EV_LINK_DEST_TYPE_FITV, EV_LINK_DEST_TYPE_FITR, EV_LINK_DEST_TYPE_NAMED, EV_LINK_DEST_TYPE_PAGE_LABEL,
  EV_LINK_DEST_TYPE_UNKNOWN
}
 

Functions

GType ev_link_dest_get_type (void) G_GNUC_CONST
 
EvLinkDestType ev_link_dest_get_dest_type (EvLinkDest *self)
 
gint ev_link_dest_get_page (EvLinkDest *self)
 
gdouble ev_link_dest_get_top (EvLinkDest *self, gboolean *change_top)
 
gdouble ev_link_dest_get_left (EvLinkDest *self, gboolean *change_left)
 
gdouble ev_link_dest_get_bottom (EvLinkDest *self)
 
gdouble ev_link_dest_get_right (EvLinkDest *self)
 
gdouble ev_link_dest_get_zoom (EvLinkDest *self, gboolean *change_zoom)
 
const gchar * ev_link_dest_get_named_dest (EvLinkDest *self)
 
const gchar * ev_link_dest_get_page_label (EvLinkDest *self)
 
EvLinkDestev_link_dest_new_page (gint page)
 
EvLinkDestev_link_dest_new_xyz (gint page, gdouble left, gdouble top, gdouble zoom, gboolean change_left, gboolean change_top, gboolean change_zoom)
 
EvLinkDestev_link_dest_new_fit (gint page)
 
EvLinkDestev_link_dest_new_fith (gint page, gdouble top, gboolean change_top)
 
EvLinkDestev_link_dest_new_fitv (gint page, gdouble left, gboolean change_left)
 
EvLinkDestev_link_dest_new_fitr (gint page, gdouble left, gdouble bottom, gdouble right, gdouble top)
 
EvLinkDestev_link_dest_new_named (const gchar *named_dest)
 
EvLinkDestev_link_dest_new_page_label (const gchar *page_label)
 
gboolean ev_link_dest_equal (EvLinkDest *a, EvLinkDest *b)
 

Macro Definition Documentation

#define EV_IS_LINK_DEST (   object)    (G_TYPE_CHECK_INSTANCE_TYPE((object), EV_TYPE_LINK_DEST))

Definition at line 39 of file ev-link-dest.h.

#define EV_IS_LINK_DEST_CLASS (   klass)    (G_TYPE_CHECK_CLASS_TYPE((klass), EV_TYPE_LINK_DEST))

Definition at line 40 of file ev-link-dest.h.

#define EV_LINK_DEST (   object)    (G_TYPE_CHECK_INSTANCE_CAST((object), EV_TYPE_LINK_DEST, EvLinkDest))

Definition at line 37 of file ev-link-dest.h.

#define EV_LINK_DEST_CLASS (   klass)    (G_TYPE_CHECK_CLASS_CAST((klass), EV_TYPE_LINK_DEST, EvLinkDestClass))

Definition at line 38 of file ev-link-dest.h.

#define EV_LINK_DEST_GET_CLASS (   object)    (G_TYPE_INSTANCE_GET_CLASS((object), EV_TYPE_LINK_DEST, EvLinkDestClass))

Definition at line 41 of file ev-link-dest.h.

#define EV_TYPE_LINK_DEST   (ev_link_dest_get_type())

Definition at line 36 of file ev-link-dest.h.

Typedef Documentation

typedef typedefG_BEGIN_DECLS struct _EvLinkDest EvLinkDest

Definition at line 32 of file ev-link-dest.h.

Definition at line 33 of file ev-link-dest.h.

Definition at line 34 of file ev-link-dest.h.

Enumeration Type Documentation

Enumerator
EV_LINK_DEST_TYPE_PAGE 
EV_LINK_DEST_TYPE_XYZ 
EV_LINK_DEST_TYPE_FIT 
EV_LINK_DEST_TYPE_FITH 
EV_LINK_DEST_TYPE_FITV 
EV_LINK_DEST_TYPE_FITR 
EV_LINK_DEST_TYPE_NAMED 
EV_LINK_DEST_TYPE_PAGE_LABEL 
EV_LINK_DEST_TYPE_UNKNOWN 

Definition at line 43 of file ev-link-dest.h.

Function Documentation

gboolean ev_link_dest_equal ( EvLinkDest a,
EvLinkDest b 
)

ev_link_dest_equal: : a EvLinkDest : a EvLinkDest

Checks whether and are equal.

Returns: TRUE iff and are equal

Since: 3.8

Definition at line 535 of file ev-link-dest.c.

537 {
538  g_return_val_if_fail (EV_IS_LINK_DEST (a), FALSE);
539  g_return_val_if_fail (EV_IS_LINK_DEST (b), FALSE);
540 
541  if (a == b)
542  return TRUE;
543 
544  if (a->priv->type != b->priv->type)
545  return FALSE;
546 
547  switch (a->priv->type) {
549  return a->priv->page == b->priv->page;
550 
552  return a->priv->page == b->priv->page &&
553  a->priv->left == b->priv->left &&
554  a->priv->top == b->priv->top &&
555  a->priv->zoom == b->priv->zoom &&
556  a->priv->change == b->priv->change;
557 
559  return a->priv->page == b->priv->page;
560 
562  return a->priv->page == b->priv->page &&
563  a->priv->top == b->priv->top &&
564  a->priv->change == b->priv->change;
565 
567  return a->priv->page == b->priv->page &&
568  a->priv->left == b->priv->left &&
569  a->priv->change == b->priv->change;
570 
572  return a->priv->page == b->priv->page &&
573  a->priv->left == b->priv->left &&
574  a->priv->top == b->priv->top &&
575  a->priv->right == b->priv->right &&
576  a->priv->bottom == b->priv->bottom &&
577  a->priv->change == b->priv->change;
578 
580  return !g_strcmp0 (a->priv->named, b->priv->named);
581 
583  return !g_strcmp0 (a->priv->page_label, b->priv->page_label);
584 
585  default:
586  return FALSE;
587  }
588 
589  return FALSE;
590 }

+ Here is the caller graph for this function:

gdouble ev_link_dest_get_bottom ( EvLinkDest self)

Definition at line 115 of file ev-link-dest.c.

116 {
117  g_return_val_if_fail (EV_IS_LINK_DEST (self), 0);
118 
119  return self->priv->bottom;
120 }

+ Here is the caller graph for this function:

EvLinkDestType ev_link_dest_get_dest_type ( EvLinkDest self)

Definition at line 75 of file ev-link-dest.c.

76 {
77  g_return_val_if_fail (EV_IS_LINK_DEST (self), 0);
78 
79  return self->priv->type;
80 }

+ Here is the caller graph for this function:

gdouble ev_link_dest_get_left ( EvLinkDest self,
gboolean *  change_left 
)

Definition at line 103 of file ev-link-dest.c.

105 {
106  g_return_val_if_fail (EV_IS_LINK_DEST (self), 0);
107 
108  if (change_left)
109  *change_left = (self->priv->change & EV_DEST_CHANGE_LEFT);
110 
111  return self->priv->left;
112 }

+ Here is the caller graph for this function:

const gchar* ev_link_dest_get_named_dest ( EvLinkDest self)

Definition at line 143 of file ev-link-dest.c.

144 {
145  g_return_val_if_fail (EV_IS_LINK_DEST (self), NULL);
146 
147  return self->priv->named;
148 }

+ Here is the caller graph for this function:

gint ev_link_dest_get_page ( EvLinkDest self)

Definition at line 83 of file ev-link-dest.c.

84 {
85  g_return_val_if_fail (EV_IS_LINK_DEST (self), -1);
86 
87  return self->priv->page;
88 }

+ Here is the caller graph for this function:

const gchar* ev_link_dest_get_page_label ( EvLinkDest self)

Definition at line 151 of file ev-link-dest.c.

152 {
153  g_return_val_if_fail (EV_IS_LINK_DEST (self), NULL);
154 
155  return self->priv->page_label;
156 }

+ Here is the caller graph for this function:

gdouble ev_link_dest_get_right ( EvLinkDest self)

Definition at line 123 of file ev-link-dest.c.

124 {
125  g_return_val_if_fail (EV_IS_LINK_DEST (self), 0);
126 
127  return self->priv->right;
128 }

+ Here is the caller graph for this function:

gdouble ev_link_dest_get_top ( EvLinkDest self,
gboolean *  change_top 
)

Definition at line 91 of file ev-link-dest.c.

93 {
94  g_return_val_if_fail (EV_IS_LINK_DEST (self), 0);
95 
96  if (change_top)
97  *change_top = (self->priv->change & EV_DEST_CHANGE_TOP);
98 
99  return self->priv->top;
100 }

+ Here is the caller graph for this function:

GType ev_link_dest_get_type ( void  )
gdouble ev_link_dest_get_zoom ( EvLinkDest self,
gboolean *  change_zoom 
)

Definition at line 131 of file ev-link-dest.c.

133 {
134  g_return_val_if_fail (EV_IS_LINK_DEST (self), 0);
135 
136  if (change_zoom)
137  *change_zoom = (self->priv->change & EV_DEST_CHANGE_ZOOM);
138 
139  return self->priv->zoom;
140 }

+ Here is the caller graph for this function:

EvLinkDest* ev_link_dest_new_fit ( gint  page)

Definition at line 441 of file ev-link-dest.c.

442 {
443  return EV_LINK_DEST (g_object_new (EV_TYPE_LINK_DEST,
444  "page", page,
445  "type", EV_LINK_DEST_TYPE_FIT,
446  NULL));
447 }

+ Here is the caller graph for this function:

EvLinkDest* ev_link_dest_new_fith ( gint  page,
gdouble  top,
gboolean  change_top 
)

Definition at line 450 of file ev-link-dest.c.

453 {
454  EvDestChange change = 0;
455 
456  if (change_top)
457  change |= EV_DEST_CHANGE_TOP;
458 
459  return EV_LINK_DEST (g_object_new (EV_TYPE_LINK_DEST,
460  "page", page,
461  "type", EV_LINK_DEST_TYPE_FITH,
462  "top", top,
463  "change", change,
464  NULL));
465 }

+ Here is the caller graph for this function:

EvLinkDest* ev_link_dest_new_fitr ( gint  page,
gdouble  left,
gdouble  bottom,
gdouble  right,
gdouble  top 
)

Definition at line 486 of file ev-link-dest.c.

491 {
493 
494  return EV_LINK_DEST (g_object_new (EV_TYPE_LINK_DEST,
495  "page", page,
496  "type", EV_LINK_DEST_TYPE_FITR,
497  "left", left,
498  "bottom", bottom,
499  "right", right,
500  "top", top,
501  "change", change,
502  NULL));
503 }

+ Here is the caller graph for this function:

EvLinkDest* ev_link_dest_new_fitv ( gint  page,
gdouble  left,
gboolean  change_left 
)

Definition at line 468 of file ev-link-dest.c.

471 {
472  EvDestChange change = 0;
473 
474  if (change_left)
475  change |= EV_DEST_CHANGE_LEFT;
476 
477  return EV_LINK_DEST (g_object_new (EV_TYPE_LINK_DEST,
478  "page", page,
479  "type", EV_LINK_DEST_TYPE_FITV,
480  "left", left,
481  "change", change,
482  NULL));
483 }

+ Here is the caller graph for this function:

EvLinkDest* ev_link_dest_new_named ( const gchar *  named_dest)

Definition at line 506 of file ev-link-dest.c.

507 {
508  return EV_LINK_DEST (g_object_new (EV_TYPE_LINK_DEST,
509  "named", named_dest,
510  "type", EV_LINK_DEST_TYPE_NAMED,
511  NULL));
512 }

+ Here is the caller graph for this function:

EvLinkDest* ev_link_dest_new_page ( gint  page)

Definition at line 404 of file ev-link-dest.c.

405 {
406  return EV_LINK_DEST (g_object_new (EV_TYPE_LINK_DEST,
407  "page", page,
408  "type", EV_LINK_DEST_TYPE_PAGE,
409  NULL));
410 }

+ Here is the caller graph for this function:

EvLinkDest* ev_link_dest_new_page_label ( const gchar *  page_label)

Definition at line 515 of file ev-link-dest.c.

516 {
517  return EV_LINK_DEST (g_object_new (EV_TYPE_LINK_DEST,
518  "page_label", page_label,
520  NULL));
521 }

+ Here is the caller graph for this function:

EvLinkDest* ev_link_dest_new_xyz ( gint  page,
gdouble  left,
gdouble  top,
gdouble  zoom,
gboolean  change_left,
gboolean  change_top,
gboolean  change_zoom 
)

Definition at line 413 of file ev-link-dest.c.

420 {
421  EvDestChange change = 0;
422 
423  if (change_left)
424  change |= EV_DEST_CHANGE_LEFT;
425  if (change_top)
426  change |= EV_DEST_CHANGE_TOP;
427  if (change_zoom)
428  change |= EV_DEST_CHANGE_ZOOM;
429 
430  return EV_LINK_DEST (g_object_new (EV_TYPE_LINK_DEST,
431  "page", page,
432  "type", EV_LINK_DEST_TYPE_XYZ,
433  "left", left,
434  "top", top,
435  "zoom", zoom,
436  "change", change,
437  NULL));
438 }

+ Here is the caller graph for this function: