MMCT TEAM
Server IP : 111.118.215.189  /  Your IP : 18.223.23.24
Web Server : Apache
System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : a1673wkz ( 2475)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /usr/share/emacs/24.3/lisp/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //usr/share/emacs/24.3/lisp/x-dnd.elc
;ELC
;;; Compiled by mockbuild@buildfarm06-new.corp.cloudlinux.com on Fri Oct 11 10:12:51 2024
;;; from file /builddir/build/BUILD/emacs-24.3/lisp/x-dnd.el
;;; in Emacs version 24.3
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.

;;; This file does not contain utf-8 non-ASCII characters,
;;; and so can be loaded in Emacs versions earlier than 23.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(byte-code "\300\301!\210\302\303\304\305\306\307\310\311\312\313&	\210\302\314\315\316\306\307\310\317\312\313&	\210\302\320\321\322\306\307\310\323\312\313&	\207" [require dnd custom-declare-variable x-dnd-test-function 'x-dnd-default-test-function "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 `((,(purecopy "text/uri-list") . x-dnd-handle-uri-list) (,(purecopy "text/x-moz-url") . x-dnd-handle-moz-url) (,(purecopy "_NETSCAPE_URL") . x-dnd-handle-uri-list) (,(purecopy "FILE_NAME") . x-dnd-handle-file-name) (,(purecopy "UTF8_STRING") . x-dnd-insert-utf8-text) (,(purecopy "text/plain;charset=UTF-8") . x-dnd-insert-utf8-text) (,(purecopy "text/plain;charset=utf-8") . x-dnd-insert-utf8-text) (,(purecopy "text/unicode") . x-dnd-insert-utf16-text) (,(purecopy "text/plain") . dnd-insert-text) (,(purecopy "COMPOUND_TEXT") . x-dnd-insert-ctext) (,(purecopy "STRING") . dnd-insert-text) (,(purecopy "TEXT") . dnd-insert-text)) "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 (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")) "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 (#$ . 3088))
(defvar x-dnd-empty-state [nil nil nil nil nil nil nil])
#@69 Setup drag and drop for FRAME (i.e. create appropriate properties).
(defalias 'x-dnd-init-frame #[(&optional frame) "\301!\302=\205-\303\304\"\210\303\305\"\210\303\306\"\210\303\307\"\210\303\310\"\210\303\311\"\210\312!\210\313!\207" [frame 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] 3 (#$ . 3608)])
#@66 Return the entry in `x-dnd-current-state' for a frame or window.
(defalias 'x-dnd-get-state-cons-for-frame #[(frame-or-window) "\305!\203\n\202
\306!\307	\302\"\310\n\"\204\"\n\311\f!BB\310\n\"*\207" [frame-or-window frame display x-dnd-current-state x-dnd-empty-state framep window-frame frame-parameter assoc copy-sequence] 3 (#$ . 4068)])
#@66 Return the state in `x-dnd-current-state' for a frame or window.
(defalias 'x-dnd-get-state-for-frame #[(frame-or-window) "\301!A\207" [frame-or-window x-dnd-get-state-cons-for-frame] 2 (#$ . 4428)])
#@387 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.
(defalias 'x-dnd-default-test-function #[(_window _action types) "\302!\211\205\303	B)\207" [types type x-dnd-choose-type private] 3 (#$ . 4636)])
#@132 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.
(defalias 'x-dnd-current-type #[(frame-or-window) "\301!\302H\207" [frame-or-window x-dnd-get-state-for-frame 4] 2 (#$ . 5180)])
#@100 Remove all state for the last drop.
FRAME-OR-WINDOW is the frame or window that the mouse is over.
(defalias 'x-dnd-forget-drop #[(frame-or-window) "\302!\303	!\241\207" [frame-or-window x-dnd-empty-state x-dnd-get-state-cons-for-frame copy-sequence] 3 (#$ . 5448)])
#@235 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'.
(defalias 'x-dnd-maybe-call-test-function #[(window action) "\306!\205	\307!\310!\211	\311H\232\203&	\312H\232\203&	\313H\232\204Kr\n\203.\nq\210\f	\314H#\315
A\"A\316\205H
#+*\310!\211\317H	\320H)B\207" [window current-state buffer action x-dnd-test-function action-type window-live-p window-buffer x-dnd-get-state-for-frame 0 1 3 2 assoc x-dnd-save-state 5 4 x-dnd-types-alist handler] 6 (#$ . 5723)])
#@319 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.
(defalias 'x-dnd-save-state #[(window action action-type &optional types extra-data) "\306!\211\307\n@I\210	\310\nAI\210	\311I\210\f\203	\312\fI\210
\203'	\313
I\210	\314I\210	\315\316!\2057\317!I\210\320!	\241)\207" [window current-state action-type action types extra-data 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] 5 (#$ . 6395)])
#@331 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'.
(defalias 'x-dnd-handle-moz-url #[(window action data) "\306 \307=\203\310\202\f\311\312	\"\313\n\314\315#\211@\316
\f#,\207" [coding data string strings url window byteorder 66 utf-16be utf-16le decode-coding-string split-string "[
\n]" t x-dnd-handle-uri-list action] 5 (#$ . 7122)])
#@123 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.
(defalias 'x-dnd-insert-utf8-text #[(window action text) "\303	\304\n\305\"#\207" [window action text dnd-insert-text decode-coding-string utf-8] 6 (#$ . 7755)])
#@124 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.
(defalias 'x-dnd-insert-utf16-text #[(window action text) "\304 \305=\203\306\202\f\307\310	\n\311\"#)\207" [coding window action text byteorder 66 utf-16be utf-16le dnd-insert-text decode-coding-string] 6 (#$ . 8047)])
#@126 Decode the compound text and insert it at point.
TEXT is the text as a string, WINDOW is the window where the drop happened.
(defalias 'x-dnd-insert-ctext #[(window action text) "\303	\304\n\305\"#\207" [window action text dnd-insert-text decode-coding-string compound-text-with-extensions] 6 (#$ . 8403)])
#@184 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.
(defalias 'x-dnd-handle-uri-list #[(window action string) "\306\307\310#\311\211\311\211\203*\f@\312
#\211\f\203\"\f)\fA\211\204*	*\207" [string retval uri-list bf --dolist-tail-- window split-string "[
\n]" t nil dnd-handle-one-url action did-action] 5 (#$ . 8718)])
#@163 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.
(defalias 'x-dnd-handle-file-name #[(window action string) "\306\307\310#\311\312!\205	\206\n\313\211\313\211\203V@\f\203.\314\f\"\315\316\317\306\320\"\320#P\321#\211\203L*A\211\204*+\207" [string file-name-coding-system default-file-name-coding-system retval coding uri-list split-string "[
\n]" t default-value enable-multibyte-characters nil encode-coding-string "file://" mapconcat url-hexify-string "/" dnd-handle-one-url bf --dolist-tail-- file-uri window action did-action] 7 (#$ . 9194)])
#@290 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.
(defalias 'x-dnd-choose-type #[(types &optional known-types) "\206	\211@\f\205\306\307\215\211	\204%\nA\203%\310\f\nA\"\202'	,\207" [known-types x-dnd-known-types known-list first-known-type types types-array done (byte-code "G\306	\nW\203/	H\2119\203\307!\202
\f\232\203'\310\311
\"\210*	T\211\202*\312\207" [types-array i --dotimes-limit-- type typename first-known-type 0 symbol-name throw done nil] 4) x-dnd-choose-type found] 4 (#$ . 9907)])
#@362 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.
(defalias 'x-dnd-drop-data #[(event frame window data type) "\306	\"\211A\307\f!\211\310H\311!\211@)\205y\312!\203i\313!\204i\314!\204i\204^\311!\3108\206[A@:\203WA@@\202[A@)b\210#\202y\315\316\f!\210#)-\207" [type x-dnd-types-alist type-info handler frame state assoc x-dnd-get-state-for-frame 5 event-start window-live-p window-minibuffer-p window-dedicated-p t select-frame action event position w mouse-yank-at-point window data dnd-open-file-other-window] 5 (#$ . 10681)])
#@115 Receive drag and drop events (X client messages).
Currently XDND, Motif and old KDE 1.x protocols are recognized.
(defalias 'x-dnd-handle-drag-n-drop-event #[(event) "AA@\306!\211@)	\307H	\310H	\311H	\312H\f\313\232\2033\314
\f&\202b\f\315\232\203G\316
\f&\202b\fG\317V\205b\f\307\317O\320\232\205b\321
\f&.\207" [event client-message position window message-atom frame event-start 0 1 2 3 "DndProtocol" x-dnd-handle-old-kde "_MOTIF_DRAG_AND_DROP_MESSAGE" x-dnd-handle-motif 4 "Xdnd" x-dnd-handle-xdnd format data] 8 (#$ . 11585) "e"])
#@35 Open the files in a KDE 1.x drop.
(defalias 'x-dnd-handle-old-kde #[(_event frame window _message _format _data) "\303\304\305\306\307%\310\n\311\312\313\314	##)\207" [frame values window x-window-property "DndSelection" nil 0 t x-dnd-handle-uri-list private replace-regexp-in-string "$" ""] 7 (#$ . 12166)])
#@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)) (#$ . 12484))
#@67 Set the XdndAware property for FRAME to indicate that we do XDND.
(defalias 'x-dnd-init-xdnd-for-frame #[(frame) "\301\302\303\304\305\306&\207" [frame x-change-window-property "XdndAware" (5) "ATOM" 32 t] 7 (#$ . 12720)])
#@264 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.
(defalias 'x-dnd-get-drop-width-height #[(frame w accept) "\203&\304	!\203\305	!\306\n8\n@Z\307\n8\nA@Z)B\207\310!\311!B\207\312\207" [accept w edges frame windowp window-inside-pixel-edges 2 3 frame-pixel-width frame-pixel-height 0] 3 (#$ . 12952)])
#@260 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.
(defalias 'x-dnd-get-drop-x-y #[(frame w) "\306\307\"\211:\203	A@\202	\306\310\"\211:\203\"A@\202#\311
!\203?\312
!\n@\\\fA@\\)B\202B\n\fB,\207" [frame frame-left frame-real-left frame-top frame-real-top w frame-parameter left top windowp window-inside-pixel-edges edges] 4 (#$ . 13480)])
#@71 Return the version byte from the 32 bit FLAGS in an XDndEnter message
(defalias 'x-dnd-version-from-flags #[(flags) ":\203\301@\302\"\207\301\303\"\207" [flags ash -8 -24] 3 (#$ . 14056)])
#@74 Return the nmore-than3 bit from the 32 bit FLAGS in an XDndEnter message
(defalias 'x-dnd-more-than-3-from-flags #[(flags) ":\203\301A\302\"\207\301\302\"\207" [flags logand 1] 3 (#$ . 14256)])
#@272 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.
(defalias 'x-dnd-handle-xdnd #[(event frame window message _format data) "\306\232\203L	\307H\310\n!\311\n!	\312H\300\313\f#\210\205J\3143\315\211\f\312V\2038\316\3174\320
\315\321&\202I\322\323	\324H!\323	\325H!\323	\326H!#$,\207\327\232\203\266\323	\326H!5	\312H\3303\33156\"A\"7\3327@6\"@\2118\203\2017\203\201\307\202\202\3129\333\3344\335\"!9\33643\"\337439\307=#8\206\243\312\257:\3404
4\341\342:&.\207\343\232\203\301\3443!\207\345\232\203)\3463!\203\323\3473!\210	\312H\3503!\205\347\351\352\353\3503!!\";\315\211<5;\205\370\354\355\356\217\2115\203\307\202\312<\3404
4\357\342\333\3344\335\"!<\211\203\360\202\312E&\210\3443!,\207\361\362	#\207" [message data flags version more-than-3 dnd-source "XdndEnter" 1 x-dnd-version-from-flags x-dnd-more-than-3-from-flags 0 "%s %s" x-dnd-save-state nil x-window-property "XdndTypeList" "AnyPropertyType" t vector x-get-atom-name 2 3 4 "XdndPosition" 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 "XdndLeave" x-dnd-forget-drop "XdndDrop" windowp select-window x-dnd-current-type x-get-selection-internal XdndSelection intern info (byte-code "\304	\n\305\n!%\207" [event frame window value x-dnd-drop-data x-dnd-current-type] 7) ((error (message "Error: %s" info) nil)) "XdndFinished" "XdndActionPrivate" error "Unknown XDND message %s %s" window frame action x-dnd-xdnd-to-action action-type reply-action accept list-to-send value success] 12 (#$ . 14462)])
#@75 Set _MOTIF_DRAG_RECEIVER_INFO for FRAME to indicate that we do Motif DND.
(defalias 'x-dnd-init-motif-for-frame #[(frame) "\301\302\303 \304\305\304\211\211\211\211\211\211\211\211\211\211\211\211\257\302\306\307&\207" [frame x-change-window-property "_MOTIF_DRAG_RECEIVER_INFO" byteorder 0 5 8 t] 18 (#$ . 16362)])
(defalias 'x-dnd-get-motif-value #[(data offset size byteorder) "\304=\203$	\305=\203\306\nTH\307\"\nH\\\207\306\nH\307\"\nTH\\\207\310=\205e	\305=\203K\306\n\311\\H\307\"\n\304\\H\\\306\nTH\307\"\nH\\B\207\306\nH\307\"\nTH\\\306\n\304\\H\307\"\n\311\\H\\B\207" [size byteorder data offset 2 108 ash 8 4 3] 5])
(defalias 'x-dnd-motif-value-to-list #[(value size byteorder) "\304=\203\305\306	\307\"\310\"\305	\310\"D\202X\311=\205X	:\203>\305\306	@\307\"\310\"\305	@\310\"\305\306	A\307\"\310\"\305	A\310\"F\202X\305\306	\312\"\310\"\305\306	\313\"\310\"\305\306	\307\"\310\"\305	\310\"F\314=\203e\315\n!\202f\n)\207" [size value bytes byteorder 2 logand lsh -8 255 4 -24 -16 108 reverse] 6])
#@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)) (#$ . 17411))
#@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)) (#$ . 17723))
(defalias 'x-dnd-handle-motif #[(event frame window message-atom _format data) "\306\307H	\"A\310H\311 \312\313\211$\306\314
\315\"7\"A8\n\316=\203b\312\317\320$9\312\321\320$:\322:!\211;\205H\323\324;!\325\"<\326=!\210<\205^\327>\330\211<9%,\202$\n\331=\203l\330\202$\n\332=\203\374\333=!?\334\312\320\211$\320\f#@\334\312\317\313$\313\f#A\334\312\335\313$\313\f#B?\336H9?\337H?C\340>8\"D\341D@7\"@E\334E\203\312\342E\343\344#\202\313\343\313\f#F\345\346C\203\333\337\202\334\313\\\fDF@AB%G\347=9=\350\317G&.\n\202$\n\351=\203^\333=!?\334\312\320\211$\320\f#@?\336H9\340>8\"D\341D@7\"@E\334E\203;\342E\343\344#\202<\343\313\f#F\345\352\fDF@#G\347=9=\350\317G&.\202$\n\353=\203\334\312\317\313$\313\f#A\334\312\335\313$\313\f#B\312\321\320$:\322:!;\312\354\320$9\340>8\"D\341D@7\"@E\334E\203\263\342E\343\344#\202\264\355\313\f#F\345\356\fDFAB$G\312\320\211$@\330H\347=9=\350\317G&\210E\205;\205\323\324;!\324\357>!!\"\211I\205\377\360\361\362\217)H\323\324;!H\203\363\202\364@#\210\326=!.\202$\365\366J#-\207" [data x-dnd-motif-message-types message-type source-byteorder my-byteorder source-flags assoc 0 1 byteorder x-dnd-get-motif-value 2 logand 15 XmTOP_LEVEL_ENTER 8 4 12 x-get-atom-name x-get-selection-internal intern TARGETS x-dnd-forget-drop x-dnd-save-state nil XmTOP_LEVEL_LEAVE XmDRAG_MOTION 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" XmOPERATION_CHANGED 136 XmDROP_START 16 560 133 x-dnd-current-type info (byte-code "\304	\n\305\n!%\207" [event frame window value x-dnd-drop-data x-dnd-current-type] 7) ((error (message "Error: %s" info) nil)) XmTRANSFER_SUCCESS XmTRANSFER_FAILURE error "Unknown Motif DND message %s %s" x-dnd-motif-to-action source-action dnd-source selection-atom atom-name types frame window state timestamp x y first-move action-type reply-action reply-flags reply action value message-atom] 8])
(provide 'x-dnd)

MMCT - 2023