]> git.eshelyaron.com Git - emacs.git/commit
Allow dropping more data types on PGTK
authorPo Lu <luangruo@yahoo.com>
Thu, 23 Jun 2022 05:38:30 +0000 (13:38 +0800)
committerPo Lu <luangruo@yahoo.com>
Thu, 23 Jun 2022 05:58:38 +0000 (13:58 +0800)
commit0b4db66a9deae682dc7d444f4ab8d0e49f15c3b9
tree6f08101c3b9697085153e3babe29dc379d031b9c
parent00034ad2e635adc93cd1d6dcb1b500c10d990c74
Allow dropping more data types on PGTK

* lisp/loadup.el (featurep): Load `pgtk-dnd'.
* lisp/pgtk-dnd.el: New file.
(pgtk-dnd-test-function, pgtk-dnd-types-alist)
(pgtk-dnd-known-types, pgtk-dnd-use-offix-drop)
(pgtk-dnd-current-state, pgtk-get-selection-internal)
(pgtk-register-dnd-targets, pgtk-dnd-empty-state)
(pgtk-dnd-init-frame, pgtk-dnd-get-state-cons-for-frame)
(pgtk-dnd-get-state-for-frame, pgtk-dnd-default-test-function)
(pgtk-dnd-current-type, pgtk-dnd-forget-drop)
(pgtk-dnd-maybe-call-test-function, pgtk-dnd-save-state)
(pgtk-dnd-handle-moz-url, pgtk-dnd-insert-utf8-text)
(pgtk-dnd-insert-utf16-text, pgtk-dnd-insert-ctext)
(pgtk-dnd-handle-uri-list, pgtk-dnd-handle-file-name)
(pgtk-dnd-choose-type, pgtk-dnd-drop-data)
(pgtk-dnd-handle-drag-n-drop-event, pgtk-update-drop-status)
(pgtk-drop-finish, pgtk-dnd-handle-gdk, pgtk-dnd): New variables
and functions and library.

* lisp/term/pgtk-win.el (special-event-map): Load
`drag-n-drop-event'.
(after-make-frame-functions): Register DND after make frame
functions.

* src/emacs.c (main): Stop calling empty init_pgtkterm function.

* src/pgtkselect.c (Fpgtk_register_dnd_targets, Fpgtk_drop_finish)
(Fpgtk_update_drop_status): New functions.
(syms_of_pgtkselect): Register new functions.
* src/pgtkterm.c (struct event_queue_t): Fix coding style of
definition.
(symbol_to_drag_action, drag_action_to_symbol)
(pgtk_update_drop_status, pgtk_finish_drop): New functions.
(drag_data_received): Delete function.
(pgtk_set_event_handler): Register for DND correctly.
(syms_of_pgtkterm): New defsyms for DND types.
(init_pgtkterm): Delete function.

* src/pgtkterm.h: Update prototypes, fix prototype coding style.
lisp/loadup.el
lisp/pgtk-dnd.el [new file with mode: 0644]
lisp/term/pgtk-win.el
src/emacs.c
src/pgtkselect.c
src/pgtkterm.c
src/pgtkterm.h