summaryrefslogtreecommitdiff
path: root/src/haikuselect.h
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2022-07-07 02:48:19 +0000
committerPo Lu <luangruo@yahoo.com>2022-07-07 02:48:19 +0000
commitfd016ea99724f7abedfddbb470ab96ece6ddf4ae (patch)
treee874e42b2a69d1c22411e2a78c1fa9d2a4270284 /src/haikuselect.h
parent8575962d46d1f1d08836bf00cb74ccd344953bcb (diff)
downloademacs-fd016ea99724f7abedfddbb470ab96ece6ddf4ae.tar.gz
Port `x-lost-selection-functions' to Haiku
* src/haiku_io.c (haiku_len): Add `CLIPBOARD_CHANGED_EVENT'. * src/haiku_select.cc (be_update_clipboard_count): Set ownership flags. (be_handle_clipboard_changed_message): (be_start_watching_selection): New functions. * src/haiku_support.cc (class Emacs): Handle B_CLIPBOARD_CHANGED. * src/haiku_support.h (enum haiku_event_type): New event `CLIPBOARD_CHANGED_EVENT'. (struct haiku_clipboard_changed_event): New struct. * src/haikuselect.c (haiku_handle_selection_clear) (haiku_selection_disowned, haiku_start_watching_selections): New functions. (syms_of_haikuselect): New defsym and defvar. * src/haikuselect.h: Update prototypes. * src/haikuterm.c (haiku_read_socket): Handle selection events. (haiku_term_init): Start watching selections. * src/haikuterm.h: Update prototypes. * src/keyboard.c (kbd_buffer_get_event, process_special_events) (mark_kboards): Handle SELECTON_CLEAR_EVENTs correctly on Haiku.
Diffstat (limited to 'src/haikuselect.h')
-rw-r--r--src/haikuselect.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/haikuselect.h b/src/haikuselect.h
index ac8e0698952..d027834e8b6 100644
--- a/src/haikuselect.h
+++ b/src/haikuselect.h
@@ -38,7 +38,10 @@ enum haiku_clipboard
extern "C"
{
#endif
+/* Defined in haikuselect.c. */
+extern void haiku_selection_disowned (enum haiku_clipboard);
+/* Defined in haiku_select.cc. */
extern void be_clipboard_init (void);
extern char *be_find_clipboard_data (enum haiku_clipboard, const char *, ssize_t *);
extern void be_set_clipboard_data (enum haiku_clipboard, const char *, const char *,
@@ -61,6 +64,8 @@ extern int be_add_point_data (void *, const char *, float, float);
extern int be_add_message_message (void *, const char *, void *);
extern int be_lock_clipboard_message (enum haiku_clipboard, void **, bool);
extern void be_unlock_clipboard (enum haiku_clipboard, bool);
+extern void be_handle_clipboard_changed_message (void);
+extern void be_start_watching_selection (enum haiku_clipboard);
#ifdef __cplusplus
};