;ELC   
;;; Compiled
;;; in Emacs version 29.4
;;; with all optimizations.



(byte-code "\301\302!\204 \303\304\"\210\305\306!\210\305\307!\210\305\310!\210\305\311!\210\305\312!\210\305\313!\210\314\315\316\"\207" [invocation-name featurep haiku error "%s: Loading haiku-win without having Haiku" require frame mouse scroll-bar menu-bar fontset dnd add-to-list display-format-alist (".*" . haiku)] 3)#@59 The local value of the special `XdndSelection' selection.
(defvar haiku-dnd-selection-value nil (#$ . 410))#@758 Alist of X selection types to functions that act as selection converters.
The functions should accept a single argument VALUE, describing
the value of the drag-and-drop selection, and return a list of
two elements TYPE and DATA, where TYPE is a string containing the
MIME type of DATA, and DATA is a unibyte string, or nil if the
data could not be converted.

DATA may also be a list of items; that means to add every
individual item in DATA to the serialized message, instead of
DATA in its entirety.

DATA can optionally have a text property `type', which specifies
the type of DATA inside the system message (see the doc string of
`haiku-drag-message' for more details).  If DATA is a list, then
that property is obtained from the first element of DATA.
(defvar haiku-dnd-selection-converters '((STRING . haiku-dnd-convert-string) (FILE_NAME . haiku-dnd-convert-file-name) (text/uri-list . haiku-dnd-convert-text-uri-list)) (#$ . 524))#@467 List of functions which act as selection encoders.
These functions accept two arguments SELECTION and VALUE, and
return an association appropriate for a serialized system
message (or nil if VALUE is not applicable to the encoder) that
will be put into the system selection SELECTION.  VALUE is the
content that is being put into the selection by
`gui-set-selection'.  See the doc string of `haiku-drag-message'
for more details on the structure of the associations.
(defvar haiku-normal-selection-encoders '(haiku-select-encode-xstring haiku-select-encode-utf-8-string haiku-select-encode-file-name) (#$ . 1469))
(byte-code "\302\303	\"\303\207" [haiku-allowed-ui-colors x-colors ["B_PANEL_BACKGROUND_COLOR" "B_MENU_BACKGROUND_COLOR" "B_WINDOW_TAB_COLOR" "B_KEYBOARD_NAVIGATION_COLOR" "B_DESKTOP_COLOR" "B_MENU_SELECTED_BACKGROUND_COLOR" "B_MENU_ITEM_TEXT_COLOR" "B_MENU_SELECTED_ITEM_TEXT_COLOR" "B_MENU_SELECTED_BORDER_COLOR" "B_PANEL_TEXT_COLOR" "B_DOCUMENT_BACKGROUND_COLOR" "B_DOCUMENT_TEXT_COLOR" "B_CONTROL_BACKGROUND_COLOR" "B_CONTROL_TEXT_COLOR" "B_CONTROL_BORDER_COLOR" "B_CONTROL_HIGHLIGHT_COLOR" "B_NAVIGATION_PULSE_COLOR" "B_SHINE_COLOR" "B_SHADOW_COLOR" "B_TOOLTIP_BACKGROUND_COLOR" "B_TOOLTIP_TEXT_COLOR" "B_WINDOW_TEXT_COLOR" "B_WINDOW_INACTIVE_TAB_COLOR" "B_WINDOW_INACTIVE_TEXT_COLOR" "B_WINDOW_BORDER_COLOR" "B_WINDOW_INACTIVE_BORDER_COLOR" "B_CONTROL_MARK_COLOR" "B_LIST_BACKGROUND_COLOR" "B_LIST_SELECTED_BACKGROUND_COLOR" "B_LIST_ITEM_TEXT_COLOR" "B_LIST_SELECTED_ITEM_TEXT_COLOR" "B_SCROLL_BAR_THUMB_COLOR" "B_LINK_TEXT_COLOR" "B_LINK_HOVER_COLOR" "B_LINK_VISITED_COLOR" "B_LINK_ACTIVE_COLOR" "B_STATUS_BAR_COLOR" "B_SUCCESS_COLOR" "B_FAILURE_COLOR"] append] 3)#@166 Return bounds of selection value VALUE.
The return value is a list (BEG END BUF) if VALUE is a cons of
two markers or an overlay.  Otherwise, it is nil.

(fn VALUE)
(defalias 'haiku-selection-bounds #[257 "\300!\203 r\211q\210\301\302!\205 \301\302!`E)\207\211:\203U \303@!\203U \303A!\203U \304@!\205T \305\304@!!\205T \304@!\304A!=\205k \306@!\306A!\304@!E\207\307!\205k \310!\205k \311!\312!\310!E\207" [bufferp mark t markerp marker-buffer buffer-name marker-position overlayp overlay-buffer overlay-start overlay-end] 5 (#$ . 3163)])#@195 Convert VALUE to a UTF-8 string and appropriate MIME type.
Return a list of the appropriate MIME type, and UTF-8 data of
VALUE as a unibyte string, or nil if VALUE was not a string.

(fn VALUE)
(defalias 'haiku-dnd-convert-string #[257 "\211;\204& \300!\211\203% \3011! r\3028q\210\211@A@{)0\202# \210\303\262\210\211;\2053 \304\305\306\307\"!D\207" [haiku-selection-bounds (error) 2 nil "text/plain" string-to-unibyte encode-coding-string utf-8] 6 (#$ . 3726)])#@76 Convert VALUE to a file system reference if it is a file name.

(fn VALUE)
(defalias 'haiku-dnd-convert-file-name #[257 "\211;\203 \300!\204 \301!\203 \302\303\304!\305\306#D\207\307!\205H \302\310\311\211T\262GW\203C H\262\303\304!\305\306#B\262\202% \211\237\266\203D\207" [file-remote-p file-exists-p "refs" propertize expand-file-name type ref vectorp -1 nil] 9 (#$ . 4199)])#@46 Convert VALUE to a list of URLs.

(fn VALUE)
(defalias 'haiku-dnd-convert-text-uri-list #[257 "\211;\203 \300\301!\302PD\207\303!\205F \300\304\305\306\"r\211q\210\307\310\"\216\311\312T\262GW\203> H\262\301!c\210\302c\210\202# \266\313 *\262D\207" ["text/uri-list" url-encode-url "\n" vectorp generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205	 \302\300!\207" [V0 buffer-name kill-buffer] 2] -1 nil buffer-string] 7 (#$ . 4601)])#@68 Return the numeric value of the system enumerator NAME.

(fn NAME)
(defalias 'haiku-get-numeric-enum #[257 "\211\300N\206S \301\211\302!\303\304T\262GW\203G H\262\211\301W\204) \211\305V\203. \306\307\"\210\310\311GS\312_Z\"\"\262\312\\\262\202 \266\313\314#\210\266\203\207" [haiku-numeric-enum 0 symbol-name -1 nil 255 error "Out of range octet: %d" logior ash 8 put haiku-enumerator-id] 12 (#$ . 5064)])#@69 Expand to the numeric value NAME as a system identifier.

(fn NAME)
(defalias 'haiku-numeric-enum '(macro . #[257 "\300!\207" [haiku-get-numeric-enum] 3 (#$ . 5500)]))#@165 Handle command line X resources specified with the option `-xrm'.
The resources should be a list of strings in COMMAND-LINE-RESOURCES.

(fn COMMAND-LINE-RESOURCES)
(defalias 'haiku--handle-x-command-line-resources #[257 "\211\211\205% \211@\300\301\"\211@\203 \302@\303\304\305A\301#!\"\210\210A\266\202\202 \207" [split-string ":" haiku-put-resource string-trim-left mapconcat identity] 11 (#$ . 5675)])
(byte-code "\300\301\302\303\302\304%\210\300\305\302\306\302\307%\210\300\310\302\311\302\312%\207" [cl-generic-define-method window-system-initialization nil (&context (window-system haiku) &optional display) #[256 "\203 \302\303!\210\304 \210	\203 \305\306	\307\"!\210\310\206 \311	\312#\210\312\211\207" [haiku-initialized x-command-line-resources cl--assertion-failed (not haiku-initialized) create-default-fontset haiku--handle-x-command-line-resources split-string "\n" x-open-connection "be" t] 5 "Set up the window system.  WINDOW-SYSTEM must be HAIKU.\nDISPLAY may be set to the name of a display that will be initialized.\n\n(fn &optional DISPLAY)"] frame-creation-function (params &context (window-system haiku)) #[257 "\300!\207" [x-create-frame-with-faces] 3 "\n\n(fn PARAMS)"] handle-args-function (args &context (window-system haiku)) #[257 "\300!\207" [x-handle-args] 3 "\n\n(fn ARGS)"]] 6)#@110 Convert symbolic selection type TYPE to its MIME equivalent.
If TYPE is nil, return "text/plain".

(fn TYPE)
(defalias 'haiku--selection-type-to-mime #[257 "\211\300\267\202\n \301\207\302\207\211;\203 \207\2119\203 \303!\207\302\207" [#s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (STRING 6 UTF8_STRING 8)) "text/plain;charset=iso-8859-1" "text/plain" symbol-name] 3 (#$ . 7008)])#@186 Find the types of data available from CLIPBOARD.
CLIPBOARD should be the symbol `PRIMARY', `SECONDARY' or
`CLIPBOARD'.  Return the available types as a list of strings.

(fn CLIPBOARD)
(defalias 'haiku-selection-targets #[257 "\300\301\302\303\304\305\"\"\"\207" [delq type mapcar car haiku-selection-data nil] 8 (#$ . 7438)])#@182 Convert VALUE to a system message association.
VALUE will be encoded as Latin-1 (like on X Windows) and stored
under the type `text/plain;charset=iso-8859-1'.

(fn SELECTION VALUE)
(defalias 'haiku-select-encode-xstring #[514 "\211;\204& \300!\211\203% \3011! r\3028q\210\211@A@{)0\202# \210\303\262\210\211;\205< \211\211\304\230\262?\205< \305\306\307\310\"E\207" [haiku-selection-bounds (error) 2 nil "" "text/plain;charset=iso-8859-1" 1296649541 encode-coding-string iso-latin-1] 7 (#$ . 7772)])#@141 Convert VALUE to a system message association.
VALUE will be encoded as UTF-8 and stored under the type
`text/plain'.

(fn SELECTION VALUE)
(defalias 'haiku-select-encode-utf-8-string #[514 "\211;\204& \300!\211\203% \3011! r\3028q\210\211@A@{)0\202# \210\303\262\210\211;\205< \211\211\304\230\262?\205< \305\306\307\310\"E\207" [haiku-selection-bounds (error) 2 nil "" "text/plain" 1296649541 encode-coding-string utf-8-unix] 7 (#$ . 8284)])#@199 Convert VALUE to a system message association.
This takes the file name of VALUE's buffer (if it is an overlay
or a pair of markers) and turns it into a file system reference.

(fn SELECTION VALUE)
(defalias 'haiku-select-encode-file-name #[514 "\300!\211\262\205 \301\302\303\3048!E\207" [xselect--selection-bounds "refs" ref buffer-file-name 2] 7 (#$ . 8740)])
(byte-code "\300\301\302\303\302\304%\210\300\305\302\306\302\307%\210\300\310\302\311\302\312%\210\300\313\302\314\302\315%\207" [cl-generic-define-method gui-backend-get-selection nil (type data-type &context (window-system haiku)) #[514 "\211\301\267\202 \302\303\304\305\306!\"\"\207\307!\207\310=\203 \207\311\312!\"\207" [haiku-dnd-selection-value #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (TARGETS 6 TIMESTAMP 17)) apply vector mapcar intern haiku-selection-targets haiku-selection-timestamp XdndSelection haiku-selection-data haiku--selection-type-to-mime] 8 "\n\n(fn TYPE DATA-TYPE)"] gui-backend-set-selection (type value &context (window-system haiku)) #[514 "\302=\203\n \211\211\207\303	\211\203' \211@\211\"\211\203 \211B\262\210A\266\202\202\f \210\304\"\207" [haiku-dnd-selection-value haiku-normal-selection-encoders XdndSelection nil haiku-selection-put] 8 "\n\n(fn TYPE VALUE)"] gui-backend-selection-exists-p (selection &context (window-system haiku)) #[257 "\300\301\"\207" [haiku-selection-data "text/plain"] 4 "\n\n(fn SELECTION)"] gui-backend-selection-owner-p (selection &context (window-system haiku)) #[257 "\300!\207" [haiku-selection-owner-p] 3 "\n\n(fn SELECTION)"]] 6)#@92 SKIP: real doc in xfns.c.

(fn PROMPT DIR &optional DEFAULT-FILENAME MUSTMATCH ONLY-DIR-P)
(defalias 'x-file-dialog #[1282 "\300\301 !\302=\203; \303\304\305\"\204 \202 \306G\307ZO\301 \206- \205- \310!\2058 \311	!&\207\312\313!\207" [framep-on-display selected-frame haiku haiku-read-file-name string-suffix-p ": " 0 2 file-name-directory file-name-nondirectory error "x-file-dialog on a tty frame"] 13 (#$ . 10376)])#@85 Given the drag-and-drop message MESSAGE, retrieve the desired action.

(fn MESSAGE)
(defalias 'haiku-parse-drag-actions #[257 "\300\301\"AA\302\303\304E\211\203\" \211@\211\235\203 \305B\262A\266\202\202\n \210\306\207" [assoc "be:actions" 1145324368 1145326934 1145326670 nil private] 6 (#$ . 10819)])#@49 Handle specified drag-n-drop EVENT.

(fn EVENT)
(defalias 'haiku-drag-and-drop #[257 "\211AA@\301!\211@\262\302=\203 \303\301!!\207\304!\301!\211A@:\203+ \211A@@\202. \211A@\2119\2054 \211\266\202\206 \305\306\"\203l \307!r\310\311\"\216\312@\313\"\210\305\306\"AA\211\205j \211@\314\315P#\210A\266\202\202U *\207\305\316\"\203\244 \305\316\"AA\211\205\243 \211@\317\320\321#\211\211\203\232 \211@\314#\210A\266\202\202\205 \266A\266\202\202y \207\305\322\"\203\356 \307!r\310\323\"\216\312@\313\"\210\305\322\"AA\211\205\354 \211@\204\322 \324\301!!b\210\325\326!\203\337 \202\343 \327\330\"#\210A\266\202\202\300 *\207\331\236A\332=?\205 \333\334\335\336\"\"\207" [mouse-yank-at-point event-start lambda dnd-handle-movement haiku-parse-drag-actions assoc "refs" internal--before-with-selected-window make-closure #[0 "\301\300!\207" [V0 internal--after-with-selected-window] 2] select-window norecord dnd-handle-one-url "file:" "text/uri-list" split-string "[ \n]" t "text/plain" #[0 "\301\300!\207" [V0 internal--after-with-selected-window] 2] posn-point dnd-insert-text multibyte-string-p decode-coding-string undecided type 3003 message "Don't know how to drop any of: %s" mapcar car] 13 (#$ . 11133) "e"])
(byte-code "\301\302\303#\210\304\305\306\"\207" [special-event-map define-key [drag-n-drop] haiku-drag-and-drop defvaralias haiku-use-system-tooltips use-system-tooltips] 4)#@227 Variable watcher to force a menu bar update when `use-system-tooltip' changes.
This is necessary because on Haiku `use-system-tooltip' doesn't
take effect on menu items until the menu bar is updated again.

(fn &rest IGNORED)
(defalias 'haiku-use-system-tooltips-watcher #[128 "\300\301!\207" [force-mode-line-update t] 3 (#$ . 12574)])#@45 Handle mouse movement during drag-and-drop.
(defalias 'haiku-dnd-drag-handler #[0 "\301\302 \211@\205 \303\304A@AA@#!)\207" [track-mouse drag-source mouse-pixel-position dnd-handle-movement posn-at-x-y] 7 (#$ . 12916)])
(byte-code "\301\211\207" [haiku-drag-track-function haiku-dnd-drag-handler] 2)#@112 SKIP: real doc in xfns.c.

(fn TARGETS &optional ACTION FRAME RETURN-FRAME ALLOW-CURRENT-FRAME FOLLOW-TOOLTIP)
(defalias 'x-begin-drag #[1537 "\204 \304\305!\210\306\211\211\211\203\322 \211@\307!\310\"A;\203. \311\312#\206/ \202/ \203\311 !\211\203\310 \310@\"AA@;\203N A@\202R A@@A@\204\206 \311\312\313#\206a \314@\310\f\315#AB\203y \241\266\202\210 B\211\262B\262\266\266\211A@:\204\246 \211A@\316@	\306\211\315%\211AB\241\266\202\313 \211A@\211\203\307 \211@\316@\n\306\211\315%\211AB\241\266A\266\202\202\251 \210\210\266A\266\202\202 \2109\203\334 \206\335 \317\320\206\345 \321 $*\210\207" [haiku-dnd-selection-value haiku-signal-invalid-refs mouse-highlight haiku-dnd-selection-converters error "No local value for XdndSelection" nil intern assoc get-text-property 0 type 1296649541 equal alist-get XdndActionCopy haiku-drag-message selected-frame] 21 (#$ . 13229)])
(add-variable-watcher 'use-system-tooltips 'haiku-use-system-tooltips-watcher)#@137 Cons used to determine how many times the wheel has been turned.
The car is just that; cdr is the timestamp of the last wheel
movement.
(defvar haiku-dnd-wheel-count nil (#$ . 14255))#@190 Cons of two elements describing the direction the wheel last turned.
The car is whether or not the movement was horizontal.
The cdr is whether or not the movement was upwards or leftwards.
(defvar haiku-last-wheel-direction nil (#$ . 14445))#@152 Note that the mouse wheel was moved at TIMESTAMP during drag-and-drop.
Return the number of clicks that were made in quick succession.

(fn TIMESTAMP)
(defalias 'haiku-note-wheel-click #[257 "\250\204 \302\207	\211\204 \303B\262\211\211AZW\203  \211\303\240\210\211@T\240\210\211\241\210\211@\207" [double-click-time haiku-dnd-wheel-count 1 0] 5 (#$ . 14693)])#@157 Return the internal modifier mask for the Emacs modifier state MODS.
MODS is a single symbol, or a list of symbols such as `shift' or
`control'.

(fn MODS)
(defalias 'haiku-dnd-modifier-mask #[257 "\300:\204\n C\262\211\203Q \211@\211\301\267\202J \302\303\"\262\202J \302\304\"\262\202J \302\305\"\262\202J \302\306\"\262\202J \302\307\"\262\202J \302\310\"\262A\266\202\202 \210\207" [0 #s(hash-table size 6 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (shift 23 control 32 meta 41 hyper 50 super 59 alt 68)) logior 33554432 67108864 134217728 16777216 8388608 4194304] 7 (#$ . 15070)])#@134 Return the modifier type of an internal modifier mask.
FLAGS is the internal modifier mask of a turn of the mouse wheel.

(fn FLAGS)
(defalias 'haiku-dnd-wheel-modifier-type #[257 "\3012, \211\203) \211@\211:\203\" \302@!\303\304\"=\203\" \305\301A\"\210A\266\202\202 \210\3060\207" [mouse-wheel-scroll-amount type haiku-dnd-modifier-mask logand 264241152 throw nil] 7 (#$ . 15702)])#@381 Handle wheel movement during drag-and-drop.
FRAME is the frame on top of which the wheel moved.
X and Y are the frame-relative coordinates of the wheel movement.
HORIZONTAL is whether or not the wheel movement was horizontal.
UP is whether or not the wheel moved up (or left).
MODIFIERS is the internal modifier mask of the wheel movement.

(fn FRAME X Y HORIZONTAL UP MODIFIERS)
(defalias 'haiku-handle-drag-wheel #[1542 "B\232\204 B	:\203 	\306\240\210\307!\204$ \204$ \n\202G \204, \202G \204= \f\2038 \202G \202G \f\203F \202G \310\311\312\"\313\314=\203f \204f \204` \202a \262\202\245 \315\267\202\216 \316\262\203w \313\202x \317\262\202\245 \320\262\203\210 \313\202\211 \317\262\202\245 \314=\203\245 \204\245 \204\242 \202\243 \262\205\345 \321		\f#\322\211@\262!\205\343 \323\211@\262!r\324\325\"\216\326@\327\"\210\204\331 \313\202\336 \330@!_!*\262\262\207" [haiku-last-wheel-direction haiku-dnd-wheel-count mwheel-scroll-up-function mwheel-scroll-down-function mouse-wheel-flip-direction mwheel-scroll-right-function 0 haiku-dnd-wheel-modifier-type time-convert nil 1000 1 hscroll #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (global-text-scale 108 text-scale 125)) global-text-scale-adjust -1 text-scale-adjust posn-at-x-y windowp internal--before-with-selected-window make-closure #[0 "\301\300!\207" [V0 internal--after-with-selected-window] 2] select-window norecord haiku-note-wheel-click mwheel-scroll-left-function mouse-wheel-progressive-speed] 16 (#$ . 16098)])
(byte-code "\301\211\207" [haiku-drag-wheel-function haiku-handle-drag-wheel] 2)#@29 SKIP: real doc in x-win.el.
(defalias 'emacs-session-save #[0 "\300\301\302\"r\211q\210\303\304\"\216\3051 \306\307!0\202 \210\302*\207" [generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205	 \302\300!\207" [V0 buffer-name kill-buffer] 2] (error) run-hook-with-args-until-success emacs-save-session-functions] 4 (#$ . 17771)])#@41 SKIP: real doc in xsmfns.c.

(fn EVENT)
(defalias 'handle-save-session #[257 "\300C\301\302\"\216\211\303 \240)\210\211\242?\205 \304 \207" [t make-closure #[0 "\301\300\242?!\207" [V0 haiku-save-session-reply] 2] emacs-session-save kill-emacs] 5 (#$ . 18117) "e"])#@126 Make FILE the wallpaper.
Set the desktop background to the image FILE, on all workspaces,
with an offset of 0, 0.

(fn FILE)
(defalias 'haiku-set-wallpaper #[257 "\302\303!\206	 	\"\304\305\306\307\310\311\312E\313\314\315\316\257#\210\317\320\321\322BC\"\207" [file-name-coding-system default-file-name-coding-system encode-coding-string expand-file-name haiku-write-node-attribute "/boot/home/Desktop" "be:bgndimginfo" (type . 0) ("be:bgndimginfoerasetext" bool t) "be:bgndimginfopath" string ("be:bgndimginfoworkspaces" long -1) ("be:bgndimginfooffset" point (0 . 0)) ("be:bgndimginfomode" long 0) ("be:bgndimginfoset" long 0) haiku-send-message "application/x-vnd.Be-TRAK" type 1415735154] 12 (#$ . 18391)])
(defconst x-pointer-X-cursor 5)
(defconst x-pointer-arrow 1)
(defconst x-pointer-bottom-left-corner 22)
(defconst x-pointer-bottom-right-corner 21)
(defconst x-pointer-bottom-side 17)
(defconst x-pointer-clock 14)
(defconst x-pointer-cross 5)
(defconst x-pointer-cross-reverse 5)
(defconst x-pointer-crosshair 5)
(defconst x-pointer-diamond-cross 5)
(defconst x-pointer-hand1 7)
(defconst x-pointer-hand2 8)
(defconst x-pointer-left-side 18)
(defconst x-pointer-right-side 16)
(defconst x-pointer-sb-down-arrow 17)
(defconst x-pointer-sb-left-arrow 18)
(defconst x-pointer-sb-right-arrow 16)
(defconst x-pointer-sb-up-arrow 16)
(defconst x-pointer-target 5)
(defconst x-pointer-top-left-corner 20)
(defconst x-pointer-top-right-corner 19)
(defconst x-pointer-top-side 16)
(defconst x-pointer-watch 14)
(defconst x-pointer-invisible 12)
(byte-code "\300\301!\210\300\302!\207" [provide haiku-win term/haiku-win] 2)
