1 /* this file is part of evince, a gnome document viewer
3 * Copyright © 2009 Christian Persch
5 * Evince is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU Lesser General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * Evince is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
13 * General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
25 #include "ev-backends-manager.h"
27 #include "ev-file-helpers.h"
29 static int ev_init_count;
34 * Initializes the evince document library.
36 * You must call this before calling any other function in the evince
39 * Returns: %TRUE if any backends were found; %FALSE otherwise
44 static gboolean have_backends;
46 if (ev_init_count++ > 0)
50 _ev_file_helpers_init ();
51 have_backends = _ev_backends_manager_init ();
59 * Shuts the evince document library down.
64 g_assert (_ev_is_initialized ());
66 if (--ev_init_count > 0)
69 _ev_backends_manager_shutdown ();
70 _ev_file_helpers_shutdown ();
71 _ev_debug_shutdown ();
77 * Returns: %TRUE if the evince document library has been initialized
80 _ev_is_initialized (void)
82 return ev_init_count > 0;