]> git.eshelyaron.com Git - emacs.git/commit
Simplify Haiku selection code
authorPo Lu <luangruo@yahoo.com>
Tue, 10 May 2022 04:11:32 +0000 (04:11 +0000)
committerPo Lu <luangruo@yahoo.com>
Tue, 10 May 2022 04:11:48 +0000 (04:11 +0000)
commit3c5e1f8ec8d5d52e5bbf185d9618852e7d04e3ca
treed611f01a506f47aa830b365a75447fe5f98d9106
parente568c3845cd98b702ce23bdef1b22e088769c9cd
Simplify Haiku selection code

* src/haiku_select.cc (get_clipboard_object): New function.
(BClipboard_find_data, BClipboard_get_targets, BClipboard_set_data)
(BClipboard_find_system_data)
(BClipboard_find_primary_selection_data)
(BClipboard_find_secondary_selection_data)
(BClipboard_set_system_data, BClipboard_set_primary_selection_data)
(BClipboard_set_secondary_selection_data, BClipboard_free_data)
(BClipboard_system_targets, BClipboard_primary_targets)
(BClipboard_secondary_targets): Delete functions.
(be_find_clipboard_data_1, be_set_clipboard_data_1)
(be_get_clipboard_targets_1, be_find_clipboard_data)
(be_set_clipboard_data, be_get_clipboard_targets): New
functions.
(be_lock_clipboard_message, be_unlock_clipboard): Use
`get_clipboard_object' to get clipboard from ID.

* src/haikuselect.c (haiku_get_clipboard_name): New function.
(Fhaiku_selection_data, Fhaiku_selection_put)
(Fhaiku_selection_owner_p): Adjust to use new simplified
functions.

* src/haikuselect.h: Update prototypes.
src/haiku_select.cc
src/haikuselect.c
src/haikuselect.h