diff options
| author | Po Lu | 2022-06-21 22:03:42 +0800 |
|---|---|---|
| committer | Po Lu | 2022-06-21 22:05:21 +0800 |
| commit | be35c92c90d455739a6ff9d4beefa2b35d044852 (patch) | |
| tree | 19c5be6b9e09ccb45c58a5008f8f956f3ad92d57 /src/pgtkselect.h | |
| parent | b1af8c2c00aefe6aa554a468e65b6e07c9f14722 (diff) | |
| download | emacs-be35c92c90d455739a6ff9d4beefa2b35d044852.tar.gz emacs-be35c92c90d455739a6ff9d4beefa2b35d044852.zip | |
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 @@ | |||
| 1 | /* Definitions and headers for selection of pure Gtk+3. | ||
| 2 | Copyright (C) 1989, 1993, 2005, 2008-2022 Free Software Foundation, | ||
| 3 | Inc. | ||
| 4 | |||
| 5 | This file is part of GNU Emacs. | ||
| 6 | |||
| 7 | GNU Emacs is free software: you can redistribute it and/or modify | ||
| 8 | it under the terms of the GNU General Public License as published by | ||
| 9 | the Free Software Foundation, either version 3 of the License, or (at | ||
| 10 | your option) any later version. | ||
| 11 | |||
| 12 | GNU Emacs is distributed in the hope that it will be useful, | ||
| 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | GNU General Public License for more details. | ||
| 16 | |||
| 17 | You should have received a copy of the GNU General Public License | ||
| 18 | along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ | ||
| 19 | |||
| 20 | |||
| 21 | #include "dispextern.h" | ||
| 22 | #include "frame.h" | ||
| 23 | |||
| 24 | #ifdef HAVE_PGTK | ||
| 25 | |||
| 26 | #include <gtk/gtk.h> | ||
| 27 | |||
| 28 | extern void pgtk_selection_init (void); | ||
| 29 | extern void pgtk_selection_lost (GtkWidget *, GdkEventSelection *, gpointer); | ||
| 30 | |||
| 31 | #endif /* HAVE_PGTK */ | ||