diff options
author | Eli Zaretskii <eliz@gnu.org> | 2020-04-14 18:10:41 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2020-04-14 18:10:41 +0300 |
commit | e94206aaf608a899c81bb07fe91d26439f51b3f8 (patch) | |
tree | a4a24407f1ba3d70ae192a1aad954a2bed3e91e1 /src/w32.c | |
parent | df254a7445a86dc25d133f2d79be8096190a8b96 (diff) | |
download | emacs-e94206aaf608a899c81bb07fe91d26439f51b3f8.tar.gz |
Make use of MS-Windows native image API be selectable at run time
* configure.ac: Minor cleanup in how w32image.o is added to the
build when native image APIs are requested.
* src/w32gui.h (w32_load_image, w32_can_use_native_image_api)
(w32_gdiplus_shutdown): Move prototypes from w32term.h here, since
w32.c doesn't include w32term.h.
* src/image.c (struct image_type): No need to pass TYPE to the
'valid_p' method. All callers changed.
(initialize_image_type) [HAVE_NATIVE_IMAGE_API]: Call
'image_can_use_native_api' before trying image-specific methods.
(image_can_use_native_api): New function.
(image_types): Remove the native_image_type parts.
(syms_of_image): New symbol 'native-image'.
(parse_image_spec): Accept native-image "type" for any image type.
* src/w32term.c (syms_of_w32term): New variable
'w32-use-native-image-API'.
* src/w32image.c: (w32_can_use_native_image_api): New function.
(gdiplus_init): Rename from w32_gdiplus_startup. Simplify code.
Move the call to GdiplusStartup to a separate function. Use
ordinal number for SHCreateMemStream if cannot load it by name.
(w32_load_image): Ignore Win32Error status from
w32_select_active_frame.
Move DEFSYMs from here...
* src/image.c (syms_of_image) [HAVE_NATIVE_IMAGE_API]: ...to here.
* etc/NEWS: Update the entry about native image API use.
Diffstat (limited to 'src/w32.c')
-rw-r--r-- | src/w32.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/w32.c b/src/w32.c index 1d2a52b6df4..80178029bd0 100644 --- a/src/w32.c +++ b/src/w32.c @@ -10226,7 +10226,7 @@ term_ntproc (int ignored) term_w32select (); -#ifdef HAVE_GDIPLUS +#if HAVE_NATIVE_IMAGE_API w32_gdiplus_shutdown (); #endif } |