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

Go to the source code of this file.

Macros

#define EV_TYPE_PREVIEWER_WINDOW   (ev_previewer_window_get_type())
 
#define EV_PREVIEWER_WINDOW(object)   (G_TYPE_CHECK_INSTANCE_CAST((object), EV_TYPE_PREVIEWER_WINDOW, EvPreviewerWindow))
 
#define EV_PREVIEWER_WINDOW_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST((klass), EV_TYPE_PREVIEWER_WINDOW, EvPreviewerWindowClass))
 
#define EV_IS_PREVIEWER_WINDOW(object)   (G_TYPE_CHECK_INSTANCE_TYPE((object), EV_TYPE_PREVIEWER_WINDOW))
 
#define EV_IS_PREVIEWER_WINDOW_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE((klass), EV_TYPE_PREVIEWER_WINDOW))
 
#define EV_PREVIEWER_WINDOW_GET_CLASS(object)   (G_TYPE_INSTANCE_GET_CLASS((object), EV_TYPE_PREVIEWER_WINDOW, EvPreviewerWindowClass))
 

Typedefs

typedef struct _EvPreviewerWindow EvPreviewerWindow
 
typedef struct
_EvPreviewerWindowClass 
EvPreviewerWindowClass
 

Functions

GType ev_previewer_window_get_type (void) G_GNUC_CONST
 
EvPreviewerWindowev_previewer_window_new (EvDocumentModel *model)
 
void ev_previewer_window_set_print_settings (EvPreviewerWindow *window, const gchar *print_settings)
 
void ev_previewer_window_set_source_file (EvPreviewerWindow *window, const gchar *source_file)
 

Macro Definition Documentation

#define EV_IS_PREVIEWER_WINDOW (   object)    (G_TYPE_CHECK_INSTANCE_TYPE((object), EV_TYPE_PREVIEWER_WINDOW))

Definition at line 34 of file ev-previewer-window.h.

#define EV_IS_PREVIEWER_WINDOW_CLASS (   klass)    (G_TYPE_CHECK_CLASS_TYPE((klass), EV_TYPE_PREVIEWER_WINDOW))

Definition at line 35 of file ev-previewer-window.h.

#define EV_PREVIEWER_WINDOW (   object)    (G_TYPE_CHECK_INSTANCE_CAST((object), EV_TYPE_PREVIEWER_WINDOW, EvPreviewerWindow))

Definition at line 32 of file ev-previewer-window.h.

#define EV_PREVIEWER_WINDOW_CLASS (   klass)    (G_TYPE_CHECK_CLASS_CAST((klass), EV_TYPE_PREVIEWER_WINDOW, EvPreviewerWindowClass))

Definition at line 33 of file ev-previewer-window.h.

#define EV_PREVIEWER_WINDOW_GET_CLASS (   object)    (G_TYPE_INSTANCE_GET_CLASS((object), EV_TYPE_PREVIEWER_WINDOW, EvPreviewerWindowClass))

Definition at line 36 of file ev-previewer-window.h.

#define EV_TYPE_PREVIEWER_WINDOW   (ev_previewer_window_get_type())

Definition at line 31 of file ev-previewer-window.h.

Typedef Documentation

Definition at line 38 of file ev-previewer-window.h.

Definition at line 39 of file ev-previewer-window.h.

Function Documentation

GType ev_previewer_window_get_type ( void  )
EvPreviewerWindow* ev_previewer_window_new ( EvDocumentModel model)

Definition at line 656 of file ev-previewer-window.c.

657 {
658  return g_object_new (EV_TYPE_PREVIEWER_WINDOW,
659  "application", g_application_get_default (),
660  "model", model,
661  NULL);
662 }

+ Here is the caller graph for this function:

void ev_previewer_window_set_print_settings ( EvPreviewerWindow window,
const gchar *  print_settings 
)

Definition at line 665 of file ev-previewer-window.c.

667 {
668  if (window->print_settings)
669  g_object_unref (window->print_settings);
670  if (window->print_page_setup)
671  g_object_unref (window->print_page_setup);
672  if (window->print_job_title)
673  g_free (window->print_job_title);
674 
675  if (print_settings && g_file_test (print_settings, G_FILE_TEST_IS_REGULAR)) {
676  GKeyFile *key_file;
677  GError *error = NULL;
678 
679  key_file = g_key_file_new ();
680  g_key_file_load_from_file (key_file,
682  G_KEY_FILE_KEEP_COMMENTS |
683  G_KEY_FILE_KEEP_TRANSLATIONS,
684  &error);
685  if (!error) {
686  GtkPrintSettings *psettings;
687  GtkPageSetup *psetup;
688  gchar *job_name;
689 
690  psettings = gtk_print_settings_new_from_key_file (key_file,
691  "Print Settings",
692  NULL);
693  window->print_settings = psettings ? psettings : gtk_print_settings_new ();
694 
695  psetup = gtk_page_setup_new_from_key_file (key_file,
696  "Page Setup",
697  NULL);
698  window->print_page_setup = psetup ? psetup : gtk_page_setup_new ();
699 
700  job_name = g_key_file_get_string (key_file,
701  "Print Job", "title",
702  NULL);
703  if (job_name) {
704  window->print_job_title = job_name;
705  gtk_window_set_title (GTK_WINDOW (window), job_name);
706  }
707  } else {
708  window->print_settings = gtk_print_settings_new ();
709  window->print_page_setup = gtk_page_setup_new ();
710  g_error_free (error);
711  }
712 
713  g_key_file_free (key_file);
714  } else {
715  window->print_settings = gtk_print_settings_new ();
716  window->print_page_setup = gtk_page_setup_new ();
717  }
718 }

+ Here is the caller graph for this function:

void ev_previewer_window_set_source_file ( EvPreviewerWindow window,
const gchar *  source_file 
)

Definition at line 721 of file ev-previewer-window.c.

723 {
724  if (window->source_file)
725  g_free (window->source_file);
726  window->source_file = g_strdup (source_file);
727 }

+ Here is the caller graph for this function: