• Eli Zaretskii's avatar
    Make use of MS-Windows native image API be selectable at run time · e94206aa
    Eli Zaretskii authored
    * 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
    * 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
    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.