diff options
| author | Cecilio Pardo | 2024-10-28 22:18:13 +0100 |
|---|---|---|
| committer | Eli Zaretskii | 2024-11-03 15:12:20 +0200 |
| commit | 8e7f5f97db647ce6e9606364dc15d8bbd7ef6016 (patch) | |
| tree | aa033dc97c284c7842dc291c6a9f7fbcd044fce8 /doc | |
| parent | 5ee56b86938b7759dd92f507d03907280f48ffca (diff) | |
| download | emacs-8e7f5f97db647ce6e9606364dc15d8bbd7ef6016.tar.gz emacs-8e7f5f97db647ce6e9606364dc15d8bbd7ef6016.zip | |
Add support for 'yank-media' on MS-Windows
Adds the capacity to handle types different from strings to the
clipboard management functions on MS-Windows, and some logic
required to convert media types names and content to be what
yank-media and the modes that use it expect (bug#71909).
* lisp/term/w32-win.el (w32--selection-target-translations): New
variable that holds the name translations for media types.
(w32--translate-selection-target): New function, translate the
name of a media type.
(w32--translate-reverse-selection-target): New function, reverse
translation.
(w32--get-selection): Modified to translate target names when
asked for targets, and retrieve media types when asked for them.
(w32--mime-type-textual-p): New function, checks if a MIME type
is textual.
* lisp/textmodes/sgml-mode.el (html-mode--image-yank-handler):
Fixed the image save mechanism, that added line feed characters
on MS-Windows, breaking binary formats.
* src/w32image.c (gdiplus_init): Modified to fetch more
functions fromm gdiplus.
(get_encoder_clsid): Renamed to 'w32_gdip_get_encoder_clsid'
and made nonstatic.
(gdiplus_startup): Renamed to 'w32_gdiplus_startup' and
made nonstatic.
* src/w32select.c (stdfmt_name): Made global, was static
function.
(convert_dibv5_to_png): New function to convert DIBV5 clipboard
format to PNG.
(get_clipboard_format_name): New function get the name of a
format given its index.
(Fw32__get_clipboard_data_media): New function, retrieves and
converts media content.
(syms_of_w32select): Export new lisp functions.
* src/w32gdiplus.h: New file, for definitions in w32image.c
* doc/lispref/frames.texi: Updated with MS-Windows support.
* etc/NEWS: Added entry about new feature.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/lispref/frames.texi | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi index 1b463eb51e5..bf4d5c05f3a 100644 --- a/doc/lispref/frames.texi +++ b/doc/lispref/frames.texi | |||
| @@ -4759,14 +4759,14 @@ to encoding or decoding by any coding system. | |||
| 4759 | @section Yanking Media | 4759 | @section Yanking Media |
| 4760 | @cindex yank media from window-system selections | 4760 | @cindex yank media from window-system selections |
| 4761 | 4761 | ||
| 4762 | Data saved within window system selections is not restricted to | 4762 | Data saved within window system selections and the MS-Windows |
| 4763 | plain text. It is possible for selection data to encompass images or | 4763 | clipboard is not restricted to plain text. It is possible for selection |
| 4764 | other binary data of the like, as well as rich text content instanced | 4764 | data to encompass images or other binary data of the like, as well as |
| 4765 | by HTML, and also PostScript. Since the selection data types incident | 4765 | rich text content instanced by HTML, and also PostScript. Since the |
| 4766 | to this data are at variance with those for plain text, the insertion | 4766 | selection data types incident to this data are at variance with those |
| 4767 | of such data is facilitated by a set of functions dubbed | 4767 | for plain text, the insertion of such data is facilitated by a set of |
| 4768 | @dfn{yank-media handlers}, which are registered by each major mode | 4768 | functions dubbed @dfn{yank-media handlers}, which are registered by each |
| 4769 | undertaking its insertion and called where warranted upon the | 4769 | major mode undertaking its insertion and called where warranted upon the |
| 4770 | execution of the @code{yank-media} command. | 4770 | execution of the @code{yank-media} command. |
| 4771 | 4771 | ||
| 4772 | @defun yank-media-handler types handler | 4772 | @defun yank-media-handler types handler |