summaryrefslogtreecommitdiff
path: root/src/w32image.c
Commit message (Collapse)AuthorAge
* ; Add 2023 to copyright years.Eli Zaretskii2023-01-01
|
* * src/w32image.c (w32_can_use_native_image_api): Fix comment.Stefan Kangas2022-09-10
|
* Allow plist-get/plist-put/plist-member to take a comparison functionLars Ingebrigtsen2022-06-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/lists.texi (Plist Access): Document it. * lisp/filesets.el (filesets-reset-fileset) (filesets-ingroup-cache-get): (filesets-ingroup-cache-put): (filesets-build-menu-now): Don't use lax-plist functions. * lisp/simple.el (lax-plist-put, lax-plist-get): Moved here from fns.c and make obsolete. * lisp/emacs-lisp/byte-opt.el (side-effect-free-fns): Don't mark plist functions as side-effect-free or pure. * lisp/emacs-lisp/comp.el (comp-known-type-specifiers): Adjust type. * lisp/emacs-lisp/shortdoc.el (list): Don't document deprecated functions. * src/xdisp.c (build_desired_tool_bar_string): (display_mode_element): (store_mode_line_string): (display_string): (produce_stretch_glyph): (note_mode_line_or_margin_highlight): (note_mouse_highlight): * src/w32.c (serial_configure): * src/sysdep.c (serial_configure): * src/sound.c (parse_sound): * src/process.c (Fset_process_buffer): (Fset_process_sentinel): (Fprocess_contact): (Fmake_process): (Fmake_pipe_process): (Fset_network_process_option): (Fserial_process_configure): (Fmake_serial_process): (set_network_socket_coding_system): (finish_after_tls_connection): (connect_network_socket): (Fmake_network_process): (server_accept_connection): * src/lread.c (ADDPARAM): (hash_table_from_plist): * src/keyboard.c (make_lispy_position): * src/indent.c (check_display_width): * src/image.c (postprocess_image): * src/gnutls.c (gnutls_verify_boot): (Fgnutls_boot): (gnutls_symmetric): (Fgnutls_hash_mac): (Fgnutls_hash_digest): * src/dired.c (filter): * src/data.c (add_to_function_history): * src/coding.c (Fcoding_system_put): Adjust callers from Fplist_put (etc) to plist_put. * src/fns.c (plist_get): (plist_put): (plist_member): New functions (without optional third parameter) to be used in C code. * src/fns.c (Fplist_get, Fplist_put, Fplist_member): Take an optional predicate parameter (bug#47425). * src/lisp.h: Declare new plist_put, plist_get and plist_member functions. * test/lisp/json-tests.el (test-json-add-to-plist): Use plist-get. * test/src/fns-tests.el (test-cycle-lax-plist-get): (test-cycle-lax-plist-put): (lax-plist-get/odd-number-of-elements): (test-plist): Remove lax-plist tests, since semantics have changed (they no longer error out on cycles).
* Support display of BMP images on MS-WindowsEli Zaretskii2022-03-26
| | | | | | | | | | | | * src/w32image.c (w32_can_use_native_image_api): Support BMP images. * src/image.c (syms_of_image) <Qbmp>: New symbol. [HAVE_NTGUI]: Add 'bmp' to list of supported image types. * doc/lispref/display.texi (Image Formats): Document built-in support for BMP images. * etc/NEWS: Announce the change.
* ; Add 2022 to copyright years.Eli Zaretskii2022-01-01
|
* Update copyright year to 2021Paul Eggert2021-01-01
| | | | Run "TZ=UTC0 admin/update-copyright".
* Fix GDI+ image loading by file nameEli Zaretskii2020-04-25
| | | | | | | | | | Without a call to image_find_image, we can get a file name that is relative to data-directory/images/, or a file name that starts with "~/", in which case w32_load_image would fail. * src/image.c (native_image_load): Call image_find_image_file to resolve and encode the image file name. * src/w32image.c (w32_load_image): No need to encode the file name, as it's already encoded by native_image_load.
* Remove workaround from w32image.cEli Zaretskii2020-04-20
| | | | | | * src/w32image.c (w32_load_image): Remove a workaround for a bug that is not needed anymore. This error was happening because GDI+ functions were called as CDECL, not as STDCALL.
* Rework how GDI+ functions are loaded dynamically in w32image.cEli Zaretskii2020-04-19
| | | | | | | | | | * src/w32image.c: Define correct WINGDIPAPI typedefs for GDI+ functions. We cannot use DEF_DLL_FN, since that is for functions with C calling conventions, whereas GDI+ functions are __stdcall. (gdiplus_init): Load functions from DLL manually, not via LOAD_DLL_FN, as the latter is for __cdecl functions. (w32_frame_delay): Initialize delay with a negative value, as zero is a valid delay.
* Don't abort when using GDI+ for imagesEli Zaretskii2020-04-18
| | | | | | * src/w32image.c (decode_delay): Instead of aborting when the type of delay value is unrecognized, return an invalid negative value.
* Fix loading multi-frame TIFF images via GDI+Juan José García-Ripoll2020-04-18
| | | | | | | * src/w32image.c (w32_frame_delay): Don't try to compute frame delay if GdipGetPropertyItemSize fails for PropertyTagFrameDelay. (w32_load_image): Don't add 'delay' member to metadata if the delay could not be determined.
* ; * src/w32image.c (w32_select_active_frame): Comment about GUID values.Eli Zaretskii2020-04-16
|
* File-handling cleanup in w32image.cEli Zaretskii2020-04-16
| | | | | | | | | * src/w32image.c (w32_load_image): Encode the image file name and convert it via 'map_w32_filename'. No need to do anything special when 'w32_unicode_filenames' is zero, since file names are in UTF-8 internally, and this code will never run on Windows 9X. * src/w32.h (map_w32_filename): Add prototype; removed prototypes from all *.c files.
* Fix retrieval of frame delay when using GDI+Eli Zaretskii2020-04-15
| | | | | | | * src/w32image.c (enum PropertyItem_type): New enumeration. (decode_delay): New function. (w32_frame_delay): Call 'decode_delay' to retrieve the frame delay from image data.
* Make use of MS-Windows native image API be selectable at run timeEli Zaretskii2020-04-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Initial version of native image API support for MS-WindowsJuan José García-Ripoll2020-04-14
* src/w32image.c: New file. * src/w32term.h: Add prototypes of 'w32_load_image', 'w32_gdiplus_startup', 'w32_gdiplus_shutdown', and 'w32_query_frame_background_color'. * src/w32term.c (w32_query_frame_background_color): No longer static. * src/w32.c (term_ntproc) [HAVE_GDIPLUS]: Call 'w32_gdiplus_shutdown'. * src/image.c (struct image_type) <valid_p>: Accept an additional argument, the image type. All implementations changed. (init_native_image_functions, native_image_p, native_image_load) [HAVE_NATIVE_IMAGE_API]: New methods for "native image type". (initialize_image_type) [HAVE_NATIVE_IMAGE_API]: Call 'init_native_image_functions'. (image_types) [HAVE_NATIVE_IMAGE_API]: Add settings for native image API. (lookup_image_type) [HAVE_NATIVE_IMAGE_API]: Initialize native functions if needed. * lisp/term/w32-win.el (dynamic-library-alist): Add gdiplus and shlwapi. * etc/NEWS: Announce the new feature. * configure.ac (native-image-api): New option, OFF by default. (HAVE_NATIVE_IMAGE_API): If native-image-api is selected, add w32image.o to W32_OBJ.