diff options
author | Po Lu <luangruo@yahoo.com> | 2022-06-21 22:03:42 +0800 |
---|---|---|
committer | Po Lu <luangruo@yahoo.com> | 2022-06-21 22:05:21 +0800 |
commit | be35c92c90d455739a6ff9d4beefa2b35d044852 (patch) | |
tree | 19c5be6b9e09ccb45c58a5008f8f956f3ad92d57 /src/pgtkselect.h | |
parent | b1af8c2c00aefe6aa554a468e65b6e07c9f14722 (diff) | |
download | emacs-be35c92c90d455739a6ff9d4beefa2b35d044852.tar.gz |
Rewrite PGTK selection code from scratch
* src/frame.c (delete_frame): Clear selections and swallow
special events.
* src/keyboard.c (kbd_buffer_get_event, process_special_events):
Also handle selection events on PGTK.
* src/keyboard.h (union buffered_input_event): Include selection
events on PGTK.
* src/pgtkselect.c (symbol_to_gtk_clipboard, LOCAL_SELECTION):
New functions and macros.
(selection_type_to_quarks, get_func, clear_func): Delete
functions.
(pgtk_selection_init, pgtk_selection_lost):
(pgtk_selection_usable): New functions.
(Fpgtk_own_selection_internal, Fpgtk_disown_selection_internal)
(Fpgtk_selection_exists_p, Fpgtk_selection_owner_p)
(Fpgtk_get_selection_internal): Complete rewrite.
(syms_of_pgtkselect): Update defsyms and add more hooks.
* src/pgtkselect.h: Delete file.
* src/pgtkterm.c (evq_enqueue): Set last user time based on the
event.
(pgtk_any_window_to_frame, button_event): Fix coding style.
(pgtk_set_event_handler): Add selection events.
(pgtk_find_selection_owner, pgtk_selection_event): New
functions.
(pgtk_term_init): Remove call to `pgtk_selection_init'.
* src/pgtkterm.h (struct pgtk_display_info): New field
`display'.
(enum selection_input_event): New struct. New macros for
accessing its fields.
Diffstat (limited to 'src/pgtkselect.h')
-rw-r--r-- | src/pgtkselect.h | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/src/pgtkselect.h b/src/pgtkselect.h deleted file mode 100644 index fd9910b2d18..00000000000 --- a/src/pgtkselect.h +++ /dev/null @@ -1,31 +0,0 @@ -/* Definitions and headers for selection of pure Gtk+3. - Copyright (C) 1989, 1993, 2005, 2008-2022 Free Software Foundation, - Inc. - -This file is part of GNU Emacs. - -GNU Emacs is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or (at -your option) any later version. - -GNU Emacs is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ - - -#include "dispextern.h" -#include "frame.h" - -#ifdef HAVE_PGTK - -#include <gtk/gtk.h> - -extern void pgtk_selection_init (void); -extern void pgtk_selection_lost (GtkWidget *, GdkEventSelection *, gpointer); - -#endif /* HAVE_PGTK */ |