]> git.eshelyaron.com Git - emacs.git/commit
Make `yank-media' work on Haiku
authorPo Lu <luangruo@yahoo.com>
Wed, 24 Nov 2021 12:48:01 +0000 (12:48 +0000)
committerPo Lu <luangruo@yahoo.com>
Wed, 24 Nov 2021 12:58:39 +0000 (12:58 +0000)
commitfc35928ec2b3be40ff7323515f948fc82ca487ca
tree0882f12fdad3aab03d56e923905d8c25582ad282
parent7878c7f596d69efb68501503da391ed645ae151e
Make `yank-media' work on Haiku

This works with what WebPositive does with images, at least.  I don't
know about other programs, but Haiku doesn't seem to standardize this
very well.

* lisp/term/haiku-win.el (haiku--selection-type-to-mime): Handle
regular symbols.
(gui-backend-get-selection): Handle special type `TARGETS'.
(gui-backend-set-selection): Always clear clipboard.

* src/haiku_select.cc (BClipboard_get_targets): New function.
(BClipboard_set_data): New argument `clear'.  All callers
changed.
(BClipboard_set_system_data)
(BClipboard_set_primary_selection_data)
(BClipboard_set_secondary_selection_data): New argument `clear'.

(BClipboard_system_targets, BClipboard_primary_targets)
(BClipboard_secondary_targets): New functions.

* src/haikuselect.c (haiku_selection_data_1): New function.
(Fhaiku_selection_targets): New function.
(Fhaiku_selection_put): Allow controlling if the clipboard is
cleared.
(syms_of_haikuselect): New symbols and subrs.

* src/haikuselect.h (BClipboard_set_system_data)
(BClipboard_set_primary_selection_data)
(BClipboard_set_secondary_selection_data): New argument `clear'.

(BClipboard_system_targets, BClipboard_primary_targets)
(BClipboard_secondary_targets): New functions.
lisp/term/haiku-win.el
src/haiku_select.cc
src/haikuselect.c
src/haikuselect.h