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-view-presentation.h File Reference
#include <gtk/gtk.h>
#include <evince-document.h>
+ Include dependency graph for ev-view-presentation.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define EV_TYPE_VIEW_PRESENTATION   (ev_view_presentation_get_type ())
 
#define EV_VIEW_PRESENTATION(obj)   (G_TYPE_CHECK_INSTANCE_CAST ((obj), EV_TYPE_VIEW_PRESENTATION, EvViewPresentation))
 
#define EV_IS_VIEW_PRESENTATION(obj)   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EV_TYPE_VIEW_PRESENTATION))
 
#define EV_VIEW_PRESENTATION_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST ((klass), EV_TYPE_VIEW_PRESENTATION, EvViewPresentationClass))
 
#define EV_IS_VIEW_PRESENTATION_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), EV_TYPE_VIEW_PRESENTATION))
 
#define EV_VIEW_PRESENTATION_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), EV_TYPE_VIEW_PRESENTATION, EvViewPresentationClass))
 

Typedefs

typedef struct _EvViewPresentation EvViewPresentation
 
typedef struct
_EvViewPresentationClass 
EvViewPresentationClass
 

Functions

GType ev_view_presentation_get_type (void) G_GNUC_CONST
 
GtkWidget * ev_view_presentation_new (EvDocument *document, guint current_page, guint rotation, gboolean inverted_colors)
 
guint ev_view_presentation_get_current_page (EvViewPresentation *pview)
 
void ev_view_presentation_next_page (EvViewPresentation *pview)
 
void ev_view_presentation_previous_page (EvViewPresentation *pview)
 
void ev_view_presentation_set_rotation (EvViewPresentation *pview, gint rotation)
 
guint ev_view_presentation_get_rotation (EvViewPresentation *pview)
 

Macro Definition Documentation

#define EV_IS_VIEW_PRESENTATION (   obj)    (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EV_TYPE_VIEW_PRESENTATION))

Definition at line 36 of file ev-view-presentation.h.

#define EV_IS_VIEW_PRESENTATION_CLASS (   klass)    (G_TYPE_CHECK_CLASS_TYPE ((klass), EV_TYPE_VIEW_PRESENTATION))

Definition at line 38 of file ev-view-presentation.h.

#define EV_TYPE_VIEW_PRESENTATION   (ev_view_presentation_get_type ())

Definition at line 34 of file ev-view-presentation.h.

#define EV_VIEW_PRESENTATION (   obj)    (G_TYPE_CHECK_INSTANCE_CAST ((obj), EV_TYPE_VIEW_PRESENTATION, EvViewPresentation))

Definition at line 35 of file ev-view-presentation.h.

#define EV_VIEW_PRESENTATION_CLASS (   klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), EV_TYPE_VIEW_PRESENTATION, EvViewPresentationClass))

Definition at line 37 of file ev-view-presentation.h.

#define EV_VIEW_PRESENTATION_GET_CLASS (   obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), EV_TYPE_VIEW_PRESENTATION, EvViewPresentationClass))

Definition at line 39 of file ev-view-presentation.h.

Typedef Documentation

Definition at line 41 of file ev-view-presentation.h.

Definition at line 42 of file ev-view-presentation.h.

Function Documentation

guint ev_view_presentation_get_current_page ( EvViewPresentation pview)

Definition at line 1671 of file ev-view-presentation.c.

1672 {
1673  return pview->current_page;
1674 }

+ Here is the caller graph for this function:

guint ev_view_presentation_get_rotation ( EvViewPresentation pview)

Definition at line 1698 of file ev-view-presentation.c.

1699 {
1700  return pview->rotation;
1701 }

+ Here is the caller graph for this function:

GType ev_view_presentation_get_type ( void  )
GtkWidget* ev_view_presentation_new ( EvDocument document,
guint  current_page,
guint  rotation,
gboolean  inverted_colors 
)

Definition at line 1654 of file ev-view-presentation.c.

1658 {
1659  g_return_val_if_fail (EV_IS_DOCUMENT (document), NULL);
1660  g_return_val_if_fail (current_page < ev_document_get_n_pages (document), NULL);
1661 
1662  return GTK_WIDGET (g_object_new (EV_TYPE_VIEW_PRESENTATION,
1663  "document", document,
1664  "current_page", current_page,
1665  "rotation", rotation,
1666  "inverted_colors", inverted_colors,
1667  NULL));
1668 }

+ Here is the caller graph for this function:

void ev_view_presentation_next_page ( EvViewPresentation pview)

Definition at line 568 of file ev-view-presentation.c.

569 {
570  guint n_pages;
571  gint new_page;
572 
573  switch (pview->state) {
577  case EV_PRESENTATION_END:
578  return;
580  break;
581  }
582 
583  n_pages = ev_document_get_n_pages (pview->document);
584  new_page = pview->current_page + 1;
585 
586  if (new_page == n_pages)
588  else
590 }

+ Here is the caller graph for this function:

void ev_view_presentation_previous_page ( EvViewPresentation pview)

Definition at line 593 of file ev-view-presentation.c.

594 {
595  gint new_page = 0;
596 
597  switch (pview->state) {
601  return;
602  case EV_PRESENTATION_END:
603  pview->state = EV_PRESENTATION_NORMAL;
604  new_page = pview->current_page;
605  break;
607  new_page = pview->current_page - 1;
608  break;
609  }
610 
612 }

+ Here is the caller graph for this function:

void ev_view_presentation_set_rotation ( EvViewPresentation pview,
gint  rotation 
)

Definition at line 1677 of file ev-view-presentation.c.

1679 {
1680  if (rotation >= 360)
1681  rotation -= 360;
1682  else if (rotation < 0)
1683  rotation += 360;
1684 
1685  if (pview->rotation == rotation)
1686  return;
1687 
1688  pview->rotation = rotation;
1689  g_object_notify (G_OBJECT (pview), "rotation");
1690  if (pview->is_constructing)
1691  return;
1692 
1695 }

+ Here is the caller graph for this function: