diff options
author | Anders Carlsson <andersca@gnome.org> | 2004-12-22 20:54:22 (GMT) |
---|---|---|
committer | Anders Carlsson <andersca@src.gnome.org> | 2004-12-22 20:54:22 (GMT) |
commit | ca0836cb912f3b88834cae97774079314727c6e2 (patch) | |
tree | 811a2c5b04a9cf17933994f65ad95d2bc2cded6b /backend/ev-document-thumbnails.c | |
parent | f396b95d8d10ceb3824bf00405a04b6104fea883 (diff) |
Add thumbnail support.
2004-12-22 Anders Carlsson <andersca@gnome.org>
* backend/Makefile.am:
* backend/ev-document-thumbnails.c:
(ev_document_thumbnails_get_type),
(ev_document_thumbnails_get_thumbnail):
* backend/ev-document-thumbnails.h:
* pixbuf/pixbuf-document.c: (G_DEFINE_TYPE_WITH_CODE),
(pixbuf_document_thumbnails_get_thumbnail),
(pixbuf_document_document_thumbnails_iface_init):
* shell/Makefile.am:
* shell/ev-sidebar-thumbnails.c: (ev_sidebar_thumbnails_destroy),
(ev_sidebar_thumbnails_class_init), (ev_sidebar_thumbnails_init),
(populate_thumbnails), (ev_sidebar_thumbnails_set_document):
* shell/ev-sidebar-thumbnails.h:
* shell/ev-sidebar.c: (ev_sidebar_init), (ev_sidebar_add_page),
(ev_sidebar_set_document):
* shell/ev-utils.c: (gaussian), (create_blur_filter),
(create_shadow), (ev_pixbuf_add_shadow):
* shell/ev-utils.h:
Add thumbnail support.
Diffstat (limited to 'backend/ev-document-thumbnails.c')
-rw-r--r-- | backend/ev-document-thumbnails.c | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/backend/ev-document-thumbnails.c b/backend/ev-document-thumbnails.c new file mode 100644 index 0000000..e9c53ab --- /dev/null +++ b/backend/ev-document-thumbnails.c @@ -0,0 +1,55 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; c-indent-level: 8 -*- */ +/* + * Copyright (C) 2004 Anders Carlsson <andersca@gnome.org> + * + * This program 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, or (at your option) + * any later version. + * + * This program 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. + * + */ + +#include "config.h" + +#include "ev-document-thumbnails.h" + +GType +ev_document_thumbnails_get_type (void) +{ + static GType type = 0; + + if (G_UNLIKELY (type == 0)) + { + static const GTypeInfo our_info = + { + sizeof (EvDocumentThumbnailsIface), + NULL, + NULL, + }; + + type = g_type_register_static (G_TYPE_INTERFACE, + "EvDocumentThumbnails", + &our_info, (GTypeFlags)0); + } + + return type; +} + +GdkPixbuf * +ev_document_thumbnails_get_thumbnail (EvDocumentThumbnails *document, + gint page, + gint width) +{ + EvDocumentThumbnailsIface *iface = EV_DOCUMENT_THUMBNAILS_GET_IFACE (document); + + return iface->get_thumbnail (document, page, width); +} |