1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* GdkPixbuf library - Win32 GDI+ Pixbuf Loader
3  *
4  * Copyright (C) 2008 Dominic Lachowicz
5  * Copyright (C) 2008 Alberto Ruiz
6  *
7  * Authors: Dominic Lachowicz <domlachowicz@gmail.com>
8  *          Alberto Ruiz <aruiz@gnome.org>
9  *
10  * This library is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU Lesser General Public
12  * License as published by the Free Software Foundation; either
13  * version 2 of the License, or (at your option) any later version.
14  *
15  * This library is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18  * Lesser General Public License for more  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
20  */
21 
22 #include "config.h"
23 #include <glib/gi18n-lib.h>
24 
25 #include "io-gdip-utils.h"
26 
27 #ifndef INCLUDE_gdiplus
28 #define MODULE_ENTRY(function) G_MODULE_EXPORT void function
29 #else
30 #define MODULE_ENTRY(function) void _gdk_pixbuf__gdip_emf_ ## function
31 #endif
32 
MODULE_ENTRY(fill_vtable)33 MODULE_ENTRY (fill_vtable) (GdkPixbufModule *module)
34 {
35   gdip_fill_vector_vtable (module);
36 }
37 
MODULE_ENTRY(fill_info)38 MODULE_ENTRY (fill_info) (GdkPixbufFormat *info)
39 {
40   static const GdkPixbufModulePattern signature[] = {
41     { "\x01\x00\x00\x00", NULL, 100 }, /* EMF */
42     { NULL, NULL, 0 }
43   };
44 
45   static const gchar *mime_types[] = {
46     "application/emf",
47     "application/x-emf",
48     "image/emf",
49     "image/x-emf",
50     "image/x-mgx-emf",
51     NULL
52   };
53 
54   static const gchar *extensions[] = {
55     "emf",
56     NULL
57   };
58 
59   info->name        = "emf";
60   info->signature   = (GdkPixbufModulePattern *) signature;
61   info->description = NC_("image format", "EMF");
62   info->mime_types  = (gchar **) mime_types;
63   info->extensions  = (gchar **) extensions;
64   info->flags       = GDK_PIXBUF_FORMAT_THREADSAFE;
65   info->license     = "LGPL";
66 }
67