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-init.c File Reference
#include <config.h>
#include <glib.h>
#include <glib/gi18n-lib.h>
#include "ev-init.h"
#include "ev-document-factory.h"
#include "ev-debug.h"
#include "ev-file-helpers.h"
+ Include dependency graph for ev-init.c:

Go to the source code of this file.

Functions

const gchar * ev_get_locale_dir (void)
 
gboolean ev_init (void)
 
void ev_shutdown (void)
 
gboolean _ev_is_initialized (void)
 

Variables

static int ev_init_count
 

Function Documentation

gboolean _ev_is_initialized ( void  )

Definition at line 153 of file ev-init.c.

154 {
155  return ev_init_count > 0;
156 }

+ Here is the caller graph for this function:

const gchar* ev_get_locale_dir ( void  )

Definition at line 85 of file ev-init.c.

86 {
87 #ifdef G_OS_WIN32
88  return _ev_win32_get_locale_dir (evdocument_dll);
89 #else
90  return GNOMELOCALEDIR;
91 #endif
92 }

+ Here is the caller graph for this function:

gboolean ev_init ( void  )

ev_init:

Initializes the evince document library, and binds the evince gettext domain.

You must call this before calling any other function in the evince document library.

Returns: TRUE if any backends were found; FALSE otherwise

Definition at line 106 of file ev-init.c.

107 {
108  static gboolean have_backends;
109 
110  if (ev_init_count++ > 0)
111  return have_backends;
112 
113  /* set up translation catalog */
114  bindtextdomain (GETTEXT_PACKAGE, ev_get_locale_dir ());
115  bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
116 
117  _ev_debug_init ();
119  have_backends = _ev_document_factory_init ();
120 
121  return have_backends;
122 }

+ Here is the caller graph for this function:

void ev_shutdown ( void  )

ev_shutdown:

Shuts the evince document library down.

Definition at line 130 of file ev-init.c.

131 {
132  g_assert (_ev_is_initialized ());
133 
134  if (--ev_init_count > 0)
135  return;
136 
137 #ifdef G_OS_WIN32
138  if (locale_dir != NULL)
139  g_free(locale_dir);
140 #endif
141 
145 }

+ Here is the caller graph for this function:

Variable Documentation

int ev_init_count
static

Definition at line 33 of file ev-init.c.