From 31e16bd8f386dc292e60489d4a17227804bdc2e6 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Campos Date: Fri, 28 Dec 2007 18:13:32 +0000 Subject: Plugin system for backends. Fixes bug #351348. 2007-12-28 Carlos Garcia Campos * configure.ac: * Makefile.am: * po/POTFILES.in: * backend/comics/Makefile.am: * backend/comics/comics-document.[ch]: * backend/comics/comicsdocument.evince-backend.in: * backend/djvu/Makefile.am: * backend/djvu/djvu-document.[ch]: * backend/djvu/djvudocument.evince-backend.in: * backend/dvi/Makefile.am: * backend/dvi/dvi-document.[c]: * backend/dvi/dvidocument.evince-backend.in: * backend/impress/Makefile.am: * backend/impress/impress-document.[ch]: * backend/impress/impressdocument.evince-backend.in: * backend/pdf/Makefile.am: * backend/pdf/ev-poppler.cc: * backend/pdf/ev-poppler.h: * backend/pdf/pdfdocument.evince-backend.in: * backend/pixbuf/Makefile.am: * backend/pixbuf/pixbuf-document.[ch]: * backend/pixbuf/pixbufdocument.evince-backend.in: * backend/ps/Makefile.am: * backend/ps/ev-spectre.[ch]: * backend/ps/ps-document.[ch]: * backend/ps/psdocument.evince-backend.in: * backend/tiff/Makefile.am: * backend/tiff/tiff-document.[ch]: * backend/tiff/tiffdocument.evince-backend.in: * libdocument/Makefile.am: * libdocument/ev-backends-manager.[ch]: * libdocument/ev-module.[ch]: * libdocument/ev-document.h: * libdocument/ev-document-factory.[ch]: (gdk_pixbuf_mime_type_list), (mime_type_supported_by_gdk_pixbuf), (get_compression_from_mime_type), (get_document_from_uri), (ev_document_factory_get_document), (file_filter_add_mime_types), (ev_document_factory_add_filters): * shell/Makefile.am: * shell/ev-window-title.c: (get_filename_from_uri): * shell/main.c: (main): * thumbnailer/Makefile.am: * thumbnailer/evince-thumbnailer.c: (main): Plugin system for backends. Fixes bug #351348. svn path=/trunk/; revision=2786 --- (limited to 'libdocument/ev-backends-manager.h') diff --git a/libdocument/ev-backends-manager.h b/libdocument/ev-backends-manager.h new file mode 100644 index 0000000..a78d6f8 --- /dev/null +++ b/libdocument/ev-backends-manager.h @@ -0,0 +1,44 @@ +/* this file is part of evince, a gnome document viewer + * + * Copyright (C) 2007 Carlos Garcia Campos + * + * Evince is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * Evince is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef EV_BACKENDS_MANAGER +#define EV_BACKENDS_MANAGER + +#include + +#include "ev-document.h" + +G_BEGIN_DECLS + +typedef struct _EvTypeInfo { + const gchar *desc; + const gchar **mime_types; +} EvTypeInfo; + +gboolean ev_backends_manager_init (void); +void ev_backends_manager_shutdown (void); + +EvDocument *ev_backends_manager_get_document (const gchar *mime_type); +const gchar *ev_backends_manager_get_document_module_name (EvDocument *document); +EvTypeInfo *ev_backends_manager_get_document_type_info (EvDocument *document); +GList *ev_backends_manager_get_all_types_info (void); + +G_END_DECLS + +#endif /* EV_BACKENDS_MANAGER */ -- cgit v0.9.1