1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Emulate secondary selections on Android

* doc/lispref/frames.texi (Other Selections): Revise
documentation to match.

* lisp/term/android-win.el (android-secondary-selection): New
variable.
(android-primary-selection, android-get-clipboard-1)
(android-get-primary, gui-backend-get-selection)
(gui-backend-selection-exists-p, gui-backend-selection-owner-p)
(gui-backend-set-selection): Update doc strings and code as is
proper.
This commit is contained in:
Po Lu 2023-11-06 10:14:09 +08:00
parent 3dd9750d12
commit de380adb64
2 changed files with 51 additions and 19 deletions

View file

@ -4686,15 +4686,18 @@ of available selection data types, as elsewhere.
@cindex Android selections
Much like MS-Windows, Android provides a clipboard but no primary or
secondary selection; @code{gui-set-selection} simulates the primary
selection by saving the value supplied into a variable subsequent
calls to @code{gui-get-selection} return.
and secondary selections by saving the value supplied into a variable
subsequent calls to @code{gui-get-selection} return.
From the clipboard, @code{gui-get-selection} is capable of returning
UTF-8 string data of the type @code{STRING}, the @code{TAREGTS} data
type, or image and application data of any MIME type.
@code{gui-set-selection} sets only string data, much as under
MS-Windows, although this data is not affected by the value of
@code{selection-coding-system}.
@code{selection-coding-system}. By contrast, only string data can be
saved to and from the primary and secondary selections; but since this
data is not communicated to programs besides Emacs, it is not subject
to encoding or decoding by any coding system.
@node Yanking Media
@section Yanking Media