403Webshell
Server IP : 217.160.0.212  /  Your IP : 216.73.216.141
Web Server : Apache
System : Linux www 6.18.51-i1-ampere #1196 SMP Fri Sep 11 20:43:55 CEST 2026 aarch64
User : sws1073854427 ( 1073854427)
PHP Version : 8.4.23
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/share/emacs/28.2/lisp/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/emacs/28.2/lisp//x-dnd.elc
;ELC
;;; Compiled
;;; in Emacs version 28.2
;;; with all optimizations.



(byte-code "\300\301!\210\302\303\304\305\306DD\307\310\311\312\313\314\315&	\210\302\316\304\305\317DD\320\310\311\312\321\314\315&	\210\302\322\304\305\323DD\324\310\311\312\325\314\315&	\207" [require dnd custom-declare-variable x-dnd-test-function funcall function #[0 "\300\207" [x-dnd-default-test-function] 1 #1=""] "The function drag and drop uses to determine if to accept or reject a drop.\nThe function takes three arguments, WINDOW, ACTION and TYPES.\nWINDOW is where the mouse is when the function is called.  WINDOW may be a\nframe if the mouse isn't over a real window (i.e. menu bar, tool bar or\nscroll bar).  ACTION is the suggested action from the drag and drop source,\none of the symbols move, copy, link or ask.  TYPES is a list of available\ntypes for the drop.\n\nThe function shall return nil to reject the drop or a cons with two values,\nthe wanted action as car and the wanted type as cdr.  The wanted action\ncan be copy, move, link, ask or private.\nThe default value for this variable is `x-dnd-default-test-function'." :version "22.1" :type symbol :group x x-dnd-types-alist #[0 "\300\301!\302B\300\303!\304B\300\305!\302B\300\306!\307B\300\310!\311B\300\312!\311B\300\313!\311B\300\314!\315B\300\316!\317B\300\320!\321B\300\322!\317B\300\323!\317B\257\f\207" [purecopy "text/uri-list" x-dnd-handle-uri-list "text/x-moz-url" x-dnd-handle-moz-url "_NETSCAPE_URL" "FILE_NAME" x-dnd-handle-file-name "UTF8_STRING" x-dnd-insert-utf8-text "text/plain;charset=UTF-8" "text/plain;charset=utf-8" "text/unicode" x-dnd-insert-utf16-text "text/plain" dnd-insert-text "COMPOUND_TEXT" x-dnd-insert-ctext "STRING" "TEXT"] 13 #1#] "Which function to call to handle a drop of that type.\nIf the type for the drop is not present, or the function is nil,\nthe drop is rejected.  The function takes three arguments, WINDOW, ACTION\nand DATA.  WINDOW is where the drop occurred, ACTION is the action for\nthis drop (copy, move, link, private or ask) as determined by a previous\ncall to `x-dnd-test-function'.  DATA is the drop data.\nThe function shall return the action used (copy, move, link or private)\nif drop is successful, nil if not." alist x-dnd-known-types #[0 "\300\301\302\"\207" [mapcar purecopy ("text/uri-list" "text/x-moz-url" "_NETSCAPE_URL" "FILE_NAME" "UTF8_STRING" "text/plain;charset=UTF-8" "text/plain;charset=utf-8" "text/unicode" "text/plain" "COMPOUND_TEXT" "STRING" "TEXT")] 3 #1#] "The types accepted by default for dropped data.\nThe types are chosen in the order they appear in the list." (repeat string)] 10)
#@413 The current state for a drop.
This is an alist with one entry for each display.  The value for each display
is a vector that contains the state for drag and drop for that display.
Elements in the vector are:
Last buffer drag was in,
last window drag was in,
types available for drop,
the action suggested by the source,
the type we want for the drop,
the action we want for the drop,
any protocol specific data.
(defvar x-dnd-current-state nil (#$ . 2637))
(defvar x-dnd-empty-state [nil nil nil nil nil nil nil])
#@91 Setup drag and drop for FRAME (i.e. create appropriate properties).

(fn &optional FRAME)
(defalias 'x-dnd-init-frame #[256 "\300!\301=\205-\302\303\"\210\302\304\"\210\302\305\"\210\302\306\"\210\302\307\"\210\302\310\"\210\311!\210\312!\207" [window-system x x-register-dnd-atom "DndProtocol" "_MOTIF_DRAG_AND_DROP_MESSAGE" "XdndEnter" "XdndPosition" "XdndLeave" "XdndDrop" x-dnd-init-xdnd-for-frame x-dnd-init-motif-for-frame] 4 (#$ . 3157)])
#@88 Return the entry in `x-dnd-current-state' for a frame or window.

(fn FRAME-OR-WINDOW)
(defalias 'x-dnd-get-state-cons-for-frame #[257 "\302!\203\n\211\202
\303!\304\305\"\306\"\204 \211\307	!BB\306\"\207" [x-dnd-current-state x-dnd-empty-state framep window-frame frame-parameter display assoc copy-sequence] 6 (#$ . 3619)])
#@88 Return the state in `x-dnd-current-state' for a frame or window.

(fn FRAME-OR-WINDOW)
(defalias 'x-dnd-get-state-for-frame #[257 "\300!A\207" [x-dnd-get-state-cons-for-frame] 3 (#$ . 3963)])
#@413 The default test function for drag and drop.
WINDOW is where the mouse is when this function is called.  It may be
a frame if the mouse is over the menu bar, scroll bar or tool bar.
ACTION is the suggested action from the source, and TYPES are the
types the drop data can have.  This function only accepts drops with
types in `x-dnd-known-types'.  It always returns the action private.

(fn WINDOW ACTION TYPES)
(defalias 'x-dnd-default-test-function #[771 "\300!\211\205\n\301B\207" [x-dnd-choose-type private] 6 (#$ . 4163)])
#@154 Return the type we want the DND data to be in for the current drop.
FRAME-OR-WINDOW is the frame or window that the mouse is over.

(fn FRAME-OR-WINDOW)
(defalias 'x-dnd-current-type #[257 "\300!\301H\207" [x-dnd-get-state-for-frame 4] 3 (#$ . 4701)])
#@122 Remove all state for the last drop.
FRAME-OR-WINDOW is the frame or window that the mouse is over.

(fn FRAME-OR-WINDOW)
(defalias 'x-dnd-forget-drop #[257 "\301!\302!\241\207" [x-dnd-empty-state x-dnd-get-state-cons-for-frame copy-sequence] 4 (#$ . 4961)])
#@255 Call `x-dnd-test-function' if something has changed.
WINDOW is the window the mouse is over.  ACTION is the suggested
action from the source.  If nothing has changed, return the last
action and type we got from `x-dnd-test-function'.

(fn WINDOW ACTION)
(defalias 'x-dnd-maybe-call-test-function #[514 "\302!\205	\303!\304!\305H\232\203$\306H\232\203$\307H\232\204Gr\203,q\210\310H#\311A	\"A\312\205C#\266\203)\266\304!\211\313H\314HB\207" [x-dnd-test-function x-dnd-types-alist window-live-p window-buffer x-dnd-get-state-for-frame 0 1 3 2 assoc x-dnd-save-state 5 4] 10 (#$ . 5228)])
#@378 Save the state of the current drag and drop.
WINDOW is the window the mouse is over.  ACTION is the action suggested
by the source.  ACTION-TYPE is the result of calling `x-dnd-test-function'.
If given, TYPES are the types for the drop data that the source supports.
EXTRA-DATA is data needed for a specific protocol.

(fn WINDOW ACTION ACTION-TYPE &optional TYPES EXTRA-DATA)
(defalias 'x-dnd-save-state #[1283 "\300!\211\301@I\210\211\302AI\210\211\303I\210\203\211\304I\210\203'\211\305I\210\211\306I\210\211\307\310!\205:\311!I\210\312!\241\207" [x-dnd-get-state-for-frame 5 4 3 2 6 1 0 window-live-p window-buffer x-dnd-get-state-cons-for-frame] 10 (#$ . 5852)])
#@356 Handle one item of type text/x-moz-url.
WINDOW is the window where the drop happened.  ACTION is ignored.
DATA is the moz-url, which is formatted as two strings separated by \r\n.
The first string is the URL, the second string is the title of that URL.
DATA is encoded in utf-16.  Decode the URL and call `x-dnd-handle-uri-list'.

(fn WINDOW ACTION DATA)
(defalias 'x-dnd-handle-moz-url #[771 "\300 \301=\203\302\202\f\303\304\"\305\306\307#\211@\310#\207" [byteorder 66 utf-16be utf-16le decode-coding-string split-string "[
\n]" t x-dnd-handle-uri-list] 11 (#$ . 6549)])
#@148 Decode the UTF-8 text and insert it at point.
TEXT is the text as a string, WINDOW is the window where the drop happened.

(fn WINDOW ACTION TEXT)
(defalias 'x-dnd-insert-utf8-text #[771 "\300\301\302\"#\207" [dnd-insert-text decode-coding-string utf-8] 9 (#$ . 7140)])
#@149 Decode the UTF-16 text and insert it at point.
TEXT is the text as a string, WINDOW is the window where the drop happened.

(fn WINDOW ACTION TEXT)
(defalias 'x-dnd-insert-utf16-text #[771 "\300 \301=\203\302\202\f\303\304\305\"#\207" [byteorder 66 utf-16be utf-16le dnd-insert-text decode-coding-string] 10 (#$ . 7420)])
#@151 Decode the compound text and insert it at point.
TEXT is the text as a string, WINDOW is the window where the drop happened.

(fn WINDOW ACTION TEXT)
(defalias 'x-dnd-insert-ctext #[771 "\300\301\302\"#\207" [dnd-insert-text decode-coding-string compound-text-with-extensions] 9 (#$ . 7756)])
#@211 Split an uri-list into separate URIs and call `dnd-handle-one-url'.
WINDOW is the window where the drop happened.
STRING is the uri-list as a string.  The URIs are separated by \r\n.

(fn WINDOW ACTION STRING)
(defalias 'x-dnd-handle-uri-list #[771 "\300\301\302#\303\211\203#\211@\304#\211\203\211\262\210A\266\202\202\210\207" [split-string "[
\n]" t nil dnd-handle-one-url] 11 (#$ . 8059)])
#@190 Convert file names to URLs and call `dnd-handle-one-url'.
WINDOW is the window where the drop happened.
STRING is the file names as a string, separated by nulls.

(fn WINDOW ACTION STRING)
(defalias 'x-dnd-handle-file-name #[771 "\302\303\304#\206\n	\305\211\203=\211@\203\306\"\262\307\310\311\302\312\"\312#P\313		#\211\2034\211\262\266A\266\202\202\f\210\207" [file-name-coding-system default-file-name-coding-system split-string "[
\n]" t nil encode-coding-string "file://" mapconcat url-hexify-string "/" dnd-handle-one-url] 14 (#$ . 8475)])
#@324 Choose which type we want to receive for the drop.
TYPES are the types the source of the drop offers, a vector of type names
as strings or symbols.  Select among the types in `x-dnd-known-types' or
KNOWN-TYPES if given, and return that type name.
If no suitable type is found, return nil.

(fn TYPES &optional KNOWN-TYPES)
(defalias 'x-dnd-choose-type #[513 "\211\206\211@\211\205@\3012@G\302\211W\203<H\2119\203&\303!\202'\211\232\2033\304\301\"\210\266\211T\262\202\266\3050\211\204OA\203O\306A\"\207\207" [x-dnd-known-types done 0 symbol-name throw nil x-dnd-choose-type] 11 (#$ . 9050)])
#@397 Drop one data item onto a frame.
EVENT is the client message for the drop, FRAME is the frame the drop
occurred on.  WINDOW is the window of FRAME where the drop happened.
DATA is the data received from the source, and type is the type for DATA,
see `x-dnd-types-alist').

Returns the action used (move, copy, link, private) if drop was successful,
nil if not.

(fn EVENT FRAME WINDOW DATA TYPE)
(defalias 'x-dnd-drop-data #[1285 "\303\"\211A\304!\211\305H\306	!\211@\262\205N\307!\203?\310!\204?\311!\204?	\2047\312\306!!b\210	#\207\313\314	!\210	#)\207" [x-dnd-types-alist mouse-yank-at-point dnd-open-file-other-window assoc x-dnd-get-state-for-frame 5 event-start window-live-p window-minibuffer-p window-dedicated-p posn-point t select-frame] 14 (#$ . 9677)])
#@127 Receive drag and drop events (X client messages).
Currently XDND, Motif and old KDE 1.x protocols are recognized.

(fn EVENT)
(defalias 'x-dnd-handle-drag-n-drop-event #[257 "\211AA@\300!\211@\262\301H\302H\303H\304H\305\267\202;\306&\207\307&\207G\310V\205Y\301\310O\311\232\205Y\312&\207" [event-start 0 1 2 3 #s(hash-table size 2 test equal rehash-size 1.5 rehash-threshold 0.8125 purecopy t data ("DndProtocol" 29 "_MOTIF_DRAG_AND_DROP_MESSAGE" 44)) x-dnd-handle-old-kde x-dnd-handle-motif 4 "Xdnd" x-dnd-handle-xdnd] 14 (#$ . 10478) "e"])
#@80 Open the files in a KDE 1.x drop.

(fn EVENT FRAME WINDOW MESSAGE FORMAT DATA)
(defalias 'x-dnd-handle-old-kde #[1542 "\300\301\302\303\304%\305\306\307\310\311##\207" [x-window-property "DndSelection" nil 0 t x-dnd-handle-uri-list private replace-regexp-in-string "$" ""] 14 (#$ . 11076)])
#@49 Mapping from XDND action types to Lisp symbols.
(defconst x-dnd-xdnd-to-action '(("XdndActionPrivate" . private) ("XdndActionCopy" . copy) ("XdndActionMove" . move) ("XdndActionLink" . link) ("XdndActionAsk" . ask)) (#$ . 11379))
#@79 Set the XdndAware property for FRAME to indicate that we do XDND.

(fn FRAME)
(defalias 'x-dnd-init-xdnd-for-frame #[257 "\300\301\302\303\304\305&\207" [x-change-window-property "XdndAware" (5) "ATOM" 32 t] 8 (#$ . 11615)])
#@285 Return the width/height to be sent in a XDndStatus message.
FRAME is the frame and W is the window where the drop happened.
If ACCEPT is nil return 0 (empty rectangle),
otherwise if W is a window, return its width/height,
otherwise return the frame width/height.

(fn FRAME W ACCEPT)
(defalias 'x-dnd-get-drop-width-height #[771 "\211\203$\300!\203\301!\3028@Z\3038A@ZB\207\304!\305!B\207\306\207" [windowp window-inside-pixel-edges 2 3 frame-pixel-width frame-pixel-height 0] 7 (#$ . 11849)])
#@274 Return the x/y coordinates to be sent in a XDndStatus message.
Coordinates are required to be absolute.
FRAME is the frame and W is the window where the drop happened.
If W is a window, return its absolute coordinates,
otherwise return the frame coordinates.

(fn FRAME W)
(defalias 'x-dnd-get-drop-x-y #[514 "\300\301\"\243\242\206
\300\301\"\300\302\"\243\242\206\300\302\"\303!\203.\304!@\\A@\\B\207B\207" [frame-parameter left top windowp window-inside-pixel-edges] 8 (#$ . 12361)])
#@84 Return the version byte from the 32 bit FLAGS in an XDndEnter message.

(fn FLAGS)
(defalias 'x-dnd-version-from-flags #[257 "\300\301\"\207" [ash -24] 4 (#$ . 12870)])
#@87 Return the nmore-than3 bit from the 32 bit FLAGS in an XDndEnter message.

(fn FLAGS)
(defalias 'x-dnd-more-than-3-from-flags #[257 "\300\301\"\207" [logand 1] 4 (#$ . 13046)])
#@317 Receive one XDND event (client message) and send the appropriate reply.
EVENT is the client message.  FRAME is where the mouse is now.
WINDOW is the window within FRAME where the mouse is now.
FORMAT is 32 (not used).  MESSAGE is the data part of an XClientMessageEvent.

(fn EVENT FRAME WINDOW MESSAGE FORMAT DATA)
(defalias 'x-dnd-handle-xdnd #[1542 "\301\267\202\211\302H\303!\304!\305H\306\307#\210\205J\310\311\211\305V\2035\312\313\314\311\315&\202I\316\317\n\320H!\317\321H!\317\f\322H!#$\207\317\322H!\305H\323\324\"A\"\325@\"@\211\203n\203n\302\202o\305\326\327\330\"!\331\f\f\"\332

\302=#\206\214\305\257\333
\334\335&\207\336!\207\337!\203\252\340!\210\211\305H\320H\341!\205\301\342\343\344\341	!!#\311\211\205\345\3451\335\346\341!%0\202\345\306\347\"\210\311\262\262\211\203\357\302\202\360\305\262\333\n\f\350\335\326\327\330\"!\211\203\f\351\202
\305E&\210\336	!\207\352\353#\207" [x-dnd-xdnd-to-action #s(hash-table size 4 test equal rehash-size 1.5 rehash-threshold 0.8125 purecopy t data ("XdndEnter" 6 "XdndPosition" 75 "XdndLeave" 156 "XdndDrop" 160)) 1 x-dnd-version-from-flags x-dnd-more-than-3-from-flags 0 message "%s %s" x-dnd-save-state nil x-window-property "XdndTypeList" "AnyPropertyType" t vector x-get-atom-name 2 3 4 x-dnd-maybe-call-test-function assoc rassoc string-to-number frame-parameter outer-window-id x-dnd-get-drop-x-y x-dnd-get-drop-width-height x-send-client-message "XdndStatus" 32 x-dnd-forget-drop windowp select-window x-dnd-current-type x-get-selection-internal XdndSelection intern (error) x-dnd-drop-data "Error: %s" "XdndFinished" "XdndActionPrivate" error "Unknown XDND message %s %s"] 21 (#$ . 13231)])
#@87 Set _MOTIF_DRAG_RECEIVER_INFO for FRAME to indicate that we do Motif DND.

(fn FRAME)
(defalias 'x-dnd-init-motif-for-frame #[257 "\300\301\302 \303\304\303\211\211\211\211\211\211\211\211\211\211\211\211\257\301\305\306&\207" [x-change-window-property "_MOTIF_DRAG_RECEIVER_INFO" byteorder 0 5 8 t] 19 (#$ . 14996)])
#@35 

(fn DATA OFFSET SIZE BYTEORDER)
(defalias 'x-dnd-get-motif-value #[1028 "\300\267\202q\211\301=\203\302TH\303\"H\\\207\302H\303\"TH\\\207\211\301=\203N\304\302\305\\H\306\"\302\307\\H\310\"\302TH\303\"H$\207\304\302H\306\"\302TH\310\"\302\307\\H\303\"\305\\H$\207\311\207" [#s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (2 6 4 36)) 108 ash 8 + 3 24 2 16 nil] 11 (#$ . 15323)])
#@29 

(fn VALUE SIZE BYTEORDER)
(defalias 'x-dnd-motif-value-to-list #[771 "\300\267\2024\301\302\303\"\304\"\301\304\"D\2025\301\302\305\"\304\"\301\302\306\"\304\"\301\302\303\"\304\"\301\304\"F\2025\307\310=\203?\311!\207\207" [#s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (2 6 4 21)) logand ash -8 255 -24 -16 nil 108 reverse] 9 (#$ . 15789)])
#@50 Mapping from numbers to Motif DND message types.
(defvar x-dnd-motif-message-types '((0 . XmTOP_LEVEL_ENTER) (1 . XmTOP_LEVEL_LEAVE) (2 . XmDRAG_MOTION) (3 . XmDROP_SITE_ENTER) (4 . XmDROP_SITE_LEAVE) (5 . XmDROP_START) (6 . XmDROP_FINISH) (7 . XmDRAG_DROP_FINISH) (8 . XmOPERATION_CHANGED)) (#$ . 16194))
#@49 Mapping from number to operation for Motif DND.
(defvar x-dnd-motif-to-action '((1 . move) (2 . copy) (3 . link) (4 . link) (2 . private)) (#$ . 16506))
#@52 

(fn EVENT FRAME WINDOW MESSAGE-ATOM FORMAT DATA)
(defalias 'x-dnd-handle-motif #[1542 "\302\303H\"A\304H\305 \306\307\211$\302\310\311\"	\"A\312\267\202\313\306\313\314$\306\315\314$\316!\211\205=\317\320!\321\"\322!\210\211\205O\323
\324\211%\207\324\207\325\n!\326\306\314\211	$\314#\326\306	\313\307\n$\307#\326\306\n\327\307$\307#\330H\331H?\332\"\333@	\"@\326\203\235\334\\\335\\\202\236\334\307
#\336\337\203\254\331\202\255\307\\
D\n\n\n%\340\341\313&\207\325\n!\326\306\314\211	$\314#\330H\332\f\"\333@	\"@\326\203\363\334\\\335\\\202\364\334\307\n#\336\342\nD#\340\341\313&\207\326\306\313\307$\307#\326\306\327\307	$\307#\306\315\314	$\316!\306\n\343\314$\332\"\333@	\"@\326\203T\334\\\335\\\202U\344\307\f#\336\345\fD\n\n$\306\314\211$\324\340\341\313&\210\205\263\205\263\317\320	!\320\346!!\"\211\205\261\3471\251\350\346!%0\202\261\351\352\"\210\324\262\262\262\317\320	!\203\302\353\202\303\354#\210\322!\207\355\356	#\207" [x-dnd-motif-message-types x-dnd-motif-to-action assoc 0 1 byteorder x-dnd-get-motif-value 2 logand 15 #s(hash-table size 5 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (XmTOP_LEVEL_ENTER 32 XmTOP_LEVEL_LEAVE 80 XmDRAG_MOTION 82 XmOPERATION_CHANGED 199 XmDROP_START 271)) 8 4 12 x-get-atom-name x-get-selection-internal intern TARGETS x-dnd-forget-drop x-dnd-save-state nil x-dnd-get-state-for-frame x-dnd-motif-value-to-list 10 6 3 x-dnd-maybe-call-test-function rassoc 48 1792 append 128 x-send-client-message "_MOTIF_DRAG_AND_DROP_MESSAGE" 136 16 560 133 x-dnd-current-type (error) x-dnd-drop-data message "Error: %s" XmTRANSFER_SUCCESS XmTRANSFER_FAILURE error "Unknown Motif DND message %s %s"] 30 (#$ . 16665)])
(provide 'x-dnd)

Youez - 2016 - github.com/yon3zu
LinuXploit