mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-12 02:40:34 -08:00
Resurrect SVG support on MS-Windows
* src/image.c (syms_of_image) <Qgio> [HAVE_NTGUI]: New DEFSYM. (init_svg_functions) [LIBRSVG_CHECK_VERSION >= 2.32.0]: Load g_file_new_for_path and g_memory_input_stream_new_from_data from libgio, not from libglib. (Bug#35548) * lisp/term/w32-win.el (dynamic-library-alist): Add the libgio DLL.
This commit is contained in:
parent
2581513abe
commit
60fc771ac6
2 changed files with 11 additions and 3 deletions
|
|
@ -279,6 +279,7 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.")
|
|||
'(svg "librsvg-2-2.dll")
|
||||
'(gdk-pixbuf "libgdk_pixbuf-2.0-0.dll")
|
||||
'(glib "libglib-2.0-0.dll")
|
||||
'(gio "libgio-2.0-0.dll")
|
||||
'(gobject "libgobject-2.0-0.dll")
|
||||
(if (>= libgnutls-version 30400)
|
||||
'(gnutls "libgnutls-30.dll")
|
||||
|
|
|
|||
13
src/image.c
13
src/image.c
|
|
@ -9336,22 +9336,26 @@ DEF_DLL_FN (void, g_clear_error, (GError **));
|
|||
static bool
|
||||
init_svg_functions (void)
|
||||
{
|
||||
HMODULE library, gdklib = NULL, glib = NULL, gobject = NULL;
|
||||
HMODULE library, gdklib = NULL, glib = NULL, gobject = NULL, giolib = NULL;
|
||||
|
||||
if (!(glib = w32_delayed_load (Qglib))
|
||||
|| !(gobject = w32_delayed_load (Qgobject))
|
||||
# if LIBRSVG_CHECK_VERSION (2, 32, 0)
|
||||
|| !(giolib = w32_delayed_load (Qgio))
|
||||
# endif
|
||||
|| !(gdklib = w32_delayed_load (Qgdk_pixbuf))
|
||||
|| !(library = w32_delayed_load (Qsvg)))
|
||||
{
|
||||
if (gdklib) FreeLibrary (gdklib);
|
||||
if (giolib) FreeLibrary (giolib);
|
||||
if (gobject) FreeLibrary (gobject);
|
||||
if (glib) FreeLibrary (glib);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if LIBRSVG_CHECK_VERSION (2, 32, 0)
|
||||
LOAD_DLL_FN (glib, g_file_new_for_path);
|
||||
LOAD_DLL_FN (glib, g_memory_input_stream_new_from_data);
|
||||
LOAD_DLL_FN (giolib, g_file_new_for_path);
|
||||
LOAD_DLL_FN (giolib, g_memory_input_stream_new_from_data);
|
||||
LOAD_DLL_FN (library, rsvg_handle_new_from_stream_sync);
|
||||
#else
|
||||
LOAD_DLL_FN (library, rsvg_handle_new);
|
||||
|
|
@ -10229,6 +10233,9 @@ non-numeric, there is no explicit limit on the size of images. */);
|
|||
/* Other libraries used directly by svg code. */
|
||||
DEFSYM (Qgdk_pixbuf, "gdk-pixbuf");
|
||||
DEFSYM (Qglib, "glib");
|
||||
# if LIBRSVG_CHECK_VERSION (2, 32, 0)
|
||||
DEFSYM (Qgio, "gio");
|
||||
# endif
|
||||
DEFSYM (Qgobject, "gobject");
|
||||
#endif /* HAVE_NTGUI */
|
||||
#endif /* HAVE_RSVG */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue