Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
svgz.cpp
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Code to handle compressed SVG loading and saving. Almost identical to svg
4 * routines, but separated for simpler extension maintenance.
5 *
6 * Authors:
7 * Lauris Kaplinski <lauris@kaplinski.com>
8 * Ted Gould <ted@gould.cx>
9 * Jon A. Cruz <jon@joncruz.org>
10 *
11 * Copyright (C) 2002-2005 Authors
12 *
13 * Released under GNU GPL v2+, read the file 'COPYING' for more information.
14 */
15
16#include "svgz.h"
17#include "extension/extension.h"
18#include "extension/system.h"
19
20namespace Inkscape {
21namespace Extension {
22namespace Internal {
23
24#include "clear-n_.h"
25
38void
40{
41 // clang-format off
42 /* SVGZ in */
44 "<inkscape-extension xmlns=\"" INKSCAPE_EXTENSION_URI "\">\n"
45 "<name>" N_("SVGZ Input") "</name>\n"
46 "<id>" SP_MODULE_KEY_INPUT_SVGZ "</id>\n"
47 "<dependency type=\"extension\">" SP_MODULE_KEY_INPUT_SVG "</dependency>\n"
48 SVG_COMMON_INPUT_PARAMS
49 "<input priority='2'>\n"
50 "<extension>.svgz</extension>\n"
51 "<mimetype>image/svg+xml-compressed</mimetype>\n"
52 "<filetypename>" N_("Compressed Inkscape SVG (*.svgz)") "</filetypename>\n"
53 "<filetypetooltip>" N_("SVG file format compressed with GZip") "</filetypetooltip>\n"
54 "</input>\n"
55 "</inkscape-extension>", std::make_unique<Svgz>());
56
57 /* SVGZ out Inkscape */
59 "<inkscape-extension xmlns=\"" INKSCAPE_EXTENSION_URI "\">\n"
60 "<name>" N_("SVGZ Output") "</name>\n"
61 "<id>" SP_MODULE_KEY_OUTPUT_SVGZ_INKSCAPE "</id>\n"
62 "<output priority='3'>\n"
63 "<extension>.svgz</extension>\n"
64 "<mimetype>image/x-inkscape-svg-compressed</mimetype>\n"
65 "<filetypename>" N_("Compressed Inkscape SVG (*.svgz)") "</filetypename>\n"
66 "<filetypetooltip>" N_("Inkscape's native file format compressed with GZip") "</filetypetooltip>\n"
67 "<dataloss>false</dataloss>\n"
68 "</output>\n"
69 "</inkscape-extension>", std::make_unique<Svgz>());
70
71 /* SVGZ out */
73 "<inkscape-extension xmlns=\"" INKSCAPE_EXTENSION_URI "\">\n"
74 "<name>" N_("SVGZ Output") "</name>\n"
75 "<id>" SP_MODULE_KEY_OUTPUT_SVGZ "</id>\n"
76 "<output priority='4'>\n"
77 "<extension>.svgz</extension>\n"
78 "<mimetype>image/svg+xml-compressed</mimetype>\n"
79 "<filetypename>" N_("Compressed plain SVG (*.svgz)") "</filetypename>\n"
80 "<filetypetooltip>" N_("Scalable Vector Graphics format compressed with GZip") "</filetypetooltip>\n"
81 "</output>\n"
82 "</inkscape-extension>\n", std::make_unique<Svgz>());
83 // clang-format on
84
85 return;
86}
87
88
89} } } // namespace inkscape, module, implementation
90
91/*
92 Local Variables:
93 mode:c++
94 c-file-style:"stroustrup"
95 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
96 indent-tabs-mode:nil
97 fill-column:99
98 End:
99*/
100// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :
static void init()
What would an SVG editor be without loading/saving SVG files. This function sets that up.
Definition svgz.cpp:39
A way to clear the N_ macro, which is defined as an inline function.
Inkscape::Extension::Extension: Frontend to certain, possibly pluggable, actions.
void build_from_mem(gchar const *buffer, std::unique_ptr< Implementation::Implementation > in_imp)
Create a module from a buffer holding an XML description.
Definition system.cpp:459
Helper class to stream background task notifications as a series of messages.