diff --git a/elpa/archives/elpa/archive-contents b/elpa/archives/elpa/archive-contents index 31173e9..654f551 100644 --- a/elpa/archives/elpa/archive-contents +++ b/elpa/archives/elpa/archive-contents @@ -740,7 +740,7 @@ (:keywords "languages" "lisp") (:url . "https://elpa.gnu.org/packages/elisp-benchmarks.html"))]) (emms . - [(7 0) + [(7 1) ((cl-lib (0 5)) (seq @@ -2741,7 +2741,7 @@ (:maintainer "Drew Adams" . "drew.adams@oracle.com") (:url . "https://elpa.gnu.org/packages/zones.html"))]) (ztree . - [(1 0 5) + [(1 0 6) ((cl-lib (0))) "Text mode directory tree" tar diff --git a/elpa/archives/elpa/archive-contents.signed b/elpa/archives/elpa/archive-contents.signed index 2d71ab9..4dd7505 100644 --- a/elpa/archives/elpa/archive-contents.signed +++ b/elpa/archives/elpa/archive-contents.signed @@ -1 +1 @@ -Good signature from 066DAFCB81E42C40 GNU ELPA Signing Agent (2019) (trust undefined) created at 2021-04-13T02:05:02+0500 using RSA \ No newline at end of file +Good signature from 066DAFCB81E42C40 GNU ELPA Signing Agent (2019) (trust undefined) created at 2021-04-15T14:05:02+0500 using RSA \ No newline at end of file diff --git a/elpa/archives/melpa/archive-contents b/elpa/archives/melpa/archive-contents index 2e4a924..a3457ff 100644 --- a/elpa/archives/melpa/archive-contents +++ b/elpa/archives/melpa/archive-contents @@ -71,7 +71,7 @@ (aes . [(20171029 623) nil "Implementation of AES" single ((:commit . "b7d5da89c3443292e4f0b1c9d254d459933cf5af") (:authors ("Markus Sauermann" . "emacs-aes@sauermann-consulting.de")) (:maintainer "Markus Sauermann" . "emacs-aes@sauermann-consulting.de") (:keywords "data" "tools") (:url . "https://github.com/Sauermann/emacs-aes"))]) (afternoon-theme . [(20140104 1859) ((emacs (24 1))) "Dark color theme with a deep blue background" single ((:commit . "89b1d778a1f8b385775c122f2bd1c62f0fbf931a") (:authors ("Ozan Sener" . "ozan@ozansener.com")) (:maintainer "Ozan Sener" . "ozan@ozansener.com") (:keywords "themes") (:url . "http://github.com/osener/emacs-afternoon-theme"))]) (ag . [(20201031 2202) ((dash (2 8 0)) (s (1 9 0)) (cl-lib (0 5))) "A front-end for ag ('the silver searcher'), the C ack replacement." single ((:commit . "ed7e32064f92f1315cecbfc43f120bbc7508672c") (:authors ("Wilfred Hughes" . "me@wilfred.me.uk")) (:maintainer "Wilfred Hughes" . "me@wilfred.me.uk") (:url . "https://github.com/Wilfred/ag.el"))]) - (agda2-mode . [(20210220 2039) ((emacs (24 3)) (annotation (1 0)) (eri (1 0))) "interactive development for Agda, a dependently typed functional programming language" tar ((:commit . "b96a2b99abb7979a644a6aa6738d650afa20c947"))]) + (agda2-mode . [(20210220 2039) ((emacs (24 3)) (annotation (1 0)) (eri (1 0))) "interactive development for Agda, a dependently typed functional programming language" tar ((:commit . "b63b0ad0e4f1af7e001342bebb0c3daaf542f328"))]) (aggressive-fill-paragraph . [(20180910 816) ((dash (2 10 0))) "A mode to automatically keep paragraphs filled" single ((:commit . "4a620e62b5e645a48b0a818bf4eb19daea4977df") (:authors ("David Shepherd" . "davidshepherd7@gmail.com")) (:maintainer "David Shepherd" . "davidshepherd7@gmail.com") (:keywords "fill-paragraph" "automatic" "comments") (:url . "https://github.com/davidshepherd7/aggressive-fill-paragraph-mode"))]) (aggressive-indent . [(20200824 2352) ((emacs (24 3))) "Minor mode to aggressively keep your code always indented" single ((:commit . "b0ec0047aaae071ad1647159613166a253410a63") (:authors ("Artur Malabarba" . "emacs@endlessparentheses.com")) (:maintainer "Artur Malabarba" . "emacs@endlessparentheses.com") (:keywords "indent" "lisp" "maint" "tools") (:url . "https://github.com/Malabarba/aggressive-indent-mode"))]) (agtags . [(20200730 116) ((emacs (25))) "A frontend to GNU Global" tar ((:commit . "d80c6f61dee74040c07b7010d48cab1df13a3abf") (:authors ("Vietor Liu" . "vietor.liu@gmail.com")) (:maintainer "Vietor Liu" . "vietor.liu@gmail.com") (:keywords "tools" "convenience") (:url . "https://github.com/vietor/agtags"))]) @@ -124,7 +124,7 @@ (annalist . [(20190929 207) ((emacs (24 4)) (cl-lib (0 5))) "Record and display information such as keybindings" tar ((:commit . "134fa3f0fb91a636a1c005c483516d4b64905a6d") (:authors ("Fox Kiester" . "noct@posteo.net")) (:maintainer "Fox Kiester" . "noct@posteo.net") (:keywords "convenience" "tools" "keybindings" "org") (:url . "https://github.com/noctuid/annalist.el"))]) (annotate . [(20210322 1739) nil "annotate files without changing them" single ((:commit . "54ac759facadacbfea5c1e7c2975e2da6434cdda") (:authors ("Bastian Bechtold")) (:maintainer "Bastian Bechtold") (:url . "https://github.com/bastibe/annotate.el"))]) (annotate-depth . [(20160520 2040) nil "Annotate buffer if indentation depth is beyond threshold." single ((:commit . "fcb24fa36287250e40d195590c4ca4a8a696277b") (:authors ("Morten Slot Kristensen ")) (:maintainer "Morten Slot Kristensen ") (:keywords "convenience") (:url . "https://github.com/netromdk/annotate-depth"))]) - (annotation . [(20200914 644) nil "Functions for annotating text with faces and help bubbles" single ((:commit . "b96a2b99abb7979a644a6aa6738d650afa20c947") (:url . "https://github.com/agda/agda"))]) + (annotation . [(20200914 644) nil "Functions for annotating text with faces and help bubbles" single ((:commit . "b63b0ad0e4f1af7e001342bebb0c3daaf542f328") (:url . "https://github.com/agda/agda"))]) (annoying-arrows-mode . [(20161024 646) ((cl-lib (0 5))) "Ring the bell if using arrows too much" single ((:commit . "3c42e9807d7696da2da2a21b63beebf9cdb3f5dc") (:authors ("Magnar Sveen" . "magnars@gmail.com")) (:maintainer "Magnar Sveen" . "magnars@gmail.com"))]) (ansi . [(20200611 944) ((emacs (24 1)) (cl-lib (0 6)) (s (1 6 1)) (dash (1 5 0))) "Turn string into ansi strings" single ((:commit . "a41d5cc719297515d85bb5256980cd1204a71b88") (:authors ("Johan Andersson" . "johan.rejeep@gmail.com")) (:maintainer "Johan Andersson" . "johan.rejeep@gmail.com") (:keywords "terminals" "color" "ansi") (:url . "http://github.com/rejeep/ansi"))]) (ansible . [(20210103 543) ((s (1 9 0)) (f (0 16 2))) "Ansible minor mode" tar ((:commit . "40af0d2bbb6c5bbcf7aa9269ac9a07e22622d263") (:authors ("k1LoW (Kenichirou Oyama), ")) (:maintainer "k1LoW (Kenichirou Oyama), ") (:url . "http://101000lab.org"))]) @@ -293,7 +293,7 @@ (biblio . [(20200416 1407) ((emacs (24 3)) (biblio-core (0 2))) "Browse and import bibliographic references from CrossRef, arXiv, DBLP, HAL, Dissemin, and doi.org" tar ((:commit . "242c3f3ac1198b1e969e2a34d6348354a9d83345") (:authors ("Clément Pit-Claudel" . "clement.pitclaudel@live.com")) (:maintainer "Clément Pit-Claudel" . "clement.pitclaudel@live.com") (:keywords "bib" "tex" "convenience" "hypermedia") (:url . "https://github.com/cpitclaudel/biblio.el"))]) (biblio-bibsonomy . [(20190105 1200) ((emacs (24 4)) (biblio-core (0 2))) "Lookup bibliographic entries from Bibsonomy" single ((:commit . "778cc944db3c6dababe2e7fec5877fba42e8c00d") (:authors ("Andreas Jansson and contributors")) (:maintainer "Andreas Jansson and contributors") (:keywords "bib" "tex" "bibsonomy") (:url . "http://github.com/andreasjansson/biblio-bibsonomy/"))]) (biblio-core . [(20210311 2310) ((emacs (24 3)) (let-alist (1 0 4)) (seq (1 11)) (dash (2 12 1))) "A framework for looking up and displaying bibliographic entries" single ((:commit . "242c3f3ac1198b1e969e2a34d6348354a9d83345") (:authors ("Clément Pit-Claudel" . "clement.pitclaudel@live.com")) (:maintainer "Clément Pit-Claudel" . "clement.pitclaudel@live.com") (:keywords "bib" "tex" "convenience" "hypermedia") (:url . "https://github.com/cpitclaudel/biblio.el"))]) - (bibliothek . [(20190124 1828) ((emacs (24 4)) (pdf-tools (0 70)) (a (0 1 0 -3 4))) "Managing a digital library of PDFs" single ((:commit . "331252334ea2e62d8e06b2dfa24be5dbd7f9c09f") (:authors ("Göktuğ Kayaalp" . "self@gkayaalp.com")) (:maintainer "Göktuğ Kayaalp" . "self@gkayaalp.com") (:keywords "tools") (:url . "https://dev.gkayaalp.com/elisp/index.html#bibliothek-el"))]) + (bibliothek . [(20190124 1828) ((emacs (24 4)) (pdf-tools (0 70)) (a (0 1 0 -3 4))) "Managing a digital library of PDFs" single ((:commit . "7bb01664b45fc08b7d013c91073cf3ce0d313984") (:authors ("Göktuğ Kayaalp" . "self@gkayaalp.com")) (:maintainer "Göktuğ Kayaalp" . "self@gkayaalp.com") (:keywords "tools") (:url . "https://dev.gkayaalp.com/elisp/index.html#bibliothek-el"))]) (bibretrieve . [(20191124 1855) ((auctex (11 87)) (emacs (24 3))) "Retrieve BibTeX entries from the internet" tar ((:commit . "81dc8e0db3629cc180eafb2bc34b60dcd8980316") (:authors ("Antonio Sartori")) (:maintainer "Pavel Zorin-Kranich" . "pzorin@uni-bonn.de") (:keywords "bibtex" "bibliography" "mathscinet" "arxiv" "zbmath") (:url . "https://github.com/pzorin/bibretrieve"))]) (bibslurp . [(20151202 2346) ((s (1 6 0)) (dash (1 5 0))) "retrieve BibTeX entries from NASA ADS" single ((:commit . "0116bbb04840d20a6b087e6d9c921bb1c2489a8f") (:keywords "bibliography" "nasa ads") (:url . "https://github.com/mkmcc/bibslurp"))]) (bibtex-actions . [(20210413 1336) ((emacs (26 3)) (bibtex-completion (1 0))) "Biblographic commands based on completing-read" single ((:commit . "4e6643834659a670ae1d2d9c5f493843ceb2ff1d") (:authors ("Bruce D'Arcus ")) (:maintainer "Bruce D'Arcus ") (:url . "https://github.com/bdarcus/bibtex-actions"))]) @@ -419,7 +419,7 @@ (caroline-theme . [(20160318 520) ((emacs (24))) "A trip down to New Orleans..." single ((:commit . "222fd483db304509f9e422dc82883d808e023ceb") (:authors ("Jack Killilea" . "jaaacckz1@gmail.com")) (:maintainer "Jack Killilea" . "jaaacckz1@gmail.com") (:url . "https://github.com/xjackk/carolines-theme"))]) (cascading-dir-locals . [(20210221 1516) ((emacs (26 1))) "Apply all (!) .dir-locals.el from root to current directory" single ((:commit . "efdf5e6d62b955ee0ca3c170eae1d388799f9fa0") (:authors ("Fritz Grabo" . "me@fritzgrabo.com")) (:maintainer "Fritz Grabo" . "me@fritzgrabo.com") (:keywords "convenience") (:url . "https://github.com/fritzgrabo/cascading-dir-locals"))]) (caseformat . [(20160115 1615) ((emacs (24)) (cl-lib (0 5)) (dash (2 12 1)) (s (1 10 0))) "Format based letter case converter" single ((:commit . "75ddb9c64eeb78b46d9e1db99bef8d0fb1e46b99") (:authors ("Hiroki YAMAKAWA" . "s06139@gmail.com")) (:maintainer "Hiroki YAMAKAWA" . "s06139@gmail.com") (:keywords "convenience") (:url . "https://github.com/HKey/caseformat"))]) - (cask . [(20210410 2057) ((emacs (24 1)) (s (1 8 0)) (f (0 16 0)) (epl (0 5)) (shut-up (0 1 0)) (cl-lib (0 3)) (package-build (1 2)) (ansi (0 4 1))) "Cask: Project management for package development" tar ((:commit . "dce91052dc8fae386a1898fd88d554b5cb527fdc") (:authors ("Johan Andersson" . "johan.rejeep@gmail.com")) (:maintainer "Johan Andersson" . "johan.rejeep@gmail.com") (:keywords "speed" "convenience") (:url . "http://github.com/cask/cask"))]) + (cask . [(20210415 154) ((emacs (24 1)) (s (1 8 0)) (f (0 16 0)) (epl (0 5)) (shut-up (0 1 0)) (cl-lib (0 3)) (package-build (0)) (ansi (0 4 1))) "Cask: Project management for package development" tar ((:commit . "e7d08217225a5c20cc4f68cf3e915d7d7ee634b5") (:authors ("Johan Andersson" . "johan.rejeep@gmail.com")) (:maintainer "Johan Andersson" . "johan.rejeep@gmail.com") (:keywords "speed" "convenience") (:url . "http://github.com/cask/cask"))]) (cask-mode . [(20160410 1449) ((emacs (24 3))) "major mode for editing Cask files" single ((:commit . "7c6719d3bb4fe552958634bd5a11abc56681f3a7") (:authors ("Wilfred Hughes" . "me@wilfred.me.uk")) (:maintainer "Wilfred Hughes" . "me@wilfred.me.uk"))]) (cask-package-toolset . [(20170921 2256) ((emacs (24)) (cl-lib (0 3)) (s (1 6 1)) (dash (1 8 0)) (f (0 10 0)) (commander (0 2 0)) (ansi (0 1 0)) (shut-up (0 1 0))) "Toolsettize your package" tar ((:commit . "2c74cd827e88c7f8360581a841e45f0b794510e7") (:authors ("Adrien Becchis" . "adriean.khisbe@live.fr")) (:maintainer "Adrien Becchis" . "adriean.khisbe@live.fr") (:keywords "convenience" "tools") (:url . "http://github.com/AdrieanKhisbe/cask-package-toolset.el"))]) (caskxy . [(20140513 1539) ((log4e (0 2 0)) (yaxception (0 1))) "Control Cask in Emacs" single ((:commit . "dc18dcab7ed526070ab76de071c9c5272e6ac40e") (:authors ("Hiroaki Otsu" . "ootsuhiroaki@gmail.com")) (:maintainer "Hiroaki Otsu" . "ootsuhiroaki@gmail.com") (:keywords "convenience") (:url . "https://github.com/aki2o/caskxy"))]) @@ -441,7 +441,7 @@ (centimacro . [(20201225 1132) nil "Assign multiple macros as global key bindings" single ((:commit . "0149877584b333c4f1953f0767f0cae23881b0df") (:authors ("Oleh Krehel" . "ohwoeowho@gmail.com")) (:maintainer "Oleh Krehel" . "ohwoeowho@gmail.com") (:keywords "macros") (:url . "https://github.com/abo-abo/centimacro"))]) (cerbere . [(20181113 1641) ((pkg-info (0 5))) "Unit testing in Emacs for several programming languages" tar ((:commit . "c667c165d9c1657f13d2d46f09ba21b61f9402cc") (:authors ("Nicolas Lamirault" . "nicolas.lamirault@gmail.com")) (:maintainer "Nicolas Lamirault" . "nicolas.lamirault@gmail.com") (:keywords "python" "go" "php" "phpunit" "elisp" "ert" "tests" "tdd") (:url . "https://github.com/nlamirault/cerbere"))]) (ceylon-mode . [(20180606 1324) ((emacs (25))) "Major mode for editing Ceylon source code" single ((:commit . "948515672bc596dc118e8e3ede3ede5ec6a3c95a") (:authors ("Lucas Werkmeister" . "mail@lucaswerkmeister.de")) (:maintainer "Lucas Werkmeister" . "mail@lucaswerkmeister.de") (:keywords "languages" "ceylon") (:url . "https://github.com/lucaswerkmeister/ceylon-mode"))]) - (cfengine-code-style . [(20171115 2108) nil "C code style for CFEngine project." single ((:commit . "0418e0723319b0046f0000ed4d4959799c876f0e") (:authors ("Mikhail Gusarov" . "mikhail.gusarov@cfengine.com")) (:maintainer "Mikhail Gusarov" . "mikhail.gusarov@cfengine.com") (:url . "https://github.com/cfengine/core"))]) + (cfengine-code-style . [(20171115 2108) nil "C code style for CFEngine project." single ((:commit . "9f0367e3d135e873a9ea2948153e90b6c5bcc9ea") (:authors ("Mikhail Gusarov" . "mikhail.gusarov@cfengine.com")) (:maintainer "Mikhail Gusarov" . "mikhail.gusarov@cfengine.com") (:url . "https://github.com/cfengine/core"))]) (cff . [(20160118 2018) ((cl-lib (0 5)) (emacs (24))) "Search of the C/C++ file header by the source and vice versa" single ((:commit . "b6ab2a28e64ef06f281ec74cfe3114e450644dfa") (:authors ("Alexey Veretennikov" . "alexey.veretennikov@gmail.com")) (:maintainer "Alexey Veretennikov" . "alexey.veretennikov@gmail.com") (:keywords "find-file") (:url . "https://github.com/fourier/cff"))]) (cfml-mode . [(20190617 1130) ((emacs (25))) "Emacs mode for editing CFML files" single ((:commit . "2de315abddb6af088a2346e142cc305889dcd775") (:authors ("Andrew Myers" . "am2605@gmail.com")) (:maintainer "Andrew Myers" . "am2605@gmail.com") (:url . "https://github.com/am2605/cfml-mode"))]) (cfn-mode . [(20210129 2037) ((emacs (26 0)) (f (0 20 0)) (s (1 12 0)) (yaml-mode (0 0 13))) "AWS cloudformation mode" tar ((:commit . "a4ca40978e680f9edc86c141e696e0ae57c63533") (:authors ("William Orr" . "will@worrbase.com")) (:maintainer "William Orr" . "will@worrbase.com") (:keywords "convenience" "languages" "tools") (:url . "https://gitlab.com/worr/cfn-mode"))]) @@ -527,7 +527,7 @@ (cm-mode . [(20170203 2107) ((cl-lib (0 5))) "Minor mode for CriticMarkup" single ((:commit . "276d49c859822265070ae5dfbb403fd7d8d06436") (:authors ("Joost Kremers" . "joostkremers@fastmail.fm")) (:maintainer "Joost Kremers" . "joostkremers@fastmail.fm") (:keywords "text" "markdown"))]) (cmake-font-lock . [(20210103 1558) ((cmake-mode (0 0))) "Advanced, type aware, highlight support for CMake" single ((:commit . "5e20ed32193c2c7ebae920a6a3cd711c8c950597") (:authors ("Anders Lindgren")) (:maintainer "Anders Lindgren") (:keywords "faces" "languages") (:url . "https://github.com/Lindydancer/cmake-font-lock"))]) (cmake-ide . [(20201027 1947) ((emacs (24 4)) (cl-lib (0 5)) (seq (1 11)) (levenshtein (0)) (s (1 11 0))) "Calls CMake to find out include paths and other compiler flags" single ((:commit . "2330f91e51e6cf8a46ce595be3deb0feda223f75") (:authors ("Atila Neves" . "atila.neves@gmail.com")) (:maintainer "Atila Neves" . "atila.neves@gmail.com") (:keywords "languages") (:url . "http://github.com/atilaneves/cmake-ide"))]) - (cmake-mode . [(20210104 1831) ((emacs (24 1))) "major-mode for editing CMake sources" single ((:commit . "ff9e922902834a68d7872fa2d7476f28c865decd"))]) + (cmake-mode . [(20210104 1831) ((emacs (24 1))) "major-mode for editing CMake sources" single ((:commit . "498b916cdd96330baa33bc10667b43cbb78674d4"))]) (cmake-project . [(20171121 1115) nil "Integrates CMake build process with Emacs" single ((:commit . "a7cf9e4c01c4683e14b6942cc5cc5e8cddc98721") (:authors ("Alexander Lamaison" . "alexander.lamaison@gmail")) (:maintainer "Alexander Lamaison" . "alexander.lamaison@gmail") (:keywords "c" "cmake" "languages" "tools") (:url . "http://github.com/alamaison/emacs-cmake-project"))]) (cmd-to-echo . [(20161203 2133) ((emacs (24 4)) (s (1 11 0)) (shell-split-string (20151224 208))) "Show the output of long-running commands in the echo area" single ((:commit . "e0e874fc0e1ad6d291e39ed76023445297ad438a") (:authors ("Tijs Mallaerts" . "tijs.mallaerts@gmail.com")) (:maintainer "Tijs Mallaerts" . "tijs.mallaerts@gmail.com"))]) (cmm-mode . [(20150225 746) nil "Major mode for C-- source code" single ((:commit . "c3ad514dff3eb30434f6b20d953276d4c00de1ee"))]) @@ -755,7 +755,7 @@ (cycle-themes . [(20150403 309) ((cl-lib (0 5))) "A global minor mode to make switching themes easier" single ((:commit . "6e125d11fdbc6b78fc9f219eb2609a5e29815898") (:keywords "themes" "utility" "global minor mode") (:url . "http://github.com/toroidal-code/cycle-themes.el"))]) (cyphejor . [(20210319 1423) ((emacs (24 4))) "Shorten major mode names using user-defined rules" single ((:commit . "cf580995f891e339a9485ba91d6cb81a2abd61e4") (:authors ("Mark Karpov" . "markkarpov92@gmail.com")) (:maintainer "Mark Karpov" . "markkarpov92@gmail.com") (:keywords "mode-line" "major-mode") (:url . "https://github.com/mrkkrp/cyphejor"))]) (cypher-mode . [(20151110 1142) nil "major mode for editing cypher scripts" single ((:commit . "ce8543d7877c736c574a17b49874c9dcdc7a06d6") (:authors ("François-Xavier Bois ")) (:maintainer "François-Xavier Bois") (:keywords "cypher" "graph") (:url . "http://github.com/fxbois/cypher-mode"))]) - (cython-mode . [(20190111 2150) nil "Major mode for editing Cython files" single ((:commit . "9ae2e4e7b2d6b0dc07ee49d3299a212af3976993"))]) + (cython-mode . [(20190111 2150) nil "Major mode for editing Cython files" single ((:commit . "6d3480590ba5a10efa3288c2101090ff35e4ecbb"))]) (czech-holidays . [(20160113 1752) nil "Adds a list of Czech public holidays to Emacs calendar" single ((:commit . "d136fa09a152b3cd80db6d55c7b4ddfe07b90fbf") (:authors ("David Chkhikvadze" . "david.chk@outlook.com")) (:maintainer "David Chkhikvadze" . "david.chk@outlook.com") (:keywords "calendar"))]) (d-mode . [(20210119 1853) ((emacs (25 1))) "D Programming Language major mode for (X)Emacs" single ((:commit . "199743df55c6bfce3cdb08405bd8519768c8dfa9") (:authors ("William Baxter")) (:maintainer "Russel Winder" . "russel@winder.org.uk") (:keywords "d" "programming" "language" "emacs" "cc-mode"))]) (dactyl-mode . [(20140906 1725) nil "Major mode for editing Pentadactyl config files" single ((:commit . "cc55fe6b987271d9647492b8df4c812d884f661f") (:keywords "languages" "vim") (:url . "https://github.com/luxbock/dactyl-mode"))]) @@ -974,7 +974,7 @@ (dumb-diff . [(20171211 2122) ((emacs (24 3))) "fast arbitrary diffs" single ((:commit . "1a2331d283049b71a07c1b06b1e0627a950d55f4") (:authors ("jack angers")) (:maintainer "jack angers") (:keywords "programming" "diff"))]) (dumb-jump . [(20210303 1714) ((emacs (24 3)) (s (1 11 0)) (dash (2 9 0)) (popup (0 5 3))) "Jump to definition for 50+ languages without configuration" single ((:commit . "8bc195000e17ce6c72755a8fb55ca0fcd36add76") (:authors ("jack angers and contributors")) (:maintainer "jack angers and contributors") (:keywords "programming") (:url . "https://github.com/jacktasia/dumb-jump"))]) (dummyparens . [(20141009 1024) nil "parenthesis auto-pairing and wrapping" single ((:commit . "9798ef1d0eaa24e4fe66f8aa6022a8c62714cc89") (:authors ("Sergei Nosov ")) (:maintainer "Sergei Nosov ") (:keywords "dummyparens" "auto-pair" "wrapping") (:url . "https://github.com/snosov1/dummyparens"))]) - (dune . [(20210213 757) nil "Integration with the dune build system" tar ((:commit . "c48b9975feb9609dcadd0818f754cab7d67d1ee3") (:url . "https://github.com/ocaml/dune"))]) + (dune . [(20210213 757) nil "Integration with the dune build system" tar ((:commit . "65e04ba5646e8ba4a033b099c92fbda9b9aca341") (:url . "https://github.com/ocaml/dune"))]) (dune-format . [(20210411 2348) ((reformatter (0 6)) (emacs (24 1))) "Reformat OCaml's dune files automatically" single ((:commit . "22af9fcf75eea577a39fc315fd9bcaa709fb4e1c") (:authors ("Steve Purcell" . "steve@sanityinc.com")) (:maintainer "Steve Purcell" . "steve@sanityinc.com") (:keywords "languages") (:url . "https://github.com/purcell/dune-format-el"))]) (duplicate-thing . [(20181031 1500) nil "Duplicate current line & selection" single ((:commit . "9d8fd05e3e5caa35d3f2a0c0032c92f0c0908e21") (:authors ("ongaeshi")) (:maintainer "ongaeshi") (:keywords "convenience" "command" "duplicate" "line" "selection") (:url . "https://github.com/ongaeshi/duplicate-thing"))]) (dut-mode . [(20170729 2111) ((emacs (24))) "Major mode for the Dut programming language" single ((:commit . "9235c7acaa6690942e9de8b7acd1e4be0c859dc1") (:authors ("The dut-mode Authors")) (:maintainer "The dut-mode Authors") (:keywords "languages" "gut") (:url . "https://github.com/dut-lang/dut-mode"))]) @@ -1215,8 +1215,8 @@ (erefactor . [(20200513 1252) ((cl-lib (0 3))) "Emacs-Lisp refactoring utilities" single ((:commit . "bfe27a1b8c7cac0fe054e76113e941efa3775fe8") (:authors ("Masahiro Hayashi" . "mhayashi1120@gmail.com")) (:maintainer "Masahiro Hayashi" . "mhayashi1120@gmail.com") (:keywords "extensions" "tools" "maint") (:url . "https://github.com/mhayashi1120/Emacs-erefactor"))]) (ergoemacs-mode . [(20210402 1642) ((emacs (24 1)) (undo-tree (0 6 5)) (cl-lib (0 5))) "Emacs mode based on common modern interface and ergonomics." tar ((:commit . "f9d6e3f7d99b877a63fa6f5ab61e6ba05a7075c8") (:authors ("Xah Lee" . "xah@xahlee.org") ("David Capello" . "davidcapello@gmail.com") ("Matthew L. Fidler" . "matthew.fidler@gmail.com")) (:maintainer "Matthew L. Fidler" . "matthew.fidler@gmail.com") (:keywords "convenience") (:url . "https://github.com/ergoemacs/ergoemacs-mode"))]) (ergoemacs-status . [(20160318 538) ((powerline (2 3)) (mode-icons (0 1 0))) "Adaptive Status Bar / Mode Line" single ((:commit . "d952cc2361adf6eb4d6af60950ad4ab699c81320") (:authors ("Matthew Fidler")) (:maintainer "Matthew Fidler"))]) - (eri . [(20200914 644) nil "Enhanced relative indentation (eri)" single ((:commit . "b96a2b99abb7979a644a6aa6738d650afa20c947") (:url . "https://github.com/agda/agda"))]) - (erlang . [(20210315 1640) ((emacs (24 1))) "Erlang major mode" tar ((:commit . "23a5b5aaa78e626d5c0e2b0e641537ad72fabd94") (:authors ("Anders Lindgren")) (:maintainer "Anders Lindgren") (:keywords "erlang" "languages" "processes"))]) + (eri . [(20200914 644) nil "Enhanced relative indentation (eri)" single ((:commit . "b63b0ad0e4f1af7e001342bebb0c3daaf542f328") (:url . "https://github.com/agda/agda"))]) + (erlang . [(20210315 1640) ((emacs (24 1))) "Erlang major mode" tar ((:commit . "2f4b2f0925fa1cd00ee2e7ef5eae779a875d0c5a") (:authors ("Anders Lindgren")) (:maintainer "Anders Lindgren") (:keywords "erlang" "languages" "processes"))]) (erlstack-mode . [(20210412 917) ((emacs (25 1)) (dash (2 12 0))) "Minor mode for analysing Erlang stacktraces" single ((:commit . "003ce5c2f41ef3e692aabdd0c73c4ec8889baef0") (:authors ("k32")) (:maintainer "k32") (:keywords "tools" "erlang") (:url . "https://github.com/k32/erlstack-mode"))]) (eros . [(20180415 618) ((emacs (24 4))) "Evaluation Result OverlayS for Emacs Lisp" single ((:commit . "dd8910279226259e100dab798b073a52f9b4233a") (:authors ("Tianxiang Xiong" . "tianxiang.xiong@gmail.com")) (:maintainer "Tianxiang Xiong" . "tianxiang.xiong@gmail.com") (:keywords "convenience" "lisp") (:url . "https://github.com/xiongtx/eros"))]) (ert-async . [(20200105 1031) ((emacs (24 1))) "Async support for ERT" single ((:commit . "948cf2faa10e085bda3739034ca5ea1912893433") (:authors ("Johan Andersson" . "johan.rejeep@gmail.com")) (:maintainer "Johan Andersson" . "johan.rejeep@gmail.com") (:keywords "lisp" "test") (:url . "http://github.com/rejeep/ert-async.el"))]) @@ -1252,7 +1252,7 @@ (espy . [(20200317 2333) ((emacs (24))) "Emacs Simple Password Yielder" single ((:commit . "2c01be937a5e5bde62921684a0b27300705fb4e0") (:authors ("Sebastian Wålinder" . "s.walinder@gmail.com")) (:maintainer "Sebastian Wålinder" . "s.walinder@gmail.com") (:keywords "convenience") (:url . "https://github.com/walseb/espy"))]) (esqlite . [(20151206 1206) ((pcsv (1 3 3))) "Manipulate sqlite file from Emacs" single ((:commit . "08a779a821f8d32c1a1985d8d9eb6cf21646ce2e") (:authors ("Masahiro Hayashi" . "mhayashi1120@gmail.com")) (:maintainer "Masahiro Hayashi" . "mhayashi1120@gmail.com") (:keywords "data") (:url . "https://github.com/mhayashi1120/Emacs-esqlite"))]) (esqlite-helm . [(20151116 850) ((esqlite (0 2 0)) (helm (20131207 845))) "Define helm source for sqlite database" single ((:commit . "08a779a821f8d32c1a1985d8d9eb6cf21646ce2e") (:authors ("Masahiro Hayashi" . "mhayashi1120@gmail.com")) (:maintainer "Masahiro Hayashi" . "mhayashi1120@gmail.com") (:keywords "data") (:url . "https://github.com/mhayashi1120/Emacs-esqlite"))]) - (ess . [(20210412 2046) ((emacs (25 1))) "Emacs Speaks Statistics" tar ((:commit . "ee2a2808ed9665aca3c5075eeb80d75f1f2d9db9") (:authors ("David Smith" . "dsmith@stats.adelaide.edu.au") ("A.J. Rossini" . "blindglobe@gmail.com") ("Richard M. Heiberger" . "rmh@temple.edu") ("Kurt Hornik" . "Kurt.Hornik@R-project.org") ("Martin Maechler" . "maechler@stat.math.ethz.ch") ("Rodney A. Sparapani" . "rsparapa@mcw.edu") ("Stephen Eglen" . "stephen@gnu.org") ("Sebastian P. Luque" . "spluque@gmail.com") ("Henning Redestig" . "henning.red@googlemail.com") ("Vitalie Spinu" . "spinuvit@gmail.com") ("Lionel Henry" . "lionel.hry@gmail.com") ("J. Alexander Branham" . "alex.branham@gmail.com")) (:maintainer "ESS Core Team" . "ESS-core@r-project.org") (:url . "https://ess.r-project.org/"))]) + (ess . [(20210414 2354) ((emacs (25 1))) "Emacs Speaks Statistics" tar ((:commit . "1782c6730a8fadcf4c162c7aac4329d4e28259b6") (:authors ("David Smith" . "dsmith@stats.adelaide.edu.au") ("A.J. Rossini" . "blindglobe@gmail.com") ("Richard M. Heiberger" . "rmh@temple.edu") ("Kurt Hornik" . "Kurt.Hornik@R-project.org") ("Martin Maechler" . "maechler@stat.math.ethz.ch") ("Rodney A. Sparapani" . "rsparapa@mcw.edu") ("Stephen Eglen" . "stephen@gnu.org") ("Sebastian P. Luque" . "spluque@gmail.com") ("Henning Redestig" . "henning.red@googlemail.com") ("Vitalie Spinu" . "spinuvit@gmail.com") ("Lionel Henry" . "lionel.hry@gmail.com") ("J. Alexander Branham" . "alex.branham@gmail.com")) (:maintainer "ESS Core Team" . "ESS-core@r-project.org") (:url . "https://ess.r-project.org/"))]) (ess-R-data-view . [(20130509 1158) ((ctable (20130313 1743)) (popup (20130324 1305)) (ess (20130225 1754))) "Data viewer for GNU R" single ((:commit . "d6e98d3ae1e2a2ea39a56eebcdb73e99d29562e9") (:authors ("myuhe ")) (:maintainer "myuhe") (:keywords "convenience") (:url . "https://github.com/myuhe/ess-R-data-view.el"))]) (ess-r-insert-obj . [(20200916 843) ((emacs (26 1)) (ess (18 10 1))) "Insert objects in ESS-R" single ((:commit . "554bdc7d6c7fafc5b8a886690970b5145276a3f5") (:authors ("Shuguang Sun" . "shuguang79@qq.com")) (:maintainer "Shuguang Sun" . "shuguang79@qq.com") (:keywords "tools") (:url . "https://github.com/ShuguangSun/ess-r-insert-obj"))]) (ess-smart-equals . [(20210411 1333) ((emacs (25 1)) (ess (18 10))) "flexible, context-sensitive assignment key for R/S" single ((:commit . "fea9eea4b59c3e9559b379508e3500076ca99ef1") (:authors ("Christopher R. Genovese" . "genovese@cmu.edu")) (:maintainer "Christopher R. Genovese" . "genovese@cmu.edu") (:keywords "r" "s" "ess" "convenience") (:url . "https://github.com/genovese/ess-smart-equals"))]) @@ -1556,7 +1556,7 @@ (flycheck-projectile . [(20201031 1952) ((emacs (25 1)) (flycheck (31)) (projectile (2 2))) "Project-wide errors" single ((:commit . "ce6e9e8793a55dace13d5fa13badab2dca3b5ddb") (:authors ("Nikita Bloshchanevich" . "nikblos@outlook.com")) (:maintainer "Nikita Bloshchanevich" . "nikblos@outlook.com") (:url . "https://github.com/nbfalcon/flycheck-projectile"))]) (flycheck-prospector . [(20180524 450) ((flycheck (0 22))) "Support prospector in flycheck" single ((:commit . "92f2680573290ba4a69a2d6e140f44680efce6a8") (:authors ("Carlos Coelho" . "carlospecter@gmail.com")) (:maintainer "Carlos Coelho" . "carlospecter@gmail.com") (:url . "https://github.com/chocoelho/flycheck-prospector"))]) (flycheck-psalm . [(20200510 1540) ((emacs (24 3)) (flycheck (26)) (psalm (0 6 0))) "Flycheck integration for Psalm" single ((:commit . "b2a1e8a9524b0004e62996c70da5536f86e56182") (:authors ("USAMI Kenta" . "tadsan@zonu.me")) (:maintainer "USAMI Kenta" . "tadsan@zonu.me") (:keywords "tools" "php") (:url . "https://github.com/emacs-php/psalm.el"))]) - (flycheck-pycheckers . [(20200828 1814) ((flycheck (0 18))) "multiple syntax checker for Python, using Flycheck" tar ((:commit . "e8ce874eea4bba13aead8eb8e0262e94fb51f25e") (:keywords "convenience" "tools" "languages") (:url . "https://github.com/msherry/flycheck-pycheckers"))]) + (flycheck-pycheckers . [(20210414 2023) ((flycheck (0 18))) "multiple syntax checker for Python, using Flycheck" tar ((:commit . "771fb9a66223287fcd4998b5f6d32d8c602bd91c") (:keywords "convenience" "tools" "languages") (:url . "https://github.com/msherry/flycheck-pycheckers"))]) (flycheck-pyflakes . [(20170330 2311) ((flycheck (0 18))) "Support pyflakes in flycheck" single ((:commit . "61b045939e3743b2162b7e4e73249c66fc2b8f65") (:authors ("Wilfred Hughes" . "me@wilfred.me.uk")) (:maintainer "Wilfred Hughes" . "me@wilfred.me.uk"))]) (flycheck-pyre . [(20190215 1222) ((emacs (24)) (flycheck (29)) (cl-lib (0 6))) "Support Pyre in flycheck" tar ((:commit . "0560122caae207d99d8af1ac2b4e5d6f6a1ce444") (:authors ("Vyacheslav Linnik" . "vyacheslav.linnik@gmail.com")) (:maintainer "Vyacheslav Linnik" . "vyacheslav.linnik@gmail.com") (:url . "https://github.com/linnik/flycheck-pyre"))]) (flycheck-raku . [(20210316 820) ((emacs (26 3)) (flycheck (0 22))) "Raku support in Flycheck" single ((:commit . "4163c0dcc1447bc98bb20b835eb23cb68a638ba9") (:authors ("Hinrik Örn Sigurðsson" . "hinrik.sig@gmail.com") ("Johnathon Weare" . "jrweare@gmail.com") ("Siavash Askari Nasr" . "siavash.askari.nasr@gmail.com")) (:maintainer "Hinrik Örn Sigurðsson" . "hinrik.sig@gmail.com") (:keywords "tools" "convenience") (:url . "https://github.com/Raku/flycheck-raku"))]) @@ -1647,7 +1647,7 @@ (font-utils . [(20210405 1149) ((persistent-soft (0 8 8)) (pcache (0 2 3))) "Utility functions for working with fonts" single ((:commit . "abc572eb0dc30a26584c0058c3fe6c7273a10003") (:authors ("Roland Walker" . "walker@pobox.com")) (:maintainer "Roland Walker" . "walker@pobox.com") (:keywords "extensions") (:url . "http://github.com/rolandwalker/font-utils"))]) (fontawesome . [(20170305 1356) ((emacs (24 4))) "fontawesome utility" tar ((:commit . "a743f80bfd53767ca9ee32da34c5ca032172a480") (:authors ("Syohei YOSHIDA" . "syohex@gmail.com")) (:maintainer "Syohei YOSHIDA" . "syohex@gmail.com") (:url . "https://github.com/syohex/emacs-fontawesome"))]) (fontify-face . [(20180420 1624) ((emacs (24))) "Fontify symbols representing faces with that face." single ((:commit . "30ec0134f04d2b156bbc772e94edfa1a31ef0a58") (:authors ("Matúš Goljer" . "matus.goljer@gmail.com")) (:maintainer "Matúš Goljer" . "matus.goljer@gmail.com") (:keywords "faces") (:url . "https://github.com/Fuco1/fontify-face"))]) - (forecast . [(20191004 1850) ((emacs (24 4))) "Weather forecasts" single ((:commit . "331252334ea2e62d8e06b2dfa24be5dbd7f9c09f") (:authors ("Göktuğ Kayaalp" . "self@gkayaalp.com")) (:maintainer "Göktuğ Kayaalp" . "self@gkayaalp.com") (:keywords "weather" "forecast") (:url . "https://dev.gkayaalp.com/elisp/index.html#forecast-el"))]) + (forecast . [(20191004 1850) ((emacs (24 4))) "Weather forecasts" single ((:commit . "7bb01664b45fc08b7d013c91073cf3ce0d313984") (:authors ("Göktuğ Kayaalp" . "self@gkayaalp.com")) (:maintainer "Göktuğ Kayaalp" . "self@gkayaalp.com") (:keywords "weather" "forecast") (:url . "https://dev.gkayaalp.com/elisp/index.html#forecast-el"))]) (foreign-regexp . [(20200325 50) nil "search and replace by foreign regexp." tar ((:commit . "e2dd47f2160cadc194eb156e7c76c3c869e6706e") (:authors ("K-talo Miyazaki ")) (:maintainer "K-talo Miyazaki ") (:keywords "convenience" "emulations" "matching" "tools" "unix" "wp"))]) (foreman-mode . [(20170725 1422) ((s (1 9 0)) (dash (2 10 0)) (dash-functional (1 2 0)) (f (0 17 2)) (emacs (24))) "View and manage Procfile-based applications" single ((:commit . "22b3bb13134b617870ed1e888af739f4818be929") (:authors ("ZHOU Feng" . "zf.pascal@gmail.com")) (:maintainer "ZHOU Feng" . "zf.pascal@gmail.com") (:keywords "foreman") (:url . "http://github.com/zweifisch/foreman-mode"))]) (forest-blue-theme . [(20160627 842) ((emacs (24))) "Emacs theme with a dark background." single ((:commit . "58096ce1a25615d2bae806c3775bae3e2775019d") (:authors ("olkinn")) (:maintainer "olkinn"))]) @@ -1684,7 +1684,7 @@ (fsbot-data-browser . [(20160921 1533) nil "browse the fsbot database using tabulated-list-mode" single ((:commit . "6bca4f7de63e31839d2542f6c678b79931dec344") (:authors ("Benaiah Mischenko")) (:maintainer "Benaiah Mischenko") (:keywords "fsbot" "irc" "tabulated-list-mode") (:url . "http://github.com/benaiah/fsbot-data-browser"))]) (fsharp-mode . [(20210331 1931) ((emacs (25)) (s (1 3 1))) "Support for the F# programming language" tar ((:commit . "93b1fbc31d73286a18640a36fc2be87d1736e0f2") (:authors ("1993-1997 Xavier Leroy, Jacques Garrigue and Ian T Zimmerman") ("2010-2011 Laurent Le Brun" . "laurent@le-brun.eu") ("2012-2014 Robin Neatherway" . "robin.neatherway@gmail.com") ("2017-2021 Jürgen Hötzel")) (:maintainer "Jürgen Hötzel") (:keywords "languages"))]) (fstar-mode . [(20201012 2201) ((emacs (24 3)) (dash (2 11)) (company (0 8 12)) (quick-peek (1 0)) (yasnippet (0 11 0)) (flycheck (30 0)) (company-quickhelp (2 2 0))) "Support for F* programming" tar ((:commit . "3afbf04e4eb21af950cfdb727d8b808164fd9415") (:authors ("Clément Pit-Claudel" . "clement.pitclaudel@live.com")) (:maintainer "Clément Pit-Claudel" . "clement.pitclaudel@live.com") (:keywords "convenience" "languages") (:url . "https://github.com/FStarLang/fstar-mode.el"))]) - (fuel . [(20210323 1426) ((cl-lib (0 2)) (emacs (24 2))) "Major mode for the Factor programming language." tar ((:commit . "73f763133a61ee25a36d8819e0f10505a6aab373"))]) + (fuel . [(20210323 1426) ((cl-lib (0 2)) (emacs (24 2))) "Major mode for the Factor programming language." tar ((:commit . "954e5e323247b3bef650e490d52a28063a4e6ae5"))]) (fuff . [(20170202 1503) ((seq (2 3))) "Find files with findutils, recursively" single ((:commit . "278e849913df87bd8756c59382282d87474802c3") (:authors ("Joel Moberg")) (:maintainer "Joel Moberg") (:keywords "files" "project" "convenience") (:url . "https://github.com/joelmo/fuff"))]) (full-ack . [(20140223 1732) nil "a front-end for ack" single ((:commit . "761d846e105b150f8e6d13d7a8983f0248313a45") (:authors ("Nikolaj Schumacher ")) (:maintainer "Nikolaj Schumacher ") (:keywords "tools" "matching") (:url . "http://nschum.de/src/emacs/full-ack/"))]) (fullframe . [(20210226 1057) ((cl-lib (0 5))) "Generalized automatic execution in a single frame" single ((:commit . "886b831c001b44ec95aec4ff36e8bc1b3003c786") (:authors ("Tom Regner" . "tom@goochesa.de")) (:maintainer "Tom Regner" . "tom@goochesa.de") (:keywords "fullscreen"))]) @@ -1879,7 +1879,7 @@ (goto-last-change . [(20150109 1823) nil "Move point through buffer-undo-list positions" single ((:commit . "58b0928bc255b47aad318cd183a5dce8f62199cc") (:authors ("Kevin Rodgers" . "ihs_4664@yahoo.com")) (:maintainer "Kevin Rodgers" . "ihs_4664@yahoo.com") (:keywords "convenience") (:url . "https://github.com/camdez/goto-last-change.el"))]) (goto-last-point . [(20190525 1855) ((emacs (24 3))) "Record and jump to the last point in the buffer." single ((:commit . "7ea191df18ff4774cf1dc568e1726143dd54ea02") (:authors ("Manuel Uberti" . "manuel.uberti@inventati.org")) (:maintainer "Manuel Uberti" . "manuel.uberti@inventati.org") (:keywords "convenience") (:url . "https://github.com/manuel-uberti/goto-last-point"))]) (goto-line-preview . [(20210323 422) ((emacs (25))) "Preview line when executing `goto-line` command" single ((:commit . "c83688ea95b4308145555fea50e953a26d67b1b2") (:authors ("Shen, Jen-Chieh" . "jcs090218@gmail.com")) (:maintainer "Shen, Jen-Chieh" . "jcs090218@gmail.com") (:url . "https://github.com/jcs-elpa/goto-line-preview"))]) - (govc . [(20191213 2131) ((emacs (24 3)) (dash (1 5 0)) (s (1 9 0)) (magit-popup (2 0 50)) (json-mode (1 6 0))) "Interface to govc for managing VMware ESXi and vCenter" single ((:commit . "9af23072767a6d3093c000464d015120e6c6d20c") (:authors ("The govc developers")) (:maintainer "The govc developers") (:keywords "convenience") (:url . "https://github.com/vmware/govmomi/tree/master/govc/emacs"))]) + (govc . [(20191213 2131) ((emacs (24 3)) (dash (1 5 0)) (s (1 9 0)) (magit-popup (2 0 50)) (json-mode (1 6 0))) "Interface to govc for managing VMware ESXi and vCenter" single ((:commit . "e7c3f4899db3f44ae85985ce6b8b8c640e60729d") (:authors ("The govc developers")) (:maintainer "The govc developers") (:keywords "convenience") (:url . "https://github.com/vmware/govmomi/tree/master/govc/emacs"))]) (govet . [(20170808 1724) nil "linter/problem finder for the Go source code" single ((:commit . "1c05817cf8b96589076c7ac4e52ee58a860a0cbf") (:url . "https://godoc.org/golang.org/x/tools/cmd/vet"))]) (gpastel . [(20181229 1404) ((emacs (25 1))) "Integrates GPaste with the kill-ring" single ((:commit . "d5fc55bc825203f998537c5834718e665bb87c29") (:authors ("Damien Cassou" . "damien@cassou.me")) (:maintainer "Damien Cassou" . "damien@cassou.me") (:keywords "tools") (:url . "https://gitlab.petton.fr/DamienCassou/desktop-environment"))]) (grab-mac-link . [(20200712 428) ((emacs (24))) "Grab link from Mac Apps and insert it into Emacs" single ((:commit . "9b47cbe126a0735fa447a3c5e1e8ba80a7ef8d26") (:authors ("Xu Chunyang")) (:maintainer "Xu Chunyang") (:keywords "mac" "hyperlink") (:url . "https://github.com/xuchunyang/grab-mac-link.el"))]) @@ -2478,7 +2478,7 @@ (js-react-redux-yasnippets . [(20200316 1144) ((emacs (24 3)) (yasnippet (0 8 0))) "JavaScript,React,Redux yasnippets" tar ((:commit . "9f509043f01fa59bff4daf31b2e95d63f8deab4a") (:authors ("sooqua")) (:maintainer "sooqua") (:keywords "convenience" "snippets") (:url . "https://github.com/sooqua/js-react-redux-yasnippets"))]) (js2-closure . [(20170816 1918) ((js2-mode (20150909))) "Google Closure dependency manager" single ((:commit . "f59db386d7d0693935d0bf52babcd2c203c06d04") (:authors ("Justine Tunney" . "jart@google.com")) (:maintainer "Justine Tunney" . "jart@google.com") (:keywords "javascript" "closure") (:url . "http://github.com/jart/js2-closure"))]) (js2-highlight-vars . [(20170418 1829) ((emacs (24 4)) (js2-mode (20150908))) "highlight occurrences of the variable under cursor" single ((:commit . "e3bb177e50f76b272e8073a94d4f46be6512a163") (:authors ("Mihai Bazon" . "mihai.bazon@gmail.com")) (:maintainer "Mihai Bazon" . "mihai.bazon@gmail.com") (:url . "http://mihai.bazon.net/projects/editing-javascript-with-emacs-js2-mode/js2-highlight-vars-mode"))]) - (js2-mode . [(20201220 1718) ((emacs (24 1)) (cl-lib (0 5))) "Improved JavaScript editing mode" tar ((:commit . "29979e5f3301796ba606759e39ee0b1b6a2a24f3") (:authors ("Steve Yegge" . "steve.yegge@gmail.com") ("mooz" . "stillpedant@gmail.com") ("Dmitry Gutov" . "dgutov@yandex.ru")) (:maintainer "Steve Yegge" . "steve.yegge@gmail.com") (:keywords "languages" "javascript") (:url . "https://github.com/mooz/js2-mode/"))]) + (js2-mode . [(20210414 2241) ((emacs (24 1)) (cl-lib (0 5))) "Improved JavaScript editing mode" tar ((:commit . "b891edecedf30be6321e2f109fdfeb25b0edad27") (:authors ("Steve Yegge" . "steve.yegge@gmail.com") ("mooz" . "stillpedant@gmail.com") ("Dmitry Gutov" . "dgutov@yandex.ru")) (:maintainer "Steve Yegge" . "steve.yegge@gmail.com") (:keywords "languages" "javascript") (:url . "https://github.com/mooz/js2-mode/"))]) (js2-refactor . [(20210306 2003) ((js2-mode (20101228)) (s (1 9 0)) (multiple-cursors (1 0 0)) (dash (1 0 0)) (s (1 0 0)) (yasnippet (0 9 0 1))) "A JavaScript refactoring library for emacs." tar ((:commit . "a0977c4ce1918cc266db9d6cd7a2ab63f3a76b9a") (:authors ("Magnar Sveen" . "magnars@gmail.com") ("Nicolas Petton" . "nicolas@petton.fr")) (:maintainer "Magnar Sveen" . "magnars@gmail.com") (:keywords "conveniences"))]) (js2hl . [(20201119 816) ((emacs (25 1)) (js2-mode (20190219))) "Highlight/rename things using js2-mode parser" single ((:commit . "d970dd53dec76f9f72ade5b1f8717dea3d45bb3c") (:authors ("Chen Bin ")) (:maintainer "Chen Bin ") (:keywords "convenience") (:url . "https://github.com/redguardtoo/js2hl"))]) (js3-mode . [(20160515 1550) nil "An improved JavaScript editing mode" tar ((:commit . "229aeb374f1b1f3ee5c59b8ba3eebb6385c232cb") (:authors ("Thom Blake" . "webmaster@thomblake.com")) (:maintainer "Thom Blake" . "webmaster@thomblake.com") (:keywords "javascript" "languages"))]) @@ -2532,7 +2532,7 @@ (keg . [(20210226 2246) ((emacs (24 1)) (cl-lib (0 6))) "Modern Elisp package development system" tar ((:commit . "e4c7d9d8f823fa717df5f0e7039d525758429fc9") (:authors ("Naoya Yamashita" . "conao3@gmail.com")) (:maintainer "Naoya Yamashita" . "conao3@gmail.com") (:keywords "convenience") (:url . "https://github.com/conao3/keg.el"))]) (keg-mode . [(20200601 333) ((emacs (24 4))) "Major mode for editing Keg files" single ((:commit . "e4c7d9d8f823fa717df5f0e7039d525758429fc9") (:authors ("Naoya Yamashita" . "conao3@gmail.com")) (:maintainer "Naoya Yamashita" . "conao3@gmail.com") (:keywords "convenience") (:url . "https://github.com/conao3/keg.el"))]) (kerl . [(20150424 2005) nil "Emacs integration for kerl" single ((:commit . "1732ee26213f021bf040919c45ad276aafcaae14") (:authors ("Correl Roush" . "correl@gmail.com")) (:maintainer "Correl Roush" . "correl@gmail.com") (:keywords "tools") (:url . "http://github.com/correl/kerl.el/"))]) - (key-assist . [(20210414 11) ((emacs (24 3))) "Minibuffer keybinding cheatsheet and launcher" single ((:commit . "512a9e9aa26abc80985c36275f45f2fcdff75470") (:authors ("Boruch Baum" . "boruch_baum@gmx.com")) (:maintainer "Boruch Baum" . "boruch_baum@gmx.com") (:keywords "abbrev" "convenience" "docs" "help") (:url . "https://github.com/Boruch-Baum/emacs-key-assist"))]) + (key-assist . [(20210415 227) ((emacs (24 3))) "Minibuffer keybinding cheatsheet and launcher" single ((:commit . "fae7ce265db3bcfd1c6153eb051afd8789e61a4b") (:authors ("Boruch Baum" . "boruch_baum@gmx.com")) (:maintainer "Boruch Baum" . "boruch_baum@gmx.com") (:keywords "abbrev" "convenience" "docs" "help") (:url . "https://github.com/Boruch-Baum/emacs-key-assist"))]) (key-chord . [(20201222 2030) ((emacs (24))) "map pairs of simultaneously pressed keys to commands" single ((:commit . "7f7fd7c5bd2b996fa054779357e1566f7989e07d") (:authors ("David Andersson ")) (:maintainer "David Andersson ") (:keywords "keyboard" "chord" "input"))]) (key-combo . [(20150324 1439) nil "map key sequence to commands" single ((:commit . "2fb5c65bc82d5bd2964e2b163822429ab45d90a1") (:authors ("Yuuki Arisawa" . "yuuki.ari@gmail.com")) (:maintainer "Vitalie Spinu" . "spinuvit@gmail.com") (:keywords "keyboard" "input") (:url . "https://github.com/uk-ar/key-combo"))]) (key-intercept . [(20140211 749) nil "Intercept prefix keys" single ((:commit . "d9a60edb4ce893f2d3d94f242164fdcc62d43cf2") (:authors ("INA Lintaro ")) (:maintainer "INA Lintaro ") (:keywords "keyboard") (:url . "http://github.com/tarao/key-intercept-el"))]) @@ -2558,7 +2558,7 @@ (killer . [(20190128 10) nil "kill and delete text" single ((:commit . "ace0547944933440384ceeb5876b1f68c082d540") (:authors ("Jonas Bernoulli" . "jonas@bernoul.li")) (:maintainer "Jonas Bernoulli" . "jonas@bernoul.li") (:keywords "convenience") (:url . "http://github.com/tarsius/killer"))]) (kite . [(20130201 1938) ((json (1 2)) (websocket (0 93 1))) "WebKit inspector front-end" tar ((:commit . "7ed74d1147a6ddd152d3da65dc30df3517d53144") (:authors ("Julian Scheid" . "julians37@gmail.com")) (:maintainer "Julian Scheid" . "julians37@gmail.com") (:keywords "tools"))]) (kite-mini . [(20160508 1106) ((dash (2 11 0)) (websocket (1 5))) "Remotely evaluate JavaScript in the WebKit debugger" tar ((:commit . "a68619dbc109c7989f3448426d8c1ee9e797c11f") (:authors ("Tung Dao" . "me@tungdao.com")) (:maintainer "Tung Dao" . "me@tungdao.com") (:keywords "webkit") (:url . "https://github.com/tungd/kite-mini.el"))]) - (kivy-mode . [(20210318 2106) nil "Emacs major mode for editing Kivy files" single ((:commit . "9c69f30742e1df8190ae9ce1293edf6d6b0c9f7e") (:authors ("Dean Serenevy" . "dean@serenevy.net")) (:maintainer "Dean Serenevy" . "dean@serenevy.net"))]) + (kivy-mode . [(20210318 2106) nil "Emacs major mode for editing Kivy files" single ((:commit . "812105faaa7a80aadbc9112a69e9ec95294004f3") (:authors ("Dean Serenevy" . "dean@serenevy.net")) (:maintainer "Dean Serenevy" . "dean@serenevy.net"))]) (kiwix . [(20210219 51) ((emacs (24 4)) (request (0 3 0))) "Searching offline Wikipedia through Kiwix." tar ((:commit . "0c5e1619f079df822686cf42af5859111b6afd44") (:authors ("stardiviner" . "numbchild@gmail.com")) (:maintainer "stardiviner" . "numbchild@gmail.com") (:keywords "kiwix" "wikipedia") (:url . "https://github.com/stardiviner/kiwix.el"))]) (kixtart-mode . [(20150611 1604) ((emacs (24))) "major mode for Kixtart scripting files" single ((:commit . "1c2356797e7b766bbaaa2b341176a8b10499cd79") (:authors ("Ryrun ")) (:maintainer "Ryrun ") (:keywords "languages") (:url . "https://github.com/ryrun/kixtart-mode"))]) (klere-theme . [(20210320 1912) ((emacs (24))) "A dark theme with lambent color highlights and incremental grays" single ((:commit . "f9eacacc00455e6c42961ec41f24f864c2a05ace") (:authors ("Wamm K. D." . "jaft.r@outlook.com")) (:maintainer "Wamm K. D." . "jaft.r@outlook.com") (:url . "https://codeberg.org/WammKD/emacs-klere-theme"))]) @@ -2588,7 +2588,7 @@ (labburn-theme . [(20200822 2153) nil "A lab color space zenburn theme." single ((:commit . "4ef2892f56c973907361bc91495d14204744f678") (:authors ("Johannes Goslar")) (:maintainer "Johannes Goslar") (:keywords "theme" "zenburn") (:url . "https://github.com/ksjogo/labburn-theme"))]) (laguna-theme . [(20200928 2159) nil "A theme that's easy on the eyes & focuses on importance." single ((:commit . "61b18f6362b94e42ea5ab19a6f2debc2bd917eda") (:authors ("Henry Newcomer" . "a.cliche.email@gmail.com")) (:maintainer "Henry Newcomer" . "a.cliche.email@gmail.com") (:url . "https://github.com/HenryNewcomer/laguna-theme"))]) (lakota-input . [(20200823 2146) nil "Input modes for Lakota language orthographies" single ((:commit . "b74b9de284a0404a120bb15340def4dd2f9a4779") (:authors ("Grant Shangreaux" . "shshoshin@protonmail.com")) (:maintainer "Grant Shangreaux" . "shshoshin@protonmail.com") (:url . "https://git.sr.ht/~shoshin/lakota-input.git"))]) - (lambdapi-mode . [(20210407 1529) ((emacs (26 1)) (eglot (1 5)) (math-symbol-lists (1 2 1)) (highlight (20190710 1527))) "A major mode for editing Lambdapi source code" tar ((:commit . "058c1c5896fabb1e2e0b7cf4f4ae36c1ce8f502b") (:maintainer "Deducteam" . "dedukti-dev@inria.fr") (:keywords "languages") (:url . "https://github.com/Deducteam/lambdapi"))]) + (lambdapi-mode . [(20210407 1529) ((emacs (26 1)) (eglot (1 5)) (math-symbol-lists (1 2 1)) (highlight (20190710 1527))) "A major mode for editing Lambdapi source code" tar ((:commit . "74a47238ce1d2d86a3a62c5e8100a6198e73564b") (:maintainer "Deducteam" . "dedukti-dev@inria.fr") (:keywords "languages") (:url . "https://github.com/Deducteam/lambdapi"))]) (lammps-mode . [(20180801 1319) ((emacs (24 4))) "basic syntax highlighting for LAMMPS files" single ((:commit . "a5b68d7a59975770b56ee8f6e66fa4f703a72ffe") (:authors ("Aidan Thompson ")) (:maintainer "Rohit Goswami ") (:keywords "languages" "faces") (:url . "https://github.com/lammps/lammps/tree/master/tools/emacs"))]) (lang-refactor-perl . [(20131122 2127) nil "Simple refactorings, primarily for Perl" single ((:commit . "691bd69639de6b7af357e3b7143563ececd9c497") (:authors (nil . "Johan Lindstrom ")) (:maintainer nil . "Johan Lindstrom ") (:keywords "languages" "refactoring" "perl") (:url . "https://github.com/jplindstrom/emacs-lang-refactor-perl"))]) (langdoc . [(20150218 645) ((cl-lib (0 2))) "Help to define help document mode for various languages" single ((:commit . "2c7223bacb116992d700ecb19a60df5c09c63424") (:authors ("Tomoya Tanjo" . "ttanjo@gmail.com")) (:maintainer "Tomoya Tanjo" . "ttanjo@gmail.com") (:keywords "convenience" "eldoc") (:url . "https://github.com/tom-tan/langdoc/"))]) @@ -2647,7 +2647,7 @@ (license-snippets . [(20201117 1619) ((emacs (26)) (yasnippet (0 8 0))) "LICENSE templates for yasnippet" tar ((:commit . "a729748b7d7f38a916fe61f23db6e7446c0a5e8f") (:authors ("Seong Yong-ju" . "sei40kr@gmail.com")) (:maintainer "Seong Yong-ju" . "sei40kr@gmail.com") (:keywords "tools") (:url . "https://github.com/sei40kr/license-snippets"))]) (license-templates . [(20200906 2047) ((emacs (24 3)) (request (0 3 0))) "Create LICENSE using GitHub API" single ((:commit . "ef80eff8b7be117f9c48bdc6d9a62e56b0a93554") (:authors ("Shen, Jen-Chieh" . "jcs090218@gmail.com")) (:maintainer "Shen, Jen-Chieh" . "jcs090218@gmail.com") (:url . "https://github.com/jcs-elpa/license-templates"))]) (light-soap-theme . [(20150607 1445) ((emacs (24))) "Emacs 24 theme with a light background." single ((:commit . "76a787bd40c6b567ae68ced7f5d9f9f10725e00d"))]) - (ligo-mode . [(20210303 1751) ((emacs (27 1))) "A major mode for editing LIGO source code" single ((:commit . "c146c829b2653e139a0e9316b3d8aec06632dc08") (:authors ("LigoLang SASU")) (:maintainer "LigoLang SASU") (:keywords "languages") (:url . "https://gitlab.com/ligolang/ligo/-/tree/dev/tools/emacs"))]) + (ligo-mode . [(20210303 1751) ((emacs (27 1))) "A major mode for editing LIGO source code" single ((:commit . "8fe1047569fc43745f210c9c40737e4359fb0f4c") (:authors ("LigoLang SASU")) (:maintainer "LigoLang SASU") (:keywords "languages") (:url . "https://gitlab.com/ligolang/ligo/-/tree/dev/tools/emacs"))]) (line-reminder . [(20210216 1451) ((emacs (24 4)) (indicators (0 0 4))) "Line annotation for changed and saved lines" single ((:commit . "bc488bbdba2172629183891758cfa9466a64182f") (:authors ("Shen, Jen-Chieh" . "jcs090218@gmail.com")) (:maintainer "Shen, Jen-Chieh" . "jcs090218@gmail.com") (:url . "https://github.com/jcs-elpa/line-reminder"))]) (line-up-words . [(20180219 1024) nil "Align words in an intelligent way" single ((:commit . "a49afb9c168eaf8aaaf94f0c631b7b74db9a1d82") (:url . "https://github.com/janestreet/line-up-words"))]) (lines-at-once . [(20180422 247) ((emacs (25))) "Insert and edit multiple lines at once" single ((:commit . "31bce4b79fe16251b7cf118f0d343b0b46f72360") (:authors ("Jiahao Li" . "jiahaowork@gmail.com")) (:maintainer "Jiahao Li" . "jiahaowork@gmail.com") (:keywords "abbrev" "tools") (:url . "https://github.com/jiahaowork/lines-at-once.el"))]) @@ -2728,7 +2728,7 @@ (lsp-julia . [(20210329 1551) ((emacs (25 1)) (lsp-mode (6 3)) (julia-mode (0 3))) "Julia support for lsp-mode" tar ((:commit . "81f7de5b9fe8e8e0e1e3a3ccc677f052edad140d") (:authors ("Martin Wolke" . "vibhavp@gmail.com") ("Adam Beckmeyer" . "adam_git@thebeckmeyers.xyz") ("Guido Kraemer" . "gdkrmr@users.noreply.github.com")) (:maintainer "Adam Beckmeyer" . "adam_git@thebeckmeyers.xyz") (:keywords "languages" "tools") (:url . "https://github.com/non-Jedi/lsp-julia"))]) (lsp-latex . [(20210110 1914) ((emacs (25 1)) (lsp-mode (6 0))) "lsp-mode client for LaTeX, on texlab" single ((:commit . "5fc536f24dc659f998bc673129d9e7c4b20d297c") (:authors ("ROCKTAKEY" . "rocktakey@gmail.com")) (:maintainer "ROCKTAKEY" . "rocktakey@gmail.com") (:keywords "languages" "tex") (:url . "https://github.com/ROCKTAKEY/lsp-latex"))]) (lsp-metals . [(20210413 526) ((emacs (26 1)) (lsp-mode (7 0)) (lsp-treemacs (0 2)) (dap-mode (0 3)) (dash (2 18 0)) (f (0 20 0)) (ht (2 0)) (treemacs (2 5))) "Scala Client settings" tar ((:commit . "fcacc7d6e33c4178db62492711c3ea624c990314") (:authors ("Ross A. Baker" . "ross@rossabaker.com") ("Evgeny Kurnevsky" . "kurnevsky@gmail.com")) (:maintainer "Ross A. Baker" . "ross@rossabaker.com") (:keywords "languages" "extensions") (:url . "https://github.com/emacs-lsp/lsp-metals"))]) - (lsp-mode . [(20210414 1652) ((emacs (26 1)) (dash (2 18 0)) (f (0 20 0)) (ht (2 3)) (spinner (1 7 3)) (markdown-mode (2 3)) (lv (0))) "LSP mode" tar ((:commit . "682f5b14f03f37558c88ac987036d398b27f09dd") (:authors ("Vibhav Pant, Fangrui Song, Ivan Yonchovski")) (:maintainer "Vibhav Pant, Fangrui Song, Ivan Yonchovski") (:keywords "languages") (:url . "https://github.com/emacs-lsp/lsp-mode"))]) + (lsp-mode . [(20210415 615) ((emacs (26 1)) (dash (2 18 0)) (f (0 20 0)) (ht (2 3)) (spinner (1 7 3)) (markdown-mode (2 3)) (lv (0))) "LSP mode" tar ((:commit . "1c79e2eb2bb10576b071b5e1639178873f18dbe2") (:authors ("Vibhav Pant, Fangrui Song, Ivan Yonchovski")) (:maintainer "Vibhav Pant, Fangrui Song, Ivan Yonchovski") (:keywords "languages") (:url . "https://github.com/emacs-lsp/lsp-mode"))]) (lsp-mssql . [(20191204 1150) ((emacs (25 1)) (lsp-mode (6 2)) (dash (2 14 1)) (f (0 20 0)) (ht (2 0)) (lsp-treemacs (0 1))) "MSSQL LSP bindings" tar ((:commit . "88319a61a06e27fc1d3ea2e7b853ec1692b4c166") (:authors ("Ivan Yonchovski" . "yyoncho@gmail.com")) (:maintainer "Ivan Yonchovski" . "yyoncho@gmail.com") (:keywords "data" "languages") (:url . "https://github.com/emacs-lsp/lsp-mssql"))]) (lsp-origami . [(20210126 843) ((origami (1 0)) (lsp-mode (6 1))) "origami.el support for lsp-mode" single ((:commit . "bedea3d25552d6969e917a15a0acc3d333ddc742") (:authors ("Vibhav Pant")) (:maintainer "Vibhav Pant") (:keywords "languages" "lsp-mode") (:url . "https://github.com/emacs-lsp/lsp-origami"))]) (lsp-p4 . [(20190127 1049) ((lsp-mode (3 0))) "P4 support for lsp-mode" tar ((:commit . "669460d93b87fb876df11b2b68229677e7ad1a26") (:authors ("Dmitri Makarov")) (:maintainer "Dmitri Makarov") (:keywords "lsp" "p4") (:url . "https://github.com/dmakarov/p4ls"))]) @@ -2858,11 +2858,11 @@ (memolist . [(20150804 1721) ((markdown-mode (22 0)) (ag (0 45))) "memolist.el is Emacs port of memolist.vim." single ((:commit . "c437a32d3955f859d9bbcbadf0911bbe27d877ff") (:authors ("mikanfactory ")) (:maintainer "mikanfactory") (:keywords "markdown" "memo") (:url . "http://github.com/mikanfactory/emacs-memolist"))]) (mentor . [(20201121 1649) ((xml-rpc (1 6 12)) (seq (1 11)) (cl-lib (0 5)) (async (1 9 3))) "Frontend for the rTorrent bittorrent client" tar ((:commit . "aa1eb8a8e7d8c5e5564b08f82130eed0943826bb") (:authors ("Stefan Kangas" . "stefankangas@gmail.com")) (:maintainer "Stefan Kangas" . "stefankangas@gmail.com") (:keywords "comm" "processes" "bittorrent"))]) (meow . [(20210410 1837) ((emacs (26 3)) (dash (2 12 0)) (cl-lib (0 6 1)) (s (1 12 0))) "Modal Editing On Wheel" tar ((:commit . "6eb10d223fb7e0d87ac7ab7063fdb3951934e94c") (:authors ("Shi Tianshu")) (:maintainer "Shi Tianshu") (:keywords "convenience" "modal-editing") (:url . "https://www.github.com/DogLooksGood/meow"))]) - (merlin . [(20210408 1014) ((emacs (25 1))) "Mode for Merlin, an assistant for OCaml" tar ((:commit . "635923da0771cc0cb7154d3fc58e348e9148766d") (:authors ("Frédéric Bour ")) (:maintainer "Frédéric Bour ") (:keywords "ocaml" "languages") (:url . "https://github.com/ocaml/merlin"))]) - (merlin-ac . [(20210409 1323) ((emacs (25 1)) (merlin (3)) (auto-complete (1 5))) "Merlin and auto-complete integration." single ((:commit . "635923da0771cc0cb7154d3fc58e348e9148766d") (:authors ("Simon Castellan ") ("Frédéric Bour ") ("Thomas Refis ")) (:maintainer "Simon Castellan ") (:keywords "ocaml" "languages") (:url . "http://github.com/ocaml/merlin"))]) - (merlin-company . [(20210409 1323) ((emacs (25 1)) (merlin (3)) (company (0 9))) "Merlin and company mode integration." single ((:commit . "635923da0771cc0cb7154d3fc58e348e9148766d") (:authors ("Simon Castellan ") ("Frédéric Bour ") ("Thomas Refis ")) (:maintainer "Simon Castellan ") (:keywords "ocaml" "languages") (:url . "http://github.com/ocaml/merlin"))]) + (merlin . [(20210408 1014) ((emacs (25 1))) "Mode for Merlin, an assistant for OCaml" tar ((:commit . "1ad950191461c1d0b560b97b1c8f9223eadde57f") (:authors ("Frédéric Bour ")) (:maintainer "Frédéric Bour ") (:keywords "ocaml" "languages") (:url . "https://github.com/ocaml/merlin"))]) + (merlin-ac . [(20210409 1323) ((emacs (25 1)) (merlin (3)) (auto-complete (1 5))) "Merlin and auto-complete integration." single ((:commit . "1ad950191461c1d0b560b97b1c8f9223eadde57f") (:authors ("Simon Castellan ") ("Frédéric Bour ") ("Thomas Refis ")) (:maintainer "Simon Castellan ") (:keywords "ocaml" "languages") (:url . "http://github.com/ocaml/merlin"))]) + (merlin-company . [(20210409 1323) ((emacs (25 1)) (merlin (3)) (company (0 9))) "Merlin and company mode integration." single ((:commit . "1ad950191461c1d0b560b97b1c8f9223eadde57f") (:authors ("Simon Castellan ") ("Frédéric Bour ") ("Thomas Refis ")) (:maintainer "Simon Castellan ") (:keywords "ocaml" "languages") (:url . "http://github.com/ocaml/merlin"))]) (merlin-eldoc . [(20190830 517) ((emacs (24 4)) (merlin (3 0))) "eldoc for OCaml and Reason" single ((:commit . "db7fab1eddfe34781b7e79694f8923b285698032") (:authors ("Louis Roché" . "louis@louisroche.net")) (:maintainer "Louis Roché" . "louis@louisroche.net") (:keywords "merlin" "ocaml" "languages" "eldoc") (:url . "https://github.com/khady/merlin-eldoc"))]) - (merlin-iedit . [(20210409 1323) ((emacs (25 1)) (merlin (3)) (iedit (0 9))) "Merlin and iedit integration." single ((:commit . "635923da0771cc0cb7154d3fc58e348e9148766d") (:authors ("Simon Castellan ") ("Frédéric Bour ") ("Thomas Refis ")) (:maintainer "Simon Castellan ") (:keywords "ocaml" "languages") (:url . "http://github.com/ocaml/merlin"))]) + (merlin-iedit . [(20210409 1323) ((emacs (25 1)) (merlin (3)) (iedit (0 9))) "Merlin and iedit integration." single ((:commit . "1ad950191461c1d0b560b97b1c8f9223eadde57f") (:authors ("Simon Castellan ") ("Frédéric Bour ") ("Thomas Refis ")) (:maintainer "Simon Castellan ") (:keywords "ocaml" "languages") (:url . "http://github.com/ocaml/merlin"))]) (mermaid-mode . [(20210329 2328) ((f (0 20 0)) (emacs (25 3))) "major mode for working with mermaid graphs" single ((:commit . "b650649a9f28629154a041ef187c21c5128530f2") (:authors ("Adrien Brochard")) (:maintainer "Adrien Brochard") (:keywords "mermaid" "graphs" "tools" "processes") (:url . "https://github.com/abrochard/mermaid-mode"))]) (meson-mode . [(20210321 1136) ((emacs (26 1))) "Major mode for the Meson build system files" tar ((:commit . "88717d5256d4cf47a85756dc5e204ea23eec165d") (:authors ("Michal Sojka" . "sojkam1@fel.cvut.cz")) (:maintainer "Michal Sojka" . "sojkam1@fel.cvut.cz") (:keywords "languages" "tools") (:url . "https://github.com/wentasah/meson-mode"))]) (message-attachment-reminder . [(20200428 124) ((emacs (24 1))) "Remind if missing attachment" single ((:commit . "ce506b27b15cc39a47c58ff795026eaea8632e2f") (:authors ("Alex Murray" . "murray.alex@gmail.com")) (:maintainer "Alex Murray" . "murray.alex@gmail.com") (:url . "https://github.com/alexmurray/message-attachment-reminder"))]) @@ -3181,7 +3181,7 @@ (objc-font-lock . [(20141021 1822) nil "Highlight Objective-C method calls." single ((:commit . "34b457d577f97ca94b8792d025f9a909c7610612") (:authors ("Anders Lindgren")) (:maintainer "Anders Lindgren") (:keywords "languages" "faces") (:url . "https://github.com/Lindydancer/objc-font-lock"))]) (objed . [(20200911 1435) ((emacs (25)) (cl-lib (0 5))) "Navigate and edit text objects." tar ((:commit . "70f9fb5e0aa1627b0afc7c6b3d0aea9bac70a210") (:authors ("Clemens Radermacher" . "clemera@posteo.net")) (:maintainer "Clemens Radermacher" . "clemera@posteo.net") (:keywords "convenience") (:url . "https://github.com/clemera/objed"))]) (obsidian-theme . [(20170719 948) nil "port of the eclipse obsidian theme" single ((:commit . "f45efb2ebe9942466c1db6abbe2d0e6847b785ea") (:authors ("martin haesler")) (:maintainer "martin haesler") (:url . "http://github.com/mswift42/obsidian-theme"))]) - (ocamlformat . [(20201204 945) ((emacs (24 3))) "Utility functions to format ocaml code" single ((:commit . "fd078c3a37cb679dfffe890995a4e6a1f63ece15") (:keywords "languages" "ocaml") (:url . "https://github.com/ocaml-ppx/ocamlformat"))]) + (ocamlformat . [(20201204 945) ((emacs (24 3))) "Utility functions to format ocaml code" single ((:commit . "0ad8d0a5a55e28e425fdc89e220274447500f0d2") (:keywords "languages" "ocaml") (:url . "https://github.com/ocaml-ppx/ocamlformat"))]) (occidental-theme . [(20130312 1958) nil "Custom theme for faces based on Adwaita" single ((:commit . "fd2db7256d4f78c43d99c3cddb1c39106d479816") (:authors ("William Stevenson" . "yhvh2000@gmail.com") ("Erik Timan" . "dev@timan.info")) (:maintainer "William Stevenson" . "yhvh2000@gmail.com") (:url . "http://github.com/olcai/occidental-theme"))]) (occur-context-resize . [(20210121 50) nil "dynamically resize context around matches in occur-mode" single ((:commit . "9d62a5b5c39ab7921dfc12dd0ab139b38dd16582") (:authors ("Charles L.G. Comstock" . "dgtized@gmail.com")) (:maintainer "Charles L.G. Comstock" . "dgtized@gmail.com") (:keywords "matching") (:url . "https://github.com/dgtized/occur-context-resize.el"))]) (occur-x . [(20130610 1343) nil "Extra functionality for occur" single ((:commit . "352f5fab207d8a1d3dd048073ff127a83e97c82b") (:authors ("Juan-Leon Lahoz" . "juanleon1@gmail.com")) (:maintainer "Juan-Leon Lahoz" . "juanleon1@gmail.com") (:keywords "occur" "search" "convenience"))]) @@ -3296,7 +3296,7 @@ (org-ml . [(20210328 1655) ((emacs (26 1)) (org (9 3)) (dash (2 17)) (s (1 12))) "Functional Org Mode API" tar ((:commit . "9d8c26d12c972a60b94bcc3b364d857db997cfa3") (:authors ("Nathan Dwarshuis" . "ndwar@yavin4.ch")) (:maintainer "Nathan Dwarshuis" . "ndwar@yavin4.ch") (:keywords "org-mode" "outlines") (:url . "https://github.com/ndwarshuis/org-ml"))]) (org-mobile-sync . [(20180606 524) ((emacs (24 3 50)) (org (8 0))) "automatically sync org-mobile on changes" single ((:commit . "06764b943a528827df1e2acc6bc7806cc2c1351f") (:authors ("steckerhalter")) (:maintainer "steckerhalter") (:keywords "org-mode" "org" "mobile" "sync" "todo") (:url . "https://framagit.org/steckerhalter/org-mobile-sync"))]) (org-mru-clock . [(20210408 1259) ((emacs (26 1))) "Clock in/out of tasks with completion and persistent history" single ((:commit . "229461b92ff89fd96cd7730df9fd589a8b0ef949") (:authors ("Kevin Brubeck Unhammer" . "unhammer@fsfe.org")) (:maintainer "Kevin Brubeck Unhammer" . "unhammer@fsfe.org") (:keywords "convenience" "calendar") (:url . "https://github.com/unhammer/org-mru-clock"))]) - (org-msg . [(20210409 1813) ((emacs (24 4)) (htmlize (1 54))) "Org mode to send and reply to email in HTML." single ((:commit . "61ad744a4e54f3211c77e561c727781b7ed814b1") (:authors ("Jérémy Compostella" . "jeremy.compostella@gmail.com")) (:maintainer "Jérémy Compostella" . "jeremy.compostella@gmail.com") (:keywords "extensions" "mail") (:url . "https://github.com/jeremy-compostella/org-msg"))]) + (org-msg . [(20210414 1732) ((emacs (24 4)) (htmlize (1 54))) "Org mode to send and reply to email in HTML." single ((:commit . "b9b5b4ee9469969db9f150911d93b96fe84080d1") (:authors ("Jérémy Compostella" . "jeremy.compostella@gmail.com")) (:maintainer "Jérémy Compostella" . "jeremy.compostella@gmail.com") (:keywords "extensions" "mail") (:url . "https://github.com/jeremy-compostella/org-msg"))]) (org-multi-wiki . [(20210324 1820) ((emacs (26 1)) (dash (2 12)) (s (1 12)) (org-ql (0 5)) (org (9 3))) "Multiple wikis based on Org mode" single ((:commit . "bf8039aadddaf02569fab473f766071ef7e63563") (:authors ("Akira Komamura" . "akira.komamura@gmail.com")) (:maintainer "Akira Komamura" . "akira.komamura@gmail.com") (:keywords "org" "outlines" "files") (:url . "https://github.com/akirak/org-multi-wiki"))]) (org-multiple-keymap . [(20191017 1920) ((org (8 2 4)) (emacs (24)) (cl-lib (0 5))) "Set keymap to elements, such as timestamp and priority." single ((:commit . "4eb8aa0aada012b2346cc7f0c55e07783141a2c3") (:authors ("myuhe ")) (:maintainer "myuhe") (:keywords "convenience" "org-mode") (:url . "https://github.com/myuhe/org-multiple-keymap.el"))]) (org-notebook . [(20170322 452) ((emacs (24)) (org (8)) (cl-lib (0 5))) "Ease the use of org-mode as a notebook" single ((:commit . "86042d866bf441e2c9bb51f995e5994141b78517") (:authors ("Paul Elder" . "paul.elder@amanokami.net")) (:maintainer "Paul Elder" . "paul.elder@amanokami.net") (:keywords "convenience" "tools"))]) @@ -3370,7 +3370,7 @@ (org-treescope . [(20200503 1609) ((emacs (24 3)) (org (9 2 3)) (org-ql (0 5 -1)) (dash (2 17 0))) "Time scoping sparse trees within org" tar ((:commit . "905029a9e2ce6ed325bb8e10f59dc589c181d148") (:authors ("Mehmet Tekman")) (:maintainer "Mehmet Tekman") (:keywords "outlines") (:url . "https://github.com/mtekman/org-treescope.el"))]) (org-treeusage . [(20200418 1904) ((emacs (26 1)) (dash (2 17 0)) (org (9 1 6))) "Examine the usage of org headings in a tree-like manner" tar ((:commit . "fe4323bc500e2d949848c75e8f59340971b35562") (:authors ("Mehmet Tekman")) (:maintainer "Mehmet Tekman") (:keywords "outlines") (:url . "https://github.com/mtekman/org-treeusage.el"))]) (org-trello . [(20210314 1901) ((emacs (24 3)) (request-deferred (0 2 0)) (deferred (0 4 0)) (s (1 11 0)) (dash (2 18 0))) "Minor mode to synchronize org-mode buffer and trello board" tar ((:commit . "9c1c94dff1a46631669023286078b887d077c305") (:authors ("Antoine R. Dumont (@ardumont)" . "antoine.romain.dumont@gmail.com")) (:maintainer "Antoine R. Dumont (@ardumont)" . "antoine.romain.dumont@gmail.com") (:keywords "org-mode" "trello" "sync" "org-trello") (:url . "https://github.com/org-trello/org-trello"))]) - (org-variable-pitch . [(20200919 1348) ((emacs (25))) "Minor mode for variable pitch text in org mode." single ((:commit . "331252334ea2e62d8e06b2dfa24be5dbd7f9c09f") (:authors ("Göktuğ Kayaalp" . "self@gkayaalp.com")) (:maintainer "Göktuğ Kayaalp" . "self@gkayaalp.com") (:keywords "faces") (:url . "https://dev.gkayaalp.com/elisp/index.html#ovp"))]) + (org-variable-pitch . [(20210414 1844) ((emacs (25))) "Minor mode for variable pitch text in org mode." single ((:commit . "7bb01664b45fc08b7d013c91073cf3ce0d313984") (:authors ("Göktuğ Kayaalp" . "self@gkayaalp.com")) (:maintainer "Göktuğ Kayaalp" . "self@gkayaalp.com") (:keywords "faces") (:url . "https://dev.gkayaalp.com/elisp/index.html#ovp"))]) (org-vcard . [(20210208 305) nil "org-mode support for vCard export and import." tar ((:commit . "f4b7445550deb30e170a25fc42541e99730e21d0") (:authors ("Alexis" . "flexibeast@gmail.com") ("Will Dey" . "will123dey@gmail.com")) (:maintainer "Alexis" . "flexibeast@gmail.com") (:keywords "outlines" "org" "vcard") (:url . "https://github.com/flexibeast/org-vcard"))]) (org-wc . [(20200731 2244) nil "Count words in org mode trees." single ((:commit . "dbbf794e4ec6c4080d945f43338185e34a4a582d") (:authors ("Simon Guest")) (:maintainer "Simon Guest"))]) (org-web-tools . [(20201212 1058) ((emacs (25 1)) (org (9 0)) (dash (2 12)) (esxml (0 3 4)) (s (1 10 0)) (request (0 3 0))) "Display and capture web content with Org-mode" tar ((:commit . "b94a07add8558ef7b0666173dbb8a2554f1d41a6") (:authors ("Adam Porter" . "adam@alphapapa.net")) (:maintainer "Adam Porter" . "adam@alphapapa.net") (:keywords "hypermedia" "outlines" "org" "web") (:url . "http://github.com/alphapapa/org-web-tools"))]) @@ -3471,7 +3471,7 @@ (pacfiles-mode . [(20200915 1815) ((emacs (26)) (cl-lib (0 5))) "pacnew and pacsave merging tool" tar ((:commit . "8d06f64abc98c3f3338560c8d6eb47719e034069") (:authors ("Carlos G. Cordero ")) (:maintainer "Carlos G. Cordero" . "pacfiles@binarycharly.com") (:keywords "files" "pacman" "arch" "pacnew" "pacsave" "update" "linux") (:url . "https://github.com/UndeadKernel/pacfiles-mode"))]) (pack . [(20191017 456) ((emacs (24)) (cl-lib (0 5))) "Pack and unpack archive files" single ((:commit . "85cd856fdc00a2365e88b50373b99f1b3d2227be") (:authors ("10sr" . "8.slashes@gmail.com")) (:maintainer "10sr" . "8.slashes@gmail.com") (:keywords "files" "dired") (:url . "https://github.com/10sr/pack-el"))]) (package+ . [(20210124 640) ((emacs (24 3))) "Extensions for the package library." tar ((:commit . "06fbc904e09d3349b669c2624a587fee5accf5ef") (:authors ("Ryan Davis" . "ryand-ruby@zenspider.com")) (:maintainer "Ryan Davis" . "ryand-ruby@zenspider.com") (:keywords "extensions" "tools") (:url . "https://github.com/zenspider/package"))]) - (package-build . [(20210413 129) ((cl-lib (0 5)) (emacs (25 1))) "Tools for assembling a package archive" tar ((:commit . "047801d301a73d4932f33f768d94a8ed26b8d524") (:authors ("Donald Ephraim Curtis" . "dcurtis@milkbox.net")) (:maintainer "Donald Ephraim Curtis" . "dcurtis@milkbox.net") (:keywords "tools") (:url . "https://github.com/melpa/package-build"))]) + (package-build . [(20210414 2223) ((cl-lib (0 5)) (emacs (25 1))) "Tools for assembling a package archive" tar ((:commit . "260b24e596b680f11bb26ca1a091b27af5506919") (:authors ("Donald Ephraim Curtis" . "dcurtis@milkbox.net")) (:maintainer "Donald Ephraim Curtis" . "dcurtis@milkbox.net") (:keywords "tools") (:url . "https://github.com/melpa/package-build"))]) (package-filter . [(20161122 719) nil "package archive whitelist and blacklist" single ((:commit . "bc73b41aea1d65ca44ef1593ca13126df9bbb39e") (:authors ("Donald Ephraim Curtis" . "dcurtis@milkbox.net")) (:maintainer "Donald Ephraim Curtis" . "dcurtis@milkbox.net") (:url . "https://github.com/milkypostman/package-filter"))]) (package-lint . [(20210326 241) ((cl-lib (0 5)) (emacs (24 1)) (let-alist (1 0 6))) "A linting library for elisp package authors" tar ((:commit . "16e589114cc1f2514d95a58d53e1ae7c2ce941b4") (:authors ("Steve Purcell" . "steve@sanityinc.com") ("Fanael Linithien" . "fanael4@gmail.com")) (:maintainer "Steve Purcell" . "steve@sanityinc.com") (:keywords "lisp") (:url . "https://github.com/purcell/package-lint"))]) (package-lint-flymake . [(20210110 2231) ((emacs (26 1)) (package-lint (0 5))) "A package-lint Flymake backend" single ((:commit . "16e589114cc1f2514d95a58d53e1ae7c2ce941b4") (:url . "https://github.com/purcell/package-lint"))]) @@ -3493,7 +3493,7 @@ (pandoc . [(20161128 1157) ((emacs (24 4))) "Pandoc interface" single ((:commit . "198d262d09e30448f1672338b0b5a81cf75e1eaa") (:authors ("USAMI Kenta" . "tadsan@zonu.me")) (:maintainer "USAMI Kenta" . "tadsan@zonu.me") (:keywords "hypermedia" "documentation" "markup" "converter") (:url . "https://github.com/zonuexe/pandoc.el"))]) (pandoc-mode . [(20210317 2340) ((hydra (0 10 0)) (dash (2 10 0))) "Minor mode for interacting with Pandoc" tar ((:commit . "2ad3cfa3045e0a3bcbdee02819c6fd356a8bc40c") (:authors ("Joost Kremers" . "joostkremers@fastmail.fm")) (:maintainer "Joost Kremers" . "joostkremers@fastmail.fm") (:keywords "text" "pandoc") (:url . "http://joostkremers.github.io/pandoc-mode/"))]) (pangu-spacing . [(20190823 401) nil "Minor-mode to add space between Chinese and English characters." single ((:commit . "f92898949ba3bf991fd229416f3bbb54e9c6c223") (:authors ("coldnew" . "coldnew.tw@gmail.com")) (:maintainer "coldnew" . "coldnew.tw@gmail.com") (:url . "http://github.com/coldnew/pangu-spacing"))]) - (paper-theme . [(20200510 5) ((emacs (24))) "A minimal Emacs colour theme." single ((:commit . "331252334ea2e62d8e06b2dfa24be5dbd7f9c09f") (:authors ("Göktuğ Kayaalp")) (:maintainer "Göktuğ Kayaalp") (:keywords "theme" "paper") (:url . "https://dev.gkayaalp.com/elisp/index.html#paper"))]) + (paper-theme . [(20200510 5) ((emacs (24))) "A minimal Emacs colour theme." single ((:commit . "7bb01664b45fc08b7d013c91073cf3ce0d313984") (:authors ("Göktuğ Kayaalp")) (:maintainer "Göktuğ Kayaalp") (:keywords "theme" "paper") (:url . "https://dev.gkayaalp.com/elisp/index.html#paper"))]) (paperless . [(20201130 1241) ((emacs (24 4)) (f (0 11 0)) (s (1 10 0)) (cl-lib (0 6 1))) "A major mode for sorting and filing PDF documents." tar ((:commit . "2db39586a2914f78f345379511d0e8cea4c96b86") (:authors ("Anthony Green" . "green@moxielogic.com")) (:maintainer "Anthony Green" . "green@moxielogic.com") (:keywords "pdf" "convenience") (:url . "http://github.com/atgreen/paperless"))]) (paradox . [(20191011 1111) ((emacs (24 4)) (seq (1 7)) (let-alist (1 0 3)) (spinner (1 7 3)) (hydra (0 13 2))) "A modern Packages Menu. Colored, with package ratings, and customizable." tar ((:commit . "339fe3518d1d102b2295670340e75caf4f01a29a") (:authors ("Artur Malabarba" . "emacs@endlessparentheses.com")) (:maintainer "Artur Malabarba" . "emacs@endlessparentheses.com") (:keywords "package" "packages") (:url . "https://github.com/Malabarba/paradox"))]) (parchment-theme . [(20200910 2310) ((autothemer (0 2))) "Light theme inspired by Acme and Leuven" single ((:commit . "95e8248edbdb01fedc7db4472bcce90d2d872106") (:authors ("Alex Griffin" . "a@ajgrf.com")) (:maintainer "Alex Griffin" . "a@ajgrf.com") (:url . "https://github.com/ajgrf/parchment"))]) @@ -3740,7 +3740,7 @@ (propfont-mixed . [(20150113 2211) ((emacs (24)) (cl-lib (0 5))) "Use proportional fonts with space-based indentation." single ((:commit . "0b461ef4754a469610dba71874a34b6da42176bf") (:authors ("Kirill Ignatiev ")) (:maintainer "Kirill Ignatiev ") (:keywords "faces") (:url . "https://github.com/ikirill/propfont-mixed"))]) (proportional . [(20200309 1556) ((emacs (25 1))) "use a proportional font everywhere" single ((:commit . "0e4537af7ba2bc9dbb449c38350bce012b382f51") (:authors ("Johannes Goslar")) (:maintainer "Johannes Goslar") (:keywords "faces") (:url . "https://github.com/ksjogo/proportional"))]) (prosjekt . [(20151127 1416) ((dash (2 8 0))) "a software project tool for emacs" tar ((:commit . "a864a8be5842223043702395f311e3350c28e9db") (:authors ("Austin Bingham" . "austin.bingham@gmail.com")) (:maintainer "Austin Bingham" . "austin.bingham@gmail.com") (:url . "https://github.com/abingham/prosjekt"))]) - (protobuf-mode . [(20200619 1742) nil "major mode for editing protocol buffers." single ((:commit . "68cb69ea68822d96eee6d6104463edf85e70d689") (:authors ("Alexandre Vassalotti" . "alexandre@peadrop.com")) (:maintainer "Alexandre Vassalotti" . "alexandre@peadrop.com") (:keywords "google" "protobuf" "languages"))]) + (protobuf-mode . [(20200619 1742) nil "major mode for editing protocol buffers." single ((:commit . "3f5fc4df1de8e12b2235c3006593e22d6993c3f5") (:authors ("Alexandre Vassalotti" . "alexandre@peadrop.com")) (:maintainer "Alexandre Vassalotti" . "alexandre@peadrop.com") (:keywords "google" "protobuf" "languages"))]) (protocols . [(20170802 1132) ((cl-lib (0 5))) "Protocol database access functions." single ((:commit . "d0f7c4acb05465f1a0d4be54363bbd2802647e77") (:authors ("Dave Pearson" . "davep@davep.org")) (:maintainer "Dave Pearson" . "davep@davep.org") (:keywords "convenience" "net" "protocols") (:url . "https://github.com/davep/protocols.el"))]) (proxy-mode . [(20201214 727) ((emacs (25))) "A minor mode to toggle proxy." single ((:commit . "dbf163413e9e404c652cc0ea7185c623016a38e1") (:keywords "comm" "proxy") (:url . "https://github.com/stardiviner/proxy-mode"))]) (psalm . [(20200510 1157) ((emacs (24 3)) (php-mode (1 22 3))) "Interface to Psalm" single ((:commit . "b2a1e8a9524b0004e62996c70da5536f86e56182") (:authors ("USAMI Kenta" . "tadsan@zonu.me")) (:maintainer "USAMI Kenta" . "tadsan@zonu.me") (:keywords "tools" "php") (:url . "https://github.com/emacs-php/psalm.el"))]) @@ -3847,7 +3847,7 @@ (rcirc-alertify . [(20140407 119) ((alert (20140406 1353))) "Cross platform notifications for rcirc" single ((:commit . "ea5cafc55893f375eccbe013d12dbaa94bf6e259") (:authors ("Fabián Ezequiel Gallina" . "fgallina@gnu.org")) (:maintainer "Fabián Ezequiel Gallina" . "fgallina@gnu.org") (:keywords "comm" "convenience"))]) (rcirc-groups . [(20170731 2101) nil "an emacs buffer in rcirc-groups major mode" single ((:commit . "b68ece9d219b909244d4e3c0d8bf6a746d6fead7") (:authors ("Dimitri Fontaine" . "dim@tapoueh.org")) (:maintainer "Dimitri Fontaine" . "dim@tapoueh.org") (:keywords "comm" "convenience") (:url . "http://tapoueh.org/emacs/rcirc-groups.html"))]) (rcirc-notify . [(20150219 2204) nil "libnotify popups" single ((:commit . "841a7b5a6cdb0c11a812df924d2c6a7d364fd455") (:authors ("Will Farrington, Alex Schroeder , Nic Ferrier" . "nferrier@ferrier.me.uk")) (:maintainer "Nic Ferrier" . "nferrier@ferrier.me.uk") (:keywords "lisp" "rcirc" "irc" "notify" "growl"))]) - (rcirc-styles . [(20160207 250) ((cl-lib (0 5))) "support mIRC-style color and attribute codes" single ((:commit . "f313bf6a7470bed314b27c7a40558cb787d7bc67"))]) + (rcirc-styles . [(20210414 1712) ((cl-lib (0 5))) "support mIRC-style color and attribute codes" single ((:commit . "dd06ec5fa455131788bbc885fcfaaec16b08f13b"))]) (rdf-prefix . [(20200216 914) nil "Prefix lookup for RDF" single ((:commit . "825af2c584fbad9e67c2c08e29040776fa647fe0") (:authors ("Simen Heggestøyl" . "simenheg@gmail.com")) (:maintainer "Simen Heggestøyl" . "simenheg@gmail.com") (:keywords "convenience" "abbrev") (:url . "https://github.com/simenheg/rdf-prefix"))]) (rdp . [(20120929 154) nil "Recursive Descent Parser library" single ((:commit . "b620192afada04aec33b38cc130fef0765f41ca9") (:authors ("Christopher Wellons" . "mosquitopsu@gmail.com")) (:maintainer "Christopher Wellons" . "mosquitopsu@gmail.com") (:url . "https://github.com/skeeto/rdp"))]) (rdxmk . [(20170630 134) nil "A small set of tools for redox developments" tar ((:commit . "e78749fb29738365ffa4d863ffabeb969ebb0bcf") (:authors ("Jacob Salzberg" . "jsalzbergedu@yahoo.com")) (:maintainer "Jacob Salzberg" . "jsalzbergedu@yahoo.com") (:keywords "redox" "convenience" "tools") (:url . "https://github.com/jsalzbergedu/rdxmk"))]) @@ -3986,7 +3986,7 @@ (rust-auto-use . [(20200608 1359) nil "Utility to automatically insert Rust use statements" single ((:commit . "d5205f7b9b9eae0f7d0893f87d3391464719f9c0") (:authors ("Rotem Yaari" . "rotemy@MBP.local")) (:maintainer "Rotem Yaari" . "rotemy@MBP.local") (:keywords "languages"))]) (rust-mode . [(20210226 1106) ((emacs (25 1))) "A major emacs mode for editing Rust source code" single ((:commit . "e9e9e32c4f82a9b895543c120b327ab5536ec42b") (:authors ("Mozilla")) (:maintainer "Mozilla") (:keywords "languages") (:url . "https://github.com/rust-lang/rust-mode"))]) (rust-playground . [(20200116 1043) ((emacs (24 3))) "Local Rust playground for short code snippets." single ((:commit . "5a117781dcb66065bea7830dd73618008fc34949") (:authors ("Alexander I.Grafov" . "grafov@gmail.com")) (:maintainer "Alexander I.Grafov" . "grafov@gmail.com") (:keywords "tools" "rust") (:url . "https://github.com/grafov/rust-playground"))]) - (rustic . [(20210414 856) ((emacs (26 1)) (xterm-color (1 6)) (dash (2 13 0)) (s (1 10 0)) (f (0 18 2)) (markdown-mode (2 3)) (spinner (1 7 3)) (let-alist (1 0 4)) (seq (2 3)) (ht (2 0)) (project (0 3 0))) "Rust development environment" tar ((:commit . "c66086fa49d983a49758598b33f6e1585b3d6c74") (:authors ("Mozilla")) (:maintainer "Mozilla") (:keywords "languages"))]) + (rustic . [(20210414 2100) ((emacs (26 1)) (dash (2 13 0)) (f (0 18 2)) (let-alist (1 0 4)) (markdown-mode (2 3)) (project (0 3 0)) (s (1 10 0)) (seq (2 3)) (spinner (1 7 3)) (xterm-color (1 6))) "Rust development environment" tar ((:commit . "3a4b637878d57531064d2afdd701af6d33411db7") (:authors ("Mozilla")) (:maintainer "Mozilla") (:keywords "languages"))]) (rvm . [(20201222 17) nil "Emacs integration for rvm" single ((:commit . "c1f2642434b0f68d9baa0687127079ecd884ba12") (:authors ("Yves Senn" . "yves.senn@gmx.ch")) (:maintainer "Yves Senn" . "yves.senn@gmx.ch") (:keywords "ruby" "rvm") (:url . "http://www.emacswiki.org/emacs/RvmEl"))]) (ryo-modal . [(20201117 1903) ((emacs (25 1))) "Roll your own modal mode" single ((:commit . "f14479e277ac7db75bf6756e0589941f84fdd749") (:authors ("Erik Sjöstrand" . "sjostrand.erik@gmail.com")) (:maintainer "Erik Sjöstrand" . "sjostrand.erik@gmail.com") (:keywords "convenience" "modal" "keys") (:url . "http://github.com/Kungsgeten/ryo-modal"))]) (s . [(20180406 808) nil "The long lost Emacs string manipulation library." single ((:commit . "3a5166c81ac9e50eaccf5490c5c632f93452287e") (:authors ("Magnar Sveen" . "magnars@gmail.com")) (:maintainer "Magnar Sveen" . "magnars@gmail.com") (:keywords "strings"))]) @@ -4247,7 +4247,7 @@ (speed-type . [(20191204 1107) ((emacs (24 3)) (cl-lib (0 3))) "Practice touch and speed typing" single ((:commit . "5ef695f7159aa1f20c7c9e55f0c39bcdacce8d21") (:authors ("Gunther Hagleitner")) (:maintainer "Julien Pagès" . "j.parkouss@gmail.com") (:keywords "games") (:url . "https://github.com/parkouss/speed-type"))]) (speedbar-git-respect . [(20200901 246) ((f (0 8 0)) (emacs (25 1))) "Particular respect git repo in speedbar" single ((:commit . "dd8f0849fc1dd21b42380e1a8c28a9a29acd9511") (:authors ("Muromi Ukari" . "chendianbuji@gmail.com")) (:maintainer "Muromi Ukari" . "chendianbuji@gmail.com") (:url . "https://github.com/ukari/speedbar-git-respect"))]) (speeddating . [(20180319 723) ((emacs (25))) "Increase date and time at point" single ((:commit . "df69db0560f19636a66a74f3d88c793bbb18b21e") (:authors ("Xu Chunyang" . "mail@xuchunyang.me")) (:maintainer "Xu Chunyang" . "mail@xuchunyang.me") (:keywords "date" "time") (:url . "https://github.com/xuchunyang/emacs-speeddating"))]) - (spell-fu . [(20210328 413) ((emacs (26 2))) "Fast & light spelling highlighter" single ((:commit . "c566ed568aae0a73202a51e97a73c5e4af0053d2") (:authors ("Campbell Barton" . "ideasman42@gmail.com")) (:maintainer "Campbell Barton" . "ideasman42@gmail.com") (:keywords "convenience") (:url . "https://gitlab.com/ideasman42/emacs-spell-fu"))]) + (spell-fu . [(20210415 357) ((emacs (26 2))) "Fast & light spelling highlighter" single ((:commit . "74ba9b890cdc82df2decb7fd437442df1e3b1455") (:authors ("Campbell Barton" . "ideasman42@gmail.com")) (:maintainer "Campbell Barton" . "ideasman42@gmail.com") (:keywords "convenience") (:url . "https://gitlab.com/ideasman42/emacs-spell-fu"))]) (sphinx-doc . [(20210213 1250) ((s (1 9 0)) (cl-lib (0 5)) (dash (2 10 0))) "Sphinx friendly docstrings for Python functions" single ((:commit . "1eda612a44ef027e5229895daa77db99a21b8801") (:authors ("Vineet Naik" . "naikvin@gmail.com")) (:maintainer "Vineet Naik" . "naikvin@gmail.com") (:keywords "sphinx" "python") (:url . "https://github.com/naiquevin/sphinx-doc.el"))]) (sphinx-frontend . [(20161025 758) nil "Launch build process for rst documents via sphinx." single ((:commit . "0cbb03361c245382d3e679dded30c4fc1713c252") (:authors ("Kostafey" . "kostafey@gmail.com")) (:maintainer "Kostafey" . "kostafey@gmail.com") (:keywords "compile" "sphinx" "restructuredtext") (:url . "https://github.com/kostafey/sphinx-frontend"))]) (sphinx-mode . [(20180620 915) ((f (0 20 0)) (dash (2 14 1))) "Minor mode providing sphinx support." tar ((:commit . "b5ac514e213459dcc57184086f10b5b6be3cecd8") (:authors ("Matúš Goljer" . "matus.goljer@gmail.com")) (:maintainer "Matúš Goljer" . "matus.goljer@gmail.com") (:keywords "languages"))]) @@ -4412,8 +4412,8 @@ (term+ . [(20170509 17) ((emacs (24)) (cl-lib (0 5))) "term-mode enhancement" tar ((:commit . "c3c9239b339c127231860de43abfa08c44c0201a") (:authors ("INA Lintaro ")) (:maintainer "INA Lintaro ") (:keywords "terminal" "emulation") (:url . "https://github.com/tarao/term-plus-el"))]) (term+key-intercept . [(20140211 750) ((term+ (0 1)) (key-intercept (0 1))) "term+ intercept key mapping" single ((:commit . "fd0771fd66b8c7a909aaac972194485c79ba48c4") (:authors ("INA Lintaro ")) (:maintainer "INA Lintaro ") (:keywords "terminal" "emulation") (:url . "http://github.com/tarao/term+-el"))]) (term+mux . [(20140211 749) ((term+ (0 1)) (tab-group (0 1))) "term+ terminal multiplexer and session management" single ((:commit . "81b60e80cf008472bfd7fad9233af2ef722c208a") (:authors ("INA Lintaro ")) (:maintainer "INA Lintaro ") (:keywords "terminal" "emulation") (:url . "http://github.com/tarao/term+-el"))]) - (term-alert . [(20161119 945) ((emacs (24 0)) (term-cmd (1 1)) (alert (1 1)) (f (0 18 2))) "Notifications when commands complete in term.el." tar ((:commit . "1166c39cc3fb1cb7808eb8955b7f9f6094a306cd") (:authors ("Callum J. Cameron" . "cjcameron7@gmail.com")) (:maintainer "Callum J. Cameron" . "cjcameron7@gmail.com") (:keywords "notifications" "processes") (:url . "https://github.com/CallumCameron/term-alert"))]) - (term-cmd . [(20160517 1045) ((emacs (24 0)) (dash (2 12 0)) (f (0 18 2))) "Send commands from programs running in term.el." tar ((:commit . "552aa58965aab9b78e46934462bafe54c0396ffb") (:authors ("Callum J. Cameron" . "cjcameron7@gmail.com")) (:maintainer "Callum J. Cameron" . "cjcameron7@gmail.com") (:keywords "processes") (:url . "https://github.com/CallumCameron/term-cmd"))]) + (term-alert . [(20210414 1638) ((emacs (24 0)) (term-cmd (1 1)) (alert (1 1)) (f (0 18 2))) "Notifications when commands complete in term.el." tar ((:commit . "ca1b48ad911bc972b049f48fe0531e702dbc553c") (:authors ("Callie Cameron" . "cjcameron7@gmail.com")) (:maintainer "Callie Cameron" . "cjcameron7@gmail.com") (:keywords "notifications" "processes") (:url . "https://github.com/calliecameron/term-alert"))]) + (term-cmd . [(20210414 1641) ((emacs (24 0)) (dash (2 12 0)) (f (0 18 2))) "Send commands from programs running in term.el." tar ((:commit . "9af95e40ee14d33385812ba26c4f25fa0311ec0a") (:authors ("Callie Cameron" . "cjcameron7@gmail.com")) (:maintainer "Callie Cameron" . "cjcameron7@gmail.com") (:keywords "processes") (:url . "https://github.com/calliecameron/term-cmd"))]) (term-manager . [(20190610 2032) ((dash (2 12 0)) (emacs (24 4))) "Contextual terminal management" tar ((:commit . "eea7894350a4f31e1df0c666d3fb0bac822d34d2") (:authors ("Ivan Malison" . "IvanMalison@gmail.com")) (:maintainer "Ivan Malison" . "IvanMalison@gmail.com") (:keywords "terminals" "tools") (:url . "https://www.github.com/IvanMalison/term-manager"))]) (term-projectile . [(20190307 400) ((emacs (24)) (term-manager (0 1 0)) (projectile (0 13 0))) "projectile terminal management" single ((:commit . "eea7894350a4f31e1df0c666d3fb0bac822d34d2") (:authors ("Ivan Malison" . "IvanMalison@gmail.com")) (:maintainer "Ivan Malison" . "IvanMalison@gmail.com") (:keywords "projectile" "tools" "terminals" "vc") (:url . "https://www.github.com/IvanMalison/term-manager"))]) (term-run . [(20200128 702) nil "Run arbitrary command in terminal buffer" single ((:commit . "0fd135d55fcf864598b1fb8dd880833a1a322910") (:authors ("10sr <8slashes+el [at] gmail [dot] com>")) (:maintainer "10sr <8slashes+el [at] gmail [dot] com>") (:keywords "utility" "shell" "command" "term-mode") (:url . "https://github.com/10sr/term-run-el"))]) @@ -4447,7 +4447,7 @@ (thinks . [(20170802 1128) ((cl-lib (0 5))) "Insert text in a think bubble." single ((:commit . "c02f236abc8c2025d9f01460b09b89ebdc96e28d") (:authors ("Dave Pearson" . "davep@davep.org")) (:maintainer "Dave Pearson" . "davep@davep.org") (:keywords "convenience" "quoting") (:url . "https://github.com/davep/thinks.el"))]) (thread-dump . [(20170816 1850) nil "Java thread dump viewer" single ((:commit . "204c9600242756d4b514bb5ff6293e052bf4b49d") (:authors ("Dmitry Neverov")) (:maintainer "Dmitry Neverov") (:url . "http://github.com/nd/thread-dump.el"))]) (threes . [(20160820 1242) ((emacs (24)) (seq (1 11))) "A clone of Threes (a tiny puzzle game)" single ((:commit . "6981acb30b856c77cba6aba63fefbf102cbdfbb2") (:authors ("Chunyang Xu" . "xuchunyang.me@gmail.com")) (:maintainer "Chunyang Xu" . "xuchunyang.me@gmail.com") (:keywords "games") (:url . "https://github.com/xuchunyang/threes.el"))]) - (thrift . [(20200212 1903) ((emacs (24))) "major mode for fbthrift and Apache Thrift files" single ((:commit . "a85dc6b5b89798c2a0713868dcb5d02eb9bc6a60") (:keywords "languages"))]) + (thrift . [(20200212 1903) ((emacs (24))) "major mode for fbthrift and Apache Thrift files" single ((:commit . "b0ba20ca08bae916ec23d90c99d7e2671d3fcd04") (:keywords "languages"))]) (thumb-through . [(20120119 534) nil "Plain text reader of HTML documents" single ((:commit . "08d8fb720f93c6172653e035191a8fa9c3305e63") (:keywords "html"))]) (tickscript-mode . [(20171219 203) ((emacs (24 1))) "A major mode for Tickscript files" single ((:commit . "f0579f38ff14954df5002ce30ae6d4a2c978d461") (:authors ("Marc Sherry" . "msherry@gmail.com")) (:maintainer "Marc Sherry" . "msherry@gmail.com") (:keywords "languages") (:url . "https://github.com/msherry/tickscript-mode"))]) (tidal . [(20210211 1531) ((haskell-mode (16)) (emacs (24))) "Interact with TidalCycles for live coding patterns" single ((:commit . "f1b843a9f792d4b87fd316e809c6e8f6fe5f2024") (:authors (nil . "alex@slab.org")) (:maintainer nil . "alex@slab.org") (:keywords "tools") (:url . "https://github.com/tidalcycles/Tidal"))]) @@ -4673,7 +4673,7 @@ (vs-dark-theme . [(20201025 1148) ((emacs (24 1))) "Visual Studio IDE dark theme" single ((:commit . "3d087e1c48872b5b623ac72c85a9bd3d80ec02cd") (:authors ("Jen-Chieh Shen")) (:maintainer "Jen-Chieh Shen") (:url . "https://github.com/jcs090218/vs-dark-theme"))]) (vs-light-theme . [(20201025 1148) ((emacs (24 1))) "Visual Studio IDE light theme" single ((:commit . "4e6501118bafb62ecfca8797b6c6d81310d95fd2") (:authors ("Jen-Chieh Shen")) (:maintainer "Jen-Chieh Shen") (:url . "https://github.com/jcs090218/vs-light-theme"))]) (vscdark-theme . [(20191212 107) ((emacs (24 1))) "VS Code Dark+ like theme" single ((:commit . "8eba74059e8a9db974e4056ee024e52fe54da485") (:authors ("Alexander L. Belikoff")) (:maintainer "Alexander L. Belikoff") (:url . "https://github.com/abelikoff/vscdark-theme"))]) - (vscode-dark-plus-theme . [(20210414 319) nil "Default Visual Studio Code Dark+ theme" single ((:commit . "bb286a02bbd0e579873c45526d70ddb0081fff70") (:authors ("Ian Y.E. Pan")) (:maintainer "Ian Y.E. Pan") (:url . "https://github.com/ianpan870102/vscode-dark-plus-emacs-theme"))]) + (vscode-dark-plus-theme . [(20210415 728) nil "Default Visual Studio Code Dark+ theme" single ((:commit . "da847c8c05fcd63b7b9755bcc16297d315b934de") (:authors ("Ian Y.E. Pan")) (:maintainer "Ian Y.E. Pan") (:url . "https://github.com/ianpan870102/vscode-dark-plus-emacs-theme"))]) (vscode-icon . [(20201214 2227) ((emacs (25 1))) "Utility package to provide Vscode style icons" tar ((:commit . "909151c8105861aa300f5601e333909d36d0ebf5") (:authors ("James Nguyen" . "james@jojojames.com")) (:maintainer "James Nguyen" . "james@jojojames.com") (:keywords "files" "tools") (:url . "https://github.com/jojojames/vscode-icon-emacs"))]) (vterm . [(20210409 1558) ((emacs (25 1))) "Fully-featured terminal emulator" tar ((:commit . "2b1392cb2b14ec5bd0b7355197d5f353aa5d3983") (:authors ("Lukas Fürmetz" . "fuermetz@mailbox.org")) (:maintainer "Lukas Fürmetz" . "fuermetz@mailbox.org") (:keywords "terminals") (:url . "https://github.com/akermu/emacs-libvterm"))]) (vterm-toggle . [(20210313 305) ((emacs (25 1)) (vterm (0 0 1))) "Toggles between the vterm buffer and other buffers." single ((:commit . "a0429842e6197a6ec83c0de30701127a4edb9e92") (:authors (nil . "jixiuf jixiuf@qq.com")) (:maintainer nil . "jixiuf jixiuf@qq.com") (:keywords "vterm" "terminals") (:url . "https://github.com/jixiuf/vterm-toggle"))]) @@ -4796,7 +4796,7 @@ (www-synonyms . [(20170128 2251) ((request (0 2 0)) (cl-lib (0 5))) "insert synonym for a word" single ((:commit . "7e37ea35064ff31c9945f0198a653647d408c936") (:authors ("Bernhard Specht" . "bernhard@specht.net")) (:maintainer "Bernhard Specht" . "bernhard@specht.net") (:keywords "lisp"))]) (x-path-walker . [(20201220 628) ((helm-core (1 9 2))) "Navigation feature for JSON/XML/HTML based on path (imenu like)" tar ((:commit . "e553968b6ddebe39ea00904a2e9ff4cff6096985") (:authors (nil . "")) (:maintainer nil . "") (:keywords "convenience"))]) (x509-mode . [(20210407 627) ((emacs (24 1)) (cl-lib (0 5))) "View certificates, CRLs and keys using OpenSSL." tar ((:commit . "470769edba111aed8eabce58a3f2a02da0767624") (:authors ("Fredrik Axelsson" . "f.axelsson@gmai.com")) (:maintainer "Fredrik Axelsson" . "f.axelsson@gmai.com") (:url . "https://github.com/jobbflykt/x509-mode"))]) - (x86-lookup . [(20210409 2313) ((emacs (24 3)) (cl-lib (0 3))) "jump to x86 instruction documentation" single ((:commit . "5e194fdac8a1e12d87b8ed4edeb887eb5543c34d") (:authors ("Christopher Wellons" . "wellons@nullprogram.com")) (:maintainer "Christopher Wellons" . "wellons@nullprogram.com") (:url . "https://github.com/skeeto/x86-lookup"))]) + (x86-lookup . [(20210412 2022) ((emacs (24 3)) (cl-lib (0 3))) "jump to x86 instruction documentation" single ((:commit . "1573d61cc4457737b94624598a891c837fb52c16") (:authors ("Christopher Wellons" . "wellons@nullprogram.com")) (:maintainer "Christopher Wellons" . "wellons@nullprogram.com") (:url . "https://github.com/skeeto/x86-lookup"))]) (xah-css-mode . [(20201229 837) ((emacs (24 3))) "Major mode for editing CSS code." single ((:commit . "5d9db23bbb982c28cbcf351957ef96ecd80e4c0b") (:authors ("Xah Lee ( http://xahlee.info/ )")) (:maintainer "Xah Lee ( http://xahlee.info/ )") (:keywords "languages" "convenience" "css" "color") (:url . "http://ergoemacs.org/emacs/xah-css-mode.html"))]) (xah-elisp-mode . [(20210208 2056) ((emacs (24 3))) "Major mode for editing emacs lisp." single ((:commit . "3ae341944297d59bf33f5580364af2858198781e") (:authors ("Xah Lee ( http://xahlee.info/ )")) (:maintainer "Xah Lee ( http://xahlee.info/ )") (:keywords "lisp" "languages") (:url . "http://ergoemacs.org/emacs/xah-elisp-mode.html"))]) (xah-find . [(20210111 334) ((emacs (24 1))) "find replace in pure emacs lisp. Purpose similar to grep/sed." single ((:commit . "8948fa8f18023868731a1666f9893abc08f370e1") (:authors ("Xah Lee ( http://xahlee.info/ )")) (:maintainer "Xah Lee ( http://xahlee.info/ )") (:keywords "convenience" "extensions" "files" "tools" "unix") (:url . "http://ergoemacs.org/emacs/elisp-xah-find-text.html"))]) @@ -4840,7 +4840,7 @@ (yagist . [(20160418 508) ((cl-lib (0 3))) "Yet Another Emacs integration for gist.github.com" single ((:commit . "dcdbd84f348414815d02f3da8a6ee0ac271632d4") (:maintainer "Masahiro Hayashi" . "mhayashi1120@gmail.com") (:keywords "tools") (:url . "https://github.com/mhayashi1120/yagist.el"))]) (yahtzee . [(20200511 2005) ((emacs (24 3))) "The yahtzee game" single ((:commit . "96068216a4f0c4894bf780cd36164fe840cf81d5") (:authors ("Dimitar Dimitrov" . "mail.mitko@gmail.com")) (:maintainer "Dimitar Dimitrov" . "mail.mitko@gmail.com") (:keywords "games") (:url . "https://github.com/drdv/yahtzee"))]) (yalinum . [(20130217 1043) nil "yet another display line numbers." single ((:commit . "d3e0cbe3f4f5ca311e3298e684901d6fea3ad973") (:authors ("tm8st" . "tm8st@hotmail.co.jp")) (:maintainer "tm8st" . "tm8st@hotmail.co.jp") (:keywords "convenience" "tools"))]) - (yaml . [(20210406 156) ((emacs (25 1))) "YAML parser for Elisp" single ((:commit . "d8ac09e8cad7f67339e19c53e77da1cd0ff98d36") (:authors ("Zachary Romero" . "zkry@posteo.org")) (:maintainer "Zachary Romero" . "zkry@posteo.org") (:keywords "tools") (:url . "https://github.com/zkry/yaml.el"))]) + (yaml . [(20210415 705) ((emacs (25 1))) "YAML parser for Elisp" single ((:commit . "7f055d207c69bd4a418cfc6691ca005ff85188f4") (:authors ("Zachary Romero" . "zkry@posteo.org")) (:maintainer "Zachary Romero" . "zkry@posteo.org") (:keywords "tools") (:url . "https://github.com/zkry/yaml.el"))]) (yaml-imenu . [(20201023 1524) ((emacs (24 4)) (yaml-mode (0))) "Enhancement of the imenu support in yaml-mode." tar ((:commit . "fa37d9bf8a09af144980a42cc22891b1555a12ae") (:authors ("Akinori MUSHA" . "knu@iDaemons.org")) (:maintainer "Akinori MUSHA" . "knu@iDaemons.org") (:keywords "outlining" "convenience" "imenu") (:url . "https://github.com/knu/yaml-imenu.el"))]) (yaml-mode . [(20201109 1026) ((emacs (24 1))) "Major mode for editing YAML files" single ((:commit . "fc5e1c58f94472944c4aa838f00f6adcac6fa992") (:authors ("Yoshiki Kurihara" . "clouder@gmail.com") ("Marshall T. Vandegrift" . "llasram@gmail.com")) (:maintainer "Vasilij Schneidermann" . "mail@vasilij.de") (:keywords "data" "yaml"))]) (yaml-tomato . [(20151123 753) ((s (1 9))) "copy or show the yaml path currently under cursor." single ((:commit . "f9df1c9bdfcec629b03031b2d2032f9dc533cb14") (:authors ("qrczeno")) (:maintainer "qrczeno") (:keywords "yaml"))]) diff --git a/elpa/exwm-0.24.signed b/elpa/exwm-0.24.signed new file mode 100644 index 0000000..1b3f390 --- /dev/null +++ b/elpa/exwm-0.24.signed @@ -0,0 +1 @@ +Good signature from 066DAFCB81E42C40 GNU ELPA Signing Agent (2019) (trust undefined) created at 2020-05-25T02:05:01+0500 using RSA \ No newline at end of file diff --git a/elpa/exwm-0.24/.elpaignore b/elpa/exwm-0.24/.elpaignore new file mode 100644 index 0000000..b43bf86 --- /dev/null +++ b/elpa/exwm-0.24/.elpaignore @@ -0,0 +1 @@ +README.md diff --git a/elpa/exwm-0.24/ChangeLog b/elpa/exwm-0.24/ChangeLog new file mode 100644 index 0000000..015474f --- /dev/null +++ b/elpa/exwm-0.24/ChangeLog @@ -0,0 +1,4448 @@ +2019-06-16 Chris Feng + + Allow panel to hide floating X windows + + * exwm.el (exwm--on-ClientMessage): Use `exwm-floating-hide' to hide X + windows on receiving `WM_CHANGE_STATE' events. + +2019-06-16 Chris Feng + + Avoid workspace switch loop with `mouse-autoselect-window' enabled + + * exwm-input.el (exwm-input--last-enter-notify-position): New variable + storing last mouse position. + (exwm-input--on-EnterNotify): Avoid switching workspace when mouse + position is not changed (the event is a result of a workspace switch). + +2019-06-09 Chris Feng + + Handle (t . EVENT) format events in exwm-xim + + * exwm-xim.el (exwm-xim--handle-forward-event-request): Ditto. + +2019-06-09 Chris Feng + + Fix character loss with exwm-xim + + * exwm-xim.el (exwm-xim--handle-forward-event-request): Events unread + can either be reused by input methods or forwarded to X windows as is. + +2019-06-02 Chris Feng + + Fix unreading 'return event + + * exwm-xim.el (exwm-xim--event-pending): Drop unused variable. + (exwm-xim--handle-forward-event-request): Convert 'return back to ?\n to + avoid error. + +2019-06-02 Chris Feng + + Fix auto commit issue with input methods + + * exwm-xim.el (exwm-xim--handle-forward-event-request): Factored out + from `exwm-xim--on-request' to make auto commit work. With input + methods providing candidates the first candidate can be implicitly + selected if no further matching is possible. The last event would be + stored in `unread-command-events' (at least for `quail-input-method') + and should be reused by the input method. + (exwm-xim--on-request): Use it. + +2019-04-14 Chris Feng + + Add compatibility mode for legacy servers + + * exwm-randr.el (exwm-randr--compatibility-mode): Indicating whether + RandR 1.5 is supported by the server. + (exwm-randr--init): Set it. + (exwm-randr--get-monitor-alias): Split out from exwm-randr--get-monitors + for reuse. + (exwm-randr--get-outputs): New function for retrieving RandR 1.2 outputs + when RandR 1.5 is not supported. + (exwm-randr-refresh): Call `exwm-randr--get-outputs' in compatibility + mode. + +2019-04-14 Chris Feng + + Clarify the usage of `exwm-manage-configurations' + +2019-03-24 Chris Feng + + Support monitor mirroring + + * exwm-randr.el (exwm-randr--get-monitors): Also return an alist of + monitor name aliases. + (exwm-randr-refresh): Unify mirrored monitor names. + +2019-03-24 Chris Feng + + ; Follows up + +2019-03-17 Stefan Monnier + + * exwm-workspace.el: Use closures rather than `(lambda ...) + +2019-03-17 Chris Feng + + Remove loading order dependency on `mouse-autoselect-window' + + * exwm-core.el (exwm--get-client-event-mask): Renamed from + `exwm--client-event-mask' and used as a function. + * exwm-floating.el (exwm-floating--unset-floating): + * exwm-layout.el (exwm-layout--hide): + * exwm-manage.el (exwm-manage--manage-window): Use it. + +2019-03-17 Chris Feng + + Add extra keys for selecting workspace + + * exwm-workspace.el (exwm-workspace--switch-map) + (exwm-workspace--init): Avoid initializing the keymap when loading. + (exwm-workspace--init-switch-map): Initialize + `exwm-workspace--switch-map' and also add extra keybindings when + `exwm-workspace-index-map' has been customized. + +2019-03-10 Chris Feng + + Make replacing existing WM optional + + * exwm.el (exwm-replace): New user option for specifying whether to + replace existing WM. + (exwm-init): Use it. + (exwm--wmsn-acquire, exwm-init): Do not print warning message when user + gives up replacing. + * exwm-core.el (exwm--wmsn-replace): Remove dead code. + +2019-02-16 Chris Feng + + Bump version to 0.22.1 + +2019-02-11 Chris Feng + + Fix compatibility issue with Emacs 25 + + * exwm-input.el (exwm-input--unread-event): `string-version-lessp' is + not available on Emacs 25. + +2019-02-10 Chris Feng + + Bump version to 0.22 + +2019-02-06 Chris Feng + + Merge branch 'retain-echo-area-until-input' of + https://github.com/medranocalvo/exwm into + medranocalvo/retain-echo-area-until-input + +2019-02-06 Chris Feng + + Do the same for `exwm-input-global-keys' + +2019-02-06 Ian Eure + + Cleanup simulation key config issues + + * exwm-input.el (exwm-input-simulation-keys): Original key only has one + option, so probably shouldn’t be a `choice` type; Move the + "User-defined" key value to the top, since that’s the one someone is + most likely to want). + + * exwm-config.el (exwm-config-default): Only set custom vars if there + isn’t a saved value for them. + +2019-02-06 Chris Feng + + Add input method support + + ; The code is basically refactored from + ; https://github.com/ch11ng/exim to get better maintenance. + + * exwm-xim.el: New module making Emacs's builtin input methods usable + for interacting with X windows. + + * exwm-core.el (exwm--intern-atom): New function for intern X11 atoms. + * exwm-input.el (exwm-input--init): + * exwm-manage.el (exwm-manage--init): Use it. + +2019-02-05 Chris Feng + + Scan for existing X windows only after running `exwm-init-hook' + + * exwm.el (exwm-init): Delay the call to `exwm-manage--scan' since + managing existing X windows too early may result in issues like losing + input focus. + +2019-02-01 Chris Feng + + Fetch necessary properties before checking per-app configurations + + * exwm-manage.el (exwm-manage--manage-window): Fetch X window title & + protocols so they can be available when checking per-application + configurations. + +2019-02-01 Chris Feng + + Update copyright year to 2019 + +2019-01-20 Chris Feng + + Fix issue with managed tray icons + + * exwm-input.el (exwm-input--on-ButtonPress): Replay button events + destined for managed tray icons. + +2018-12-30 Chris Feng + + Automatically iconify floating X windows + + * exwm-layout.el (exwm-layout-auto-iconify): New user option to specify + whether to automatically iconify X windows. + (exwm-layout--auto-iconify): Automatically iconify floating X windows + when its main X window (if any) is iconified. + (exwm-layout--show, exwm-layout--hide): Use it. + +2018-12-16 Chris Feng + + Avoid unnecessary focus changes when creating/killing buffers + + * exwm-input.el (exwm-input--skip-buffer-list-update): New internal + variable for skipping the next 'buffer-list-update'. + (exwm-input--on-buffer-list-update): Skip when + `exwm-input--skip-buffer-list-update` is set. + + * exwm-manage.el (exwm-manage--manage-window): Set + `exwm-input--skip-buffer-list-update` when creating/killing buffers. + +2018-12-05 James Ferguson + + Only call exwm-randr-screen-change-hook on new event sequence number + + Multiple event callbacks are triggered per physical monitor plug event. + This de-duplicates the events triggering the running of the hook. + +2018-12-02 Chris Feng + + ; Improve debug logs. + +2018-12-01 Chris Feng + + Bump version to 0.21 + +2018-11-25 Chris Feng + + Avoid unnecessary keyboard grab/ungrab in char-mode + + * exwm-input.el (exwm-input--cache-event): Optimize the handling of + single event global key by not grabbing/ungrabbing the keyboard. + +2018-11-18 Chris Feng + + Fallback to the first monitor as the primary one + + * exwm-randr.el (exwm-randr--get-monitors): When no primary monitor is + specified, pick the first one. + +2018-11-18 Chris Feng + + Add support for 'managed' per-application configuration + + * exwm-manage.el (exwm-manage-configurations): Add a new value type + 'managed' to allow users to specify whether a certain X window should be + managed or not. + (exwm-manage--manage-window): Use it. + +2018-11-18 Chris Feng + + Automatically refresh RandR settings + + * exwm-randr.el (exwm-randr--last-timestamp): New variable recording + last seen timestamp after requesting `GetMonitors'. + (exwm-randr--get-monitors): Use it. + (exwm-randr--on-ScreenChangeNotify): Do not refresh any more. + (exwm-randr--on-Notify): New function for handling `CrtcChangeNotify' + and `OutputChangeNotify' events. + (exwm-randr--on-ConfigureNotify): New function for handling + `ConfigureNotify' event. + (exwm-randr--init): Add listeners for additional events. + +2018-11-18 Chris Feng + + Avoid activating already active X windows + + * exwm.el (exwm--on-ClientMessage): On receiving `_NET_ACTIVE_WINDOW' + events, check if the requested X windows are already active. + +2018-11-11 Chris Feng + + Fix wrong stacking order of tiling X windows + + * exwm-manage.el (exwm-manage--on-MapNotify): Avoid restacking tiling X + windows on the top when force triggering hierarchy change events. + +2018-11-11 Chris Feng + + Expose `exwm-randr-refresh' public interface + + * exwm-randr.el (exwm-randr-refresh): New public interface allowing + users to manually refresh when RandR settings are changed output EXWM. + (exwm-randr--refresh): Made obsolete. + +2018-11-04 Chris Feng + + Add support for RandR 1.5 monitor + + * exwm-randr.el (exwm-randr-workspace-monitor-plist): New user option + for specifying which monitor each workspace should be displayed on. + (exwm-randr-workspace-monitor-plist): Made obsolete. + (exwm-randr--get-monitors): New function for fetching active monitors. + (exwm-randr--refresh): Adapted to use monitor. + (exwm-randr--init): Now requires RandR 1.5. + + * exwm-randr.el: + * exwm-workspace.el: Rename `output' to `monitor'. + +2018-11-04 Chris Feng + + Select more sensible buffers after creating new windows + + * exwm-layout.el (exwm-layout--refresh-other) + (exwm-layout--refresh-workspace): When filling vacated windows select + more sensible buffer by calling `switch-to-next-buffer' for newly + created windows. + +2018-11-03 Adrián Medraño Calvo + + Hide minibuffer upon receiving any event + + * exwm-input.el (exwm-input--event-hook): New variable. + (exwm-input--on-ButtonPress, exwm-input--on-KeyPress): Run + `exwm-input--event-hook'. + * exwm-workspace.el (exwm-workspace--init, exwm-workspace--exit): Hide + minibuffer upon noticing an event. + +2018-11-03 Adrián Medraño Calvo + + Stop hiding the minibuffer when a message is being displayed + + * exwm-workspace.el (exwm-workspace--echo-area-maybe-clear): New + function that postpones hiding the minibuffer when it's displaying a + message. + (exwm-workspace--on-echo-area-dirty): Use it. + +2018-10-21 Adrián Medraño Calvo + + Restore keyboard grabbing after exiting fullscreen + + Recover the difference between the input mode selected by the user and + actual one, which might be transient. This was inadvertently removed in + recent changes. + + * exwm-core.el (exwm--selected-input-mode): New variable. + * exwm-input.el (exwm-input-grab-keyboard) + (exwm-input-release-keyboard): Use it. + * exwm-layout.el (exwm-layout-unset-fullscreen): Return to the selected + input mode. + +2018-10-21 Adrián Medraño Calvo + + Do away with `exwm-input--input-mode' + + * exwm-input.el (exwm-input--update-mode-line): Remove. + (exwm-input--on-ButtonPress, exwm-input--on-KeyPress) + (exwm-input--update-mode-line, exwm-input-toggle-keyboard): Use + `exwm--input-mode' variable directly. + +2018-10-21 Chris Feng + + Fix single workspace invisible problem with Xephyr + + * exwm-workspace.el (exwm-workspace-switch): On startup EXWM switches to + workspace 0 by force so the rest code can not assume the frames before + and after a switch different. + +2018-10-14 Chris Feng + + Bump version to 0.20 + +2018-10-14 Chris Feng + + Merge branch 'medranocalvo/reduce-workspace-switch-flicker' into + externals/exwm + +2018-10-14 Chris Feng + + Merge branch 'medranocalvo/fix-minibuffer-only-focus-jump' into + externals/exwm + +2018-10-08 Adrián Medraño Calvo + + Reduce flicker when switching workspaces + + * exwm-workspace.el (exwm-workspace-switch): Hide the old workspace + after having shown the new one when switching to avoid flicker. + +2018-10-08 Adrián Medraño Calvo + + Support binding mouse events in line-mode + + * exwm-input.el (exwm-input--event-passthrough-p): Predicate checking + whether an event should be forwarded to Emacs. + (exwm-input--on-KeyPress-line-mode): Use it. + * exwm-input.el (exwm-input--cache-event): Protect against translations + swallow the event. + * exwm-input.el (exwm-input--on-ButtonPress-line-mode) + (exwm-input--on-ButtonPress-char-mode): New functions. + (exwm-input--on-ButtonPress): Forward bound mouse events to Emacs when + in line-mode. + +2018-10-08 Adrián Medraño Calvo + + Fix focus jumps with minibuffer-only frames + + * exwm-input.el (exwm-input--update-focus): Focus the minibuffer's + frame, which is different than that of the + `minibuffer-selected-window' on minibuffer-only frames. + (exwm-input--on-minibuffer-setup, exwm-input--init) + (exwm-input-exit): Remove unneeded function. + +2018-10-08 Adrián Medraño Calvo + + Simplify input handling + + No functional change. + + * exwm-input.el (exwm-input--current-input-mode): New function + indicating keyboard input mode. + (exwm-input--on-KeyPress, exwm-input--update-mode-line): Use + `exwm-input--current-input-mode'. + (exwm-input-grab-keyboard, exwm-input-release-keyboard) + (exwm-input--update-mode-line): Simplify. + + * exwh-core.el (exwm--on-KeyPress): Remove variable, use + `exwm--keyboard-grabbed' and `exwm-input--current-input-mode' instead. + +2018-09-16 Chris Feng + + Simplify debugging and fix dynamic-scoping `eval' + + * exwm-core.el (exwm-debug): New global minor mode to replace + `exwm-debug-on' and `exwm-debug-toggle'. + + * exwm-manage.el (exwm-manage--get-configurations): Use lexical-scoping + `eval'. + +2018-09-09 Chris Feng + + Merge branch 'medranocalvo/restack-after-map' into externals/exwm + +2018-09-09 Chris Feng + + ; Minor fixes for Calvo's patch set. + +2018-09-04 Adrián Medraño Calvo + + Restack X-Windows after being mapped to ensure EnterNotify events fire + + * exwm-manage.el (exwm-manage--on-MapNotify, exwm-manage--init): Restack + X windows after being mapped in order to ensure they receive an + EnterNotify event (does not happen under XQuartz). + +2018-09-04 Adrián Medraño Calvo + + Command for toggling debugging output + + * exwm-core.el (exwm-debug-toggle): New function for toggling debugging + output. + (exwm-mode-map): Use it. + +2018-09-04 Adrián Medraño Calvo + + Substitute overlapping keybindings + + * exwm-core.el (exwm-mode-map): Change keybindings to avoid overlap. + +2018-09-04 Adrián Medraño Calvo + + Use XELB's debugging facilities + + * exwm-debug.el: Move to XELB as `xcb-debug'. + * exwm-core.el (exwm--log): Use it. + (exwm--log): Support switching debugging output at runtime. + +2018-09-02 James Ferguson + + Explicitly specify frame for cursor warping conditional + +2018-09-02 James Ferguson + + Fix cursor warping conditional for cursor left of frame + +2018-08-30 Adrián Medraño Calvo + + Refresh layout after activating/deactivating workspaces + + * exwm-workspace.el (exwm-workspace--set-active): Refresh layout after + activating or deactivating workspaces. + + * exwm-layout.el (exwm-layout--refresh-workspace): Hide X windows on + inactive workspaces. + +2018-08-19 Chris Feng + + Merge branch 'medranocalvo/fix-x-window-vanish' into externals/exwm + +2018-08-19 Chris Feng + + Merge branch 'medranocalvo/exwm-log-buffer' into externals/exwm + +2018-08-19 Adrián Medraño Calvo + + ; Comment layout algorithm. + +2018-08-19 Adrián Medraño Calvo + + Consistently name helper windows + + * exwm.el (exwm--init-icccm-ewmh): Avoid naming the root window. + (exwm--wmsn-acquire): Use the symbol name in the window name. + * exwm-systemtray.el (exwm-systemtray--embedder-window): Rename + `exwm-systemtray--embedder' consistency. + (exwm-systemtray--init): Use symbol names in the window name. + +2018-08-19 Chris Feng + + ; Unimportant tweaks + +2018-08-16 Adrián Medraño Calvo + + Split exwm-layout--refresh into three functions + + * exwm-layout.el (exwm-layout--refresh): Split in three functions for + clarity. + (exwm-layout--refresh-workspace, exwm-layout--refresh-other) + (exwm-layout--refresh-floating): New functions. + +2018-08-16 Adrián Medraño Calvo + + Don't assume order of `get-buffer-window-list' results + + It only guarantees that the first result *if* the buffer appears on the + selected window. + +2018-08-16 Adrián Medraño Calvo + + Use more explicit argument for excluding minibuffers + + * exwm-layout.el (exwm-layout--refresh): Use a more intuitive value for + specifying exclusion of minibuffers. + +2018-08-16 Adrián Medraño Calvo + + Consider windows of the frame being refreshed, not the selected one at + the time exwm-layout--refresh runs + + * exwm-layout.el (exwm-layout--refresh): Consider windows of the frame + being refreshed instead of the selected frame. + +2018-08-13 Adrián Medraño Calvo + + Trace more functions + +2018-08-13 Adrián Medraño Calvo + + Commands for interacting with the log buffer remotely + + * exwm-debug.el (exwm-debug--clear, exwm-debug--mark): New functions. + +2018-08-13 Adrián Medraño Calvo + + Print log output to an EXWM-specific messages buffer + + Using `message' to log debugging information is cumbersome, as the + output appears constantly in the minibuffer, obscuring prompts and other + information. In the case of long messages, it might resize the + minibuffer, which causes EXWM to perform additional actions due to the + log output. + + This change reimplements EXWM debug logging using a separate buffer + (*EXWM-DEBUG*). Basic functionality, like scrolling when point is at + the end of the buffer is maintained. + + * exwm-core.el (exwm--log): Use `exwm-debug--message' instead of + `message'. Prefix all messages with the name of the function. Make + FORMAT-STRING argument optional. + + * exwm-debug.el: New file. + (exwm-debug-buffer): New variable holding the buffer where debug + messages are output to. + (exwm-debug--message): New function printing a message to + `exwm-debug-buffer'. + (exwm-debug--backtrace): New function printing a backtrace. + +2018-08-12 Chris Feng + + Avoid using `set-mouse-position' to warp pointer + + * exwm-workspace.el (exwm-workspace-switch): Warp pointer with the + WarpPointer request. + +2018-08-12 Chris Feng + + Exclude irrelevant X windows when refreshing + + * exwm-layout.el (exwm-layout--refresh): Only check X windows on the + workspace being examined. + +2018-08-05 Chris Feng + + When mapping an X window check if it's on an active workspace + + * exwm-layout.el (exwm-layout--refresh): Avoid mapping X windows on + inactive workspaces. + +2018-07-29 Chris Feng + + Fix issues with destroying full screen X windows + + * exwm-manage.el (exwm-manage--unmanage-window): Set the Emacs window of + an full screen X window as non-dedicated before killing its buffer so as + not to cause other side effects. + +2018-07-18 Chris Feng + + Bump version to 0.19 + +2018-07-15 Chris Feng + + Fix XTerm crash on startup + + * exwm-input.el (exwm-input--set-focus): Applications like XTerm crashes + on receiving WM_TAKE_FOCUS so only send it to X windows accepting it. + +2018-07-15 Chris Feng + + ; Use `derived-mode-p'. + +2018-07-15 Chris Feng + + Add support for automatic cursor warping + + * exwm-workspace.el (exwm-workspace-warp-cursor): New user option. + (exwm-workspace-switch): Automatically warp cursor after workspace + switch. + +2018-07-15 Chris Feng + + Shrink Emacs frames with X request + + * exwm-manage.el (exwm-manage--on-ConfigureRequest): There's a problem + in shrinking Emacs frames with `set-frame-width' and + `set-frame-height'. Use `exwm--set-geometry' instead. + +2018-07-15 Chris Feng + + Also send a WM_TAKE_FOCUS when setting focus with SetInputFocus + + * exwm-input.el (exwm-input--set-focus): Send an extra WM_TAKE_FOCUS + event to workaround the key replay issue with Xorg 1.20 when keyboard is + grabbed. + +2018-07-15 Chris Feng + + Revert "Grab & Replay key events with XI2 and XTEST" + + This reverts commit 0680be104f9394e39dd55b5c4e33b9b7e4e77926. + +2018-06-18 Chris Feng + + Grab & Replay key events with XI2 and XTEST + + ; A change has been made in Xorg server 1.20 that replaying a key + ; event with keyboard grabbed would generate extra focus change and + ; enter/leave events. This basically breaks line-mode for apps like + ; Firefox. This commit reimplements the grab & replay functionality + ; with XI2 and XTEST. + + * exwm-input.el (exwm-input--devices): New variable for caching slave + keyboards. + (exwm-input--update-devices): Update it and re-grab keys if necessary. + (exwm-input--on-Hierarchy): Event listener for the Hierarchy event that + would in turn call `exwm-input--update-devices' to update the cache. + + * exwm-input.el (exwm-input--on-KeyPress): Use XI2 KeyPress events. + (exwm-input--on-KeyRelease): Event listener for the KeyRelease events. + (exwm-input--grab-global-prefix-keys): Use XI2 and also select + KeyRelease events. + (exwm-input--on-KeyPress-line-mode): Use XI2 KeyPress events and replay + key events with XTEST. + (exwm-input--on-KeyPress-char-mode, exwm-input--grab-keyboard) + (exwm-input--release-keyboard): Use XI2 KeyPress events. + + * exwm-input.el (exwm-input--init): Initialize the XI2 and XTEST + extensions; add listeners for XI2 KeyPress, KeyRelease and Hierarchy + events. + +2018-05-27 Chris Feng + + Fix systemtray position when menu-bar / tool-bar is enabled + + * exwm-systemtray.el (exwm-systemtray--on-workspace-switch) + (exwm-systemtray--on-randr-refresh): Take menu-bar / tool-bar into + account when placing systemtray. + +2018-05-20 Chris Feng + + Provide a fallback value for X window geometry + + * exwm-manage.el (exwm-manage--update-geometry): Ditto. + +2018-05-13 Chris Feng + + Avoid hiding full screen X windows unexpectedly + + * exwm-layout.el (exwm-layout-set-fullscreen) + (exwm-layout-unset-fullscreen): Set the Emacs window of a full screen X + window dedicated to its buffer such that newly created X windows won't + replace it. + +2018-04-15 Paul Eggert + + Port to 32-bit Emacs on master branch + +2018-04-01 Chris Feng + + Preserve keyboard grab state after quitting fullscreen mode + + * exwm-layout.el (exwm-layout-set-fullscreen) + (exwm-layout-unset-fullscreen, exwm-layout-toggle-fullscreen): Ditto. + +2018-04-01 Chris Feng + + Add support for various key processing variables + + * exwm-input.el (exwm-input--mimic-read-event): New function for + handling `extra-keyboard-modifiers' and `keyboard-translate-table'. + (exwm-input--cache-event): Do not unread events here. + (exwm-input--on-KeyPress-line-mode) + (exwm-input--on-KeyPress-char-mode): Compare with preprocessed events + and unread raw ones. + + * exwm-input.el (exwm-input--on-KeyPress-line-mode): Add support for + `overriding-terminal-local-map'. + +2018-03-23 Chris Feng + + Fix a compatibility issue with Emacs 24 + + * exwm-core.el (exwm--defer): `time-add' in Emacs 24 only accept lists. + +2018-03-23 Chris Feng + + Fix local simulation keys + + * exwm-input.el (exwm-input--on-KeyPress-line-mode): Do not test + `exwm-mode-map' to see if a key should be forwarded to Emacs as it's + overridden when local simulation keys are present. + +2018-03-23 Chris Feng + + Avoid entering line-mode after exit minibuffer + + * exwm-input.el (exwm-input--on-pre-command): Keys should be forwarded + to the X window (if its Emacs window is currently selected) after + exiting the minibuffer. + +2018-03-23 Chris Feng + + Add workspace support in per-application configurations + + * exwm-manage.el (exwm-manage-configurations) + (exwm-manage--manage-window): Allow to specify which workspace an + applications should be created on. + +2018-03-14 Chris Feng + + Bump version to 0.18 + +2018-03-14 Chris Feng + + Fix wrong exwm-active frame parameters + + * exwm-randr.el (exwm-randr--refresh): Intern output names. + +2018-03-10 Chris Feng + + Fix regressions + + (exwm-init): Do not signal an error on startup. + + * exwm-floating.el (exwm-floating-toggle-floating): + * exwm-input (exwm-input-send-next-key) + (exwm-input-send-simulation-key): + * exwm-layout (exwm-layout-set-fullscreen) + (exwm-layout-unset-fullscreen, exwm-layout-toggle-fullscreen): Fix + incorrect use of `cl-return-from'. + +2018-03-10 Chris Feng + + Delay setting workspaces active/inactive + + * exwm-randr.el (exwm-randr--refresh): Set workspaces active/inactive + after their geometries have been updated. + +2018-03-09 Chris Feng + + Minor fixes + +2018-03-06 Adrián Medraño Calvo + + Support replacing and being replaced by other window managers + + * exwm.el (exwm--on-SelectionClear, exwm--init-icccm-ewmh) + (exwm--exit-icccm-ewmh, exwm--wmsn-acquire, exwm--wmsn-release): Get the + window manager selection; die when it is cleared. + +2018-03-06 Adrián Medraño Calvo + + Clean up when failing to start + + * exwm.el (exwm-init, exwm-exit): Clean up when failing to start. + (exwm--exit-icccm-ewmh): Stop deleting root window properties on exit: + delete function. + +2018-03-06 Adrián Medraño Calvo + + Name all helper windows created by EXWM + + * exwm-workspace.el (exwm-workspace--add-frame-as-workspace) + (exwm-workspace--init): + * exwm-input.el (exwm-input--init): + * exwm-floating.el (exwm-floating--set-floating): Name created helper + windows with prefix "EXWM". + +2018-03-06 Adrián Medraño Calvo + + Add interactive commands for starting and stopping EXWM + + * exwm.el (exwm-reset): Remove autoload cookie. + (exwm-init, exwm-exit): Add autoload cookie and interactive declaration. + +2018-03-06 Adrián Medraño Calvo + + Disconnect on `exwm--exit' + + * exwm.el (exwm-exit): Disconnect `exwm-connection'. + * exwm.el (exwm-init, exwm-exit, exwm--confirm-kill-emacs) + * exwm-workspace.el (exwm-workspace--set-desktop-geometry) + (exwm-workspace--init, exwm-workspace--exit): Move + `confirm-kill-emacs' to this exwm.el`. Delegate disconnection of + `exwm--connection' to `exwm-exit'. + +2018-03-06 Adrián Medraño Calvo + + * exwm.el (exwm--exit): Drop SubstructureRedirect on root window. + +2018-03-06 Adrián Medraño Calvo + + Cleanup exwm-workspace on exit + + * exwm-workspace.el (exwm-workspace--confirm-kill-emacs): Move + deinitialization to `exwm-workspace--exit'. + (exwm-workspace--exit): Reparent minibuffer frame to the root window, + turn workspace frames into regular frames, restore frame parameters. + (exwm-workspace--init): Reset the fullscreen counter. + (exwm-workspace--remove-frame-as-workspace): Reset fullscreen state. + (exwm-workspace--init-minibuffer-frame) + (exwm-workspace--exit-minibuffer-frame): New functions configuring the + minibuffer frame. + (exwm-workspace--init, exwm-workspace--exit): Use the above functions to + configure the minibuffer frame. + +2018-03-06 Adrián Medraño Calvo + + Dissociate frame creation and deletion handlers from the actual + configuration of frames as workspaces + + * exwm-workspace.el (exwm-workspace--add-frame-as-workspace) + (exwm-workspace--remove-frame-as-workspace): Limit functionality to the + configuration of frames as workspaces. + (exwm-workspace--on-after-make-frame) + (exwm-workspace--on-delete-frame): Callbacks run on frame creation and + deletion that may use or stop them from being used as workspaces. + +2018-03-06 Adrián Medraño Calvo + + Factor out `exwm-randr--on-ScreenChangeNotify' + + * exwm-randr.el (exwm-randr--on-ScreenChangeNotify) + (exwm-randr--init): Factor ScreenChangeNotify event callback into a + function. + +2018-03-06 Adrián Medraño Calvo + + Cleanup exwm-manage on exit + + * exwm-manage.el (exwm-manage--unmanage-window): Map windows when + quitting. + (exwm-manage--exit): Remap all windows. + + * exwm.el (exwm--exit): Reorder deinitialization sequence so that + windows are reparented before the workspaces are removed. + +2018-03-06 Adrián Medraño Calvo + + Cleanup exwm-layout on exit + + * exwm-layout.el (exwm-layout--exit): Remove + `window-pixel-width-before-size-change' hook. + +2018-03-06 Adrián Medraño Calvo + + Cleanup exwm-input on exit + + * exwm-input.el (exwm-input--exit): Remove missing hook reset window + variable. + +2018-03-06 Adrián Medraño Calvo + + Prevent duplicate keys in frameset-filter-alist + + * exwm-workspace.el (exwm-workspace--init): + * exwm-randr.el (exwm-randr--init): Prevent duplicate keys in + frameset-filter-alist + +2018-03-06 Adrián Medraño Calvo + + Support disabling default `exwm-mode-map' bindings + + * exwm-input.el (exwm-input--on-KeyPress-line-mode): Use + `lookup-key' to check whether a the event is defined in the + `exwm-mode-map' keymap. + +2018-03-04 Chris Feng + + Avoid switching buffer when moving an X window already in place + + * exwm-workspace.el (exwm-workspace-move-window): This is required when + calling `exwm-workspace-move-window' from `exwm-layout--refresh'. + +2018-03-04 Chris Feng + + Fix fullscreen mode after switching workspace and back + + * exwm-layout.el (exwm-layout--show): Always set an X window in + fullscreen mode the size in fullscreen. + (exwm-layout-unset-fullscreen): Leave the fullscreen mode first. + + * exwm-layout.el (exwm-layout--fullscreen-p): New function telling + whether the current buffer is in fullscreen mode. + (exwm-layout-set-fullscreen, exwm-layout-unset-fullscreen) + (exwm-layout-toggle-fullscreen): + * exwm-manage.el (exwm-manage--manage-window) + (exwm-manage--on-ConfigureRequest): + * exwm-workspace.el (exwm-workspace-switch, exwm-workspace-swap) + (exwm-workspace-move): + * exwm.el (exwm-reset, exwm--on-ClientMessage): Use it. + +2018-03-04 Chris Feng + + Fix local simulation keys + + * exwm-input.el (exwm-input--set-simulation-keys): Try the local binding + first do not clear the hash table (rely on GC). + +2018-03-04 Chris Feng + + Add header-line format support in per-application configurations + + * exwm-manage.el (exwm-manage-configurations): + * exwm-floating.el (exwm-floating--set-floating) + (exwm-floating--unset-floating): Allow customizing header-line format + for floating/tiling X windows. + +2018-03-04 Chris Feng + + Add prefix arguments support for various commands + + * exwm-workspace.el (exwm-workspace-switch) + (exwm-workspace-switch-create, exwm-workspace-move) + (exwm-workspace-move-window): Add prefix arguments support. + +2018-03-03 Chris Feng + + Add various per-application configurations + + * exwm-manage.el (exwm-manage-configurations): Add options for + fullscreen mode and floating & tiling mode-line formats. + (exwm-manage--manage-window): Add support for configuring + line-mode/char-mode, prefix keys, simulation keys and fullscreen mode. + * exwm-floating.el (exwm-floating--set-floating): Add support for + configuring the geometry, mode-line format and border width of a + floating X window. + (exwm-floating--unset-floating): Add support for configuring the + mode-line format of a tiling X window. + +2018-03-03 Johan Johansson <96.bryal@gmail.com> + + Fix EXWM buffers not being hidden on workspace switch + + * exwm-workspace.el (exwm-workspace-switch, exwm-workspace-move-window): + Use `equal' to compare RandR output names. + +2018-03-02 Chris Feng + + Add initial support for per-application configurations + + * exwm-core.el (exwm--configurations): New buffer-local variable + recording the configurations of an X window. + * exwm-manage.el (exwm-manage-configurations): New user option as the + per-application configurations. + (exwm-manage--get-configurations): New function for fetching the + configurations of this X window. + (exwm-manage--manage-window): Fetch the configurations and check if the + X window should be floating/tiling. + +2018-03-02 Chris Feng + + Improve multi-monitor performance + + * exwm-randr.el (exwm-randr--refresh): Use GetScreenResourcesCurrent + instead of GetScreenResources to avoid polling hardware changes. + (exwm-randr--init): GetScreenResourcesCurrent requires RandR 1.3 . + +2018-02-26 Chris Feng + + Make `exwm-manage-ping-timeout' a user option + + * exwm-manage.el (exwm-manage-ping-timeout): Now a user option. + +2018-02-26 Chris Feng + + Forward keys defined in `exwm-mode-map' to Emacs by default + + * exwm-input.el (exwm-input-prefix-keys): Remove ?\C-c. + (exwm-input--on-KeyPress-line-mode): + * exwm-core.el (): Detect keys in `exwm-mode-map' in line-mode. + +2018-02-26 Chris Feng + + Improve the Customize interface for simulation keys + + * exwm-input.el (exwm-input--set-simulation-keys): New function for + actullay setting simulation keys. + (exwm-input-simulation-keys, exwm-input-set-local-simulation-keys) + (exwm-input--init): Use this instead of + `exwm-input-set-simulation-keys'. + (exwm-input-set-simulation-keys): Make obsolete. + (exwm-input--read-keys): New function for reading an arbitrary key + sequence. + (exwm-input-set-simulation-key): New command for setting a new + simulation key (which can be saved in the Customize interface). + +2018-02-26 Chris Feng + + Add Customize interface for global keys + + * exwm-input.el (exwm-input--set-key): New function for actually setting + the binding. + (exwm-input-global-keys): New user option for customizing global keys. + (exwm-input-set-key): Update `exwm-input-global-keys' and call + `exwm-input--set-key' + (exwm-input--init): Initialize global keys. + +2018-02-24 Chris Feng + + Bump version to 0.17 + +2018-02-22 Chris Feng + + Hide blocked frames (they are visible with a compositor) + + * exwm-workspace.el (exwm-workspace--set-active): New function for + setting the 'exwm-active' frame parameter and show/hide frames BTW. + (exwm-workspace--active-p): New function checking whether a frame is + active. + (exwm-workspace--set-fullscreen, exwm-workspace-switch) + (exwm-workspace-move-window): + * exwm-randr.el (exwm-randr--refresh): Use them. + + * exwm-workspace.el (exwm-workspace-attach-minibuffer) + (exwm-workspace--show-minibuffer, exwm-workspace--hide-minibuffer): + Show/Hide the minibuffer frame. + +2018-02-22 Chris Feng + + Mark active workspaces on each output + + * exwm-randr.el (exwm-randr--refresh): Mark active workspaces. + * exwm-workspace.el (exwm-workspace-switch): Use the marks to show/hide + X windows when switching workspace; do not update timestamp. + (exwm-workspace-move-window): Use the marks to hide X windows after + moving them. + (exwm-workspace--init): Update `frameset-filter-alist'. + +2018-02-22 Chris Feng + + Grab global keys on top-level X windows + + * exwm-input.el (exwm-input--on-CreateNotify): New function for grabbing + global keys on newly created X windows. + (exwm-input--update-global-prefix-keys): Grab global keys on top-level X + windows instead of the root window. + (exwm-input--grab-global-prefix-keys): New function for grabbing global + keys on X windows. + (exwm-input--release-keyboard): Grab global keys in char-mode. + (exwm-input--init): Select CreateNotify events. + + * exwm-core.el (exwm--unlock): + * exwm-input.el (exwm-input--on-FocusIn, exwm-input--init): Do not + handle FocusIn events on the root window. + +2018-02-20 Chris Feng + + Fix unexpected focus change after a global key binding is activated + + * exwm-core.el (exwm--unlock): Select FocusChange events on the root + window. + + * exwm-input.el (exwm-input--on-FocusIn): Input focus should stay on the + current workspace when the root window receives a FocusIn event. + +2018-02-20 Chris Feng + + Use the 'exwm-randr-output' frame parameter to determine the output + + * exwm-randr.el (exwm-randr--refresh): Always set the name of primary + output. + + * exwm-workspace.el (exwm-workspace-switch) + (exwm-workspace-move-window): Use 'exwm-randr-output' frame parameter to + check if two frames are on the same output. + +2018-02-20 Chris Feng + + Remove redundant code for fullscreen mode + + * exwm-manage.el (exwm-manage--unmanage-window) + (exwm--on-ClientMessage): No need to modify workspace when an X window + enters/leaves fullscreen mode. + +2018-02-20 Chris Feng + + Add Customize interface for simulation keys + + * exwm-input.el (exwm-input-simulation-keys): New user option for + setting simulation keys. + (exwm-input--init): Initialize simulation keys from this variable. + + * exwm-input.el (exwm-input--simulation-prefix-keys) + (exwm-input--on-KeyPress-line-mode) + (exwm-input--update-simulation-prefix-keys) + (exwm-input-set-simulation-keys, exwm-input-set-local-simulation-keys) + (exwm-input-send-simulation-key): `exwm-input--simulation-keys' is now a + hash table storing both simulation keys and prefix keys. + (exwm-input--unset-simulation-keys): Clear the hash table. + (exwm-input--exit): Use `exwm-input--unset-simulation-keys'. + * exwm-core.el (exwm--kmacro-map, exwm-mode-menu): Adapt to the change + of `exwm-input--simulation-keys'. + + * exwm-config.el (exwm-config-default): Update the example. + +2018-02-19 Chris Feng + + Fix various issues with multi-monitor support + + * exwm-workspace.el (exwm-workspace-switch): Do not hide X windows when + switching to a workspace on another output; update the timestamp (last + switched to) of a workspace frame. + (exwm-workspace-move-window): Do not hide an X window when moving it to + an active workspace on another output. + + * exwm-floating.el (exwm-floating--set-floating): + * exwm-layout.el (exwm-layout-set-fullscreen): + * exwm-manage.el (exwm-manage--manage-window) + (exwm-manage--on-ConfigureRequest): + * exwm-systemtray.el (exwm-systemtray--refresh) + (exwm-systemtray--init): Correct coordinate calculations. + + * exwm-workspace.el (exwm-workspace--current-width): Removed since no + longer used. + +2018-02-19 Chris Feng + + Support displaying floating X windows on all workspaces + + ; Setting _NET_WM_DESKTOP to 0xffffffff makes an X windows appearing + ; on all desktops (EWMH). It's tricky to do it for tiling X windows + ; so it's not implemented. + + * exwm-core.el (exwm--desktop): New buffer-local variable recording the + value of _NET_WM_DESKTOP. + * exwm-layout.el (exwm-layout--hide): Do not hide X windows with this + property set to 0xffffffff. + + * exwm.el (exwm--update-desktop): New function for fetching the value of + _NET_WM_DESKTOP and setting `exwm--desktop'. + * exwm-manage.el (exwm-manage--manage-window): Use it. + + * exwm-workspace.el (exwm-workspace--set-desktop): Also update + `exwm--desktop'. + +2018-02-19 Chris Feng + + Add customization settings + + ; Also fix documentations. + +2018-02-18 Chris Feng + + Make X windows container-less + + ; This is an attempt to make (managed) X windows container-less, i.e. + direct children of the root window. This is mainly to make EXWM + compatible with third-party compositors. Other issues like wrong + absolute position should also get resolved by the way. The workspace + containers ("virtual roots") are also removed. However Emacs frames are + still wrapped in containers to avoid unexpected stack reordering. + + * exwm-cm.el: Make this module obsolete as EXWM supports third-party + compositors now. + + * exwm-core.el (exwm--container): + * exwm-floating.el (exwm-floating--set-floating) + (exwm-floating--unset-floating, exwm-floating-hide) + (exwm-floating--start-moveresize, exwm-floating--stop-moveresize) + (exwm-floating--do-moveresize, exwm-floating-move): + * exwm-input.el (exwm-input--update-focus): + * exwm-layout.el (exwm-layout--show, exwm-layout--hide) + (exwm-layout-set-fullscreen, exwm-layout-unset-fullscreen): + * exwm-manage.el (exwm-manage--manage-window, + exwm-manage--unmanage-window) + (exwm-manage--kill-buffer-query-function, exwm-manage--kill-client): + * exwm-workspace.el (exwm-workspace--set-fullscreen, + exwm-workspace-switch) + (exwm-workspace-move-window, exwm-workspace--add-frame-as-workspace) + (exwm-workspace--remove-frame-as-workspace): Make adaptions for + container-less X windows. + + * exwm-workspace.el (exwm-workspace--update-ewmh-props): + * exwm.el (exwm--init-icccm-ewmh, exwm--exit-icccm-ewmh): No longer use + virtual roots. + + * exwm-input.el (exwm-input--on-workspace-list-change) + (exwm-input--update-global-prefix-keys, exwm-input--init, + exwm-input--exit): From now on global key bindings are grabbed on the + root window so it's no long required to re-grab them each time the + workspace list changes. As a result + `exwm-input--on-workspace-list-change' and its corresponding references + are discarded. It remains to be seen if this change will raise input + focus issues. + + * exwm-manage.el (exwm-manage--manage-window): Explicitly set the + workspace for newly managed X windows. + * exwm-floating.el (exwm-floating--set-floating): Avoid implicit + reference to the current workspace. + + * exwm-core.el (exwm--set-geometry): New function for setting the + geometry of an X window. + * exwm-layout.el (exwm-layout--resize-container): Replaced by + `exwm-layout--resize-container'. + + * exwm-core.el (exwm--guide-window): New global variable recording the + guide X window. + * exwm.el (exwm--init-icccm-ewmh): Set it. + + * exwm-input.el (exwm-input--post-init): New function containing staffs + for initialization but should better get called after the event loop + starts. + * exwm.el (exwm-init): Use it. + +2018-02-04 Chris Feng + + Avoid crashing Emacs by resizing its frame into 0x0 + + * exwm-floating.el (exwm-floating--do-moveresize): + * exwm-layout.el (exwm-layout-enlarge-window): Resizing a frame into 0x0 + crashes Emacs so additional checks are required. + +2018-01-14 Chris Feng + + Support key translation in line-mode + + * exwm-input.el (exwm-input--translate): New function for translating + keys according to `input-decode-map', `local-function-key-map' and + `key-translation-map'. + (exwm-input--cache-event): Use it. + +2018-01-14 Chris Feng + + Raise docks after quitting full screen mode + + * exwm-layout.el (exwm-layout-unset-fullscreen): Raise docks lowered + when entering full screen mode. + +2017-12-31 Chris Feng + + ; Add missing autoload cookies. + +2017-12-31 Chris Feng + + Add support for `mouse-autoselect-window' + + ; This feature requires both `mouse-autoselect-window` and + ; `focus-follows-mouse' being set. Delaying autoselection is not + ; supported yet. + + * exwm-core.el (exwm--client-event-mask): Select the EnterNotify event + on each X window when `mouse-autoselect-window' is set. + * exwm-input.el (exwm-input--on-EnterNotify): New function for making + `mouse-autoselect-window' work on X windows. + (exwm-input--init): Listen to EnterNotify event when + `mouse-autoselect-window' is set. + +2017-12-31 Chris Feng + + Update copyright year to 2018 + +2017-12-10 Chris Feng + + ; Eliminate a compilation warning. + +2017-11-26 Chris Feng + + Re-grab global keys on keyboard update + + * exwm-input.el (exwm-input--on-keysyms-update): New function for + re-grabbing global keys. + (exwm-input--init): Register it to XELB. + +2017-11-26 Chris Feng + + Bump version to 0.16 + +2017-11-24 Chris Feng + + Another fix for input focus issues + + * exwm-core.el (exwm--defer): + * exwm-input.el (exwm-input--update-focus-defer): Avoid unnecessarily + long delay. + + * exwm-input.el (exwm-input--on-FocusIn): Filter out FocusIn events + generated as a result of grab/ungrab or when the keyboard is grabbed. + +2017-11-24 Chris Feng + + Fix possible wrong context when killing buffers + + * exwm-manage.el (exwm-manage--unmanage-window): Make sure to use the + correct context to read/set buffer-local variables when killing buffers. + +2017-11-19 Chris Feng + + Fix various input focus issues + + * exwm-input.el (exwm-input--on-buffer-list-update): Cancel the frame + redirection introduced by 421c0512f7. + + * exwm-input.el (exwm-input--on-buffer-list-update): Only ignore temp + buffers just switched from. + + * exwm-input.el (exwm-input--update-focus-commit): New function for + ensuring the input focus lock can always be released. + (exwm-input--update-focus-defer, exwm-input--update-focus): Use it. + + * exwm-input.el (exwm-input--update-focus): No need to select frames; + only transfer X input focus. + + * exwm-core.el (exwm--defer): New macro for correcting the use of + `run-with-idle-timer' by taking `current-idle-time' into account. + * exwm-input.el (exwm-input--update-focus-defer) + (exwm-input--update-focus): + * exwm-layout.el (exwm-layout--on-minibuffer-setup) + (exwm-layout--on-echo-area-change): + * exwm-manage.el (exwm-manage--unmanage-window) + (exwm-workspace--prompt-delete): + * exwm-workspace.el (exwm-workspace-switch) + (exwm-workspace--add-frame-as-workspace): Use it. + +2017-11-19 Chris Feng + + Free unused X resources + + * exwm-cm.el (exwm-cm--paint-tree): Make sure the clip can be destroyed + even the X window is in full screen mode. + (exwm-cm--paint-transparent, exwm-cm--paint-background): Free pixmaps + after creating pictures. + +2017-11-19 Chris Feng + + Correct the detection of emacsclient + + * exwm.el (exwm-enable): Use `daemonp' instead of `display-graphic-p'. + +2017-11-19 Chris Feng + + Merge branch 'kriyative/bugfix-selecting-deleted-buffer-error' into + externals/exwm + +2017-11-09 Chris Feng + + Be more precise when choosing the init hook + + * exwm.el (exwm-enable): Run `exwm-init' in + `after-make-frame-functions' only for emacsclient and + `window-setup-hook' only for ordinary sessions. + +2017-11-09 Chris Feng + + Update the workarounds for `unread-command-events' + + * exwm-input.el (exwm-input--unread-event): Update the note. + (exwm-input-send-next-key): Remove the workaround. + +2017-11-05 Ram Krishnan + + Fix for "Selecting deleted buffer" exception + +2017-11-05 Chris Feng + + Filter out events relating to temp buffers + + * exwm-input.el (exwm-input--on-buffer-list-update): Filter out events + relating to temp buffers by detecting if temp-buffer is present. + +2017-10-09 Chris Feng + + Fix systemtray applications crash when restarting + + * exwm-systemtray.el (exwm-systemtray--exit): Reparent out the tray + embedder to protect tray icons. + +2017-09-10 Chris Feng + + Avoid comparing raw button events + + * exwm-input.el (exwm-input--move-keysym, exwm-input--move-mask) + (exwm-input--resize-keysym, exwm-input--resize-mask): Removed. + (exwm-input--on-ButtonPress): Compare using Emacs events rather than raw + X11 events or it would fail with num-lock no. + (exwm-input--init): No longer cache raw keysym/state for button events. + +2017-08-31 Chris Feng + + Update systemtray when initializing + + * exwm-systemtray.el (exwm-systemtray--init): Systemtray is not placed + correctly when there's a panel launched before EXWM. + +2017-08-31 Chris Feng + + Avoid reusing dedicated window + + * exwm-floating.el (exwm-floating--unset-floating): + * exwm-manage.el (exwm-manage--on-MapRequest): Do not select a dedicated + window for displaying a buffer. + +2017-08-02 Chris Feng + + Bump version to 0,15 + +2017-07-16 Chris Feng + + Allow customizing workspace indexes + + * exwm-workspace.el (exwm-workspace-index-map): New variable for + customizing workspace indexes. + (exwm-workspace--update-switch-history): Use it. + +2017-05-31 Chris Feng + + Allow switching to a workspace by selecting one X window on it + + * exwm-workspace.el (exwm-workspace-switch-to-buffer): Only allows it + when `exwm-layout-show-all-buffers' is nil. + +2017-05-30 Chris Feng + + Fix X display name comparison + + * exwm-workspace--add-frame-as-workspace + (exwm-workspace--add-frame-as-workspace): Manually compare X display + names as there's no built-in function handles this correctly. + +2017-05-07 Chris Feng + + Bump version to 0.14 + +2017-05-07 Chris Feng + + Force repositioning floating Emacs frames + + * exwm-floating.el (exwm-floating--set-floating): Ditto. + +2017-04-23 Chris Feng + + ; Do not cache events for non-`exwm-mode' buffers + +2017-04-16 Chris Feng + + Avoid comparing X display names + + * exwm-workspace.el (exwm-workspace--add-frame-as-workspace): An X + display name set by XELB can be different from (but equivalent with) the + one set by Emacs. + +2017-04-10 Chris Feng + + Only add graphic frames to `exwm-manage--frame-outer-id-list' + + * exwm-manage.el (exwm-manage--add-frame, exwm-manage--remove-frame): + Add checks for graphic frames. + +2017-03-05 Chris Feng + + Manually run `focus-in-hook' and `focus-out-hook' + + ; Since X windows are managed by EXWM, the current Emacs frame should + always be considered focused logically. + + * exwm-workspace.el (exwm-workspace-switch): Manually run + `focus-in-hook' and `focus-out-hook'. + (exwm-workspace--handle-focus-in, exwm-workspace--handle-focus-out): New + functions for overriding `handle-focus-in' and `handle-focus-out'. + (exwm-workspace--init, exwm-workspace--exit): Override + `handle-focus-in' and `handle-focus-out' + +2017-03-05 Chris Feng + + ; Update the workaround for bug#23980 + +2017-02-24 Chris Feng + + Merge branch 'Stebalien/expose-line-mode-passthrough' into + externals/exwm + +2017-02-24 Chris Feng + + ; Expose `exwm-input-line-mode-passthrough' as a public interface. + +2017-02-24 Chris Feng + + Fix systemtray position + + * exwm-workspace.el (exwm-workspace--update-workareas-hook): New hook + run when workareas get updated. + (exwm-workspace--update-workareas): Run the hook. + * exwm-systemtray.el (exwm-systemtray--on-workspace-switch) + (exwm-systemtray--on-randr-refresh): Take struts into account when + calculating the position for systemtray. + (exwm-systemtray--on-struts-update): Alias of + `exwm-systemtray--on-randr-refresh'. + (exwm-systemtray--init, exwm-systemtray--exit): Manipulate + `exwm-workspace--update-workareas-hook'. + +2017-02-22 Steven Allen + + Use let instead of setq when setting exwm-input--line-mode-passthrough + + That way, exwm won't clobber user modifications to this variable. + +2017-02-12 Chris Feng + + Bump version to 0.13 + +2017-02-10 Chris Feng + + Correct a renamed variable + + * exwm-core.el (exwm--kmacro-map): Correct + `exwm-input--during-key-sequence' that was left out in 089afdc8. + +2017-02-05 Chris Feng + + Add a menu entry to `exwm-mode-map' + + * exwm-core.el (exwm-mode-menu): Add a menu entry for closing X windows. + +2017-02-05 Chris Feng + + Fix checkdoc warnings + +2017-02-05 Chris Feng + + Update copyright year to 2017 + +2017-01-03 Chris Feng + + Prevent certain frame parameters from being saved/restored + + * exwm-input.el (exwm-input--init): + * exwm-randr.el (exwm-randr--init): + * exwm-workspace.el (exwm-workspace--init): Add certain frame parameters + into `frameset-filter-alist' to prevent them from being saved/restored + which makes little sense and is problematic. + +2016-12-26 Chris Feng + + Fix a bug with zero floating border width + + * exwm-manage.el (exwm-manage--manage-window): Avoid setting ColorMap + mask when creating an X window if floating border is zero. + +2016-11-19 Chris Feng + + Bump version to 0.12 + +2016-11-13 Chris Feng + + Grab global prefix keys with num-lock mask set. + + * exwm-input.el (exwm-input--update-global-prefix-keys): Grab global + prefix keys with num-lock mask set, or those keys won't be activated + when num-lock is enabled. + +2016-10-06 Chris Feng + + Fix a possible deadlock + + * exwm-input.el (exwm-input--update-focus): Unlock before switching + workspace. Also make sure the correct Emacs window is chosen for the + target workspace. + +2016-10-06 Chris Feng + + Avoid updating input focus when renaming buffers + + * exwm-workspace.el (exwm-workspace-switch-to-buffer) + (exwm-workspace-rename-buffer): Do not update input focus. + +2016-10-06 Chris Feng + + Fix problems with active minibuffer + + * exwm-floating.el (exwm-floating--unset-floating): Never use the + minibuffer window to display an `exwm-mode' buffer. + + * exwm-input.el (exwm-input--on-buffer-list-update) + (exwm-input--update-focus): Allow updating input focus when the + minibuffer is active. + (exwm-input--update-focus): Handle the case when an auto-hiding + minibuffer is active. + (exwm-input--during-key-sequence): Renamed to + `exwm-input--line-mode-passthrough'. + (exwm-input--line-mode-passthrough): New variable for forcing all events + to be passed to Emacs in line-mode. + (exwm-input--on-KeyPress-line-mode, exwm-input-send-next-key): Use it. + (exwm-input--finish-key-sequence, exwm-input--init, exwm-input--exit): + Drop `exwm-input--finish-key-sequence'. + (exwm-input--line-mode-cache): New variable for caching incomplete key + sequences. + (exwm-input--cache-event): New function for handling new key events. + (exwm-input--on-KeyPress-line-mode, exwm-input--on-KeyPress-char-mode): + Use it. + +2016-10-01 Chris Feng + + Bump version to 0.11 + +2016-09-30 Felix Lange + + Use read-buffer-to-switch in exwm-workspace-switch-to-buffer + + read-buffer-to-switch elides the current buffer from the list of + completions and selects a sane default. + +2016-09-25 Chris Feng + + Fix a frame resizing problem for Lucid build + + * exwm-manage.el (exwm-manage--frame-outer-id-list): New variable for + storing frame window-outer-id's. + (exwm-manage--add-frame, exwm-manage--remove-frame): New functions for + adding/removing ids to/from the variable. + (exwm-manage--init): Add the functions to the corresponding hooks. + (exwm-manage--on-ConfigureRequest): Check for frames and avoid handling + them. + +2016-09-25 Chris Feng + + Fix `exwm-manage--kill-buffer-query-function' + + * exwm-manage.el (exwm-manage--kill-buffer-query-function): Check + buffer-local variables for destroyed X windows; Avoid force killing + clients that support WM_DELETE_WINDOW but not _NET_WM_PING; Use + `y-or-n-p' instead for querying. + +2016-09-23 Chris Feng + + Use X window borders + + ; This commit replaces the internal borders of Emacs frames with X + ; window borders. This should make the flickering issue of floating X + ; windows less serious. + + * exwm-floating.el (exwm-floating--border-pixel) + (exwm-floating--border-colormap): New variables for storing border pixel + and its colormap. + (exwm-floating--set-floating): Do not set the internal border (and + background color) of floating frames; do not take + `exwm-floating-border-width' into account when calculating geometries; + set the border of floating X window containers. + (exwm-floating--unset-floating): No need to restore the position of X + windows any more; hide the border of floating X window containers. + (exwm-floating--init): Initialize the border pixel. + * exwm-layout.el (exwm-layout-set-fullscreen) + (exwm-layout-unset-fullscreen): Show/Hide container border respectively. + * exwm-manage.el (exwm-manage--manage-window): Set the border pixel and + colormap of X window containers. + * exwm-workspace.el (exwm-workspace-move-window): Do not set the + internal border and background color of floating frames. + * exwm.el (exwm--on-ClientMessage): Simplify the code for calculating + _NET_REQUEST_FRAME_EXTENTS. + +2016-09-23 Chris Feng + + Remember the geometries of floating X windows + + * exwm-floating.el (exwm-floating--stop-moveresize): + * exwm-layout.el (exwm-layout-enlarge-window): Update the geometry after + resizing. + +2016-09-23 Chris Feng + + Redirect KeyPress events sent to system tray icons + + * exwm-systemtray.el (exwm-systemtray--embed): Select KeyPress events on + system tray icons. + (exwm-systemtray--on-KeyPress): New function for redirecting KeyPress + events. + (exwm-systemtray--init): Attach the event listener. + + * exwm-systemtray.el (exwm-systemtray--init): Fix a typo. + +2016-09-23 Chris Feng + + Allow selecting an X window from another workspace + + * exwm-input.el (exwm-input--on-buffer-list-update): Filter out + switch-frame events. + (exwm-input--update-focus): Switch workspace to set input focus on an X + window from another workspace. + +2016-09-22 Chris Feng + + Add support for keyboard macro + + * exwm-core.el (exwm--kmacro-map): New keymap used when executing + keyboard macros. + (exwm-mode): Use `exwm--kmacro-map' to override the default keymap. + * exwm-input.el (exwm-input--on-KeyPress-line-mode): Send extra key + events when defining keyboard macros. + +2016-09-22 Chris Feng + + Drop support for _NET_WM_STATE_MODAL + + ; Modal X windows are not necessarily floating. + + * exwm.el (exwm--on-ClientMessage, exwm--init-icccm-ewmh): Drop support + for _NET_WM_STATE_MODAL. + +2016-09-22 Chris Feng + + ; Remove dead code + +2016-08-31 Chris Feng + + Force using visible buffers in `other-buffer' + + * exwm-floating.el (exwm-floating--set-floating): + * exwm-workspace.el (exwm-workspace-move-window): Buffers visible on + other frames should be treated as invisible. One side effect is visible + buffers on the current frame is also taken into account. + +2016-08-30 Ved Vyas + + Improve exwm-workspace-move-window behavior in specific case + + This is a small change that improves the behavior of + `exwm-workspace-move-window` in the following situation: + + 0. `exwm-workspace-show-all-buffers` and `exwm-layout-show-all-buffers` + are `nil`*. 1. On active workspace `i`, there is X window `a` in the + selected Emacs window. 2. On workspace `j`, there is X window `b` in the + selected Emacs window on that workspace frame. 3. While workspace `i` is + active, use `exwm-workspace-move-window` to move `a` to workspace `j`. + 4. Switch to workspace `j` and use `exwm-workspace-move-window` to move + `a` back to workspace `i`. + + Expected behavior: X window `a` is once again shown in the selected + Emacs window on workspace `i` and X window `b` is once again shown in + the selected Emacs window on workspace `j`. + + What is observed: `a` is OK but the selected Emacs window on workspace + `j` does not show `b`. However, `b` is the first candidate when doing a + `switch-to-buffer` in that Emacs window on workspace `j`. + + I'm not sure if this is the correct and complete change required, but it + is working well so far. + + *The expected behavior is observed with EXWM 0.10 if + exwm-{workspace,layout}-show-all-buffers are non-nil. + +2016-08-28 Chris Feng + + Bump version to 0.10 + +2016-08-24 Chris Feng + + Add toggle commands + + * exwm-input.el (exwm-input-toggle-keyboard): New command for toggling + keyboard mode. + * exwm-layout.el (exwm-layout-toggle-fullscreen): New command for + toggling fullscreen mode. + * exwm-core.el (exwm-mode-menu, exwm-mode-map): Use them. + +2016-08-15 Chris Feng + + ; Fix typos + +2016-08-15 Chris Feng + + Do not set _NET_WORKAREA + + * exwm-workspace.el (exwm-workspace--update-workareas): Do not set + _NET_WORKAREA. + * exwm.el (exwm--init-icccm-ewmh, exwm--exit-icccm-ewmh): Remove + _NET_WORKAREA from the supported list. + +2016-08-14 Chris Feng + + Merge branch 'feat/compositor' into externals/exwm + +2016-08-14 Chris Feng + + Document the compositing manager module + + * README.md: + * exwm.el: Mention this new feature. + +2016-08-14 Chris Feng + + Implement compositing manager module + + * exwm-cm.el: New compositing manager module. + +2016-08-14 Chris Feng + + Bump version to 0.9 + +2016-08-14 Chris Feng + + Only check input focus for globally active model + + * exwm-input.el (exwm-input--set-focus): Partly revert 810b471. + +2016-08-12 Chris Feng + + Fix _NET_DESKTOP_VIEWPORT + + * exwm-workspace.el (exwm-workspace--update-ewmh-props): + * exwm.el (exwm--init-icccm-ewmh): Set _NET_DESKTOP_VIEWPORT on startup + since it's a constant. + +2016-08-12 Chris Feng + + Raise all docks/panels when switching workspace + + * exwm.el (exwm--update-struts-legacy, exwm--update-struts-partial): + Always set the struts value, even it's nil. + * exwm-workspace.el (exwm-workspace--update-struts): Check for nil + struts values. + +2016-08-12 Chris Feng + + Check for _NET_WM_STATE_FULLSCREEN on managing + + * exwm-core.el (exwm--fullscreen): Removed. + (exwm--ewmh-state): New variable for recording the _NET_WM_STATE hint. + * exwm-core.el (exwm-mode-menu, exwm-mode-map): + * exwm-layout.el (exwm-layout-set-fullscreen) + (exwm-layout-unset-fullscreen): + * exwm-manage.el (exwm-manage--unmanage-window) + (exwm-manage--on-ConfigureRequest): + * exwm-workspace.el (exwm-workspace-switch, exwm-workspace-swap) + (exwm-workspace-move): + * exwm.el (exwm-reset, exwm--on-ClientMessage): Use the new variable. + * exwm-manage.el (exwm-manage--update-ewmh-state): New function for + updating _NET_WM_STATE. + (exwm-manage--manage-window): Update _NET_WM_STATE and check for + _NET_WM_STATE_FULLSCREEN. + +2016-08-12 Chris Feng + + * exwm-manage.el (exwm-manage--unmanage-window): Do not clear struts + when unmapping. + +2016-08-12 Chris Feng + + Always put the desktop at bottom + + * exwm-manage.el (exwm-manage--desktop): New variable for recording the + desktop X window. + (exwm-manage--manage-window): Check for desktop. + * exwm-workspace.el (exwm-workspace--resize-minibuffer-frame) + (exwm-workspace--hide-minibuffer): Put the minibuffer container above + desktop if any. + +2016-08-12 Chris Feng + + * exwm-manage.el (exwm-manage--scan): Check for possibly destroyed + child. + +2016-08-12 Chris Feng + + Fix CreateWindow attributes + + ; Also fix various compile warnings. + + * exwm-floating.el (exwm-floating--set-floating): + * exwm-manage.el (exwm-manage--manage-window): + * exwm-systemtray.el (exwm-systemtray--init): + * exwm-workspace.el (exwm-workspace--add-frame-as-workspace) + (exwm-workspace--init): + * exwm.el (exwm--init-icccm-ewmh): Explicitly specify the class + (InputOutput or InputOnly) and for an InputOutput X window the + background pixmap when creating an X window. + +2016-08-10 Chris Feng + + Adapt for the changes in `window-configuration-change-hook' + + * exwm-layout.el (exwm-layout--refresh): Accept frame as an optional + argument. + (exwm-layout--init): Add `exwm-layout--refresh' to + `window-size-change-functions' when appropriate. + +2016-08-09 Chris Feng + + Update timestamp for WM_TAKE_FOCUS ClientMessage + + * exwm-input.el (exwm-input--timestamp-window) + (exwm-input--timestamp-atom, exwm-input--timestamp-callback): New + variables for updating timestamp. + (exwm-input--set-focus): Send WM_TAKE_FOCUS ClientMessage with updated + timestamp. + (exwm-input--update-timestamp): New utility function for fetching + timestamp. + (exwm-input--on-PropertyNotify): New function for handling + PropertyNotify event to extract the timestamp. + (exwm-input--init): Create resources for updating timestamp; attach the + event listener. + (exwm-input--on-ButtonPress, exwm-input--on-KeyPress): + * exwm.el (exwm--on-PropertyNotify): No longer update timestamp. + + * exwm-input.el (exwm-input--set-focus): Avoid setting input focus on + already focused X windows, or when the input focus in not on a Emacs + frame if globally active model is in use. + + * exwm-floating.el (exwm-floating--set-floating): + * exwm-workspace.el (exwm-workspace-move-window) + (exwm-workspace--add-frame-as-workspace, exwm-workspace--init): Set + 'exwm-id' frame parameter as the numerical (inner) frame X ID. + +2016-08-09 Chris Feng + + Fix coordinates calculations concerning workspaces + + * exwm-floating.el (exwm-floating--set-floating) + (exwm-floating--do-moveresize): + * exwm-manage.el (exwm-manage--manage-window): Use the computed + workareas rather than RandR output geometries. + +2016-08-09 Chris Feng + + Ensure floating hooks are run in the right context + + * exwm-floating.el (exwm-floating-setup-hook, exwm-floating-exit-hook): + Fix doc string. + (exwm-floating--set-floating, exwm-floating--unset-floating): Set the + context. + +2016-08-07 Chris Feng + + Set background pixmap for system tray embedder + + * exwm-systemtray.el (exwm-systemtray--init): Make embedder use the same + depth and pixmap of the parent; the parent is always a Emacs frame. + +2016-08-06 Chris Feng + + * exwm-layout.el (exwm-layout--show): Fix the position of floating X + windows. + +2016-08-06 Chris Feng + + Avoid setting input focus on workspace containers + + * exwm-input.el (exwm-input--on-FocusIn): Set input focus to the + workspace frame when input focus is received by a workspace container. + (exwm-input--on-workspace-list-change): Select FocusChange event mask on + workspace containers. + (exwm-input--init): Attach the event listener; adapt function calls. + +2016-08-01 Chris Feng + + Fix emacsclient issues + + * exwm-workspace.el (exwm-workspace--client-p): New function for testing + emacsclient frames. + (exwm-workspace--update-minibuffer-height) + (exwm-workspace--on-minibuffer-setup) + (exwm-workspace--on-minibuffer-exit, exwm-workspace--on-echo-area-dirty) + (exwm-workspace--on-echo-area-clear): + * exwm-input.el (exwm-input--on-buffer-list-update) + (exwm-input--on-minibuffer-setup): + * exwm-layout.el (exwm-layout--on-minibuffer-setup) + (exwm-layout--on-echo-area-change): Use it. + + * exwm-workspace.el (exwm-workspace--add-frame-as-workspace): Always + clear the 'client' frame parameter. + (exwm-workspace--init): Fix a typo. + +2016-08-01 Chris Feng + + Fix restarting issues + + * exwm-workspace.el (exwm-workspace--confirm-kill-emacs): Prompt for + unsaved files before restarting; avoid running `server-force-stop' + early; restore the 'client' frame parameter before calling `exwm--exit'; + correctly handle emacsclient. + + * exwm.el (exwm-restart): Always kill subordinate Emacs instances. + +2016-07-31 Chris Feng + + Bump version to 0.8 + +2016-07-31 Chris Feng + + ; Eliminate compile warnings + +2016-07-31 Chris Feng + + Fix restarting issues + + * exwm-workspace.el (exwm-workspace--confirm-kill-emacs): + * exwm.el (exwm-restart): Run `kill-emacs-hook' early; do not check for + X windows before restarting. + +2016-07-30 Chris Feng + + Add restart support + + * exwm-input.el (exwm-input--exit): Cancel timers. + + * exwm-manage.el (exwm-manage--manage-window): Add reparented X windows + to save-set. + * exwm-systemtray.el (exwm-systemtray--embed): Add embeded icons to + save-set. + + * exwm-workspace.el (exwm-workspace--confirm-kill-emacs): No need to + unmanage; also hide Emacs frames; always call `exwm--exit'. + + * exwm.el (exwm-restart): New command for restarting EXWM. + (exwm--exit-icccm-ewmh): New function for cleaning up ICCCM/EWMH + properties. + (exwm-exit-hook): Update doc string. + (exwm--exit): Call `exwm--exit-icccm-ewmh' and do not reset variables. + +2016-07-30 Chris Feng + + ; * exwm.el (exwm-enable): Ignore unrecognized command line arguments. + +2016-07-30 Chris Feng + + ; * exwm-workspace.el (exwm-workspace-switch): Input focus should be set + ; on the frame where the target window resides. + +2016-07-30 Taichi Uemura + + set fullscreen-frame-count to 0 on exiting + +2016-07-30 Chris Feng + + Fit the *Completions* buffer + + * exwm-workspace.el (exwm-workspace--on-minibuffer-setup): Work around + the *Completions* buffer not getting fitted problem. + + * exwm.el (exwm-enable): Enable `window-resize-pixelwise'. + +2016-07-30 Chris Feng + + Exit the active minibuffer on unmanaging X windows + + * exwm-manage.el (exwm-manage--unmanage-window): Exit the minibuffer as + a precaution to prevent the "selecting deleted buffer" error. + +2016-07-30 Chris Feng + + ; * exwm-manage.el (exwm-manage--manage-window): Check the value range + ; of _NET_WM_DESKTOP. + +2016-07-30 Chris Feng + + Grab global keys on newly created workspaces + + * exwm-input.el (exwm-input--update-global-prefix-keys): Label grabbed + workspaces and re-grab keys only when keys change or there are newly + created workspaces. + (exwm-input--init, exwm-input--exit): Use the function in + `exwm-workspace-list-change-hook'. + +2016-07-30 Chris Feng + + Fix input focus transfer between workspaces + + * exwm-input.el (exwm-input--set-focus): Make input focus revert to + parent by default (to prevent input focus from following pointer). + + * exwm-input.el (exwm-input--update-focus): Switch to another workspace + if input focus is transfered to it. + * exwm-workspace.el (exwm-workspace--on-focus-in, exwm-workspace--init) + (exwm-workspace--exit): Remove `exwm-workspace--on-focus-in' and related + uses. + +2016-07-29 Chris Feng + + ; * exwm-floating.el (exwm-floating--unset-floating): Reposition an X + ; window when it changes from floating to tiling layout. + +2016-07-29 Chris Feng + + Sync with XELB + + * exwm-input.el (exwm-input--update-global-prefix-keys) + (exwm-input--on-KeyPress-line-mode, exwm-input--on-KeyPress-char-mode) + (exwm-input--fake-key, exwm-input--init): Sync with XELB. + + * exwm-input.el (exwm-input--on-KeyPress) + (exwm-input--on-KeyPress-line-mode): Resend XKB events with SendEvent + since AllowEvents in ReplayKeyboard mode doesn't seem to work. + +2016-07-27 Chris Feng + + Bump version to 0.7 + +2016-07-26 Chris Feng + + Always update input focus on entering minibuffer + + * exwm-input.el (exwm-input--on-minibuffer-setup): New function for + setting input focus on the workspace frame. + (exwm-input--init): Add the function to `minibuffer-setup-hook'. + * exwm-workspace.el (exwm-workspace--on-minibuffer-setup): Avoid setting + input focus here. + +2016-07-26 Chris Feng + + Add an option to force using tiling layout + + * exwm-manage.el (exwm-manage-force-tiling): New variable indicating + whether X windows should always be managed in tiling layout. + (exwm-manage--manage-window): Add a condition. + +2016-07-25 Chris Feng + + Bump version to 0.6 + +2016-07-25 Chris Feng + + Minor fixes for past few commits + + * exwm-input.el (exwm-input--unread-event): Temporarily disable it due + to bug#23980. + + * exwm-workspace.el (exwm-workspace--init): Set the default frame + internal border to 0. + + * exwm-workspace.el (exwm-workspace--remove-frame-as-workspace): Fix a + typo. + +2016-07-22 Chris Feng + + ; * exwm-input.el: Prevent moving/resizing a tiling X window. + +2016-07-22 Chris Feng + + Fix issues with deleting the last workspace + + * exwm-workspace.el (exwm-workspace-delete): Prevent deleting the last + workspace. + + * exwm-workspace.el (exwm-workspace--remove-frame-as-workspace): Create + a new workspace if the last one is deleted. + +2016-07-22 Chris Feng + + Add minibuffer toggle command + + * exwm-workspace.el (exwm-workspace-toggle-minibuffer): Add minibuffer + toggle command. + + * exwm-core.el (exwm-mode-menu, exwm-mode-map): Substitute minibuffer + attach/detach commands with minibuffer toggle command. + + * exwm-workspace.el (exwm-workspace-toggle-minibuffer): Insert various + auto load cookies. + +2016-07-21 Chris Feng + + Improve the performance of workspace creation + + * exwm-workspace.el (exwm-workspace--add-frame-as-workspace): Do not run + `exwm-workspace-list-change-hook' when create workspace in the + background. + (exwm-workspace-switch-create): Run the hook once. + (exwm-workspace--prompt-add): Run the hook. + +2016-07-21 Chris Feng + + Fix input focus issues revealed by recent commits + + * exwm-input.el (exwm-input--update-focus-window) + (exwm-input--on-buffer-list-update, exwm-input--update-focus-interval) + (exwm-input--update-focus-lock, exwm-input--update-focus-defer-timer) + (exwm-input--update-focus-timer, exwm-input--update-focus-defer) + (defun exwm-input--update-focus): Rework the input focus update + mechanism, mainly to overcome the input focus update contention. + + * exwm-input.el (defun exwm-input--update-focus): Use `select-window' + instead of `exwm-workspace-switch'; calling the latter is too expensive. + + * exwm-layout.el (exwm-layout--on-minibuffer-setup): Drop a unnecessary + line. + + * exwm-workspace.el (exwm-workspace-switch): Set input focus to the new + workspace frame. + +2016-07-21 Chris Feng + + Fix workspace creation and deletion + + * exwm-workspace.el (exwm-workspace-switch) + (exwm-workspace-switch-create): Move support for creating missing + workspaces from the former to the latter.. + (exwm-workspace-switch-create-limit): New variable limiting the number + of new workspaces allowed to create each time. + + * exwm-workspace.el (exwm-workspace--prompt-add) + (exwm-workspace--prompt-delete): New commands for adding and deleting + workspaces from the `read-from-minibuffer' prompt. + (exwm-workspace--prompt-add-allowed) + (exwm-workspace--prompt-delete-allowed): New variables telling whether + the above two commands are allowed to run. + (exwm-workspace--switch-map): Change "+" / "-" to use the new commands. + * exwm-workspace.el (exwm-workspace-switch, exwm-workspace-swap) + (exwm-workspace-move-window): Use this new feature. + + * exwm-workspace.el (exwm-workspace-add, exwm-workspace-delete): Since + they are not used by the keymap any more, drop the use of idle timer. + + * exwm-workspace.el (exwm-workspace--create-silently): New variable + indicating whether new workspaces should be created in the background. + (exwm-workspace--add-frame-as-workspace): Support creating new + workspaces in the background. + + * exwm-workspace.el (exwm-workspace--on-ConfigureNotify): Update + workareas if it's not up to date. + + * exwm-randr.el (exwm-randr--refresh): Raise the standalone minibuffer + when refreshed. + + * exwm-config.el (exwm-config-default): Add `exwm-workspace-number' and + `exwm-workspace-switch-create'. + +2016-07-21 Chris Feng + + Minor fixes + + * exwm-core.el (exwm-mode-menu, exwm-mode-map): Add workspace + attach/detach commands. + + * exwm-workspace.el (exwm-workspace--add-frame-as-workspace): Cleanup + containers. + + * exwm-workspace.el (exwm-workspace--update-ewmh-props): Create the + frame in size 1x1 (Lucid build does no support zero sized frames). + + * exwm-workspace.el (exwm-workspace--post-init): Reset the 'fullscreen' + frame parameter for emacsclient. + +2016-07-21 Chris Feng + + Minor cleanups + + ; Eliminate compile warnings. + ; Rename frame parameter 'exwm--urgency' to 'exwm-urgency'. + ; Simplify expressions. + +2016-07-19 Chris Feng + + Add support for attachable/detachable minibuffer + + * exwm-workspace.el (exwm-workspace--update-minibuffer-height): Renamed + from `exwm-workspace--update-minibuffer' to better reflect its usage. + + * exwm-input.el (exwm-input--update-focus): Directly put the floating X + window at top since the minibuffer is no longer a sibling. + * exwm-workspace.el (exwm-workspace--resize-minibuffer-frame): Calculate + position in absolute coordinate; put minibuffer at bottom by default; + resize the minibuffer frame with ConfigureWindow rather than + `set-frame-width'. + (exwm-workspace-switch): No need to reparent minibuffer any more. + (exwm-workspace--on-ConfigureNotify): Calculate position in absolute + coordinate. + (exwm-workspace--show-minibuffer, exwm-workspace--hide-minibuffer): + Show/Hide the minibuffer by adjusting the stacking order rather than + mapping/unmapping. + (exwm-workspace--init): Map the minibuffer frame container on creation. + + * exwm-workspace.el (exwm-workspace--minibuffer-attached-p): New + function telling whether the minibuffer is attached. + (exwm-workspace--attached-minibuffer-height): New variable storing the + height of the attached minibuffer. + (exwm-workspace-attach-minibuffer, exwm-workspace-detach-minibuffer): + New functions for attaching/detaching the minibuffer. + + * exwm-workspace.el (exwm-workspace--show-minibuffer): Remove the + workaround for minibuffer cursor (seems fixed). + +2016-07-19 Chris Feng + + Fix an bug for emacsclient + + * exwm-workspace.el (exwm-workspace--init): Always create one initial + workspace by default. + +2016-07-19 Chris Feng + + Fix a workspace switch issue + + * exwm-workspace.el (exwm-workspace--switch-map-nth-prefix): Add more + checking conditions. + +2016-07-19 Chris Feng + + Merge branch 'medranocalvo/dynamic-workspaces' into externals/exwm + +2016-07-19 Chris Feng + + Mention dynamic workspace in various places + + * README.md: + * exwm.el: Update README and comments. + + * exwm-core.el (exwm-mode-menu exwm-mode-map): Add menu entries for + dynamic workspace feature. + +2016-07-19 Chris Feng + + Adapt dynamic workspace for RandR module + + * exwm-workspace.el (exwm-workspace-list-change-hook): New hook run when + the workspace list is modified. + * exwm-randr.el (exwm-randr--init, exwm-randr--exit): + * exwm-workspace.el (exwm-workspace-swap, exwm-workspace-move) + (exwm-workspace--add-frame-as-workspace) + (exwm-workspace--remove-frame-as-workspace): Use it. + +2016-07-19 Chris Feng + + Adapt dynamic workspace for floating module + + * exwm-workspace.el (exwm-workspace--add-frame-as-workspace): Fix the + checking criteria of floating frames; Copy RandR frame parameters from + the first workspace frame (rather than the selected one which can be a + floating frame). + + * exwm-workspace.el (exwm-workspace--remove-frame-as-workspace): Check + frame type first. + +2016-07-19 Chris Feng + + Improve the handling of workspaces + + * exwm-workspace.el (exwm-workspace--prompt-for-workspace): Add an + optional argument to modify prompt. + (exwm-workspace-switch, exwm-workspace-swap) + (exwm-workspace-move, exwm-workspace-move-window): Use it. + + * exwm-workspace.el (exwm-workspace-number): Re-introduce the variable + (now it stands for the initial workspace number). + (exwm-workspace--init): Create remaining initial workspaces. + + * exwm-workspace.el (exwm-workspace-add, exwm-workspace-delete): New + commands for adding/deleting workspaces. + (exwm-workspace--switch-map): Add "+"/"-" to increase/descrease + workspace number. + + * exwm-workspace.el (exwm-workspace-switch): Automatically add missing + workspaces. + + * exwm.el (exwm--on-ClientMessage): Support _NET_NUMBER_OF_DESKTOPS + client message for adjusting workspace number. + +2016-07-19 Chris Feng + + Fix various minor issues + + ; Coding style fixes + + * exwm-core.el (exwm-mode-menu exwm-mode-map): Use + `exwm-workspace--count'. + * exwm-workspace.el (exwm-workspace--set-fullscreen) + (exwm-workspace--on-focus-in, exwm-workspace--set-desktop): Use + `exwm-workspace--position'. + + * exwm-workspace.el (exwm-workspace-swap, exwm-workspace-move): Renamed + from `exwm-workspace-swap-workspace' and + `exwm-workspace-move-workspace'. + + * exwm-workspace.el (exwm-workspace--update-ewmh-props): Update + comments. + + * exwm-workspace.el (exwm-workspace--switch-map-nth-prefix): Fix a + calculation. + + * exwm-workspace.el (exwm-workspace-switch): Fix a potential timer + problem. + + * exwm-workspace.el (exwm-workspace-swap, exwm-workspace-move) + (exwm-workspace--remove-frame-as-workspace): Update workspace and + clients involved. + + * exwm-workspace.el (exwm-workspace--remove-frame-as-workspace): Remove + workspace first. + +2016-07-18 Chris Feng + + Fix 2 dock-related issues + + * exwm-floating.el (exwm-floating--set-floating): Add a workaround to + prevent accidental move of Emacs frame when struts are set. + + * exwm-workspace.el (exwm-workspace--update-workareas): Make legacy + docks working. + +2016-07-18 Chris Feng + + * exwm-workspace.el (exwm-workspace--init): Rebalance parentheses. + +2016-07-17 Adrián Medraño Calvo + + Remove `exwm-worspace-number' + + No longer fill initial workspace list, nor limit the number of + workspaces to `exwm-worspace-number'. + + Users are free to create as many as they like by hitting 'C-x 5 2' or + running `make-frame'. + + The initial workspace list can be set up by creating frames in a + configuration file. For example, to start up with 4 workspaces: + + (dolist (i 3) + (make-frame)) + + The interactive workspace switcher is improved to support selecting + workspaces with a many-digits position. + + * exwm-workspace.el (exwm-workspace-number): Remove variable, as + we no longer have a fixed number of workspaces. + (exwm-workspace--switch-map) + (exwm-workspace--switch-map-nth-prefix) + (exwm-workspace--switch-map-select-nth): Improve support for + selecting workspaces with multiple-digit positions (e.g. workspace + number 12). + (exwm-workspace--add-frame-as-workspace, exwm-workspace--init): + Remove limit on number of workspaces. + (exwm-workspace--init): Stop creating workspaces at startup. + * exwm-config.el (exwm-config-default): Bind keys to namespaces + 0-9 in the default configuration. + +2016-07-17 Adrián Medraño Calvo + + Support adding and removing workspaces + + Frames created via `make-frame' are added to the workspace list; + `delete-frame' removes them from the list. Floating frames, + non-graphical frames, as well as those associated to different displays + are ignored. + + When deleting a workspace, care is taken to reparent that all X clients + another workspace. + + * exwm-workspace.el (exwm-workspace--add-frame-as-workspace) + (exwm-workspace--remove-frame-as-workspace): New functions that + intercept created and deleted frames and configure them as EXWM + workspaces. + (exwm-workspace--update-ewmh-props): New function to update + desktop-related EWMH properties after workspace changes. + (exwm-workspace--init): Use + `exwm-workspace--add-frame-as-workspace' to create the initial + workspaces. + +2016-07-17 Adrián Medraño Calvo + + Support moving workspaces + + * exwm-workspace.el (exwm-workspace-move-workspace): New + function + to move a workspace to a certain position. + +2016-07-17 Adrián Medraño Calvo + + Support swapping workspaces + + * exwm-workspace.el (exwm-workspace-swap-workspaces): New + function to interchange the position of two workspaces. + +2016-07-17 Adrián Medraño Calvo + + Factor out prompt for workspace + + * exwm-workspace.el (exwm-workspace--prompt-for-workspace): New + function to interactively ask the user for a workspace. + (exwm-workspace-switch, exwm-workspace-move-window): Use it. + +2016-07-17 Adrián Medraño Calvo + + Work with workspace frames instead of indices + + * exwm.el (exwm--on-ClientMessage): + * exwm-workspace.el (exwm-workspace-switch) + (exwm-workspace-move-window, exwm-workspace-switch-to-buffer): + * exwm-layout.el (exwm-layout--refresh): + * exwm-input.el (exwm-input--update-focus) + (exwm-input--on-ButtonPress): Accept frame as well as workspace + index as argument. + * exwm-workspace.el + (exwm-workspace--workspace-from-frame-or-index): New function. + +2016-07-17 Adrián Medraño Calvo + + Move defvars to the top + + * exwm-workspace.el (exwm-workspace--current) + (exwm-workspace-current-index): Do it. + +2016-07-17 Adrián Medraño Calvo + + New function exwm-workspace--workspace-p + + * exwm-workspace.el (exwm-workspace--workspace-p): New function. + * exwm-input.el (exwm-input--on-ButtonPress): + * exwm-workspace.el (exwm-workspace-switch): + * exwm-layout.el (exwm-layout--refresh): Use it. + +2016-07-17 Adrián Medraño Calvo + + Add helper for counting number of workspaces + + * exwm-workspace.el (exwm-workspace--count): New function. + * exwm-randr.el (exwm-randr--refresh): + * exwm-workspace.el (exwm-workspace--switch-map) + (exwm-workspace--update-switch-history, exwm-workspace-switch) + (exwm-workspace-move-window, exwm-workspace--init) + (exwm-workspace--post-init): Use it. + +2016-07-17 Adrián Medraño Calvo + + Add `exwm-workspace--position' helper + + * exwm-workspace.el (exwm-workspace--position): New function. + * exwm-layout.el (exwm-layout--refresh): + * exwm-input.el (exwm-input--on-ButtonPress): + * exwm-workspace.el (exwm-workspace--update-switch-history): + * exwm.el (exwm--on-ClientMessage, exwm-workspace--init): Use it. + +2016-07-17 Adrián Medraño Calvo + + Apply minibuffer in own frame configuration to created frames + + * exwm-workspace.el + (exwm-workspace--modify-all-x-frames-parameters): Helper function + to non-destructively modify `window-system-default-frame-alist'. + (exwm-workspace--init): Use above function to default all frames + to the shared minibuffer when + `exwm-workspace--minibuffer-own-frame-p' is true. + +2016-07-17 Adrián Medraño Calvo + + Add missing declarations + + * exwm-systemtray.el : + * exwm-manage.el : + * exwm-layout.el : + * exwm-input.el : + * exwm-floating.el : + * exwm-core.el : Add missing function declarations. + +2016-07-17 Adrián Medraño Calvo + + Minor cleanup + + * exwm-workspace.el (exwm-workspace--update-workareas): Use + `make-list' instead of looping. + + 2016-07-16 Adrián Medraño Calvo + +2016-07-17 Chris Feng + + Add major mode menu + + * exwm-core.el (exwm--keyboard-grabbed): New buffer-local variable for + recoding grabbing state. + (exwm-mode-menu, exwm-mode-map): Add major mode menu. + * exwm-input.el (exwm-input-set-key): Update prefix keys when a global + binding is interactively set. + (exwm-input-grab-keyboard, exwm-input-release-keyboard): Update grabbing + state. + +2016-07-16 Chris Feng + + Add RandR support for docks and reuse workareas + + * exwm-workspace (exwm-workspace--update-struts): Add RandR support for + docks. + + * exwm-workspace (exwm-workspace--workareas): New variable for storing + workareas. + (exwm-workspace--update-workareas): Update workareas and set + _NET_WORKAREA (replaces `exwm-workspace--set-workareas'). + (exwm-workspace--set-fullscreen): Reuse workareas for resizing and drop + optional arguments. + (exwm-workspace--resize-minibuffer-frame) + (exwm-workspace--on-ConfigureNotify): Reuse workareas for + resizing/reposition the (optional) dedicated minibuffer frame. + + * exwm-layout.el (exwm-layout-set-fullscreen): Do not use + `exwm-workspace--set-fullscreen' here. + + * exwm-manage.el (exwm-manage--unmanage-window): + * exwm-randr.el (exwm-randr--refresh): + * exwm.el (exwm--update-struts-legacy, exwm--update-struts-partial): + Update workareas before resizing workspaces. + + * exwm.el (exwm--update-struts-legacy, exwm--update-struts-partial): + Remove the corresponding record on receiving invalid struts. + + * exwm-workspace.el (exwm-workspace--get-geometry): New utility function + for retrieving workspace geometry. + +2016-07-15 Chris Feng + + Add multi-dock support and fix fullscreen issues with dock + + * exwm.el (exwm--update-strut-legacy, exwm--update-strut-partial) + (exwm--update-strut): Rename (strut => struts). + + * exwm-manage.el (exwm-manage--manage-window): Listen for + UnmapNotify/DestroyNotify events of docks to stop tracking them. + (exwm-manage--unmanage-window): Remove dock from tracking list when it's + unmapped/destroyed. + * exwm-workspace.el (exwm-workspace--id-struts-alist): New variable for + tracking docks. + (exwm-workspace--struts): Now it stores merged struts. + (exwm-workspace--update-struts): New function for doing the 'merge'. + * exwm.el (exwm--update-struts-legacy, exwm--update-struts-partial): Now + update struts for multiple docks. + + * exwm-layout.el (exwm-layout-set-fullscreen) + (exwm-layout-unset-fullscreen): + * exwm-manage.el (exwm-manage--unmanage-window): Fix fullscreen mode + with dock. + * exwm-workspace.el (exwm-workspace--set-fullscreen): Add optional + arguments for ignoring struts / resizing container only. + (exwm-workspace-switch): Restack workspace/docks appropriately. + +2016-07-15 Chris Feng + + Fix a `unread-command-events' issue for Emacs 24 + + * exwm-input.el (exwm-input--unread-event) + (exwm-input--on-KeyPress-line-mode): Use `unread-command-events' + differently on Emacs 24 and 25. + +2016-07-14 Chris Feng + + Fix various stability issues + + * exwm-input.el (exwm-input--on-KeyPress-line-mode) + (exwm-input--on-KeyPress-char-mode): Append events at the tail. + + * exwm-manage.el (exwm-manage--unmanage-window): Remove the + _NET_WM_DESKTOP property when an X window is withdrawn. + + * exwm-systemtray.el (exwm-systemtray--init): + * exwm-workspace.el (exwm-workspace--confirm-kill-emacs): Issue warning + rather than error when there's an existing tray running. + + * exwm.el (exwm--on-ClientMessage): The buffer window can be on a + floating frame. + +2016-07-13 Chris Feng + + Add/improve some ICCCM/EWMH features + + * exwm-floating.el (exwm-floating--set-allowed-actions) + (exwm-floating--set-floating, exwm-floating--unset-floating): Add + _NET_WM_ALLOWED_ACTIONS support. + + * exwm-floating.el (exwm-floating--set-floating) + (exwm-floating--unset-floating): Support initial state hint. + * exwm.el (exwm--update-hints): Fetch initial state. + (exwm--update-state, exwm--on-PropertyNotify): WM_STATE is not intended + to be read. + * exwm-core.el (exwm-state): + * exwm-floating.el (exwm-floating-hide): + * exwm-input.el (exwm-input--update-focus): + * exwm-layout.el (exwm-layout--set-state) + (exwm-layout--iconic-state-p, exwm-layout--show, exwm-layout--hide): + * exwm-manage.el (exwm-manage--on-MapRequest): Improve WM_STATE support. + + * exwm-input.el (exwm-input--set-focus): + * exwm-input.el (exwm-input--update-focus) + (exwm-input--set-active-window): + * exwm.el (exwm--on-ClientMessage): Add _NET_ACTIVE_WINDOW support. + + * exwm-layout.el (exwm-layout--set-client-list-stacking): Improve + _NET_CLIENT_LIST_STACKING support. + + * exwm-manage.el (exwm-manage--set-client-list) + (exwm-manage--manage-window, exwm-manage--unmanage-window): Improve + _NET_CLIENT_LIST support. + + * exwm-manage.el (exwm-manage--manage-window): + * exwm-workspace.el (exwm-workspace--set-desktop) + (exwm-workspace-move-window): + * exwm.el (exwm--on-ClientMessage): Add _NET_WM_DESKTOP support. + + * exwm-randr.el (exwm-randr--refresh): + * exwm-workspace.el (exwm-workspace--set-desktop-geometry) + (exwm-workspace--init): Add _NET_DESKTOP_GEOMETRY support. + + * exwm-workspace.el (exwm-workspace--set-desktop-geometry): Renamed from + `exwm-workspace--update-desktop-geometry'. + * exwm-randr.el (exwm-randr--refresh): Improve _NET_WORKAREA support. + + * exwm-workspace.el (exwm-workspace--set-fullscreen): Correct variables + names. + + * exwm-workspace.el (exwm-workspace--init): + * exwm.el (exwm--init-icccm-ewmh): Set _NET_NUMBER_OF_DESKTOPS in + workspace module. + + * exwm-workspace.el (exwm-workspace--init): + * exwm.el (exwm--init-icccm-ewmh): Set _NET_DESKTOP_VIEWPORT in + workspace module. + + * exwm.el (exwm--on-ClientMessage): Improve _NET_CURRENT_DESKTOP + support. + + * exwm.el (exwm--on-ClientMessage): Add _NET_CLOSE_WINDOW support. + + * exwm.el (exwm--on-ClientMessage): Add WM_CHANGE_STATE support. + + * exwm.el (exwm--init-icccm-ewmh): Update supported atoms. + +2016-07-12 Chris Feng + + * exwm-input.el (exwm-input--on-KeyPress-char-mode): No need to force + events to be added to `this-command-keys' (and it causes problems). + +2016-07-12 Chris Feng + + Add initial support for dock (panel) applications + + * exwm-layout.el (exwm-layout--fullscreen-frame-count) + (exwm-layout--set-frame-fullscreen): Moved to workspace module. + * exwm-workspace.el (exwm-workspace--fullscreen-frame-count) + (exwm-workspace--set-fullscreen): Moved from layout module. + + * exwm-manage.el (exwm-manage--manage-window): Update struts for dock + applications. + * exwm-workspace.el (exwm-workspace--strut) + (exwm-workspace--strut-is-partial): New variables for storing struts. + (exwm-workspace--resize-minibuffer-frame) + (exwm-workspace--on-ConfigureNotify): Take struts into consideration. + * exwm.el (exwm--update-strut-legacy, exwm--update-strut-partial) + (exwm--update-strut): New functions for updating _NET_WM_STRUT or + _NET_WM_STRUT_PARTIAL. + (exwm--on-PropertyNotify): Update struts on corresponding event. + (exwm--init-icccm-ewmh): Declare _NET_WM_STRUT and _NET_WM_STRUT_PARTIAL + as supported. + + * exwm-workspace.el (exwm-workspace--update-workareas): Dedicated + function for updating _NET_WORKAREA. + * exwm-randr.el (exwm-randr--refresh): + * exwm-workspace.el (exwm-workspace--init): Use + `exwm-workspace--update-workareas'. + * exwm.el (exwm--init-icccm-ewmh): Do not set _NET_WORKAREA here. + +2016-07-12 Chris Feng + + * exwm-workspace.el (exwm-workspace--init): Remove possible internal + borders of workspace frames. + +2016-07-12 Chris Feng + + Fix a bug of simulation keys + + * exwm-input.el (exwm-input--on-KeyPress-line-mode) + (exwm-input--on-KeyPress-char-mode): Force events to be added to + `this-command-keys'. + (exwm-input-send-next-key): The read event can now be (t . EVENT). + +2016-06-17 Chris Feng + + Allow buffer-local simulation keys + + * exwm-input.el (exwm-input-set-local-simulation-keys): New function for + setting buffer-local simulation keys. + (exwm-input--local-simulation-keys): New internal variable. + (exwm-input--update-simulation-prefix-keys): Modify either + `exwm-mode-map' or the local keymap accordingly. + +2016-06-17 Chris Feng + + * exwm-layout.el (exwm-layout--show): Resize the X window if the + minibuffer is active but with line height 1. + +2016-05-25 Chris Feng + + Bump version to 0.5 + +2016-05-24 Chris Feng + + * exwm-input.el (exwm-input--update-focus): Do not update input focus + when there's an active minibjffer + +2016-05-24 Chris Feng + + Manage a certain type of undecorated X windows + + * exwm-core.el (exwm--mwm-hints): Removed. + (exwm--mwm-hints-decorations): New buffer-local variable for indicating + whether the X window should have decorations. + * exwm-floating.el (exwm-floating--set-floating): Hide the mode-line of + undecorated floating X windows by default. + * exwm-manage.el (exwm-manage--update-mwm-hints): Set + exwm--mwm-hints-decorations; + (exwm-manage--manage-window): Manage an undecorated X window if its + input model is not 'No Input' or 'Globally Active'. + +2016-05-23 Chris Feng + + Add cleanup codes for Emacs daemon + + * exwm-floating.el (exwm-floating--exit): + * exwm-input.el (exwm-input--exit): + * exwm-layout.el (exwm-layout--exit): + * exwm-manage.el (exwm-manage--exit): + * exwm-randr.el (exwm-randr--exit): + * exwm-systemtray.el (exwm-systemtray--exit): + * exwm-workspace.el (exwm-workspace--exit): New functions for cleanup + each module. + + * exwm-input.el (exwm-input--on-pre-command, + exwm-input--on-post-command) + (exwm-input--init): Name lambda functions. + + * exwm-layout.el (exwm-layout--timer, exwm-layout--init): Save timer. + + * exwm-randr.el (exwm-randr-enable): Register the cleanup function. + + * exwm-systemtray.el (exwm-systemtray--init): Force refresh atoms in + XEMBED and system tray protocols. + (exwm-systemtray-enable): Register the cleanup function. + + * exwm-workspace.el (exwm-workspace--client): Save the server process. + (exwm-workspace--confirm-kill-emacs): Add emacsclient-specific cleanup + codes. + (exwm-workspace--timer): Save the timer. + (exwm-workspace--init): Save the server process and timer; fix problems + with emacsclient frames. + + * exwm.el (exwm-init): Always select the newly created frame; force + refresh ICCCM & EWMH atoms. + (exwm-exit-hook): New hook for holding cleanup codes. + (exwm--exit): Run `exwm-exit-hook', execute cleanup codes for each + module and reset the environment. + +2016-05-21 Chris Feng + + Always add `exwm-workspace--on-focus-in' + + * exwm-workspace.el (exwm-workspace--init): + `exwm-workspace--on-focus-in' should always be added to `focus-in-hook'. + +2016-05-13 Chris Feng + + Use `xcb:connect' instead of `xcb:connect-to-socket' + + * exwm.el (exwm-init): + * exwm-systemtray.el (exwm-systemtray--init): Use `xcb:connect' instead + of `xcb:connect-to-socket'. + +2016-04-21 Chris Feng + + Announce manager selection with client message + + * exwm-systemtray.el (exwm-systemtray--init): Send a client message to + announce the manager selection. + (xcb:systemtray:-ClientMessage): The client message. + +2016-04-21 Chris Feng + + Properly place undecorated X windows + + * exwm-manage.el (exwm-manage--manage-window): Convert absolute position + of undecorated X windows. + +2016-04-07 Chris Feng + + Fix 2 multi-monitor issues + + * exwm-workspace.el (exwm-workspace--on-focus-in, exwm-workspace--init): + Handle unexpected frame switch in `focus-in-hook'. + + * exwm-floating.el (exwm-floating--set-floating): If the absolute + position is (0, 0) then the relative position is also the same. + +2016-04-03 Chris Feng + + Some commands should be called interactively + + * exwm-layout.el (exwm-layout-set-fullscreen, + exwm-layout-unset-fullscreen) + (exwm-layout-show-mode-line): + * exwm.el (exwm-reset): Call `exwm-input-grab-keyboard' and + `exwm-input-release-keyboard' interactively. + +2016-03-25 Chris Feng + + Fix emacsclient issues + + * exwm-layout.el (exwm-layout--on-minibuffer-setup) + (exwm-layout--on-echo-area-change): + * exwm-workspace.el (exwm-workspace--on-minibuffer-setup) + (exwm-workspace--on-minibuffer-exit, exwm-workspace--on-echo-area-dirty) + (exwm-workspace--on-echo-area-clear): Exclude non-graphical frames. + + * exwm.el (exwm--server-eval-at): Avoid using `x-dispaly-name'. + +2016-03-19 Adrián Medraño Calvo + + Restore a sensible buffer when replacing EXWM buffers + + * exwm-layout.el (exwm-layout--other-buffer-exclude-exwm-mode-buffers) + (exwm-layout--other-buffer-exclude-buffers): New variables. + (exwm-layout--other-buffer-predicate): Allow excluding EXWM buffers or + buffers from a given set. + (exwm-layout--refresh): Replace EXWM buffers with sensible buffers + depending on the situation. When in non-workspace/non-floating frames, + with some non-EXWM buffer; when the EXWM buffer is displayed elsewhere, + some buffer previously displayed in that window (making sure it has been + recently covered). + +2016-03-19 Adrián Medraño Calvo + + Use `other-buffer' instead of "*scratch*" + + * exwm-workspace.el (exwm-workspace-move-window): Display + `other-buffer' instead of "*scratch*" in the window whose buffer has + been made floating. + +2016-03-19 Adrián Medraño Calvo + + Use `buffer-predicate' frame parameter to prevent switching to visible + EXWM buffers + + * exwm-layout.el (exwm-layout--other-buffer-predicate): New function to + be set as `buffer-predicate' frame parameter. + * exwm-workspace.el (exwm-workspace--init): Use above function on + workspace frames. + +2016-03-19 Adrián Medraño Calvo + + Set the correct buffer before checking the `major-mode' + + * exwm-layout.el (exwm-layout--refresh): Make sure we test the + `major-mode' of the first buffer of the floating frame. + +2016-03-19 Adrián Medraño Calvo + + Minor cleanup + + * exwm-layout.el (exwm-layout--refresh): Reuse car. + +2016-03-16 Chris Feng + + Exclude unmanaged floating X windows when refreshing + + * exwm-layout.el (exwm-layout--refresh): Do not show unmanaged floating + X windows. + +2016-03-11 Chris Feng + + Neglect trivial resizing requests + + * exwm-manage.el (exwm-manage--on-ConfigureRequest): Neglect trivial + resizing requests since that cannot be done precisely. + +2016-03-08 Chris Feng + + Use `cl-case' instead of `case' + +2016-03-07 Adrián Medraño Calvo + + Change input mode of window being clicked + + When clicking a mode-line of other window to switch the EXWM input mode, + `window-buffer' does not return the window whose mode-line has been + clicked, but the current one. This change ensures that the right window + has its input mode and mode-line updated. + + * exwm-input.el (exwm-input--update-mode-line): Factor out setting + `mode-line-process'. + (exwm-input--grab-keyboard, exwm-input--release-keyboard) + (exwm-input-grab-keyboard, exwm-input-release-keyboard): Make sure the + buffer of the window being clicked has its input mode updated. + +2016-03-07 Chris Feng + + Restack fullscreen X windows + + * exwm-layout.el (exwm-layout-set-fullscreen) + (exwm-layout-unset-fullscreen): Raise and lower fullscreen X windows + respectively. + +2016-03-06 Chris Feng + + Allow floating X windows to resize themselves + + * exwm-manage.el (exwm-manage--on-ConfigureRequest): Allow + (non-fullscreen) floating X windows to resize themselves. + +2016-03-06 Chris Feng + + Untabify + +2016-03-04 Chris Feng + + Allow moving/resizing undecorated X windows + + * exwm-manage.el (exwm-manage--manage-window): Do not manage undecorated + floating X windows (set in _MOTIF_WM_HINTS). + + * exwm-floating.el (exwm-floating--start-moveresize) + (exwm-floating--stop-moveresize, exwm-floating--do-moveresize): Allow + moving/resizing undecorated X windows with _NET_WM_MOVERESIZE client + message. + +2016-03-03 Chris Feng + + Handle buffer change after a buffer is killed + + * exwm-manage.el (exwm-manage--kill-buffer-query-function): Handle + buffer change. + + * exwm-workspace.el (exwm-workspace--show-minibuffer): Revert the change + made in 93e42136 (the problem has not been fully resolved). + +2016-03-01 Chris Feng + + Avoid unnecessary input focus changes in line-mode + + * exwm-input.el (exwm-input--grab-keyboard, + exwm-input--release-keyboard): Grab keys on X windows instead to prevent + unexpected input focus changes. + + * exwm-workspace.el (exwm-workspace--show-minibuffer): The workaround + for cursor flickering issue is no more needed. + +2016-02-28 Chris Feng + + Simplify `exwm-workspace--display-buffer' + + * exwm-workspace.el (exwm-workspace--display-buffer): Make it simpler + and more reliable. + +2016-02-26 Chris Feng + + Do not wait for WM_STATE property events + + * exwm-layout.el (exwm-layout--show, exwm-layout--hide): Save the state + directly. + +2016-02-26 Chris Feng + + Minor fixes for layout and workspace + + * exwm-layout.el (exwm-layout-show-mode-line): Force update mode-line. + + * exwm-workspace.el (exwm-workspace--update-minibuffer): Treat nil as + empty string. + +2016-02-25 Chris Feng + + Fix exwm-workspace-switch-to-buffer + + * exwm-workspace.el (exwm-workspace-switch-to-buffer): Select the + floating frame when switching to a floating X window buffer. + +2016-02-25 Chris Feng + + Bump version to 0.4 + +2016-02-25 Chris Feng + + Allow user to hide floating X windows + + * exwm-core.el (exwm-mode-map): Add a new key to hide floating X + windows. + * exwm-floating.el (exwm-floating-hide): New command to hide a floating + X window. + + * exwm-workspace.el: Fix a compile warning. + +2016-02-24 Chris Feng + + Refresh the workspace after creating a floating X window + + * exwm-floating.el (exwm-floating--set-floating): Refresh the workspace + (since auto-refresh was disabled). + +2016-02-24 Chris Feng + + Fix issues with moving X windows between workspaces + + * exwm-workspace.el (exwm-workspace-move-window): Select the moved + floating X window. Update the 'exwm-selected-window' frame parameter. + (exwm-workspace-switch): Check 'exwm-selected-window' for dead windows. + (exwm-workspace-switch-to-buffer): Allow non-interactive call. + +2016-02-23 Chris Feng + + Make input focus revert to pointer root + + * exwm-input.el (exwm-input--set-focus): Input focus should not revert + to parent (which was the Emacs frame) any more. + +2016-02-22 Chris Feng + + Bump version to 0.3 + +2016-02-21 Chris Feng + + Fix emacsclient related issues + + * exwm-systemtray.el (exwm-systemtray-height): The value is not + available when emacsclient has just loaded the library (and it crashes + emacsclient). + + * exwm-workspace.el (exwm-workspace--init): Set + `default-minibuffer-frame' later to prevent it from being modified when + using emacsclient. + + * exwm-floating.el: + * exwm-randr.el: + * exwm-systemtray.el: + * exwm-workspace.el: + * exwm.el: Use `exwm-workspace--minibuffer-own-frame-p' instead of the + raw variable. + +2016-02-21 Chris Feng + + Various fixes for floating X windows + + * exwm-floating.el (exwm-floating--set-floating): Always create floating + X windows on current workspace. + + * exwm-workspace.el (exwm-workspace-switch): Restore selected floating + frames. + + * exwm-workspace.el (exwm-workspace-move-window): Restore the position + of floating X windows. Recreate floating frames when using fixed + minibuffer. Restack tiling X windows. + +2016-02-21 Chris Feng + + Fix the advice function for ido-buffer-window-other-frame + + * exwm-config.el (exwm-config--ido-buffer-window-other-frame) + (exwm-config--fix/ido-buffer-window-other-frame): Do not use advice. Fix + issues when switching form/to floating frames. + +2016-02-20 Chris Feng + + Prevent Emacs frames from restacking themselves + + Putting Emacs frames (workspace frames, floating frames) into dedicated + containers greatly simplifies the stacking order management and totally + fixes relevant issues. + + * exwm-floating.el (exwm-floating--set-floating): Create floating frame + container. Remove redundant stacking order modification code. + (exwm-floating--unset-floating): Destroy the floating frame container. + No need to reparent the X window container. + (exwm-floating--do-moveresize): Resize the floating frame container. + * exwm-input.el (exwm-input--update-focus): No need to restack frames. + * exwm-layout.el (exwm-layout--show, exwm-layout--set-frame-fullscreen) + (exwm-layout-enlarge-window): Resize the floating frame container. + * exwm-manage.el (exwm-manage--on-ConfigureRequest): Re-enable stacking + order modification on ConfigureRequest. + + * exwm-workspace.el (exwm-workspace--confirm-kill-emacs): Reparent out + all frames on exit. No need to remove selected events or created + resources. + (exwm-workspace--init): Create workspace frame containers. + + * exwm-layout.el (exwm-layout-set-fullscreen): + * exwm-manage.el (exwm-manage--unmanage-window): Remove a redundant call + to + `xcb:flush'. + + * exwm-manage.el (exwm-manage--unmanage-window): Force unmap the X + window. Unmap the floating frame before reparent it. + +2016-02-20 Chris Feng + + Prevent/Reduce flickering issues with floating X windows + + * exwm-floating.el (exwm-floating--set-floating) + (exwm-floating--unset-floating): Prevent flickering when + creating/removing a floating X window. + * exwm-layout.el (exwm-layout--show): Show X windows after resizing to + prevent flickering. + * exwm-manage.el (exwm-manage--unmanage-window): Reduce flickering by + hiding the container. + (exwm-manage--kill-buffer-query-function): Prevent flickering by hiding + the container (except that the X window destroys itself after receiving + the WM_DELETE_WINDOW client message). + +2016-02-20 Chris Feng + + Redefine mode-specific keys + + * exwm-core.el (exwm-mode-map): Redefine mode-specific keys to comply + with the key binding conventions. + +2016-02-19 Chris Feng + + Minor fixes for system tray + + * exwm-systemtray.el (exwm-systemtray--embed): Default to visible if the + XEMBED_MAPPED flag is not set. + (exwm-systemtray--on-ClientMessage): Only embed new icons. Ignore + balloon messages. + +2016-02-19 Chris Feng + + Fix system tray issues after updating workspaces + + * exwm-workspace.el (exwm-workspace-switch-hook): New hook run by + `exwm-workspace-switch'. + * exwm-randr.el (exwm-randr-refresh-hook): New hook run by + `exwm-randr--refresh'. + * exwm-systemtray.el (exwm-systemtray--on-randr-refresh) + (exwm-systemtray--on-workspace-switch, exwm-systemtray--init): Update + the system tray in `exwm-randr-refresh-hook' and + `exwm-workspace-switch-hook'. + + * exwm-layout.el (exwm-layout--set-frame-fullscreen): + * exwm-workspace.el (exwm-workspace--post-init): Wait until all + workspace frames are set fullscreen. + + * exwm-workspace.el (exwm-workspace--current-width) + (exwm-workspace--current-height): New functions for retrieving the width + and height of the current workspace. + * exwm-layout.el (exwm-layout-set-fullscreen): + * exwm-manage.el (exwm-manage--manage-window) + (exwm-manage--on-ConfigureRequest): + * exwm-systemtray.el (exwm-systemtray--refresh, exwm-systemtray--init): + * exwm-workspace.le (exwm-workspace--resize-minibuffer-frame) + (exwm-workspace--on-ConfigureNotify): Switch to + `exwm-workspace--current-width' and `exwm-workspace--current-height'. + + * exwm-core.el: + * exwm-floating.el: + * exwm-floating.el: + * exwm-input.el: + * exwm-layout.el: + * exwm-manage.el: + * exwm-randr.el: + * exwm-systemtray.el: + * exwm-workspace.el: + * exwm.el: Clean up loading file. Set/Unset some functions as commands. + + * README.md: Add intro to system tray. + +2016-02-19 Chris Feng + + Add system tray support + + * exwm-systemtray.el: New module adds a simple system tray (using the + X11 System Tray protocol). + + * exwm-workspace.el (exwm-workspace-switch-hook, exwm-workspace-switch): + New hook run after switching workspace. + +2016-02-18 Chris Feng + + Fix floating X window bugs introduced by 9c95c03e + + * exwm-floating.el (exwm-floating--set-floating): Make floating frames + invisible before resizing them. + (exwm-floating--fit-frame-to-window): Removed since unused. + * exwm-layout.el (exwm-layout-hide-mode-line, + exwm-layout-show-mode-line): Use set frame height instead of + exwm-floating--fit-frame-to-window. + + * exwm-core.el (exwm-mode): Replace `exwm-manage--close-window' with + `exwm-manage--kill-buffer-query-function'. + * exwm-floating.el (exwm-floating--unset-floating): Reparent out + floating frames. + * exwm-manage.el (exwm-manage--unmanage-window): Reparent out floating + frames. Hide floating frames. + (exwm-manage--close-window, exwm-manage--kill-buffer-query-function): + Rename `exwm-manage--close-window' since it's only used in + `kill-buffer-query-functions'. Reparent out floating frames. + +2016-02-12 Chris Feng + + Bump version to 0.2 + +2016-02-12 Chris Feng + + Postpone making workspace frames fullscreen + + * exwm-workspace.el (exwm-workspace--init, exwm-workspace--post-init): + Move work to postpone to the new function `exwm-workspace--post-init'. + + * exwm.el (exwm-init): Call `exwm-workspace--post-init' after + `exwm--unlock`. + +2016-02-09 Chris Feng + + Fix bugs on managing/unmanaging X windows + + * exwm-manage.el (exwm-manage--scan): Unmap X windows before managing + them. + + (exwm-manage--on-UnmapNotify): Do not ignore synthetic UnmapNotify + events + (according to ICCCM). Do not use the `from-configure' slot which was + mistakenly introduced due to the bug in `exwm-manage--scan'. + + * exwm-workspace.el (exwm-workspace--confirm-kill-emacs): Do more + cleanups. + +2016-02-07 Chris Feng + + Eliminate compilation warnings + +2016-02-07 Chris Feng + + Unmanage X windows on exit + + * exwm-workspace.el (exwm-workspace--confirm-kill-emacs): New function + called on exit to unmanage X windows. + (exwm-workspace--init): Set `confirm-kill-emacs' to + `exwm-workspace--confirm-kill-emacs'. + + * exwm-manage.el (exwm-manage--on-UnmapNotify): Ignore UnmapNotify event + generated as a result of parent being resized. + +2016-02-07 Chris Feng + + Add some useful key bindings + + * exwm-core.el (exwm--floating-mode-line-format, exwm--mode-line-format) + (exwm-mode-map): + * exwm-floating.el (exwm-floating-hide-mode-line) + (exwm-floating-show-mode-line): + * exwm-layout.el (exwm-layout-hide-mode-line, + exwm-layout-show-mode-line) + (exwm-layout-toggle-mode-line): Allow hide/show mode-line for all + `exwm-mode' buffers with 'C-c M'. + + * exwm-config.el (exwm-config-default): Add simulation keys for 'C-d' + and + 'C-k'. + +2016-02-07 Chris Feng + + Remove an assertion + + * exwm-randr.el (exwm-randr--refresh): There can be no valid output + sometimes. + +2016-02-06 Felix Lange + + Resize minibuffer only when it's in its own frame + + 0e4055d3392 introduced a few calls to exwm-workspace--resize-minibuffer + in various places. This function only works when the minibuffer is + displayed in its own frame but was called unconditionally in some cases. + + Fix it by wrapping all calls in an appropriate conditional and add an + assertion. Also rename the function so it is clearer that it resizes a + frame, which might prevent calling it unconditionally in the future. + +2016-02-06 Chris Feng + + Improve bc80eefe + + * exwm-layout.el (exwm-layout--set-frame-fullscreen): + * exwm-randr.el (exwm-randr--refresh): + * exwm-workspace.el (exwm-workspace--resize-minibuffer): + (exwm-workspace-switch): + * exwm.el (exwm--on-ClientMessage): Calling `exwm-workspace-switch' in + bc80eefe does not work correctly sometimes. This commit improves it by + directly specify the geometry info rather than getting it from Emacs + frame. + +2016-02-06 Chris Feng + + Fix multi-monitor/fullscreen issues + + * exwm-randr.el (exwm-randr--refresh): Correct the _NET_WORKAREA + property. Reconfigure the current workspace when screen changes. + (exwm-randr--init): Run `exwm-randr-screen-change-hook' to take into + account already attached monitor(s), + + * exwm.el (exwm--on-ClientMessage): Reconfigure the current workspace + when it's fullscreen. + +2016-02-06 Chris Feng + + Add auto-hiding minibuffer support + + * exwm-floating.el (exwm-floating--set-floating): Take auto-hiding + minibuffer into account when calculating available height. + (exwm-floating--unset-floating): Restack the container to avoid further + restacking. + * exwm-input.el (exwm-input--update-focus): Use more accurate + restacking. + (exwm-input--on-minibuffer-setup): Replaced by + `exwm-layout--on-minibuffer-setup' and + `exwm-workspace--on-minibuffer-setup'. + (exwm-input-command-whitelist, exwm-input--during-command) + (exwm-input--on-KeyPress-line-mode): The functionality of + `exwm-input-command-whitelist' is replaced by + `exwm-input--during-command', which can automatically tell whether + functions like `read-event' are being called. + (exwm-input--init): Add/remove corresponding hooks. + * exwm-layout.el (exwm-layout--on-minibuffer-setup): Also set input + focus. + (exwm-layout--on-echo-area-change): New function for refreshing layout + when the size of echo area changes. + (exwm-layout--init): Track size changes for fixed minibuffer and echo + area. + * exwm-manage.el (exwm-manage--on-ConfigureRequest): Never grant + restacking requests initiated by other clients. + * exwm-workspace.el (exwm-workspace--minibuffer): New variable for the + auto-hiding minibuffer. + (exwm-workspace-minibuffer-position): For setting the position of the + auto-hiding minibuffer. + (exwm-workspace-display-echo-area-timeout): Seconds before echo area + auto-hides. + (exwm-workspace--display-echo-area-timer): The corresponding timer. + (exwm-workspace-switch): Configure the auto-hiding minibuffer when + switching workspace. + (exwm-workspace--update-minibuffer): New function for adjusting the + height of the auto-hiding minibuffer. + (exwm-workspace--on-ConfigureNotify): New function for configuring the + container of the auto-hiding minibuffer. + (exwm-workspace--display-buffer): New function for forcing + `minibuffer-completion-help' to use the workspace frame. + (exwm-workspace--show-minibuffer, exwm-workspace--hide-minibuffer): New + functions for showing/hiding the auto-hiding minibuffer (container). + (exwm-workspace--on-minibuffer-setup, + exwm-workspace--on-minibuffer-exit): New functions called when the + auto-hiding minibuffer entered/exists. + (exwm-workspace--on-echo-area-dirty, + exwm-workspace--on-echo-area-clear): New functions when the auto-hiding + echo area is ready to show/hide. + (exwm-workspace--init): Set up the auto-hiding minibuffer and workspace + frames. Track sizes changes for auto-hiding minibuffer and echo area. + No need to set OverrideRedirect on workspace frames. + * exwm.el (exwm--init-icccm-ewmh): Correct the value of _NET_WORKAREA. + +2016-02-03 Chris Feng + + Merge branch 'feat/virtual-root' + +2016-02-03 Chris Feng + + Avoid unnecessary changes of stacking order + + * exwm-input.el (exwm-input--update-focus): Only restack a tiling X + window when it's not the last but one sibling. This should reduce + flickering. + +2016-02-03 Chris Feng + + Rework the X windows hierarchy model + + This commit add workspace and X window containers support to avoid using + Emacs frames as the parents of X windows. This should make it easier to + set input focus. + + * exwm-core.el (exwm--container, exwm--floating-frame-position): New + file local variables. + (exwm--floating-frame-geometry): Removed file local variable. + * exwm-floating.el (exwm-floating--set-floating) + (exwm-floating--unset-floating, exwm-floating--do-moveresize) + (exwm-floating-move): Use container. + (exwm-floating--fit-frame-to-window): No longer adjust stacking order. + (exwm-floating--fit-frame-to-window): The first member is changed to + buffer. + (exwm-floating--start-moveresize): Use container. Correctly set input + focus. + * exwm-input.el (exwm-input--redirected, exwm-input--on-focus-in): + Removed. + (exwm-input--on-buffer-list-update): Remove the restriction on floating + frames which is no longer valid. + (exwm-input--update-focus): Adjust stacking order. + (exwm-input--on-minibuffer-setup): New function for setting focus on the + Emacs frame when entering minibuffer. + (exwm-input--on-KeyPress-line-mode): No longer compensate FocusOut + event. + (exwm-input--grab-keyboard, exwm-input--release-keyboard): Local keys + are now grabbed on the X window container. + (exwm-input--init): Add `exwm-input--on-minibuffer-setup' to + `minibuffer-setup-hook'. + * exwm-layout.el (exwm-layout--resize-container): New function to + resize/reposition both the X window and its container. + (exwm-layout--show, exwm-layout--hide): Use container. + (exwm-layout-set-fullscreen): Use container. No longer save width and + height. + (exwm-layout-unset-fullscreen, exwm-layout--set-frame-fullscreen): Use + container. + (exwm-layout--refresh): Update a frame parameter. Remove dead code. + * exwm-manage.el (exwm-manage--manage-window): Reparent unmanaged X + windows to the workspace. Create X window container as the parent of + the X window. + (exwm-manage--unmanage-window): Unmap/destroy container when + appropriate. Use the position of container. + (exwm-manage--unmanage-window): Destroy the container. + * exwm-randr.el (exwm-randr--refresh): Resize workspace using container. + * exwm-workspace.el (exwm-workspace-switch): Raise workspace. Correctly + set input focus. + (exwm-workspace--on-focus-in): Removed. + (exwm-workspace-move-window): Reparent to workspace container. + (exwm-workspace--init): Create workspace frames as visible. Create + workspace containers. Remove exwm-workspace--on-focus-in from + focus-in-hook. Update _NET_VIRTUAL_ROOTS. + * exwm.el (exwm-init): No longer disable hourglass window. Initialize + workspace module before input. + + * exwm-core.el (exwm--debug): New macro for setting debug forms. + + * exwm-floating.el (exwm-floating--set-floating): No longer do + `exwm--lock' and `exwm--unlock' since `make-frame' is already adviced to + take care of everything. Correctly set input focus to the newly created + floating X window. + + * exwm-core.el (exwm--floating-edges): Removed file local variable. + * exwm-floating.el (exwm-floating--set-floating) + (exwm-floating--unset-floating): + * exwm-layout.el (exwm-layout--show, exwm-layout-enlarge-window): + * exwm-manage.el (exwm-manage--on-ConfigureRequest): No longer use + floating geometry. + + * exwm-input.el (exwm-input--update-global-prefix-keys): Grab global + keys on workspaces containers instead of the root window (or input focus + would transfer to the workspace containing the pointer when the grab is + active). + * exwm-workspace.el (exwm-workspace-switch): No longer move mouse. + +2016-02-02 Chris Feng + + Update copyright year to 2016 + +2015-12-13 Chris Feng + + Remove the MappingNotify event listener + + * exwm-input.el (exwm-input--on-MappingNotify, exwm-input--init): Remove + the event listener for MappingNotify event (it should be handled in the + underling library instead). + +2015-12-11 Chris Feng + + Add support for desktop and dock + + * exwm-manage.el (exwm-manage--manage-window): Add support for + _NET_WM_WINDOW_TYPE_DESKTOP and _NET_WM_WINDOW_TYPE_DOCK (they are not + reparented). + +2015-11-15 W. Greenhouse + + Limit X host-based auth permissions. + + We don't need more than the currently logged in user to have access to + the X session, so don't grant X host access to other users. + +2015-11-10 Chris Feng + + Fix a typo + + * exwm-manage.el (exwm-manage--on-MapRequest): Correct a wrong variable + name. + +2015-11-03 Chris Feng + + Bump version to 0.1 + +2015-11-02 Chris Feng + + Disable some incompatible features + + * exwm.el (exwm-init): + exwm-config.el (exwm-config-misc): + Disable dialog boxes and hourglass pointer by default. + +2015-11-01 Chris Feng + + Add hook run when screen changes + + * exwm-randr.el (exwm-randr-screen-change-hook): New hook. + (exwm-randr--init): Run the new hook in the event handler of + ScreenChangeNotify. + +2015-10-30 Chris Feng + + Use new calling conventions of xcb:keysyms + + * exwm-input.el: Use new calling conventions of xcb:keysyms + +2015-10-29 Chris Feng + + Improve robustness of killing buffers + + * exwm-core.el (exwm-mode): Use the return value of + exwm-manage--close-window. + * exwm-manage.el (exwm-manage--close-window): Kill empty buffers; Handle + X + windows that does not support _NET_WM_PING. + (exwm-manage--kill-client): Kill X windows supporting _NET_WM_PID with + both SIGKILL and KillClient. + +2015-10-29 Chris Feng + + Avoid mapping managed X windows on MapRequest + + * exwm-manage.el (exwm-manage--manage-window, + exwm-manage--on-MapRequest): + Check managed X windows in exwm-manage--on-MapRequest instead. + +2015-10-28 Chris Feng + + Check KEYSYMs converted from events + + * exwm-input.el (exwm-input--update-global-prefix-keys) + (exwm-input--fake-key, exwm-input--init): Check the return value of + xcb:keysyms:event->keysym. + +2015-10-28 Chris Feng + + Add demo configurations + + * exwm-config.el: Demo EXWM configurations. + * xinitrc: Demo xinitrc file. + * exwm.el (exwm-enable-ido-workaround, exwm-disable-ido-workaround): + Partly + moved to exwm-config.el. + +2015-10-28 Chris Feng + + Make the creation/destruction of floating frames more silent + + * exwm-floating.el (exwm-floating--set-floating): Reparent floating + frames + as late as possible. + * exwm-manage.el (exwm-manage--unmanage-window): Hide floating frames + first + on unmanagement. + +2015-10-28 Chris Feng + + Minor input focus fix + + * exwm-input.el (exwm-input--on-buffer-list-update): Schedule input + focus + switch with idle timer. + +2015-10-27 Chris Feng + + Delay closing minibuffer + + * exwm-workspace.el (exwm-workspace-switch, + exwm-workspace--on-focus-in): + Delay closing minibuffer until Emacs is idle. This prevent nonlocal + exits + from interrupting remaining code. + +2015-10-26 Chris Feng + + Fix problems introduced/exposed by last commit + + * exwm-workspace.el (exwm-workspace-switch, + exwm-workspace--on-focus-in): + Use handle-switch-frame instead of exwm-workspace--switch-count to + filter + out events. + + * exwm-workspace.el (exwm-workspace--init): Delay making workspaces + fullscreen. + + * exwm-workspace.el (exwm-workspace-move-window): + * exwm-floating.el (exwm-floating--set-floating): + * exwm-layout.el (exwm-layout--refresh): + `set-buffer-major-mode` does not accept buffer names. + +2015-10-25 Chris Feng + + Fix workspace switch issues + + * exwm-core.el (exwm--make-emacs-idle-for): Removed. + * exwm-workspace.el (exwm-workspace--switch-count): New variable. + (exwm-workspace-switch): Increase exwm-workspace--switch-count when + necessary; Remove the call to exwm--make-emacs-idle-for. + (exwm-workspace--on-focus-in): Consume exwm-workspace--switch-count. + + * exwm-workspace.el (exwm-workspace--on-focus-in): Close active + minibuffer. + +2015-10-19 Chris Feng + + Close the (possible) active minibuffer when switching workspace + + * exwm-workspace.el (exwm-workspace-switch): An active minibuffer on + another + workspace might cause problems for input. Closing it should be + sufficient. + +2015-10-17 Chris Feng + + Allow certain commands to receive key events in line-mode + + * exwm-input.el (exwm-input-command-whitelist): New variable. + (exwm-input--on-KeyPress-line-mode): Allow certain commands which + receive + inputs without using the minibuffer to work in line-mode. + +2015-10-11 Chris Feng + + Improve robustness + + * exwm-input.el (exwm-input--update-focus, exwm-input--on-ButtonPress): + Make sure Emacs windows are alive before manipulating them. + +2015-10-10 Chris Feng + + Restrict the check of _MOTIF_WM_HINTS + + * exwm-manage.el (exwm-manage--manage-window): Restrict the check of + _MOTIF_WM_HINTS to only Java applications (since some other + applications + like Evince would also set it). + +2015-10-01 Chris Feng + + Fix a position calculation error on multi-monitor settings + + * exwm-floating.el (exwm-floating--set-floating): Always use relative + positions. + +2015-09-27 Chris Feng + + Work around subrs that block EXWM; other minor fixes + + Some subrs (e.g. x-file-dialog) create X windows and block the execution + of EXWM, so they won't work normally. This commit partly fixes this + issue by invoking them in a subordinate Emacs instance and trying to + fetch the result back. + + * exwm.el (exwm-blocking-subrs): New variable for specify such subrs. + * exwm.el (exwm-enable, exwm--server-name, exwm--server-stop) + (exwm--server-eval-at): The implementation. + + * exwm-core.el: + * exwm-floating.el: + * exwm-layout.el: + * exwm-manage.el: + * exwm-randr.el: + Evaluate constants at compile-time. + + * README.md: Renamed from README.org to make the 'Commentary:' section + used by GNU ELPA instead. + + * exwm.el: Depends on XELB version 0.3. + +2015-09-25 Chris Feng + + Fix click-to-focus on multi-monitor settings + + * exwm-input.el (exwm-input--on-ButtonPress): [click-to-focus] Switch to + the corresponding workspace if necessary. + +2015-09-24 Chris Feng + + Fix a calculation error of the position of a floating frame + + * exwm-floating.el (exwm-floating--set-floating): The position of a + floating frame should be relative to its workspace. + +2015-09-23 Chris Feng + + Adjust default prefix keys; advice x-create-frame + + * exwm-input.el (exwm-input--on-KeyPress-line-mode, + exwm-input-prefix-keys): + Allow users to disable 'C-c' prefixed keys; Add 'C-c' to / remove 'M-!' + from the default prefix keys. + + * exwm-workspace.el (exwm-workspace--x-create-frame, + exwm-workspace--init): + Advice `x-create-frame' to prevent it from hanging EXWM, making e.g. + speedbar working. + * exwm-floating.el (exwm-floating--set-floating): Remove the now + unnecessary + request that sets override-redirect on floating frames. + +2015-09-21 Chris Feng + + Minor fixes for packaging + + * .gitignore: Add ELPA files. + * exwm-workspace.el: Autoload exwm-workspace-switch. + * README.org: Renamed from README.md; add an installation note. + +2015-09-20 Chris Feng + + Fix input & input focus issues + + * exwm-manage.el (exwm-manage--manage-window): Only grab + left/middle/right + buttons. + + * exwm-input.el (exwm-input--on-ButtonPress): Only perform + click-to-focus on + unfocused X windows. + + * exwm-input.el (exwm-input--update-focus): Do not focus an X window on + another workspace, but instead keep focusing on the current one and set + exwm--urgency parameter on that frame. + + * exwm-input.el (exwm-input--fake-key): Send KeyRelease event (some + applications reply on it). + +2015-09-19 Chris Feng + + Manage non-floating windows without decorations + + * exwm-manage.el (exwm-manage--manage-window): Should manage + non-floating + windows without decorations. + +2015-09-19 Chris Feng + + Check _MOTIF_WM_HINTS when attempting to manage an X window + + * exwm-core.el: New buffer-local variable exwm--mwm-hints. + * exwm-manage.el: New variable exwm--atom-_MOTIF_WM_HINTS for holding + the + value of _MOTIF_WM_HINTS atom; new function exwm--update-mwm-hints for + updating the _MOTIF_WM_HINTS property of an X window. + * exwm-manage.el (exwm-manage--init): Intern the _MOTIF_WM_HINTS atom. + * exwm-manage.el (exwm-manage--manage-window): Avoid managing windows + without decoration (implied by _MOTIF_WM_HINTS). + +2015-09-19 Chris Feng + + Avoid autoloading variables + + * exwm-floating.el: + * exwm-layout.el: + Avoid autoloading exwm-floating-border-width. + * exwm-workspace.el: + Avoid autoloading exwm-workspace--switch-history-outdated. + +2015-09-18 Chris Feng + + Prevent Emacs cursor style change when pointer is in an X window + + * exwm-input.el (exwm-input--on-KeyPress-char-mode): Compensate FocusOut + event by sending a synthetic FocusIn event to prevent the change of + cursor + style (e.g. box to hollow) when pointer is in an X window. + +2015-09-18 Chris Feng + + Fix a compilation warning + + * exwm-floating.el: Autoload exwm-floating-border-width. + +2015-09-18 Chris Feng + + Fix wrong/missing ConfigureNotify events + + * exwm-floating.el (exwm-floating--set-floating): Set + exwm--floating-edges + as absolute edges (the relative edges can be easily determined). + * exwm-layout.el (exwm-layout--show): Send correct absolute positions to + floating X windows. + + * exwm-floating.el (exwm-floating--stop-moveresize, exwm-floating-move): + Send + ConfigureNotify events after moving floating X windows. + +2015-09-17 Chris Feng + + On-demand update exwm-workspace--switch-history + + * exwm-workspace.el (exwm-workspace--switch-history-outdated) + (exwm-workspace--update-switch-history, exwm-workspace-switch) + (exwm-workspace-move-window): + * exwm.el (exwm--update-hints, exwm--on-ClientMessage): + * exwm-floating.el (exwm-floating--set-floating): + * exwm-manage.el (exwm-manage--manage-window, + exwm-manage--unmanage-window): + Update exwm-workspace--switch-history only when it's used. + +2015-09-16 Chris Feng + + Allow showing buffers on other workspaces and moving an X window by + switching to its buffer + + * exwm-workspace.el (exwm-workspace-show-all-buffers, + exwm-workspace-switch) + (exwm-workspace-move-window, exwm-workspace-switch-to-buffer): Show + buffers + on other workspaces if `exwm-workspace-show-all-buffers' is non-nil. + + * exwm-layout.el (exwm-layout-show-all-buffers, exwm-layout--refresh): + Allow + moving an X window by switch to its corresponding buffer from another + workspace when `exwm-layout-show-all-buffers' is non-nil. + * exwm.el (exwm--ido-buffer-window-other-frame): Handle the case when + `exwm-layout-show-all-buffers' is non-nil. + + * exwm-floating.el (exwm-floating--set-floating): Handle the case when + *scratch* buffer is killed. + + * exwm-workspace.el (exwm-workspace-switch-to-buffer): Renamed from + `exwm-workspace-switch-to-window' to better reflect its role. + +2015-09-11 Chris Feng + + Fix with-slots + + * exwm-randr.el (exwm-randr--refresh): Could not set the name slot in + xcb:randr:GetOutputInfo~reply, turn to another variable. + +2015-09-11 Chris Feng + + Minor fix for window move + + * exwm-workspace.el (exwm-workspace-move-window): Move to selected + instead of + the first window of a frame (workspace). + +2015-09-11 Chris Feng + + Implement move/resize with keyboard + + * exwm-floating.el: Remove an invalid TODO item. + * exwm-floating.el (exwm-floating--set-floating) + (exwm-floating-hide-mode-line, exwm-floating-show-mode-line): Set + window-size-fixed only for fixed-size floating windows. + * exwm-floating.el (exwm-floating-move): New function for moving a + floating + window. + * exwm-layout.el (exwm-layout-enlarge-window) + (exwm-layout-enlarge-window-horizontally, exwm-layout-shrink-window) + (exwm-layout-shrink-window-horizontally): New commands for + interactively + resizing a floating window. + +2015-09-11 Chris Feng + + Allow switch to normal buffers in exwm-workspace-switch-to-window + + * exwm-workspace.el (exwm-workspace-switch-to-window): Allow switch to + normal + buffers. + +2015-09-09 Chris Feng + + Add a command to interactively move X window to the current workspace + + * exwm-workspace.el (exwm-workspace-move-window): Hide buffer on the + original + Emacs window when moving an X window to the current workspace. + * exwm-workspace.el: New function exwm-workspace-switch-to-window for + interactively moving an X window on another workspace to the current + one. + +2015-09-09 Chris Feng + + Add support for xcb:Atom:_NET_CLIENT_LIST_STACKING etc + + The _NET_CLIENT_LIST_STACKING EWMH property is essential for e.g. the + tabbar of chromium to work correctly. + + * exwm-input.el: Remove invalid TODO item. + * exwm.el (exwm--init-icccm-ewmh): Add xcb:Atom:_NET_CLIENT_LIST and + xcb:Atom:_NET_CLIENT_LIST_STACKING to _NET_SUPPORTED. + * exwm-layout.el (exwm-layout--refresh): Update + _NET_CLIENT_LIST_STACKING. + * exwm-manage.el (exwm-manage--manage-window, + exwm-manage--unmanage-window): + Update _NET_CLIENT_LIST. + +2015-09-07 Chris Feng + + Allow hide/show mode-line on floating frames + + * exwm-core.el: new buffer-local variable + exwm--floating-mode-line-format for + saving mode-line-format when mode-line is hidden + * exwm-floating.el (exwm-floating--fit-frame-to-window) + (exwm-floating-hide-mode-line, exwm-floating-show-mode-line): new + functions + for resizing frames, hiding/showing mode-line respectively; + (exwm-floating--set-floating): use exwm-floating--fit-frame-to-window + to + resize frames + +2015-09-06 Chris Feng + + Code cleanups + + * exwm-workspace.el (exwm-workspace--update-switch-history): use `aref' + instead + of `elt' to index vectors + * .elpaignore: ignore README.md + +2015-09-04 Chris Feng + + Prepare for GNU ELPA release + + * Transfer copyright to Free Software Foundation + * Add packaging components (e.g. headers) + * Coding style fixes: + + Quote functions with "#'" + + Wrap long lines + + Fix doc strings / comments + * Replace `string-to-int' with `string-to-number' + * Fix compiling errors / eliminate compiling warnings + + Add exwm-core.el to hold common variables, functions and macros + * Remove the redundant COPYING file + * Add .gitignore + * Rename README to README.md + +2015-09-03 Chris Feng + + Ungrab pointer timely when resizing is aborted + + * exwm-floating.el (exwm-floating--start-moveresize): when resizing type + cannot + be decided, ungrab the previously grabbed pointer. + +2015-08-28 Philip + + Minor fix + +2015-08-28 Chris Feng + + Drop intro to xelb-util + +2015-08-27 Chris Feng + + Avoid deleting the frame created by Emacs client by accident + + When Emacs is invoked as `emacsclient -a '' -c`, it creates a frame that + can be deleted without any prompt. This commit removes the `client` + parameter from that frame to avoid such inconvenience. + +2015-08-27 Chris Feng + + Re-enable complete refresh of keyboard mapping + + Since the performance of `xcb:keysyms:update-keyboard-mapping` is no + longer an problem, we allow every possible refresh of keyboard mapping + again. + +2015-08-27 Chris Feng + + Fix window size calculations + + * When sending the synthetic ConfigureNotify event, make sure we are + dealing + with the correct Emacs window + * When managing a floating window, ensure it can be easily pick up by + the user + +2015-08-26 Chris Feng + + Fix `exwm-workspace-rename-buffer` + + Ensure buffer names are unique. + +2015-08-26 Chris Feng + + Correct several EWMH properties + + The following EWMH properties on the root window are corrected in this + commit: + _NET_VIRTUAL_ROOTS, _NET_WORKAREA and _NET_DESKTOP_VIEWPORT. + +2015-08-26 Chris Feng + + Replay KeyPress events instead of fake them in line-mode + + X windows in line-mode receive KeyPress events faked with SendEvent + requests previously. This causes many problems including: + + * Some applications (e.g. xterm) ignore synthetic events completely + * KeyPress and KeyRelease evnets arrive disorderly + + This commit makes EXWM exploiting AllowEvents requests (in + ReplayKeyboard mode) to forward KeyPress events to X windows instead. + +2015-08-25 Chris Feng + + Merge pull request #42 from pipcet/ewmh-fullscreen + + Avoid using the "no window manager" code in Emacs + +2015-08-24 Philip + + Avoid using the "no window manager" code in Emacs + + * exwm.el (exwm--on-ClientMessage): Handle fullscreen requests + for frames. + (exwm-init): Initialize workspaces after unlocking events. + + * exwm-workspace.el (exwm-workspace--init): Create frames as + invisible, then make them visible only once their OverrideRedirect + property has been set. + + * exwm-randr.el (exwm-randr--refresh): New frame parameter + `exwm-geometry'. + + * exwm-layout.el (exwm-layout--set-frame-fullscreen): New + function. + + The Emacs code is buggy, see https://github.com/ch11ng/exwm/issues/39 + + https://github.com/ch11ng/exwm/pull/42 + +2015-08-24 Chris Feng + + Only manage windows mapped as the direct children of root window (close + #38) + + Sometimes Emacs create child windows of virtual roots. This commit + ensures EXWM will not manage them. + +2015-08-17 Chris Feng + + Merge branch 'move-window-fix' of https://github.com/pipcet/exwm into + pipcet-move-window-fix + +2015-08-17 Philip + + Improve code robustness. + + * exwm-layout.el (exwm-layout-unset-fullscreen) + (exwm-layout-set-fullscreen): Use `user-error' rather than + `cl-assert'. + * exwm-input.el (exwm-input--set-focus): Silently accept unknown + ids. (exwm-input--grab-keyboard) (exwm-input--release-keyboard): + Silently ignore calls for windows that have no buffer. + * exwm-manage.el (exwm-manage--kill-client): Don't throw error + when trying to kill a vanished window. + +2015-08-17 Philip + + fix buffer renaming + + per https://github.com/ch11ng/exwm/pull/30 + +2015-08-16 Philip + + Fix bug when moving a window to the current workspace + + * exwm-workspace.el (exwm-workspace-move-window): Run + reparenting code when moving a window to the current workspace. + +2015-08-16 Chris Feng + + Provide hooks run when the floating state of a window changes (close + #28) + +2015-08-14 Chris Feng + + Honor `value-mask` field in ConfigureRequest event + + Some applications (e.g. JNLP) don't set correct values for fields not + mentioned in `value-mask`. This commit corrects this bug together with + another Java AWT specific problem. + +2015-08-13 Chris Feng + + Fix input focus stealing + + This was fixed in b755296 but broken by 04e4269. + +2015-08-13 Chris Feng + + Fix multi-screen bugs + + * RandR module is now made optional; users can enable it with + `exwm-randr-enable`. + * Correct the calculation of sizes/coordinates at various places. + * Input focus is now tracked with (Emacs) window instead of buffer since + the + latter can be ambiguous in multi-screen settings. + +2015-08-13 Chris Feng + + Minor fixes for emacsclient + +2015-08-12 Chris Feng + + Improve input focus switch mechanism + + This commit should fix most input focus bugs (especially those related + to floating windows). The actual settings of input focus are delayed to + exclude redundant event. Dead code since this commit is removed. + + This commit also fixes a bug for non-floating windows converted form + floating state. The workaround for `ido-mode` is also improved to + properly handle + `exwm-mode` buffers. + +2015-08-11 Chris Feng + + Center floating windows by default + + This commit makes a floating window centered to its leading window if it + has a valid WM_TRANSIENT_FOR property set. Other it's placed at the + center of the screen. + +2015-08-11 Chris Feng + + Fix buffer switch problems + + * Prevent switching to floating windows or windows on other workspaces + * Provide a workaround for `ido-mode` (can be enabled with + `(exwm-enable-ido-workaround)`) + +2015-08-11 Chris Feng + + Remove redundant code caused by the concurrency of events (contd, 2) + + * Remove locks that are no longer required + * Also fix #20 (inactive workspace frame steals input focus) + +2015-08-10 Chris Feng + + Ignore repeated `MappingNotify` events + + For some reason, `MappingNotify` events are generated quite frequently + and greatly impact the performance. This commit disables the complete + refresh of keyboard mapping. + +2015-08-10 Chris Feng + + Remove redundant code caused by the concurrency of events (continued) + + Remove `exwm--with-current-id`, which was introduced to as a wrapper to + `with-current-buffer` to do extra checks. Note that in functions run as + hooks, the validation of window ID is still required as they are not + synchronized with events. + +2015-08-10 Chris Feng + + Fix emacsclient bugs + + `emacsclient` started with `-c` or `-t` argument create a new frame that + shall not be used to manage X windows. Also fix some related input focus + issues (with some remaining unfixed). Close #17. + +2015-08-09 Chris Feng + + Remove redundant code caused by the concurrency of events + + With the introduction of ch11ng/xelb@6a7bccc, many weird behaviors + should disappear. These include by not limit to + * race conditions when managing a window (a workaround is provided in + @14628a9) + * race conditions when unmanaging a window This commit removes some + corresponding code. + +2015-08-09 Chris Feng + + Refresh when minibuffer grows (fix #10) + + The expansion of echo area is not handled however. + +2015-08-08 Chris Feng + + Show moved window by default + +2015-08-08 Chris Feng + + Correct layout refresh problems + + * Relax the conditions to refresh layout; this may introduce some + overheads + though + * Fix the problem when `*scratch*` buffer is killed; close #12 + * Enhance `exwm-reset` by forcing layout refresh in it. This should + allow users + to overcome some layout bugs + +2015-08-08 Chris Feng + + Fix some input focus issues + + * Fix input focus lost after moving window to another workspace + * Enhance `exwm-reset` to provide user a way to reset input focus when + it's + lost unexpectedly + +2015-08-08 Chris Feng + + Fixes for manage/unmanage window + + * Make sure `exwm-manage--manage-window-queue` is cleaned + * Improve input focus handling after unmanaging a window + * Remove a redundant call to `exwm-layout--show` + +2015-08-07 Chris Feng + + Fix race conditions when managing a window + + Since it takes some time for EXWM to create a buffer for a window (to do + some checking for example), the window may send several MapRequest + events before it's mapped. This commit should fix such issue. + +2015-08-07 Chris Feng + + Fix input focus lost after closing window + + Also insert some debug messages. + +2015-08-07 Chris Feng + + Various input fixes + + * Fix `exwm-reset` + * Make input mode buffer local + * Allow window to stay in `char-mode` while setting input focus to other + window + or switching to other workspace + +2015-08-06 Chris Feng + + Check buffer mode in exwm-reset + + This should prevent users from misoperation. + +2015-08-06 Chris Feng + + Fix fullscreen issues + + * Correct ConfigureNotify events sent to fullscreen windows. + * Exit fullscreen mode before switching workspace. + * Temporarily treat `xcb:Atom:_NET_WM_STATE_ABOVE` as + `xcb:Atom:_NET_WM_STATE_FULLSCREEN` since + a) "plugin-container" (Flash Player) seems only set this, and + b) it's not normally used by applications. + This makes fullscreen videos working in e.g. iceweasel. + +2015-08-05 Chris Feng + + Drop intro to EXIM + +2015-08-05 Chris Feng + + Various fixes + + * Prevent marking the end of a key sequence with a single `C-u'. + * Enable `C-u' prefix for key simulation since it's not possible for + users to + define simulation keys starting with `C-u'. + * Make Emacs idle only after the visual parts are updated to prevent + from + disturbing users. + * Should use '?\s' instead of '? '. + +2015-08-05 Markus S. + + Fix typos + +2015-08-03 Chris Feng + + Add basic RandR support + + This implementation is analogous to that in i3-wm, which requires + external tools to properly configure RandR first. + +2015-07-26 Chris Feng + + Fix potential naming conflicts + + Buffers may share a same name (without the possible leading space) when + created in different workspaces. + +2015-07-19 Chris Feng + + Various fixes + + Remove wrong shift modifiers. Hide a Window when it's moved to another + workspace. + +2015-07-18 Chris Feng + + Various fixes for workspace + + Fixes for full screen, move window, etc. + +2015-07-18 Chris Feng + + Add wiki link to README + +2015-07-18 Chris Feng + + Improve move/resize + + The type of move/resize is consistent during one complete operation. So + there is no need to judge it on every mouse motion. + +2015-07-17 Chris Feng + + First commit + diff --git a/elpa/exwm-0.24/exwm-autoloads.el b/elpa/exwm-0.24/exwm-autoloads.el new file mode 100644 index 0000000..3f7dd04 --- /dev/null +++ b/elpa/exwm-0.24/exwm-autoloads.el @@ -0,0 +1,315 @@ +;;; exwm-autoloads.el --- automatically extracted autoloads -*- lexical-binding: t -*- +;; +;;; Code: + +(add-to-list 'load-path (directory-file-name + (or (file-name-directory #$) (car load-path)))) + + +;;;### (autoloads nil "exwm" "exwm.el" (0 0 0 0)) +;;; Generated autoloads from exwm.el + +(autoload 'exwm-restart "exwm" "\ +Restart EXWM." t nil) + +(autoload 'exwm-init "exwm" "\ +Initialize EXWM. + +\(fn &optional FRAME)" t nil) + +(autoload 'exwm-exit "exwm" "\ +Exit EXWM." t nil) + +(autoload 'exwm-enable "exwm" "\ +Enable/Disable EXWM. + +\(fn &optional UNDO)" nil nil) + +(register-definition-prefixes "exwm" '("exwm-")) + +;;;*** + +;;;### (autoloads nil "exwm-cm" "exwm-cm.el" (0 0 0 0)) +;;; Generated autoloads from exwm-cm.el + +(register-definition-prefixes "exwm-cm" '("exwm-cm-")) + +;;;*** + +;;;### (autoloads nil "exwm-config" "exwm-config.el" (0 0 0 0)) +;;; Generated autoloads from exwm-config.el + +(register-definition-prefixes "exwm-config" '("exwm-config-")) + +;;;*** + +;;;### (autoloads nil "exwm-core" "exwm-core.el" (0 0 0 0)) +;;; Generated autoloads from exwm-core.el + +(register-definition-prefixes "exwm-core" '("exwm-")) + +;;;*** + +;;;### (autoloads nil "exwm-floating" "exwm-floating.el" (0 0 0 0)) +;;; Generated autoloads from exwm-floating.el + +(autoload 'exwm-floating-toggle-floating "exwm-floating" "\ +Toggle the current window between floating and non-floating states." t nil) + +(autoload 'exwm-floating-hide "exwm-floating" "\ +Hide the current floating X window (which would show again when selected)." t nil) + +(register-definition-prefixes "exwm-floating" '("exwm-floating-")) + +;;;*** + +;;;### (autoloads nil "exwm-input" "exwm-input.el" (0 0 0 0)) +;;; Generated autoloads from exwm-input.el + +(autoload 'exwm-input-set-key "exwm-input" "\ +Set a global key binding. + +The new key binding only takes effect in real time when this command is +called interactively, and is lost when this session ends unless it's +specifically saved in the Customize interface for `exwm-input-global-keys'. + +In configuration you should customize or set `exwm-input-global-keys' +instead. + +\(fn KEY COMMAND)" t nil) + +(autoload 'exwm-input-grab-keyboard "exwm-input" "\ +Switch to line-mode. + +\(fn &optional ID)" t nil) + +(autoload 'exwm-input-release-keyboard "exwm-input" "\ +Switch to char-mode. + +\(fn &optional ID)" t nil) + +(autoload 'exwm-input-toggle-keyboard "exwm-input" "\ +Toggle between 'line-mode' and 'char-mode'. + +\(fn &optional ID)" t nil) + +(autoload 'exwm-input-send-next-key "exwm-input" "\ +Send next key to client window. + +EXWM will prompt for the key to send. This command can be prefixed to send +multiple keys. If END-KEY is non-nil, stop sending keys if it's pressed. + +\(fn TIMES &optional END-KEY)" t nil) + +(autoload 'exwm-input-set-simulation-key "exwm-input" "\ +Set a simulation key. + +The simulation key takes effect in real time, but is lost when this session +ends unless it's specifically saved in the Customize interface for +`exwm-input-simulation-keys'. + +\(fn ORIGINAL-KEY SIMULATED-KEY)" t nil) + +(autoload 'exwm-input-send-simulation-key "exwm-input" "\ +Fake a key event according to the last input key sequence. + +\(fn TIMES)" t nil) + +(autoload 'exwm-input-invoke-factory "exwm-input" "\ +Make a command that invokes KEYS when called. + +One use is to access the keymap bound to KEYS (as prefix keys) in char-mode. + +\(fn KEYS)" nil t) + +(register-definition-prefixes "exwm-input" '("exwm-input-")) + +;;;*** + +;;;### (autoloads nil "exwm-layout" "exwm-layout.el" (0 0 0 0)) +;;; Generated autoloads from exwm-layout.el + +(autoload 'exwm-layout-set-fullscreen "exwm-layout" "\ +Make window ID fullscreen. + +\(fn &optional ID)" t nil) + +(autoload 'exwm-layout-unset-fullscreen "exwm-layout" "\ +Restore window from fullscreen state. + +\(fn &optional ID)" t nil) + +(autoload 'exwm-layout-toggle-fullscreen "exwm-layout" "\ +Toggle fullscreen mode. + +\(fn &optional ID)" t nil) + +(autoload 'exwm-layout-enlarge-window "exwm-layout" "\ +Make the selected window DELTA pixels taller. + +If no argument is given, make the selected window one pixel taller. If the +optional argument HORIZONTAL is non-nil, make selected window DELTA pixels +wider. If DELTA is negative, shrink selected window by -DELTA pixels. + +Normal hints are checked and regarded if the selected window is displaying an +`exwm-mode' buffer. However, this may violate the normal hints set on other X +windows. + +\(fn DELTA &optional HORIZONTAL)" t nil) + +(autoload 'exwm-layout-enlarge-window-horizontally "exwm-layout" "\ +Make the selected window DELTA pixels wider. + +See also `exwm-layout-enlarge-window'. + +\(fn DELTA)" t nil) + +(autoload 'exwm-layout-shrink-window "exwm-layout" "\ +Make the selected window DELTA pixels lower. + +See also `exwm-layout-enlarge-window'. + +\(fn DELTA)" t nil) + +(autoload 'exwm-layout-shrink-window-horizontally "exwm-layout" "\ +Make the selected window DELTA pixels narrower. + +See also `exwm-layout-enlarge-window'. + +\(fn DELTA)" t nil) + +(autoload 'exwm-layout-hide-mode-line "exwm-layout" "\ +Hide mode-line." t nil) + +(autoload 'exwm-layout-show-mode-line "exwm-layout" "\ +Show mode-line." t nil) + +(autoload 'exwm-layout-toggle-mode-line "exwm-layout" "\ +Toggle the display of mode-line." t nil) + +(register-definition-prefixes "exwm-layout" '("exwm-layout-")) + +;;;*** + +;;;### (autoloads nil "exwm-manage" "exwm-manage.el" (0 0 0 0)) +;;; Generated autoloads from exwm-manage.el + +(register-definition-prefixes "exwm-manage" '("exwm-manage-")) + +;;;*** + +;;;### (autoloads nil "exwm-randr" "exwm-randr.el" (0 0 0 0)) +;;; Generated autoloads from exwm-randr.el + +(autoload 'exwm-randr-refresh "exwm-randr" "\ +Refresh workspaces according to the updated RandR info." t nil) + +(register-definition-prefixes "exwm-randr" '("exwm-randr-")) + +;;;*** + +;;;### (autoloads nil "exwm-systemtray" "exwm-systemtray.el" (0 0 +;;;;;; 0 0)) +;;; Generated autoloads from exwm-systemtray.el + +(register-definition-prefixes "exwm-systemtray" '("exwm-systemtray-" "xcb:systemtray:-ClientMessage")) + +;;;*** + +;;;### (autoloads nil "exwm-workspace" "exwm-workspace.el" (0 0 0 +;;;;;; 0)) +;;; Generated autoloads from exwm-workspace.el + +(autoload 'exwm-workspace--get-geometry "exwm-workspace" "\ +Return the geometry of frame FRAME. + +\(fn FRAME)" nil nil) + +(autoload 'exwm-workspace--current-height "exwm-workspace" "\ +Return the height of current workspace." nil nil) + +(autoload 'exwm-workspace--minibuffer-own-frame-p "exwm-workspace" "\ +Reports whether the minibuffer is displayed in its own frame." nil nil) + +(autoload 'exwm-workspace-switch "exwm-workspace" "\ +Switch to workspace INDEX (0-based). + +Query for the index if not specified when called interactively. Passing a +workspace frame as the first option or making use of the rest options are +for internal use only. + +\(fn FRAME-OR-INDEX &optional FORCE)" t nil) + +(autoload 'exwm-workspace-switch-create "exwm-workspace" "\ +Switch to workspace INDEX or creating it first if it does not exist yet. + +Passing a workspace frame as the first option is for internal use only. + +\(fn FRAME-OR-INDEX)" t nil) + +(autoload 'exwm-workspace-swap "exwm-workspace" "\ +Interchange position of WORKSPACE1 with that of WORKSPACE2. + +\(fn WORKSPACE1 WORKSPACE2)" t nil) + +(autoload 'exwm-workspace-move "exwm-workspace" "\ +Move WORKSPACE to the NTH position. + +When called interactively, prompt for a workspace and move current one just +before it. + +\(fn WORKSPACE NTH)" t nil) + +(autoload 'exwm-workspace-add "exwm-workspace" "\ +Add a workspace as the INDEX-th workspace, or the last one if INDEX is nil. + +INDEX must not exceed the current number of workspaces. + +\(fn &optional INDEX)" t nil) + +(autoload 'exwm-workspace-delete "exwm-workspace" "\ +Delete the workspace FRAME-OR-INDEX. + +\(fn &optional FRAME-OR-INDEX)" t nil) + +(autoload 'exwm-workspace-move-window "exwm-workspace" "\ +Move window ID to workspace FRAME-OR-INDEX. + +\(fn FRAME-OR-INDEX &optional ID)" t nil) + +(autoload 'exwm-workspace-switch-to-buffer "exwm-workspace" "\ +Make the current Emacs window display another buffer. + +\(fn BUFFER-OR-NAME)" t nil) + +(autoload 'exwm-workspace-attach-minibuffer "exwm-workspace" "\ +Attach the minibuffer so that it always shows." t nil) + +(autoload 'exwm-workspace-detach-minibuffer "exwm-workspace" "\ +Detach the minibuffer so that it automatically hides." t nil) + +(autoload 'exwm-workspace-toggle-minibuffer "exwm-workspace" "\ +Attach the minibuffer if it's detached, or detach it if it's attached." t nil) + +(register-definition-prefixes "exwm-workspace" '("exwm-workspace-")) + +;;;*** + +;;;### (autoloads nil "exwm-xim" "exwm-xim.el" (0 0 0 0)) +;;; Generated autoloads from exwm-xim.el + +(register-definition-prefixes "exwm-xim" '("exwm-xim-")) + +;;;*** + +;;;### (autoloads nil nil ("exwm-pkg.el") (0 0 0 0)) + +;;;*** + +;; Local Variables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; coding: utf-8 +;; End: +;;; exwm-autoloads.el ends here diff --git a/elpa/exwm-0.24/exwm-cm.el b/elpa/exwm-0.24/exwm-cm.el new file mode 100644 index 0000000..9228477 --- /dev/null +++ b/elpa/exwm-0.24/exwm-cm.el @@ -0,0 +1,50 @@ +;;; exwm-cm.el --- Compositing Manager for EXWM -*- lexical-binding: t -*- + +;; Copyright (C) 2016-2020 Free Software Foundation, Inc. + +;; Author: Chris Feng + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This module is obsolete since EXWM now supports third-party compositors. + +;;; Code: + +(make-obsolete-variable 'exwm-cm-opacity + "This variable should no longer be used." "26") + +(defun exwm-cm-set-opacity (&rest _args) + (declare (obsolete nil "26"))) + +(defun exwm-cm-enable () + (declare (obsolete nil "26"))) + +(defun exwm-cm-start () + (declare (obsolete nil "26"))) + +(defun exwm-cm-stop () + (declare (obsolete nil "26"))) + +(defun exwm-cm-toggle () + (declare (obsolete nil "26"))) + + + +(provide 'exwm-cm) + +;;; exwm-cm.el ends here diff --git a/elpa/exwm-0.24/exwm-cm.elc b/elpa/exwm-0.24/exwm-cm.elc new file mode 100644 index 0000000..cbfc435 Binary files /dev/null and b/elpa/exwm-0.24/exwm-cm.elc differ diff --git a/elpa/exwm-0.24/exwm-config.el b/elpa/exwm-0.24/exwm-config.el new file mode 100644 index 0000000..bb8258a --- /dev/null +++ b/elpa/exwm-0.24/exwm-config.el @@ -0,0 +1,131 @@ +;;; exwm-config.el --- Predefined configurations -*- lexical-binding: t -*- + +;; Copyright (C) 2015-2020 Free Software Foundation, Inc. + +;; Author: Chris Feng + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This module contains typical (yet minimal) configurations of EXWM. + +;;; Code: + +(require 'exwm) +(require 'ido) + +(define-obsolete-function-alias 'exwm-config-default + #'exwm-config-example "27.1") + +(defun exwm-config-example () + "Default configuration of EXWM." + ;; Set the initial workspace number. + (unless (get 'exwm-workspace-number 'saved-value) + (setq exwm-workspace-number 4)) + ;; Make class name the buffer name + (add-hook 'exwm-update-class-hook + (lambda () + (exwm-workspace-rename-buffer exwm-class-name))) + ;; Global keybindings. + (unless (get 'exwm-input-global-keys 'saved-value) + (setq exwm-input-global-keys + `( + ;; 's-r': Reset (to line-mode). + ([?\s-r] . exwm-reset) + ;; 's-w': Switch workspace. + ([?\s-w] . exwm-workspace-switch) + ;; 's-&': Launch application. + ([?\s-&] . (lambda (command) + (interactive (list (read-shell-command "$ "))) + (start-process-shell-command command nil command))) + ;; 's-N': Switch to certain workspace. + ,@(mapcar (lambda (i) + `(,(kbd (format "s-%d" i)) . + (lambda () + (interactive) + (exwm-workspace-switch-create ,i)))) + (number-sequence 0 9))))) + ;; Line-editing shortcuts + (unless (get 'exwm-input-simulation-keys 'saved-value) + (setq exwm-input-simulation-keys + '(([?\C-b] . [left]) + ([?\C-f] . [right]) + ([?\C-p] . [up]) + ([?\C-n] . [down]) + ([?\C-a] . [home]) + ([?\C-e] . [end]) + ([?\M-v] . [prior]) + ([?\C-v] . [next]) + ([?\C-d] . [delete]) + ([?\C-k] . [S-end delete])))) + ;; Enable EXWM + (exwm-enable) + ;; Configure Ido + (exwm-config-ido) + ;; Other configurations + (exwm-config-misc)) + +(defun exwm-config--fix/ido-buffer-window-other-frame () + "Fix `ido-buffer-window-other-frame'." + (defalias 'exwm-config-ido-buffer-window-other-frame + (symbol-function #'ido-buffer-window-other-frame)) + (defun ido-buffer-window-other-frame (buffer) + "This is a version redefined by EXWM. + +You can find the original one at `exwm-config-ido-buffer-window-other-frame'." + (with-current-buffer (window-buffer (selected-window)) + (if (and (derived-mode-p 'exwm-mode) + exwm--floating-frame) + ;; Switch from a floating frame. + (with-current-buffer buffer + (if (and (derived-mode-p 'exwm-mode) + exwm--floating-frame + (eq exwm--frame exwm-workspace--current)) + ;; Switch to another floating frame. + (frame-root-window exwm--floating-frame) + ;; Do not switch if the buffer is not on the current workspace. + (or (get-buffer-window buffer exwm-workspace--current) + (selected-window)))) + (with-current-buffer buffer + (when (derived-mode-p 'exwm-mode) + (if (eq exwm--frame exwm-workspace--current) + (when exwm--floating-frame + ;; Switch to a floating frame on the current workspace. + (frame-selected-window exwm--floating-frame)) + ;; Do not switch to exwm-mode buffers on other workspace (which + ;; won't work unless `exwm-layout-show-all-buffers' is set) + (unless exwm-layout-show-all-buffers + (selected-window))))))))) + +(defun exwm-config-ido () + "Configure Ido to work with EXWM." + (ido-mode 1) + (add-hook 'exwm-init-hook #'exwm-config--fix/ido-buffer-window-other-frame)) + +(defun exwm-config-misc () + "Other configurations." + ;; Make more room + (menu-bar-mode -1) + (tool-bar-mode -1) + (scroll-bar-mode -1) + (fringe-mode 1)) + + + +(provide 'exwm-config) + +;;; exwm-config.el ends here diff --git a/elpa/exwm-0.24/exwm-config.elc b/elpa/exwm-0.24/exwm-config.elc new file mode 100644 index 0000000..2d89303 Binary files /dev/null and b/elpa/exwm-0.24/exwm-config.elc differ diff --git a/elpa/exwm-0.24/exwm-core.el b/elpa/exwm-0.24/exwm-core.el new file mode 100644 index 0000000..7645489 --- /dev/null +++ b/elpa/exwm-0.24/exwm-core.el @@ -0,0 +1,375 @@ +;;; exwm-core.el --- Core definitions -*- lexical-binding: t -*- + +;; Copyright (C) 2015-2020 Free Software Foundation, Inc. + +;; Author: Chris Feng + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This module includes core definitions of variables, macros, functions, etc +;; shared by various other modules. + +;;; Code: + +(require 'kmacro) + +(require 'xcb) +(require 'xcb-icccm) +(require 'xcb-ewmh) +(require 'xcb-debug) + +(defcustom exwm-debug-log-time-function #'exwm-debug-log-uptime + "Function used for generating timestamps in `exwm-debug' logs. + +Here are some predefined candidates: +`exwm-debug-log-uptime': Display the uptime of this Emacs instance. +`exwm-debug-log-time': Display time of day. +`nil': Disable timestamp." + :group 'exwm-debug + :type `(choice (const :tag "Emacs uptime" ,#'exwm-debug-log-uptime) + (const :tag "Time of day" ,#'exwm-debug-log-time) + (const :tag "Off" nil) + (function :tag "Other")) + :set (lambda (symbol value) + (set-default symbol value) + ;; Also change the format for XELB to make logs consistent + ;; (as they share the same buffer). + (setq xcb-debug:log-time-function value))) + +(defalias 'exwm-debug-log-uptime 'xcb-debug:log-uptime + "Add uptime to `exwm-debug' logs.") + +(defalias 'exwm-debug-log-time 'xcb-debug:log-time + "Add time of day to `exwm-debug' logs.") + +(defvar exwm--connection nil "X connection.") + +(defvar exwm--wmsn-window nil + "An X window owning the WM_S0 selection.") + +(defvar exwm--wmsn-acquire-timeout 3 + "Number of seconds to wait for other window managers to release the selection.") + +(defvar exwm--guide-window nil + "An X window separating workspaces and X windows.") + +(defvar exwm--id-buffer-alist nil "Alist of ( . ).") + +(defvar exwm--root nil "Root window.") + +(defvar exwm-input--global-prefix-keys) +(defvar exwm-input--simulation-keys) +(defvar exwm-input-line-mode-passthrough) +(defvar exwm-input-prefix-keys) +(declare-function exwm-input--fake-key "exwm-input.el" (event)) +(declare-function exwm-input--on-KeyPress-line-mode "exwm-input.el" + (key-press raw-data)) +(declare-function exwm-floating-hide "exwm-floating.el") +(declare-function exwm-floating-toggle-floating "exwm-floating.el") +(declare-function exwm-input-release-keyboard "exwm-input.el") +(declare-function exwm-input-send-next-key "exwm-input.el" (times)) +(declare-function exwm-layout-set-fullscreen "exwm-layout.el" (&optional id)) +(declare-function exwm-layout-toggle-mode-line "exwm-layout.el") +(declare-function exwm-manage--kill-buffer-query-function "exwm-manage.el") +(declare-function exwm-workspace-move-window "exwm-workspace.el" + (frame-or-index &optional id)) + +(define-minor-mode exwm-debug + "Debug-logging enabled if non-nil" + :global t) + +(defmacro exwm--debug (&rest forms) + (when exwm-debug `(progn ,@forms))) + +(defmacro exwm--log (&optional format-string &rest objects) + "Emit a message prepending the name of the function being executed. + +FORMAT-STRING is a string specifying the message to output, as in +`format'. The OBJECTS arguments specify the substitutions." + (unless format-string (setq format-string "")) + `(when exwm-debug + (xcb-debug:message ,(concat "%s%s:\t" format-string "\n") + (if exwm-debug-log-time-function + (funcall exwm-debug-log-time-function) + "") + (xcb-debug:compile-time-function-name) + ,@objects) + nil)) + +(defsubst exwm--id->buffer (id) + "X window ID => Emacs buffer." + (cdr (assoc id exwm--id-buffer-alist))) + +(defsubst exwm--buffer->id (buffer) + "Emacs buffer BUFFER => X window ID." + (car (rassoc buffer exwm--id-buffer-alist))) + +(defun exwm--lock (&rest _args) + "Lock (disable all events)." + (exwm--log) + (xcb:+request exwm--connection + (make-instance 'xcb:ChangeWindowAttributes + :window exwm--root + :value-mask xcb:CW:EventMask + :event-mask xcb:EventMask:NoEvent)) + (xcb:flush exwm--connection)) + +(defun exwm--unlock (&rest _args) + "Unlock (enable all events)." + (exwm--log) + (xcb:+request exwm--connection + (make-instance 'xcb:ChangeWindowAttributes + :window exwm--root + :value-mask xcb:CW:EventMask + :event-mask (eval-when-compile + (logior xcb:EventMask:SubstructureRedirect + xcb:EventMask:StructureNotify)))) + (xcb:flush exwm--connection)) + +(defun exwm--set-geometry (xwin x y width height) + "Set the geometry of X window XWIN to WIDTHxHEIGHT+X+Y. + +Nil can be passed as placeholder." + (exwm--log "Setting #x%x to %sx%s+%s+%s" xwin width height x y) + (xcb:+request exwm--connection + (make-instance 'xcb:ConfigureWindow + :window xwin + :value-mask (logior (if x xcb:ConfigWindow:X 0) + (if y xcb:ConfigWindow:Y 0) + (if width xcb:ConfigWindow:Width 0) + (if height xcb:ConfigWindow:Height 0)) + :x x :y y :width width :height height))) + +(defun exwm--intern-atom (atom) + "Intern X11 ATOM." + (slot-value (xcb:+request-unchecked+reply exwm--connection + (make-instance 'xcb:InternAtom + :only-if-exists 0 + :name-len (length atom) + :name atom)) + 'atom)) + +(defmacro exwm--defer (secs function &rest args) + "Defer the execution of FUNCTION. + +The action is to call FUNCTION with arguments ARGS. If Emacs is not idle, +defer the action until Emacs is idle. Otherwise, defer the action until at +least SECS seconds later." + `(run-with-idle-timer (+ (float-time (or (current-idle-time) + (seconds-to-time (- ,secs)))) + ,secs) + nil + ,function + ,@args)) + +(defun exwm--get-client-event-mask () + "Return event mask set on all managed windows." + (logior xcb:EventMask:StructureNotify + xcb:EventMask:PropertyChange + (if mouse-autoselect-window + xcb:EventMask:EnterWindow 0))) + +(defun exwm--color->pixel (color) + "Convert COLOR to PIXEL (index in TrueColor colormap)." + (when (and color + (eq (x-display-visual-class) 'true-color)) + (let ((rgb (x-color-values color))) + (logior (lsh (lsh (pop rgb) -8) 16) + (lsh (lsh (pop rgb) -8) 8) + (lsh (pop rgb) -8))))) + +;; Internal variables +(defvar-local exwm--id nil) ;window ID +(defvar-local exwm--configurations nil) ;initial configurations. +(defvar-local exwm--frame nil) ;workspace frame +(defvar-local exwm--floating-frame nil) ;floating frame +(defvar-local exwm--mode-line-format nil) ;save mode-line-format +(defvar-local exwm--floating-frame-position nil) ;set when hidden. +(defvar-local exwm--fixed-size nil) ;fixed size +(defvar-local exwm--selected-input-mode 'line-mode + "Input mode as selected by the user. +One of `line-mode' or `char-mode'.") +(defvar-local exwm--input-mode 'line-mode + "Actual input mode, i.e. whether mouse and keyboard are grabbed.") +;; Properties +(defvar-local exwm--desktop nil "_NET_WM_DESKTOP.") +(defvar-local exwm-window-type nil "_NET_WM_WINDOW_TYPE.") +(defvar-local exwm--geometry nil) +(defvar-local exwm-class-name nil "Class name in WM_CLASS.") +(defvar-local exwm-instance-name nil "Instance name in WM_CLASS.") +(defvar-local exwm-title nil "Window title (either _NET_WM_NAME or WM_NAME)") +(defvar-local exwm--title-is-utf8 nil) +(defvar-local exwm-transient-for nil "WM_TRANSIENT_FOR.") +(defvar-local exwm--protocols nil) +(defvar-local exwm-state xcb:icccm:WM_STATE:NormalState "WM_STATE.") +(defvar-local exwm--ewmh-state nil "_NET_WM_STATE.") +;; _NET_WM_NORMAL_HINTS +(defvar-local exwm--normal-hints-x nil) +(defvar-local exwm--normal-hints-y nil) +(defvar-local exwm--normal-hints-width nil) +(defvar-local exwm--normal-hints-height nil) +(defvar-local exwm--normal-hints-min-width nil) +(defvar-local exwm--normal-hints-min-height nil) +(defvar-local exwm--normal-hints-max-width nil) +(defvar-local exwm--normal-hints-max-height nil) +;; (defvar-local exwm--normal-hints-win-gravity nil) +;; WM_HINTS +(defvar-local exwm--hints-input nil) +(defvar-local exwm--hints-urgency nil) +;; _MOTIF_WM_HINTS +(defvar-local exwm--mwm-hints-decorations t) + +(defvar exwm-mode-map + (let ((map (make-sparse-keymap))) + (define-key map "\C-c\C-d\C-l" #'xcb-debug:clear) + (define-key map "\C-c\C-d\C-m" #'xcb-debug:mark) + (define-key map "\C-c\C-d\C-t" #'exwm-debug) + (define-key map "\C-c\C-f" #'exwm-layout-set-fullscreen) + (define-key map "\C-c\C-h" #'exwm-floating-hide) + (define-key map "\C-c\C-k" #'exwm-input-release-keyboard) + (define-key map "\C-c\C-m" #'exwm-workspace-move-window) + (define-key map "\C-c\C-q" #'exwm-input-send-next-key) + (define-key map "\C-c\C-t\C-f" #'exwm-floating-toggle-floating) + (define-key map "\C-c\C-t\C-m" #'exwm-layout-toggle-mode-line) + map) + "Keymap for `exwm-mode'.") + +(defvar exwm--kmacro-map + (let ((map (make-sparse-keymap))) + (define-key map [t] + (lambda () + (interactive) + (cond + ((or exwm-input-line-mode-passthrough + ;; Do not test `exwm-input--during-command'. + (active-minibuffer-window) + (memq last-input-event exwm-input--global-prefix-keys) + (memq last-input-event exwm-input-prefix-keys) + (lookup-key exwm-mode-map (vector last-input-event)) + (gethash last-input-event exwm-input--simulation-keys)) + (set-transient-map (make-composed-keymap (list exwm-mode-map + global-map))) + (push last-input-event unread-command-events)) + (t + (exwm-input--fake-key last-input-event))))) + map) + "Keymap used when executing keyboard macros.") + +;; This menu mainly acts as an reminder for users. Thus it should be as +;; detailed as possible, even some entries do not make much sense here. +;; Also, inactive entries should be disabled rather than hidden. +(easy-menu-define exwm-mode-menu exwm-mode-map + "Menu for `exwm-mode'." + '("EXWM" + "---" + "*General*" + "---" + ["Toggle floating" exwm-floating-toggle-floating] + ["Toggle fullscreen mode" exwm-layout-toggle-fullscreen] + ["Hide window" exwm-floating-hide exwm--floating-frame] + ["Close window" (kill-buffer (current-buffer))] + + "---" + "*Resizing*" + "---" + ["Toggle mode-line" exwm-layout-toggle-mode-line] + ["Enlarge window vertically" exwm-layout-enlarge-window] + ["Enlarge window horizontally" exwm-layout-enlarge-window-horizontally] + ["Shrink window vertically" exwm-layout-shrink-window] + ["Shrink window horizontally" exwm-layout-shrink-window-horizontally] + + "---" + "*Keyboard*" + "---" + ["Toggle keyboard mode" exwm-input-toggle-keyboard] + ["Send key" exwm-input-send-next-key (eq exwm--input-mode 'line-mode)] + ;; This is merely a reference. + ("Send simulation key" :filter + (lambda (&rest _args) + (let (result) + (maphash + (lambda (key value) + (when (sequencep key) + (setq result (append result + `([ + ,(format "Send '%s'" + (key-description value)) + (lambda () + (interactive) + (dolist (i ',value) + (exwm-input--fake-key i))) + :keys ,(key-description key)]))))) + exwm-input--simulation-keys) + result))) + + ["Define global binding" exwm-input-set-key] + + "---" + "*Workspace*" + "---" + ["Add workspace" exwm-workspace-add] + ["Delete current workspace" exwm-workspace-delete] + ["Move workspace to" exwm-workspace-move] + ["Swap workspaces" exwm-workspace-swap] + ["Move X window to" exwm-workspace-move-window] + ["Move X window from" exwm-workspace-switch-to-buffer] + ["Toggle minibuffer" exwm-workspace-toggle-minibuffer] + ["Switch workspace" exwm-workspace-switch] + ;; Place this entry at bottom to avoid selecting others by accident. + ("Switch to" :filter + (lambda (&rest _args) + (mapcar (lambda (i) + `[,(format "Workspace %d" i) + (lambda () + (interactive) + (exwm-workspace-switch ,i)) + (/= ,i exwm-workspace-current-index)]) + (number-sequence 0 (1- (exwm-workspace--count)))))))) + +(define-derived-mode exwm-mode nil "EXWM" + "Major mode for managing X windows. + +\\{exwm-mode-map}" + ;; + (setq mode-name + '(:eval (propertize "EXWM" 'face + (when (cl-some (lambda (i) + (frame-parameter i 'exwm-urgency)) + exwm-workspace--list) + 'font-lock-warning-face)))) + ;; Change major-mode is not allowed + (add-hook 'change-major-mode-hook #'kill-buffer nil t) + ;; Kill buffer -> close window + (add-hook 'kill-buffer-query-functions + #'exwm-manage--kill-buffer-query-function nil t) + ;; Redirect events when executing keyboard macros. + (push `(executing-kbd-macro . ,exwm--kmacro-map) + minor-mode-overriding-map-alist) + (setq buffer-read-only t + cursor-type nil + left-margin-width nil + right-margin-width nil + left-fringe-width 0 + right-fringe-width 0 + vertical-scroll-bar nil)) + + + +(provide 'exwm-core) + +;;; exwm-core.el ends here diff --git a/elpa/exwm-0.24/exwm-core.elc b/elpa/exwm-0.24/exwm-core.elc new file mode 100644 index 0000000..47ade52 Binary files /dev/null and b/elpa/exwm-0.24/exwm-core.elc differ diff --git a/elpa/exwm-0.24/exwm-floating.el b/elpa/exwm-0.24/exwm-floating.el new file mode 100644 index 0000000..d1882cf --- /dev/null +++ b/elpa/exwm-0.24/exwm-floating.el @@ -0,0 +1,783 @@ +;;; exwm-floating.el --- Floating Module for EXWM -*- lexical-binding: t -*- + +;; Copyright (C) 2015-2020 Free Software Foundation, Inc. + +;; Author: Chris Feng + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This module deals with the conversion between floating and non-floating +;; states and implements moving/resizing operations on floating windows. + +;;; Code: + +(require 'xcb-cursor) +(require 'exwm-core) + +(defgroup exwm-floating nil + "Floating." + :version "25.3" + :group 'exwm) + +(defcustom exwm-floating-setup-hook nil + "Normal hook run when an X window has been made floating, in the +context of the corresponding buffer." + :type 'hook) + +(defcustom exwm-floating-exit-hook nil + "Normal hook run when an X window has exited floating state, in the +context of the corresponding buffer." + :type 'hook) + +(defcustom exwm-floating-border-color "navy" + "Border color of floating windows." + :type 'color + :initialize #'custom-initialize-default + :set (lambda (symbol value) + (set-default symbol value) + ;; Change border color for all floating X windows. + (when exwm--connection + (let ((border-pixel (exwm--color->pixel value))) + (when border-pixel + (dolist (pair exwm--id-buffer-alist) + (with-current-buffer (cdr pair) + (when exwm--floating-frame + (xcb:+request exwm--connection + (make-instance 'xcb:ChangeWindowAttributes + :window + (frame-parameter exwm--floating-frame + 'exwm-container) + :value-mask xcb:CW:BorderPixel + :border-pixel border-pixel))))) + (xcb:flush exwm--connection)))))) + +(defcustom exwm-floating-border-width 1 + "Border width of floating windows." + :type '(integer + :validate (lambda (widget) + (when (< (widget-value widget) 0) + (widget-put widget :error "Border width is at least 0") + widget))) + :initialize #'custom-initialize-default + :set (lambda (symbol value) + (let ((delta (- value exwm-floating-border-width)) + container) + (set-default symbol value) + ;; Change border width for all floating X windows. + (dolist (pair exwm--id-buffer-alist) + (with-current-buffer (cdr pair) + (when exwm--floating-frame + (setq container (frame-parameter exwm--floating-frame + 'exwm-container)) + (with-slots (x y) + (xcb:+request-unchecked+reply exwm--connection + (make-instance 'xcb:GetGeometry + :drawable container)) + (xcb:+request exwm--connection + (make-instance 'xcb:ConfigureWindow + :window container + :value-mask + (logior xcb:ConfigWindow:X + xcb:ConfigWindow:Y + xcb:ConfigWindow:BorderWidth) + :border-width value + :x (- x delta) + :y (- y delta))))))) + (when exwm--connection + (xcb:flush exwm--connection))))) + +;; Cursors for moving/resizing a window +(defvar exwm-floating--cursor-move nil) +(defvar exwm-floating--cursor-top-left nil) +(defvar exwm-floating--cursor-top nil) +(defvar exwm-floating--cursor-top-right nil) +(defvar exwm-floating--cursor-right nil) +(defvar exwm-floating--cursor-bottom-right nil) +(defvar exwm-floating--cursor-bottom nil) +(defvar exwm-floating--cursor-bottom-left nil) +(defvar exwm-floating--cursor-left nil) + +(defvar exwm-floating--moveresize-calculate nil + "Calculate move/resize parameters [buffer event-mask x y width height].") + +(defvar exwm-workspace--current) +(defvar exwm-workspace--frame-y-offset) +(defvar exwm-workspace--window-y-offset) +(defvar exwm-workspace--workareas) +(declare-function exwm-layout--hide "exwm-layout.el" (id)) +(declare-function exwm-layout--iconic-state-p "exwm-layout.el" (&optional id)) +(declare-function exwm-layout--refresh "exwm-layout.el" ()) +(declare-function exwm-layout--show "exwm-layout.el" (id &optional window)) +(declare-function exwm-workspace--position "exwm-workspace.el" (frame)) +(declare-function exwm-workspace--update-offsets "exwm-workspace.el" ()) + +(defun exwm-floating--set-allowed-actions (id tilling) + "Set _NET_WM_ALLOWED_ACTIONS." + (exwm--log "#x%x" id) + (xcb:+request exwm--connection + (make-instance 'xcb:ewmh:set-_NET_WM_ALLOWED_ACTIONS + :window id + :data (if tilling + (vector xcb:Atom:_NET_WM_ACTION_MINIMIZE + xcb:Atom:_NET_WM_ACTION_FULLSCREEN + xcb:Atom:_NET_WM_ACTION_CHANGE_DESKTOP + xcb:Atom:_NET_WM_ACTION_CLOSE) + (vector xcb:Atom:_NET_WM_ACTION_MOVE + xcb:Atom:_NET_WM_ACTION_RESIZE + xcb:Atom:_NET_WM_ACTION_MINIMIZE + xcb:Atom:_NET_WM_ACTION_FULLSCREEN + xcb:Atom:_NET_WM_ACTION_CHANGE_DESKTOP + xcb:Atom:_NET_WM_ACTION_CLOSE))))) + +(defun exwm-floating--set-floating (id) + "Make window ID floating." + (let ((window (get-buffer-window (exwm--id->buffer id)))) + (when window + ;; Hide the non-floating X window first. + (set-window-buffer window (other-buffer nil t)))) + (let* ((original-frame (buffer-local-value 'exwm--frame + (exwm--id->buffer id))) + ;; Create new frame + (frame (with-current-buffer + (or (get-buffer "*scratch*") + (progn + (set-buffer-major-mode + (get-buffer-create "*scratch*")) + (get-buffer "*scratch*"))) + (make-frame + `((minibuffer . ,(minibuffer-window exwm--frame)) + (left . ,(* window-min-width -10000)) + (top . ,(* window-min-height -10000)) + (width . ,window-min-width) + (height . ,window-min-height) + (unsplittable . t))))) ;and fix the size later + (outer-id (string-to-number (frame-parameter frame 'outer-window-id))) + (window-id (string-to-number (frame-parameter frame 'window-id))) + (frame-container (xcb:generate-id exwm--connection)) + (window (frame-first-window frame)) ;and it's the only window + (x (slot-value exwm--geometry 'x)) + (y (slot-value exwm--geometry 'y)) + (width (slot-value exwm--geometry 'width)) + (height (slot-value exwm--geometry 'height))) + ;; Force drawing menu-bar & tool-bar. + (redisplay t) + (exwm-workspace--update-offsets) + (exwm--log "Floating geometry (original): %dx%d%+d%+d" width height x y) + ;; Save frame parameters. + (set-frame-parameter frame 'exwm-outer-id outer-id) + (set-frame-parameter frame 'exwm-id window-id) + (set-frame-parameter frame 'exwm-container frame-container) + ;; Fix illegal parameters + ;; FIXME: check normal hints restrictions + (let* ((workarea (elt exwm-workspace--workareas + (exwm-workspace--position original-frame))) + (x* (aref workarea 0)) + (y* (aref workarea 1)) + (width* (aref workarea 2)) + (height* (aref workarea 3))) + ;; Center floating windows + (when (and (or (= x 0) (= x x*)) + (or (= y 0) (= y y*))) + (let ((buffer (exwm--id->buffer exwm-transient-for)) + window edges) + (when (and buffer (setq window (get-buffer-window buffer))) + (setq edges (window-inside-absolute-pixel-edges window)) + (unless (and (<= width (- (elt edges 2) (elt edges 0))) + (<= height (- (elt edges 3) (elt edges 1)))) + (setq edges nil))) + (if edges + ;; Put at the center of leading window + (setq x (+ x* (/ (- (elt edges 2) (elt edges 0) width) 2)) + y (+ y* (/ (- (elt edges 3) (elt edges 1) height) 2))) + ;; Put at the center of screen + (setq x (/ (- width* width) 2) + y (/ (- height* height) 2))))) + (if (> width width*) + ;; Too wide + (progn (setq x x* + width width*)) + ;; Invalid width + (when (= 0 width) (setq width (/ width* 2))) + ;; Make sure at least half of the window is visible + (unless (< x* (+ x (/ width 2)) (+ x* width*)) + (setq x (+ x* (/ (- width* width) 2))))) + (if (> height height*) + ;; Too tall + (setq y y* + height height*) + ;; Invalid height + (when (= 0 height) (setq height (/ height* 2))) + ;; Make sure at least half of the window is visible + (unless (< y* (+ y (/ height 2)) (+ y* height*)) + (setq y (+ y* (/ (- height* height) 2))))) + ;; The geometry can be overridden by user options. + (let ((x** (plist-get exwm--configurations 'x)) + (y** (plist-get exwm--configurations 'y)) + (width** (plist-get exwm--configurations 'width)) + (height** (plist-get exwm--configurations 'height))) + (if (integerp x**) + (setq x (+ x* x**)) + (when (and (floatp x**) + (>= 1 x** 0)) + (setq x (+ x* (round (* x** width*)))))) + (if (integerp y**) + (setq y (+ y* y**)) + (when (and (floatp y**) + (>= 1 y** 0)) + (setq y (+ y* (round (* y** height*)))))) + (if (integerp width**) + (setq width width**) + (when (and (floatp width**) + (> 1 width** 0)) + (setq width (max 1 (round (* width** width*)))))) + (if (integerp height**) + (setq height height**) + (when (and (floatp height**) + (> 1 height** 0)) + (setq height (max 1 (round (* height** height*)))))))) + (exwm--set-geometry id x y nil nil) + (xcb:flush exwm--connection) + (exwm--log "Floating geometry (corrected): %dx%d%+d%+d" width height x y) + ;; Fit frame to client + ;; It seems we have to make the frame invisible in order to resize it + ;; timely. + ;; The frame will be made visible by `select-frame-set-input-focus'. + (make-frame-invisible frame) + (let* ((edges (window-inside-pixel-edges window)) + (frame-width (+ width (- (frame-pixel-width frame) + (- (elt edges 2) (elt edges 0))))) + (frame-height (+ height (- (frame-pixel-height frame) + (- (elt edges 3) (elt edges 1))) + ;; Use `frame-outer-height' in the future. + exwm-workspace--frame-y-offset)) + (floating-mode-line (plist-get exwm--configurations + 'floating-mode-line)) + (floating-header-line (plist-get exwm--configurations + 'floating-header-line)) + (border-pixel (exwm--color->pixel exwm-floating-border-color))) + (if floating-mode-line + (setq exwm--mode-line-format (or exwm--mode-line-format + mode-line-format) + mode-line-format floating-mode-line) + (if (and (not (plist-member exwm--configurations 'floating-mode-line)) + exwm--mwm-hints-decorations) + (when exwm--mode-line-format + (setq mode-line-format exwm--mode-line-format)) + ;; The mode-line need to be hidden in floating mode. + (setq frame-height (- frame-height (window-mode-line-height + (frame-root-window frame))) + exwm--mode-line-format (or exwm--mode-line-format + mode-line-format) + mode-line-format nil))) + (if floating-header-line + (setq header-line-format floating-header-line) + (if (and (not (plist-member exwm--configurations + 'floating-header-line)) + exwm--mwm-hints-decorations) + (setq header-line-format nil) + ;; The header-line need to be hidden in floating mode. + (setq frame-height (- frame-height (window-header-line-height + (frame-root-window frame))) + header-line-format nil))) + (set-frame-size frame frame-width frame-height t) + ;; Create the frame container as the parent of the frame. + (xcb:+request exwm--connection + (make-instance 'xcb:CreateWindow + :depth 0 + :wid frame-container + :parent exwm--root + :x x + :y (- y exwm-workspace--window-y-offset) + :width width + :height height + :border-width + (with-current-buffer (exwm--id->buffer id) + (let ((border-witdh (plist-get exwm--configurations + 'border-width))) + (if (and (integerp border-witdh) + (>= border-witdh 0)) + border-witdh + exwm-floating-border-width))) + :class xcb:WindowClass:InputOutput + :visual 0 + :value-mask (logior xcb:CW:BackPixmap + (if border-pixel + xcb:CW:BorderPixel 0) + xcb:CW:OverrideRedirect) + :background-pixmap xcb:BackPixmap:ParentRelative + :border-pixel border-pixel + :override-redirect 1)) + (xcb:+request exwm--connection + (make-instance 'xcb:ewmh:set-_NET_WM_NAME + :window frame-container + :data + (format "EXWM floating frame container for 0x%x" id))) + ;; Map it. + (xcb:+request exwm--connection + (make-instance 'xcb:MapWindow :window frame-container)) + ;; Put the X window right above this frame container. + (xcb:+request exwm--connection + (make-instance 'xcb:ConfigureWindow + :window id + :value-mask (logior xcb:ConfigWindow:Sibling + xcb:ConfigWindow:StackMode) + :sibling frame-container + :stack-mode xcb:StackMode:Above))) + ;; Reparent this frame to its container. + (xcb:+request exwm--connection + (make-instance 'xcb:ReparentWindow + :window outer-id :parent frame-container :x 0 :y 0)) + (exwm-floating--set-allowed-actions id nil) + (xcb:flush exwm--connection) + ;; Set window/buffer + (with-current-buffer (exwm--id->buffer id) + (setq window-size-fixed exwm--fixed-size + exwm--floating-frame frame) + ;; Do the refresh manually. + (remove-hook 'window-configuration-change-hook #'exwm-layout--refresh) + (set-window-buffer window (current-buffer)) ;this changes current buffer + (add-hook 'window-configuration-change-hook #'exwm-layout--refresh) + (set-window-dedicated-p window t) + (exwm-layout--show id window)) + (with-current-buffer (exwm--id->buffer id) + (if (exwm-layout--iconic-state-p id) + ;; Hide iconic floating X windows. + (exwm-floating-hide) + (with-selected-frame exwm--frame + (exwm-layout--refresh))) + (select-frame-set-input-focus frame)) + ;; FIXME: Strangely, the Emacs frame can move itself at this point + ;; when there are left/top struts set. Force resetting its + ;; position seems working, but it'd better to figure out why. + ;; FIXME: This also happens in another case (#220) where the cause is + ;; still unclear. + (exwm--set-geometry outer-id 0 0 nil nil) + (xcb:flush exwm--connection)) + (with-current-buffer (exwm--id->buffer id) + (run-hooks 'exwm-floating-setup-hook)) + ;; Redraw the frame. + (redisplay t)) + +(defun exwm-floating--unset-floating (id) + "Make window ID non-floating." + (exwm--log "#x%x" id) + (let ((buffer (exwm--id->buffer id))) + (with-current-buffer buffer + (when exwm--floating-frame + ;; The X window is already mapped. + ;; Unmap the X window. + (xcb:+request exwm--connection + (make-instance 'xcb:ChangeWindowAttributes + :window id :value-mask xcb:CW:EventMask + :event-mask xcb:EventMask:NoEvent)) + (xcb:+request exwm--connection + (make-instance 'xcb:UnmapWindow :window id)) + (xcb:+request exwm--connection + (make-instance 'xcb:ChangeWindowAttributes + :window id :value-mask xcb:CW:EventMask + :event-mask (exwm--get-client-event-mask))) + ;; Reparent the floating frame back to the root window. + (let ((frame-id (frame-parameter exwm--floating-frame 'exwm-outer-id)) + (frame-container (frame-parameter exwm--floating-frame + 'exwm-container))) + (xcb:+request exwm--connection + (make-instance 'xcb:UnmapWindow :window frame-id)) + (xcb:+request exwm--connection + (make-instance 'xcb:ReparentWindow + :window frame-id + :parent exwm--root + :x 0 :y 0)) + ;; Also destroy its container. + (xcb:+request exwm--connection + (make-instance 'xcb:DestroyWindow :window frame-container)))) + ;; Place the X window just above the reference X window. + ;; (the stacking order won't change from now on). + ;; Also hide the possible floating border. + (xcb:+request exwm--connection + (make-instance 'xcb:ConfigureWindow + :window id + :value-mask (logior xcb:ConfigWindow:BorderWidth + xcb:ConfigWindow:Sibling + xcb:ConfigWindow:StackMode) + :border-width 0 + :sibling exwm--guide-window + :stack-mode xcb:StackMode:Above))) + (exwm-floating--set-allowed-actions id t) + (xcb:flush exwm--connection) + (with-current-buffer buffer + (when exwm--floating-frame ;from floating to non-floating + (set-window-dedicated-p (frame-first-window exwm--floating-frame) nil) + ;; Select a tiling window and delete the old frame. + (select-window (frame-selected-window exwm-workspace--current)) + (with-current-buffer buffer + (delete-frame exwm--floating-frame)))) + (with-current-buffer buffer + (setq window-size-fixed nil + exwm--floating-frame nil) + (if (not (plist-member exwm--configurations 'tiling-mode-line)) + (when exwm--mode-line-format + (setq mode-line-format exwm--mode-line-format)) + (setq exwm--mode-line-format (or exwm--mode-line-format + mode-line-format) + mode-line-format (plist-get exwm--configurations + 'tiling-mode-line))) + (if (not (plist-member exwm--configurations 'tiling-header-line)) + (setq header-line-format nil) + (setq header-line-format (plist-get exwm--configurations + 'tiling-header-line)))) + ;; Only show X windows in normal state. + (unless (exwm-layout--iconic-state-p) + (pop-to-buffer-same-window buffer))) + (with-current-buffer (exwm--id->buffer id) + (run-hooks 'exwm-floating-exit-hook))) + +;;;###autoload +(cl-defun exwm-floating-toggle-floating () + "Toggle the current window between floating and non-floating states." + (interactive) + (exwm--log) + (unless (derived-mode-p 'exwm-mode) + (cl-return-from exwm-floating-toggle-floating)) + (with-current-buffer (window-buffer) + (if exwm--floating-frame + (exwm-floating--unset-floating exwm--id) + (exwm-floating--set-floating exwm--id)))) + +;;;###autoload +(defun exwm-floating-hide () + "Hide the current floating X window (which would show again when selected)." + (interactive) + (exwm--log) + (when (and (derived-mode-p 'exwm-mode) + exwm--floating-frame) + (exwm-layout--hide exwm--id) + (select-frame-set-input-focus exwm-workspace--current))) + +(defun exwm-floating--start-moveresize (id &optional type) + "Start move/resize." + (exwm--log "#x%x" id) + (let ((buffer-or-id (or (exwm--id->buffer id) id)) + frame container-or-id x y width height cursor) + (if (bufferp buffer-or-id) + ;; Managed. + (with-current-buffer buffer-or-id + (setq frame exwm--floating-frame + container-or-id (frame-parameter exwm--floating-frame + 'exwm-container))) + ;; Unmanaged. + (setq container-or-id id)) + (when (and container-or-id + ;; Test if the pointer can be grabbed + (= xcb:GrabStatus:Success + (slot-value + (xcb:+request-unchecked+reply exwm--connection + (make-instance 'xcb:GrabPointer + :owner-events 0 + :grab-window container-or-id + :event-mask xcb:EventMask:NoEvent + :pointer-mode xcb:GrabMode:Async + :keyboard-mode xcb:GrabMode:Async + :confine-to xcb:Window:None + :cursor xcb:Cursor:None + :time xcb:Time:CurrentTime)) + 'status))) + (with-slots (root-x root-y win-x win-y) + (xcb:+request-unchecked+reply exwm--connection + (make-instance 'xcb:QueryPointer :window id)) + (if (not (bufferp buffer-or-id)) + ;; Unmanaged. + (unless (eq type xcb:ewmh:_NET_WM_MOVERESIZE_MOVE) + (with-slots ((width* width) + (height* height)) + (xcb:+request-unchecked+reply exwm--connection + (make-instance 'xcb:GetGeometry :drawable id)) + (setq width width* + height height*))) + ;; Managed. + (select-window (frame-first-window frame)) ;transfer input focus + (setq width (frame-pixel-width frame) + height (frame-pixel-height frame)) + (unless type + ;; Determine the resize type according to the pointer position + ;; Clicking the center 1/3 part to resize has no effect + (setq x (/ (* 3 win-x) (float width)) + y (/ (* 3 win-y) (float height)) + type (cond ((and (< x 1) (< y 1)) + xcb:ewmh:_NET_WM_MOVERESIZE_SIZE_TOPLEFT) + ((and (> x 2) (< y 1)) + xcb:ewmh:_NET_WM_MOVERESIZE_SIZE_TOPRIGHT) + ((and (> x 2) (> y 2)) + xcb:ewmh:_NET_WM_MOVERESIZE_SIZE_BOTTOMRIGHT) + ((and (< x 1) (> y 2)) + xcb:ewmh:_NET_WM_MOVERESIZE_SIZE_BOTTOMLEFT) + ((> x 2) xcb:ewmh:_NET_WM_MOVERESIZE_SIZE_RIGHT) + ((> y 2) xcb:ewmh:_NET_WM_MOVERESIZE_SIZE_BOTTOM) + ((< x 1) xcb:ewmh:_NET_WM_MOVERESIZE_SIZE_LEFT) + ((< y 1) xcb:ewmh:_NET_WM_MOVERESIZE_SIZE_TOP))))) + (if (not type) + (exwm-floating--stop-moveresize) + (cond ((= type xcb:ewmh:_NET_WM_MOVERESIZE_MOVE) + (setq cursor exwm-floating--cursor-move + exwm-floating--moveresize-calculate + (lambda (x y) + (vector buffer-or-id + (eval-when-compile + (logior xcb:ConfigWindow:X + xcb:ConfigWindow:Y)) + (- x win-x) (- y win-y) 0 0)))) + ((= type xcb:ewmh:_NET_WM_MOVERESIZE_SIZE_TOPLEFT) + (setq cursor exwm-floating--cursor-top-left + exwm-floating--moveresize-calculate + (lambda (x y) + (vector buffer-or-id + (eval-when-compile + (logior xcb:ConfigWindow:X + xcb:ConfigWindow:Y + xcb:ConfigWindow:Width + xcb:ConfigWindow:Height)) + (- x win-x) (- y win-y) + (- (+ root-x width) x) + (- (+ root-y height) y))))) + ((= type xcb:ewmh:_NET_WM_MOVERESIZE_SIZE_TOP) + (setq cursor exwm-floating--cursor-top + exwm-floating--moveresize-calculate + (lambda (_x y) + (vector buffer-or-id + (eval-when-compile + (logior xcb:ConfigWindow:Y + xcb:ConfigWindow:Height)) + 0 (- y win-y) 0 (- (+ root-y height) y))))) + ((= type xcb:ewmh:_NET_WM_MOVERESIZE_SIZE_TOPRIGHT) + (setq cursor exwm-floating--cursor-top-right + exwm-floating--moveresize-calculate + (lambda (x y) + (vector buffer-or-id + (eval-when-compile + (logior xcb:ConfigWindow:Y + xcb:ConfigWindow:Width + xcb:ConfigWindow:Height)) + 0 (- y win-y) (- x (- root-x width)) + (- (+ root-y height) y))))) + ((= type xcb:ewmh:_NET_WM_MOVERESIZE_SIZE_RIGHT) + (setq cursor exwm-floating--cursor-right + exwm-floating--moveresize-calculate + (lambda (x _y) + (vector buffer-or-id + xcb:ConfigWindow:Width + 0 0 (- x (- root-x width)) 0)))) + ((= type xcb:ewmh:_NET_WM_MOVERESIZE_SIZE_BOTTOMRIGHT) + (setq cursor exwm-floating--cursor-bottom-right + exwm-floating--moveresize-calculate + (lambda (x y) + (vector buffer-or-id + (eval-when-compile + (logior xcb:ConfigWindow:Width + xcb:ConfigWindow:Height)) + 0 0 (- x (- root-x width)) + (- y (- root-y height)))))) + ((= type xcb:ewmh:_NET_WM_MOVERESIZE_SIZE_BOTTOM) + (setq cursor exwm-floating--cursor-bottom + exwm-floating--moveresize-calculate + (lambda (_x y) + (vector buffer-or-id + xcb:ConfigWindow:Height + 0 0 0 (- y (- root-y height)))))) + ((= type xcb:ewmh:_NET_WM_MOVERESIZE_SIZE_BOTTOMLEFT) + (setq cursor exwm-floating--cursor-bottom-left + exwm-floating--moveresize-calculate + (lambda (x y) + (vector buffer-or-id + (eval-when-compile + (logior xcb:ConfigWindow:X + xcb:ConfigWindow:Width + xcb:ConfigWindow:Height)) + (- x win-x) + 0 + (- (+ root-x width) x) + (- y (- root-y height)))))) + ((= type xcb:ewmh:_NET_WM_MOVERESIZE_SIZE_LEFT) + (setq cursor exwm-floating--cursor-left + exwm-floating--moveresize-calculate + (lambda (x _y) + (vector buffer-or-id + (eval-when-compile + (logior xcb:ConfigWindow:X + xcb:ConfigWindow:Width)) + (- x win-x) 0 (- (+ root-x width) x) 0))))) + ;; Select events and change cursor (should always succeed) + (xcb:+request-unchecked+reply exwm--connection + (make-instance 'xcb:GrabPointer + :owner-events 0 :grab-window container-or-id + :event-mask (eval-when-compile + (logior xcb:EventMask:ButtonRelease + xcb:EventMask:ButtonMotion)) + :pointer-mode xcb:GrabMode:Async + :keyboard-mode xcb:GrabMode:Async + :confine-to xcb:Window:None + :cursor cursor + :time xcb:Time:CurrentTime))))))) + +(defun exwm-floating--stop-moveresize (&rest _args) + "Stop move/resize." + (exwm--log) + (xcb:+request exwm--connection + (make-instance 'xcb:UngrabPointer :time xcb:Time:CurrentTime)) + (when exwm-floating--moveresize-calculate + (let (result buffer-or-id outer-id container-id) + (setq result (funcall exwm-floating--moveresize-calculate 0 0) + buffer-or-id (aref result 0)) + (when (bufferp buffer-or-id) + (with-current-buffer buffer-or-id + (setq outer-id (frame-parameter exwm--floating-frame 'exwm-outer-id) + container-id (frame-parameter exwm--floating-frame + 'exwm-container)) + (with-slots (x y width height border-width) + (xcb:+request-unchecked+reply exwm--connection + (make-instance 'xcb:GetGeometry + :drawable container-id)) + ;; Notify Emacs frame about this the position change. + (xcb:+request exwm--connection + (make-instance 'xcb:SendEvent + :propagate 0 + :destination outer-id + :event-mask xcb:EventMask:StructureNotify + :event + (xcb:marshal + (make-instance 'xcb:ConfigureNotify + :event outer-id + :window outer-id + :above-sibling xcb:Window:None + :x (+ x border-width) + :y (+ y border-width) + :width width + :height height + :border-width 0 + :override-redirect 0) + exwm--connection))) + (xcb:flush exwm--connection)) + (exwm-layout--show exwm--id + (frame-root-window exwm--floating-frame))))) + (setq exwm-floating--moveresize-calculate nil))) + +(defun exwm-floating--do-moveresize (data _synthetic) + "Perform move/resize." + (when exwm-floating--moveresize-calculate + (let* ((obj (make-instance 'xcb:MotionNotify)) + result value-mask x y width height buffer-or-id container-or-id) + (xcb:unmarshal obj data) + (setq result (funcall exwm-floating--moveresize-calculate + (slot-value obj 'root-x) (slot-value obj 'root-y)) + buffer-or-id (aref result 0) + value-mask (aref result 1) + x (aref result 2) + y (aref result 3) + width (max 1 (aref result 4)) + height (max 1 (aref result 5))) + (if (not (bufferp buffer-or-id)) + ;; Unmanaged. + (setq container-or-id buffer-or-id) + ;; Managed. + (setq container-or-id + (with-current-buffer buffer-or-id + (frame-parameter exwm--floating-frame 'exwm-container)) + x (- x exwm-floating-border-width) + ;; Use `frame-outer-height' in the future. + y (- y exwm-floating-border-width + exwm-workspace--window-y-offset) + height (+ height exwm-workspace--window-y-offset))) + (xcb:+request exwm--connection + (make-instance 'xcb:ConfigureWindow + :window container-or-id + :value-mask (aref result 1) + :x x + :y y + :width width + :height height)) + (when (bufferp buffer-or-id) + ;; Managed. + (setq value-mask (logand value-mask (logior xcb:ConfigWindow:Width + xcb:ConfigWindow:Height))) + (when (/= 0 value-mask) + (with-current-buffer buffer-or-id + (xcb:+request exwm--connection + (make-instance 'xcb:ConfigureWindow + :window (frame-parameter exwm--floating-frame + 'exwm-outer-id) + :value-mask value-mask + :width width + :height height))))) + (xcb:flush exwm--connection)))) + +(defun exwm-floating-move (&optional delta-x delta-y) + "Move a floating window right by DELTA-X pixels and down by DELTA-Y pixels. + +Both DELTA-X and DELTA-Y default to 1. This command should be bound locally." + (exwm--log "delta-x: %s, delta-y: %s" delta-x delta-y) + (unless (and (derived-mode-p 'exwm-mode) exwm--floating-frame) + (user-error "[EXWM] `exwm-floating-move' is only for floating X windows")) + (unless delta-x (setq delta-x 1)) + (unless delta-y (setq delta-y 1)) + (unless (and (= 0 delta-x) (= 0 delta-y)) + (let* ((floating-container (frame-parameter exwm--floating-frame + 'exwm-container)) + (geometry (xcb:+request-unchecked+reply exwm--connection + (make-instance 'xcb:GetGeometry + :drawable floating-container))) + (edges (window-inside-absolute-pixel-edges))) + (with-slots (x y) geometry + (exwm--set-geometry floating-container + (+ x delta-x) (+ y delta-y) nil nil)) + (exwm--set-geometry exwm--id + (+ (pop edges) delta-x) + (+ (pop edges) delta-y) + nil nil)) + (xcb:flush exwm--connection))) + +(defun exwm-floating--init () + "Initialize floating module." + (exwm--log) + ;; Initialize cursors for moving/resizing a window + (xcb:cursor:init exwm--connection) + (setq exwm-floating--cursor-move + (xcb:cursor:load-cursor exwm--connection "fleur") + exwm-floating--cursor-top-left + (xcb:cursor:load-cursor exwm--connection "top_left_corner") + exwm-floating--cursor-top + (xcb:cursor:load-cursor exwm--connection "top_side") + exwm-floating--cursor-top-right + (xcb:cursor:load-cursor exwm--connection "top_right_corner") + exwm-floating--cursor-right + (xcb:cursor:load-cursor exwm--connection "right_side") + exwm-floating--cursor-bottom-right + (xcb:cursor:load-cursor exwm--connection "bottom_right_corner") + exwm-floating--cursor-bottom + (xcb:cursor:load-cursor exwm--connection "bottom_side") + exwm-floating--cursor-bottom-left + (xcb:cursor:load-cursor exwm--connection "bottom_left_corner") + exwm-floating--cursor-left + (xcb:cursor:load-cursor exwm--connection "left_side"))) + +(defun exwm-floating--exit () + "Exit the floating module." + (exwm--log)) + + + +(provide 'exwm-floating) + +;;; exwm-floating.el ends here diff --git a/elpa/exwm-0.24/exwm-floating.elc b/elpa/exwm-0.24/exwm-floating.elc new file mode 100644 index 0000000..ca66bca Binary files /dev/null and b/elpa/exwm-0.24/exwm-floating.elc differ diff --git a/elpa/exwm-0.24/exwm-input.el b/elpa/exwm-0.24/exwm-input.el new file mode 100644 index 0000000..2d78407 --- /dev/null +++ b/elpa/exwm-0.24/exwm-input.el @@ -0,0 +1,1221 @@ +;;; exwm-input.el --- Input Module for EXWM -*- lexical-binding: t -*- + +;; Copyright (C) 2015-2020 Free Software Foundation, Inc. + +;; Author: Chris Feng + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This module deals with key/mouse matters, including: +;; + Input focus, +;; + Key/Button event handling, +;; + Key events filtering and simulation. + +;; Todo: +;; + Pointer simulation mode (e.g. 'C-c 1'/'C-c 2' for single/double click, +;; move with arrow keys). +;; + Simulation keys to mimic Emacs key bindings for text edit (redo, select, +;; cancel, clear, etc). Some of them are not present on common keyboard +;; (keycode = 0). May need to use XKB extension. + +;;; Code: + +(require 'xcb-keysyms) +(require 'exwm-core) + +(defgroup exwm-input nil + "Input." + :version "25.3" + :group 'exwm) + +(defcustom exwm-input-prefix-keys + '(?\C-x ?\C-u ?\C-h ?\M-x ?\M-` ?\M-& ?\M-:) + "List of prefix keys EXWM should forward to Emacs when in line-mode. + +The point is to make keys like 'C-x C-f' forwarded to Emacs in line-mode. +There is no need to add prefix keys for global/simulation keys or those +defined in `exwm-mode-map' here." + :type '(repeat key-sequence) + :get (lambda (symbol) + (mapcar #'vector (default-value symbol))) + :set (lambda (symbol value) + (set symbol (mapcar (lambda (i) + (if (sequencep i) + (aref i 0) + i)) + value)))) + +(defcustom exwm-input-move-event 's-down-mouse-1 + "Emacs event to start moving a window." + :type 'key-sequence + :get (lambda (symbol) + (let ((value (default-value symbol))) + (if (mouse-event-p value) + value + (vector value)))) + :set (lambda (symbol value) + (set symbol (if (sequencep value) + (aref value 0) + value)))) + +(defcustom exwm-input-resize-event 's-down-mouse-3 + "Emacs event to start resizing a window." + :type 'key-sequence + :get (lambda (symbol) + (let ((value (default-value symbol))) + (if (mouse-event-p value) + value + (vector value)))) + :set (lambda (symbol value) + (set symbol (if (sequencep value) + (aref value 0) + value)))) + +(defcustom exwm-input-line-mode-passthrough nil + "Non-nil makes 'line-mode' forward all events to Emacs." + :type 'boolean) + +;; Input focus update requests should be accumulated for a short time +;; interval so that only the last one need to be processed. This not +;; improves the overall performance, but avoids the problem of input +;; focus loop, which is a result of the interaction with Emacs frames. +;; +;; FIXME: The time interval is hard to decide and perhaps machine-dependent. +;; A value too small can cause redundant updates of input focus, +;; and even worse, dead loops. OTOH a large value would bring +;; laggy experience. +(defconst exwm-input--update-focus-interval 0.01 + "Time interval (in seconds) for accumulating input focus update requests.") + +(defvar exwm-input--during-command nil + "Indicate whether between `pre-command-hook' and `post-command-hook'.") + +(defvar exwm-input--global-keys nil "Global key bindings.") + +(defvar exwm-input--global-prefix-keys nil + "List of prefix keys of global key bindings.") + +(defvar exwm-input--line-mode-cache nil "Cache for incomplete key sequence.") + +(defvar exwm-input--local-simulation-keys nil + "Whether simulation keys are local.") + +(defvar exwm-input--simulation-keys nil "Simulation keys in line-mode.") + +(defvar exwm-input--skip-buffer-list-update nil + "Skip the upcoming 'buffer-list-update'.") + +(defvar exwm-input--temp-line-mode nil + "Non-nil indicates it's in temporary line-mode for char-mode.") + +(defvar exwm-input--timestamp-atom nil) + +(defvar exwm-input--timestamp-callback nil) + +(defvar exwm-input--timestamp-window nil) + +(defvar exwm-input--update-focus-defer-timer nil "Timer for polling the lock.") + +(defvar exwm-input--update-focus-lock nil + "Lock for solving input focus update contention.") + +(defvar exwm-input--update-focus-timer nil + "Timer for deferring the update of input focus.") + +(defvar exwm-input--update-focus-window nil "The (Emacs) window to be focused. +This value should always be overwritten.") + +(defvar exwm-input--echo-area-timer nil "Timer for detecting echo area dirty.") + +(defvar exwm-input--event-hook nil + "Hook to run when EXWM receives an event.") + +(defvar exwm-input-input-mode-change-hook nil + "Hook to run when an input mode changes on an `exwm-mode' buffer. +Current buffer will be the `exwm-mode' buffer when this hook runs.") + +(defvar exwm-workspace--current) +(declare-function exwm-floating--do-moveresize "exwm-floating.el" + (data _synthetic)) +(declare-function exwm-floating--start-moveresize "exwm-floating.el" + (id &optional type)) +(declare-function exwm-floating--stop-moveresize "exwm-floating.el" + (&rest _args)) +(declare-function exwm-layout--iconic-state-p "exwm-layout.el" (&optional id)) +(declare-function exwm-layout--show "exwm-layout.el" (id &optional window)) +(declare-function exwm-reset "exwm.el" ()) +(declare-function exwm-workspace--client-p "exwm-workspace.el" + (&optional frame)) +(declare-function exwm-workspace--minibuffer-own-frame-p "exwm-workspace.el") +(declare-function exwm-workspace--workspace-p "exwm-workspace.el" (workspace)) +(declare-function exwm-workspace-switch "exwm-workspace.el" + (frame-or-index &optional force)) + +(defun exwm-input--set-focus (id) + "Set input focus to window ID in a proper way." + (let ((from (slot-value (xcb:+request-unchecked+reply exwm--connection + (make-instance 'xcb:GetInputFocus)) + 'focus)) + tree) + (if (or (exwm--id->buffer from) + (eq from id)) + (exwm--log "#x%x => #x%x" (or from 0) (or id 0)) + ;; Attempt to find the top-level X window for a 'focus proxy'. + (unless (= from xcb:Window:None) + (setq tree (xcb:+request-unchecked+reply exwm--connection + (make-instance 'xcb:QueryTree + :window from))) + (when tree + (setq from (slot-value tree 'parent)))) + (exwm--log "#x%x (corrected) => #x%x" (or from 0) (or id 0))) + (when (and (exwm--id->buffer id) + ;; Avoid redundant input focus transfer. + (not (eq from id))) + (with-current-buffer (exwm--id->buffer id) + (exwm-input--update-timestamp + (lambda (timestamp id send-input-focus wm-take-focus) + (when send-input-focus + (xcb:+request exwm--connection + (make-instance 'xcb:SetInputFocus + :revert-to xcb:InputFocus:Parent + :focus id + :time timestamp))) + (when wm-take-focus + (let ((event (make-instance 'xcb:icccm:WM_TAKE_FOCUS + :window id + :time timestamp))) + (setq event (xcb:marshal event exwm--connection)) + (xcb:+request exwm--connection + (make-instance 'xcb:icccm:SendEvent + :destination id + :event event)))) + (exwm-input--set-active-window id) + (xcb:flush exwm--connection)) + id + (or exwm--hints-input + (not (memq xcb:Atom:WM_TAKE_FOCUS exwm--protocols))) + (memq xcb:Atom:WM_TAKE_FOCUS exwm--protocols)))))) + +(defun exwm-input--update-timestamp (callback &rest args) + "Fetch the latest timestamp from the server and feed it to CALLBACK. + +ARGS are additional arguments to CALLBACK." + (setq exwm-input--timestamp-callback (cons callback args)) + (exwm--log) + (xcb:+request exwm--connection + (make-instance 'xcb:ChangeProperty + :mode xcb:PropMode:Replace + :window exwm-input--timestamp-window + :property exwm-input--timestamp-atom + :type xcb:Atom:CARDINAL + :format 32 + :data-len 0 + :data nil)) + (xcb:flush exwm--connection)) + +(defun exwm-input--on-PropertyNotify (data _synthetic) + "Handle PropertyNotify events." + (exwm--log) + (when exwm-input--timestamp-callback + (let ((obj (make-instance 'xcb:PropertyNotify))) + (xcb:unmarshal obj data) + (when (= exwm-input--timestamp-window + (slot-value obj 'window)) + (apply (car exwm-input--timestamp-callback) + (slot-value obj 'time) + (cdr exwm-input--timestamp-callback)) + (setq exwm-input--timestamp-callback nil))))) + +(defvar exwm-input--last-enter-notify-position nil) + +(defun exwm-input--on-EnterNotify (data _synthetic) + "Handle EnterNotify events." + (let ((evt (make-instance 'xcb:EnterNotify)) + buffer window frame frame-xid edges fake-evt) + (xcb:unmarshal evt data) + (with-slots (time root event root-x root-y event-x event-y state) evt + (setq buffer (exwm--id->buffer event) + window (get-buffer-window buffer t)) + (exwm--log "buffer=%s; window=%s" buffer window) + (when (and buffer window (not (eq window (selected-window))) + (not (equal exwm-input--last-enter-notify-position + (vector root-x root-y)))) + (setq frame (window-frame window) + frame-xid (frame-parameter frame 'exwm-id)) + (unless (eq frame exwm-workspace--current) + (if (exwm-workspace--workspace-p frame) + ;; The X window is on another workspace. + (exwm-workspace-switch frame) + (with-current-buffer buffer + (when (and (derived-mode-p 'exwm-mode) + (not (eq exwm--frame exwm-workspace--current))) + ;; The floating X window is on another workspace. + (exwm-workspace-switch exwm--frame))))) + ;; Send a fake MotionNotify event to Emacs. + (setq edges (window-inside-pixel-edges window) + fake-evt (make-instance 'xcb:MotionNotify + :detail 0 + :time time + :root root + :event frame-xid + :child xcb:Window:None + :root-x root-x + :root-y root-y + :event-x (+ event-x (elt edges 0)) + :event-y (+ event-y (elt edges 1)) + :state state + :same-screen 1)) + (xcb:+request exwm--connection + (make-instance 'xcb:SendEvent + :propagate 0 + :destination frame-xid + :event-mask xcb:EventMask:NoEvent + :event (xcb:marshal fake-evt exwm--connection))) + (xcb:flush exwm--connection)) + (setq exwm-input--last-enter-notify-position (vector root-x root-y))))) + +(defun exwm-input--on-keysyms-update () + (exwm--log) + (let ((exwm-input--global-prefix-keys nil)) + (exwm-input--update-global-prefix-keys))) + +(defun exwm-input--on-buffer-list-update () + "Run in `buffer-list-update-hook' to track input focus." + (when (and (not (exwm-workspace--client-p)) + (not exwm-input--skip-buffer-list-update)) + (exwm--log "current-buffer=%S selected-window=%S" + (current-buffer) (selected-window)) + (redirect-frame-focus (selected-frame) nil) + (setq exwm-input--update-focus-window (selected-window)) + (exwm-input--update-focus-defer))) + +(defun exwm-input--update-focus-defer () + "Defer updating input focus." + (when exwm-input--update-focus-defer-timer + (cancel-timer exwm-input--update-focus-defer-timer)) + (if exwm-input--update-focus-lock + (setq exwm-input--update-focus-defer-timer + (exwm--defer 0 #'exwm-input--update-focus-defer)) + (setq exwm-input--update-focus-defer-timer nil) + (when exwm-input--update-focus-timer + (cancel-timer exwm-input--update-focus-timer)) + (setq exwm-input--update-focus-timer + ;; Attempt to accumulate successive events close enough. + (run-with-timer exwm-input--update-focus-interval + nil + #'exwm-input--update-focus-commit + exwm-input--update-focus-window)))) + +(defun exwm-input--update-focus-commit (window) + "Commit updating input focus." + (setq exwm-input--update-focus-lock t) + (unwind-protect + (exwm-input--update-focus window) + (setq exwm-input--update-focus-lock nil))) + +(defun exwm-input--update-focus (window) + "Update input focus." + (when (window-live-p window) + (exwm--log "focus-window=%s focus-buffer=%s" window (window-buffer window)) + (with-current-buffer (window-buffer window) + (if (derived-mode-p 'exwm-mode) + (if (not (eq exwm--frame exwm-workspace--current)) + (progn + (set-frame-parameter exwm--frame 'exwm-selected-window window) + (exwm--defer 0 #'exwm-workspace-switch exwm--frame)) + (exwm--log "Set focus on #x%x" exwm--id) + (when exwm--floating-frame + ;; Adjust stacking orders of the floating X window. + (xcb:+request exwm--connection + (make-instance 'xcb:ConfigureWindow + :window exwm--id + :value-mask xcb:ConfigWindow:StackMode + :stack-mode xcb:StackMode:TopIf)) + (xcb:+request exwm--connection + (make-instance 'xcb:ConfigureWindow + :window (frame-parameter exwm--floating-frame + 'exwm-container) + :value-mask (logior + xcb:ConfigWindow:Sibling + xcb:ConfigWindow:StackMode) + :sibling exwm--id + :stack-mode xcb:StackMode:Below)) + ;; This floating X window might be hide by `exwm-floating-hide'. + (when (exwm-layout--iconic-state-p) + (exwm-layout--show exwm--id window)) + (xcb:flush exwm--connection)) + (exwm-input--set-focus exwm--id)) + (when (eq (selected-window) window) + (exwm--log "Focus on %s" window) + (if (and (exwm-workspace--workspace-p (selected-frame)) + (not (eq (selected-frame) exwm-workspace--current))) + ;; The focus is on another workspace (e.g. it got clicked) + ;; so switch to it. + (progn + (exwm--log "Switching to %s's workspace %s (%s)" + window + (window-frame window) + (selected-frame)) + (set-frame-parameter (selected-frame) 'exwm-selected-window + window) + (exwm--defer 0 #'exwm-workspace-switch (selected-frame))) + ;; The focus is still on the current workspace. + (if (not (and (exwm-workspace--minibuffer-own-frame-p) + (minibufferp))) + (x-focus-frame (window-frame window)) + ;; X input focus should be set on the previously selected + ;; frame. + (x-focus-frame (window-frame (minibuffer-window)))) + (exwm-input--set-active-window) + (xcb:flush exwm--connection))))))) + +(defun exwm-input--set-active-window (&optional id) + "Set _NET_ACTIVE_WINDOW." + (exwm--log) + (xcb:+request exwm--connection + (make-instance 'xcb:ewmh:set-_NET_ACTIVE_WINDOW + :window exwm--root + :data (or id xcb:Window:None)))) + +(defun exwm-input--on-ButtonPress (data _synthetic) + "Handle ButtonPress event." + (let ((obj (make-instance 'xcb:ButtonPress)) + (mode xcb:Allow:SyncPointer) + button-event window buffer frame) + (xcb:unmarshal obj data) + (exwm--log "major-mode=%s buffer=%s" + major-mode (buffer-name (current-buffer))) + (with-slots (detail event state) obj + (setq button-event (xcb:keysyms:keysym->event exwm--connection + detail state) + buffer (exwm--id->buffer event) + window (get-buffer-window buffer t)) + (cond ((and (eq button-event exwm-input-move-event) + buffer + ;; Either an undecorated or a floating X window. + (with-current-buffer buffer + (or (not (derived-mode-p 'exwm-mode)) + exwm--floating-frame))) + ;; Move + (exwm-floating--start-moveresize + event xcb:ewmh:_NET_WM_MOVERESIZE_MOVE)) + ((and (eq button-event exwm-input-resize-event) + buffer + (with-current-buffer buffer + (or (not (derived-mode-p 'exwm-mode)) + exwm--floating-frame))) + ;; Resize + (exwm-floating--start-moveresize event)) + (buffer + ;; Click to focus + (unless (eq window (selected-window)) + (setq frame (window-frame window)) + (unless (eq frame exwm-workspace--current) + (if (exwm-workspace--workspace-p frame) + ;; The X window is on another workspace + (exwm-workspace-switch frame) + (with-current-buffer buffer + (when (and (derived-mode-p 'exwm-mode) + (not (eq exwm--frame + exwm-workspace--current))) + ;; The floating X window is on another workspace + (exwm-workspace-switch exwm--frame))))) + ;; It has been reported that the `window' may have be deleted + (if (window-live-p window) + (select-window window) + (setq window (get-buffer-window buffer t)) + (when window (select-window window)))) + ;; Also process keybindings. + (with-current-buffer buffer + (when (derived-mode-p 'exwm-mode) + (cl-case exwm--input-mode + (line-mode + (setq mode (exwm-input--on-ButtonPress-line-mode + buffer button-event))) + (char-mode + (setq mode (exwm-input--on-ButtonPress-char-mode))))))) + (t + ;; Replay this event by default. + (setq mode xcb:Allow:ReplayPointer)))) + (xcb:+request exwm--connection + (make-instance 'xcb:AllowEvents :mode mode :time xcb:Time:CurrentTime)) + (xcb:flush exwm--connection)) + (run-hooks 'exwm-input--event-hook)) + +(defun exwm-input--on-KeyPress (data _synthetic) + "Handle KeyPress event." + (with-current-buffer (window-buffer (selected-window)) + (let ((obj (make-instance 'xcb:KeyPress))) + (xcb:unmarshal obj data) + (exwm--log "major-mode=%s buffer=%s" + major-mode (buffer-name (current-buffer))) + (if (derived-mode-p 'exwm-mode) + (cl-case exwm--input-mode + (line-mode + (exwm-input--on-KeyPress-line-mode obj data)) + (char-mode + (exwm-input--on-KeyPress-char-mode obj data))) + (exwm-input--on-KeyPress-char-mode obj))) + (run-hooks 'exwm-input--event-hook))) + +(defun exwm-input--on-CreateNotify (data _synthetic) + "Handle CreateNotify events." + (exwm--log) + (let ((evt (make-instance 'xcb:CreateNotify))) + (xcb:unmarshal evt data) + (with-slots (window) evt + (exwm-input--grab-global-prefix-keys window)))) + +(defun exwm-input--update-global-prefix-keys () + "Update `exwm-input--global-prefix-keys'." + (exwm--log) + (when exwm--connection + (let ((original exwm-input--global-prefix-keys)) + (setq exwm-input--global-prefix-keys nil) + (dolist (i exwm-input--global-keys) + (cl-pushnew (elt i 0) exwm-input--global-prefix-keys)) + (unless (equal original exwm-input--global-prefix-keys) + (apply #'exwm-input--grab-global-prefix-keys + (slot-value (xcb:+request-unchecked+reply exwm--connection + (make-instance 'xcb:QueryTree + :window exwm--root)) + 'children)))))) + +(defun exwm-input--grab-global-prefix-keys (&rest xwins) + (exwm--log) + (let ((req (make-instance 'xcb:GrabKey + :owner-events 0 + :grab-window nil + :modifiers nil + :key nil + :pointer-mode xcb:GrabMode:Async + :keyboard-mode xcb:GrabMode:Async)) + keysyms keycode alt-modifier) + (dolist (k exwm-input--global-prefix-keys) + (setq keysyms (xcb:keysyms:event->keysyms exwm--connection k)) + (if (not keysyms) + (warn "Key unavailable: %s" (key-description (vector k))) + (setq keycode (xcb:keysyms:keysym->keycode exwm--connection + (caar keysyms))) + (exwm--log "Grabbing key=%s (keysyms=%s keycode=%s)" + (single-key-description k) keysyms keycode) + (dolist (keysym keysyms) + (setf (slot-value req 'modifiers) (cdr keysym) + (slot-value req 'key) keycode) + ;; Also grab this key with num-lock mask set. + (when (and (/= 0 xcb:keysyms:num-lock-mask) + (= 0 (logand (cdr keysym) xcb:keysyms:num-lock-mask))) + (setf alt-modifier (logior (cdr keysym) + xcb:keysyms:num-lock-mask))) + (dolist (xwin xwins) + (setf (slot-value req 'grab-window) xwin) + (xcb:+request exwm--connection req) + (when alt-modifier + (setf (slot-value req 'modifiers) alt-modifier) + (xcb:+request exwm--connection req)))))) + (xcb:flush exwm--connection))) + +(defun exwm-input--set-key (key command) + (exwm--log "key: %s, command: %s" key command) + (global-set-key key command) + (cl-pushnew key exwm-input--global-keys)) + +(defcustom exwm-input-global-keys nil + "Global keys. + +It is an alist of the form (key . command), meaning giving KEY (a key +sequence) a global binding as COMMAND. + +Notes: +* Setting the value directly (rather than customizing it) after EXWM + finishes initialization has no effect." + :type '(alist :key-type key-sequence :value-type function) + :set (lambda (symbol value) + (when (boundp symbol) + (dolist (i (symbol-value symbol)) + (global-unset-key (car i)))) + (set symbol value) + (setq exwm-input--global-keys nil) + (dolist (i value) + (exwm-input--set-key (car i) (cdr i))) + (when exwm--connection + (exwm-input--update-global-prefix-keys)))) + +;;;###autoload +(defun exwm-input-set-key (key command) + "Set a global key binding. + +The new key binding only takes effect in real time when this command is +called interactively, and is lost when this session ends unless it's +specifically saved in the Customize interface for `exwm-input-global-keys'. + +In configuration you should customize or set `exwm-input-global-keys' +instead." + (interactive "KSet key globally: \nCSet key %s to command: ") + (exwm--log) + (setq exwm-input-global-keys (append exwm-input-global-keys + (list (cons key command)))) + (exwm-input--set-key key command) + (when (called-interactively-p 'any) + (exwm-input--update-global-prefix-keys))) + +;; Putting (t . EVENT) into `unread-command-events' does not really work +;; as documented for Emacs < 26.2. +(eval-and-compile + (if (or (< emacs-major-version 26) + (and (= emacs-major-version 26) + (< emacs-minor-version 2))) + (defsubst exwm-input--unread-event (event) + (setq unread-command-events + (append unread-command-events (list event)))) + (defsubst exwm-input--unread-event (event) + (setq unread-command-events + (append unread-command-events `((t . ,event))))))) + +(defun exwm-input--mimic-read-event (event) + "Process EVENT as if it were returned by `read-event'." + (exwm--log) + (unless (eq 0 extra-keyboard-modifiers) + (setq event (event-convert-list (append (event-modifiers + extra-keyboard-modifiers) + event)))) + (when (characterp event) + (let ((event* (when keyboard-translate-table + (aref keyboard-translate-table event)))) + (when event* + (setq event event*)))) + event) + +(cl-defun exwm-input--translate (key) + (let (translation) + (dolist (map (list input-decode-map + local-function-key-map + key-translation-map)) + (setq translation (lookup-key map key)) + (if (functionp translation) + (cl-return-from exwm-input--translate (funcall translation nil)) + (when (vectorp translation) + (cl-return-from exwm-input--translate translation))))) + key) + +(defun exwm-input--cache-event (event &optional temp-line-mode) + "Cache EVENT." + (exwm--log "%s" event) + (setq exwm-input--line-mode-cache + (vconcat exwm-input--line-mode-cache (vector event))) + ;; Attempt to translate this key sequence. + (setq exwm-input--line-mode-cache + (exwm-input--translate exwm-input--line-mode-cache)) + ;; When the key sequence is complete (not a keymap). + ;; Note that `exwm-input--line-mode-cache' might get translated to nil, for + ;; example 'mouse--down-1-maybe-follows-link' does this. + (if (and exwm-input--line-mode-cache + (keymapp (key-binding exwm-input--line-mode-cache))) + ;; Grab keyboard temporarily to intercept the complete key sequence. + (when temp-line-mode + (setq exwm-input--temp-line-mode t) + (exwm-input--grab-keyboard)) + (setq exwm-input--line-mode-cache nil) + (when exwm-input--temp-line-mode + (setq exwm-input--temp-line-mode nil) + (exwm-input--release-keyboard)))) + +(defun exwm-input--event-passthrough-p (event) + "Whether EVENT should be passed to Emacs. +Current buffer must be an `exwm-mode' buffer." + (or exwm-input-line-mode-passthrough + exwm-input--during-command + ;; Forward the event when there is an incomplete key + ;; sequence or when the minibuffer is active. + exwm-input--line-mode-cache + (eq (active-minibuffer-window) (selected-window)) + ;; + (memq event exwm-input--global-prefix-keys) + (memq event exwm-input-prefix-keys) + (when overriding-terminal-local-map + (lookup-key overriding-terminal-local-map + (vector event))) + (lookup-key (current-local-map) (vector event)) + (gethash event exwm-input--simulation-keys))) + +(defun exwm-input--noop (&rest _args) + "A placeholder command." + (interactive)) + +(defun exwm-input--on-KeyPress-line-mode (key-press raw-data) + "Parse X KeyPress event to Emacs key event and then feed the command loop." + (with-slots (detail state) key-press + (let ((keysym (xcb:keysyms:keycode->keysym exwm--connection detail state)) + event raw-event mode) + (exwm--log "%s" keysym) + (when (and (/= 0 (car keysym)) + (setq raw-event (xcb:keysyms:keysym->event + exwm--connection (car keysym) + (logand state (lognot (cdr keysym))))) + (setq event (exwm-input--mimic-read-event raw-event)) + (exwm-input--event-passthrough-p event)) + (setq mode xcb:Allow:AsyncKeyboard) + (exwm-input--cache-event event) + (exwm-input--unread-event raw-event)) + (unless mode + (if (= 0 (logand #x6000 state)) ;Check the 13~14 bits. + ;; Not an XKB state; just replay it. + (setq mode xcb:Allow:ReplayKeyboard) + ;; An XKB state; sent it with SendEvent. + ;; FIXME: Can this also be replayed? + ;; FIXME: KeyRelease events are lost. + (setq mode xcb:Allow:AsyncKeyboard) + (xcb:+request exwm--connection + (make-instance 'xcb:SendEvent + :propagate 0 + :destination (slot-value key-press 'event) + :event-mask xcb:EventMask:NoEvent + :event raw-data))) + (if defining-kbd-macro + (when event + ;; Make Emacs aware of this event when defining keyboard macros. + (set-transient-map `(keymap (t . ,#'exwm-input--noop))) + (exwm-input--unread-event event)) + ;; Fool some packages into thinking there is a change in the buffer. + (when event + (setq last-command #'exwm-input--noop) + (run-hooks 'pre-command-hook) + (run-hooks 'post-command-hook)))) + (xcb:+request exwm--connection + (make-instance 'xcb:AllowEvents + :mode mode + :time xcb:Time:CurrentTime)) + (xcb:flush exwm--connection)))) + +(defun exwm-input--on-KeyPress-char-mode (key-press &optional _raw-data) + "Handle KeyPress event in char-mode." + (with-slots (detail state) key-press + (let ((keysym (xcb:keysyms:keycode->keysym exwm--connection detail state)) + event raw-event) + (exwm--log "%s" keysym) + (when (and (/= 0 (car keysym)) + (setq raw-event (xcb:keysyms:keysym->event + exwm--connection (car keysym) + (logand state (lognot (cdr keysym))))) + (setq event (exwm-input--mimic-read-event raw-event))) + (if (not (derived-mode-p 'exwm-mode)) + (exwm-input--unread-event raw-event) + (exwm-input--cache-event event t) + (exwm-input--unread-event raw-event))))) + (xcb:+request exwm--connection + (make-instance 'xcb:AllowEvents + :mode xcb:Allow:AsyncKeyboard + :time xcb:Time:CurrentTime)) + (xcb:flush exwm--connection)) + +(defun exwm-input--on-ButtonPress-line-mode (buffer button-event) + "Handle button events in line mode. +BUFFER is the `exwm-mode' buffer the event was generated +on. BUTTON-EVENT is the X event converted into an Emacs event. + +The return value is used as event_mode to release the original +button event." + (with-current-buffer buffer + (let ((read-event (exwm-input--mimic-read-event button-event))) + (exwm--log "%s" read-event) + (if (and read-event + (exwm-input--event-passthrough-p read-event)) + ;; The event should be forwarded to emacs + (progn + (exwm-input--cache-event read-event) + (exwm-input--unread-event button-event) + xcb:Allow:SyncPointer) + ;; The event should be replayed + xcb:Allow:ReplayPointer)))) + +(defun exwm-input--on-ButtonPress-char-mode () + "Handle button events in char-mode. +The return value is used as event_mode to release the original +button event." + (exwm--log) + xcb:Allow:ReplayPointer) + +(defun exwm-input--update-mode-line (id) + "Update the propertized `mode-line-process' for window ID." + (exwm--log "#x%x" id) + (let (help-echo cmd mode) + (with-current-buffer (exwm--id->buffer id) + (cl-case exwm--input-mode + (line-mode + (setq mode "line" + help-echo "mouse-1: Switch to char-mode" + cmd (lambda () + (interactive) + (exwm-input-release-keyboard id)))) + (char-mode + (setq mode "char" + help-echo "mouse-1: Switch to line-mode" + cmd (lambda () + (interactive) + (exwm-input-grab-keyboard id))))) + (setq mode-line-process + `(": " + (:propertize ,mode + help-echo ,help-echo + mouse-face mode-line-highlight + local-map + (keymap + (mode-line + keymap + (down-mouse-1 . ,cmd)))))) + (force-mode-line-update)))) + +(defun exwm-input--grab-keyboard (&optional id) + "Grab all key events on window ID." + (unless id (setq id (exwm--buffer->id (window-buffer)))) + (when id + (exwm--log "id=#x%x" id) + (when (xcb:+request-checked+request-check exwm--connection + (make-instance 'xcb:GrabKey + :owner-events 0 + :grab-window id + :modifiers xcb:ModMask:Any + :key xcb:Grab:Any + :pointer-mode xcb:GrabMode:Async + :keyboard-mode xcb:GrabMode:Sync)) + (exwm--log "Failed to grab keyboard for #x%x" id)) + (let ((buffer (exwm--id->buffer id))) + (when buffer + (with-current-buffer buffer + (setq exwm--input-mode 'line-mode) + (run-hooks 'exwm-input-input-mode-change-hook)))))) + +(defun exwm-input--release-keyboard (&optional id) + "Ungrab all key events on window ID." + (unless id (setq id (exwm--buffer->id (window-buffer)))) + (when id + (exwm--log "id=#x%x" id) + (when (xcb:+request-checked+request-check exwm--connection + (make-instance 'xcb:UngrabKey + :key xcb:Grab:Any + :grab-window id + :modifiers xcb:ModMask:Any)) + (exwm--log "Failed to release keyboard for #x%x" id)) + (exwm-input--grab-global-prefix-keys id) + (let ((buffer (exwm--id->buffer id))) + (when buffer + (with-current-buffer buffer + (setq exwm--input-mode 'char-mode) + (run-hooks 'exwm-input-input-mode-change-hook)))))) + +;;;###autoload +(defun exwm-input-grab-keyboard (&optional id) + "Switch to line-mode." + (interactive (list (when (derived-mode-p 'exwm-mode) + (exwm--buffer->id (window-buffer))))) + (when id + (exwm--log "id=#x%x" id) + (setq exwm--selected-input-mode 'line-mode) + (exwm-input--grab-keyboard id) + (exwm-input--update-mode-line id))) + +;;;###autoload +(defun exwm-input-release-keyboard (&optional id) + "Switch to char-mode." + (interactive (list (when (derived-mode-p 'exwm-mode) + (exwm--buffer->id (window-buffer))))) + (when id + (exwm--log "id=#x%x" id) + (setq exwm--selected-input-mode 'char-mode) + (exwm-input--release-keyboard id) + (exwm-input--update-mode-line id))) + +;;;###autoload +(defun exwm-input-toggle-keyboard (&optional id) + "Toggle between 'line-mode' and 'char-mode'." + (interactive (list (when (derived-mode-p 'exwm-mode) + (exwm--buffer->id (window-buffer))))) + (when id + (exwm--log "id=#x%x" id) + (with-current-buffer (exwm--id->buffer id) + (cl-case exwm--input-mode + (line-mode + (exwm-input-release-keyboard id)) + (char-mode + (exwm-reset)))))) + +(defun exwm-input--fake-key (event) + "Fake a key event equivalent to Emacs event EVENT." + (let* ((keysyms (xcb:keysyms:event->keysyms exwm--connection event)) + keycode id) + (when (= 0 (caar keysyms)) + (user-error "[EXWM] Invalid key: %s" (single-key-description event))) + (setq keycode (xcb:keysyms:keysym->keycode exwm--connection + (caar keysyms))) + (when (/= 0 keycode) + (setq id (exwm--buffer->id (window-buffer (selected-window)))) + (exwm--log "id=#x%x event=%s keycode" id event keycode) + (dolist (class '(xcb:KeyPress xcb:KeyRelease)) + (xcb:+request exwm--connection + (make-instance 'xcb:SendEvent + :propagate 0 :destination id + :event-mask xcb:EventMask:NoEvent + :event (xcb:marshal + (make-instance class + :detail keycode + :time xcb:Time:CurrentTime + :root exwm--root :event id + :child 0 + :root-x 0 :root-y 0 + :event-x 0 :event-y 0 + :state (cdar keysyms) + :same-screen 1) + exwm--connection))))) + (xcb:flush exwm--connection))) + +;;;###autoload +(cl-defun exwm-input-send-next-key (times &optional end-key) + "Send next key to client window. + +EXWM will prompt for the key to send. This command can be prefixed to send +multiple keys. If END-KEY is non-nil, stop sending keys if it's pressed." + (interactive "p") + (exwm--log) + (unless (derived-mode-p 'exwm-mode) + (cl-return-from exwm-input-send-next-key)) + (when (> times 12) (setq times 12)) + (let (key keys) + (dotimes (i times) + ;; Skip events not from keyboard + (let ((exwm-input-line-mode-passthrough t)) + (catch 'break + (while t + (setq key (read-key (format "Send key: %s (%d/%d) %s" + (key-description keys) + (1+ i) times + (if end-key + (concat "To exit, press: " + (key-description + (list end-key))) + "")))) + (unless (listp key) (throw 'break nil))))) + (setq keys (vconcat keys (vector key))) + (when (eq key end-key) (cl-return-from exwm-input-send-next-key)) + (exwm-input--fake-key key)))) + +(defun exwm-input--set-simulation-keys (simulation-keys &optional no-refresh) + "Set simulation keys." + (exwm--log "%s" simulation-keys) + (unless no-refresh + ;; Unbind simulation keys. + (let ((hash (buffer-local-value 'exwm-input--simulation-keys + (current-buffer)))) + (when (hash-table-p hash) + (maphash (lambda (key _value) + (when (sequencep key) + (if exwm-input--local-simulation-keys + (local-unset-key key) + (define-key exwm-mode-map key nil)))) + hash))) + ;; Abandon the old hash table. + (setq exwm-input--simulation-keys (make-hash-table :test #'equal))) + (dolist (i simulation-keys) + (let ((original (vconcat (car i))) + (simulated (cdr i))) + (setq simulated (if (sequencep simulated) + (append simulated nil) + (list simulated))) + ;; The key stored is a key sequence (vector). + ;; The value stored is a list of key events. + (puthash original simulated exwm-input--simulation-keys) + ;; Also mark the prefix key as used. + (puthash (aref original 0) t exwm-input--simulation-keys))) + ;; Update keymaps. + (maphash (lambda (key _value) + (when (sequencep key) + (if exwm-input--local-simulation-keys + (local-set-key key #'exwm-input-send-simulation-key) + (define-key exwm-mode-map key + #'exwm-input-send-simulation-key)))) + exwm-input--simulation-keys)) + +(defun exwm-input-set-simulation-keys (simulation-keys) + "Please customize or set `exwm-input-simulation-keys' instead." + (declare (obsolete nil "26")) + (exwm-input--set-simulation-keys simulation-keys)) + +(defcustom exwm-input-simulation-keys nil + "Simulation keys. + +It is an alist of the form (original-key . simulated-key), where both +original-key and simulated-key are key sequences. Original-key is what you +type to an X window in line-mode which then gets translated to simulated-key +by EXWM and forwarded to the X window. + +Notes: +* Setting the value directly (rather than customizing it) after EXWM + finishes initialization has no effect. +* Original-keys consist of multiple key events are only supported in Emacs + 26.2 and later. +* A minority of applications do not accept simulated keys by default. It's + required to customize them to accept events sent by SendEvent. +* The predefined examples in the Customize interface are not guaranteed to + work for all applications. This can be tweaked on a per application basis + with `exwm-input-set-local-simulation-keys'." + :type '(alist :key-type (key-sequence :tag "Original") + :value-type (choice (key-sequence :tag "User-defined") + (key-sequence :tag "Move left" [left]) + (key-sequence :tag "Move right" [right]) + (key-sequence :tag "Move up" [up]) + (key-sequence :tag "Move down" [down]) + (key-sequence :tag "Move to BOL" [home]) + (key-sequence :tag "Move to EOL" [end]) + (key-sequence :tag "Page up" [prior]) + (key-sequence :tag "Page down" [next]) + (key-sequence :tag "Copy" [C-c]) + (key-sequence :tag "Paste" [C-v]) + (key-sequence :tag "Delete" [delete]) + (key-sequence :tag "Delete to EOL" + [S-end delete]))) + :set (lambda (symbol value) + (set symbol value) + (exwm-input--set-simulation-keys value))) + +(defcustom exwm-input-pre-post-command-blacklist '(exit-minibuffer + abort-recursive-edit + minibuffer-keyboard-quit) + "Commands impossible to detect with `post-command-hook'." + :type '(repeat function)) + +(cl-defun exwm-input--read-keys (prompt stop-key) + (let ((cursor-in-echo-area t) + keys key) + (while (not (eq key stop-key)) + (setq key (read-key (format "%s (terminate with %s): %s" + prompt + (key-description (vector stop-key)) + (key-description keys))) + keys (vconcat keys (vector key)))) + (when (> (length keys) 1) + (substring keys 0 -1)))) + +;;;###autoload +(defun exwm-input-set-simulation-key (original-key simulated-key) + "Set a simulation key. + +The simulation key takes effect in real time, but is lost when this session +ends unless it's specifically saved in the Customize interface for +`exwm-input-simulation-keys'." + (interactive + (let (original simulated) + (setq original (exwm-input--read-keys "Translate from" ?\C-g)) + (when original + (setq simulated (exwm-input--read-keys + (format "Translate from %s to" + (key-description original)) + ?\C-g))) + (list original simulated))) + (exwm--log "original: %s, simulated: %s" original-key simulated-key) + (when (and original-key simulated-key) + (let ((entry `((,original-key . ,simulated-key)))) + (setq exwm-input-simulation-keys (append exwm-input-simulation-keys + entry)) + (exwm-input--set-simulation-keys entry t)))) + +(defun exwm-input--unset-simulation-keys () + "Clear simulation keys and key bindings defined." + (exwm--log) + (when (hash-table-p exwm-input--simulation-keys) + (maphash (lambda (key _value) + (when (sequencep key) + (define-key exwm-mode-map key nil))) + exwm-input--simulation-keys) + (clrhash exwm-input--simulation-keys))) + +(defun exwm-input-set-local-simulation-keys (simulation-keys) + "Set buffer-local simulation keys. + +SIMULATION-KEYS is an alist of the form (original-key . simulated-key), +where both ORIGINAL-KEY and SIMULATED-KEY are key sequences." + (exwm--log) + (make-local-variable 'exwm-input--simulation-keys) + (use-local-map (copy-keymap exwm-mode-map)) + (let ((exwm-input--local-simulation-keys t)) + (exwm-input--set-simulation-keys simulation-keys))) + +;;;###autoload +(cl-defun exwm-input-send-simulation-key (times) + "Fake a key event according to the last input key sequence." + (interactive "p") + (exwm--log) + (unless (derived-mode-p 'exwm-mode) + (cl-return-from exwm-input-send-simulation-key)) + (let ((keys (gethash (this-single-command-keys) + exwm-input--simulation-keys))) + (dotimes (_ times) + (dolist (key keys) + (exwm-input--fake-key key))))) + +;;;###autoload +(defmacro exwm-input-invoke-factory (keys) + "Make a command that invokes KEYS when called. + +One use is to access the keymap bound to KEYS (as prefix keys) in char-mode." + (let* ((keys (kbd keys)) + (description (key-description keys))) + `(defun ,(intern (concat "exwm-input--invoke--" description)) () + ,(format "Invoke `%s'." description) + (interactive) + (mapc (lambda (key) + (exwm-input--cache-event key t) + (exwm-input--unread-event key)) + ',(listify-key-sequence keys))))) + +(defun exwm-input--on-pre-command () + "Run in `pre-command-hook'." + (unless (or (eq this-command #'exwm-input--noop) + (memq this-command exwm-input-pre-post-command-blacklist)) + (setq exwm-input--during-command t))) + +(defun exwm-input--on-post-command () + "Run in `post-command-hook'." + (unless (eq this-command #'exwm-input--noop) + (setq exwm-input--during-command nil))) + +(defun exwm-input--on-minibuffer-setup () + "Run in `minibuffer-setup-hook' to grab keyboard if necessary." + (exwm--log) + (with-current-buffer + (window-buffer (frame-selected-window exwm-workspace--current)) + (when (and (derived-mode-p 'exwm-mode) + (not (exwm-workspace--client-p)) + (eq exwm--selected-input-mode 'char-mode)) + (exwm-input--grab-keyboard exwm--id)))) + +(defun exwm-input--on-minibuffer-exit () + "Run in `minibuffer-exit-hook' to release keyboard if necessary." + (exwm--log) + (with-current-buffer + (window-buffer (frame-selected-window exwm-workspace--current)) + (when (and (derived-mode-p 'exwm-mode) + (not (exwm-workspace--client-p)) + (eq exwm--selected-input-mode 'char-mode) + (eq exwm--input-mode 'line-mode)) + (exwm-input--release-keyboard exwm--id)))) + +(defun exwm-input--on-echo-area-dirty () + "Run when new message arrives to grab keyboard if necessary." + (exwm--log) + (when (and (not (active-minibuffer-window)) + (not (exwm-workspace--client-p)) + cursor-in-echo-area) + (exwm-input--on-minibuffer-setup))) + +(defun exwm-input--on-echo-area-clear () + "Run in `echo-area-clear-hook' to release keyboard if necessary." + (exwm--log) + (unless (current-message) + (exwm-input--on-minibuffer-exit))) + +(defun exwm-input--init () + "Initialize the keyboard module." + (exwm--log) + ;; Refresh keyboard mapping + (xcb:keysyms:init exwm--connection #'exwm-input--on-keysyms-update) + ;; Create the X window and intern the atom used to fetch timestamp. + (setq exwm-input--timestamp-window (xcb:generate-id exwm--connection)) + (xcb:+request exwm--connection + (make-instance 'xcb:CreateWindow + :depth 0 + :wid exwm-input--timestamp-window + :parent exwm--root + :x -1 + :y -1 + :width 1 + :height 1 + :border-width 0 + :class xcb:WindowClass:CopyFromParent + :visual 0 + :value-mask xcb:CW:EventMask + :event-mask xcb:EventMask:PropertyChange)) + (xcb:+request exwm--connection + (make-instance 'xcb:ewmh:set-_NET_WM_NAME + :window exwm-input--timestamp-window + :data "EXWM: exwm-input--timestamp-window")) + (setq exwm-input--timestamp-atom (exwm--intern-atom "_TIME")) + ;; Initialize global keys. + (dolist (i exwm-input-global-keys) + (exwm-input--set-key (car i) (cdr i))) + ;; Initialize simulation keys. + (when exwm-input-simulation-keys + (exwm-input--set-simulation-keys exwm-input-simulation-keys)) + ;; Attach event listeners + (xcb:+event exwm--connection 'xcb:PropertyNotify + #'exwm-input--on-PropertyNotify) + (xcb:+event exwm--connection 'xcb:CreateNotify #'exwm-input--on-CreateNotify) + (xcb:+event exwm--connection 'xcb:KeyPress #'exwm-input--on-KeyPress) + (xcb:+event exwm--connection 'xcb:ButtonPress #'exwm-input--on-ButtonPress) + (xcb:+event exwm--connection 'xcb:ButtonRelease + #'exwm-floating--stop-moveresize) + (xcb:+event exwm--connection 'xcb:MotionNotify + #'exwm-floating--do-moveresize) + (when mouse-autoselect-window + (xcb:+event exwm--connection 'xcb:EnterNotify + #'exwm-input--on-EnterNotify)) + ;; Control `exwm-input--during-command' + (add-hook 'pre-command-hook #'exwm-input--on-pre-command) + (add-hook 'post-command-hook #'exwm-input--on-post-command) + ;; Grab/Release keyboard when minibuffer/echo becomes active/inactive. + (add-hook 'minibuffer-setup-hook #'exwm-input--on-minibuffer-setup) + (add-hook 'minibuffer-exit-hook #'exwm-input--on-minibuffer-exit) + (setq exwm-input--echo-area-timer + (run-with-idle-timer 0 t #'exwm-input--on-echo-area-dirty)) + (add-hook 'echo-area-clear-hook #'exwm-input--on-echo-area-clear) + ;; Update focus when buffer list updates + (add-hook 'buffer-list-update-hook #'exwm-input--on-buffer-list-update)) + +(defun exwm-input--post-init () + "The second stage in the initialization of the input module." + (exwm--log) + (exwm-input--update-global-prefix-keys)) + +(defun exwm-input--exit () + "Exit the input module." + (exwm--log) + (exwm-input--unset-simulation-keys) + (remove-hook 'pre-command-hook #'exwm-input--on-pre-command) + (remove-hook 'post-command-hook #'exwm-input--on-post-command) + (remove-hook 'minibuffer-setup-hook #'exwm-input--on-minibuffer-setup) + (remove-hook 'minibuffer-exit-hook #'exwm-input--on-minibuffer-exit) + (when exwm-input--echo-area-timer + (cancel-timer exwm-input--echo-area-timer) + (setq exwm-input--echo-area-timer nil)) + (remove-hook 'echo-area-clear-hook #'exwm-input--on-echo-area-clear) + (remove-hook 'buffer-list-update-hook #'exwm-input--on-buffer-list-update) + (when exwm-input--update-focus-defer-timer + (cancel-timer exwm-input--update-focus-defer-timer)) + (when exwm-input--update-focus-timer + (cancel-timer exwm-input--update-focus-timer)) + ;; Make input focus working even without a WM. + (xcb:+request exwm--connection + (make-instance 'xcb:SetInputFocus + :revert-to xcb:InputFocus:PointerRoot + :focus exwm--root + :time xcb:Time:CurrentTime)) + (xcb:flush exwm--connection)) + + + +(provide 'exwm-input) + +;;; exwm-input.el ends here diff --git a/elpa/exwm-0.24/exwm-input.elc b/elpa/exwm-0.24/exwm-input.elc new file mode 100644 index 0000000..8da8934 Binary files /dev/null and b/elpa/exwm-0.24/exwm-input.elc differ diff --git a/elpa/exwm-0.24/exwm-layout.el b/elpa/exwm-0.24/exwm-layout.el new file mode 100644 index 0000000..170c2be --- /dev/null +++ b/elpa/exwm-0.24/exwm-layout.el @@ -0,0 +1,618 @@ +;;; exwm-layout.el --- Layout Module for EXWM -*- lexical-binding: t -*- + +;; Copyright (C) 2015-2020 Free Software Foundation, Inc. + +;; Author: Chris Feng + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This module is responsible for keeping X client window properly displayed. + +;;; Code: + +(require 'exwm-core) + +(defgroup exwm-layout nil + "Layout." + :version "25.3" + :group 'exwm) + +(defcustom exwm-layout-auto-iconify t + "Non-nil to automatically iconify unused X windows when possible." + :type 'boolean) + +(defcustom exwm-layout-show-all-buffers nil + "Non-nil to allow switching to buffers on other workspaces." + :type 'boolean) + +(defconst exwm-layout--floating-hidden-position -101 + "Where to place hidden floating X windows.") + +(defvar exwm-layout--other-buffer-exclude-buffers nil + "List of buffers that should not be selected by `other-buffer'.") + +(defvar exwm-layout--other-buffer-exclude-exwm-mode-buffers nil + "When non-nil, prevent EXWM buffers from being selected by `other-buffer'.") + +(defvar exwm-layout--timer nil "Timer used to track echo area changes.") + +(defvar exwm-workspace--current) +(defvar exwm-workspace--frame-y-offset) +(declare-function exwm-input--release-keyboard "exwm-input.el") +(declare-function exwm-input--grab-keyboard "exwm-input.el") +(declare-function exwm-input-grab-keyboard "exwm-input.el") +(declare-function exwm-workspace--active-p "exwm-workspace.el" (frame)) +(declare-function exwm-workspace--client-p "exwm-workspace.el" + (&optional frame)) +(declare-function exwm-workspace--minibuffer-own-frame-p "exwm-workspace.el") +(declare-function exwm-workspace--workspace-p "exwm-workspace.el" + (workspace)) +(declare-function exwm-workspace-move-window "exwm-workspace.el" + (frame-or-index &optional id)) + +(defun exwm-layout--set-state (id state) + "Set WM_STATE." + (exwm--log "id=#x%x" id) + (xcb:+request exwm--connection + (make-instance 'xcb:icccm:set-WM_STATE + :window id :state state :icon xcb:Window:None)) + (with-current-buffer (exwm--id->buffer id) + (setq exwm-state state))) + +(defun exwm-layout--iconic-state-p (&optional id) + (= xcb:icccm:WM_STATE:IconicState + (if id + (buffer-local-value 'exwm-state (exwm--id->buffer id)) + exwm-state))) + +(defun exwm-layout--set-ewmh-state (xwin) + "Set _NET_WM_STATE." + (with-current-buffer (exwm--id->buffer xwin) + (xcb:+request exwm--connection + (make-instance 'xcb:ewmh:set-_NET_WM_STATE + :window exwm--id + :data exwm--ewmh-state)))) + +(defun exwm-layout--fullscreen-p () + (when (derived-mode-p 'exwm-mode) + (memq xcb:Atom:_NET_WM_STATE_FULLSCREEN exwm--ewmh-state))) + +(defun exwm-layout--auto-iconify () + (when (and exwm-layout-auto-iconify + (not exwm-transient-for)) + (let ((xwin exwm--id) + (state exwm-state)) + (dolist (pair exwm--id-buffer-alist) + (with-current-buffer (cdr pair) + (when (and exwm--floating-frame + (eq exwm-transient-for xwin) + (not (eq exwm-state state))) + (if (eq state xcb:icccm:WM_STATE:NormalState) + (exwm-layout--refresh-floating exwm--floating-frame) + (exwm-layout--hide exwm--id)))))))) + +(defun exwm-layout--show (id &optional window) + "Show window ID exactly fit in the Emacs window WINDOW." + (exwm--log "Show #x%x in %s" id window) + (let* ((edges (window-inside-absolute-pixel-edges window)) + (x (pop edges)) + (y (pop edges)) + (width (- (pop edges) x)) + (height (- (pop edges) y)) + frame-x frame-y frame-width frame-height) + (with-current-buffer (exwm--id->buffer id) + (when exwm--floating-frame + (setq frame-width (frame-pixel-width exwm--floating-frame) + frame-height (+ (frame-pixel-height exwm--floating-frame) + ;; Use `frame-outer-height' in the future. + exwm-workspace--frame-y-offset)) + (when exwm--floating-frame-position + (setq frame-x (elt exwm--floating-frame-position 0) + frame-y (elt exwm--floating-frame-position 1) + x (+ x frame-x (- exwm-layout--floating-hidden-position)) + y (+ y frame-y (- exwm-layout--floating-hidden-position))) + (setq exwm--floating-frame-position nil)) + (exwm--set-geometry (frame-parameter exwm--floating-frame + 'exwm-container) + frame-x frame-y frame-width frame-height)) + (when (exwm-layout--fullscreen-p) + (with-slots ((x* x) + (y* y) + (width* width) + (height* height)) + (exwm-workspace--get-geometry exwm--frame) + (setq x x* + y y* + width width* + height height*))) + (exwm--set-geometry id x y width height) + (xcb:+request exwm--connection (make-instance 'xcb:MapWindow :window id)) + (exwm-layout--set-state id xcb:icccm:WM_STATE:NormalState) + (setq exwm--ewmh-state + (delq xcb:Atom:_NET_WM_STATE_HIDDEN exwm--ewmh-state)) + (exwm-layout--set-ewmh-state id) + (exwm-layout--auto-iconify))) + (xcb:flush exwm--connection)) + +(defun exwm-layout--hide (id) + "Hide window ID." + (with-current-buffer (exwm--id->buffer id) + (unless (or (exwm-layout--iconic-state-p) + (and exwm--floating-frame + (eq 4294967295. exwm--desktop))) + (exwm--log "Hide #x%x" id) + (when exwm--floating-frame + (let* ((container (frame-parameter exwm--floating-frame + 'exwm-container)) + (geometry (xcb:+request-unchecked+reply exwm--connection + (make-instance 'xcb:GetGeometry + :drawable container)))) + (setq exwm--floating-frame-position + (vector (slot-value geometry 'x) (slot-value geometry 'y))) + (exwm--set-geometry container exwm-layout--floating-hidden-position + exwm-layout--floating-hidden-position + 1 + 1))) + (xcb:+request exwm--connection + (make-instance 'xcb:ChangeWindowAttributes + :window id :value-mask xcb:CW:EventMask + :event-mask xcb:EventMask:NoEvent)) + (xcb:+request exwm--connection + (make-instance 'xcb:UnmapWindow :window id)) + (xcb:+request exwm--connection + (make-instance 'xcb:ChangeWindowAttributes + :window id :value-mask xcb:CW:EventMask + :event-mask (exwm--get-client-event-mask))) + (exwm-layout--set-state id xcb:icccm:WM_STATE:IconicState) + (cl-pushnew xcb:Atom:_NET_WM_STATE_HIDDEN exwm--ewmh-state) + (exwm-layout--set-ewmh-state id) + (exwm-layout--auto-iconify) + (xcb:flush exwm--connection)))) + +;;;###autoload +(cl-defun exwm-layout-set-fullscreen (&optional id) + "Make window ID fullscreen." + (interactive) + (exwm--log "id=#x%x" (or id 0)) + (unless (and (or id (derived-mode-p 'exwm-mode)) + (not (exwm-layout--fullscreen-p))) + (cl-return-from exwm-layout-set-fullscreen)) + (with-current-buffer (if id (exwm--id->buffer id) (window-buffer)) + ;; Expand the X window to fill the whole screen. + (with-slots (x y width height) (exwm-workspace--get-geometry exwm--frame) + (exwm--set-geometry exwm--id x y width height)) + ;; Raise the X window. + (xcb:+request exwm--connection + (make-instance 'xcb:ConfigureWindow + :window exwm--id + :value-mask (logior xcb:ConfigWindow:BorderWidth + xcb:ConfigWindow:StackMode) + :border-width 0 + :stack-mode xcb:StackMode:Above)) + (cl-pushnew xcb:Atom:_NET_WM_STATE_FULLSCREEN exwm--ewmh-state) + (exwm-layout--set-ewmh-state id) + (xcb:flush exwm--connection) + (set-window-dedicated-p (get-buffer-window) t) + (exwm-input--release-keyboard exwm--id))) + +;;;###autoload +(cl-defun exwm-layout-unset-fullscreen (&optional id) + "Restore window from fullscreen state." + (interactive) + (exwm--log "id=#x%x" (or id 0)) + (unless (and (or id (derived-mode-p 'exwm-mode)) + (exwm-layout--fullscreen-p)) + (cl-return-from exwm-layout-unset-fullscreen)) + (with-current-buffer (if id (exwm--id->buffer id) (window-buffer)) + (setq exwm--ewmh-state + (delq xcb:Atom:_NET_WM_STATE_FULLSCREEN exwm--ewmh-state)) + (if exwm--floating-frame + (exwm-layout--show exwm--id (frame-root-window exwm--floating-frame)) + (xcb:+request exwm--connection + (make-instance 'xcb:ConfigureWindow + :window exwm--id + :value-mask (logior xcb:ConfigWindow:Sibling + xcb:ConfigWindow:StackMode) + :sibling exwm--guide-window + :stack-mode xcb:StackMode:Above)) + (let ((window (get-buffer-window nil t))) + (when window + (exwm-layout--show exwm--id window)))) + (exwm-layout--set-ewmh-state id) + (xcb:flush exwm--connection) + (set-window-dedicated-p (get-buffer-window) nil) + (when (eq 'line-mode exwm--selected-input-mode) + (exwm-input--grab-keyboard exwm--id)))) + +;;;###autoload +(cl-defun exwm-layout-toggle-fullscreen (&optional id) + "Toggle fullscreen mode." + (interactive (list (exwm--buffer->id (window-buffer)))) + (exwm--log "id=#x%x" (or id 0)) + (unless (or id (derived-mode-p 'exwm-mode)) + (cl-return-from exwm-layout-toggle-fullscreen)) + (when id + (with-current-buffer (exwm--id->buffer id) + (if (exwm-layout--fullscreen-p) + (exwm-layout-unset-fullscreen id) + (exwm-layout-set-fullscreen id))))) + +(defun exwm-layout--other-buffer-predicate (buffer) + "Return non-nil when the BUFFER may be displayed in selected frame. + +Prevents EXWM-mode buffers already being displayed on some other window from +being selected. + +Should be set as `buffer-predicate' frame parameter for all +frames. Used by `other-buffer'. + +When variable `exwm-layout--other-buffer-exclude-exwm-mode-buffers' +is t EXWM buffers are never selected by `other-buffer'. + +When variable `exwm-layout--other-buffer-exclude-buffers' is a +list of buffers, EXWM buffers belonging to that list are never +selected by `other-buffer'." + (or (not (with-current-buffer buffer (derived-mode-p 'exwm-mode))) + (and (not exwm-layout--other-buffer-exclude-exwm-mode-buffers) + (not (memq buffer exwm-layout--other-buffer-exclude-buffers)) + ;; Do not select if already shown in some window. + (not (get-buffer-window buffer t))))) + +(defun exwm-layout--set-client-list-stacking () + "Set _NET_CLIENT_LIST_STACKING." + (exwm--log) + (let (id clients-floating clients clients-iconic clients-other) + (dolist (pair exwm--id-buffer-alist) + (setq id (car pair)) + (with-current-buffer (cdr pair) + (if (eq exwm--frame exwm-workspace--current) + (if exwm--floating-frame + ;; A floating X window on the current workspace. + (setq clients-floating (cons id clients-floating)) + (if (get-buffer-window (cdr pair) exwm-workspace--current) + ;; A normal tilling X window on the current workspace. + (setq clients (cons id clients)) + ;; An iconic tilling X window on the current workspace. + (setq clients-iconic (cons id clients-iconic)))) + ;; X window on other workspaces. + (setq clients-other (cons id clients-other))))) + (xcb:+request exwm--connection + (make-instance 'xcb:ewmh:set-_NET_CLIENT_LIST_STACKING + :window exwm--root + :data (vconcat (append clients-other clients-iconic + clients clients-floating)))))) + +(defun exwm-layout--refresh (&optional frame) + "Refresh layout." + ;; `window-size-change-functions' sets this argument while + ;; `window-configuration-change-hook' makes the frame selected. + (unless frame + (setq frame (selected-frame))) + (exwm--log "frame=%s" frame) + (if (not (exwm-workspace--workspace-p frame)) + (if (frame-parameter frame 'exwm-outer-id) + (exwm-layout--refresh-floating frame) + (exwm-layout--refresh-other frame)) + (exwm-layout--refresh-workspace frame))) + +(defun exwm-layout--refresh-floating (frame) + "Refresh floating frame FRAME." + (exwm--log "Refresh floating %s" frame) + (let ((window (frame-first-window frame))) + (with-current-buffer (window-buffer window) + (when (and (derived-mode-p 'exwm-mode) + ;; It may be a buffer waiting to be killed. + (exwm--id->buffer exwm--id)) + (exwm--log "Refresh floating window #x%x" exwm--id) + (if (exwm-workspace--active-p exwm--frame) + (exwm-layout--show exwm--id window) + (exwm-layout--hide exwm--id)))))) + +(defun exwm-layout--refresh-other (frame) + "Refresh client or nox frame FRAME." + ;; Other frames (e.g. terminal/graphical frame of emacsclient) + ;; We shall bury all `exwm-mode' buffers in this case + (exwm--log "Refresh other %s" frame) + (let ((windows (window-list frame 'nomini)) ;exclude minibuffer + (exwm-layout--other-buffer-exclude-exwm-mode-buffers t)) + (dolist (window windows) + (with-current-buffer (window-buffer window) + (when (derived-mode-p 'exwm-mode) + (if (window-prev-buffers window) + (switch-to-prev-buffer window) + (switch-to-next-buffer window))))))) + +(defun exwm-layout--refresh-workspace (frame) + "Refresh workspace frame FRAME." + (exwm--log "Refresh workspace %s" frame) + ;; Workspaces other than the active one can also be refreshed (RandR) + (let (covered-buffers ;EXWM-buffers covered by a new X window. + vacated-windows) ;Windows previously displaying EXWM-buffers. + (dolist (pair exwm--id-buffer-alist) + (with-current-buffer (cdr pair) + (when (and (not exwm--floating-frame) ;exclude floating X windows + (or exwm-layout-show-all-buffers + ;; Exclude X windows on other workspaces + (eq frame exwm--frame))) + (let (;; List of windows in current frame displaying the `exwm-mode' + ;; buffers. + (windows (get-buffer-window-list (current-buffer) 'nomini + frame))) + (if (not windows) + (when (eq frame exwm--frame) + ;; Hide it if it was being shown in this workspace. + (exwm-layout--hide exwm--id)) + (let ((window (car windows))) + (if (eq frame exwm--frame) + ;; Show it if `frame' is active, hide otherwise. + (if (exwm-workspace--active-p frame) + (exwm-layout--show exwm--id window) + (exwm-layout--hide exwm--id)) + ;; It was last shown in other workspace; move it here. + (exwm-workspace-move-window frame exwm--id)) + ;; Vacate any other windows (in any workspace) showing this + ;; `exwm-mode' buffer. + (setq vacated-windows + (append vacated-windows (remove + window + (get-buffer-window-list + (current-buffer) 'nomini t)))) + ;; Note any `exwm-mode' buffer is being covered by another + ;; `exwm-mode' buffer. We want to avoid that `exwm-mode' + ;; buffer to be reappear in any of the vacated windows. + (let ((prev-buffer (car-safe + (car-safe (window-prev-buffers window))))) + (and + prev-buffer + (with-current-buffer prev-buffer + (derived-mode-p 'exwm-mode)) + (push prev-buffer covered-buffers))))))))) + ;; Set some sensible buffer to vacated windows. + (let ((exwm-layout--other-buffer-exclude-buffers covered-buffers)) + (dolist (window vacated-windows) + (if (window-prev-buffers window) + (switch-to-prev-buffer window) + (switch-to-next-buffer window)))) + ;; Make sure windows floating / on other workspaces are excluded + (let ((exwm-layout--other-buffer-exclude-exwm-mode-buffers t)) + (dolist (window (window-list frame 'nomini)) + (with-current-buffer (window-buffer window) + (when (and (derived-mode-p 'exwm-mode) + (or exwm--floating-frame (not (eq frame exwm--frame)))) + (if (window-prev-buffers window) + (switch-to-prev-buffer window) + (switch-to-next-buffer window)))))) + (exwm-layout--set-client-list-stacking) + (xcb:flush exwm--connection))) + +(defun exwm-layout--on-minibuffer-setup () + "Refresh layout when minibuffer grows." + (exwm--log) + (unless (exwm-workspace--client-p) + (exwm--defer 0 (lambda () + (when (< 1 (window-height (minibuffer-window))) + (exwm-layout--refresh)))))) + +(defun exwm-layout--on-echo-area-change (&optional dirty) + "Run when message arrives or in `echo-area-clear-hook' to refresh layout." + (when (and (current-message) + (not (exwm-workspace--client-p)) + (or (cl-position ?\n (current-message)) + (> (length (current-message)) + (frame-width exwm-workspace--current)))) + (exwm--log) + (if dirty + (exwm-layout--refresh) + (exwm--defer 0 #'exwm-layout--refresh)))) + +;;;###autoload +(defun exwm-layout-enlarge-window (delta &optional horizontal) + "Make the selected window DELTA pixels taller. + +If no argument is given, make the selected window one pixel taller. If the +optional argument HORIZONTAL is non-nil, make selected window DELTA pixels +wider. If DELTA is negative, shrink selected window by -DELTA pixels. + +Normal hints are checked and regarded if the selected window is displaying an +`exwm-mode' buffer. However, this may violate the normal hints set on other X +windows." + (interactive "p") + (exwm--log) + (cond + ((zerop delta)) ;no operation + ((window-minibuffer-p)) ;avoid resize minibuffer-window + ((not (and (derived-mode-p 'exwm-mode) exwm--floating-frame)) + ;; Resize on tiling layout + (unless (= 0 (window-resizable nil delta horizontal nil t)) ;not resizable + (let ((window-resize-pixelwise t)) + (window-resize nil delta horizontal nil t)))) + ;; Resize on floating layout + (exwm--fixed-size) ;fixed size + (horizontal + (let* ((width (frame-pixel-width)) + (edges (window-inside-pixel-edges)) + (inner-width (- (elt edges 2) (elt edges 0))) + (margin (- width inner-width))) + (if (> delta 0) + (if (not exwm--normal-hints-max-width) + (cl-incf width delta) + (if (>= inner-width exwm--normal-hints-max-width) + (setq width nil) + (setq width (min (+ exwm--normal-hints-max-width margin) + (+ width delta))))) + (if (not exwm--normal-hints-min-width) + (cl-incf width delta) + (if (<= inner-width exwm--normal-hints-min-width) + (setq width nil) + (setq width (max (+ exwm--normal-hints-min-width margin) + (+ width delta)))))) + (when (and width (> width 0)) + (setf (slot-value exwm--geometry 'width) width) + (xcb:+request exwm--connection + (make-instance 'xcb:ConfigureWindow + :window (frame-parameter exwm--floating-frame + 'exwm-outer-id) + :value-mask xcb:ConfigWindow:Width + :width width)) + (xcb:+request exwm--connection + (make-instance 'xcb:ConfigureWindow + :window (frame-parameter exwm--floating-frame + 'exwm-container) + :value-mask xcb:ConfigWindow:Width + :width width)) + (xcb:flush exwm--connection)))) + (t + (let* ((height (+ (frame-pixel-height) exwm-workspace--frame-y-offset)) + (edges (window-inside-pixel-edges)) + (inner-height (- (elt edges 3) (elt edges 1))) + (margin (- height inner-height))) + (if (> delta 0) + (if (not exwm--normal-hints-max-height) + (cl-incf height delta) + (if (>= inner-height exwm--normal-hints-max-height) + (setq height nil) + (setq height (min (+ exwm--normal-hints-max-height margin) + (+ height delta))))) + (if (not exwm--normal-hints-min-height) + (cl-incf height delta) + (if (<= inner-height exwm--normal-hints-min-height) + (setq height nil) + (setq height (max (+ exwm--normal-hints-min-height margin) + (+ height delta)))))) + (when (and height (> height 0)) + (setf (slot-value exwm--geometry 'height) height) + (xcb:+request exwm--connection + (make-instance 'xcb:ConfigureWindow + :window (frame-parameter exwm--floating-frame + 'exwm-outer-id) + :value-mask xcb:ConfigWindow:Height + :height height)) + (xcb:+request exwm--connection + (make-instance 'xcb:ConfigureWindow + :window (frame-parameter exwm--floating-frame + 'exwm-container) + :value-mask xcb:ConfigWindow:Height + :height height)) + (xcb:flush exwm--connection)))))) + +;;;###autoload +(defun exwm-layout-enlarge-window-horizontally (delta) + "Make the selected window DELTA pixels wider. + +See also `exwm-layout-enlarge-window'." + (interactive "p") + (exwm--log "%s" delta) + (exwm-layout-enlarge-window delta t)) + +;;;###autoload +(defun exwm-layout-shrink-window (delta) + "Make the selected window DELTA pixels lower. + +See also `exwm-layout-enlarge-window'." + (interactive "p") + (exwm--log "%s" delta) + (exwm-layout-enlarge-window (- delta))) + +;;;###autoload +(defun exwm-layout-shrink-window-horizontally (delta) + "Make the selected window DELTA pixels narrower. + +See also `exwm-layout-enlarge-window'." + (interactive "p") + (exwm--log "%s" delta) + (exwm-layout-enlarge-window (- delta) t)) + +;;;###autoload +(defun exwm-layout-hide-mode-line () + "Hide mode-line." + (interactive) + (exwm--log) + (when (and (derived-mode-p 'exwm-mode) mode-line-format) + (let (mode-line-height) + (when exwm--floating-frame + (setq mode-line-height (window-mode-line-height + (frame-root-window exwm--floating-frame)))) + (setq exwm--mode-line-format mode-line-format + mode-line-format nil) + (if (not exwm--floating-frame) + (exwm-layout--show exwm--id) + (set-frame-height exwm--floating-frame + (- (frame-pixel-height exwm--floating-frame) + mode-line-height) + nil t))))) + +;;;###autoload +(defun exwm-layout-show-mode-line () + "Show mode-line." + (interactive) + (exwm--log) + (when (and (derived-mode-p 'exwm-mode) (not mode-line-format)) + (setq mode-line-format exwm--mode-line-format + exwm--mode-line-format nil) + (if (not exwm--floating-frame) + (exwm-layout--show exwm--id) + (set-frame-height exwm--floating-frame + (+ (frame-pixel-height exwm--floating-frame) + (window-mode-line-height (frame-root-window + exwm--floating-frame))) + nil t) + (call-interactively #'exwm-input-grab-keyboard)) + (force-mode-line-update))) + +;;;###autoload +(defun exwm-layout-toggle-mode-line () + "Toggle the display of mode-line." + (interactive) + (exwm--log) + (when (derived-mode-p 'exwm-mode) + (if mode-line-format + (exwm-layout-hide-mode-line) + (exwm-layout-show-mode-line)))) + +(defun exwm-layout--init () + "Initialize layout module." + ;; Auto refresh layout + (exwm--log) + (add-hook 'window-configuration-change-hook #'exwm-layout--refresh) + ;; The behavior of `window-configuration-change-hook' will be changed. + (when (fboundp 'window-pixel-width-before-size-change) + (add-hook 'window-size-change-functions #'exwm-layout--refresh)) + (unless (exwm-workspace--minibuffer-own-frame-p) + ;; Refresh when minibuffer grows + (add-hook 'minibuffer-setup-hook #'exwm-layout--on-minibuffer-setup t) + (setq exwm-layout--timer + (run-with-idle-timer 0 t #'exwm-layout--on-echo-area-change t)) + (add-hook 'echo-area-clear-hook #'exwm-layout--on-echo-area-change))) + +(defun exwm-layout--exit () + "Exit the layout module." + (exwm--log) + (remove-hook 'window-configuration-change-hook #'exwm-layout--refresh) + (when (fboundp 'window-pixel-width-before-size-change) + (remove-hook 'window-size-change-functions #'exwm-layout--refresh)) + (remove-hook 'minibuffer-setup-hook #'exwm-layout--on-minibuffer-setup) + (when exwm-layout--timer + (cancel-timer exwm-layout--timer) + (setq exwm-layout--timer nil)) + (remove-hook 'echo-area-clear-hook #'exwm-layout--on-echo-area-change)) + + + +(provide 'exwm-layout) + +;;; exwm-layout.el ends here diff --git a/elpa/exwm-0.24/exwm-layout.elc b/elpa/exwm-0.24/exwm-layout.elc new file mode 100644 index 0000000..2cc8009 Binary files /dev/null and b/elpa/exwm-0.24/exwm-layout.elc differ diff --git a/elpa/exwm-0.24/exwm-manage.el b/elpa/exwm-0.24/exwm-manage.el new file mode 100644 index 0000000..a7866f1 --- /dev/null +++ b/elpa/exwm-0.24/exwm-manage.el @@ -0,0 +1,805 @@ +;;; exwm-manage.el --- Window Management Module for -*- lexical-binding: t -*- +;;; EXWM + +;; Copyright (C) 2015-2020 Free Software Foundation, Inc. + +;; Author: Chris Feng + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This is the fundamental module of EXWM that deals with window management. + +;;; Code: + +(require 'exwm-core) + +(defgroup exwm-manage nil + "Manage." + :version "25.3" + :group 'exwm) + +(defcustom exwm-manage-finish-hook nil + "Normal hook run after a window is just managed, in the context of the +corresponding buffer." + :type 'hook) + +(defcustom exwm-manage-force-tiling nil + "Non-nil to force managing all X windows in tiling layout. +You can still make the X windows floating afterwards." + :type 'boolean) + +(defcustom exwm-manage-ping-timeout 3 + "Seconds to wait before killing a client." + :type 'integer) + +(defcustom exwm-manage-configurations nil + "Per-application configurations. + +Configuration options allow to override various default behaviors of EXWM +and only take effect when they are present. Note for certain options +specifying nil is not exactly the same as leaving them out. Currently +possible choices: +* floating: Force floating (non-nil) or tiling (nil) on startup. +* x/y/width/height: Override the initial geometry (floating X window only). +* border-width: Override the border width (only visible when floating). +* fullscreen: Force full screen (non-nil) on startup. +* floating-mode-line: `mode-line-format' used when floating. +* tiling-mode-line: `mode-line-format' used when tiling. +* floating-header-line: `header-line-format' used when floating. +* tiling-header-line: `header-line-format' used when tiling. +* char-mode: Force char-mode (non-nil) on startup. +* prefix-keys: `exwm-input-prefix-keys' local to this X window. +* simulation-keys: `exwm-input-simulation-keys' local to this X window. +* workspace: The initial workspace. +* managed: Force to manage (non-nil) or not manage (nil) the X window. + +For each X window managed for the first time, matching criteria (sexps) are +evaluated sequentially and the first configuration with a non-nil matching +criterion would be applied. Apart from generic forms, one would typically +want to match against EXWM internal variables such as `exwm-title', +`exwm-class-name' and `exwm-instance-name'." + :type '(alist :key-type (sexp :tag "Matching criterion" nil) + :value-type + (plist :tag "Configurations" + :options + (((const :tag "Floating" floating) boolean) + ((const :tag "X" x) number) + ((const :tag "Y" y) number) + ((const :tag "Width" width) number) + ((const :tag "Height" height) number) + ((const :tag "Border width" border-width) integer) + ((const :tag "Fullscreen" fullscreen) boolean) + ((const :tag "Floating mode-line" floating-mode-line) + sexp) + ((const :tag "Tiling mode-line" tiling-mode-line) sexp) + ((const :tag "Floating header-line" + floating-header-line) + sexp) + ((const :tag "Tiling header-line" tiling-header-line) + sexp) + ((const :tag "Char-mode" char-mode) boolean) + ((const :tag "Prefix keys" prefix-keys) + (repeat key-sequence)) + ((const :tag "Simulation keys" simulation-keys) + (alist :key-type (key-sequence :tag "From") + :value-type (key-sequence :tag "To"))) + ((const :tag "Workspace" workspace) integer) + ((const :tag "Managed" managed) boolean) + ;; For forward compatibility. + ((other) sexp)))) + ;; TODO: This is admittedly ugly. We'd be better off with an event type. + :get (lambda (symbol) + (mapcar (lambda (pair) + (let* ((match (car pair)) + (config (cdr pair)) + (prefix-keys (plist-get config 'prefix-keys))) + (when prefix-keys + (setq config (copy-tree config) + config (plist-put config 'prefix-keys + (mapcar (lambda (i) + (if (sequencep i) + i + (vector i))) + prefix-keys)))) + (cons match config))) + (default-value symbol))) + :set (lambda (symbol value) + (set symbol + (mapcar (lambda (pair) + (let* ((match (car pair)) + (config (cdr pair)) + (prefix-keys (plist-get config 'prefix-keys))) + (when prefix-keys + (setq config (copy-tree config) + config (plist-put config 'prefix-keys + (mapcar (lambda (i) + (if (sequencep i) + (aref i 0) + i)) + prefix-keys)))) + (cons match config))) + value)))) + +;; FIXME: Make the following values as small as possible. +(defconst exwm-manage--height-delta-min 5) +(defconst exwm-manage--width-delta-min 5) + +;; The _MOTIF_WM_HINTS atom (see for more details) +;; It's currently only used in 'exwm-manage' module +(defvar exwm-manage--_MOTIF_WM_HINTS nil "_MOTIF_WM_HINTS atom.") + +(defvar exwm-manage--desktop nil "The desktop X window.") + +(defvar exwm-manage--frame-outer-id-list nil + "List of window-outer-id's of all frames.") + +(defvar exwm-manage--ping-lock nil + "Non-nil indicates EXWM is pinging a window.") + +(defvar exwm-input--skip-buffer-list-update) +(defvar exwm-input-prefix-keys) +(defvar exwm-workspace--current) +(defvar exwm-workspace--id-struts-alist) +(defvar exwm-workspace--list) +(defvar exwm-workspace--switch-history-outdated) +(defvar exwm-workspace--workareas) +(defvar exwm-workspace-current-index) +(declare-function exwm--update-class "exwm.el" (id &optional force)) +(declare-function exwm--update-hints "exwm.el" (id &optional force)) +(declare-function exwm--update-normal-hints "exwm.el" (id &optional force)) +(declare-function exwm--update-protocols "exwm.el" (id &optional force)) +(declare-function exwm--update-struts "exwm.el" (id)) +(declare-function exwm--update-title "exwm.el" (id)) +(declare-function exwm--update-transient-for "exwm.el" (id &optional force)) +(declare-function exwm--update-desktop "exwm.el" (id &optional force)) +(declare-function exwm--update-window-type "exwm.el" (id &optional force)) +(declare-function exwm-floating--set-floating "exwm-floating.el" (id)) +(declare-function exwm-floating--unset-floating "exwm-floating.el" (id)) +(declare-function exwm-input-grab-keyboard "exwm-input.el") +(declare-function exwm-input-set-local-simulation-keys "exwm-input.el") +(declare-function exwm-layout--fullscreen-p "exwm-layout.el" ()) +(declare-function exwm-layout--iconic-state-p "exwm-layout.el" (&optional id)) +(declare-function exwm-workspace--position "exwm-workspace.el" (frame)) +(declare-function exwm-workspace--set-fullscreen "exwm-workspace.el" (frame)) +(declare-function exwm-workspace--update-struts "exwm-workspace.el" ()) +(declare-function exwm-workspace--update-workareas "exwm-workspace.el" ()) + +(defun exwm-manage--update-geometry (id &optional force) + "Update window geometry." + (exwm--log "id=#x%x" id) + (with-current-buffer (exwm--id->buffer id) + (unless (and exwm--geometry (not force)) + (let ((reply (xcb:+request-unchecked+reply exwm--connection + (make-instance 'xcb:GetGeometry :drawable id)))) + (setq exwm--geometry + (or reply + ;; Provide a reasonable fallback value. + (make-instance 'xcb:RECTANGLE + :x 0 + :y 0 + :width (/ (x-display-pixel-width) 2) + :height (/ (x-display-pixel-height) 2)))))))) + +(defun exwm-manage--update-ewmh-state (id) + "Update _NET_WM_STATE." + (exwm--log "id=#x%x" id) + (with-current-buffer (exwm--id->buffer id) + (unless exwm--ewmh-state + (let ((reply (xcb:+request-unchecked+reply exwm--connection + (make-instance 'xcb:ewmh:get-_NET_WM_STATE + :window id)))) + (when reply + (setq exwm--ewmh-state (append (slot-value reply 'value) nil))))))) + +(defun exwm-manage--update-mwm-hints (id &optional force) + "Update _MOTIF_WM_HINTS." + (exwm--log "id=#x%x" id) + (with-current-buffer (exwm--id->buffer id) + (unless (and (not exwm--mwm-hints-decorations) (not force)) + (let ((reply (xcb:+request-unchecked+reply exwm--connection + (make-instance 'xcb:icccm:-GetProperty + :window id + :property exwm-manage--_MOTIF_WM_HINTS + :type exwm-manage--_MOTIF_WM_HINTS + :long-length 5)))) + (when reply + ;; Check MotifWmHints.decorations. + (with-slots (value) reply + (setq value (append value nil)) + (when (and value + ;; See for fields definitions. + (/= 0 (logand + (elt value 0) ;MotifWmHints.flags + 2)) ;MWM_HINTS_DECORATIONS + (= 0 + (elt value 2))) ;MotifWmHints.decorations + (setq exwm--mwm-hints-decorations nil)))))))) + +(defun exwm-manage--set-client-list () + "Set _NET_CLIENT_LIST." + (exwm--log) + (xcb:+request exwm--connection + (make-instance 'xcb:ewmh:set-_NET_CLIENT_LIST + :window exwm--root + :data (vconcat (mapcar #'car exwm--id-buffer-alist))))) + +(cl-defun exwm-manage--get-configurations () + "Retrieve configurations for this buffer." + (exwm--log) + (when (derived-mode-p 'exwm-mode) + (dolist (i exwm-manage-configurations) + (save-current-buffer + (when (with-demoted-errors "Problematic configuration: %S" + (eval (car i) t)) + (cl-return-from exwm-manage--get-configurations (cdr i))))))) + +(defun exwm-manage--manage-window (id) + "Manage window ID." + (exwm--log "Try to manage #x%x" id) + (catch 'return + ;; Ensure it's alive + (when (xcb:+request-checked+request-check exwm--connection + (make-instance 'xcb:ChangeWindowAttributes + :window id :value-mask xcb:CW:EventMask + :event-mask (exwm--get-client-event-mask))) + (throw 'return 'dead)) + ;; Add this X window to save-set. + (xcb:+request exwm--connection + (make-instance 'xcb:ChangeSaveSet + :mode xcb:SetMode:Insert + :window id)) + (with-current-buffer (let ((exwm-input--skip-buffer-list-update t)) + (generate-new-buffer "*EXWM*")) + ;; Keep the oldest X window first. + (setq exwm--id-buffer-alist + (nconc exwm--id-buffer-alist `((,id . ,(current-buffer))))) + (exwm-mode) + (setq exwm--id id + exwm--frame exwm-workspace--current) + (exwm--update-window-type id) + (exwm--update-class id) + (exwm--update-transient-for id) + (exwm--update-normal-hints id) + (exwm--update-hints id) + (exwm-manage--update-geometry id) + (exwm-manage--update-mwm-hints id) + (exwm--update-title id) + (exwm--update-protocols id) + (setq exwm--configurations (exwm-manage--get-configurations)) + ;; OverrideRedirect is not checked here. + (when (and + ;; The user has specified to manage it. + (not (plist-get exwm--configurations 'managed)) + (or + ;; The user has specified not to manage it. + (plist-member exwm--configurations 'managed) + ;; This is not a type of X window we can manage. + (and exwm-window-type + (not (cl-intersection + exwm-window-type + (list xcb:Atom:_NET_WM_WINDOW_TYPE_UTILITY + xcb:Atom:_NET_WM_WINDOW_TYPE_DIALOG + xcb:Atom:_NET_WM_WINDOW_TYPE_NORMAL)))) + ;; Check the _MOTIF_WM_HINTS property to not manage floating X + ;; windows without decoration. + (and (not exwm--mwm-hints-decorations) + (not exwm--hints-input) + ;; Floating windows only + (or exwm-transient-for exwm--fixed-size + (memq xcb:Atom:_NET_WM_WINDOW_TYPE_UTILITY + exwm-window-type) + (memq xcb:Atom:_NET_WM_WINDOW_TYPE_DIALOG + exwm-window-type))))) + (exwm--log "No need to manage #x%x" id) + ;; Update struts. + (when (memq xcb:Atom:_NET_WM_WINDOW_TYPE_DOCK exwm-window-type) + (exwm--update-struts id)) + ;; Remove all events + (xcb:+request exwm--connection + (make-instance 'xcb:ChangeWindowAttributes + :window id :value-mask xcb:CW:EventMask + :event-mask + (if (memq xcb:Atom:_NET_WM_WINDOW_TYPE_DOCK + exwm-window-type) + ;; Listen for PropertyChange (struts) and + ;; UnmapNotify/DestroyNotify event of the dock. + (exwm--get-client-event-mask) + xcb:EventMask:NoEvent))) + ;; The window needs to be mapped + (xcb:+request exwm--connection + (make-instance 'xcb:MapWindow :window id)) + (with-slots (x y width height) exwm--geometry + ;; Center window of type _NET_WM_WINDOW_TYPE_SPLASH + (when (memq xcb:Atom:_NET_WM_WINDOW_TYPE_SPLASH exwm-window-type) + (let* ((workarea (elt exwm-workspace--workareas + (exwm-workspace--position exwm--frame))) + (x* (aref workarea 0)) + (y* (aref workarea 1)) + (width* (aref workarea 2)) + (height* (aref workarea 3))) + (exwm--set-geometry id + (+ x* (/ (- width* width) 2)) + (+ y* (/ (- height* height) 2)) + nil + nil)))) + ;; Check for desktop. + (when (memq xcb:Atom:_NET_WM_WINDOW_TYPE_DESKTOP exwm-window-type) + ;; There should be only one desktop X window. + (setq exwm-manage--desktop id) + ;; Put it at bottom. + (xcb:+request exwm--connection + (make-instance 'xcb:ConfigureWindow + :window id + :value-mask xcb:ConfigWindow:StackMode + :stack-mode xcb:StackMode:Below))) + (xcb:flush exwm--connection) + (setq exwm--id-buffer-alist (assq-delete-all id exwm--id-buffer-alist)) + (let ((kill-buffer-query-functions nil) + (exwm-input--skip-buffer-list-update t)) + (kill-buffer (current-buffer))) + (throw 'return 'ignored)) + (let ((index (plist-get exwm--configurations 'workspace))) + (when (and index (< index (length exwm-workspace--list))) + (setq exwm--frame (elt exwm-workspace--list index)))) + ;; Manage the window + (exwm--log "Manage #x%x" id) + (xcb:+request exwm--connection ;remove border + (make-instance 'xcb:ConfigureWindow + :window id :value-mask xcb:ConfigWindow:BorderWidth + :border-width 0)) + (dolist (button ;grab buttons to set focus / move / resize + (list xcb:ButtonIndex:1 xcb:ButtonIndex:2 xcb:ButtonIndex:3)) + (xcb:+request exwm--connection + (make-instance 'xcb:GrabButton + :owner-events 0 :grab-window id + :event-mask xcb:EventMask:ButtonPress + :pointer-mode xcb:GrabMode:Sync + :keyboard-mode xcb:GrabMode:Async + :confine-to xcb:Window:None :cursor xcb:Cursor:None + :button button :modifiers xcb:ModMask:Any))) + (exwm-manage--set-client-list) + (xcb:flush exwm--connection) + (if (plist-member exwm--configurations 'floating) + ;; User has specified whether it should be floating. + (if (plist-get exwm--configurations 'floating) + (exwm-floating--set-floating id) + (with-selected-window (frame-selected-window exwm--frame) + (exwm-floating--unset-floating id))) + ;; Try to determine if it should be floating. + (if (and (not exwm-manage-force-tiling) + (or exwm-transient-for exwm--fixed-size + (memq xcb:Atom:_NET_WM_WINDOW_TYPE_UTILITY + exwm-window-type) + (memq xcb:Atom:_NET_WM_WINDOW_TYPE_DIALOG + exwm-window-type))) + (exwm-floating--set-floating id) + (with-selected-window (frame-selected-window exwm--frame) + (exwm-floating--unset-floating id)))) + (if (plist-get exwm--configurations 'char-mode) + (exwm-input-release-keyboard id) + (exwm-input-grab-keyboard id)) + (let ((simulation-keys (plist-get exwm--configurations 'simulation-keys)) + (prefix-keys (plist-get exwm--configurations 'prefix-keys))) + (with-current-buffer (exwm--id->buffer id) + (when simulation-keys + (exwm-input-set-local-simulation-keys simulation-keys)) + (when prefix-keys + (setq-local exwm-input-prefix-keys prefix-keys)))) + (setq exwm-workspace--switch-history-outdated t) + (exwm--update-desktop id) + (exwm-manage--update-ewmh-state id) + (with-current-buffer (exwm--id->buffer id) + (when (or (plist-get exwm--configurations 'fullscreen) + (exwm-layout--fullscreen-p)) + (setq exwm--ewmh-state (delq xcb:Atom:_NET_WM_STATE_FULLSCREEN + exwm--ewmh-state)) + (exwm-layout-set-fullscreen id)) + (run-hooks 'exwm-manage-finish-hook))))) + +(defun exwm-manage--unmanage-window (id &optional withdraw-only) + "Unmanage window ID. + +If WITHDRAW-ONLY is non-nil, the X window will be properly placed back to the +root window. Set WITHDRAW-ONLY to 'quit if this functions is used when window +manager is shutting down." + (let ((buffer (exwm--id->buffer id))) + (exwm--log "Unmanage #x%x (buffer: %s, widthdraw: %s)" + id buffer withdraw-only) + (setq exwm--id-buffer-alist (assq-delete-all id exwm--id-buffer-alist)) + ;; Update workspaces when a dock is destroyed. + (when (and (null withdraw-only) + (assq id exwm-workspace--id-struts-alist)) + (setq exwm-workspace--id-struts-alist + (assq-delete-all id exwm-workspace--id-struts-alist)) + (exwm-workspace--update-struts) + (exwm-workspace--update-workareas) + (dolist (f exwm-workspace--list) + (exwm-workspace--set-fullscreen f))) + (when (buffer-live-p buffer) + (with-current-buffer buffer + ;; Unmap the X window. + (xcb:+request exwm--connection + (make-instance 'xcb:UnmapWindow :window id)) + ;; + (setq exwm-workspace--switch-history-outdated t) + ;; + (when withdraw-only + (xcb:+request exwm--connection + (make-instance 'xcb:ChangeWindowAttributes + :window id :value-mask xcb:CW:EventMask + :event-mask xcb:EventMask:NoEvent)) + ;; Delete WM_STATE property + (xcb:+request exwm--connection + (make-instance 'xcb:DeleteProperty + :window id :property xcb:Atom:WM_STATE)) + (cond + ((eq withdraw-only 'quit) + ;; Remap the window when exiting. + (xcb:+request exwm--connection + (make-instance 'xcb:MapWindow :window id))) + (t + ;; Remove _NET_WM_DESKTOP. + (xcb:+request exwm--connection + (make-instance 'xcb:DeleteProperty + :window id + :property xcb:Atom:_NET_WM_DESKTOP))))) + (when exwm--floating-frame + ;; Unmap the floating frame before destroying its container. + (let ((window (frame-parameter exwm--floating-frame 'exwm-outer-id)) + (container (frame-parameter exwm--floating-frame + 'exwm-container))) + (xcb:+request exwm--connection + (make-instance 'xcb:UnmapWindow :window window)) + (xcb:+request exwm--connection + (make-instance 'xcb:ReparentWindow + :window window :parent exwm--root :x 0 :y 0)) + (xcb:+request exwm--connection + (make-instance 'xcb:DestroyWindow :window container)))) + (when (exwm-layout--fullscreen-p) + (let ((window (get-buffer-window))) + (when window + (set-window-dedicated-p window nil)))) + (exwm-manage--set-client-list) + (xcb:flush exwm--connection)) + (let ((kill-buffer-func + (lambda (buffer) + (when (buffer-local-value 'exwm--floating-frame buffer) + (select-window + (frame-selected-window exwm-workspace--current))) + (with-current-buffer buffer + (let ((kill-buffer-query-functions nil)) + (kill-buffer buffer)))))) + (exwm--defer 0 kill-buffer-func buffer) + (when (active-minibuffer-window) + (exit-minibuffer)))))) + +(defun exwm-manage--scan () + "Search for existing windows and try to manage them." + (exwm--log) + (let* ((tree (xcb:+request-unchecked+reply exwm--connection + (make-instance 'xcb:QueryTree + :window exwm--root))) + reply) + (dolist (i (slot-value tree 'children)) + (setq reply (xcb:+request-unchecked+reply exwm--connection + (make-instance 'xcb:GetWindowAttributes + :window i))) + ;; It's possible the X window has been destroyed. + (when reply + (with-slots (override-redirect map-state) reply + (when (and (= 0 override-redirect) + (= xcb:MapState:Viewable map-state)) + (xcb:+request exwm--connection + (make-instance 'xcb:UnmapWindow + :window i)) + (xcb:flush exwm--connection) + (exwm-manage--manage-window i))))))) + +(defun exwm-manage--kill-buffer-query-function () + "Run in `kill-buffer-query-functions'." + (exwm--log "id=#x%x; buffer=%s" exwm--id (current-buffer)) + (catch 'return + (when (or (not exwm--id) + (xcb:+request-checked+request-check exwm--connection + (make-instance 'xcb:ChangeWindowAttributes + :window exwm--id + :value-mask xcb:CW:EventMask + :event-mask (exwm--get-client-event-mask)))) + ;; The X window is no longer alive so just close the buffer. + (when exwm--floating-frame + (let ((window (frame-parameter exwm--floating-frame 'exwm-outer-id)) + (container (frame-parameter exwm--floating-frame + 'exwm-container))) + (xcb:+request exwm--connection + (make-instance 'xcb:UnmapWindow :window window)) + (xcb:+request exwm--connection + (make-instance 'xcb:ReparentWindow + :window window + :parent exwm--root + :x 0 :y 0)) + (xcb:+request exwm--connection + (make-instance 'xcb:DestroyWindow + :window container)))) + (xcb:flush exwm--connection) + (throw 'return t)) + (unless (memq xcb:Atom:WM_DELETE_WINDOW exwm--protocols) + ;; The X window does not support WM_DELETE_WINDOW; destroy it. + (xcb:+request exwm--connection + (make-instance 'xcb:DestroyWindow :window exwm--id)) + (xcb:flush exwm--connection) + ;; Wait for DestroyNotify event. + (throw 'return nil)) + (let ((id exwm--id)) + ;; Try to close the X window with WM_DELETE_WINDOW client message. + (xcb:+request exwm--connection + (make-instance 'xcb:icccm:SendEvent + :destination id + :event (xcb:marshal + (make-instance 'xcb:icccm:WM_DELETE_WINDOW + :window id) + exwm--connection))) + (xcb:flush exwm--connection) + ;; + (unless (memq xcb:Atom:_NET_WM_PING exwm--protocols) + ;; For X windows without _NET_WM_PING support, we'd better just + ;; wait for DestroyNotify events. + (throw 'return nil)) + ;; Try to determine if the X window is dead with _NET_WM_PING. + (setq exwm-manage--ping-lock t) + (xcb:+request exwm--connection + (make-instance 'xcb:SendEvent + :propagate 0 + :destination id + :event-mask xcb:EventMask:NoEvent + :event (xcb:marshal + (make-instance 'xcb:ewmh:_NET_WM_PING + :window id + :timestamp 0 + :client-window id) + exwm--connection))) + (xcb:flush exwm--connection) + (with-timeout (exwm-manage-ping-timeout + (if (y-or-n-p (format "'%s' is not responding. \ +Would you like to kill it? " + (buffer-name))) + (progn (exwm-manage--kill-client id) + ;; Kill the unresponsive X window and + ;; wait for DestroyNotify event. + (throw 'return nil)) + ;; Give up. + (throw 'return nil))) + (while (and exwm-manage--ping-lock + (exwm--id->buffer id)) ;may have been destroyed. + (accept-process-output nil 0.1)) + ;; Give up. + (throw 'return nil))))) + +(defun exwm-manage--kill-client (&optional id) + "Kill an X client." + (unless id (setq id (exwm--buffer->id (current-buffer)))) + (exwm--log "id=#x%x" id) + (let* ((response (xcb:+request-unchecked+reply exwm--connection + (make-instance 'xcb:ewmh:get-_NET_WM_PID :window id))) + (pid (and response (slot-value response 'value))) + (request (make-instance 'xcb:KillClient :resource id))) + (if (not pid) + (xcb:+request exwm--connection request) + ;; What if the PID is fake/wrong? + (signal-process pid 'SIGKILL) + ;; Ensure it's dead + (run-with-timer exwm-manage-ping-timeout nil + (lambda () + (xcb:+request exwm--connection request)))) + (xcb:flush exwm--connection))) + +(defun exwm-manage--add-frame (frame) + "Run in `after-make-frame-functions'." + (exwm--log "frame=%s" frame) + (when (display-graphic-p frame) + (push (string-to-number (frame-parameter frame 'outer-window-id)) + exwm-manage--frame-outer-id-list))) + +(defun exwm-manage--remove-frame (frame) + "Run in `delete-frame-functions'." + (exwm--log "frame=%s" frame) + (when (display-graphic-p frame) + (setq exwm-manage--frame-outer-id-list + (delq (string-to-number (frame-parameter frame 'outer-window-id)) + exwm-manage--frame-outer-id-list)))) + +(defun exwm-manage--on-ConfigureRequest (data _synthetic) + "Handle ConfigureRequest event." + (exwm--log) + (let ((obj (make-instance 'xcb:ConfigureRequest)) + buffer edges width-delta height-delta) + (xcb:unmarshal obj data) + (with-slots (window x y width height + border-width sibling stack-mode value-mask) + obj + (exwm--log "#x%x (#x%x) @%dx%d%+d%+d; \ +border-width: %d; sibling: #x%x; stack-mode: %d" + window value-mask width height x y + border-width sibling stack-mode) + (if (and (setq buffer (exwm--id->buffer window)) + (with-current-buffer buffer + (or (exwm-layout--fullscreen-p) + ;; Make sure it's a floating X window wanting to resize + ;; itself. + (or (not exwm--floating-frame) + (progn + (setq edges + (window-inside-pixel-edges + (get-buffer-window buffer t)) + width-delta (- width (- (elt edges 2) + (elt edges 0))) + height-delta (- height (- (elt edges 3) + (elt edges 1)))) + ;; We cannot do resizing precisely for now. + (and (if (= 0 (logand value-mask + xcb:ConfigWindow:Width)) + t + (< (abs width-delta) + exwm-manage--width-delta-min)) + (if (= 0 (logand value-mask + xcb:ConfigWindow:Height)) + t + (< (abs height-delta) + exwm-manage--height-delta-min)))))))) + ;; Send client message for managed windows + (with-current-buffer buffer + (setq edges + (if (exwm-layout--fullscreen-p) + (with-slots (x y width height) + (exwm-workspace--get-geometry exwm--frame) + (list x y width height)) + (window-inside-absolute-pixel-edges + (get-buffer-window buffer t)))) + (exwm--log "Reply with ConfigureNotify (edges): %s" edges) + (xcb:+request exwm--connection + (make-instance 'xcb:SendEvent + :propagate 0 :destination window + :event-mask xcb:EventMask:StructureNotify + :event (xcb:marshal + (make-instance + 'xcb:ConfigureNotify + :event window :window window + :above-sibling xcb:Window:None + :x (elt edges 0) :y (elt edges 1) + :width (- (elt edges 2) (elt edges 0)) + :height (- (elt edges 3) (elt edges 1)) + :border-width 0 :override-redirect 0) + exwm--connection)))) + (if buffer + (with-current-buffer buffer + (exwm--log "ConfigureWindow (resize floating X window)") + (exwm--set-geometry (frame-parameter exwm--floating-frame + 'exwm-outer-id) + nil + nil + (+ (frame-pixel-width exwm--floating-frame) + width-delta) + (+ (frame-pixel-height exwm--floating-frame) + height-delta))) + (exwm--log "ConfigureWindow (preserve geometry)") + ;; Configure the unmanaged window. + ;; But Emacs frames should be excluded. Generally we don't + ;; receive ConfigureRequest events from Emacs frames since we + ;; have set OverrideRedirect on them, but this is not true for + ;; Lucid build (as of 25.1). + (unless (memq window exwm-manage--frame-outer-id-list) + (xcb:+request exwm--connection + (make-instance 'xcb:ConfigureWindow + :window window + :value-mask value-mask + :x x :y y :width width :height height + :border-width border-width + :sibling sibling + :stack-mode stack-mode))))))) + (xcb:flush exwm--connection)) + +(defun exwm-manage--on-MapRequest (data _synthetic) + "Handle MapRequest event." + (let ((obj (make-instance 'xcb:MapRequest))) + (xcb:unmarshal obj data) + (with-slots (parent window) obj + (exwm--log "id=#x%x parent=#x%x" window parent) + (if (assoc window exwm--id-buffer-alist) + (with-current-buffer (exwm--id->buffer window) + (if (exwm-layout--iconic-state-p) + ;; State change: iconic => normal. + (when (eq exwm--frame exwm-workspace--current) + (pop-to-buffer-same-window (current-buffer))) + (exwm--log "#x%x is already managed" window))) + (if (/= exwm--root parent) + (progn (xcb:+request exwm--connection + (make-instance 'xcb:MapWindow :window window)) + (xcb:flush exwm--connection)) + (exwm--log "#x%x" window) + (exwm-manage--manage-window window)))))) + +(defun exwm-manage--on-UnmapNotify (data _synthetic) + "Handle UnmapNotify event." + (let ((obj (make-instance 'xcb:UnmapNotify))) + (xcb:unmarshal obj data) + (with-slots (window) obj + (exwm--log "id=#x%x" window) + (exwm-manage--unmanage-window window t)))) + +(defun exwm-manage--on-MapNotify (data _synthetic) + "Handle MapNotify event." + (let ((obj (make-instance 'xcb:MapNotify))) + (xcb:unmarshal obj data) + (with-slots (window) obj + (when (assoc window exwm--id-buffer-alist) + (exwm--log "id=#x%x" window) + ;; With this we ensure that a "window hierarchy change" happens after + ;; mapping the window, as some servers (XQuartz) do not generate it. + (with-current-buffer (exwm--id->buffer window) + (if exwm--floating-frame + (xcb:+request exwm--connection + (make-instance 'xcb:ConfigureWindow + :window window + :value-mask xcb:ConfigWindow:StackMode + :stack-mode xcb:StackMode:Above)) + (xcb:+request exwm--connection + (make-instance 'xcb:ConfigureWindow + :window window + :value-mask (logior xcb:ConfigWindow:Sibling + xcb:ConfigWindow:StackMode) + :sibling exwm--guide-window + :stack-mode xcb:StackMode:Above)))) + (xcb:flush exwm--connection))))) + +(defun exwm-manage--on-DestroyNotify (data synthetic) + "Handle DestroyNotify event." + (unless synthetic + (exwm--log) + (let ((obj (make-instance 'xcb:DestroyNotify))) + (xcb:unmarshal obj data) + (exwm--log "#x%x" (slot-value obj 'window)) + (exwm-manage--unmanage-window (slot-value obj 'window))))) + +(defun exwm-manage--init () + "Initialize manage module." + ;; Intern _MOTIF_WM_HINTS + (exwm--log) + (setq exwm-manage--_MOTIF_WM_HINTS (exwm--intern-atom "_MOTIF_WM_HINTS")) + (add-hook 'after-make-frame-functions #'exwm-manage--add-frame) + (add-hook 'delete-frame-functions #'exwm-manage--remove-frame) + (xcb:+event exwm--connection 'xcb:ConfigureRequest + #'exwm-manage--on-ConfigureRequest) + (xcb:+event exwm--connection 'xcb:MapRequest #'exwm-manage--on-MapRequest) + (xcb:+event exwm--connection 'xcb:UnmapNotify #'exwm-manage--on-UnmapNotify) + (xcb:+event exwm--connection 'xcb:MapNotify #'exwm-manage--on-MapNotify) + (xcb:+event exwm--connection 'xcb:DestroyNotify + #'exwm-manage--on-DestroyNotify)) + +(defun exwm-manage--exit () + "Exit the manage module." + (exwm--log) + (dolist (pair exwm--id-buffer-alist) + (exwm-manage--unmanage-window (car pair) 'quit)) + (remove-hook 'after-make-frame-functions #'exwm-manage--add-frame) + (remove-hook 'delete-frame-functions #'exwm-manage--remove-frame) + (setq exwm-manage--_MOTIF_WM_HINTS nil)) + + + +(provide 'exwm-manage) + +;;; exwm-manage.el ends here diff --git a/elpa/exwm-0.24/exwm-manage.elc b/elpa/exwm-0.24/exwm-manage.elc new file mode 100644 index 0000000..454e229 Binary files /dev/null and b/elpa/exwm-0.24/exwm-manage.elc differ diff --git a/elpa/exwm-0.24/exwm-pkg.el b/elpa/exwm-0.24/exwm-pkg.el new file mode 100644 index 0000000..c642e54 --- /dev/null +++ b/elpa/exwm-0.24/exwm-pkg.el @@ -0,0 +1,2 @@ +;; Generated package description from exwm.el -*- no-byte-compile: t -*- +(define-package "exwm" "0.24" "Emacs X Window Manager" '((xelb "0.18")) :keywords '("unix") :authors '(("Chris Feng" . "chris.w.feng@gmail.com")) :maintainer '("Chris Feng" . "chris.w.feng@gmail.com") :url "https://github.com/ch11ng/exwm") diff --git a/elpa/exwm-0.24/exwm-randr.el b/elpa/exwm-0.24/exwm-randr.el new file mode 100644 index 0000000..7acceb1 --- /dev/null +++ b/elpa/exwm-0.24/exwm-randr.el @@ -0,0 +1,375 @@ +;;; exwm-randr.el --- RandR Module for EXWM -*- lexical-binding: t -*- + +;; Copyright (C) 2015-2020 Free Software Foundation, Inc. + +;; Author: Chris Feng + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This module adds RandR support for EXWM. Currently it requires external +;; tools such as xrandr(1) to properly configure RandR first. This +;; dependency may be removed in the future, but more work is needed before +;; that. + +;; To use this module, load, enable it and configure +;; `exwm-randr-workspace-monitor-plist' and `exwm-randr-screen-change-hook' +;; as follows: +;; +;; (require 'exwm-randr) +;; (setq exwm-randr-workspace-monitor-plist '(0 "VGA1")) +;; (add-hook 'exwm-randr-screen-change-hook +;; (lambda () +;; (start-process-shell-command +;; "xrandr" nil "xrandr --output VGA1 --left-of LVDS1 --auto"))) +;; (exwm-randr-enable) +;; +;; With above lines, workspace 0 should be assigned to the output named "VGA1", +;; staying at the left of other workspaces on the output "LVDS1". Please refer +;; to xrandr(1) for the configuration of RandR. + +;; References: +;; + RandR (http://www.x.org/archive/X11R7.7/doc/randrproto/randrproto.txt) + +;;; Code: + +(require 'xcb-randr) + +(require 'exwm-core) +(require 'exwm-workspace) + +(defgroup exwm-randr nil + "RandR." + :version "25.3" + :group 'exwm) + +(defcustom exwm-randr-refresh-hook nil + "Normal hook run when the RandR module just refreshed." + :type 'hook) + +(defcustom exwm-randr-screen-change-hook nil + "Normal hook run when screen changes." + :type 'hook) + +(defcustom exwm-randr-workspace-monitor-plist nil + "Plist mapping workspaces to monitors. + +In RandR 1.5 a monitor is a rectangle region decoupled from the physical +size of screens, and can be identified with `xrandr --listmonitors' (name of +the primary monitor is prefixed with an `*'). When no monitor is created it +automatically fallback to RandR 1.2 output which represents the physical +screen size. RandR 1.5 monitors can be created with `xrandr --setmonitor'. +For example, to split an output (`LVDS-1') of size 1280x800 into two +side-by-side monitors one could invoke (the digits after `/' are size in mm) + + xrandr --setmonitor *LVDS-1-L 640/135x800/163+0+0 LVDS-1 + xrandr --setmonitor LVDS-1-R 640/135x800/163+640+0 none + +If a monitor is not active, the workspaces mapped to it are displayed on the +primary monitor until it becomes active (if ever). Unspecified workspaces +are all mapped to the primary monitor. For example, with the following +setting workspace other than 1 and 3 would always be displayed on the +primary monitor where workspace 1 and 3 would be displayed on their +corresponding monitors whenever the monitors are active. + + \\='(1 \"HDMI-1\" 3 \"DP-1\")" + :type '(plist :key-type integer :value-type string)) + +(with-no-warnings + (define-obsolete-variable-alias 'exwm-randr-workspace-output-plist + 'exwm-randr-workspace-monitor-plist "27.1")) + +(defvar exwm-randr--last-timestamp 0 "Used for debouncing events.") + +(defvar exwm-randr--prev-screen-change-seqnum nil + "The most recent ScreenChangeNotify sequence number.") + +(defvar exwm-randr--compatibility-mode nil + "Non-nil when the server does not support RandR 1.5 protocol.") + +(defun exwm-randr--get-monitors () + "Get RandR 1.5 monitors." + (exwm--log) + (let (monitor-name geometry monitor-geometry-alist primary-monitor) + (with-slots (timestamp monitors) + (xcb:+request-unchecked+reply exwm--connection + (make-instance 'xcb:randr:GetMonitors + :window exwm--root + :get-active 1)) + (when (> timestamp exwm-randr--last-timestamp) + (setq exwm-randr--last-timestamp timestamp)) + (dolist (monitor monitors) + (with-slots (name primary x y width height) monitor + (setq monitor-name (x-get-atom-name name) + geometry (make-instance 'xcb:RECTANGLE + :x x + :y y + :width width + :height height) + monitor-geometry-alist (cons (cons monitor-name geometry) + monitor-geometry-alist)) + (exwm--log "%s: %sx%s+%s+%s" monitor-name x y width height) + ;; Save primary monitor when available (fallback to the first one). + (when (or (/= 0 primary) + (not primary-monitor)) + (setq primary-monitor monitor-name))))) + (exwm--log "Primary monitor: %s" primary-monitor) + (list primary-monitor monitor-geometry-alist + (exwm-randr--get-monitor-alias primary-monitor + monitor-geometry-alist)))) + +(defun exwm-randr--get-outputs () + "Get RandR 1.2 outputs. + +Only used when RandR 1.5 is not supported by the server." + (exwm--log) + (let (output-name geometry output-geometry-alist primary-output) + (with-slots (config-timestamp outputs) + (xcb:+request-unchecked+reply exwm--connection + (make-instance 'xcb:randr:GetScreenResourcesCurrent + :window exwm--root)) + (when (> config-timestamp exwm-randr--last-timestamp) + (setq exwm-randr--last-timestamp config-timestamp)) + (dolist (output outputs) + (with-slots (crtc connection name) + (xcb:+request-unchecked+reply exwm--connection + (make-instance 'xcb:randr:GetOutputInfo + :output output + :config-timestamp config-timestamp)) + (when (and (= connection xcb:randr:Connection:Connected) + (/= crtc 0)) + (with-slots (x y width height) + (xcb:+request-unchecked+reply exwm--connection + (make-instance 'xcb:randr:GetCrtcInfo + :crtc crtc + :config-timestamp config-timestamp)) + (setq output-name (decode-coding-string + (apply #'unibyte-string name) 'utf-8) + geometry (make-instance 'xcb:RECTANGLE + :x x + :y y + :width width + :height height) + output-geometry-alist (cons (cons output-name geometry) + output-geometry-alist)) + (exwm--log "%s: %sx%s+%s+%s" output-name x y width height) + ;; The primary output is the first one. + (unless primary-output + (setq primary-output output-name))))))) + (exwm--log "Primary output: %s" primary-output) + (list primary-output output-geometry-alist + (exwm-randr--get-monitor-alias primary-output + output-geometry-alist)))) + +(defun exwm-randr--get-monitor-alias (primary-monitor monitor-geometry-alist) + "Generate monitor aliases using PRIMARY-MONITOR MONITOR-GEOMETRY-ALIST. + +In a mirroring setup some monitors overlap and should be treated as one." + (let (monitor-position-alist monitor-alias-alist monitor-name geometry) + (setq monitor-position-alist (with-slots (x y) + (cdr (assoc primary-monitor + monitor-geometry-alist)) + (list (cons primary-monitor (vector x y))))) + (setq monitor-alias-alist (list (cons primary-monitor primary-monitor))) + (dolist (pair monitor-geometry-alist) + (setq monitor-name (car pair) + geometry (cdr pair)) + (unless (assoc monitor-name monitor-alias-alist) + (let* ((position (vector (slot-value geometry 'x) + (slot-value geometry 'y))) + (alias (car (rassoc position monitor-position-alist)))) + (if alias + (setq monitor-alias-alist (cons (cons monitor-name alias) + monitor-alias-alist)) + (setq monitor-position-alist (cons (cons monitor-name position) + monitor-position-alist) + monitor-alias-alist (cons (cons monitor-name monitor-name) + monitor-alias-alist)))))) + monitor-alias-alist)) + +;;;###autoload +(defun exwm-randr-refresh () + "Refresh workspaces according to the updated RandR info." + (interactive) + (exwm--log) + (let* ((result (if exwm-randr--compatibility-mode + (exwm-randr--get-outputs) + (exwm-randr--get-monitors))) + (primary-monitor (elt result 0)) + (monitor-geometry-alist (elt result 1)) + (monitor-alias-alist (elt result 2)) + container-monitor-alist container-frame-alist) + (when (and primary-monitor monitor-geometry-alist) + (when exwm-workspace--fullscreen-frame-count + ;; Not all workspaces are fullscreen; reset this counter. + (setq exwm-workspace--fullscreen-frame-count 0)) + (dotimes (i (exwm-workspace--count)) + (let* ((monitor (plist-get exwm-randr-workspace-monitor-plist i)) + (geometry (cdr (assoc monitor monitor-geometry-alist))) + (frame (elt exwm-workspace--list i)) + (container (frame-parameter frame 'exwm-container))) + (if geometry + ;; Unify monitor names in case it's a mirroring setup. + (setq monitor (cdr (assoc monitor monitor-alias-alist))) + ;; Missing monitors fallback to the primary one. + (setq monitor primary-monitor + geometry (cdr (assoc primary-monitor + monitor-geometry-alist)))) + (setq container-monitor-alist (nconc + `((,container . ,(intern monitor))) + container-monitor-alist) + container-frame-alist (nconc `((,container . ,frame)) + container-frame-alist)) + (set-frame-parameter frame 'exwm-randr-monitor monitor) + (set-frame-parameter frame 'exwm-geometry geometry))) + ;; Update workareas. + (exwm-workspace--update-workareas) + ;; Resize workspace. + (dolist (f exwm-workspace--list) + (exwm-workspace--set-fullscreen f)) + (xcb:flush exwm--connection) + ;; Raise the minibuffer if it's active. + (when (and (active-minibuffer-window) + (exwm-workspace--minibuffer-own-frame-p)) + (exwm-workspace--show-minibuffer)) + ;; Set _NET_DESKTOP_GEOMETRY. + (exwm-workspace--set-desktop-geometry) + ;; Update active/inactive workspaces. + (dolist (w exwm-workspace--list) + (exwm-workspace--set-active w nil)) + ;; Mark the workspace on the top of each monitor as active. + (dolist (xwin + (reverse + (slot-value (xcb:+request-unchecked+reply exwm--connection + (make-instance 'xcb:QueryTree + :window exwm--root)) + 'children))) + (let ((monitor (cdr (assq xwin container-monitor-alist)))) + (when monitor + (setq container-monitor-alist + (rassq-delete-all monitor container-monitor-alist)) + (exwm-workspace--set-active (cdr (assq xwin container-frame-alist)) + t)))) + (xcb:flush exwm--connection) + (run-hooks 'exwm-randr-refresh-hook)))) + +(define-obsolete-function-alias 'exwm-randr--refresh #'exwm-randr-refresh + "27.1") + +(defun exwm-randr--on-ScreenChangeNotify (data _synthetic) + "Handle `ScreenChangeNotify' event. + +Run `exwm-randr-screen-change-hook' (usually user scripts to configure RandR)." + (exwm--log) + (let ((evt (make-instance 'xcb:randr:ScreenChangeNotify))) + (xcb:unmarshal evt data) + (let ((seqnum (slot-value evt '~sequence))) + (unless (equal seqnum exwm-randr--prev-screen-change-seqnum) + (setq exwm-randr--prev-screen-change-seqnum seqnum) + (run-hooks 'exwm-randr-screen-change-hook))))) + +(defun exwm-randr--on-Notify (data _synthetic) + "Handle `CrtcChangeNotify' and `OutputChangeNotify' events. + +Refresh when any CRTC/output changes." + (exwm--log) + (let ((evt (make-instance 'xcb:randr:Notify)) + notify) + (xcb:unmarshal evt data) + (with-slots (subCode u) evt + (cl-case subCode + (xcb:randr:Notify:CrtcChange + (setq notify (slot-value u 'cc))) + (xcb:randr:Notify:OutputChange + (setq notify (slot-value u 'oc)))) + (when notify + (with-slots (timestamp) notify + (when (> timestamp exwm-randr--last-timestamp) + (exwm-randr-refresh) + (setq exwm-randr--last-timestamp timestamp))))))) + +(defun exwm-randr--on-ConfigureNotify (data _synthetic) + "Handle `ConfigureNotify' event. + +Refresh when any RandR 1.5 monitor changes." + (exwm--log) + (let ((evt (make-instance 'xcb:ConfigureNotify))) + (xcb:unmarshal evt data) + (with-slots (window) evt + (when (eq window exwm--root) + (exwm-randr-refresh))))) + +(defun exwm-randr--init () + "Initialize RandR extension and EXWM RandR module." + (exwm--log) + (when (= 0 (slot-value (xcb:get-extension-data exwm--connection 'xcb:randr) + 'present)) + (error "[EXWM] RandR extension is not supported by the server")) + (with-slots (major-version minor-version) + (xcb:+request-unchecked+reply exwm--connection + (make-instance 'xcb:randr:QueryVersion + :major-version 1 :minor-version 5)) + (cond ((and (= major-version 1) (= minor-version 5)) + (setq exwm-randr--compatibility-mode nil)) + ((and (= major-version 1) (>= minor-version 2)) + (setq exwm-randr--compatibility-mode t)) + (t + (error "[EXWM] The server only support RandR version up to %d.%d" + major-version minor-version))) + ;; External monitor(s) may already be connected. + (run-hooks 'exwm-randr-screen-change-hook) + (exwm-randr-refresh) + ;; Listen for `ScreenChangeNotify' to notify external tools to + ;; configure RandR and `CrtcChangeNotify/OutputChangeNotify' to + ;; refresh the workspace layout. + (xcb:+event exwm--connection 'xcb:randr:ScreenChangeNotify + #'exwm-randr--on-ScreenChangeNotify) + (xcb:+event exwm--connection 'xcb:randr:Notify + #'exwm-randr--on-Notify) + (xcb:+event exwm--connection 'xcb:ConfigureNotify + #'exwm-randr--on-ConfigureNotify) + (xcb:+request exwm--connection + (make-instance 'xcb:randr:SelectInput + :window exwm--root + :enable (logior + xcb:randr:NotifyMask:ScreenChange + xcb:randr:NotifyMask:CrtcChange + xcb:randr:NotifyMask:OutputChange))) + (xcb:flush exwm--connection) + (add-hook 'exwm-workspace-list-change-hook #'exwm-randr-refresh)) + ;; Prevent frame parameters introduced by this module from being + ;; saved/restored. + (dolist (i '(exwm-randr-monitor)) + (unless (assq i frameset-filter-alist) + (push (cons i :never) frameset-filter-alist)))) + +(defun exwm-randr--exit () + "Exit the RandR module." + (exwm--log) + (remove-hook 'exwm-workspace-list-change-hook #'exwm-randr-refresh)) + +(defun exwm-randr-enable () + "Enable RandR support for EXWM." + (exwm--log) + (add-hook 'exwm-init-hook #'exwm-randr--init) + (add-hook 'exwm-exit-hook #'exwm-randr--exit)) + + + +(provide 'exwm-randr) + +;;; exwm-randr.el ends here diff --git a/elpa/exwm-0.24/exwm-randr.elc b/elpa/exwm-0.24/exwm-randr.elc new file mode 100644 index 0000000..b459eb7 Binary files /dev/null and b/elpa/exwm-0.24/exwm-randr.elc differ diff --git a/elpa/exwm-0.24/exwm-systemtray.el b/elpa/exwm-0.24/exwm-systemtray.el new file mode 100644 index 0000000..20dc522 --- /dev/null +++ b/elpa/exwm-0.24/exwm-systemtray.el @@ -0,0 +1,587 @@ +;;; exwm-systemtray.el --- System Tray Module for -*- lexical-binding: t -*- +;;; EXWM + +;; Copyright (C) 2016-2020 Free Software Foundation, Inc. + +;; Author: Chris Feng + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This module adds system tray support for EXWM. + +;; To use this module, load and enable it as follows: +;; (require 'exwm-systemtray) +;; (exwm-systemtray-enable) + +;;; Code: + +(require 'xcb-icccm) +(require 'xcb-xembed) +(require 'xcb-systemtray) + +(require 'exwm-core) +(require 'exwm-workspace) + +(defclass exwm-systemtray--icon () + ((width :initarg :width) + (height :initarg :height) + (visible :initarg :visible)) + :documentation "Attributes of a system tray icon.") + +(defclass xcb:systemtray:-ClientMessage + (xcb:icccm:--ClientMessage xcb:ClientMessage) + ((format :initform 32) + (type :initform xcb:Atom:MANAGER) + (time :initarg :time :type xcb:TIMESTAMP) ;new slot + (selection :initarg :selection :type xcb:ATOM) ;new slot + (owner :initarg :owner :type xcb:WINDOW)) ;new slot + :documentation "A systemtray client message.") + +(defgroup exwm-systemtray nil + "System tray." + :version "25.3" + :group 'exwm) + +(defcustom exwm-systemtray-height nil + "System tray height. + +You shall use the default value if using auto-hide minibuffer." + :type 'integer) + +(defcustom exwm-systemtray-icon-gap 2 + "Gap between icons." + :type 'integer) + +(defvar exwm-systemtray--embedder-window nil "The embedder window.") + +(defcustom exwm-systemtray-background-color nil + "Background color of systemtray. + +This should be a color, or nil for transparent background." + :type '(choice (const :tag "Transparent" nil) + (color)) + :initialize #'custom-initialize-default + :set (lambda (symbol value) + (set-default symbol value) + ;; Change the background color for embedder. + (when (and exwm--connection + exwm-systemtray--embedder-window) + (let ((background-pixel (exwm--color->pixel value))) + (xcb:+request exwm--connection + (make-instance 'xcb:ChangeWindowAttributes + :window exwm-systemtray--embedder-window + :value-mask (logior xcb:CW:BackPixmap + (if background-pixel + xcb:CW:BackPixel 0)) + :background-pixmap + xcb:BackPixmap:ParentRelative + :background-pixel background-pixel)) + ;; Unmap & map to take effect immediately. + (xcb:+request exwm--connection + (make-instance 'xcb:UnmapWindow + :window exwm-systemtray--embedder-window)) + (xcb:+request exwm--connection + (make-instance 'xcb:MapWindow + :window exwm-systemtray--embedder-window)) + (xcb:flush exwm--connection))))) + +;; GTK icons require at least 16 pixels to show normally. +(defconst exwm-systemtray--icon-min-size 16 "Minimum icon size.") + +(defvar exwm-systemtray--connection nil "The X connection.") + +(defvar exwm-systemtray--list nil "The icon list.") + +(defvar exwm-systemtray--selection-owner-window nil + "The selection owner window.") + +(defvar xcb:Atom:_NET_SYSTEM_TRAY_S0) + +(defun exwm-systemtray--embed (icon) + "Embed an icon." + (exwm--log "Try to embed #x%x" icon) + (let ((info (xcb:+request-unchecked+reply exwm-systemtray--connection + (make-instance 'xcb:xembed:get-_XEMBED_INFO + :window icon))) + width* height* visible) + (when info + (exwm--log "Embed #x%x" icon) + (with-slots (width height) + (xcb:+request-unchecked+reply exwm-systemtray--connection + (make-instance 'xcb:GetGeometry :drawable icon)) + (setq height* exwm-systemtray-height + width* (round (* width (/ (float height*) height)))) + (when (< width* exwm-systemtray--icon-min-size) + (setq width* exwm-systemtray--icon-min-size + height* (round (* height (/ (float width*) width))))) + (exwm--log "Resize from %dx%d to %dx%d" + width height width* height*)) + ;; Add this icon to save-set. + (xcb:+request exwm-systemtray--connection + (make-instance 'xcb:ChangeSaveSet + :mode xcb:SetMode:Insert + :window icon)) + ;; Reparent to the embedder. + (xcb:+request exwm-systemtray--connection + (make-instance 'xcb:ReparentWindow + :window icon + :parent exwm-systemtray--embedder-window + :x 0 + ;; Vertically centered. + :y (/ (- exwm-systemtray-height height*) 2))) + ;; Resize the icon. + (xcb:+request exwm-systemtray--connection + (make-instance 'xcb:ConfigureWindow + :window icon + :value-mask (logior xcb:ConfigWindow:Width + xcb:ConfigWindow:Height + xcb:ConfigWindow:BorderWidth) + :width width* + :height height* + :border-width 0)) + ;; Set event mask. + (xcb:+request exwm-systemtray--connection + (make-instance 'xcb:ChangeWindowAttributes + :window icon + :value-mask xcb:CW:EventMask + :event-mask (logior xcb:EventMask:ResizeRedirect + xcb:EventMask:KeyPress + xcb:EventMask:PropertyChange))) + ;; Grab all keys and forward them to Emacs frame. + (unless (exwm-workspace--minibuffer-own-frame-p) + (xcb:+request exwm-systemtray--connection + (make-instance 'xcb:GrabKey + :owner-events 0 + :grab-window icon + :modifiers xcb:ModMask:Any + :key xcb:Grab:Any + :pointer-mode xcb:GrabMode:Async + :keyboard-mode xcb:GrabMode:Async))) + (setq visible (slot-value info 'flags)) + (if visible + (setq visible + (/= 0 (logand (slot-value info 'flags) xcb:xembed:MAPPED))) + ;; Default to visible. + (setq visible t)) + (when visible + (exwm--log "Map the window") + (xcb:+request exwm-systemtray--connection + (make-instance 'xcb:MapWindow :window icon))) + (xcb:+request exwm-systemtray--connection + (make-instance 'xcb:xembed:SendEvent + :destination icon + :event + (xcb:marshal + (make-instance 'xcb:xembed:EMBEDDED-NOTIFY + :window icon + :time xcb:Time:CurrentTime + :embedder + exwm-systemtray--embedder-window + :version 0) + exwm-systemtray--connection))) + (push `(,icon . ,(make-instance 'exwm-systemtray--icon + :width width* + :height height* + :visible visible)) + exwm-systemtray--list) + (exwm-systemtray--refresh)))) + +(defun exwm-systemtray--unembed (icon) + "Unembed an icon." + (exwm--log "Unembed #x%x" icon) + (xcb:+request exwm-systemtray--connection + (make-instance 'xcb:UnmapWindow :window icon)) + (xcb:+request exwm-systemtray--connection + (make-instance 'xcb:ReparentWindow + :window icon + :parent exwm--root + :x 0 :y 0)) + (setq exwm-systemtray--list + (assq-delete-all icon exwm-systemtray--list)) + (exwm-systemtray--refresh)) + +(defun exwm-systemtray--refresh () + "Refresh the system tray." + (exwm--log) + ;; Make sure to redraw the embedder. + (xcb:+request exwm-systemtray--connection + (make-instance 'xcb:UnmapWindow + :window exwm-systemtray--embedder-window)) + (let ((x exwm-systemtray-icon-gap) + map) + (dolist (pair exwm-systemtray--list) + (when (slot-value (cdr pair) 'visible) + (xcb:+request exwm-systemtray--connection + (make-instance 'xcb:ConfigureWindow + :window (car pair) + :value-mask xcb:ConfigWindow:X + :x x)) + (setq x (+ x (slot-value (cdr pair) 'width) + exwm-systemtray-icon-gap)) + (setq map t))) + (let ((workarea (elt exwm-workspace--workareas + exwm-workspace-current-index))) + (xcb:+request exwm-systemtray--connection + (make-instance 'xcb:ConfigureWindow + :window exwm-systemtray--embedder-window + :value-mask (logior xcb:ConfigWindow:X + xcb:ConfigWindow:Width) + :x (- (aref workarea 2) x) + :width x))) + (when map + (xcb:+request exwm-systemtray--connection + (make-instance 'xcb:MapWindow + :window exwm-systemtray--embedder-window)))) + (xcb:flush exwm-systemtray--connection)) + +(defun exwm-systemtray--on-DestroyNotify (data _synthetic) + "Unembed icons on DestroyNotify." + (exwm--log) + (let ((obj (make-instance 'xcb:DestroyNotify))) + (xcb:unmarshal obj data) + (with-slots (window) obj + (when (assoc window exwm-systemtray--list) + (exwm-systemtray--unembed window))))) + +(defun exwm-systemtray--on-ReparentNotify (data _synthetic) + "Unembed icons on ReparentNotify." + (exwm--log) + (let ((obj (make-instance 'xcb:ReparentNotify))) + (xcb:unmarshal obj data) + (with-slots (window parent) obj + (when (and (/= parent exwm-systemtray--embedder-window) + (assoc window exwm-systemtray--list)) + (exwm-systemtray--unembed window))))) + +(defun exwm-systemtray--on-ResizeRequest (data _synthetic) + "Resize the tray icon on ResizeRequest." + (exwm--log) + (let ((obj (make-instance 'xcb:ResizeRequest)) + attr) + (xcb:unmarshal obj data) + (with-slots (window width height) obj + (when (setq attr (cdr (assoc window exwm-systemtray--list))) + (with-slots ((width* width) + (height* height)) + attr + (setq height* exwm-systemtray-height + width* (round (* width (/ (float height*) height)))) + (when (< width* exwm-systemtray--icon-min-size) + (setq width* exwm-systemtray--icon-min-size + height* (round (* height (/ (float width*) width))))) + (xcb:+request exwm-systemtray--connection + (make-instance 'xcb:ConfigureWindow + :window window + :value-mask (logior xcb:ConfigWindow:Y + xcb:ConfigWindow:Width + xcb:ConfigWindow:Height) + ;; Vertically centered. + :y (/ (- exwm-systemtray-height height*) 2) + :width width* + :height height*))) + (exwm-systemtray--refresh))))) + +(defun exwm-systemtray--on-PropertyNotify (data _synthetic) + "Map/Unmap the tray icon on PropertyNotify." + (exwm--log) + (let ((obj (make-instance 'xcb:PropertyNotify)) + attr info visible) + (xcb:unmarshal obj data) + (with-slots (window atom state) obj + (when (and (eq state xcb:Property:NewValue) + (eq atom xcb:Atom:_XEMBED_INFO) + (setq attr (cdr (assoc window exwm-systemtray--list)))) + (setq info (xcb:+request-unchecked+reply exwm-systemtray--connection + (make-instance 'xcb:xembed:get-_XEMBED_INFO + :window window))) + (when info + (setq visible (/= 0 (logand (slot-value info 'flags) + xcb:xembed:MAPPED))) + (exwm--log "#x%x visible? %s" window visible) + (if visible + (xcb:+request exwm-systemtray--connection + (make-instance 'xcb:MapWindow :window window)) + (xcb:+request exwm-systemtray--connection + (make-instance 'xcb:UnmapWindow :window window))) + (setf (slot-value attr 'visible) visible) + (exwm-systemtray--refresh)))))) + +(defun exwm-systemtray--on-ClientMessage (data _synthetic) + "Handle client messages." + (let ((obj (make-instance 'xcb:ClientMessage)) + opcode data32) + (xcb:unmarshal obj data) + (with-slots (window type data) obj + (when (eq type xcb:Atom:_NET_SYSTEM_TRAY_OPCODE) + (setq data32 (slot-value data 'data32) + opcode (elt data32 1)) + (exwm--log "opcode: %s" opcode) + (cond ((= opcode xcb:systemtray:opcode:REQUEST-DOCK) + (unless (assoc (elt data32 2) exwm-systemtray--list) + (exwm-systemtray--embed (elt data32 2)))) + ;; Not implemented (rarely used nowadays). + ((or (= opcode xcb:systemtray:opcode:BEGIN-MESSAGE) + (= opcode xcb:systemtray:opcode:CANCEL-MESSAGE))) + (t + (exwm--log "Unknown opcode message: %s" obj))))))) + +(defun exwm-systemtray--on-KeyPress (data _synthetic) + "Forward all KeyPress events to Emacs frame." + (exwm--log) + ;; This function is only executed when there's no autohide minibuffer, + ;; a workspace frame has the input focus and the pointer is over a + ;; tray icon. + (let ((dest (frame-parameter (selected-frame) 'exwm-outer-id)) + (obj (make-instance 'xcb:KeyPress))) + (xcb:unmarshal obj data) + (setf (slot-value obj 'event) dest) + (xcb:+request exwm-systemtray--connection + (make-instance 'xcb:SendEvent + :propagate 0 + :destination dest + :event-mask xcb:EventMask:NoEvent + :event (xcb:marshal obj exwm-systemtray--connection)))) + (xcb:flush exwm-systemtray--connection)) + +(defun exwm-systemtray--on-workspace-switch () + "Reparent/Refresh the system tray in `exwm-workspace-switch-hook'." + (exwm--log) + (unless (exwm-workspace--minibuffer-own-frame-p) + (exwm-workspace--update-offsets) + (xcb:+request exwm-systemtray--connection + (make-instance 'xcb:ReparentWindow + :window exwm-systemtray--embedder-window + :parent (string-to-number + (frame-parameter exwm-workspace--current + 'window-id)) + :x 0 + :y (- (elt (elt exwm-workspace--workareas + exwm-workspace-current-index) + 3) + exwm-workspace--frame-y-offset + exwm-systemtray-height)))) + (exwm-systemtray--refresh)) + +(defun exwm-systemtray--refresh-all () + "Reposition/Refresh the system tray." + (exwm--log) + (unless (exwm-workspace--minibuffer-own-frame-p) + (exwm-workspace--update-offsets) + (xcb:+request exwm-systemtray--connection + (make-instance 'xcb:ConfigureWindow + :window exwm-systemtray--embedder-window + :value-mask xcb:ConfigWindow:Y + :y (- (elt (elt exwm-workspace--workareas + exwm-workspace-current-index) + 3) + exwm-workspace--frame-y-offset + exwm-systemtray-height)))) + (exwm-systemtray--refresh)) + +(cl-defun exwm-systemtray--init () + "Initialize system tray module." + (exwm--log) + (cl-assert (not exwm-systemtray--connection)) + (cl-assert (not exwm-systemtray--list)) + (cl-assert (not exwm-systemtray--selection-owner-window)) + (cl-assert (not exwm-systemtray--embedder-window)) + (unless exwm-systemtray-height + (setq exwm-systemtray-height (max exwm-systemtray--icon-min-size + (line-pixel-height)))) + ;; Create a new connection. + (setq exwm-systemtray--connection (xcb:connect)) + (set-process-query-on-exit-flag (slot-value exwm-systemtray--connection + 'process) + nil) + ;; Initialize XELB modules. + (xcb:xembed:init exwm-systemtray--connection t) + (xcb:systemtray:init exwm-systemtray--connection t) + ;; Acquire the manager selection _NET_SYSTEM_TRAY_S0. + (with-slots (owner) + (xcb:+request-unchecked+reply exwm-systemtray--connection + (make-instance 'xcb:GetSelectionOwner + :selection xcb:Atom:_NET_SYSTEM_TRAY_S0)) + (when (/= owner xcb:Window:None) + (xcb:disconnect exwm-systemtray--connection) + (setq exwm-systemtray--connection nil) + (warn "[EXWM] Other system tray detected") + (cl-return-from exwm-systemtray--init))) + (let ((id (xcb:generate-id exwm-systemtray--connection))) + (setq exwm-systemtray--selection-owner-window id) + (xcb:+request exwm-systemtray--connection + (make-instance 'xcb:CreateWindow + :depth 0 + :wid id + :parent exwm--root + :x 0 + :y 0 + :width 1 + :height 1 + :border-width 0 + :class xcb:WindowClass:InputOnly + :visual 0 + :value-mask xcb:CW:OverrideRedirect + :override-redirect 1)) + ;; Get the selection ownership. + (xcb:+request exwm-systemtray--connection + (make-instance 'xcb:SetSelectionOwner + :owner id + :selection xcb:Atom:_NET_SYSTEM_TRAY_S0 + :time xcb:Time:CurrentTime)) + ;; Send a client message to announce the selection. + (xcb:+request exwm-systemtray--connection + (make-instance 'xcb:SendEvent + :propagate 0 + :destination exwm--root + :event-mask xcb:EventMask:StructureNotify + :event (xcb:marshal + (make-instance 'xcb:systemtray:-ClientMessage + :window exwm--root + :time xcb:Time:CurrentTime + :selection + xcb:Atom:_NET_SYSTEM_TRAY_S0 + :owner id) + exwm-systemtray--connection))) + ;; Set _NET_WM_NAME. + (xcb:+request exwm-systemtray--connection + (make-instance 'xcb:ewmh:set-_NET_WM_NAME + :window id + :data "EXWM: exwm-systemtray--selection-owner-window")) + ;; Set the _NET_SYSTEM_TRAY_ORIENTATION property. + (xcb:+request exwm-systemtray--connection + (make-instance 'xcb:xembed:set-_NET_SYSTEM_TRAY_ORIENTATION + :window id + :data xcb:systemtray:ORIENTATION:HORZ))) + ;; Create the embedder. + (let ((id (xcb:generate-id exwm-systemtray--connection)) + (background-pixel (exwm--color->pixel exwm-systemtray-background-color)) + frame parent depth y) + (setq exwm-systemtray--embedder-window id) + (if (exwm-workspace--minibuffer-own-frame-p) + (setq frame exwm-workspace--minibuffer + y (if (>= (line-pixel-height) exwm-systemtray-height) + ;; Bottom aligned. + (- (line-pixel-height) exwm-systemtray-height) + ;; Vertically centered. + (/ (- (line-pixel-height) exwm-systemtray-height) 2))) + (exwm-workspace--update-offsets) + (setq frame exwm-workspace--current + ;; Bottom aligned. + y (- (elt (elt exwm-workspace--workareas + exwm-workspace-current-index) + 3) + exwm-workspace--frame-y-offset + exwm-systemtray-height))) + (setq parent (string-to-number (frame-parameter frame 'window-id)) + depth (slot-value (xcb:+request-unchecked+reply + exwm-systemtray--connection + (make-instance 'xcb:GetGeometry + :drawable parent)) + 'depth)) + (xcb:+request exwm-systemtray--connection + (make-instance 'xcb:CreateWindow + :depth depth + :wid id + :parent parent + :x 0 + :y y + :width 1 + :height exwm-systemtray-height + :border-width 0 + :class xcb:WindowClass:InputOutput + :visual 0 + :value-mask (logior xcb:CW:BackPixmap + (if background-pixel + xcb:CW:BackPixel 0) + xcb:CW:EventMask) + :background-pixmap xcb:BackPixmap:ParentRelative + :background-pixel background-pixel + :event-mask xcb:EventMask:SubstructureNotify)) + ;; Set _NET_WM_NAME. + (xcb:+request exwm-systemtray--connection + (make-instance 'xcb:ewmh:set-_NET_WM_NAME + :window id + :data "EXWM: exwm-systemtray--embedder-window"))) + (xcb:flush exwm-systemtray--connection) + ;; Attach event listeners. + (xcb:+event exwm-systemtray--connection 'xcb:DestroyNotify + #'exwm-systemtray--on-DestroyNotify) + (xcb:+event exwm-systemtray--connection 'xcb:ReparentNotify + #'exwm-systemtray--on-ReparentNotify) + (xcb:+event exwm-systemtray--connection 'xcb:ResizeRequest + #'exwm-systemtray--on-ResizeRequest) + (xcb:+event exwm-systemtray--connection 'xcb:PropertyNotify + #'exwm-systemtray--on-PropertyNotify) + (xcb:+event exwm-systemtray--connection 'xcb:ClientMessage + #'exwm-systemtray--on-ClientMessage) + (unless (exwm-workspace--minibuffer-own-frame-p) + (xcb:+event exwm-systemtray--connection 'xcb:KeyPress + #'exwm-systemtray--on-KeyPress)) + ;; Add hook to move/reparent the embedder. + (add-hook 'exwm-workspace-switch-hook #'exwm-systemtray--on-workspace-switch) + (add-hook 'exwm-workspace--update-workareas-hook + #'exwm-systemtray--refresh-all) + (add-hook 'menu-bar-mode-hook #'exwm-systemtray--refresh-all) + (add-hook 'tool-bar-mode-hook #'exwm-systemtray--refresh-all) + (when (boundp 'exwm-randr-refresh-hook) + (add-hook 'exwm-randr-refresh-hook #'exwm-systemtray--refresh-all)) + ;; The struts can be updated already. + (when exwm-workspace--workareas + (exwm-systemtray--refresh-all))) + +(defun exwm-systemtray--exit () + "Exit the systemtray module." + (exwm--log) + (when exwm-systemtray--connection + ;; Hide & reparent out the embedder before disconnection to prevent + ;; embedded icons from being reparented to an Emacs frame (which is the + ;; parent of the embedder). + (xcb:+request exwm-systemtray--connection + (make-instance 'xcb:UnmapWindow + :window exwm-systemtray--embedder-window)) + (xcb:+request exwm-systemtray--connection + (make-instance 'xcb:ReparentWindow + :window exwm-systemtray--embedder-window + :parent exwm--root + :x 0 + :y 0)) + (xcb:disconnect exwm-systemtray--connection) + (setq exwm-systemtray--connection nil + exwm-systemtray--list nil + exwm-systemtray--selection-owner-window nil + exwm-systemtray--embedder-window nil) + (remove-hook 'exwm-workspace-switch-hook + #'exwm-systemtray--on-workspace-switch) + (remove-hook 'exwm-workspace--update-workareas-hook + #'exwm-systemtray--refresh-all) + (remove-hook 'menu-bar-mode-hook #'exwm-systemtray--refresh-all) + (remove-hook 'tool-bar-mode-hook #'exwm-systemtray--refresh-all) + (when (boundp 'exwm-randr-refresh-hook) + (remove-hook 'exwm-randr-refresh-hook #'exwm-systemtray--refresh-all)))) + +(defun exwm-systemtray-enable () + "Enable system tray support for EXWM." + (exwm--log) + (add-hook 'exwm-init-hook #'exwm-systemtray--init) + (add-hook 'exwm-exit-hook #'exwm-systemtray--exit)) + + + +(provide 'exwm-systemtray) + +;;; exwm-systemtray.el ends here diff --git a/elpa/exwm-0.24/exwm-systemtray.elc b/elpa/exwm-0.24/exwm-systemtray.elc new file mode 100644 index 0000000..668551f Binary files /dev/null and b/elpa/exwm-0.24/exwm-systemtray.elc differ diff --git a/elpa/exwm-0.24/exwm-workspace.el b/elpa/exwm-0.24/exwm-workspace.el new file mode 100644 index 0000000..cff17f3 --- /dev/null +++ b/elpa/exwm-0.24/exwm-workspace.el @@ -0,0 +1,1750 @@ +;;; exwm-workspace.el --- Workspace Module for EXWM -*- lexical-binding: t -*- + +;; Copyright (C) 2015-2020 Free Software Foundation, Inc. + +;; Author: Chris Feng + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This module adds workspace support for EXWM. + +;;; Code: + +(require 'server) + +(require 'exwm-core) + +(defgroup exwm-workspace nil + "Workspace." + :version "25.3" + :group 'exwm) + +(defcustom exwm-workspace-switch-hook nil + "Normal hook run after switching workspace." + :type 'hook) + +(defcustom exwm-workspace-list-change-hook nil + "Normal hook run when the workspace list is changed (workspace added, +deleted, moved, etc)." + :type 'hook) + +(defcustom exwm-workspace-show-all-buffers nil + "Non-nil to show buffers on other workspaces." + :type 'boolean) + +(defcustom exwm-workspace-warp-cursor nil + "Non-nil to warp cursor automatically after workspace switch." + :type 'boolean) + +(defcustom exwm-workspace-number 1 + "Initial number of workspaces." + :type 'integer) + +(defcustom exwm-workspace-index-map #'number-to-string + "Function for mapping a workspace index to a string for display. + +By default `number-to-string' is applied which yields 0 1 2 ... ." + :type 'function) + +(defcustom exwm-workspace-minibuffer-position nil + "Position of the minibuffer frame. + +A restart is required for this change to take effect." + :type '(choice (const :tag "Bottom (fixed)" nil) + (const :tag "Bottom (auto-hide)" bottom) + (const :tag "Top (auto-hide)" top))) + +(defcustom exwm-workspace-display-echo-area-timeout 1 + "Timeout for displaying echo area." + :type 'integer) + +(defcustom exwm-workspace-switch-create-limit 10 + "Number of workspaces `exwm-workspace-switch-create' allowed to create +each time." + :type 'integer) + +(defvar exwm-workspace-current-index 0 "Index of current active workspace.") + +(defvar exwm-workspace--attached-minibuffer-height 0 + "Height (in pixel) of the attached minibuffer. + +If the minibuffer is detached, this value is 0.") + +(defvar exwm-workspace--client nil + "The 'client' frame parameter of emacsclient frames.") + +(defvar exwm-workspace--create-silently nil + "When non-nil workspaces are created in the background (not switched to). + +Please manually run the hook `exwm-workspace-list-change-hook' afterwards.") + +(defvar exwm-workspace--current nil "Current active workspace.") + +(defvar exwm-workspace--display-echo-area-timer nil + "Timer for auto-hiding echo area.") + +(defvar exwm-workspace--id-struts-alist nil "Alist of X window and struts.") + +(defvar exwm-workspace--fullscreen-frame-count 0 + "Count the fullscreen workspace frames.") + +(defvar exwm-workspace--list nil "List of all workspaces (Emacs frames).") + +(defvar exwm-workspace--minibuffer nil + "The minibuffer frame shared among all frames.") + +(defvar exwm-workspace--original-handle-focus-in + (symbol-function #'handle-focus-in)) +(defvar exwm-workspace--original-handle-focus-out + (symbol-function #'handle-focus-out)) + +(defvar exwm-workspace--prompt-add-allowed nil + "Non-nil to allow adding workspace from the prompt.") + +(defvar exwm-workspace--prompt-delete-allowed nil + "Non-nil to allow deleting workspace from the prompt.") + +(defvar exwm-workspace--struts nil "Areas occupied by struts.") + +(defvar exwm-workspace--switch-history nil + "History for `read-from-minibuffer' to interactively switch workspace.") + +(defvar exwm-workspace--switch-history-outdated nil + "Non-nil to indicate `exwm-workspace--switch-history' is outdated.") + +(defvar exwm-workspace--timer nil "Timer used to track echo area changes.") + +(defvar exwm-workspace--update-workareas-hook nil + "Normal hook run when workareas get updated.") + +(defvar exwm-workspace--workareas nil "Workareas (struts excluded).") + +(defvar exwm-workspace--frame-y-offset 0 + "Offset between Emacs inner & outer frame in Y.") +(defvar exwm-workspace--window-y-offset 0 + "Offset between Emacs first window & outer frame in Y.") + +(defvar exwm-input--during-command) +(defvar exwm-input--event-hook) +(defvar exwm-layout-show-all-buffers) +(defvar exwm-manage--desktop) +(declare-function exwm-input--on-buffer-list-update "exwm-input.el" ()) +(declare-function exwm-layout--fullscreen-p "exwm-layout.el" ()) +(declare-function exwm-layout--hide "exwm-layout.el" (id)) +(declare-function exwm-layout--other-buffer-predicate "exwm-layout.el" + (buffer)) +(declare-function exwm-layout--refresh "exwm-layout.el") +(declare-function exwm-layout--show "exwm-layout.el" (id &optional window)) + +(defsubst exwm-workspace--position (frame) + "Retrieve index of given FRAME in workspace list. + +NIL if FRAME is not a workspace" + (cl-position frame exwm-workspace--list)) + +(defsubst exwm-workspace--count () + "Retrieve total number of workspaces." + (length exwm-workspace--list)) + +(defsubst exwm-workspace--workspace-p (frame) + "Return t if FRAME is a workspace." + (memq frame exwm-workspace--list)) + +(defsubst exwm-workspace--client-p (&optional frame) + "Return non-nil if FRAME is an emacsclient frame." + (or (frame-parameter frame 'client) + (not (display-graphic-p frame)))) + +(defvar exwm-workspace--switch-map nil + "Keymap used for interactively selecting workspace.") + +(defun exwm-workspace--init-switch-map () + (let ((map (make-sparse-keymap))) + (define-key map [t] (lambda () (interactive))) + (define-key map "+" #'exwm-workspace--prompt-add) + (define-key map "-" #'exwm-workspace--prompt-delete) + (dotimes (i 10) + (define-key map (int-to-string i) + #'exwm-workspace--switch-map-nth-prefix)) + (unless (eq exwm-workspace-index-map #'number-to-string) + ;; Add extra (and possibly override) keys for selecting workspace. + (dotimes (i 10) + (let ((key (funcall exwm-workspace-index-map i))) + (when (and (stringp key) + (= (length key) 1) + (<= 0 (elt key 0) 127)) + (define-key map key + (lambda () + (interactive) + (exwm-workspace--switch-map-select-nth i))))))) + (define-key map "\C-a" (lambda () (interactive) (goto-history-element 1))) + (define-key map "\C-e" (lambda () + (interactive) + (goto-history-element (exwm-workspace--count)))) + (define-key map "\C-g" #'abort-recursive-edit) + (define-key map "\C-]" #'abort-recursive-edit) + (define-key map "\C-j" #'exit-minibuffer) + ;; (define-key map "\C-m" #'exit-minibuffer) ;not working + (define-key map [return] #'exit-minibuffer) + (define-key map " " #'exit-minibuffer) + (define-key map "\C-f" #'previous-history-element) + (define-key map "\C-b" #'next-history-element) + ;; Alternative keys + (define-key map [right] #'previous-history-element) + (define-key map [left] #'next-history-element) + (setq exwm-workspace--switch-map map))) + +(defun exwm-workspace--workspace-from-frame-or-index (frame-or-index) + "Retrieve the workspace frame from FRAME-OR-INDEX." + (cond + ((framep frame-or-index) + (unless (exwm-workspace--position frame-or-index) + (user-error "[EXWM] Frame is not a workspace %S" frame-or-index)) + frame-or-index) + ((integerp frame-or-index) + (unless (and (<= 0 frame-or-index) + (< frame-or-index (exwm-workspace--count))) + (user-error "[EXWM] Workspace index out of range: %d" frame-or-index)) + (elt exwm-workspace--list frame-or-index)) + (t (user-error "[EXWM] Invalid workspace: %s" frame-or-index)))) + +(defun exwm-workspace--prompt-for-workspace (&optional prompt) + "Prompt for a workspace, returning the workspace frame." + (exwm-workspace--update-switch-history) + (let* ((current-idx (exwm-workspace--position exwm-workspace--current)) + (history-add-new-input nil) ;prevent modifying history + (history-idx (read-from-minibuffer + (or prompt "Workspace: ") + (elt exwm-workspace--switch-history current-idx) + exwm-workspace--switch-map nil + `(exwm-workspace--switch-history . ,(1+ current-idx)))) + (workspace-idx (cl-position history-idx exwm-workspace--switch-history + :test #'equal))) + (elt exwm-workspace--list workspace-idx))) + +(defun exwm-workspace--prompt-add () + "Add workspace from the prompt." + (interactive) + (when exwm-workspace--prompt-add-allowed + (let ((exwm-workspace--create-silently t)) + (make-frame) + (run-hooks 'exwm-workspace-list-change-hook)) + (exwm-workspace--update-switch-history) + (goto-history-element minibuffer-history-position))) + +(defun exwm-workspace--prompt-delete () + "Delete workspace from the prompt." + (interactive) + (when (and exwm-workspace--prompt-delete-allowed + (< 1 (exwm-workspace--count))) + (let ((frame (elt exwm-workspace--list (1- minibuffer-history-position)))) + (exwm-workspace--get-remove-frame-next-workspace frame) + (if (eq frame exwm-workspace--current) + ;; Abort the recursive minibuffer if deleting the current workspace. + (progn + (exwm--defer 0 #'delete-frame frame) + (abort-recursive-edit)) + (delete-frame frame) + (exwm-workspace--update-switch-history) + (goto-history-element (min minibuffer-history-position + (exwm-workspace--count))))))) + +(defun exwm-workspace--update-switch-history () + "Update the history for switching workspace to reflect the latest status." + (when exwm-workspace--switch-history-outdated + (setq exwm-workspace--switch-history-outdated nil) + (let* ((num (exwm-workspace--count)) + (sequence (number-sequence 0 (1- num))) + (not-empty (make-vector num nil))) + (dolist (i exwm--id-buffer-alist) + (with-current-buffer (cdr i) + (when exwm--frame + (setf (aref not-empty + (exwm-workspace--position exwm--frame)) + t)))) + (setq exwm-workspace--switch-history + (mapcar + (lambda (i) + (mapconcat + (lambda (j) + (format (if (= i j) "[%s]" " %s ") + (propertize + (apply exwm-workspace-index-map (list j)) + 'face + (cond ((frame-parameter (elt exwm-workspace--list j) + 'exwm-urgency) + '(:foreground "orange")) + ((aref not-empty j) '(:foreground "green")) + (t nil))))) + sequence "")) + sequence))))) + +;;;###autoload +(defun exwm-workspace--get-geometry (frame) + "Return the geometry of frame FRAME." + (or (frame-parameter frame 'exwm-geometry) + (make-instance 'xcb:RECTANGLE + :x 0 + :y 0 + :width (x-display-pixel-width) + :height (x-display-pixel-height)))) + +;;;###autoload +(defun exwm-workspace--current-height () + "Return the height of current workspace." + (let ((geometry (frame-parameter exwm-workspace--current 'exwm-geometry))) + (if geometry + (slot-value geometry 'height) + (x-display-pixel-height)))) + +;;;###autoload +(defun exwm-workspace--minibuffer-own-frame-p () + "Reports whether the minibuffer is displayed in its own frame." + (memq exwm-workspace-minibuffer-position '(top bottom))) + +(defun exwm-workspace--update-struts () + "Update `exwm-workspace--struts'." + (setq exwm-workspace--struts nil) + (let (struts struts*) + (dolist (pair exwm-workspace--id-struts-alist) + (setq struts (cdr pair)) + (when struts + (dotimes (i 4) + (when (/= 0 (aref struts i)) + (setq struts* + (vector (aref [left right top bottom] i) + (aref struts i) + (when (= 12 (length struts)) + (substring struts (+ 4 (* i 2)) (+ 6 (* i 2)))))) + (if (= 0 (mod i 2)) + ;; Make left/top processed first. + (push struts* exwm-workspace--struts) + (setq exwm-workspace--struts + (append exwm-workspace--struts (list struts*)))))))) + (exwm--log "%s" exwm-workspace--struts))) + +(defun exwm-workspace--update-workareas () + "Update `exwm-workspace--workareas'." + (let ((root-width (x-display-pixel-width)) + (root-height (x-display-pixel-height)) + workareas + edge width position + delta) + ;; Calculate workareas with no struts. + (if (frame-parameter (car exwm-workspace--list) 'exwm-geometry) + ;; Use the 'exwm-geometry' frame parameter if possible. + (dolist (f exwm-workspace--list) + (with-slots (x y width height) (frame-parameter f 'exwm-geometry) + (setq workareas (append workareas + (list (vector x y width height)))))) + ;; Fall back to use the screen size. + (let ((workarea (vector 0 0 root-width root-height))) + (setq workareas (make-list (exwm-workspace--count) workarea)))) + ;; Exclude areas occupied by struts. + (dolist (struts exwm-workspace--struts) + (setq edge (aref struts 0) + width (aref struts 1) + position (aref struts 2)) + (dolist (w workareas) + (pcase edge + ;; Left and top are always processed first. + (`left + (setq delta (- (aref w 0) width)) + (when (and (< delta 0) + (or (not position) + (< (max (aref position 0) (aref w 1)) + (min (aref position 1) + (+ (aref w 1) (aref w 3)))))) + (cl-incf (aref w 2) delta) + (setf (aref w 0) width))) + (`right + (setq delta (- root-width (aref w 0) (aref w 2) width)) + (when (and (< delta 0) + (or (not position) + (< (max (aref position 0) (aref w 1)) + (min (aref position 1) + (+ (aref w 1) (aref w 3)))))) + (cl-incf (aref w 2) delta))) + (`top + (setq delta (- (aref w 1) width)) + (when (and (< delta 0) + (or (not position) + (< (max (aref position 0) (aref w 0)) + (min (aref position 1) + (+ (aref w 0) (aref w 2)))))) + (cl-incf (aref w 3) delta) + (setf (aref w 1) width))) + (`bottom + (setq delta (- root-height (aref w 1) (aref w 3) width)) + (when (and (< delta 0) + (or (not position) + (< (max (aref position 0) (aref w 0)) + (min (aref position 1) + (+ (aref w 0) (aref w 2)))))) + (cl-incf (aref w 3) delta)))))) + ;; Save the result. + (setq exwm-workspace--workareas workareas) + (xcb:flush exwm--connection)) + (exwm--log "%s" exwm-workspace--workareas) + (run-hooks 'exwm-workspace--update-workareas-hook)) + +(defun exwm-workspace--update-offsets () + "Update `exwm-workspace--frame-y-offset'/`exwm-workspace--window-y-offset'." + (exwm--log) + (if (not (and exwm-workspace--list + (or menu-bar-mode tool-bar-mode))) + (setq exwm-workspace--frame-y-offset 0 + exwm-workspace--window-y-offset 0) + (redisplay t) + (let* ((frame (elt exwm-workspace--list 0)) + (edges (window-inside-absolute-pixel-edges (frame-first-window + frame)))) + (with-slots (y) + (xcb:+request-unchecked+reply exwm--connection + (make-instance 'xcb:GetGeometry + :drawable (frame-parameter frame + 'exwm-container))) + (with-slots ((y* y)) + (xcb:+request-unchecked+reply exwm--connection + (make-instance 'xcb:GetGeometry + :drawable (frame-parameter frame + 'exwm-outer-id))) + (with-slots ((y** y)) + (xcb:+request-unchecked+reply exwm--connection + (make-instance 'xcb:GetGeometry + :drawable (frame-parameter frame 'exwm-id))) + (setq exwm-workspace--frame-y-offset (- y** y*) + exwm-workspace--window-y-offset (- (elt edges 1) y)))))))) + +(defun exwm-workspace--set-active (frame active) + "Make frame FRAME active on its monitor." + (exwm--log "active=%s; frame=%s" frame active) + (set-frame-parameter frame 'exwm-active active) + (if active + (exwm-workspace--set-fullscreen frame) + (exwm--set-geometry (frame-parameter frame 'exwm-container) nil nil 1 1)) + (exwm-layout--refresh frame) + (xcb:flush exwm--connection)) + +(defun exwm-workspace--active-p (frame) + "Return non-nil if FRAME is active" + (frame-parameter frame 'exwm-active)) + +(defun exwm-workspace--set-fullscreen (frame) + "Make frame FRAME fullscreen according to `exwm-workspace--workareas'." + (exwm--log "frame=%s" frame) + (let ((workarea (elt exwm-workspace--workareas + (exwm-workspace--position frame))) + (id (frame-parameter frame 'exwm-outer-id)) + (container (frame-parameter frame 'exwm-container)) + x y width height) + (setq x (aref workarea 0) + y (aref workarea 1) + width (aref workarea 2) + height (aref workarea 3)) + (exwm--log "x=%s; y=%s; w=%s; h=%s" x y width height) + (when (and (eq frame exwm-workspace--current) + (exwm-workspace--minibuffer-own-frame-p)) + (exwm-workspace--resize-minibuffer-frame)) + (if (exwm-workspace--active-p frame) + (exwm--set-geometry container x y width height) + (exwm--set-geometry container x y 1 1)) + (exwm--set-geometry id nil nil width height) + (xcb:flush exwm--connection)) + ;; This is only used for workspace initialization. + (when exwm-workspace--fullscreen-frame-count + (cl-incf exwm-workspace--fullscreen-frame-count))) + +(defun exwm-workspace--resize-minibuffer-frame () + "Resize minibuffer (and its container) to fit the size of workspace." + (cl-assert (exwm-workspace--minibuffer-own-frame-p)) + (let ((workarea (elt exwm-workspace--workareas exwm-workspace-current-index)) + (container (frame-parameter exwm-workspace--minibuffer + 'exwm-container)) + y width) + (setq y (if (eq exwm-workspace-minibuffer-position 'top) + (- (aref workarea 1) + exwm-workspace--attached-minibuffer-height) + ;; Reset the frame size. + (set-frame-height exwm-workspace--minibuffer 1) + (redisplay) ;FIXME. + (+ (aref workarea 1) (aref workarea 3) + (- (frame-pixel-height exwm-workspace--minibuffer)) + exwm-workspace--attached-minibuffer-height)) + width (aref workarea 2)) + (xcb:+request exwm--connection + (make-instance 'xcb:ConfigureWindow + :window container + :value-mask (logior xcb:ConfigWindow:X + xcb:ConfigWindow:Y + xcb:ConfigWindow:Width + (if exwm-manage--desktop + xcb:ConfigWindow:Sibling + 0) + xcb:ConfigWindow:StackMode) + :x (aref workarea 0) + :y y + :width width + :sibling exwm-manage--desktop + :stack-mode (if exwm-manage--desktop + xcb:StackMode:Above + xcb:StackMode:Below))) + (xcb:+request exwm--connection + (make-instance 'xcb:ConfigureWindow + :window (frame-parameter exwm-workspace--minibuffer + 'exwm-outer-id) + :value-mask xcb:ConfigWindow:Width + :width width)) + (exwm--log "y: %s, width: %s" y width))) + +(defun exwm-workspace--switch-map-nth-prefix (&optional prefix-digits) + "Allow selecting a workspace by number. + +PREFIX-DIGITS is a list of the digits introduced so far." + (interactive) + (let* ((k (aref (substring (this-command-keys-vector) -1) 0)) + (d (- k ?0)) + ;; Convert prefix-digits to number. For example, '(2 1) to 120. + (o 1) + (pn (apply #'+ (mapcar (lambda (x) + (setq o (* 10 o)) + (* o x)) + prefix-digits))) + (n (+ pn d)) + prefix-length index-max index-length) + (if (or (= n 0) + (> n + (setq index-max (1- (exwm-workspace--count)))) + (>= (setq prefix-length (length prefix-digits)) + (setq index-length (floor (log index-max 10)))) + ;; Check if it's still possible to do a match. + (> (* n (expt 10 (- index-length prefix-length))) + index-max)) + (exwm-workspace--switch-map-select-nth n) + ;; Go ahead if there are enough digits to select any workspace. + (set-transient-map + (let ((map (make-sparse-keymap)) + (cmd (let ((digits (cons d prefix-digits))) + (lambda () + (interactive) + (exwm-workspace--switch-map-nth-prefix digits))))) + (dotimes (i 10) + (define-key map (int-to-string i) cmd)) + ;; Accept + (define-key map [return] + (lambda () + (interactive) + (exwm-workspace--switch-map-select-nth n))) + map))))) + +(defun exwm-workspace--switch-map-select-nth (n) + "Select Nth workspace." + (interactive) + (goto-history-element (1+ n)) + (exit-minibuffer)) + +;;;###autoload +(defun exwm-workspace-switch (frame-or-index &optional force) + "Switch to workspace INDEX (0-based). + +Query for the index if not specified when called interactively. Passing a +workspace frame as the first option or making use of the rest options are +for internal use only." + (interactive + (list + (cond + ((null current-prefix-arg) + (unless (and (derived-mode-p 'exwm-mode) + ;; The prompt is invisible in fullscreen mode. + (exwm-layout--fullscreen-p)) + (let ((exwm-workspace--prompt-add-allowed t) + (exwm-workspace--prompt-delete-allowed t)) + (exwm-workspace--prompt-for-workspace "Switch to [+/-]: ")))) + ((and (integerp current-prefix-arg) + (<= 0 current-prefix-arg (exwm-workspace--count))) + current-prefix-arg) + (t 0)))) + (exwm--log) + (let* ((frame (exwm-workspace--workspace-from-frame-or-index frame-or-index)) + (old-frame exwm-workspace--current) + (index (exwm-workspace--position frame)) + (window (frame-parameter frame 'exwm-selected-window))) + (when (or force (not (eq frame exwm-workspace--current))) + (unless (window-live-p window) + (setq window (frame-selected-window frame))) + (when (and (not (eq frame old-frame)) + (frame-live-p old-frame)) + (with-selected-frame old-frame + (funcall exwm-workspace--original-handle-focus-out + (list 'focus-out frame)))) + ;; Raise this frame. + (xcb:+request exwm--connection + (make-instance 'xcb:ConfigureWindow + :window (frame-parameter frame 'exwm-container) + :value-mask (logior xcb:ConfigWindow:Sibling + xcb:ConfigWindow:StackMode) + :sibling exwm--guide-window + :stack-mode xcb:StackMode:Below)) + (setq exwm-workspace--current frame + exwm-workspace-current-index index) + (unless (exwm-workspace--workspace-p (selected-frame)) + ;; Save the floating frame window selected on the previous workspace. + (set-frame-parameter (buffer-local-value 'exwm--frame (window-buffer)) + 'exwm-selected-window (selected-window))) + ;; Show/Hide X windows. + (let ((monitor-old (frame-parameter old-frame 'exwm-randr-monitor)) + (monitor-new (frame-parameter frame 'exwm-randr-monitor)) + (active-old (exwm-workspace--active-p old-frame)) + (active-new (exwm-workspace--active-p frame)) + workspaces-to-hide) + (cond + ((not active-old) + (exwm-workspace--set-active frame t)) + ((equal monitor-old monitor-new) + (exwm-workspace--set-active frame t) + (unless (eq frame old-frame) + (exwm-workspace--set-active old-frame nil) + (setq workspaces-to-hide (list old-frame)))) + (active-new) + (t + (dolist (w exwm-workspace--list) + (when (and (exwm-workspace--active-p w) + (equal monitor-new + (frame-parameter w 'exwm-randr-monitor))) + (exwm-workspace--set-active w nil) + (setq workspaces-to-hide (append workspaces-to-hide (list w))))) + (exwm-workspace--set-active frame t))) + (dolist (i exwm--id-buffer-alist) + (with-current-buffer (cdr i) + (if (memq exwm--frame workspaces-to-hide) + (exwm-layout--hide exwm--id) + (when (eq frame exwm--frame) + (let ((window (get-buffer-window nil t))) + (when window + (exwm-layout--show exwm--id window)))))))) + (select-window window) + (x-focus-frame (window-frame window)) ;The real input focus. + (set-frame-parameter frame 'exwm-selected-window nil) + (if (exwm-workspace--minibuffer-own-frame-p) + ;; Resize the minibuffer frame. + (exwm-workspace--resize-minibuffer-frame) + ;; Set a default minibuffer frame. + (setq default-minibuffer-frame frame)) + ;; Hide windows in other workspaces by preprending a space + (unless exwm-workspace-show-all-buffers + (dolist (i exwm--id-buffer-alist) + (with-current-buffer (cdr i) + (let ((name (replace-regexp-in-string "^\\s-*" "" + (buffer-name)))) + (exwm-workspace-rename-buffer (if (eq frame exwm--frame) + name + (concat " " name))))))) + ;; Update demands attention flag + (set-frame-parameter frame 'exwm-urgency nil) + ;; Update switch workspace history + (setq exwm-workspace--switch-history-outdated t) + ;; Set _NET_CURRENT_DESKTOP + (xcb:+request exwm--connection + (make-instance 'xcb:ewmh:set-_NET_CURRENT_DESKTOP + :window exwm--root :data index)) + (xcb:flush exwm--connection)) + (when exwm-workspace-warp-cursor + (with-slots (win-x win-y) + (xcb:+request-unchecked+reply exwm--connection + (make-instance 'xcb:QueryPointer + :window (frame-parameter frame + 'exwm-outer-id))) + (when (or (< win-x 0) + (< win-y 0) + (> win-x (frame-pixel-width frame)) + (> win-y (frame-pixel-height frame))) + (xcb:+request exwm--connection + (make-instance 'xcb:WarpPointer + :src-window xcb:Window:None + :dst-window (frame-parameter frame + 'exwm-outer-id) + :src-x 0 + :src-y 0 + :src-width 0 + :src-height 0 + :dst-x (/ (frame-pixel-width frame) 2) + :dst-y (/ (frame-pixel-height frame) 2))) + (xcb:flush exwm--connection)))) + (funcall exwm-workspace--original-handle-focus-in (list 'focus-in frame)) + (run-hooks 'exwm-workspace-switch-hook))) + +;;;###autoload +(defun exwm-workspace-switch-create (frame-or-index) + "Switch to workspace INDEX or creating it first if it does not exist yet. + +Passing a workspace frame as the first option is for internal use only." + (interactive + (list + (cond + ((integerp current-prefix-arg) + current-prefix-arg) + (t 0)))) + (unless frame-or-index + (setq frame-or-index 0)) + (exwm--log "%s" frame-or-index) + (if (or (framep frame-or-index) + (< frame-or-index (exwm-workspace--count))) + (exwm-workspace-switch frame-or-index) + (let ((exwm-workspace--create-silently t)) + (dotimes (_ (min exwm-workspace-switch-create-limit + (1+ (- frame-or-index + (exwm-workspace--count))))) + (make-frame)) + (run-hooks 'exwm-workspace-list-change-hook)) + (exwm-workspace-switch frame-or-index))) + +;;;###autoload +(defun exwm-workspace-swap (workspace1 workspace2) + "Interchange position of WORKSPACE1 with that of WORKSPACE2." + (interactive + (unless (and (derived-mode-p 'exwm-mode) + ;; The prompt is invisible in fullscreen mode. + (exwm-layout--fullscreen-p)) + (let (w1 w2) + (let ((exwm-workspace--prompt-add-allowed t) + (exwm-workspace--prompt-delete-allowed t)) + (setq w1 (exwm-workspace--prompt-for-workspace + "Pick a workspace [+/-]: "))) + (setq w2 (exwm-workspace--prompt-for-workspace + (format "Swap workspace %d with: " + (exwm-workspace--position w1)))) + (list w1 w2)))) + (exwm--log) + (let ((pos1 (exwm-workspace--position workspace1)) + (pos2 (exwm-workspace--position workspace2))) + (if (or (not pos1) (not pos2) (= pos1 pos2)) + (user-error "[EXWM] Cannot swap %s and %s" workspace1 workspace2) + (setf (elt exwm-workspace--list pos1) workspace2) + (setf (elt exwm-workspace--list pos2) workspace1) + ;; Update the _NET_WM_DESKTOP property of each X window affected. + (dolist (pair exwm--id-buffer-alist) + (when (memq (buffer-local-value 'exwm--frame (cdr pair)) + (list workspace1 workspace2)) + (exwm-workspace--set-desktop (car pair)))) + (xcb:flush exwm--connection) + (when (memq exwm-workspace--current (list workspace1 workspace2)) + ;; With the current workspace involved, lots of stuffs need refresh. + (set-frame-parameter exwm-workspace--current 'exwm-selected-window + (selected-window)) + (exwm-workspace-switch exwm-workspace--current t)) + (run-hooks 'exwm-workspace-list-change-hook)))) + +;;;###autoload +(defun exwm-workspace-move (workspace nth) + "Move WORKSPACE to the NTH position. + +When called interactively, prompt for a workspace and move current one just +before it." + (interactive + (cond + ((null current-prefix-arg) + (unless (and (derived-mode-p 'exwm-mode) + ;; The prompt is invisible in fullscreen mode. + (exwm-layout--fullscreen-p)) + (list exwm-workspace--current + (exwm-workspace--position + (exwm-workspace--prompt-for-workspace "Move workspace to: "))))) + ((and (integerp current-prefix-arg) + (<= 0 current-prefix-arg (exwm-workspace--count))) + (list exwm-workspace--current current-prefix-arg)) + (t (list exwm-workspace--current 0)))) + (exwm--log) + (let ((pos (exwm-workspace--position workspace)) + flag start end index) + (if (= nth pos) + (user-error "[EXWM] Cannot move to same position") + ;; Set if the current workspace is involved. + (setq flag (or (eq workspace exwm-workspace--current) + (eq (elt exwm-workspace--list nth) + exwm-workspace--current))) + ;; Do the move. + (with-no-warnings ;For Emacs 24. + (pop (nthcdr pos exwm-workspace--list))) + (push workspace (nthcdr nth exwm-workspace--list)) + ;; Update the _NET_WM_DESKTOP property of each X window affected. + (setq start (min pos nth) + end (max pos nth)) + (dolist (pair exwm--id-buffer-alist) + (setq index (exwm-workspace--position + (buffer-local-value 'exwm--frame (cdr pair)))) + (unless (or (< index start) (> index end)) + (exwm-workspace--set-desktop (car pair)))) + (when flag + ;; With the current workspace involved, lots of stuffs need refresh. + (set-frame-parameter exwm-workspace--current 'exwm-selected-window + (selected-window)) + (exwm-workspace-switch exwm-workspace--current t)) + (run-hooks 'exwm-workspace-list-change-hook)))) + +;;;###autoload +(defun exwm-workspace-add (&optional index) + "Add a workspace as the INDEX-th workspace, or the last one if INDEX is nil. + +INDEX must not exceed the current number of workspaces." + (interactive) + (exwm--log "%s" index) + (if (and index + ;; No need to move if it's the last one. + (< index (exwm-workspace--count))) + (exwm-workspace-move (make-frame) index) + (make-frame))) + +;;;###autoload +(defun exwm-workspace-delete (&optional frame-or-index) + "Delete the workspace FRAME-OR-INDEX." + (interactive) + (exwm--log "%s" frame-or-index) + (when (< 1 (exwm-workspace--count)) + (let ((frame (if frame-or-index + (exwm-workspace--workspace-from-frame-or-index + frame-or-index) + exwm-workspace--current))) + (exwm-workspace--get-remove-frame-next-workspace frame) + (delete-frame frame)))) + +(defun exwm-workspace--set-desktop (id) + "Set _NET_WM_DESKTOP for X window ID." + (exwm--log "#x%x" id) + (with-current-buffer (exwm--id->buffer id) + (let ((desktop (exwm-workspace--position exwm--frame))) + (setq exwm--desktop desktop) + (xcb:+request exwm--connection + (make-instance 'xcb:ewmh:set-_NET_WM_DESKTOP + :window id + :data desktop))))) + +;;;###autoload +(cl-defun exwm-workspace-move-window (frame-or-index &optional id) + "Move window ID to workspace FRAME-OR-INDEX." + (interactive (list + (cond + ((null current-prefix-arg) + (let ((exwm-workspace--prompt-add-allowed t) + (exwm-workspace--prompt-delete-allowed t)) + (exwm-workspace--prompt-for-workspace "Move to [+/-]: "))) + ((and (integerp current-prefix-arg) + (<= 0 current-prefix-arg (exwm-workspace--count))) + current-prefix-arg) + (t 0)))) + (let ((frame (exwm-workspace--workspace-from-frame-or-index frame-or-index)) + old-frame container) + (unless id (setq id (exwm--buffer->id (window-buffer)))) + (unless id + (cl-return-from exwm-workspace-move-window)) + (exwm--log "Moving #x%x to %s" id frame-or-index) + (with-current-buffer (exwm--id->buffer id) + (unless (eq exwm--frame frame) + (unless exwm-workspace-show-all-buffers + (let ((name (replace-regexp-in-string "^\\s-*" "" (buffer-name)))) + (exwm-workspace-rename-buffer + (if (eq frame exwm-workspace--current) + name + (concat " " name))))) + (setq old-frame exwm--frame + exwm--frame frame) + (if (not exwm--floating-frame) + ;; Tiling. + (if (get-buffer-window nil frame) + (when (eq frame exwm-workspace--current) + (exwm-layout--refresh frame)) + (set-window-buffer (get-buffer-window nil t) + (other-buffer nil t)) + (unless (eq frame exwm-workspace--current) + ;; Clear the 'exwm-selected-window' frame parameter. + (set-frame-parameter frame 'exwm-selected-window nil)) + (set-window-buffer (frame-selected-window frame) + (exwm--id->buffer id)) + (if (eq frame exwm-workspace--current) + (select-window (frame-selected-window frame)) + (unless (exwm-workspace--active-p frame) + (exwm-layout--hide id)))) + ;; Floating. + (setq container (frame-parameter exwm--floating-frame + 'exwm-container)) + (unless (equal (frame-parameter old-frame 'exwm-randr-monitor) + (frame-parameter frame 'exwm-randr-monitor)) + (with-slots (x y) + (xcb:+request-unchecked+reply exwm--connection + (make-instance 'xcb:GetGeometry + :drawable container)) + (with-slots ((x1 x) + (y1 y)) + (exwm-workspace--get-geometry old-frame) + (with-slots ((x2 x) + (y2 y)) + (exwm-workspace--get-geometry frame) + (setq x (+ x (- x2 x1)) + y (+ y (- y2 y1))))) + (exwm--set-geometry id x y nil nil) + (exwm--set-geometry container x y nil nil))) + (if (exwm-workspace--minibuffer-own-frame-p) + (if (eq frame exwm-workspace--current) + (select-window (frame-root-window exwm--floating-frame)) + (select-window (frame-selected-window exwm-workspace--current)) + (unless (exwm-workspace--active-p frame) + (exwm-layout--hide id))) + ;; The frame needs to be recreated since it won't use the + ;; minibuffer on the new workspace. + ;; The code is mostly copied from `exwm-floating--set-floating'. + (let* ((old-frame exwm--floating-frame) + (new-frame + (with-current-buffer + (or (get-buffer "*scratch*") + (progn + (set-buffer-major-mode + (get-buffer-create "*scratch*")) + (get-buffer "*scratch*"))) + (make-frame + `((minibuffer . ,(minibuffer-window frame)) + (left . ,(* window-min-width -100)) + (top . ,(* window-min-height -100)) + (width . ,window-min-width) + (height . ,window-min-height) + (unsplittable . t))))) + (outer-id (string-to-number + (frame-parameter new-frame + 'outer-window-id))) + (window-id (string-to-number + (frame-parameter new-frame 'window-id))) + (window (frame-root-window new-frame))) + (set-frame-parameter new-frame 'exwm-outer-id outer-id) + (set-frame-parameter new-frame 'exwm-id window-id) + (set-frame-parameter new-frame 'exwm-container container) + (make-frame-invisible new-frame) + (set-frame-size new-frame + (frame-pixel-width old-frame) + (frame-pixel-height old-frame) + t) + (xcb:+request exwm--connection + (make-instance 'xcb:ReparentWindow + :window outer-id + :parent container + :x 0 :y 0)) + (xcb:flush exwm--connection) + (with-current-buffer (exwm--id->buffer id) + (setq window-size-fixed nil + exwm--floating-frame new-frame) + (set-window-dedicated-p (frame-root-window old-frame) nil) + (remove-hook 'window-configuration-change-hook + #'exwm-layout--refresh) + (set-window-buffer window (current-buffer)) + (add-hook 'window-configuration-change-hook + #'exwm-layout--refresh) + (set-window-dedicated-p window t)) + ;; Select a tiling window and delete the old frame. + (select-window (frame-selected-window exwm-workspace--current)) + (delete-frame old-frame) + ;; The rest is the same. + (make-frame-visible new-frame) + (exwm--set-geometry outer-id 0 0 nil nil) + (xcb:flush exwm--connection) + (redisplay) + (if (eq frame exwm-workspace--current) + (with-current-buffer (exwm--id->buffer id) + (select-window (frame-root-window exwm--floating-frame))) + (unless (exwm-workspace--active-p frame) + (exwm-layout--hide id))))) + ;; Update the 'exwm-selected-window' frame parameter. + (when (not (eq frame exwm-workspace--current)) + (with-current-buffer (exwm--id->buffer id) + (set-frame-parameter frame 'exwm-selected-window + (frame-root-window + exwm--floating-frame))))) + ;; Set _NET_WM_DESKTOP. + (exwm-workspace--set-desktop id) + (xcb:flush exwm--connection))) + (setq exwm-workspace--switch-history-outdated t))) + +;;;###autoload +(defun exwm-workspace-switch-to-buffer (buffer-or-name) + "Make the current Emacs window display another buffer." + (interactive + (let ((inhibit-quit t)) + ;; Show all buffers + (unless exwm-workspace-show-all-buffers + (dolist (pair exwm--id-buffer-alist) + (with-current-buffer (cdr pair) + (when (= ?\s (aref (buffer-name) 0)) + (let ((buffer-list-update-hook + (remq #'exwm-input--on-buffer-list-update + buffer-list-update-hook))) + (rename-buffer (substring (buffer-name) 1))))))) + (prog1 + (with-local-quit + (list (get-buffer (read-buffer-to-switch "Switch to buffer: ")))) + ;; Hide buffers on other workspaces + (unless exwm-workspace-show-all-buffers + (dolist (pair exwm--id-buffer-alist) + (with-current-buffer (cdr pair) + (unless (or (eq exwm--frame exwm-workspace--current) + (= ?\s (aref (buffer-name) 0))) + (let ((buffer-list-update-hook + (remq #'exwm-input--on-buffer-list-update + buffer-list-update-hook))) + (rename-buffer (concat " " (buffer-name))))))))))) + (exwm--log) + (when buffer-or-name + (with-current-buffer buffer-or-name + (if (derived-mode-p 'exwm-mode) + ;; EXWM buffer. + (if (eq exwm--frame exwm-workspace--current) + ;; On the current workspace. + (if (not exwm--floating-frame) + (switch-to-buffer buffer-or-name) + ;; Select the floating frame. + (select-frame-set-input-focus exwm--floating-frame) + (select-window (frame-root-window exwm--floating-frame))) + ;; On another workspace. + (if exwm-layout-show-all-buffers + (exwm-workspace-move-window exwm-workspace--current + exwm--id) + (let ((window (get-buffer-window buffer-or-name exwm--frame))) + (if window + (set-frame-parameter exwm--frame + 'exwm-selected-window window) + (set-window-buffer (frame-selected-window exwm--frame) + buffer-or-name))) + (exwm-workspace-switch exwm--frame))) + ;; Ordinary buffer. + (switch-to-buffer buffer-or-name))))) + +(defun exwm-workspace-rename-buffer (newname) + "Rename a buffer." + (let ((hidden (= ?\s (aref newname 0))) + (basename (replace-regexp-in-string "<[0-9]+>$" "" newname)) + (counter 1) + tmp) + (when hidden (setq basename (substring basename 1))) + (setq newname basename) + (while (and (setq tmp (or (get-buffer newname) + (get-buffer (concat " " newname)))) + (not (eq tmp (current-buffer)))) + (setq newname (format "%s<%d>" basename (cl-incf counter)))) + (let ((buffer-list-update-hook + (remq #'exwm-input--on-buffer-list-update + buffer-list-update-hook))) + (rename-buffer (concat (and hidden " ") newname))))) + +(defun exwm-workspace--x-create-frame (orig-fun params) + "Set override-redirect on the frame created by `x-create-frame'." + (exwm--log) + (let ((frame (funcall orig-fun params))) + (xcb:+request exwm--connection + (make-instance 'xcb:ChangeWindowAttributes + :window (string-to-number + (frame-parameter frame 'outer-window-id)) + :value-mask xcb:CW:OverrideRedirect + :override-redirect 1)) + (xcb:flush exwm--connection) + frame)) + +(defsubst exwm-workspace--minibuffer-attached-p () + "Return non-nil if the minibuffer is attached. + +Please check `exwm-workspace--minibuffer-own-frame-p' first." + (assq (frame-parameter exwm-workspace--minibuffer 'exwm-container) + exwm-workspace--id-struts-alist)) + +;;;###autoload +(defun exwm-workspace-attach-minibuffer () + "Attach the minibuffer so that it always shows." + (interactive) + (exwm--log) + (when (and (exwm-workspace--minibuffer-own-frame-p) + (not (exwm-workspace--minibuffer-attached-p))) + ;; Reset the frame size. + (set-frame-height exwm-workspace--minibuffer 1) + (redisplay) ;FIXME. + (setq exwm-workspace--attached-minibuffer-height + (frame-pixel-height exwm-workspace--minibuffer)) + (exwm-workspace--show-minibuffer) + (let ((container (frame-parameter exwm-workspace--minibuffer + 'exwm-container))) + (push (cons container + (if (eq exwm-workspace-minibuffer-position 'top) + (vector 0 0 exwm-workspace--attached-minibuffer-height 0) + (vector 0 0 0 exwm-workspace--attached-minibuffer-height))) + exwm-workspace--id-struts-alist) + (exwm-workspace--update-struts) + (exwm-workspace--update-workareas) + (dolist (f exwm-workspace--list) + (exwm-workspace--set-fullscreen f))))) + +;;;###autoload +(defun exwm-workspace-detach-minibuffer () + "Detach the minibuffer so that it automatically hides." + (interactive) + (exwm--log) + (when (and (exwm-workspace--minibuffer-own-frame-p) + (exwm-workspace--minibuffer-attached-p)) + (setq exwm-workspace--attached-minibuffer-height 0) + (let ((container (frame-parameter exwm-workspace--minibuffer + 'exwm-container))) + (setq exwm-workspace--id-struts-alist + (assq-delete-all container exwm-workspace--id-struts-alist)) + (exwm-workspace--update-struts) + (exwm-workspace--update-workareas) + (dolist (f exwm-workspace--list) + (exwm-workspace--set-fullscreen f)) + (exwm-workspace--hide-minibuffer)))) + +;;;###autoload +(defun exwm-workspace-toggle-minibuffer () + "Attach the minibuffer if it's detached, or detach it if it's attached." + (interactive) + (exwm--log) + (when (exwm-workspace--minibuffer-own-frame-p) + (if (exwm-workspace--minibuffer-attached-p) + (exwm-workspace-detach-minibuffer) + (exwm-workspace-attach-minibuffer)))) + +(defun exwm-workspace--update-minibuffer-height (&optional echo-area) + "Update the minibuffer frame height." + (unless (exwm-workspace--client-p) + (let ((height + (with-current-buffer + (window-buffer (minibuffer-window exwm-workspace--minibuffer)) + (max 1 + (if echo-area + (let ((width (frame-width exwm-workspace--minibuffer)) + (result 0)) + (mapc (lambda (i) + (setq result + (+ result + (ceiling (1+ (length i)) width)))) + (split-string (or (current-message) "") "\n")) + result) + (count-screen-lines)))))) + (when (and (integerp max-mini-window-height) + (> height max-mini-window-height)) + (setq height max-mini-window-height)) + (exwm--log "%s" height) + (set-frame-height exwm-workspace--minibuffer height)))) + +(defun exwm-workspace--on-ConfigureNotify (data _synthetic) + "Adjust the container to fit the minibuffer frame." + (let ((obj (make-instance 'xcb:ConfigureNotify)) + workarea y) + (xcb:unmarshal obj data) + (with-slots (window height) obj + (when (eq (frame-parameter exwm-workspace--minibuffer 'exwm-outer-id) + window) + (exwm--log) + (when (and (floatp max-mini-window-height) + (> height (* max-mini-window-height + (exwm-workspace--current-height)))) + (setq height (floor + (* max-mini-window-height + (exwm-workspace--current-height)))) + (xcb:+request exwm--connection + (make-instance 'xcb:ConfigureWindow + :window window + :value-mask xcb:ConfigWindow:Height + :height height))) + (when (/= (exwm-workspace--count) (length exwm-workspace--workareas)) + ;; There is a chance the workareas are not updated timely. + (exwm-workspace--update-workareas)) + (setq workarea (elt exwm-workspace--workareas + exwm-workspace-current-index) + y (if (eq exwm-workspace-minibuffer-position 'top) + (- (aref workarea 1) + exwm-workspace--attached-minibuffer-height) + (+ (aref workarea 1) (aref workarea 3) (- height) + exwm-workspace--attached-minibuffer-height))) + (xcb:+request exwm--connection + (make-instance 'xcb:ConfigureWindow + :window (frame-parameter exwm-workspace--minibuffer + 'exwm-container) + :value-mask (logior xcb:ConfigWindow:Y + xcb:ConfigWindow:Height) + :y y + :height height)) + (xcb:flush exwm--connection))))) + +(defun exwm-workspace--display-buffer (buffer alist) + "Display BUFFER as if the current workspace is selected." + ;; Only when the floating minibuffer frame is selected. + ;; This also protect this functions from being recursively called. + (when (eq (selected-frame) exwm-workspace--minibuffer) + (with-selected-frame exwm-workspace--current + (display-buffer buffer alist)))) + +(defun exwm-workspace--show-minibuffer () + "Show the minibuffer frame." + (exwm--log) + ;; Cancel pending timer. + (when exwm-workspace--display-echo-area-timer + (cancel-timer exwm-workspace--display-echo-area-timer) + (setq exwm-workspace--display-echo-area-timer nil)) + ;; Show the minibuffer frame. + (unless (exwm-workspace--minibuffer-attached-p) + (exwm--set-geometry (frame-parameter exwm-workspace--minibuffer + 'exwm-container) + nil nil + (frame-pixel-width exwm-workspace--minibuffer) + (frame-pixel-height exwm-workspace--minibuffer))) + (xcb:+request exwm--connection + (make-instance 'xcb:ConfigureWindow + :window (frame-parameter exwm-workspace--minibuffer + 'exwm-container) + :value-mask xcb:ConfigWindow:StackMode + :stack-mode xcb:StackMode:Above)) + (xcb:flush exwm--connection)) + +(defun exwm-workspace--hide-minibuffer () + "Hide the minibuffer frame." + (exwm--log) + ;; Hide the minibuffer frame. + (if (exwm-workspace--minibuffer-attached-p) + (xcb:+request exwm--connection + (make-instance 'xcb:ConfigureWindow + :window (frame-parameter exwm-workspace--minibuffer + 'exwm-container) + :value-mask (logior (if exwm-manage--desktop + xcb:ConfigWindow:Sibling + 0) + xcb:ConfigWindow:StackMode) + :sibling exwm-manage--desktop + :stack-mode (if exwm-manage--desktop + xcb:StackMode:Above + xcb:StackMode:Below))) + (exwm--set-geometry (frame-parameter exwm-workspace--minibuffer + 'exwm-container) + nil nil 1 1)) + (xcb:flush exwm--connection)) + +(defun exwm-workspace--on-minibuffer-setup () + "Run in minibuffer-setup-hook to show the minibuffer and its container." + (exwm--log) + (when (and (= 1 (minibuffer-depth)) + (not (exwm-workspace--client-p))) + (add-hook 'post-command-hook #'exwm-workspace--update-minibuffer-height) + (exwm-workspace--show-minibuffer)) + ;; FIXME: This is a temporary fix for the *Completions* buffer not + ;; being correctly fitted by its displaying window. As with + ;; `exwm-workspace--display-buffer', the problem is caused by + ;; the fact that the minibuffer (rather than the workspace) + ;; frame is the 'selected frame'. `get-buffer-window' will + ;; fail to retrieve the correct window. It's likely there are + ;; other related issues. + ;; This is not required by Emacs 24. + (when (fboundp 'window-preserve-size) + (let ((window (get-buffer-window "*Completions*" + exwm-workspace--current))) + (when window + (fit-window-to-buffer window) + (window-preserve-size window))))) + +(defun exwm-workspace--on-minibuffer-exit () + "Run in minibuffer-exit-hook to hide the minibuffer container." + (exwm--log) + (when (and (= 1 (minibuffer-depth)) + (not (exwm-workspace--client-p))) + (remove-hook 'post-command-hook #'exwm-workspace--update-minibuffer-height) + (exwm-workspace--hide-minibuffer))) + +(defun exwm-workspace--on-echo-area-dirty () + "Run when new message arrives to show the echo area and its container." + (when (and (not (active-minibuffer-window)) + (not (exwm-workspace--client-p)) + (or (current-message) + cursor-in-echo-area)) + (exwm-workspace--update-minibuffer-height t) + (exwm-workspace--show-minibuffer) + (unless (or (not exwm-workspace-display-echo-area-timeout) + exwm-input--during-command ;e.g. read-event + input-method-use-echo-area) + (setq exwm-workspace--display-echo-area-timer + (run-with-timer exwm-workspace-display-echo-area-timeout nil + #'exwm-workspace--echo-area-maybe-clear))))) + +(defun exwm-workspace--echo-area-maybe-clear () + "Eventually clear the echo area container." + (exwm--log) + (if (not (current-message)) + (exwm-workspace--on-echo-area-clear) + ;; Reschedule. + (cancel-timer exwm-workspace--display-echo-area-timer) + (setq exwm-workspace--display-echo-area-timer + (run-with-timer exwm-workspace-display-echo-area-timeout nil + #'exwm-workspace--echo-area-maybe-clear)))) + +(defun exwm-workspace--on-echo-area-clear () + "Run in echo-area-clear-hook to hide echo area container." + (unless (exwm-workspace--client-p) + (unless (active-minibuffer-window) + (exwm-workspace--hide-minibuffer)) + (when exwm-workspace--display-echo-area-timer + (cancel-timer exwm-workspace--display-echo-area-timer) + (setq exwm-workspace--display-echo-area-timer nil)))) + +(defun exwm-workspace--set-desktop-geometry () + "Set _NET_DESKTOP_GEOMETRY." + (exwm--log) + ;; We don't support large desktop so it's the same with screen size. + (xcb:+request exwm--connection + (make-instance 'xcb:ewmh:set-_NET_DESKTOP_GEOMETRY + :window exwm--root + :width (x-display-pixel-width) + :height (x-display-pixel-height)))) + +(defun exwm-workspace--add-frame-as-workspace (frame) + "Configure frame FRAME to be treated as a workspace." + (exwm--log "%s" frame) + (setq exwm-workspace--list (nconc exwm-workspace--list (list frame))) + (let ((outer-id (string-to-number (frame-parameter frame + 'outer-window-id))) + (window-id (string-to-number (frame-parameter frame 'window-id))) + (container (xcb:generate-id exwm--connection))) + ;; Save window IDs + (set-frame-parameter frame 'exwm-outer-id outer-id) + (set-frame-parameter frame 'exwm-id window-id) + (set-frame-parameter frame 'exwm-container container) + ;; In case it's created by emacsclient. + (set-frame-parameter frame 'client nil) + ;; Copy RandR frame parameters from the first workspace to + ;; prevent potential problems. The values do not matter here as + ;; they'll be updated by the RandR module later. + (let ((w (car exwm-workspace--list))) + (dolist (param '(exwm-randr-monitor + exwm-geometry)) + (set-frame-parameter frame param (frame-parameter w param)))) + (xcb:+request exwm--connection + (make-instance 'xcb:CreateWindow + :depth 0 + :wid container + :parent exwm--root + :x -1 + :y -1 + :width 1 + :height 1 + :border-width 0 + :class xcb:WindowClass:InputOutput + :visual 0 + :value-mask (logior xcb:CW:BackPixmap + xcb:CW:OverrideRedirect) + :background-pixmap xcb:BackPixmap:ParentRelative + :override-redirect 1)) + (xcb:+request exwm--connection + (make-instance 'xcb:ConfigureWindow + :window container + :value-mask xcb:ConfigWindow:StackMode + :stack-mode xcb:StackMode:Below)) + (xcb:+request exwm--connection + (make-instance 'xcb:ewmh:set-_NET_WM_NAME + :window container + :data + (format "EXWM workspace %d frame container" + (exwm-workspace--position frame)))) + (xcb:+request exwm--connection + (make-instance 'xcb:ReparentWindow + :window outer-id :parent container :x 0 :y 0)) + (xcb:+request exwm--connection + (make-instance 'xcb:MapWindow :window container))) + (xcb:flush exwm--connection) + ;; Delay making the workspace fullscreen until Emacs becomes idle + (exwm--defer 0 #'set-frame-parameter frame 'fullscreen 'fullboth) + ;; Update EWMH properties. + (exwm-workspace--update-ewmh-props) + (if exwm-workspace--create-silently + (setq exwm-workspace--switch-history-outdated t) + (let ((original-index exwm-workspace-current-index)) + (exwm-workspace-switch frame t) + (message "Created %s as workspace %d; switched from %d" + frame exwm-workspace-current-index original-index)) + (run-hooks 'exwm-workspace-list-change-hook))) + +(defun exwm-workspace--get-remove-frame-next-workspace (frame) + "Return the next workspace if workspace FRAME is removed. + +All X windows currently on workspace FRAME will be automatically moved to +the next workspace." + (let* ((index (exwm-workspace--position frame)) + (lastp (= index (1- (exwm-workspace--count)))) + (nextw (elt exwm-workspace--list (+ index (if lastp -1 +1))))) + ;; Clients need to be moved to some other workspace before this being + ;; removed. + (dolist (pair exwm--id-buffer-alist) + (with-current-buffer (cdr pair) + (when (eq exwm--frame frame) + (exwm-workspace-move-window nextw exwm--id)))) + nextw)) + +(defun exwm-workspace--remove-frame-as-workspace (frame) + "Stop treating frame FRAME as a workspace." + ;; TODO: restore all frame parameters (e.g. exwm-workspace, buffer-predicate, + ;; etc) + (exwm--log "Removing frame `%s' as workspace" frame) + (let* ((index (exwm-workspace--position frame)) + (nextw (exwm-workspace--get-remove-frame-next-workspace frame))) + ;; Need to remove the workspace from the list in order for + ;; the correct calculation of indexes. + (setq exwm-workspace--list (delete frame exwm-workspace--list)) + ;; Update the _NET_WM_DESKTOP property of each X window affected. + (dolist (pair exwm--id-buffer-alist) + (when (<= (1- index) + (exwm-workspace--position (buffer-local-value 'exwm--frame + (cdr pair)))) + (exwm-workspace--set-desktop (car pair)))) + ;; If the current workspace is deleted, switch to next one. + (when (eq frame exwm-workspace--current) + (exwm-workspace-switch nextw))) + ;; Reparent out the frame. + (let ((outer-id (frame-parameter frame 'exwm-outer-id))) + (xcb:+request exwm--connection + (make-instance 'xcb:UnmapWindow + :window outer-id)) + (xcb:+request exwm--connection + (make-instance 'xcb:ReparentWindow + :window outer-id + :parent exwm--root + :x 0 + :y 0)) + ;; Reset the override-redirect. + (xcb:+request exwm--connection + (make-instance 'xcb:ChangeWindowAttributes + :window outer-id + :value-mask xcb:CW:OverrideRedirect + :override-redirect 0)) + ;; Remove fullscreen state. + (xcb:+request exwm--connection + (make-instance 'xcb:ewmh:set-_NET_WM_STATE + :window outer-id + :data nil)) + (xcb:+request exwm--connection + (make-instance 'xcb:MapWindow + :window outer-id))) + ;; Destroy the container. + (xcb:+request exwm--connection + (make-instance 'xcb:DestroyWindow + :window (frame-parameter frame 'exwm-container))) + (xcb:flush exwm--connection) + ;; Update EWMH properties. + (exwm-workspace--update-ewmh-props) + ;; Update switch history. + (setq exwm-workspace--switch-history-outdated t) + (run-hooks 'exwm-workspace-list-change-hook)) + +(defun exwm-workspace--on-delete-frame (frame) + "Hook run upon `delete-frame' that tears down FRAME's configuration as a workspace." + (cond + ((not (exwm-workspace--workspace-p frame)) + (exwm--log "Frame `%s' is not a workspace" frame)) + (t + (when (= 1 (exwm-workspace--count)) + ;; The user managed to delete the last workspace, so create a new one. + (exwm--log "Last workspace deleted; create a new one") + ;; TODO: this makes sense in the hook. But we need a function that takes + ;; care of converting a workspace into a regular unmanaged frame. + (let ((exwm-workspace--create-silently t)) + (make-frame))) + (exwm-workspace--remove-frame-as-workspace frame)))) + +(defun exwm-workspace--on-after-make-frame (frame) + "Hook run upon `make-frame' that configures FRAME as a workspace." + (cond + ((exwm-workspace--workspace-p frame) + (exwm--log "Frame `%s' is already a workspace" frame)) + ((not (display-graphic-p frame)) + (exwm--log "Frame `%s' is not graphical" frame)) + ((not (string-equal + (replace-regexp-in-string "\\.0$" "" + (slot-value exwm--connection 'display)) + (replace-regexp-in-string "\\.0$" "" + (frame-parameter frame 'display)))) + (exwm--log "Frame `%s' is on a different DISPLAY (%S instead of %S)" + frame + (frame-parameter frame 'display) + (slot-value exwm--connection 'display))) + ((frame-parameter frame 'unsplittable) + ;; We create floating frames with the "unsplittable" parameter set. + ;; Though it may not be a floating frame, we won't treat an + ;; unsplittable frame as a workspace anyway. + (exwm--log "Frame `%s' is floating" frame)) + (t + (exwm--log "Adding frame `%s' as workspace" frame) + (exwm-workspace--add-frame-as-workspace frame)))) + +(defun exwm-workspace--update-ewmh-props () + "Update EWMH properties to match the workspace list." + (exwm--log) + (let ((num-workspaces (exwm-workspace--count))) + ;; Avoid setting 0 desktops. + (when (= 0 num-workspaces) + (setq num-workspaces 1)) + ;; Set _NET_NUMBER_OF_DESKTOPS. + (xcb:+request exwm--connection + (make-instance 'xcb:ewmh:set-_NET_NUMBER_OF_DESKTOPS + :window exwm--root :data num-workspaces)) + ;; Set _NET_DESKTOP_GEOMETRY. + (exwm-workspace--set-desktop-geometry) + ;; Update workareas. + (exwm-workspace--update-workareas)) + (xcb:flush exwm--connection)) + +(defun exwm-workspace--modify-all-x-frames-parameters (new-x-parameters) + "Modifies `window-system-default-frame-alist' for the X Window System. +NEW-X-PARAMETERS is an alist of frame parameters, merged into current +`window-system-default-frame-alist' for the X Window System. The parameters are +applied to all subsequently created X frames." + (exwm--log) + ;; The parameters are modified in place; take current + ;; ones or insert a new X-specific list. + (let ((x-parameters (or (assq 'x window-system-default-frame-alist) + (let ((new-x-parameters '(x))) + (push new-x-parameters + window-system-default-frame-alist) + new-x-parameters)))) + (setf (cdr x-parameters) + (append new-x-parameters (cdr x-parameters))))) + +(defun exwm-workspace--handle-focus-in (_orig-func _event) + "Replacement for `handle-focus-in'." + (interactive "e")) + +(defun exwm-workspace--handle-focus-out (_orig-func _event) + "Replacement for `handle-focus-out'." + (interactive "e")) + +(defun exwm-workspace--init-minibuffer-frame () + (exwm--log) + ;; Initialize workspaces without minibuffers. + (setq exwm-workspace--minibuffer + (make-frame '((window-system . x) (minibuffer . only) + (left . 10000) (right . 10000) + (width . 1) (height . 1) + (client . nil)))) + ;; This is the only usable minibuffer frame. + (setq default-minibuffer-frame exwm-workspace--minibuffer) + (exwm-workspace--modify-all-x-frames-parameters + '((minibuffer . nil))) + (let ((outer-id (string-to-number + (frame-parameter exwm-workspace--minibuffer + 'outer-window-id))) + (window-id (string-to-number + (frame-parameter exwm-workspace--minibuffer + 'window-id))) + (container (xcb:generate-id exwm--connection))) + (set-frame-parameter exwm-workspace--minibuffer + 'exwm-outer-id outer-id) + (set-frame-parameter exwm-workspace--minibuffer 'exwm-id window-id) + (set-frame-parameter exwm-workspace--minibuffer 'exwm-container + container) + (xcb:+request exwm--connection + (make-instance 'xcb:CreateWindow + :depth 0 + :wid container + :parent exwm--root + :x 0 + :y 0 + :width 1 + :height 1 + :border-width 0 + :class xcb:WindowClass:InputOutput + :visual 0 + :value-mask (logior xcb:CW:BackPixmap + xcb:CW:OverrideRedirect) + :background-pixmap xcb:BackPixmap:ParentRelative + :override-redirect 1)) + (xcb:+request exwm--connection + (make-instance 'xcb:ewmh:set-_NET_WM_NAME + :window container + :data "EXWM minibuffer container")) + ;; Reparent the minibuffer frame to the container. + (xcb:+request exwm--connection + (make-instance 'xcb:ReparentWindow + :window outer-id :parent container :x 0 :y 0)) + ;; Map the container. + (xcb:+request exwm--connection + (make-instance 'xcb:MapWindow + :window container)) + ;; Attach event listener for monitoring the frame + (xcb:+request exwm--connection + (make-instance 'xcb:ChangeWindowAttributes + :window outer-id + :value-mask xcb:CW:EventMask + :event-mask xcb:EventMask:StructureNotify)) + (xcb:+event exwm--connection 'xcb:ConfigureNotify + #'exwm-workspace--on-ConfigureNotify)) + ;; Show/hide minibuffer / echo area when they're active/inactive. + (add-hook 'minibuffer-setup-hook #'exwm-workspace--on-minibuffer-setup) + (add-hook 'minibuffer-exit-hook #'exwm-workspace--on-minibuffer-exit) + (setq exwm-workspace--timer + (run-with-idle-timer 0 t #'exwm-workspace--on-echo-area-dirty)) + (add-hook 'echo-area-clear-hook #'exwm-workspace--on-echo-area-clear) + ;; The default behavior of `display-buffer' (indirectly called by + ;; `minibuffer-completion-help') is not correct here. + (cl-pushnew '(exwm-workspace--display-buffer) display-buffer-alist + :test #'equal)) + +(defun exwm-workspace--exit-minibuffer-frame () + (exwm--log) + ;; Only on minibuffer-frame. + (remove-hook 'minibuffer-setup-hook #'exwm-workspace--on-minibuffer-setup) + (remove-hook 'minibuffer-exit-hook #'exwm-workspace--on-minibuffer-exit) + (remove-hook 'echo-area-clear-hook #'exwm-workspace--on-echo-area-clear) + (when exwm-workspace--timer + (cancel-timer exwm-workspace--timer) + (setq exwm-workspace--timer nil)) + (setq display-buffer-alist + (cl-delete '(exwm-workspace--display-buffer) display-buffer-alist + :test #'equal)) + (setq default-minibuffer-frame nil) + (let ((id (frame-parameter exwm-workspace--minibuffer 'exwm-outer-id))) + (when (and exwm-workspace--minibuffer id) + (xcb:+request exwm--connection + (make-instance 'xcb:ReparentWindow + :window id + :parent exwm--root + :x 0 + :y 0))) + (setq exwm-workspace--minibuffer nil))) + +(defun exwm-workspace--init () + "Initialize workspace module." + (exwm--log) + (exwm-workspace--init-switch-map) + ;; Prevent unexpected exit + (setq exwm-workspace--fullscreen-frame-count 0) + (exwm-workspace--modify-all-x-frames-parameters + '((internal-border-width . 0))) + (let ((initial-workspaces (frame-list))) + (if (not (exwm-workspace--minibuffer-own-frame-p)) + ;; Initialize workspaces with minibuffers. + (when (< 1 (length initial-workspaces)) + ;; Exclude the initial frame. + (dolist (i initial-workspaces) + (unless (frame-parameter i 'window-id) + (setq initial-workspaces (delq i initial-workspaces)))) + (setq exwm-workspace--client + (frame-parameter (car initial-workspaces) 'client)) + (let ((f (car initial-workspaces))) + ;; Remove the possible internal border. + (set-frame-parameter f 'internal-border-width 0) + ;; Prevent user from deleting the first frame by accident. + (set-frame-parameter f 'client nil))) + (exwm-workspace--init-minibuffer-frame) + ;; Remove/hide existing frames. + (dolist (f initial-workspaces) + (if (frame-parameter f 'client) + (progn + (unless exwm-workspace--client + (setq exwm-workspace--client (frame-parameter f 'client))) + (make-frame-invisible f)) + (when (eq 'x (framep f)) ;do not delete the initial frame. + (delete-frame f)))) + ;; Recreate one frame with the external minibuffer set. + (setq initial-workspaces (list (make-frame '((window-system . x) + (client . nil)))))) + ;; Prevent `other-buffer' from selecting already displayed EXWM buffers. + (modify-all-frames-parameters + '((buffer-predicate . exwm-layout--other-buffer-predicate))) + ;; Create remaining workspaces. + (dotimes (_ (- exwm-workspace-number (length initial-workspaces))) + (nconc initial-workspaces (list (make-frame '((window-system . x) + (client . nil)))))) + ;; Configure workspaces + (let ((exwm-workspace--create-silently t)) + (dolist (i initial-workspaces) + (exwm-workspace--add-frame-as-workspace i)))) + (xcb:flush exwm--connection) + ;; We have to advice `x-create-frame' or every call to it would hang EXWM + (advice-add 'x-create-frame :around #'exwm-workspace--x-create-frame) + ;; We have to manually handle focus-in and focus-out events for Emacs + ;; frames. + (advice-add 'handle-focus-in :around #'exwm-workspace--handle-focus-in) + (advice-add 'handle-focus-out :around #'exwm-workspace--handle-focus-out) + ;; Make new frames create new workspaces. + (add-hook 'after-make-frame-functions + #'exwm-workspace--on-after-make-frame) + (add-hook 'delete-frame-functions #'exwm-workspace--on-delete-frame) + (when (exwm-workspace--minibuffer-own-frame-p) + (add-hook 'exwm-input--event-hook + #'exwm-workspace--on-echo-area-clear)) + ;; Switch to the first workspace + (exwm-workspace-switch 0 t) + ;; Prevent frame parameters introduced by this module from being + ;; saved/restored. + (dolist (i '(exwm-active exwm-outer-id exwm-id exwm-container exwm-geometry + exwm-selected-window exwm-urgency fullscreen)) + (unless (assq i frameset-filter-alist) + (push (cons i :never) frameset-filter-alist)))) + +(defun exwm-workspace--exit () + "Exit the workspace module." + (exwm--log) + (when (exwm-workspace--minibuffer-own-frame-p) + (exwm-workspace--exit-minibuffer-frame)) + (advice-remove 'x-create-frame #'exwm-workspace--x-create-frame) + (advice-remove 'handle-focus-in #'exwm-workspace--handle-focus-in) + (advice-remove 'handle-focus-out #'exwm-workspace--handle-focus-out) + (remove-hook 'after-make-frame-functions + #'exwm-workspace--on-after-make-frame) + (remove-hook 'delete-frame-functions + #'exwm-workspace--on-delete-frame) + (when (exwm-workspace--minibuffer-own-frame-p) + (remove-hook 'exwm-input--event-hook + #'exwm-workspace--on-echo-area-clear)) + ;; Hide & reparent out all frames (save-set can't be used here since + ;; X windows will be re-mapped). + (setq exwm-workspace--current nil) + (dolist (i exwm-workspace--list) + (exwm-workspace--remove-frame-as-workspace i) + (modify-frame-parameters i '((exwm-selected-window . nil) + (exwm-urgency . nil) + (exwm-outer-id . nil) + (exwm-id . nil) + (exwm-container . nil) + ;; (internal-border-width . nil) ; integerp + ;; (client . nil) + (fullscreen . nil) + (buffer-predicate . nil)))) + ;; Restore the 'client' frame parameter (before `exwm-exit'). + (when exwm-workspace--client + (dolist (f exwm-workspace--list) + (set-frame-parameter f 'client exwm-workspace--client)) + (when (exwm-workspace--minibuffer-own-frame-p) + (set-frame-parameter exwm-workspace--minibuffer 'client + exwm-workspace--client)) + (setq exwm-workspace--client nil))) + +(defun exwm-workspace--post-init () + "The second stage in the initialization of the workspace module." + (exwm--log) + (when exwm-workspace--client + ;; Reset the 'fullscreen' frame parameter to make emacsclinet frames + ;; fullscreen (even without the RandR module enabled). + (dolist (i exwm-workspace--list) + (set-frame-parameter i 'fullscreen nil) + (set-frame-parameter i 'fullscreen 'fullboth))) + ;; Wait until all workspace frames are resized. + (with-timeout (1) + (while (< exwm-workspace--fullscreen-frame-count (exwm-workspace--count)) + (accept-process-output nil 0.1))) + (setq exwm-workspace--fullscreen-frame-count nil)) + + + +(provide 'exwm-workspace) + +;;; exwm-workspace.el ends here diff --git a/elpa/exwm-0.24/exwm-workspace.elc b/elpa/exwm-0.24/exwm-workspace.elc new file mode 100644 index 0000000..2ea6041 Binary files /dev/null and b/elpa/exwm-0.24/exwm-workspace.elc differ diff --git a/elpa/exwm-0.24/exwm-xim.el b/elpa/exwm-0.24/exwm-xim.el new file mode 100644 index 0000000..acf718e --- /dev/null +++ b/elpa/exwm-0.24/exwm-xim.el @@ -0,0 +1,800 @@ +;;; exwm-xim.el --- XIM Module for EXWM -*- lexical-binding: t -*- + +;; Copyright (C) 2019-2020 Free Software Foundation, Inc. + +;; Author: Chris Feng + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This module adds XIM support for EXWM and allows sending characters +;; generated by any Emacs's builtin input method (info node `Input Methods') +;; to X windows. + +;; This module is essentially an X input method server utilizing Emacs as +;; its backend. It talks with X windows through the XIM protocol. The XIM +;; protocol is quite flexible by itself, stating that an implementation can +;; create network connections of various types as well as make use of an +;; existing X connection for communication, and that an IM server may +;; support multiple transport versions, various input styles and several +;; event flow modals, etc. Here we only make choices that are most popular +;; among other IM servers and more importantly, practical for Emacs to act +;; as an IM server: +;; +;; + Packets are transported on top of an X connection like most IMEs. +;; + Only transport version 0.0 (i.e. only-CM & Property-with-CM) is +;; supported (same as "IM Server Developers Kit", adopted by most IMEs). +;; + Only support static event flow, on-demand-synchronous method. +;; + Only "root-window" input style is supported. + +;; To use this module, first load and enable it as follows: +;; +;; (require 'exwm-xim) +;; (exwm-xim-enable) +;; +;; A keybinding for `toggle-input-method' is probably required to turn on & +;; off an input method (default to `default-input-method'). It's bound to +;; 'C-\' by default and can be made reachable when working with X windows: +;; +;; (push ?\C-\\ exwm-input-prefix-keys) +;; +;; It's also required (and error-prone) to setup environment variables to +;; make applications actually use this input method. Typically the +;; following lines should be inserted into '~/.xinitrc'. +;; +;; export XMODIFIERS=@im=exwm-xim +;; export GTK_IM_MODULE=xim +;; export QT_IM_MODULE=xim +;; export CLUTTER_IM_MODULE=xim + +;; References: +;; + XIM (http://www.x.org/releases/X11R7.6/doc/libX11/specs/XIM/xim.html) +;; + IMdkit (http://xorg.freedesktop.org/archive/unsupported/lib/IMdkit/) +;; + UIM (https://github.com/uim/uim) + +;;; Code: + +(eval-when-compile (require 'cl-lib)) + +(require 'xcb-keysyms) +(require 'xcb-xim) + +(require 'exwm-core) +(require 'exwm-input) + +(defconst exwm-xim--locales + "@locale=\ +aa,af,ak,am,an,anp,ar,as,ast,ayc,az,be,bem,ber,bg,bhb,bho,bn,bo,br,brx,bs,byn,\ +ca,ce,cmn,crh,cs,csb,cv,cy,da,de,doi,dv,dz,el,en,es,et,eu,fa,ff,fi,fil,fo,fr,\ +fur,fy,ga,gd,gez,gl,gu,gv,ha,hak,he,hi,hne,hr,hsb,ht,hu,hy,ia,id,ig,ik,is,it,\ +iu,iw,ja,ka,kk,kl,km,kn,ko,kok,ks,ku,kw,ky,lb,lg,li,li,lij,lo,lt,lv,lzh,mag,\ +mai,mg,mhr,mi,mk,ml,mn,mni,mr,ms,mt,my,nan,nb,nds,ne,nhn,niu,nl,nn,nr,nso,oc,\ +om,or,os,pa,pa,pap,pl,ps,pt,quz,raj,ro,ru,rw,sa,sat,sc,sd,se,shs,si,sid,sk,sl,\ +so,sq,sr,ss,st,sv,sw,szl,ta,tcy,te,tg,th,the,ti,tig,tk,tl,tn,tr,ts,tt,ug,uk,\ +unm,ur,uz,ve,vi,wa,wae,wal,wo,xh,yi,yo,yue,zh,zu,\ +C,no" + "All supported locales (stolen from glibc).") + +(defconst exwm-xim--default-error + (make-instance 'xim:error + :im-id 0 + :ic-id 0 + :flag xim:error-flag:invalid-both + :error-code xim:error-code:bad-something + :length 0 + :type 0 + :detail nil) + "Default error returned to clients.") + +(defconst exwm-xim--default-im-attrs + (list (make-instance 'xim:XIMATTR + :id 0 + :type xim:ATTRIBUTE-VALUE-TYPE:xim-styles + :length (length xlib:XNQueryInputStyle) + :attribute xlib:XNQueryInputStyle)) + "Default IM attrs returned to clients.") + +(defconst exwm-xim--default-ic-attrs + (list (make-instance 'xim:XICATTR + :id 0 + :type xim:ATTRIBUTE-VALUE-TYPE:long-data + :length (length xlib:XNInputStyle) + :attribute xlib:XNInputStyle) + (make-instance 'xim:XICATTR + :id 1 + :type xim:ATTRIBUTE-VALUE-TYPE:window + :length (length xlib:XNClientWindow) + :attribute xlib:XNClientWindow) + ;; Required by e.g. xterm. + (make-instance 'xim:XICATTR + :id 2 + :type xim:ATTRIBUTE-VALUE-TYPE:window + :length (length xlib:XNFocusWindow) + :attribute xlib:XNFocusWindow)) + "Default IC attrs returned to clients.") + +(defconst exwm-xim--default-styles + (make-instance 'xim:XIMStyles + :number nil + :styles (list (logior xlib:XIMPreeditNothing + xlib:XIMStatusNothing))) + "Default styles: root-window, i.e. no preediting or status display support.") + +(defconst exwm-xim--default-attributes + (list (make-instance 'xim:XIMATTRIBUTE + :id 0 + :length nil + :value exwm-xim--default-styles)) + "Default IM/IC attributes returned to clients.") + +(defvar exwm-xim--conn nil + "The X connection for initiating other XIM connections.") +(defvar exwm-xim--event-xwin nil + "X window for initiating new XIM connections.") +(defvar exwm-xim--server-client-plist '(nil nil) + "Plist mapping server window to [X connection, client window, byte-order].") +(defvar exwm-xim--client-server-plist '(nil nil) + "Plist mapping client window to server window.") +(defvar exwm-xim--property-index 0 "For generating a unique property name.") +(defvar exwm-xim--im-id 0 "Last IM ID.") +(defvar exwm-xim--ic-id 0 "Last IC ID.") + +;; X11 atoms. +(defvar exwm-xim--@server nil) +(defvar exwm-xim--LOCALES nil) +(defvar exwm-xim--TRANSPORT nil) +(defvar exwm-xim--XIM_SERVERS nil) +(defvar exwm-xim--_XIM_PROTOCOL nil) +(defvar exwm-xim--_XIM_XCONNECT nil) + +(defun exwm-xim--on-SelectionRequest (data _synthetic) + "Handle SelectionRequest events on IMS window. + +Such events would be received when clients query for LOCALES or TRANSPORT." + (exwm--log) + (let ((evt (make-instance 'xcb:SelectionRequest)) + value fake-event) + (xcb:unmarshal evt data) + (with-slots (time requestor selection target property) evt + (setq value (cond ((= target exwm-xim--LOCALES) + ;; Return supported locales. + exwm-xim--locales) + ((= target exwm-xim--TRANSPORT) + ;; Use XIM over an X connection. + "@transport=X/"))) + (when value + ;; Change the property. + (xcb:+request exwm-xim--conn + (make-instance 'xcb:ChangeProperty + :mode xcb:PropMode:Replace + :window requestor + :property property + :type target + :format 8 + :data-len (length value) + :data value)) + ;; Send a SelectionNotify event. + (setq fake-event (make-instance 'xcb:SelectionNotify + :time time + :requestor requestor + :selection selection + :target target + :property property)) + (xcb:+request exwm-xim--conn + (make-instance 'xcb:SendEvent + :propagate 0 + :destination requestor + :event-mask xcb:EventMask:NoEvent + :event (xcb:marshal fake-event exwm-xim--conn))) + (xcb:flush exwm-xim--conn))))) + +(cl-defun exwm-xim--on-ClientMessage-0 (data _synthetic) + "Handle ClientMessage event on IMS window (new connection). + +Such events would be received when clients request for _XIM_XCONNECT. +A new X connection and server window would be created to communicate with +this client." + (exwm--log) + (let ((evt (make-instance 'xcb:ClientMessage)) + conn client-xwin server-xwin) + (xcb:unmarshal evt data) + (with-slots (window type data) evt + (unless (= type exwm-xim--_XIM_XCONNECT) + ;; Only handle _XIM_XCONNECT. + (exwm--log "Ignore ClientMessage %s" type) + (cl-return-from exwm-xim--on-ClientMessage-0)) + (setq client-xwin (elt (slot-value data 'data32) 0) + ;; Create a new X connection and a new server window. + conn (xcb:connect) + server-xwin (xcb:generate-id conn)) + (set-process-query-on-exit-flag (slot-value conn 'process) nil) + ;; Store this client. + (plist-put exwm-xim--server-client-plist server-xwin + `[,conn ,client-xwin nil]) + (plist-put exwm-xim--client-server-plist client-xwin server-xwin) + ;; Select DestroyNotify events on this client window. + (xcb:+request exwm-xim--conn + (make-instance 'xcb:ChangeWindowAttributes + :window client-xwin + :value-mask xcb:CW:EventMask + :event-mask xcb:EventMask:StructureNotify)) + (xcb:flush exwm-xim--conn) + ;; Handle ClientMessage events from this new connection. + (xcb:+event conn 'xcb:ClientMessage #'exwm-xim--on-ClientMessage) + ;; Create a communication window. + (xcb:+request conn + (make-instance 'xcb:CreateWindow + :depth 0 + :wid server-xwin + :parent exwm--root + :x 0 + :y 0 + :width 1 + :height 1 + :border-width 0 + :class xcb:WindowClass:InputOutput + :visual 0 + :value-mask xcb:CW:OverrideRedirect + :override-redirect 1)) + (xcb:flush conn) + ;; Send connection establishment ClientMessage. + (setf window client-xwin + (slot-value data 'data32) `(,server-xwin 0 0 0 0)) + (slot-makeunbound data 'data8) + (slot-makeunbound data 'data16) + (xcb:+request exwm-xim--conn + (make-instance 'xcb:SendEvent + :propagate 0 + :destination client-xwin + :event-mask xcb:EventMask:NoEvent + :event (xcb:marshal evt exwm-xim--conn))) + (xcb:flush exwm-xim--conn)))) + +(cl-defun exwm-xim--on-ClientMessage (data _synthetic) + "Handle ClientMessage event on IMS communication window (request). + +Such events would be received when clients request for _XIM_PROTOCOL. +The actual XIM request is in client message data or a property." + (exwm--log) + (let ((evt (make-instance 'xcb:ClientMessage)) + conn client-xwin server-xwin) + (xcb:unmarshal evt data) + (with-slots (format window type data) evt + (unless (= type exwm-xim--_XIM_PROTOCOL) + (exwm--log "Ignore ClientMessage %s" type) + (cl-return-from exwm-xim--on-ClientMessage)) + (setq server-xwin window + conn (plist-get exwm-xim--server-client-plist server-xwin) + client-xwin (elt conn 1) + conn (elt conn 0)) + (cond ((= format 8) + ;; Data. + (exwm-xim--on-request (vconcat (slot-value data 'data8)) + conn client-xwin server-xwin)) + ((= format 32) + ;; Atom. + (with-slots (data32) data + (with-slots (value) + (xcb:+request-unchecked+reply conn + (make-instance 'xcb:GetProperty + :delete 1 + :window server-xwin + :property (elt data32 1) + :type xcb:GetPropertyType:Any + :long-offset 0 + :long-length (elt data32 0))) + (when (> (length value) 0) + (exwm-xim--on-request value conn client-xwin + server-xwin))))))))) + +(defun exwm-xim--on-request (data conn client-xwin server-xwin) + "Handle an XIM reuqest." + (exwm--log) + (let ((opcode (elt data 0)) + ;; Let-bind `xim:lsb' to make pack/unpack functions work correctly. + (xim:lsb (elt (plist-get exwm-xim--server-client-plist server-xwin) 2)) + req replies) + (cond ((= opcode xim:opcode:error) + (exwm--log "ERROR: %s" data)) + ((= opcode xim:opcode:connect) + (exwm--log "CONNECT") + (setq xim:lsb (= (elt data 4) xim:connect-byte-order:lsb-first)) + ;; Store byte-order. + (setf (elt (plist-get exwm-xim--server-client-plist server-xwin) 2) + xim:lsb) + (setq req (make-instance 'xim:connect)) + (xcb:unmarshal req data) + (if (and (= (slot-value req 'major-version) 1) + (= (slot-value req 'minor-version) 0) + ;; Do not support authentication. + (= (slot-value req 'number) 0)) + ;; Accept the connection. + (push (make-instance 'xim:connect-reply) replies) + ;; Deny it. + (push exwm-xim--default-error replies))) + ((memq opcode (list xim:opcode:auth-required + xim:opcode:auth-reply + xim:opcode:auth-next + xim:opcode:auth-ng)) + (exwm--log "AUTH: %d" opcode) + ;; Deny any attempt to make authentication. + (push exwm-xim--default-error replies)) + ((= opcode xim:opcode:disconnect) + (exwm--log "DISCONNECT") + ;; Gracefully disconnect from the client. + (exwm-xim--make-request (make-instance 'xim:disconnect-reply) + conn client-xwin) + ;; Destroy the communication window & connection. + (xcb:+request conn + (make-instance 'xcb:DestroyWindow + :window server-xwin)) + (xcb:disconnect conn) + ;; Clean up cache. + (cl-remf exwm-xim--server-client-plist server-xwin) + (cl-remf exwm-xim--client-server-plist client-xwin)) + ((= opcode xim:opcode:open) + (exwm--log "OPEN") + ;; Note: We make no check here. + (setq exwm-xim--im-id (if (< exwm-xim--im-id #xffff) + (1+ exwm-xim--im-id) + 1)) + (setq replies + (list + (make-instance 'xim:open-reply + :im-id exwm-xim--im-id + :im-attrs-length nil + :im-attrs exwm-xim--default-im-attrs + :ic-attrs-length nil + :ic-attrs exwm-xim--default-ic-attrs) + (make-instance 'xim:set-event-mask + :im-id exwm-xim--im-id + :ic-id 0 + ;; Static event flow. + :forward-event-mask xcb:EventMask:KeyPress + ;; on-demand-synchronous method. + :synchronous-event-mask + xcb:EventMask:NoEvent)))) + ((= opcode xim:opcode:close) + (exwm--log "CLOSE") + (setq req (make-instance 'xim:close)) + (xcb:unmarshal req data) + (push (make-instance 'xim:close-reply + :im-id (slot-value req 'im-id)) + replies)) + ((= opcode xim:opcode:trigger-notify) + (exwm--log "TRIGGER-NOTIFY") + ;; Only static event flow modal is supported. + (push exwm-xim--default-error replies)) + ((= opcode xim:opcode:encoding-negotiation) + (exwm--log "ENCODING-NEGOTIATION") + (setq req (make-instance 'xim:encoding-negotiation)) + (xcb:unmarshal req data) + (let ((index (cl-position "COMPOUND_TEXT" + (mapcar (lambda (i) (slot-value i 'name)) + (slot-value req 'names)) + :test #'equal))) + (unless index + ;; Fallback to portable character encoding (a subset of ASCII). + (setq index -1)) + (push (make-instance 'xim:encoding-negotiation-reply + :im-id (slot-value req 'im-id) + :category + xim:encoding-negotiation-reply-category:name + :index index) + replies))) + ((= opcode xim:opcode:query-extension) + (exwm--log "QUERY-EXTENSION") + (setq req (make-instance 'xim:query-extension)) + (xcb:unmarshal req data) + (push (make-instance 'xim:query-extension-reply + :im-id (slot-value req 'im-id) + ;; No extension support. + :length 0 + :extensions nil) + replies)) + ((= opcode xim:opcode:set-im-values) + (exwm--log "SET-IM-VALUES") + ;; There's only one possible input method attribute. + (setq req (make-instance 'xim:set-im-values)) + (xcb:unmarshal req data) + (push (make-instance 'xim:set-im-values-reply + :im-id (slot-value req 'im-id)) + replies)) + ((= opcode xim:opcode:get-im-values) + (exwm--log "GET-IM-VALUES") + (setq req (make-instance 'xim:get-im-values)) + (let (im-attributes-id) + (xcb:unmarshal req data) + (setq im-attributes-id (slot-value req 'im-attributes-id)) + (if (cl-notevery (lambda (i) (= i 0)) im-attributes-id) + ;; Only support one IM attributes. + (push (make-instance 'xim:error + :im-id (slot-value req 'im-id) + :ic-id 0 + :flag xim:error-flag:invalid-ic-id + :error-code xim:error-code:bad-something + :length 0 + :type 0 + :detail nil) + replies) + (push + (make-instance 'xim:get-im-values-reply + :im-id (slot-value req 'im-id) + :length nil + :im-attributes exwm-xim--default-attributes) + replies)))) + ((= opcode xim:opcode:create-ic) + (exwm--log "CREATE-IC") + (setq req (make-instance 'xim:create-ic)) + (xcb:unmarshal req data) + ;; Note: The ic-attributes slot is ignored. + (setq exwm-xim--ic-id (if (< exwm-xim--ic-id #xffff) + (1+ exwm-xim--ic-id) + 1)) + (push (make-instance 'xim:create-ic-reply + :im-id (slot-value req 'im-id) + :ic-id exwm-xim--ic-id) + replies)) + ((= opcode xim:opcode:destroy-ic) + (exwm--log "DESTROY-IC") + (setq req (make-instance 'xim:destroy-ic)) + (xcb:unmarshal req data) + (push (make-instance 'xim:destroy-ic-reply + :im-id (slot-value req 'im-id) + :ic-id (slot-value req 'ic-id)) + replies)) + ((= opcode xim:opcode:set-ic-values) + (exwm--log "SET-IC-VALUES") + (setq req (make-instance 'xim:set-ic-values)) + (xcb:unmarshal req data) + ;; We don't distinguish between input contexts. + (push (make-instance 'xim:set-ic-values-reply + :im-id (slot-value req 'im-id) + :ic-id (slot-value req 'ic-id)) + replies)) + ((= opcode xim:opcode:get-ic-values) + (exwm--log "GET-IC-VALUES") + (setq req (make-instance 'xim:get-ic-values)) + (xcb:unmarshal req data) + (push (make-instance 'xim:get-ic-values-reply + :im-id (slot-value req 'im-id) + :ic-id (slot-value req 'ic-id) + :length nil + :ic-attributes exwm-xim--default-attributes) + replies)) + ((= opcode xim:opcode:set-ic-focus) + (exwm--log "SET-IC-FOCUS") + ;; All input contexts are the same. + ) + ((= opcode xim:opcode:unset-ic-focus) + (exwm--log "UNSET-IC-FOCUS") + ;; All input contexts are the same. + ) + ((= opcode xim:opcode:forward-event) + (exwm--log "FORWARD-EVENT") + (setq req (make-instance 'xim:forward-event)) + (xcb:unmarshal req data) + (exwm-xim--handle-forward-event-request req xim:lsb conn + client-xwin)) + ((= opcode xim:opcode:sync) + (exwm--log "SYNC") + (setq req (make-instance 'xim:sync)) + (xcb:unmarshal req data) + (push (make-instance 'xim:sync-reply + :im-id (slot-value req 'im-id) + :ic-id (slot-value req 'ic-id)) + replies)) + ((= opcode xim:opcode:sync-reply) + (exwm--log "SYNC-REPLY")) + ((= opcode xim:opcode:reset-ic) + (exwm--log "RESET-IC") + ;; No context-specific data saved. + (setq req (make-instance 'xim:reset-ic)) + (xcb:unmarshal req data) + (push (make-instance 'xim:reset-ic-reply + :im-id (slot-value req 'im-id) + :ic-id (slot-value req 'ic-id) + :length 0 + :string "") + replies)) + ((memq opcode (list xim:opcode:str-conversion-reply + xim:opcode:preedit-start-reply + xim:opcode:preedit-caret-reply)) + (exwm--log "PREEDIT: %d" opcode) + ;; No preedit support. + (push exwm-xim--default-error replies)) + (t + (exwm--log "Bad protocol") + (push exwm-xim--default-error replies))) + ;; Actually send the replies. + (when replies + (mapc (lambda (reply) + (exwm-xim--make-request reply conn client-xwin)) + replies) + (xcb:flush conn)))) + +(defun exwm-xim--handle-forward-event-request (req lsb conn client-xwin) + (let ((im-func (with-current-buffer (window-buffer) + input-method-function)) + key-event keysym keysyms event result) + ;; Note: The flag slot is ignored. + ;; Do conversion in client's byte-order. + (let ((xcb:lsb lsb)) + (setq key-event (make-instance 'xcb:KeyPress)) + (xcb:unmarshal key-event (slot-value req 'event))) + (with-slots (detail state) key-event + (setq keysym (xcb:keysyms:keycode->keysym exwm-xim--conn detail + state)) + (when (/= (car keysym) 0) + (setq event (xcb:keysyms:keysym->event + exwm-xim--conn + (car keysym) + (logand state (lognot (cdr keysym))))))) + (while (or (slot-value req 'event) unread-command-events) + (unless (slot-value req 'event) + (setq event (pop unread-command-events)) + ;; Handle events in (t . EVENT) format. + (when (and (consp event) + (eq (car event) t)) + (setq event (cdr event)))) + (if (or (not im-func) + ;; `list' is the default method. + (eq im-func #'list) + (not event) + ;; Select only printable keys. + (not (integerp event)) (> #x20 event) (< #x7e event)) + ;; Either there is no active input method, or invalid key + ;; is detected. + (with-slots ((raw-event event) + im-id ic-id serial-number) + req + (if raw-event + (setq event raw-event) + (setq keysyms (xcb:keysyms:event->keysyms exwm-xim--conn event)) + (with-slots (detail state) key-event + (setf detail (xcb:keysyms:keysym->keycode exwm-xim--conn + (caar keysyms)) + state (cdar keysyms))) + (setq event (let ((xcb:lsb lsb)) + (xcb:marshal key-event conn)))) + (when event + (exwm-xim--make-request + (make-instance 'xim:forward-event + :im-id im-id + :ic-id ic-id + :flag xim:commit-flag:synchronous + :serial-number serial-number + :event event) + conn client-xwin))) + (when (eq exwm--selected-input-mode 'char-mode) + ;; Grab keyboard temporarily for char-mode. + (exwm-input--grab-keyboard)) + (unwind-protect + (with-temp-buffer + ;; Always show key strokes. + (let ((input-method-use-echo-area t) + (exwm-input-line-mode-passthrough t)) + (setq result (funcall im-func event)) + ;; Clear echo area for the input method. + (message nil) + ;; This also works for portable character encoding. + (setq result + (encode-coding-string (concat result) + 'compound-text-with-extensions)) + (exwm-xim--make-request + (make-instance 'xim:commit-x-lookup-chars + :im-id (slot-value req 'im-id) + :ic-id (slot-value req 'ic-id) + :flag (logior xim:commit-flag:synchronous + xim:commit-flag:x-lookup-chars) + :length (length result) + :string result) + conn client-xwin))) + (when (eq exwm--selected-input-mode 'char-mode) + (exwm-input--release-keyboard)))) + (xcb:flush conn) + (setf event nil + (slot-value req 'event) nil)))) + +(defun exwm-xim--make-request (req conn client-xwin) + "Make an XIM request REQ via connection CONN. + +CLIENT-XWIN would receive a ClientMessage event either telling the client +the request data or where to fetch the data." + (exwm--log) + (let ((data (xcb:marshal req)) + property format client-message-data client-message) + (if (<= (length data) 20) + ;; Send short requests directly with client messages. + (setq format 8 + ;; Pad to 20 bytes. + data (append data (make-list (- 20 (length data)) 0)) + client-message-data (make-instance 'xcb:ClientMessageData + :data8 data)) + ;; Send long requests with properties. + (setq property (exwm--intern-atom (format "_EXWM_XIM_%x" + exwm-xim--property-index))) + (cl-incf exwm-xim--property-index) + (xcb:+request conn + (make-instance 'xcb:ChangeProperty + :mode xcb:PropMode:Append + :window client-xwin + :property property + :type xcb:Atom:STRING + :format 8 + :data-len (length data) + :data data)) + ;; Also send a client message to notify the client about this property. + (setq format 32 + client-message-data (make-instance 'xcb:ClientMessageData + :data32 `(,(length data) + ,property + ;; Pad to 20 bytes. + 0 0 0)))) + ;; Send the client message. + (setq client-message (make-instance 'xcb:ClientMessage + :format format + :window client-xwin + :type exwm-xim--_XIM_PROTOCOL + :data client-message-data)) + (xcb:+request conn + (make-instance 'xcb:SendEvent + :propagate 0 + :destination client-xwin + :event-mask xcb:EventMask:NoEvent + :event (xcb:marshal client-message conn))))) + +(defun exwm-xim--on-DestroyNotify (data synthetic) + "Do cleanups on receiving DestroyNotify event. + +Such event would be received when the client window is destroyed." + (exwm--log) + (unless synthetic + (let ((evt (make-instance 'xcb:DestroyNotify)) + conn client-xwin server-xwin) + (xcb:unmarshal evt data) + (setq client-xwin (slot-value evt 'window) + server-xwin (plist-get exwm-xim--client-server-plist client-xwin)) + (when server-xwin + (setq conn (aref (plist-get exwm-xim--server-client-plist server-xwin) + 0)) + (cl-remf exwm-xim--server-client-plist server-xwin) + (cl-remf exwm-xim--client-server-plist client-xwin) + ;; Destroy the communication window & connection. + (xcb:+request conn + (make-instance 'xcb:DestroyWindow + :window server-xwin)) + (xcb:disconnect conn))))) + +(cl-defun exwm-xim--init () + "Initialize the XIM module." + (exwm--log) + (when exwm-xim--conn + (cl-return-from exwm-xim--init)) + ;; Initialize atoms. + (setq exwm-xim--@server (exwm--intern-atom "@server=exwm-xim") + exwm-xim--LOCALES (exwm--intern-atom "LOCALES") + exwm-xim--TRANSPORT (exwm--intern-atom "TRANSPORT") + exwm-xim--XIM_SERVERS (exwm--intern-atom "XIM_SERVERS") + exwm-xim--_XIM_PROTOCOL (exwm--intern-atom "_XIM_PROTOCOL") + exwm-xim--_XIM_XCONNECT (exwm--intern-atom "_XIM_XCONNECT")) + ;; Create a new connection and event window. + (setq exwm-xim--conn (xcb:connect) + exwm-xim--event-xwin (xcb:generate-id exwm-xim--conn)) + (set-process-query-on-exit-flag (slot-value exwm-xim--conn 'process) nil) + ;; Initialize xcb:keysyms module. + (xcb:keysyms:init exwm-xim--conn) + ;; Listen to SelectionRequest event for connection establishment. + (xcb:+event exwm-xim--conn 'xcb:SelectionRequest + #'exwm-xim--on-SelectionRequest) + ;; Listen to ClientMessage event on IMS window for new XIM connection. + (xcb:+event exwm-xim--conn 'xcb:ClientMessage #'exwm-xim--on-ClientMessage-0) + ;; Listen to DestroyNotify event to do cleanups. + (xcb:+event exwm-xim--conn 'xcb:DestroyNotify #'exwm-xim--on-DestroyNotify) + ;; Create the event window. + (xcb:+request exwm-xim--conn + (make-instance 'xcb:CreateWindow + :depth 0 + :wid exwm-xim--event-xwin + :parent exwm--root + :x 0 + :y 0 + :width 1 + :height 1 + :border-width 0 + :class xcb:WindowClass:InputOutput + :visual 0 + :value-mask xcb:CW:OverrideRedirect + :override-redirect 1)) + ;; Set the selection owner. + (xcb:+request exwm-xim--conn + (make-instance 'xcb:SetSelectionOwner + :owner exwm-xim--event-xwin + :selection exwm-xim--@server + :time xcb:Time:CurrentTime)) + ;; Set XIM_SERVERS property on the root window. + (xcb:+request exwm-xim--conn + (make-instance 'xcb:ChangeProperty + :mode xcb:PropMode:Prepend + :window exwm--root + :property exwm-xim--XIM_SERVERS + :type xcb:Atom:ATOM + :format 32 + :data-len 1 + :data (funcall (if xcb:lsb + #'xcb:-pack-u4-lsb + #'xcb:-pack-u4) + exwm-xim--@server))) + (xcb:flush exwm-xim--conn)) + +(cl-defun exwm-xim--exit () + "Exit the XIM module." + (exwm--log) + ;; Close IMS communication connections. + (mapc (lambda (i) + (when (vectorp i) + (xcb:disconnect (elt i 0)))) + exwm-xim--server-client-plist) + ;; Close the IMS connection. + (unless exwm-xim--conn + (cl-return-from exwm-xim--exit)) + ;; Remove exwm-xim from XIM_SERVERS. + (let ((reply (xcb:+request-unchecked+reply exwm-xim--conn + (make-instance 'xcb:GetProperty + :delete 1 + :window exwm--root + :property exwm-xim--XIM_SERVERS + :type xcb:Atom:ATOM + :long-offset 0 + :long-length 1000))) + unpacked-reply pack unpack) + (unless reply + (cl-return-from exwm-xim--exit)) + (setq reply (slot-value reply 'value)) + (unless (> (length reply) 4) + (cl-return-from exwm-xim--exit)) + (setq reply (vconcat reply) + pack (if xcb:lsb #'xcb:-pack-u4-lsb #'xcb:-pack-u4) + unpack (if xcb:lsb #'xcb:-unpack-u4-lsb #'xcb:-unpack-u4)) + (dotimes (i (/ (length reply) 4)) + (push (funcall unpack reply (* i 4)) unpacked-reply)) + (setq unpacked-reply (delq exwm-xim--@server unpacked-reply) + reply (mapcar pack unpacked-reply)) + (xcb:+request exwm-xim--conn + (make-instance 'xcb:ChangeProperty + :mode xcb:PropMode:Replace + :window exwm--root + :property exwm-xim--XIM_SERVERS + :type xcb:Atom:ATOM + :format 32 + :data-len (length reply) + :data reply)) + (xcb:flush exwm-xim--conn)) + (xcb:disconnect exwm-xim--conn) + (setq exwm-xim--conn nil)) + +(defun exwm-xim-enable () + "Enable XIM support for EXWM." + (exwm--log) + (add-hook 'exwm-init-hook #'exwm-xim--init) + (add-hook 'exwm-exit-hook #'exwm-xim--exit)) + + + +(provide 'exwm-xim) + +;;; exwm-xim.el ends here diff --git a/elpa/exwm-0.24/exwm-xim.elc b/elpa/exwm-0.24/exwm-xim.elc new file mode 100644 index 0000000..40f55f9 Binary files /dev/null and b/elpa/exwm-0.24/exwm-xim.elc differ diff --git a/elpa/exwm-0.24/exwm.el b/elpa/exwm-0.24/exwm.el new file mode 100644 index 0000000..fc96ac7 --- /dev/null +++ b/elpa/exwm-0.24/exwm.el @@ -0,0 +1,1019 @@ +;;; exwm.el --- Emacs X Window Manager -*- lexical-binding: t -*- + +;; Copyright (C) 2015-2020 Free Software Foundation, Inc. + +;; Author: Chris Feng +;; Maintainer: Chris Feng +;; Version: 0.24 +;; Package-Requires: ((xelb "0.18")) +;; Keywords: unix +;; URL: https://github.com/ch11ng/exwm + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; Overview +;; -------- +;; EXWM (Emacs X Window Manager) is a full-featured tiling X window manager +;; for Emacs built on top of [XELB](https://github.com/ch11ng/xelb). +;; It features: +;; + Fully keyboard-driven operations +;; + Hybrid layout modes (tiling & stacking) +;; + Dynamic workspace support +;; + ICCCM/EWMH compliance +;; + (Optional) RandR (multi-monitor) support +;; + (Optional) Built-in system tray + +;; Installation & configuration +;; ---------------------------- +;; Here are the minimal steps to get EXWM working: +;; 1. Install XELB and EXWM, and make sure they are in `load-path'. +;; 2. In '~/.emacs', add following lines (please modify accordingly): +;; +;; (require 'exwm) +;; (require 'exwm-config) +;; (exwm-config-example) +;; +;; 3. Link or copy the file 'xinitrc' to '~/.xinitrc'. +;; 4. Launch EXWM in a console (e.g. tty1) with +;; +;; xinit -- vt01 +;; +;; You should additionally hide the menu-bar, tool-bar, etc to increase the +;; usable space. Please check the wiki (https://github.com/ch11ng/exwm/wiki) +;; for more detailed instructions on installation, configuration, usage, etc. + +;; References: +;; + dwm (http://dwm.suckless.org/) +;; + i3 wm (https://i3wm.org/) +;; + Also see references within each required library. + +;;; Code: + +(require 'server) +(require 'exwm-core) +(require 'exwm-workspace) +(require 'exwm-layout) +(require 'exwm-floating) +(require 'exwm-manage) +(require 'exwm-input) + +(defgroup exwm nil + "Emacs X Window Manager." + :tag "EXWM" + :version "25.3" + :group 'applications + :prefix "exwm-") + +(defcustom exwm-init-hook nil + "Normal hook run when EXWM has just finished initialization." + :type 'hook) + +(defcustom exwm-exit-hook nil + "Normal hook run just before EXWM exits." + :type 'hook) + +(defcustom exwm-update-class-hook nil + "Normal hook run when window class is updated." + :type 'hook) + +(defcustom exwm-update-title-hook nil + "Normal hook run when window title is updated." + :type 'hook) + +(defcustom exwm-blocking-subrs '(x-file-dialog x-popup-dialog x-select-font) + "Subrs (primitives) that would normally block EXWM." + :type '(repeat function)) + +(defcustom exwm-replace 'ask + "Whether to replace existing window manager." + :type '(radio (const :tag "Ask" ask) + (const :tag "Replace by default" t) + (const :tag "Do not replace" nil))) + +(defconst exwm--server-name "server-exwm" + "Name of the subordinate Emacs server.") + +(defvar exwm--server-process nil "Process of the subordinate Emacs server.") + +(defun exwm-reset () + "Reset the state of the selected window (non-fullscreen, line-mode, etc)." + (interactive) + (exwm--log) + (with-current-buffer (window-buffer) + (when (derived-mode-p 'exwm-mode) + (when (exwm-layout--fullscreen-p) + (exwm-layout-unset-fullscreen)) + ;; Force refresh + (exwm-layout--refresh) + (call-interactively #'exwm-input-grab-keyboard)))) + +;;;###autoload +(defun exwm-restart () + "Restart EXWM." + (interactive) + (exwm--log) + (when (exwm--confirm-kill-emacs "[EXWM] Restart? " 'no-check) + (let* ((attr (process-attributes (emacs-pid))) + (args (cdr (assq 'args attr))) + (ppid (cdr (assq 'ppid attr))) + (pargs (cdr (assq 'args (process-attributes ppid))))) + (cond + ((= ppid 1) + ;; The parent is the init process. This probably means this + ;; instance is an emacsclient. Anyway, start a control instance + ;; to manage the subsequent ones. + (call-process (car command-line-args)) + (kill-emacs)) + ((string= args pargs) + ;; This is a subordinate instance. Return a magic number to + ;; inform the parent (control instance) to start another one. + (kill-emacs ?R)) + (t + ;; This is the control instance. Keep starting subordinate + ;; instances until told to exit. + ;; Run `server-force-stop' if it exists. + (run-hooks 'kill-emacs-hook) + (with-temp-buffer + (while (= ?R (shell-command-on-region (point) (point) args)))) + (kill-emacs)))))) + +(defun exwm--update-desktop (xwin) + "Update _NET_WM_DESKTOP." + (exwm--log "#x%x" xwin) + (with-current-buffer (exwm--id->buffer xwin) + (let ((reply (xcb:+request-unchecked+reply exwm--connection + (make-instance 'xcb:ewmh:get-_NET_WM_DESKTOP + :window xwin))) + desktop) + (when reply + (setq desktop (slot-value reply 'value)) + (cond + ((eq desktop 4294967295.) + (unless (or (not exwm--floating-frame) + (eq exwm--frame exwm-workspace--current) + (and exwm--desktop + (= desktop exwm--desktop))) + (exwm-layout--show xwin (frame-root-window exwm--floating-frame))) + (setq exwm--desktop desktop)) + ((and desktop + (< desktop (exwm-workspace--count)) + (if exwm--desktop + (/= desktop exwm--desktop) + (/= desktop (exwm-workspace--position exwm--frame)))) + (exwm-workspace-move-window desktop xwin)) + (t + (exwm-workspace--set-desktop xwin))))))) + +(defun exwm--update-window-type (id &optional force) + "Update _NET_WM_WINDOW_TYPE." + (exwm--log "#x%x" id) + (with-current-buffer (exwm--id->buffer id) + (unless (and exwm-window-type (not force)) + (let ((reply (xcb:+request-unchecked+reply exwm--connection + (make-instance 'xcb:ewmh:get-_NET_WM_WINDOW_TYPE + :window id)))) + (when reply ;nil when destroyed + (setq exwm-window-type (append (slot-value reply 'value) nil))))))) + +(defun exwm--update-class (id &optional force) + "Update WM_CLASS." + (exwm--log "#x%x" id) + (with-current-buffer (exwm--id->buffer id) + (unless (and exwm-instance-name exwm-class-name (not force)) + (let ((reply (xcb:+request-unchecked+reply exwm--connection + (make-instance 'xcb:icccm:get-WM_CLASS :window id)))) + (when reply ;nil when destroyed + (setq exwm-instance-name (slot-value reply 'instance-name) + exwm-class-name (slot-value reply 'class-name)) + (when (and exwm-instance-name exwm-class-name) + (run-hooks 'exwm-update-class-hook))))))) + +(defun exwm--update-utf8-title (id &optional force) + "Update _NET_WM_NAME." + (exwm--log "#x%x" id) + (with-current-buffer (exwm--id->buffer id) + (when (or force (not exwm-title)) + (let ((reply (xcb:+request-unchecked+reply exwm--connection + (make-instance 'xcb:ewmh:get-_NET_WM_NAME :window id)))) + (when reply ;nil when destroyed + (setq exwm-title (slot-value reply 'value)) + (when exwm-title + (setq exwm--title-is-utf8 t) + (run-hooks 'exwm-update-title-hook))))))) + +(defun exwm--update-ctext-title (id &optional force) + "Update WM_NAME." + (exwm--log "#x%x" id) + (with-current-buffer (exwm--id->buffer id) + (unless (or exwm--title-is-utf8 + (and exwm-title (not force))) + (let ((reply (xcb:+request-unchecked+reply exwm--connection + (make-instance 'xcb:icccm:get-WM_NAME :window id)))) + (when reply ;nil when destroyed + (setq exwm-title (slot-value reply 'value)) + (when exwm-title + (run-hooks 'exwm-update-title-hook))))))) + +(defun exwm--update-title (id) + "Update _NET_WM_NAME or WM_NAME." + (exwm--log "#x%x" id) + (exwm--update-utf8-title id) + (exwm--update-ctext-title id)) + +(defun exwm--update-transient-for (id &optional force) + "Update WM_TRANSIENT_FOR." + (exwm--log "#x%x" id) + (with-current-buffer (exwm--id->buffer id) + (unless (and exwm-transient-for (not force)) + (let ((reply (xcb:+request-unchecked+reply exwm--connection + (make-instance 'xcb:icccm:get-WM_TRANSIENT_FOR + :window id)))) + (when reply ;nil when destroyed + (setq exwm-transient-for (slot-value reply 'value))))))) + +(defun exwm--update-normal-hints (id &optional force) + "Update WM_NORMAL_HINTS." + (exwm--log "#x%x" id) + (with-current-buffer (exwm--id->buffer id) + (unless (and (not force) + (or exwm--normal-hints-x exwm--normal-hints-y + exwm--normal-hints-width exwm--normal-hints-height + exwm--normal-hints-min-width exwm--normal-hints-min-height + exwm--normal-hints-max-width exwm--normal-hints-max-height + ;; FIXME: other fields + )) + (let ((reply (xcb:+request-unchecked+reply exwm--connection + (make-instance 'xcb:icccm:get-WM_NORMAL_HINTS + :window id)))) + (when (and reply (slot-value reply 'flags)) ;nil when destroyed + (with-slots (flags x y width height min-width min-height max-width + max-height base-width base-height ;; win-gravity + ) + reply + (unless (= 0 (logand flags xcb:icccm:WM_SIZE_HINTS:USPosition)) + (setq exwm--normal-hints-x x exwm--normal-hints-y y)) + (unless (= 0 (logand flags xcb:icccm:WM_SIZE_HINTS:USSize)) + (setq exwm--normal-hints-width width + exwm--normal-hints-height height)) + (unless (= 0 (logand flags xcb:icccm:WM_SIZE_HINTS:PMinSize)) + (setq exwm--normal-hints-min-width min-width + exwm--normal-hints-min-height min-height)) + (unless (= 0 (logand flags xcb:icccm:WM_SIZE_HINTS:PMaxSize)) + (setq exwm--normal-hints-max-width max-width + exwm--normal-hints-max-height max-height)) + (unless (or exwm--normal-hints-min-width + (= 0 (logand flags xcb:icccm:WM_SIZE_HINTS:PBaseSize))) + (setq exwm--normal-hints-min-width base-width + exwm--normal-hints-min-height base-height)) + ;; (unless (= 0 (logand flags xcb:icccm:WM_SIZE_HINTS:PWinGravity)) + ;; (setq exwm--normal-hints-win-gravity win-gravity)) + (setq exwm--fixed-size + (and exwm--normal-hints-min-width + exwm--normal-hints-min-height + exwm--normal-hints-max-width + exwm--normal-hints-max-height + (/= 0 exwm--normal-hints-min-width) + (/= 0 exwm--normal-hints-min-height) + (= exwm--normal-hints-min-width + exwm--normal-hints-max-width) + (= exwm--normal-hints-min-height + exwm--normal-hints-max-height))))))))) + +(defun exwm--update-hints (id &optional force) + "Update WM_HINTS." + (exwm--log "#x%x" id) + (with-current-buffer (exwm--id->buffer id) + (unless (and (not force) exwm--hints-input exwm--hints-urgency) + (let ((reply (xcb:+request-unchecked+reply exwm--connection + (make-instance 'xcb:icccm:get-WM_HINTS :window id)))) + (when (and reply (slot-value reply 'flags)) ;nil when destroyed + (with-slots (flags input initial-state) reply + (when flags + (unless (= 0 (logand flags xcb:icccm:WM_HINTS:InputHint)) + (setq exwm--hints-input (when input (= 1 input)))) + (unless (= 0 (logand flags xcb:icccm:WM_HINTS:StateHint)) + (setq exwm-state initial-state)) + (unless (= 0 (logand flags xcb:icccm:WM_HINTS:UrgencyHint)) + (setq exwm--hints-urgency t)))) + (when (and exwm--hints-urgency + (not (eq exwm--frame exwm-workspace--current))) + (unless (frame-parameter exwm--frame 'exwm-urgency) + (set-frame-parameter exwm--frame 'exwm-urgency t) + (setq exwm-workspace--switch-history-outdated t)))))))) + +(defun exwm--update-protocols (id &optional force) + "Update WM_PROTOCOLS." + (exwm--log "#x%x" id) + (with-current-buffer (exwm--id->buffer id) + (unless (and exwm--protocols (not force)) + (let ((reply (xcb:+request-unchecked+reply exwm--connection + (make-instance 'xcb:icccm:get-WM_PROTOCOLS + :window id)))) + (when reply ;nil when destroyed + (setq exwm--protocols (append (slot-value reply 'value) nil))))))) + +(defun exwm--update-struts-legacy (id) + "Update _NET_WM_STRUT." + (exwm--log "#x%x" id) + (let ((pair (assq id exwm-workspace--id-struts-alist)) + reply struts) + (unless (and pair (< 4 (length (cdr pair)))) + (setq reply (xcb:+request-unchecked+reply exwm--connection + (make-instance 'xcb:ewmh:get-_NET_WM_STRUT + :window id))) + (when reply + (setq struts (slot-value reply 'value)) + (if pair + (setcdr pair struts) + (push (cons id struts) exwm-workspace--id-struts-alist)) + (exwm-workspace--update-struts)) + ;; Update workareas. + (exwm-workspace--update-workareas) + ;; Update workspaces. + (dolist (f exwm-workspace--list) + (exwm-workspace--set-fullscreen f))))) + +(defun exwm--update-struts-partial (id) + "Update _NET_WM_STRUT_PARTIAL." + (exwm--log "#x%x" id) + (let ((reply (xcb:+request-unchecked+reply exwm--connection + (make-instance 'xcb:ewmh:get-_NET_WM_STRUT_PARTIAL + :window id))) + struts pair) + (when reply + (setq struts (slot-value reply 'value) + pair (assq id exwm-workspace--id-struts-alist)) + (if pair + (setcdr pair struts) + (push (cons id struts) exwm-workspace--id-struts-alist)) + (exwm-workspace--update-struts)) + ;; Update workareas. + (exwm-workspace--update-workareas) + ;; Update workspaces. + (dolist (f exwm-workspace--list) + (exwm-workspace--set-fullscreen f)))) + +(defun exwm--update-struts (id) + "Update _NET_WM_STRUT_PARTIAL or _NET_WM_STRUT." + (exwm--log "#x%x" id) + (exwm--update-struts-partial id) + (exwm--update-struts-legacy id)) + +(defun exwm--on-PropertyNotify (data _synthetic) + "Handle PropertyNotify event." + (let ((obj (make-instance 'xcb:PropertyNotify)) + atom id buffer) + (xcb:unmarshal obj data) + (setq id (slot-value obj 'window) + atom (slot-value obj 'atom)) + (exwm--log "atom=%s(%s)" (x-get-atom-name atom exwm-workspace--current) atom) + (setq buffer (exwm--id->buffer id)) + (if (not (buffer-live-p buffer)) + ;; Properties of unmanaged X windows. + (cond ((= atom xcb:Atom:_NET_WM_STRUT) + (exwm--update-struts-legacy id)) + ((= atom xcb:Atom:_NET_WM_STRUT_PARTIAL) + (exwm--update-struts-partial id))) + (with-current-buffer buffer + (cond ((= atom xcb:Atom:_NET_WM_WINDOW_TYPE) + (exwm--update-window-type id t)) + ((= atom xcb:Atom:WM_CLASS) + (exwm--update-class id t)) + ((= atom xcb:Atom:_NET_WM_NAME) + (exwm--update-utf8-title id t)) + ((= atom xcb:Atom:WM_NAME) + (exwm--update-ctext-title id t)) + ((= atom xcb:Atom:WM_TRANSIENT_FOR) + (exwm--update-transient-for id t)) + ((= atom xcb:Atom:WM_NORMAL_HINTS) + (exwm--update-normal-hints id t)) + ((= atom xcb:Atom:WM_HINTS) + (exwm--update-hints id t)) + ((= atom xcb:Atom:WM_PROTOCOLS) + (exwm--update-protocols id t)) + ((= atom xcb:Atom:_NET_WM_USER_TIME)) ;ignored + (t + (exwm--log "Unhandled: %s(%d)" + (x-get-atom-name atom exwm-workspace--current) + atom))))))) + +(defun exwm--on-ClientMessage (raw-data _synthetic) + "Handle ClientMessage event." + (let ((obj (make-instance 'xcb:ClientMessage)) + type id data) + (xcb:unmarshal obj raw-data) + (setq type (slot-value obj 'type) + id (slot-value obj 'window) + data (slot-value (slot-value obj 'data) 'data32)) + (exwm--log "atom=%s(%s)" (x-get-atom-name type exwm-workspace--current) + type) + (cond + ;; _NET_NUMBER_OF_DESKTOPS. + ((= type xcb:Atom:_NET_NUMBER_OF_DESKTOPS) + (let ((current (exwm-workspace--count)) + (requested (elt data 0))) + ;; Only allow increasing/decreasing the workspace number by 1. + (cond + ((< current requested) + (make-frame)) + ((and (> current requested) + (> current 1)) + (let ((frame (car (last exwm-workspace--list)))) + (exwm-workspace--get-remove-frame-next-workspace frame) + (delete-frame frame)))))) + ;; _NET_CURRENT_DESKTOP. + ((= type xcb:Atom:_NET_CURRENT_DESKTOP) + (exwm-workspace-switch (elt data 0))) + ;; _NET_ACTIVE_WINDOW. + ((= type xcb:Atom:_NET_ACTIVE_WINDOW) + (let ((buffer (exwm--id->buffer id)) + iconic window) + (when (buffer-live-p buffer) + (with-current-buffer buffer + (when (eq exwm--frame exwm-workspace--current) + (if exwm--floating-frame + (select-frame exwm--floating-frame) + (setq iconic (exwm-layout--iconic-state-p)) + (when iconic + ;; State change: iconic => normal. + (set-window-buffer (frame-selected-window exwm--frame) + (current-buffer))) + ;; Focus transfer. + (setq window (get-buffer-window nil t)) + (when (or iconic + (not (eq window (selected-window)))) + (select-window window)))))))) + ;; _NET_CLOSE_WINDOW. + ((= type xcb:Atom:_NET_CLOSE_WINDOW) + (let ((buffer (exwm--id->buffer id))) + (when (buffer-live-p buffer) + (exwm--defer 0 #'kill-buffer buffer)))) + ;; _NET_WM_MOVERESIZE + ((= type xcb:Atom:_NET_WM_MOVERESIZE) + (let ((direction (elt data 2)) + (buffer (exwm--id->buffer id))) + (unless (and buffer + (not (buffer-local-value 'exwm--floating-frame buffer))) + (cond ((= direction + xcb:ewmh:_NET_WM_MOVERESIZE_SIZE_KEYBOARD) + ;; FIXME + ) + ((= direction + xcb:ewmh:_NET_WM_MOVERESIZE_MOVE_KEYBOARD) + ;; FIXME + ) + ((= direction xcb:ewmh:_NET_WM_MOVERESIZE_CANCEL) + (exwm-floating--stop-moveresize)) + ;; In case it's a workspace frame. + ((and (not buffer) + (catch 'break + (dolist (f exwm-workspace--list) + (when (or (eq id (frame-parameter f 'exwm-outer-id)) + (eq id (frame-parameter f 'exwm-id))) + (throw 'break t))) + nil))) + (t + ;; In case it's a floating frame, + ;; move the corresponding X window instead. + (unless buffer + (catch 'break + (dolist (pair exwm--id-buffer-alist) + (with-current-buffer (cdr pair) + (when + (and exwm--floating-frame + (or (eq id + (frame-parameter exwm--floating-frame + 'exwm-outer-id)) + (eq id + (frame-parameter exwm--floating-frame + 'exwm-id)))) + (setq id exwm--id) + (throw 'break nil)))))) + ;; Start to move it. + (exwm-floating--start-moveresize id direction)))))) + ;; _NET_REQUEST_FRAME_EXTENTS + ((= type xcb:Atom:_NET_REQUEST_FRAME_EXTENTS) + (let ((buffer (exwm--id->buffer id)) + top btm) + (if (or (not buffer) + (not (buffer-local-value 'exwm--floating-frame buffer))) + (setq top 0 + btm 0) + (setq top (window-header-line-height) + btm (window-mode-line-height))) + (xcb:+request exwm--connection + (make-instance 'xcb:ewmh:set-_NET_FRAME_EXTENTS + :window id + :left 0 + :right 0 + :top top + :bottom btm))) + (xcb:flush exwm--connection)) + ;; _NET_WM_DESKTOP. + ((= type xcb:Atom:_NET_WM_DESKTOP) + (let ((buffer (exwm--id->buffer id))) + (when (buffer-live-p buffer) + (exwm-workspace-move-window (elt data 0) id)))) + ;; _NET_WM_STATE + ((= type xcb:Atom:_NET_WM_STATE) + (let ((action (elt data 0)) + (props (list (elt data 1) (elt data 2))) + (buffer (exwm--id->buffer id)) + props-new) + ;; only support _NET_WM_STATE_FULLSCREEN / _NET_WM_STATE_ADD for frames + (when (and (not buffer) + (memq xcb:Atom:_NET_WM_STATE_FULLSCREEN props) + (= action xcb:ewmh:_NET_WM_STATE_ADD)) + (xcb:+request + exwm--connection + (make-instance 'xcb:ewmh:set-_NET_WM_STATE + :window id + :data (vector xcb:Atom:_NET_WM_STATE_FULLSCREEN))) + (xcb:flush exwm--connection)) + (when buffer ;ensure it's managed + (with-current-buffer buffer + ;; _NET_WM_STATE_FULLSCREEN + (when (or (memq xcb:Atom:_NET_WM_STATE_FULLSCREEN props) + (memq xcb:Atom:_NET_WM_STATE_ABOVE props)) + (cond ((= action xcb:ewmh:_NET_WM_STATE_ADD) + (unless (exwm-layout--fullscreen-p) + (exwm-layout-set-fullscreen id)) + (push xcb:Atom:_NET_WM_STATE_FULLSCREEN props-new)) + ((= action xcb:ewmh:_NET_WM_STATE_REMOVE) + (when (exwm-layout--fullscreen-p) + (exwm-layout-unset-fullscreen id))) + ((= action xcb:ewmh:_NET_WM_STATE_TOGGLE) + (if (exwm-layout--fullscreen-p) + (exwm-layout-unset-fullscreen id) + (exwm-layout-set-fullscreen id) + (push xcb:Atom:_NET_WM_STATE_FULLSCREEN props-new))))) + ;; _NET_WM_STATE_DEMANDS_ATTENTION + ;; FIXME: check (may require other properties set) + (when (memq xcb:Atom:_NET_WM_STATE_DEMANDS_ATTENTION props) + (when (= action xcb:ewmh:_NET_WM_STATE_ADD) + (unless (eq exwm--frame exwm-workspace--current) + (set-frame-parameter exwm--frame 'exwm-urgency t) + (setq exwm-workspace--switch-history-outdated t))) + ;; xcb:ewmh:_NET_WM_STATE_REMOVE? + ;; xcb:ewmh:_NET_WM_STATE_TOGGLE? + ) + (xcb:+request exwm--connection + (make-instance 'xcb:ewmh:set-_NET_WM_STATE + :window id :data (vconcat props-new))) + (xcb:flush exwm--connection))))) + ((= type xcb:Atom:WM_PROTOCOLS) + (let ((type (elt data 0))) + (cond ((= type xcb:Atom:_NET_WM_PING) + (setq exwm-manage--ping-lock nil)) + (t (exwm--log "Unhandled WM_PROTOCOLS of type: %d" type))))) + ((= type xcb:Atom:WM_CHANGE_STATE) + (let ((buffer (exwm--id->buffer id))) + (when (and (buffer-live-p buffer) + (= (elt data 0) xcb:icccm:WM_STATE:IconicState)) + (with-current-buffer buffer + (if exwm--floating-frame + (call-interactively #'exwm-floating-hide) + (bury-buffer)))))) + (t + (exwm--log "Unhandled: %s(%d)" + (x-get-atom-name type exwm-workspace--current) type))))) + +(defun exwm--on-SelectionClear (data _synthetic) + "Handle SelectionClear events." + (exwm--log) + (let ((obj (make-instance 'xcb:SelectionClear)) + owner selection) + (xcb:unmarshal obj data) + (setq owner (slot-value obj 'owner) + selection (slot-value obj 'selection)) + (when (and (eq owner exwm--wmsn-window) + (eq selection xcb:Atom:WM_S0)) + (exwm-exit)))) + +(defun exwm--init-icccm-ewmh () + "Initialize ICCCM/EWMH support." + (exwm--log) + ;; Handle PropertyNotify event + (xcb:+event exwm--connection 'xcb:PropertyNotify #'exwm--on-PropertyNotify) + ;; Handle relevant client messages + (xcb:+event exwm--connection 'xcb:ClientMessage #'exwm--on-ClientMessage) + ;; Handle SelectionClear + (xcb:+event exwm--connection 'xcb:SelectionClear #'exwm--on-SelectionClear) + ;; Set _NET_SUPPORTED + (xcb:+request exwm--connection + (make-instance 'xcb:ewmh:set-_NET_SUPPORTED + :window exwm--root + :data (vector + ;; Root windows properties. + xcb:Atom:_NET_SUPPORTED + xcb:Atom:_NET_CLIENT_LIST + xcb:Atom:_NET_CLIENT_LIST_STACKING + xcb:Atom:_NET_NUMBER_OF_DESKTOPS + xcb:Atom:_NET_DESKTOP_GEOMETRY + xcb:Atom:_NET_DESKTOP_VIEWPORT + xcb:Atom:_NET_CURRENT_DESKTOP + ;; xcb:Atom:_NET_DESKTOP_NAMES + xcb:Atom:_NET_ACTIVE_WINDOW + ;; xcb:Atom:_NET_WORKAREA + xcb:Atom:_NET_SUPPORTING_WM_CHECK + ;; xcb:Atom:_NET_VIRTUAL_ROOTS + ;; xcb:Atom:_NET_DESKTOP_LAYOUT + ;; xcb:Atom:_NET_SHOWING_DESKTOP + + ;; Other root window messages. + xcb:Atom:_NET_CLOSE_WINDOW + ;; xcb:Atom:_NET_MOVERESIZE_WINDOW + xcb:Atom:_NET_WM_MOVERESIZE + ;; xcb:Atom:_NET_RESTACK_WINDOW + xcb:Atom:_NET_REQUEST_FRAME_EXTENTS + + ;; Application window properties. + xcb:Atom:_NET_WM_NAME + ;; xcb:Atom:_NET_WM_VISIBLE_NAME + ;; xcb:Atom:_NET_WM_ICON_NAME + ;; xcb:Atom:_NET_WM_VISIBLE_ICON_NAME + xcb:Atom:_NET_WM_DESKTOP + ;; + xcb:Atom:_NET_WM_WINDOW_TYPE + ;; xcb:Atom:_NET_WM_WINDOW_TYPE_DESKTOP + xcb:Atom:_NET_WM_WINDOW_TYPE_DOCK + xcb:Atom:_NET_WM_WINDOW_TYPE_TOOLBAR + xcb:Atom:_NET_WM_WINDOW_TYPE_MENU + xcb:Atom:_NET_WM_WINDOW_TYPE_UTILITY + xcb:Atom:_NET_WM_WINDOW_TYPE_SPLASH + xcb:Atom:_NET_WM_WINDOW_TYPE_DIALOG + xcb:Atom:_NET_WM_WINDOW_TYPE_DROPDOWN_MENU + xcb:Atom:_NET_WM_WINDOW_TYPE_POPUP_MENU + xcb:Atom:_NET_WM_WINDOW_TYPE_TOOLTIP + xcb:Atom:_NET_WM_WINDOW_TYPE_NOTIFICATION + xcb:Atom:_NET_WM_WINDOW_TYPE_COMBO + xcb:Atom:_NET_WM_WINDOW_TYPE_DND + xcb:Atom:_NET_WM_WINDOW_TYPE_NORMAL + ;; + xcb:Atom:_NET_WM_STATE + ;; xcb:Atom:_NET_WM_STATE_MODAL + ;; xcb:Atom:_NET_WM_STATE_STICKY + ;; xcb:Atom:_NET_WM_STATE_MAXIMIZED_VERT + ;; xcb:Atom:_NET_WM_STATE_MAXIMIZED_HORZ + ;; xcb:Atom:_NET_WM_STATE_SHADED + ;; xcb:Atom:_NET_WM_STATE_SKIP_TASKBAR + ;; xcb:Atom:_NET_WM_STATE_SKIP_PAGER + xcb:Atom:_NET_WM_STATE_HIDDEN + xcb:Atom:_NET_WM_STATE_FULLSCREEN + ;; xcb:Atom:_NET_WM_STATE_ABOVE + ;; xcb:Atom:_NET_WM_STATE_BELOW + xcb:Atom:_NET_WM_STATE_DEMANDS_ATTENTION + ;; xcb:Atom:_NET_WM_STATE_FOCUSED + ;; + xcb:Atom:_NET_WM_ALLOWED_ACTIONS + xcb:Atom:_NET_WM_ACTION_MOVE + xcb:Atom:_NET_WM_ACTION_RESIZE + xcb:Atom:_NET_WM_ACTION_MINIMIZE + ;; xcb:Atom:_NET_WM_ACTION_SHADE + ;; xcb:Atom:_NET_WM_ACTION_STICK + ;; xcb:Atom:_NET_WM_ACTION_MAXIMIZE_HORZ + ;; xcb:Atom:_NET_WM_ACTION_MAXIMIZE_VERT + xcb:Atom:_NET_WM_ACTION_FULLSCREEN + xcb:Atom:_NET_WM_ACTION_CHANGE_DESKTOP + xcb:Atom:_NET_WM_ACTION_CLOSE + ;; xcb:Atom:_NET_WM_ACTION_ABOVE + ;; xcb:Atom:_NET_WM_ACTION_BELOW + ;; + xcb:Atom:_NET_WM_STRUT + xcb:Atom:_NET_WM_STRUT_PARTIAL + ;; xcb:Atom:_NET_WM_ICON_GEOMETRY + ;; xcb:Atom:_NET_WM_ICON + xcb:Atom:_NET_WM_PID + ;; xcb:Atom:_NET_WM_HANDLED_ICONS + ;; xcb:Atom:_NET_WM_USER_TIME + ;; xcb:Atom:_NET_WM_USER_TIME_WINDOW + xcb:Atom:_NET_FRAME_EXTENTS + ;; xcb:Atom:_NET_WM_OPAQUE_REGION + ;; xcb:Atom:_NET_WM_BYPASS_COMPOSITOR + + ;; Window manager protocols. + xcb:Atom:_NET_WM_PING + ;; xcb:Atom:_NET_WM_SYNC_REQUEST + ;; xcb:Atom:_NET_WM_FULLSCREEN_MONITORS + + ;; Other properties. + xcb:Atom:_NET_WM_FULL_PLACEMENT))) + ;; Create a child window for setting _NET_SUPPORTING_WM_CHECK + (let ((new-id (xcb:generate-id exwm--connection))) + (setq exwm--guide-window new-id) + (xcb:+request exwm--connection + (make-instance 'xcb:CreateWindow + :depth 0 + :wid new-id + :parent exwm--root + :x -1 + :y -1 + :width 1 + :height 1 + :border-width 0 + :class xcb:WindowClass:InputOnly + :visual 0 + :value-mask xcb:CW:OverrideRedirect + :override-redirect 1)) + ;; Set _NET_WM_NAME. Must be set to the name of the window manager, as + ;; required by wm-spec. + (xcb:+request exwm--connection + (make-instance 'xcb:ewmh:set-_NET_WM_NAME + :window new-id :data "EXWM")) + (dolist (i (list exwm--root new-id)) + ;; Set _NET_SUPPORTING_WM_CHECK + (xcb:+request exwm--connection + (make-instance 'xcb:ewmh:set-_NET_SUPPORTING_WM_CHECK + :window i :data new-id)))) + ;; Set _NET_DESKTOP_VIEWPORT (we don't support large desktop). + (xcb:+request exwm--connection + (make-instance 'xcb:ewmh:set-_NET_DESKTOP_VIEWPORT + :window exwm--root + :data [0 0])) + (xcb:flush exwm--connection)) + +(defun exwm--wmsn-acquire (replace) + "Acquire the WM_Sn selection. + +REPLACE specifies what to do in case there already is a window +manager. If t, replace it, if nil, abort and ask the user if `ask'." + (exwm--log "%s" replace) + (with-slots (owner) + (xcb:+request-unchecked+reply exwm--connection + (make-instance 'xcb:GetSelectionOwner + :selection xcb:Atom:WM_S0)) + (when (/= owner xcb:Window:None) + (when (eq replace 'ask) + (setq replace (yes-or-no-p "Replace existing window manager? "))) + (when (not replace) + (user-error "Other window manager detected"))) + (let ((new-owner (xcb:generate-id exwm--connection))) + (xcb:+request exwm--connection + (make-instance 'xcb:CreateWindow + :depth 0 + :wid new-owner + :parent exwm--root + :x -1 + :y -1 + :width 1 + :height 1 + :border-width 0 + :class xcb:WindowClass:CopyFromParent + :visual 0 + :value-mask 0 + :override-redirect 0)) + (xcb:+request exwm--connection + (make-instance 'xcb:ewmh:set-_NET_WM_NAME + :window new-owner :data "EXWM: exwm--wmsn-window")) + (xcb:+request-checked+request-check exwm--connection + (make-instance 'xcb:SetSelectionOwner + :selection xcb:Atom:WM_S0 + :owner new-owner + :time xcb:Time:CurrentTime)) + (with-slots (owner) + (xcb:+request-unchecked+reply exwm--connection + (make-instance 'xcb:GetSelectionOwner + :selection xcb:Atom:WM_S0)) + (unless (eq owner new-owner) + (error "Could not acquire ownership of WM selection"))) + ;; Wait for the other window manager to terminate. + (when (/= owner xcb:Window:None) + (let (reply) + (cl-dotimes (i exwm--wmsn-acquire-timeout) + (setq reply (xcb:+request-unchecked+reply exwm--connection + (make-instance 'xcb:GetGeometry :drawable owner))) + (when (not reply) + (cl-return)) + (message "Waiting for other window manager to quit... %ds" i) + (sleep-for 1)) + (when reply + (error "Other window manager did not release selection in time")))) + ;; announce + (let* ((cmd (make-instance 'xcb:ClientMessageData + :data32 (vector xcb:Time:CurrentTime + xcb:Atom:WM_S0 + new-owner + 0 + 0))) + (cm (make-instance 'xcb:ClientMessage + :window exwm--root + :format 32 + :type xcb:Atom:MANAGER + :data cmd)) + (se (make-instance 'xcb:SendEvent + :propagate 0 + :destination exwm--root + :event-mask xcb:EventMask:NoEvent + :event (xcb:marshal cm exwm--connection)))) + (xcb:+request exwm--connection se)) + (setq exwm--wmsn-window new-owner)))) + +;;;###autoload +(cl-defun exwm-init (&optional frame) + "Initialize EXWM." + (interactive) + (exwm--log "%s" frame) + (if frame + ;; The frame might not be selected if it's created by emacslicnet. + (select-frame-set-input-focus frame) + (setq frame (selected-frame))) + (when (not (eq 'x (framep frame))) + (message "[EXWM] Not running under X environment") + (cl-return-from exwm-init)) + (when exwm--connection + (exwm--log "EXWM already running") + (cl-return-from exwm-init)) + (condition-case err + (progn + (exwm-enable 'undo) ;never initialize again + (setq exwm--connection (xcb:connect)) + (set-process-query-on-exit-flag (slot-value exwm--connection 'process) + nil) ;prevent query message on exit + (setq exwm--root + (slot-value (car (slot-value + (xcb:get-setup exwm--connection) 'roots)) + 'root)) + ;; Initialize ICCCM/EWMH support + (xcb:icccm:init exwm--connection t) + (xcb:ewmh:init exwm--connection t) + ;; Try to register window manager selection. + (exwm--wmsn-acquire exwm-replace) + (when (xcb:+request-checked+request-check exwm--connection + (make-instance 'xcb:ChangeWindowAttributes + :window exwm--root + :value-mask xcb:CW:EventMask + :event-mask + xcb:EventMask:SubstructureRedirect)) + (error "Other window manager is running")) + ;; Disable some features not working well with EXWM + (setq use-dialog-box nil + confirm-kill-emacs #'exwm--confirm-kill-emacs) + (exwm--lock) + (exwm--init-icccm-ewmh) + (exwm-layout--init) + (exwm-floating--init) + (exwm-manage--init) + (exwm-workspace--init) + (exwm-input--init) + (exwm--unlock) + (exwm-workspace--post-init) + (exwm-input--post-init) + (run-hooks 'exwm-init-hook) + ;; Manage existing windows + (exwm-manage--scan)) + (user-error) + ((quit error) + (exwm-exit) + ;; Rethrow error + (warn "[EXWM] EXWM fails to start (%s: %s)" (car err) (cdr err))))) + + +;;;###autoload +(defun exwm-exit () + "Exit EXWM." + (interactive) + (exwm--log) + (run-hooks 'exwm-exit-hook) + (setq confirm-kill-emacs nil) + ;; Exit modules. + (exwm-input--exit) + (exwm-manage--exit) + (exwm-workspace--exit) + (exwm-floating--exit) + (exwm-layout--exit) + (when exwm--connection + (xcb:flush exwm--connection) + (xcb:disconnect exwm--connection)) + (setq exwm--connection nil)) + +;;;###autoload +(defun exwm-enable (&optional undo) + "Enable/Disable EXWM." + (exwm--log "%s" undo) + (pcase undo + (`undo ;prevent reinitialization + (remove-hook 'window-setup-hook #'exwm-init) + (remove-hook 'after-make-frame-functions #'exwm-init)) + (`undo-all ;attempt to revert everything + (remove-hook 'window-setup-hook #'exwm-init) + (remove-hook 'after-make-frame-functions #'exwm-init) + (remove-hook 'kill-emacs-hook #'exwm--server-stop) + (dolist (i exwm-blocking-subrs) + (advice-remove i #'exwm--server-eval-at))) + (_ ;enable EXWM + (setq frame-resize-pixelwise t ;mandatory; before init + window-resize-pixelwise t) + ;; Ignore unrecognized command line arguments. This can be helpful + ;; when EXWM is launched by some session manager. + (push #'vector command-line-functions) + ;; In case EXWM is to be started from a graphical Emacs instance. + (add-hook 'window-setup-hook #'exwm-init t) + ;; In case EXWM is to be started with emacsclient. + (add-hook 'after-make-frame-functions #'exwm-init t) + ;; Manage the subordinate Emacs server. + (add-hook 'kill-emacs-hook #'exwm--server-stop) + (dolist (i exwm-blocking-subrs) + (advice-add i :around #'exwm--server-eval-at))))) + +(defun exwm--server-stop () + "Stop the subordinate Emacs server." + (exwm--log) + (server-force-delete exwm--server-name) + (when exwm--server-process + (delete-process exwm--server-process) + (setq exwm--server-process nil))) + +(defun exwm--server-eval-at (&rest args) + "Wrapper of `server-eval-at' used to advice subrs." + ;; Start the subordinate Emacs server if it's not alive + (exwm--log "%s" args) + (unless (server-running-p exwm--server-name) + (when exwm--server-process (delete-process exwm--server-process)) + (setq exwm--server-process + (start-process exwm--server-name + nil + (car command-line-args) ;The executable file + "-d" (frame-parameter nil 'display) + "-Q" + (concat "--daemon=" exwm--server-name) + "--eval" + ;; Create an invisible frame + "(make-frame '((window-system . x) (visibility)))")) + (while (not (server-running-p exwm--server-name)) + (sit-for 0.001))) + (server-eval-at + exwm--server-name + `(progn (select-frame (car (frame-list))) + (let ((result ,(nconc (list (make-symbol (subr-name (car args)))) + (cdr args)))) + (pcase (type-of result) + ;; Return the name of a buffer + (`buffer (buffer-name result)) + ;; We blindly convert all font objects to their XLFD names. This + ;; might cause problems of course, but it still has a chance to + ;; work (whereas directly passing font objects would merely + ;; raise errors). + ((or `font-entity `font-object `font-spec) + (font-xlfd-name result)) + ;; Passing following types makes little sense + ((or `compiled-function `finalizer `frame `hash-table `marker + `overlay `process `window `window-configuration)) + ;; Passing the name of a subr + (`subr (make-symbol (subr-name result))) + ;; For other types, return the value as-is. + (t result)))))) + +(defun exwm--confirm-kill-emacs (prompt &optional force) + "Confirm before exiting Emacs." + (exwm--log) + (when (cond + ((and force (not (eq force 'no-check))) + ;; Force killing Emacs. + t) + ((or (eq force 'no-check) (not exwm--id-buffer-alist)) + ;; Check if there's any unsaved file. + (pcase (catch 'break + (let ((kill-emacs-query-functions + (append kill-emacs-query-functions + (list (lambda () + (throw 'break 'break)))))) + (save-buffers-kill-emacs))) + (`break (y-or-n-p prompt)) + (x x))) + (t + (yes-or-no-p (format "[EXWM] %d window(s) will be destroyed. %s" + (length exwm--id-buffer-alist) prompt)))) + ;; Run `kill-emacs-hook' (`server-force-stop' excluded) before Emacs + ;; frames are unmapped so that errors (if any) can be visible. + (if (memq #'server-force-stop kill-emacs-hook) + (progn + (setq kill-emacs-hook (delq #'server-force-stop kill-emacs-hook)) + (run-hooks 'kill-emacs-hook) + (setq kill-emacs-hook (list #'server-force-stop))) + (run-hooks 'kill-emacs-hook) + (setq kill-emacs-hook nil)) + ;; Exit each module, destroying all resources created by this connection. + (exwm-exit) + ;; Set the return value. + t)) + + + +(provide 'exwm) + +;;; exwm.el ends here diff --git a/elpa/exwm-0.24/exwm.elc b/elpa/exwm-0.24/exwm.elc new file mode 100644 index 0000000..86cfe54 Binary files /dev/null and b/elpa/exwm-0.24/exwm.elc differ diff --git a/elpa/exwm-0.24/xinitrc b/elpa/exwm-0.24/xinitrc new file mode 100644 index 0000000..591e419 --- /dev/null +++ b/elpa/exwm-0.24/xinitrc @@ -0,0 +1,20 @@ +# Disable access control for the current user. +xhost +SI:localuser:$USER + +# Make Java applications aware this is a non-reparenting window manager. +export _JAVA_AWT_WM_NONREPARENTING=1 + +# Set default cursor. +xsetroot -cursor_name left_ptr + +# Set keyboard repeat rate. +xset r rate 200 60 + +# Uncomment the following block to use the exwm-xim module. +#export XMODIFIERS=@im=exwm-xim +#export GTK_IM_MODULE=xim +#export QT_IM_MODULE=xim +#export CLUTTER_IM_MODULE=xim + +# Finally start Emacs +exec emacs diff --git a/elpa/org-inline-pdf-20210119.529/org-inline-pdf-autoloads.el b/elpa/org-inline-pdf-20210119.529/org-inline-pdf-autoloads.el new file mode 100644 index 0000000..7073883 --- /dev/null +++ b/elpa/org-inline-pdf-20210119.529/org-inline-pdf-autoloads.el @@ -0,0 +1,39 @@ +;;; org-inline-pdf-autoloads.el --- automatically extracted autoloads -*- lexical-binding: t -*- +;; +;;; Code: + +(add-to-list 'load-path (directory-file-name + (or (file-name-directory #$) (car load-path)))) + + +;;;### (autoloads nil "org-inline-pdf" "org-inline-pdf.el" (0 0 0 +;;;;;; 0)) +;;; Generated autoloads from org-inline-pdf.el + +(autoload 'org-inline-pdf-mode "org-inline-pdf" "\ +Toggle inline previewing of PDF images in Org buffer. + +If called interactively, toggle `Org-Inline-Pdf mode'. If the +prefix argument is positive, enable the mode, and if it is zero +or negative, disable the mode. + +If called from Lisp, toggle the mode if ARG is `toggle'. Enable +the mode if ARG is nil, omitted, or is a positive number. +Disable the mode if ARG is a negative number. + +The mode's hook is called both when the mode is enabled and when +it is disabled. + +\(fn &optional ARG)" t nil) + +(register-definition-prefixes "org-inline-pdf" '("org-inline-pdf-")) + +;;;*** + +;; Local Variables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; coding: utf-8 +;; End: +;;; org-inline-pdf-autoloads.el ends here diff --git a/elpa/org-inline-pdf-20210119.529/org-inline-pdf-pkg.el b/elpa/org-inline-pdf-20210119.529/org-inline-pdf-pkg.el new file mode 100644 index 0000000..a781003 --- /dev/null +++ b/elpa/org-inline-pdf-20210119.529/org-inline-pdf-pkg.el @@ -0,0 +1,2 @@ +;;; Generated package description from org-inline-pdf.el -*- no-byte-compile: t -*- +(define-package "org-inline-pdf" "20210119.529" "Inline PDF previewing for Org" '((emacs "25.1") (org "9.4")) :commit "f9a3321712626d2f43a8849203ceb089cf8233b1" :authors '(("Shigeaki Nishina")) :maintainer '("Shigeaki Nishina") :keywords '("org" "outlines" "hypermedia") :url "https://github.com/shg/org-inline-pdf.el") diff --git a/elpa/org-inline-pdf-20210119.529/org-inline-pdf.el b/elpa/org-inline-pdf-20210119.529/org-inline-pdf.el new file mode 100644 index 0000000..082e41a --- /dev/null +++ b/elpa/org-inline-pdf-20210119.529/org-inline-pdf.el @@ -0,0 +1,111 @@ +;;; org-inline-pdf.el --- Inline PDF previewing for Org -*- lexical-binding: t -*- + +;; Copyright (C) 2020 Shigeaki Nishina + +;; Author: Shigeaki Nishina +;; Maintainer: Shigeaki Nishina +;; Created: November 30, 2020 +;; URL: https://github.com/shg/org-inline-pdf.el +;; Package-Version: 20210119.529 +;; Package-Commit: f9a3321712626d2f43a8849203ceb089cf8233b1 +;; Package-Requires: ((emacs "25.1") (org "9.4")) +;; Version: 0.2b +;; Keywords: org, outlines, hypermedia + +;; This file is not part of GNU Emacs. + +;;; License: + +;; This program is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or (at +;; your option) any later version. +;; +;; This program is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see https://www.gnu.org/licenses/. + +;;; Commentary: + +;; Enable inline PDF preview in Org buffers. + +;;; Usage: + +;; You need to have pdf2svg command installed in exec-path. +;; +;; pdf2svg: https://cityinthesky.co.uk/opensource/pdf2svg/ +;; +;; Download org-inline-pdf.el and install it using package.el. +;; +;; (package-install-file "/path-to-download-dir/org-inline-pdf.el") +;; +;; Enable this feature in an Org buffer with M-x org-inline-pdf-mode. +;; Add the following line in your init file to automatically enable +;; the feature in newly opened Org buffers. +;; +;; (add-hook 'org-mode-hook #'org-inline-pdf-mode) +;; +;; Links to PDF files in Org buffers are now displayed inline. +;; +;; Also, when the file is exported to HTML using ox-html, PDF will be +;; embedded using img tag. Note that PDF with img tag is not standard +;; and will be rendered only in particular browsers. Safari.app is +;; only the one I know. +;; +;;; Code: + +(require 'org) +(require 'ox-html) + +(defvar org-inline-pdf-make-preview-program "pdf2svg") + +(defconst org-inline-pdf--org-html-image-extensions-for-file + ;; This list is taken from the definition of the variable + ;; org-html-inline-image-rules defined in ox-html.el and needs to be + ;; updated if the original code is changed. + '(".jpeg" ".jpg" ".png" ".gif" ".svg")) + +(defun org-inline-pdf--make-preview-for-pdf (original-org--create-inline-image &rest arguments) + "Make a SVG preview when the inline image is a PDF. +This function is to be used as an `around' advice to +`org--create-inline-image'. The original function is passed in +ORIGINAL-ORG--CREATE-INLINE-IMAGE and arguments in ARGUMENTS." + (let ((file (car arguments))) + (apply original-org--create-inline-image + (cons + (if (member (file-name-extension file) '("pdf" "PDF")) + (let ((svg (org-babel-temp-file "org-inline-pdf-"))) + (call-process org-inline-pdf-make-preview-program nil nil nil file svg) + svg) + file) + (cdr arguments))))) + +;;;###autoload +(define-minor-mode org-inline-pdf-mode + "Toggle inline previewing of PDF images in Org buffer." + nil "" nil + (cond + (org-inline-pdf-mode + (if (called-interactively-p 'interactive) + (message "org-inline-pdf-mode enabled")) + (add-to-list 'image-file-name-extensions "pdf") + (advice-add 'org--create-inline-image :around #'org-inline-pdf--make-preview-for-pdf) + (setf (alist-get "file" org-html-inline-image-rules nil t 'string=) + (regexp-opt (cons "pdf" org-inline-pdf--org-html-image-extensions-for-file)))) + (t + (if (called-interactively-p 'interactive) + (message "org-inline-pdf-mode disabled")) + (setq image-file-name-extensions (delete "pdf" image-file-name-extensions)) + (advice-remove 'org--create-inline-image #'org-inline-pdf--make-preview-for-pdf) + (setf (alist-get "file" org-html-inline-image-rules nil t 'string=) + (regexp-opt org-inline-pdf--org-html-image-extensions-for-file)) + (org-remove-inline-images))) + (org-display-inline-images)) + +(provide 'org-inline-pdf) + +;;; org-inline-pdf.el ends here diff --git a/elpa/org-inline-pdf-20210119.529/org-inline-pdf.elc b/elpa/org-inline-pdf-20210119.529/org-inline-pdf.elc new file mode 100644 index 0000000..06c4cea Binary files /dev/null and b/elpa/org-inline-pdf-20210119.529/org-inline-pdf.elc differ diff --git a/elpa/xelb-0.18.signed b/elpa/xelb-0.18.signed new file mode 100644 index 0000000..8b33a1d --- /dev/null +++ b/elpa/xelb-0.18.signed @@ -0,0 +1 @@ +Good signature from 066DAFCB81E42C40 GNU ELPA Signing Agent (2019) (trust undefined) created at 2019-09-21T22:56:47+0500 using RSA \ No newline at end of file diff --git a/elpa/xelb-0.18/.elpaignore b/elpa/xelb-0.18/.elpaignore new file mode 100644 index 0000000..b43bf86 --- /dev/null +++ b/elpa/xelb-0.18/.elpaignore @@ -0,0 +1 @@ +README.md diff --git a/elpa/xelb-0.18/.gitignore b/elpa/xelb-0.18/.gitignore new file mode 100644 index 0000000..9e4b0ee --- /dev/null +++ b/elpa/xelb-0.18/.gitignore @@ -0,0 +1,3 @@ +*.elc +*-pkg.el +*-autoloads.el diff --git a/elpa/xelb-0.18/ChangeLog b/elpa/xelb-0.18/ChangeLog new file mode 100644 index 0000000..4c8ed44 --- /dev/null +++ b/elpa/xelb-0.18/ChangeLog @@ -0,0 +1,1212 @@ +2019-02-05 Chris Feng + + Bump version to 0.17 + +2019-02-05 Chris Feng + + Update copyright year to 2019 + +2018-12-28 adisbladis + + Fix startup using non-posix shells + + * xcb.el (xcb:create-auth-info): Use lisp for string substitution + instead of shell + +2018-10-14 Chris Feng + + Bump version to 0.16 + +2018-09-23 Chris Feng + + Eliminate a compile warning with `xcb:deftypealias' + + * xcb-types.el (xcb:deftypealias): Use variable property instead of + `defvaralias'/`indirect-variable' to store the fundamental type. + +2018-09-16 Stefan Monnier + + Simplify debugging and fix dynamic-scoping `eval' + + * xcb-types.el (xcb:debug): New global minor mode to replace + `xcb:debug-on' and `xcb:debug-toggle'. + (xcb:-log): Use it. + + * xcb-types.el (xcb:deftypealias): Use lexical-scoping `eval'. + +2018-09-09 Chris Feng + + ; Minor fixes for Calvo's patch set. + +2018-09-04 Adrián Medraño Calvo + + Command for toggling debugging output + + * xcb-types.el (xcb:-debug-toggle): New function for toggling debugging + output. + +2018-09-04 Adrián Medraño Calvo + + Print backtrace upon event listener errors + + * xcb.el (xcb:-process-events): Output backtrace of erroring event + listeners when `xcb:debug-on' is enabled. + +2018-09-04 Adrián Medraño Calvo + + * xcb.el (xcb:-cache-request): Avoid logging large objects + +2018-09-04 Adrián Medraño Calvo + + * xcb-types.el (slot-unbound): Correct mistyped message + +2018-09-04 Adrián Medraño Calvo + + Print log output to an XELB-specific messages buffer + + Using `message' to log debugging information is cumbersome, as the + output appears constantly in the minibuffer, obscuring prompts and other + information. In the case of long messages, it might resize the + minibuffer, which causes EXWM to perform additional actions due to the + log output. + + This change reimplements XELB debug logging using a separate buffer + (*XELB-DEBUG*). Basic functionality, like scrolling when point is at + the end of the buffer is maintained. + + * xcb-types.el (exwm--log): Use `xcb-debug-message' instead of + `message'. Prefix all messages with the name of the function. Make + FORMAT-STRING argument optional. Support toggling debug output at + runtime. + + * xcb-debug.el: New file. + (xcb-debug-buffer): New variable holding the buffer where debug messages + are output to. + (xcb-debug-message): New function printing a message to + `xcb-debug-buffer'. + (xcb-debug-backtrace): New function printing a backtrace. + (xcb-debug-backtrace-on-error): New function printing a backtrace upon + error. + (xcb-debug--clear, xcb-debug--mark): New functions. + +2018-09-02 Chris Feng + + Revisit event cache timely + + ; Previously events are only sent to listeners in + ; `xcb:-connection-filter'. But with `event-lock' this process can be + ; skipped when `event-lock' is hold elsewhere. With such non-blocking + ; lock this process should get rechecked whenever `event-lock' is + ; released. + + * xcb.el (xcb:-process-events): New method for processing cached events. + (xcb:-connection-filter, xcb:flush, xcb:-+reply, xcb:aux:sync): Use it. + +2018-08-19 Chris Feng + + Eliminate compile warnings + +2018-07-18 Chris Feng + + Bump version to 0.15 + +2018-06-18 Chris Feng + + Fix `xcb:unmarshal' for + + * el_client.el (xelb-parse-list): Place list placeholder after the real + one so that to be correctly referred by . + (xelb-parse-switch): Never flatten the condition list for . + + * xcb-types.el (xcb:unmarshal of xcb:-struct): Stop after processing + . + + * xcb-types.el (xcb:--struct): New common super class for all classes in + XELB. Currently it's used to override `slot-unbound'. + (xcb:-struct): + * xcb-ewmh.el (xcb:ewmh:-_NET_DESKTOP_GEOMETRY) + (xcb:ewmh:-_NET_DESKTOP_LAYOUT, xcb:ewmh:-_NET_WM_STRUT) + (xcb:ewmh:-_NET_WM_STRUT_PARTIAL, xcb:ewmh:-_NET_WM_ICON_GEOMETRY) + (xcb:ewmh:-_NET_FRAME_EXTENTS, xcb:ewmh:-_NET_WM_SYNC_REQUEST_COUNTER) + (xcb:ewmh:-_NET_WM_FULLSCREEN_MONITORS): + * xcb-icccm.el (xcb:icccm:--ClientMessage, xcb:icccm:-WM_SIZE_HINTS) + (xcb:icccm:-WM_HINTS, xcb:icccm:-WM_STATE, xcb:icccm:-WM_ICON_SIZE): + * xcb-keysyms.el (xcb:keysyms:-device): + * xcb.el (xcb:connection, xcb:auth-info): Use it. + +2018-06-18 Chris Feng + + Add support for and drop implicit padding + + * el_client.el (xelb-parse-required_start_align): New function for + parsing . + (xelb-parse-structure-content): Use it. + (xelb-parse-list): Drop implicit padding after . + + * xcb-types.el (xcb:-marshal-field, xcb:unmarshal, + xcb:-unmarshal-field): Make adaptions for . + +2018-06-12 Chris Feng + + Fix handling of generic events + + * xcb.el (xcb:-connection-filter): Correct wrong generic event length. + (xcb:-error-or-event-class->number): Correct wrong conversion of generic + event codes. + +2018-05-20 Chris Feng + + Sync with upstream protocol + +2018-04-15 Paul Eggert + + Port to 32-bit Emacs master + + Rewrite #xFFFFFFFF to 4294967295. and similarly for other hex constants + intended to be floating-point on 32-bit Emacs. + * el_client.el (xelb-parse-enum): Omit enums that do not fit in 32-bit + Emacs. + * xcb-xinput.el (xcb:xinput:ModifierMask:Any): + * xcb-xkb.el (xcb:xkb:Control:IgnoreLockMods) + (xcb:xkb:Control:PerKeyRepeat, xcb:xkb:Control:ControlsEnabled): Remove. + +2018-04-08 Chris Feng + + Temporarily disable update on every NewKeyboardNotify event + + * xcb-keysyms.el (xcb:keysyms:-on-NewKeyboardNotify): Only handle the + first NewKeyboardNotify event (as a result of selecting that event). + XELB is currently not efficient enough to handle every such event. + +2018-04-01 Chris Feng + + Do not block NewKeyboardNotify events concerned with SetMap requests + + * xcb-keysyms.el (xcb:keysyms:-on-NewKeyboardNotify): NewKeyboardNotify + events related to SetMap requests should be processed or keycodes can be + out-of-date. + +2018-03-14 Chris Feng + + Bump version to 0.14 + +2018-03-08 medranocalvo + + Support WM_Sn atoms (#19) + + * xcb-icccm.el (xcb:icccm:-atom, xcb:icccm:init): Register WM_Sn atoms + for each screen. + +2018-03-04 Chris Feng + + Ensure KeyTypes are initialized + + * xcb-keysyms.el (xcb:keysyms:-update-keytypes): Ditto. + +2018-03-03 Chris Feng + + Rename `xcb:-fd' to `xcb:fd' and sync with upstream protocol + +2018-02-24 Chris Feng + + Bump version to 0.13 + +2018-01-14 Chris Feng + + Do not convert events with unsupported modifiers + + * xcb-keysyms.el (xcb:keysyms:event->keysym): Reset the keysym when + failing to convert the modifiers. + +2018-01-14 Chris Feng + + Support symbol representations of ASCII in key events + + * xcb-keysyms.el (xcb:keysyms:event->keysym): Support converting events + with ASCII as symbols (e.g. treating 'C-a as an alternative form of + ?\C-a). + +2018-01-14 Chris Feng + + Update copyright year to 2018 + +2017-12-10 Chris Feng + + Add support for fast switching between multiple keyboards + + * xcb-keysyms.el (xcb:keysyms:-device): New class containing the + properties of a keyboard. + (xcb:keysyms:-get-current-device): New method for retrieving the current + keyboard object. + (xcb:keysyms:-on-NewKeyboardNotify, xcb:keysyms:-on-MapNotify): Cache + the properties of all keyboards. + + * xcb.el (xcb:-get-extra-plist, xcb:-set-extra-plist): New methods for + getting/setting module-specific properties. + * xcb-keysyms.el (xcb:keysyms:init, xcb:keysyms:-set-per-client-flags) + (xcb:keysyms:-on-NewKeyboardNotify, xcb:keysyms:-on-MapNotify) + (xcb:keysyms:-update-keytypes, xcb:keysyms:-update-keycodes) + (xcb:keysyms:keycode->keysym, xcb:keysyms:keysym->keycode): Use them. + +2017-11-26 Chris Feng + + Add support for callback function for keyboard update + + * xcb-keysyms.el (xcb:keysyms:init): Now accept an optional argument as + a callback function for keyboard update. + (xcb:keysyms:-on-NewKeyboardNotify, xcb:keysyms:-on-MapNotify): Call the + callback function after updating the keyboard. + + * xcb-keysyms.el (xcb:keysyms:-on-NewKeyboardNotify): Filter out + keyboard change events not intended for the current active one. + +2017-11-26 Chris Feng + + Make connection-specific variables private + + * xcb-keysyms.el (xcb:keysyms:-opcode, xcb:keysyms:-device) + (xcb:keysyms:-keytypes, xcb:keysyms:-keycodes) + (xcb:keysyms:-min-keycode, xcb:keysyms:-max-keycode): Deleted. + (xcb:keysyms:init, xcb:keysyms:-on-NewKeyboardNotify) + (xcb:keysyms:-on-MapNotify, xcb:keysyms:-on-MapNotify) + (xcb:keysyms:-update-keytypes, xcb:keysyms:-update-keycodes) + (xcb:keysyms:keycode->keysym, xcb:keysyms:keysym->keycode): Use the + connection object's 'extra-plist' slot for storing and retrieving + connection-specific variables. + +2017-11-05 Chris Feng + + Add support for + + * el_client.el (xelb-parse-top-level-element, xelb-parse-eventstruct): + Add support for . + * xcb-xinput.el: Sync with upstream protocol. + +2017-02-05 Chris Feng + + Fix checkdoc warnings + +2017-02-05 Chris Feng + + Sync with upstream protocol + +2017-02-05 Chris Feng + + Update copyright year to 2017 + +2016-11-19 Chris Feng + + Bump version to 0.12 + +2016-11-13 Chris Feng + + Correct the detection of modifier keys + + * xcb-keysyms.el (xcb:keysyms:-update-modkeys): Detect modifier keys + with the core protocol request 'GetModifierMapping'; also detect + shift-lock and num-lock modifiers. + (xcb:keysyms:keysym->event): Use the detected shift-lock modifier. + +2016-09-25 Chris Feng + + Protect the event lock + + ; It's observed the event lock can occasionally fail to be decreased, + ; though the cause is unclear. + + * xcb.el (xcb:flush, xcb:-+reply, xcb:aux:sync): Protect the event lock. + +2016-09-23 Chris Feng + + Add missing slots for WM_SIZE_HINTS classes + + * xcb-icccm.el (xcb:icccm:get-WM_SIZE_HINTS) + (xcb:icccm:set-WM_SIZE_HINTS): Add the missing 'property' slot. + +2016-08-14 Chris Feng + + Bump version to 0.11 + +2016-08-12 Chris Feng + + Save a sequence number after the packet is saved + + * xcb.el (xcb:-convert-sequence): Do not save the sequence number here. + (xcb:-connection-filter): Save it here. + +2016-08-11 Chris Feng + + Split connection filter + + * xcb.el (xcb:-connection-filter, xcb:-connection-setup-filter): Split + out connection setup code from the former into the latter. + (xcb:-connect): Set process filter to `xcb:-connection-setup-filter'. + +2016-08-11 Chris Feng + + Fix sequence number wrapping issues + + * xcb.el (xcb:connection-timeout): Reduce timeout to 3. + (xcb:connection): Merge slots 'error-sequence' and 'reply-sequence' into + 'last-seen-sequence'. + (xcb:-sequence-cmp16): Removed. + + * xcb.el (xcb:-SEQUENCE-SEGMENT-MASK): New constant representing the + segment mask of a sequence number. + (xcb:-convert-sequence): New method for converting 16-bit sequence + number received from the server into that used in the client. + (xcb:-connection-filter): Use this method. + (xcb:-+request, xcb:-+request-checked, xcb:-+request-unchecked) + (xcb:-+reply, xcb:-request-check, xcb:aux:sync): Avoid using 16-bit + sequence number. + (xcb:-cache-request): Force wrapping sequence numbers. + (xcb:-+reqply, xcb:-request-check, xcb:aux:sync): Check sequence number + wrapping. + + * xcb.el (xcb:aux:sync): Discard any reply or error. + +2016-08-06 Chris Feng + + Fix XGE and XKB events support + + * el_client.el (xelb-xge-alist nil): New variable for recording X + generic events (XGE). + (xelb-parse): Output XGE list. + (xelb-parse-event, xelb-parse-eventcopy): Set XGE list. + * xcb-types.el (xcb:marshal for xcb:-event): Rewritten to take XGE and + XKB into consideration. + (xcb:-generic-event): New type representing XGE. + * xcb.el (xcb:-connection-filter, xcb:+event) + (xcb:-error-or-event-class->number): Fix XGE and XKB events support. + + * el_client.el (xelb-parse-request): Insert slots for sequence number + and reply length. + (xelb-parse-event, xelb-parse-eventcopy): Insert slots for sequence + number and event code. + (xelb-parse-error, xelb-parse-errorcopy): Insert slot for error code. + * xcb-types.el (xcb:-reply): Remove 'length' slot; add '~reply' slot. + (xcb:-event): Add '~code' slot. + (xcb:-error): Add '~error', '~code' and '~sequence' slots. + * xcb.el (xcb:-+reply): Do not manipulate the length. + (xcb:unmarshal for xcb:-reply, xcb:-event and xcb:-error): Removed. + + * el_client.el (xelb-node-type, xelb-parse-typedef) + (xelb-parse-eventcopy, xelb-parse-errorcopy, xelb-parse-enumref): Prefer + module-local names to global ones. + +2016-08-06 Chris Feng + + * xcb-renderutil.el (xcb:renderutil:find-format): Traverse the 'formats' + slot; return format ID. + +2016-08-06 Chris Feng + + * xcb-ewmh.el (xcb:ewmh:-atoms): List _NET_WM_CM_S0 by default. + +2016-07-31 Chris Feng + + Bump version to 0.10 + +2016-07-31 Chris Feng + + * xcb.el (xcb:disconnect): Check before disconnecting. + +2016-07-30 Chris Feng + + ; * xcb.el (xcb:disconnect): Flush before disconnection. + +2016-07-29 Chris Feng + + Support system-specific and legacy keysyms + + * xcb-keysyms.el (xcb:keysyms:event->keysym, xcb:keysyms:keysym->event): + Also search `system-key-alist' and `x-keysym-table' for system-specific + and legacy keysyms respectively. + +2016-07-29 Chris Feng + + Use numerical keysyms and mod-masks + + * xcb-keysyms.el (xcb:keysyms:event->keysym): Always return a cons cell + containing a numerical keysym and a mod-mask. + (xcb:keysyms:keysym->event): Adapt to use numerical mod-masks. + +2016-07-29 Chris Feng + + Set XKB per-client flags + + * xcb-keysyms.el (xcb:keysyms:-set-per-client-flags): New function for + setting XKB per-client flags (required for GrabKey and SendEvent). + (xcb:keysyms:init, xcb:keysyms:-on-NewKeyboardNotify): Use it. + +2016-07-29 Chris Feng + + Adapt 'xcb-keysyms' library to use XKB + + * xcb-keysyms.el: Remove a todo entry; load 'xcb-xkb'. + (xcb:keysyms:auto-update): Removed since no longer required. + (xcb:keysyms:num-lock-mask, xcb:keysyms:mode-switch-mask): Removed since + no longer used in conversion. + (xcb:keysyms:-opcode, xcb:keysyms:-device, xcb:keysyms:-keytypes) + (xcb:keysyms:-keycodes, xcb:keysyms:-modkeys, xcb:keysyms:-min-keycode) + (xcb:keysyms:-max-keycode): Shared internal local data. + (xcb:keysyms:init): Reworked to initialize XKB. + (xcb:keysyms:-on-NewKeyboardNotify): New event handler for XKB + NewKeyboardNotify evnet. + (xcb:keysyms:-on-MapNotify): New event handler for XKB MapNotify. + (xcb:keysyms:-update-keytypes): New method for updating XKB key types. + (xcb:keysyms:update-keyboard-mapping, xcb:keysyms:-update-keycodes): + Rename the former to the latter to update XKB keycodes-keysym mapping. + (xcb:keysyms:update-modifier-mapping, xcb:keysyms:-update-modkeys): + Rename the former to the latter to update XKB modifier keys. + (xcb:keysyms:keycode->keysym): Reworked to perform the conversion using + XKB rules; always return a cons cell with numerical elements. + (xcb:keysyms:keysym->keycode): Reworked to perform the conversion using + XKB keycodes; always return an integer. + (xcb:keysyms:event->keysym): Detect additional modifiers using the new + `xcb:keysyms:keycode->keysym'. + +2016-07-29 Chris Feng + + Fix extension event number + + * xcb.el (xcb:-connection-filter): Add the second byte to the extension + event number. + +2016-07-29 Chris Feng + + Eliminate compile warnings for Emacs 24 + + * el_client.el: Require eieio and xcb-types; do not use the forth + argument to `libxml-parse-xml-region'. + * xcb-types.el: Backport `cl--slot-descriptor-initform'. + +2016-07-29 Chris Feng + + Precompute the size of + + ; Rationale: Some unions in XKB are not aligned, which makes + ; marshaling/unmarshaling unions at runtime impossible. + + * el_client.el (xelb-node-size): New function for calculating node size. + (xelb-type-size): New function for calculation the size of a type. + (xelb-parse-union): Precompute the size of . + * xcb-types.el (xcb:-union): Add a '~size~ slot for storing the size. + (xcb:marshal for xcb:-union, xcb:unmarshal for xcb:-union): Marshal and + unmarshal using the precomputed size. + + * xcb-randr.el: + * xcb-xkb.el: + * xcb-xproto.el: Regenerated. + +2016-07-29 Chris Feng + + Fix issues with + + * el_client.el (xelb-parse): Evaluate just generated forms. + (xelb-parse-enumref): Return the enum value instead of symbol. + (xelb-parse-unop): Add a missing comma. + + * el_client.el (xelb-parse-switch): Aggressively simplify [bit]cases. + + * xcb-types.el (xcb:-marshal-field, xcb:-unmarshal-field): Adjust the + checks for switch conditions; skip `xcb:-ignore' type slots. + + * xcb-dri2.el: + * xcb-render.el: + * xcb-screensaver.el: + * xcb-sync.el: + * xcb-xf86vidmode.el: + * xcb-xinput.el: + * xcb-xkb.el: + * xcb-xproto.el: Regenerated. + +2016-07-29 Chris Feng + + Enable XKB module + + * .elpaignore: Unblock almost all files. + * el_client.el (xelb-excluded-replies<25): New constants storing replies + that should not be loaded on Emacs 24. + (xelb-parse-request): Prevent loading replies stored in + `xelb-excluded-replies<25' on Emacs 24. + * xcb-xkb.el: Regenerated. + +2016-07-25 Chris Feng + + Bump version to 0.9 + +2016-07-13 Chris Feng + + * xcb-icccm.el (xcb:icccm:-atoms): Add WM_CHANGE_STATE atom. + +2016-07-12 Chris Feng + + * xcb-ewmh.el (xcb:ewmh:-_NET_WM_STRUT_PARTIAL): Fix typos. + +2016-06-03 Chris Feng + + Sync with upstream protocol + +2016-05-25 Chris Feng + + Bump version to 0.8 + +2016-05-23 Chris Feng + + Add optional arguments to force refreshing atoms + + * xcb-ewmh.el (xcb:ewmh:init) + * xcb-icccm.el (xcb:icccm:init, xcb:icccm:intern-atoms): + * xcb-systemtray.el (xcb:systemtray:init): + * xcb-xembed.el (xcb:xembed:init): Add optional arguments to force + refreshing atoms. + +2016-05-21 Chris Feng + + Bump version to 0.7 + +2016-05-17 Chris Feng + + Improve performance of `xcb:create-auth-info' + + * xcb.el (xcb:create-auth-info): Improve performance. + +2016-05-17 Chris Feng + + Fix the parsing of X11 properties + + * xcb-icccm.el (xcb:icccm:-GetProperty~reply): Do not use the + 'bytes-after' field. + +2016-05-13 Chris Feng + + Implement basic authentication during connection setup + + * xcb.el (xcb:create-auth-info): Implement the MIT-MAGIC-COOKIE-1 + authentication protocol. + (xcb:connect): Try sockets as well; deprecate the '_screen' argument. + (xcb:display->socket): New function returns the socket path for an X11 + display name. + (xcb:connect-to-display-with-auth-info): Use `xcb:create-auth-info'; + deprecate the '_screen' argument. + (xcb:parse-display): Simplify regexps (don't know why they were written + that way). + (xcb:connect-to-socket): Use `xcb:display->socket' and + `xcb:create-auth-info'. + +2016-04-21 Chris Feng + + Add 'MANAGER' atom + + * xcb-icccm.el (xcb:icccm:-atoms): Add 'MANAGER' atom. + +2016-03-25 Chris Feng + + Avoid using the global value `x-display-name' + + * xcb.el (xcb:connect-to-display-with-auth-info, xcb:connect-to-socket): + Use the frame parameter 'display' instead of `x-display-name' since the + latter can be cleared by e.g. launching an emacsclient. + +2016-03-06 Chris Feng + + Detect implicit list length + + * el_client.el (xelb-request-fields): New variable holding fields in the + current request. + (xelb-parse-request): Set/Clear the variable accordingly. + (xelb-parse-fieldref): Detect implicit list length. + + * el_client.el (xelb-parse-request): Remove the extra argument. + (xelb-parse-exprfield): Remove the extra quote. + +2016-02-28 Chris Feng + + Add renderutil library + + * xcb-renderutil: New library adding utility functions for the Render + extension. + +2016-02-22 Chris Feng + + Bump version to 0.6 + +2016-02-19 Chris Feng + + Clear modifier bits for modifier key events + + * xcb-keysyms.el (xcb:keysyms:keysym->event): Clear modifier bits for + modifier keys. + +2016-02-19 Chris Feng + + Avoid loading cl-lib at runtime + +2016-02-19 Chris Feng + + Avoid duplicated initialization + + * xcb-ewmh.el, xcb-icccm.el, xcb-systemtray.el, xcb-xembed.el: Avoid + duplicated initialization. + +2016-02-19 Chris Feng + + Implement XEmbed and System Tray protocols + + * xcb-xembed.el: New module implementing the XEmbed protocol. + + * xcb-systemtray.el: New module implementing the System Tray protocol. + + * xcb-ewmh.el (xcb:ewmh:--ClientMessage): Removed. + + * xcb-icccm.el, xcb-ewmh.el: Fix comments. + +2016-02-12 Chris Feng + + Bump version to 0.5 + +2016-02-11 Chris Feng + + Fixes for compatibility and compilation issues + + * xcb-types.el: Backport the version of `with-slots' from Emacs 25 to + 24. + + * xcb-keysyms.el (xcb:keysyms:init): Remove error logs which break after + compilation. + + * el_client.el: Eliminate a compilation warning. + +2016-02-11 Chris Feng + + Data types related fixes + + * el_client.el (xelb-imports, xelb-parse-import): Save imported libs in + new variable `xelb-imports'. + (xelb-node-type, xelb-parse-field, xelb-parse-list, + xelb-parse-exprfield): Use new function `xelb-node-type' to search + defined types. + * xcb-composite.el: + * xcb-damage.el: + * xcb-glx.el: + * xcb-present.el: + * xcb-randr.el: + * xcb-xfixes.el: + * xcb-xinput.el: + * xcb-xv.el: + * xcb-xvmc.el: Data types corrected. + + * xcb-types.el: Add new 8 bytes data types `xcb:-u8' and `xcb:CARD64'. + Define `xcb:-fd' as an alias of `xcb:-i4'. + (xcb:-pack-u8, xcb:-pack-u8-lsb, xcb:-unpack-u8, xcb:-unpack-u8-lsb): + New functions for packing/unpacking 8 bytes data on 64/32-bit machines. + + * Makefile: Eliminate a warning. + +2016-02-10 Chris Feng + + Allow users to disable the keyboard mapping auto-update feature + + * xcb-keysyms.el (xcb:keysyms:auto-update, xcb:keysyms:init): Use new + variable `xcb:keysyms:auto-update' to control the keyboard mapping + auto-update feature. This feature does not work well with e.g. XTEST + extension and should be disabled sometimes. We need to switch to use + the Xkb extension (does not work with Emacs 24) to resolve the problem. + +2016-02-07 Chris Feng + + Handle MappingNotfiy event + + * xcb-keysyms.el (xcb:keysyms:init): Update keyboard/modifier mapping on + MappingNotfiy event. + +2016-01-06 Chris Feng + + Update copyright year to 2016 + +2016-01-06 Chris Feng + + Sync with upstream protocol + + * el_client.el (xelb-parse-structure-content, xelb-parse-switch): Ignore + node (used for alignment checking purpose + only). + + * xcb-xkb.el: Add various explicit paddings. + +2015-12-13 Chris Feng + + Improve the handling of modifier keys + + * xcb-keysyms.el (xcb:keysyms:update-modifier-mapping): Find modifiers + according to x_find_modifier_meanings in xterm.c. + + (xcb:keysyms:event->keysym, xcb:keysyms:keysym->event): Take + x-alt-keysym, x-meta-keysym, x-hyper-keysym and x-super-keysym into + account when doing X KEYSYM <-> Emacs event translation. + +2015-12-13 Chris Feng + + Escape an open-parenthesis + +2015-11-09 Chris Feng + + Bump version to 0.4 + +2015-11-08 Chris Feng + + Fix a mouse event to KEYSYM translation issue + + * xcb-keysyms.el (xcb:keysyms:event->keysym): Prevent adding implicit + shift + modifier for mouse events. + +2015-11-06 Chris Feng + + Minor fix for the sequence number comparison function + + * xcb.el (xcb:-sequence-cmp16): Return the difference of sequence + numbers + instead. + +2015-11-05 Chris Feng + + Fix the reply/error sequence number overflow issue + + * xcb.el (xcb:-+reply, xcb:-request-check, xcb:aux:sync): The sequence + number of a reply/error is always 16 bits (taken as the least + significant word of the sequence number of the corresponding request). + + * xcb.el (xcb:-sequence-cmp16): New function for comparing 16-bit + sequence + numbers. + (xcb:+request-unchecked, xcb:-request-check, xcb:aux:sync): Compare + sequence numbers using xcb:-sequence-cmp16. + +2015-11-01 Chris Feng + + Bump version to 0.3 + +2015-10-31 Chris Feng + + Fix a typo and silence a compilation warning + +2015-10-30 Chris Feng + + Add necessary shift mask for event to KEYSYM conversion + + * xcb-keysyms.el (xcb:keysyms:event->keysym): Add necessary shift mask + (required by characters like '!@#' on US keyboard). + (xcb:keysyms:event->keysym, xcb:keysyms:keysym->event): Turned into + methods of xcb:connection. + (xcb:keysyms:update-modifier-mapping): Use new calling conventions. + +2015-10-28 Chris Feng + + Handle missing modifier keys when converting event to keysym + + * xcb-keysyms.el (xcb:keysyms:event->keysym): Return nil when any + modifier + key in the event is not present. + +2015-10-28 Chris Feng + + Sync with upstream protocol + + ; Add explicit paddings. + +2015-10-27 Chris Feng + + Handle nonlocal exits when calling event handlers + + * xcb.el (xcb:-connection-filter): Do cleanups from nonlocal exits. + +2015-10-26 Chris Feng + + Fix shift key issues + + * xcb-keysyms.el (xcb:keysyms:keycode->keysym): Restrict case + conversions + to Latin-1 KEYSYMs/characters. + + * xcb-keysyms.el (xcb:keysyms:keysym->keycode): Allow shift modifier for + KEYSYMs/characters not in Latin-1 (e.g. function keys). + +2015-10-25 Chris Feng + + Ignore errors from event handlers + + * xcb.el (xcb:-connection-filter): Ignore errors from event handlers to + prevent them from freezing XELB. + +2015-09-27 Chris Feng + + Minor fixes + + * el_client.el: + * xcb-keysyms.el: + Use the new syntax for number comparison + + * xcb-types.el: + Fix use of eval-when-compile / eval-and-compile. + +2015-09-26 Chris Feng + + Bump version to 0.2 + +2015-09-26 Chris Feng + + Fix packaging issues; add support for ISO function keys + + * .elpaignore: Add xcb-xkb.el as it does not work on Emacs 24. + + * xcb-types.el: + * xcb-xim.el: + Fix compilation errors on Emacs 24. + + * README.md: Renamed from README.org, or its content will be taken as + the + long description of this package by GNU ELPA. + + * xcb-keysyms.el (xcb:keysyms:-xf86-keys, xcb:keysyms:keysym->event): + Fix + typos about XF86keysym. + + * xcb-keysyms.el (xcb:keysyms:-iso-function-keys) + (xcb:keysyms:event->keysym, xcb:keysyms:keysym->event): Add support for + ISO function keys. + +2015-09-22 Chris Feng + + Bump version to 0.1 + +2015-09-21 Chris Feng + + Clean up backport code + + * xelb.el: Add cl-generic as dependency. + + * xcb-types.el: Load cl-generic; + Remove backport code for cl-defgeneric, cl-defmethod, + cl-call-next-method, cl--slot-descriptor-name and + cl--slot-descriptor-initform; + Backport eieio-slot-descriptor-name. + + * xcb.el (xcb:disconnect): + * xcb-types.el (xcb:marshal of xcb:-struct, xcb:-marshal-field) + (xcb:unmarshal of xcb-struct, xcb:unmarshal of xcb:-union) + (xcb:-unmarshal-field, xcb:marshal of xcb:-union): + * xcb-icccm.el (xcb:unmarshal of xcb:icccm:-GetProperty-explicit~reply) + (xcb:marshal of xcb:icccm:-ChangeProperty-explicit): + Use eieio-slot-descriptor-name instead of cl--slot-descriptor-name; + avoid using cl--slot-descriptor-initform. + + * xcb.el (xcb:connection): Provide default values for all slots. + + * README.org: Renamed from README.md; add note on cl-generic package. + +2015-09-20 Chris Feng + + Backport cl-defgeneric to Emacs 24 + + * xcb-types.el: Define cl-defgeneric as an alias to defgeneric. + +2015-09-19 Chris Feng + + Avoid autoloading an EIEIO method + + * xcb.el: + * xcb-type.el: + Avoid autoloading xcb:-error-or-event-class->number. + +2015-09-19 Chris Feng + + Update SHM and GLX libraries + + * xcb-shm.el (xcb:shm:PutImage): The send-event slot is now of type + xcb:BOOL. + + * xcb-glx.el (xcb:glx:IsEnabled, xcb:glx:IsEnabled~reply): New request + and + reply. + +2015-09-19 Chris Feng + + Fix copyright and coding conventions + + * el_client.el: Prefix global definitions. + + * Add copyright/license and fix library header/footer conventions for + generated libraries. + +2015-09-18 Stefan Monnier + + Add copyright line to generated files; Add elpa files to gitignore + +2015-09-11 Chris Feng + + Minor fix + + * el_client.el: Should require `pp' library. + +2015-09-08 Chris Feng + + Fix remaining compile warnings + + * el_client.el (parse): remove a warning concerning pp-escape-newlines + * xcb_types.el: remove warnings about the backward-compatible code + * xcb.el: autoload xcb:connection and xcb:-error-or-event-class->number + +2015-09-07 Chris Feng + + Add support for XF86 keysyms + + * xcb-keysyms.el: new vector xcb:keysyms:-xf86-keys + * xcb-keysyms.el (xcb:keysyms:event->keysym, xcb:keysyms:keysym->event): + add + support for XF86 keysyms + +2015-09-07 Chris Feng + + Add a missing function key + + * xcb-keysyms.el (xcb:keysyms:-function-keys): add a missing function + key + +2015-09-06 Chris Feng + + Code cleanups + + * xcb-keysyms.el (xcb:keysyms:-function-keys): change from list to + vector + * xcb-keysyms.el (xcb:keysyms:event->keysym), xcb-types.el + (cl--slot-descriptor-name, cl--slot-descriptor-initform) + (cl--slot-descriptor-type, xcb:-unpack-u1, xcb:-unpack-u2) + (xcb:-unpack-u2-lsb, xcb:-unpack-u4, xcb:-unpack-u4-lsb) + (xcb:-unmarshal-field), xcb.el (xcb:-connection-filter): use `aref` + instead + of `elt` to index vectors + * xelb.el, xcb.el: fix first line + * .elpaignore: ignore Makefile and README.md + +2015-09-05 Chris Feng + + Protect process-send-string + + * xcb.el (xcb:flush): protect process-send-string since input might also + come + when calling it. Courtesy of @pipcet. + +2015-09-04 Chris Feng + + Flatten directory structure + + It seems to be the only way to get this package built. + +2015-09-03 Chris Feng + + Fix compiling issues + + * util/xcb-ewmh.el, util/xcb-icccm.el: eliminate compile warnings by + defining + atom variables at compile time + * xcb.el: `xcb:debug-on' should be used just in this file + +2015-09-03 Chris Feng + + Prepare for GNU ELPA release + + * Transfer copyright to Free Software Foundation + * Add packaging components (e.g. headers) + * Drop support for Emacs < 24.4 + * Coding style fixes: + + Quote functions with "#'" + + Wrap long lines + + Fix doc strings / comments + * Replace `string-to-int' with `string-to-number' + * Fix compiling errors / eliminate compiling warnings + * Remove the redundant COPYING file + * Add .gitignore and .elpaignore + * Rename README to README.md since the former may be used as the package + description by packaging systems (we prefer the ';;; Commentary' + header) + +2015-09-01 Chris Feng + + Fix race conditions + + * Ensure event handlers are running sequentially + * Only accept outputs from the current process when calling + `accept-process-output process` (close ch11ng/exwm#53) + +2015-08-30 Chris Feng + + Generate implicit paddings at compile time + + This commit improves aaddcd9 by generating implicit paddings at compile + time rather than deducting them at runtime. + +2015-08-28 Chris Feng + + Merge xelb-util into this repo + +2015-08-28 Chris Feng + + Move generated libraries to lib/ + +2015-08-27 Chris Feng + + Fix a typo in 32-bit version `xcb:-unpack-u4-lsb` + +2015-08-23 Chris Feng + + Merge pull request #4 from pipcet/data-offset + + Adjust to unmarshalling API changes. + +2015-08-23 Philip + + Adjust to unmarshalling API changes. + +2015-08-23 Philip + + Improve performance when unmarshalling long vectors. + + Avoid using `substring'; instead, use an extra offset argument. + + https://github.com/ch11ng/xelb/pull/2 + +2015-08-22 Chris Feng + + Merge pull request #3 from pipcet/ignore-missing-values + + It's valid for WM_NORMAL_HINTS responses only to have 15 words. + +2015-08-22 Philip + + It's valid for WM_NORMAL_HINTS responses only to have 15 words. + + * xcb-icccm.el (xcb:unmarshal): Accept short responses to the + WM_NORMAL_HINTS property, such as that provided by Xnest. + +2015-08-21 Philip + + Don't assume key events are numbers; they can be symbols. + + * xcb-keysyms.el (xcb:keysyms:keysym->event): Don't die when + translating events like shift-KP7. + +2015-08-17 Chris Feng + + Provide a way to disable auto-padding + + The auto-padding feature need to be disabled for at least XIM. Perhaps + it's better to insert auto-padding fields with code generator directly. + +2015-08-17 Chris Feng + + Disable auto-padding for xcb-xim + +2015-08-17 Chris Feng + + Add implicit paddings after variable-length + + The XCB-XML description files omit paddings after . This commit + enables XELB to take these paddings into account when + marshalling/unmarshalling. + +2015-08-16 Chris Feng + + Make the manipulation of message cache more robust + + On Fedora 22 with Xorg 1.17.2, lots of redundant bytes are received + during connection setup. This commit uses a more reliable way to + calculate the consumed bytes. + + Fix ch11ng/exwm#26. + +2015-08-15 Philip + + allow key mappings without mode switch or NumLock keys + +2015-08-12 Chris Feng + + Fix keyboard mapping update problem + + Keep result from previous update. + +2015-08-11 Chris Feng + + Check `length` slot in `xcb:icccm:-GetProperty~reply` + + Some program (GIMP sometimes) seems only set `length` slot to 0 while + leaving other slots (including `value-len`) uninitialized. This commit + makes sure + `length` slot is also checked. + +2015-08-10 Chris Feng + + Fix an emacsclient bug + + When calling `xcb:keysyms:update-modifier-mapping` from a terminal + (e.g. created by `emacsclient -t`), the selected frame cannot be used to + receive X events. + +2015-08-10 Chris Feng + + Set the `display` slot of `xcb:connection` in `xcb:connect-to-socket` + + The slot value is guessed from the socket name, which is not always + accurate. + +2015-08-09 Chris Feng + + Fix ch11ng/exwm#16 (cursor size not matching) + +2015-08-09 Chris Feng + + Disable concurrency of events + + The event handling mechanism was designed to be preemptive, which made + events arriving in a wrong order (for applications using this library) + and caused many problems therefore. This commit disables such behavior. + +2015-08-06 Chris Feng + + Provide more verbose message when connection failed or auth required + +2015-08-06 Chris Feng + + Fix integer overflow on 32-bit platform + +2015-08-06 Chris Feng + + Fix for 32bit platform + +2015-08-05 Chris Feng + + Update xcb-randr.el + + Was: randr: add RandR 1.5 requests and data types + +2015-08-04 Chris Feng + + Cleanup code + + Also make counter more robust. + +2015-07-19 Chris Feng + + Fix shift bit for converting from keysym to Emacs event + + Emacs only set shift bit for letters. + +2015-07-17 Chris Feng + + First commit + +2015-07-17 Chris Feng + + First commit + diff --git a/elpa/xelb-0.18/Makefile b/elpa/xelb-0.18/Makefile new file mode 100644 index 0000000..da36c8a --- /dev/null +++ b/elpa/xelb-0.18/Makefile @@ -0,0 +1,32 @@ +PROTO_PATH := ../xcb-proto/src + +EMACS_BIN := emacs -Q + +EXTENSIONS := bigreq composite damage dpms dri2 dri3 ge glx present randr \ +record render res screensaver shape shm sync xc_misc xevie xf86dri \ +xf86vidmode xfixes xinerama xinput xkb xprint xselinux xtest xvmc xv + +EXT_LIBS = $(addprefix xcb-,$(addsuffix .el,$(EXTENSIONS))) +LIBS = xcb-xproto.el $(EXT_LIBS) + +all: clean $(LIBS) + +xcb-%.el: $(PROTO_PATH)/%.xml + @echo -n "\n"Generating $@... + @$(EMACS_BIN) --script ./el_client.el $< > $@ + +$(EXT_LIBS): xcb-xproto.el + +xcb-composite.el: xcb-xfixes.el +xcb-damage.el: xcb-xfixes.el +xcb-present.el: xcb-randr.el xcb-xfixes.el xcb-sync.el +xcb-randr.el: xcb-render.el +xcb-xfixes.el: xcb-render.el xcb-shape.el +xcb-xinput.el: xcb-xfixes.el +xcb-xvmc.el: xcb-xv.el +xcb-xv.el: xcb-shm.el + +.PHONY: clean + +clean: + @rm -vf $(LIBS) diff --git a/elpa/xelb-0.18/README.md b/elpa/xelb-0.18/README.md new file mode 100644 index 0000000..a0719bd --- /dev/null +++ b/elpa/xelb-0.18/README.md @@ -0,0 +1,12 @@ +# X protocol Emacs Lisp Binding + +XELB (X protocol Emacs Lisp Binding) is a pure Elisp implementation of X11 +protocol based on the XML description files from XCB project. +It features an object-oriented API and permits a certain degree of concurrency. +It should enable you to implement some low-level X11 applications. +Please refer to [xelb.el](https://github.com/ch11ng/xelb/blob/master/xelb.el) +for more details. + +**Note to Emacs 24 users**: +If you install XELB from source (rather than GNU ELPA), be sure to install +`cl-generic` package from GNU ELPA first. diff --git a/elpa/xelb-0.18/el_client.el b/elpa/xelb-0.18/el_client.el new file mode 100644 index 0000000..c8ea09c --- /dev/null +++ b/elpa/xelb-0.18/el_client.el @@ -0,0 +1,742 @@ +;;; el_client.el --- XELB Code Generator -*- lexical-binding: t -*- + +;; Copyright (C) 2015-2019 Free Software Foundation, Inc. + +;; Author: Chris Feng + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; 'el_client' is responsible for converting XCB XML description files into +;; Elisp libraries. Here are a few design guidelines: +;; + The generated codes should be human-readable and conform to the Elisp +;; coding conventions. Names mentioned in X specifications are preferred. +;; + Deprecated features such as should be dropped, for +;; - they would generate incompatible codes, and +;; - they are probably already dropped upstream. +;; + All documentations (within tags) and comments should be stripped +;; out to reduce the overall amount of code. XELB application developers are +;; then encouraged to refer to the corresponding specifications to get an +;; authoritative explanation. + +;; This file is only intended to be run as a script. + +;; References: +;; + xcb/proto (git://anongit.freedesktop.org/xcb/proto) + +;;; Code: + +(eval-when-compile (require 'cl-lib)) +(require 'eieio) +(require 'pp) + +;; Only used to eliminate compile warnings when distributed. +(require 'xcb-types nil t) + +;;;; Variables + +(defconst xelb-excluded-replies<25 '(xcb:xkb:GetKbdByName~reply) + "Excluded replies for Emacs < 25 (they're too long to load/compile).") + +(defvar xelb-prefix "xcb:" "Namespace of this module.") + +(defvar xelb-error-alist nil "Record X errors in this module.") + +(defvar xelb-event-alist nil "Record X events in this module.") + +(defvar xelb-xge-alist nil "Record X generic events in this module.") + +(defvar xelb-imports nil "Record imported libraries.") + +(defvar xelb-pad-count -1 " node counter.") + +(defvar xelb-request-fields nil "Fields in the current request.") + +;;;; Helper functions + +(defsubst xelb-node-name (node) + "Return the tag name of node NODE." + (car node)) + +(defsubst xelb-node-attr (node attr) + "Return the attribute ATTR of node NODE." + (cdr (assoc attr (cadr node)))) + +(defsubst xelb-node-type (node) + "Return the type of node NODE." + (let ((type-name (xelb-node-attr node 'type)) + type) + (if (string-match ":" type-name) + ;; Defined explicitly. + (if (setq type + (intern-soft (concat "xcb:" + (replace-regexp-in-string "^xproto:" "" + type-name)))) + type + (error "Undefined type: %s" type-name)) + (if (setq type (or (intern-soft (concat xelb-prefix type-name)) + (intern-soft (concat "xcb:" type-name)))) + ;; Defined by the core protocol or this extension. + type + (catch 'break + (dolist (i xelb-imports) + (setq type (intern-soft (concat i type-name))) + (when type + (throw 'break type)))) + (if type + ;; Defined by an imported extension. + type + ;; Not defined. + (error "Undefined type: %s" type-name)))))) + +(defsubst xelb-escape-name (name) + "Replace underscores in NAME with dashes." + (replace-regexp-in-string "_" "-" name)) + +(defsubst xelb-node-name-escape (node) + "Return the tag name of node NODE and escape it." + (xelb-escape-name (xelb-node-name node))) + +(defsubst xelb-node-attr-escape (node attr) + "Return the attribute ATTR of node NODE and escape it." + (xelb-escape-name (xelb-node-attr node attr))) + +(defsubst xelb-node-subnodes (node &optional mark-auto-padding) + "Return all the subnodes of node NODE as a list. + +If MARK-AUTO-PADDING is non-nil, all 's fitting for padding will include +an `xelb-auto-padding' attribute." + (let ((subnodes (cddr node))) + (when mark-auto-padding + ;; Remove all 's and 's + (cl-delete-if (lambda (i) (or (eq 'comment (car i)) (eq 'doc (car i)))) + subnodes) + (dotimes (i (1- (length subnodes))) + (when (and (eq 'list (xelb-node-name (elt subnodes i))) + (pcase (xelb-node-name (elt subnodes (1+ i))) + ((or `reply `pad)) + (_ t))) + (setf (cadr (elt subnodes i)) + (nconc (cadr (elt subnodes i)) `((xelb-auto-padding . t))))))) + subnodes)) + +(defsubst xelb-node-subnode (node) + "Return the (only) subnode of node NODE with useless contents skipped." + (let ((result (xelb-node-subnodes node))) + (catch 'break + (dolist (i result) + (unless (and (listp i) + (or (eq (xelb-node-name i) 'comment) + (eq (xelb-node-name i) 'doc))) + (throw 'break i)))))) + +(defun xelb-node-size (node) + "Return the size of NODE in bytes." + (pcase (xelb-node-name node) + (`pad (xelb-node-attr node 'bytes)) + (`field (xelb-type-size (xelb-node-type node))) + (`list (* (xelb-type-size (xelb-node-type node)) + (xelb-parse-expression (xelb-node-subnode node)))) + ((or `comment `doc) 0) + (x (error "Unexpected element: <%s>" x)))) + +(defun xelb-type-size (type &optional slot) + "Return size of TYPE in bytes." + (pcase (or (get type 'xcb--typealias) type) + (`xcb:-ignore 0) + ((or `xcb:-u1 `xcb:-i1 `xcb:void) 1) + ((or `xcb:-u2 `xcb:-i2) 2) + ((or `xcb:-u4 `xcb:-i4) 4) + (`xcb:-u8 8) + (`xcb:-pad (cl--slot-descriptor-initform slot)) + (`xcb:-list + (let ((initform (cadr (cl--slot-descriptor-initform slot)))) + (* (plist-get initform 'size) + (xelb-type-size (plist-get initform 'type))))) + ((and x (guard (child-of-class-p x 'xcb:-struct))) + (apply #'+ + (mapcar (lambda (slot) + (xelb-type-size (cl--slot-descriptor-type slot) slot)) + (eieio-class-slots x)))) + (x (error "Unknown size of type: %s" x)))) + +(defsubst xelb-generate-pad-name () + "Generate a new slot name for ." + (make-symbol (format "pad~%d" (cl-incf xelb-pad-count)))) + +;;;; Entry & root element + +(defun xelb-parse (file) + "Parse an XCB protocol description file FILE (XML)." + (let ((pp-escape-newlines nil) ;do not escape newlines + result header) + (with-temp-buffer + (insert-file-contents file) + (setq result (libxml-parse-xml-region (point-min) (point-max))) + (unless (eq 'xcb (xelb-node-name result)) + ;; There's an extra comment. + (setq result (xelb-node-subnode result))) + (cl-assert (eq 'xcb (xelb-node-name result))) + (setq header (xelb-node-attr result 'header)) + (unless (string= header "xproto") + (setq xelb-prefix (concat xelb-prefix header ":"))) + ;; Print header + (princ (format "\ +;;; xcb-%s.el --- X11 %s -*- lexical-binding: t -*- + +;; Copyright (C) 2015-2019 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This file was generated by 'el_client.el' from '%s', +;; which you can retrieve from . + +;;; Code: + +\(require 'xcb-types) + +" + header + (let ((extension-name (xelb-node-attr result + 'extension-name))) + (if extension-name + (concat extension-name " extension") + "core protocol")) + (file-name-nondirectory file))) + ;; Print extension info (if any) + (let ((extension-xname (xelb-node-attr result 'extension-xname)) + (extension-name (xelb-node-attr result 'extension-name)) + (major-version (xelb-node-attr result 'major-version)) + (minor-version (xelb-node-attr result 'minor-version))) + (when extension-xname + (pp `(defconst ,(intern (concat xelb-prefix "-extension-xname")) + ,extension-xname))) + (when extension-name + (pp `(defconst ,(intern (concat xelb-prefix "-extension-name")) + ,extension-name))) + (when major-version + (pp `(defconst ,(intern (concat xelb-prefix "-major-version")) + ,(string-to-number major-version)))) + (when minor-version + (pp `(defconst ,(intern (concat xelb-prefix "-minor-version")) + ,(string-to-number minor-version)))) + (when (or extension-xname extension-name major-version minor-version) + (princ "\n"))) + ;; Print contents + (dolist (i (xelb-node-subnodes result)) + (let ((result (xelb-parse-top-level-element i))) + (when result ;skip , comments, etc + (dolist (j result) + (eval j) ;Make it immediately available. + (pp j)) + (princ "\n")))) + ;; Print error/event alists + (when xelb-error-alist + (pp + `(defconst ,(intern (concat xelb-prefix "error-number-class-alist")) + ',xelb-error-alist "(error-number . error-class) alist.")) + (princ "\n")) + (when xelb-event-alist + (pp + `(defconst ,(intern (concat xelb-prefix "event-number-class-alist")) + ',xelb-event-alist "(event-number . event-class) alist.")) + (princ "\n")) + (when xelb-xge-alist + (pp + `(defconst ,(intern (concat xelb-prefix "xge-number-class-alist")) + ',xelb-xge-alist "(xge-number . event-class) alist.")) + (princ "\n")) + ;; Print footer + (princ (format "\ + + +(provide 'xcb-%s) + +;;; xcb-%s.el ends here +" header header))))) + +;;;; XCB: top-level elements + +(defun xelb-parse-top-level-element (node) + "Parse a top-level node NODE." + (setq xelb-pad-count -1) + (pcase (xelb-node-name node) + (`import (xelb-parse-import node)) + (`struct (xelb-parse-struct node)) + (`union (xelb-parse-union node)) + ((or `xidtype `xidunion) + (xelb-parse-xidtype node)) ;they are basically the same + (`enum (xelb-parse-enum node)) + (`typedef (xelb-parse-typedef node)) + (`request (xelb-parse-request node)) + (`event (xelb-parse-event node)) + (`error (xelb-parse-error node)) + (`eventcopy (xelb-parse-eventcopy node)) + (`errorcopy (xelb-parse-errorcopy node)) + (`eventstruct (xelb-parse-eventstruct node)) + ((or `comment `doc)) ;ignored + (x (error "Unsupported top-level element: <%s>" x)))) + +(defun xelb-parse-import (node) + "Parse ." + (let* ((name (xelb-node-subnode node)) + (header (intern (concat "xcb-" name)))) + (require header) + (push (concat "xcb:" name ":") xelb-imports) + `((require ',header)))) + +(defun xelb-parse-struct (node) + "Parse ." + (let ((name (intern (concat xelb-prefix (xelb-node-attr node 'name)))) + (contents (xelb-node-subnodes node t))) + `((defclass ,name (xcb:-struct) + ,(apply #'nconc (mapcar #'xelb-parse-structure-content contents)))))) + +(defun xelb-parse-union (node) + "Parse ." + (let ((name (intern (concat xelb-prefix (xelb-node-attr node 'name)))) + (contents (xelb-node-subnodes node))) + `((defclass ,name (xcb:-union) + ,(apply #'nconc + `((~size :initform + ,(apply #'max (mapcar #'xelb-node-size contents)))) + (mapcar #'xelb-parse-structure-content contents)))))) + +(defun xelb-parse-xidtype (node) + "Parse ." + (let ((name (intern (concat xelb-prefix (xelb-node-attr node 'name))))) + `((xcb:deftypealias ',name 'xcb:-u4)))) + +(defun xelb-parse-enum (node) + "Parse ." + (let ((name-prefix (concat xelb-prefix (xelb-node-attr node 'name) ":")) + (items (xelb-node-subnodes node)) + (value 0)) + (delq nil ;remove nil's produced by tags like + (mapcar (lambda (i) + (when (eq (xelb-node-name i) 'item) + ;; Only handle tags + (let* ((name (xelb-node-attr i 'name)) + (name (intern (concat name-prefix name))) + (expression (xelb-node-subnode i))) + (if expression + (setq value (xelb-parse-expression expression)) + (setq value (1+ value))) + ;; Omit the rare enums that do not fit in a fixnum in + ;; 32-bit Emacs, so that the resulting .el and .elc + ;; files are portable to 32-bit Emacs. Admittedly + ;; this is a kludge. + (unless (and (integerp value) + (not (<= -536870912 value 536870911))) + `(defconst ,name ,value))))) + items)))) + +(defun xelb-parse-typedef (node) + "Parse ." + (let* ((oldname (xelb-node-attr node 'oldname)) + (oldname (or (intern-soft (concat xelb-prefix oldname)) + (intern-soft (concat "xcb:" oldname)) + (intern (concat xelb-prefix oldname)))) + (newname (intern (concat xelb-prefix + (xelb-node-attr node 'newname))))) + `((xcb:deftypealias ',newname ',oldname)))) + +(defun xelb-parse-request (node) + "Parse . + +The `combine-adjacent' attribute is simply ignored." + (let* ((name (intern (concat xelb-prefix (xelb-node-attr node 'name)))) + (opcode (string-to-number (xelb-node-attr node 'opcode))) + (contents `((~opcode :initform ,opcode :type xcb:-u1))) + (subnodes (xelb-node-subnodes node t)) + expressions + result reply-name reply-contents) + ;; Fill `xelb-request-fields'. + (setq xelb-request-fields nil) + (dolist (i subnodes) + (unless (eq (xelb-node-name i) 'reply) + (let ((name (xelb-node-attr i 'name))) + (when name + (push (intern (xelb-escape-name name)) xelb-request-fields))))) + (dolist (i subnodes) + (if (not (eq (xelb-node-name i) 'reply)) + (progn + (setq result (xelb-parse-structure-content i)) + (if (eq 'exprfield (xelb-node-name i)) + ;; Split into field and expression + (setq contents (nconc contents (list (car result))) + expressions (nconc expressions (list (cadr result)))) + (setq contents (nconc contents result)))) + ;; Parse + (setq xelb-pad-count -1) ;reset padding counter + (setq xelb-request-fields nil) ;Clear `xelb-request-fields'. + (setq reply-name + (intern (concat xelb-prefix (xelb-node-attr node 'name) + "~reply"))) + (setq reply-contents (xelb-node-subnodes i t)) + (setq reply-contents + (apply #'nconc + (mapcar #'xelb-parse-structure-content reply-contents))))) + (setq xelb-request-fields nil) ;Clear `xelb-request-fields'. + (delq nil contents) + (delq nil + `((defclass ,name (xcb:-request) ,contents) + ;; The optional expressions + ,(when expressions + `(cl-defmethod xcb:marshal ((obj ,name)) nil + ,@expressions + (cl-call-next-method obj))) + ,(when (memq reply-name xelb-excluded-replies<25) + ;; Redefine `defclass' as no-op. + '(eval-and-compile + (when (< emacs-major-version 25) + (fset 'xcb:-defclass (symbol-function 'defclass)) + (defmacro defclass (&rest _args))))) + ;; The optional reply body + ,(when reply-name + (delq nil reply-contents) + ;; Insert slots for sequence number and reply length. + (setcdr reply-contents (append '((~sequence :type xcb:CARD16) + (length :type xcb:CARD32)) + (cdr reply-contents))) + `(defclass ,reply-name (xcb:-reply) ,reply-contents)) + ,(when (memq reply-name xelb-excluded-replies<25) + ;; Bring back the original defination of `defclass'. + '(eval-and-compile + (when (< emacs-major-version 25) + (fset 'defclass (symbol-function 'xcb:-defclass))))))))) + +(defun xelb-parse-event (node) + "Parse ." + (let ((name (intern (concat xelb-prefix (xelb-node-attr node 'name)))) + (event-number (string-to-number (xelb-node-attr node 'number))) + (no-sequence-number (xelb-node-attr node 'no-sequence-number)) + (xge (xelb-node-attr node 'xge)) + (contents (xelb-node-subnodes node t)) + xge-extension) + (setq xge-extension (and xge (not (eq name 'xcb:GeGeneric)))) + (setq contents + (apply #'nconc (mapcar #'xelb-parse-structure-content contents))) + (unless (or no-sequence-number xge) + (setcdr contents (append '((~sequence :type xcb:CARD16)) + (cdr contents)))) + ;; Add the event code. + (unless (and xge (not xge-extension)) + (push `(,(if xge '~evtype '~code) :initform ,event-number) contents)) + (if xge-extension + (setq xelb-xge-alist + (nconc xelb-xge-alist `((,event-number . ,name)))) + (setq xelb-event-alist + (nconc xelb-event-alist `((,event-number . ,name))))) + `((defclass ,name (,(if xge 'xcb:-generic-event 'xcb:-event)) ,contents)))) + +(defun xelb-parse-error (node) + "Parse ." + (let ((name (intern (concat xelb-prefix (xelb-node-attr node 'name)))) + (error-number (string-to-number (xelb-node-attr node 'number))) + (contents (xelb-node-subnodes node t))) + (setq xelb-error-alist (nconc xelb-error-alist `((,error-number . ,name)))) + `((defclass ,name (xcb:-error) + ,(append + ;; The error code. + `((~code :initform ,error-number)) + ;; The contents. + (apply #'nconc (mapcar #'xelb-parse-structure-content contents))))))) + +(defun xelb-parse-eventcopy (node) + "Parse ." + (let* ((name (intern (concat xelb-prefix (xelb-node-attr node 'name)))) + (refname (xelb-node-attr node 'ref)) + (refname (or (intern-soft (concat xelb-prefix refname)) + (intern-soft (concat "xcb:" refname)) + (intern (concat xelb-prefix refname)))) + (xge (child-of-class-p refname 'xcb:-generic-event)) + (event-number (string-to-number (xelb-node-attr node 'number)))) + (if xge + (setq xelb-xge-alist + (nconc xelb-xge-alist `((,event-number . ,name)))) + (setq xelb-event-alist + (nconc xelb-event-alist `((,event-number . ,name))))) + `((defclass ,name (xcb:-event ,refname) ;Shadow the method of ref. + ((,(if xge '~evtype '~code) :initform ,event-number)))))) + +(defun xelb-parse-errorcopy (node) + "Parse ." + (let* ((name (intern (concat xelb-prefix (xelb-node-attr node 'name)))) + (refname (xelb-node-attr node 'ref)) + (refname (or (intern-soft (concat xelb-prefix refname)) + (intern-soft (concat "xcb:" refname)) + (intern (concat xelb-prefix refname)))) + (error-number (string-to-number (xelb-node-attr node 'number)))) + (setq xelb-error-alist (nconc xelb-error-alist `((,error-number . ,name)))) + `((defclass ,name (xcb:-error ,refname) ;Shadow the method of ref + ((~code :initform ,error-number)))))) + +(defun xelb-parse-eventstruct (node) + "Parse ." + (let ((name (intern (concat xelb-prefix (xelb-node-attr node 'name))))) + ;; Only conventional events are supported (and we don't check opcode). + `((defclass ,name (xcb:-event) nil)))) + +;;;; XCB: structure contents + +(defun xelb-parse-structure-content (node) + "Parse a structure content node NODE." + (pcase (xelb-node-name node) + (`pad (xelb-parse-pad node)) + (`required_start_align (xelb-parse-required_start_align node)) + (`field (xelb-parse-field node)) + (`fd (xelb-parse-fd node)) + (`list (xelb-parse-list node)) + (`exprfield (xelb-parse-exprfield node)) + (`switch (xelb-parse-switch node)) + ((or `comment `doc)) ;simply ignored + (x (error "Unsupported structure content: <%s>" x)))) + +;; The car of the result shall be renamed to prevent duplication of slot names +(defun xelb-parse-pad (node) + "Parse ." + (let ((bytes (xelb-node-attr node 'bytes)) + (align (xelb-node-attr node 'align))) + (if bytes + `((,(xelb-generate-pad-name) + :initform ,(string-to-number bytes) :type xcb:-pad)) + (if align + `((,(xelb-generate-pad-name) + :initform ,(string-to-number align) :type xcb:-pad-align)) + (error "Invalid field"))))) + +(defun xelb-parse-required_start_align (node) + "Parse ." + (let ((align (xelb-node-attr node 'align)) + (offset (xelb-node-attr node 'offset))) + `((,(xelb-generate-pad-name) + :initform ,(if offset + (vector (string-to-number align) + (string-to-number offset)) + (string-to-number align)) + :type xcb:-pad-align)))) + +(defun xelb-parse-field (node) + "Parse ." + (let* ((name (intern (xelb-node-attr-escape node 'name))) + (type (xelb-node-type node))) + `((,name :initarg ,(intern (concat ":" (symbol-name name))) :type ,type)))) + +(defun xelb-parse-fd (node) + "Parse ." + (let ((name (intern (xelb-node-attr-escape node 'name)))) + `((,name :type xcb:fd)))) + +(defun xelb-parse-list (node) + "Parse ." + (let* ((name (intern (xelb-node-attr-escape node 'name))) + (name-alt (intern (concat (xelb-node-attr-escape node 'name) "~"))) + (type (xelb-node-type node)) + (size (xelb-parse-expression (xelb-node-subnode node)))) + `((,name-alt :initform '(name ,name type ,type size ,size) + :type xcb:-list) + (,name :initarg ,(intern (concat ":" (symbol-name name))) + :type xcb:-ignore)))) + +;; The car of result is the field declaration, and the cadr is the expression +;; to be evaluated. +(defun xelb-parse-exprfield (node) + "Parse ." + (let* ((name (intern (xelb-node-attr-escape node 'name))) + (type (xelb-node-type node)) + (value (xelb-parse-expression (xelb-node-subnode node)))) + `((,name :type ,type) + (setf (slot-value obj ',name) ,value)))) + +;; The only difference between and is whether the `condition' +;; is a list +;; The name attribute of and seems not useful here. +(defun xelb-parse-switch (node) + "Parse ." + (let ((name (intern (xelb-node-attr-escape node 'name))) + (expression (xelb-parse-expression (car (xelb-node-subnodes node)))) + ;; and only + (cases (cl-remove-if-not (lambda (i) + (memq (xelb-node-name i) '(case bitcase))) + (xelb-node-subnodes node))) + fields) + ;; Avoid duplicated slot names by appending "*" if necessary + (let (names name) + (dolist (case cases) + (pcase (xelb-node-name case) + ((or `bitcase `case) + (dolist (field (xelb-node-subnodes case)) + (pcase (xelb-node-name field) + ((or `enumref `pad `doc `comment `required_start_align)) + (_ + (setq name (xelb-node-attr field 'name)) + (when (member name names) + (while (member name names) + (setq name (concat name "*"))) + (setcdr (assoc 'name (cadr field)) name)) + (cl-pushnew name names :test #'equal)))))))) + (setq cases + (mapcar (lambda (i) + (let ((case-name (xelb-node-name i)) + condition name-list tmp) + (when (or (eq case-name 'bitcase) (eq case-name 'case)) + (dolist (j (xelb-node-subnodes i t)) + (pcase (xelb-node-name j) + (`enumref + (setq condition + (nconc condition + (list (xelb-parse-enumref j))))) + (_ + (setq tmp (xelb-parse-structure-content j)) + (setq fields (nconc fields tmp)) + (setq name-list + (nconc name-list (list (caar tmp))))))) + (when (eq case-name 'bitcase) + (setq condition (if (= 1 (length condition)) + ;; Flatten 1-element list. + (car condition) + (if (cl-every #'integerp condition) + (apply #'logior condition) + `(logior ,@condition)))))) + `(,condition ,@name-list))) + cases)) + `((,name :initform '(expression ,expression cases ,cases) + :type xcb:-switch) + ,@fields))) + +;;;; XCB: expressions + +(defun xelb-parse-expression (node) + "Parse an expression node NODE." + (when node + (pcase (xelb-node-name node) + (`op (xelb-parse-op node)) + (`fieldref (xelb-parse-fieldref node)) + (`paramref (xelb-parse-paramref node)) + (`value (xelb-parse-value node)) + (`bit (xelb-parse-bit node)) + (`enumref (xelb-parse-enumref node)) + (`unop (xelb-parse-unop node)) + (`sumof (xelb-parse-sumof node)) + (`popcount (xelb-parse-popcount node)) + (`listelement-ref (xelb-parse-listelement-ref node)) + ((or `comment `doc)) ;simply ignored + (x (error "Unsupported expression: <%s>" x))))) + +(defun xelb-parse-op (node) + "Parse ." + (let* ((subnodes (xelb-node-subnodes node)) + (x (xelb-parse-expression (car subnodes))) + (y (xelb-parse-expression (cadr subnodes)))) + (pcase (xelb-node-attr node 'op) + ("+" `(+ ,x ,y)) + ("-" `(- ,x ,y)) + ("*" `(* ,x ,y)) + ("/" `(/ ,x ,y)) + ("&" `(logand ,x ,y)) + ("<<" `(lsh ,x ,y)) + (x (error "Unsupported operator: `%s'" x))))) + +(defun xelb-parse-fieldref (node) + "Parse ." + (let ((name (intern (xelb-escape-name (xelb-node-subnode node))))) + (if (or (not xelb-request-fields) ;Probably not a request. + (memq name xelb-request-fields) + (not (string-suffix-p "-len" (symbol-name name)))) + `(xcb:-fieldref ',name) + `(length + (xcb:-fieldref ',(intern (substring (symbol-name name) 0 -4))))))) + +(defun xelb-parse-paramref (node) + "Parse ." + `(xcb:-paramref ',(intern (xelb-escape-name (xelb-node-subnode node))))) + +(defun xelb-parse-value (node) + "Parse ." + (string-to-number + (replace-regexp-in-string "^0x" "#x" (xelb-node-subnode node)))) + +(defun xelb-parse-bit (node) + "Parse ." + (let ((bit (string-to-number (xelb-node-subnode node)))) + (cl-assert (<= 0 bit 31)) + (lsh 1 bit))) + +(defun xelb-parse-enumref (node) + "Parse ." + (let ((name (concat (xelb-node-attr node 'ref) ":" + (xelb-node-subnode node)))) + (symbol-value (or (intern-soft (concat xelb-prefix name)) + (intern-soft (concat "xcb:" name)) + (intern (concat xelb-prefix name)))))) + +(defun xelb-parse-unop (node) + "Parse ." + (cl-assert (string= "~" (xelb-node-attr node 'op))) + `(lognot ,(xelb-parse-expression (xelb-node-subnode node)))) + +(defun xelb-parse-sumof (node) + "Parse ." + (let* ((ref (intern (xelb-node-attr-escape node 'ref))) + (expression (xelb-node-subnode node)) + (list-data `(slot-value obj ',ref))) + (if (not expression) + `(apply #'+ ,list-data) + (setq expression (xelb-parse-expression expression)) + `(apply #'+ (mapcar (lambda (i) + (eval ',expression (list (nconc '(obj) i)))) + ,list-data))))) + +(defun xelb-parse-popcount (node) + "Parse ." + (let ((expression (xelb-parse-expression (xelb-node-subnode node)))) + `(xcb:-popcount ,expression))) + +(defun xelb-parse-listelement-ref (_node) + "Parse ." + 'obj) ;a list element is internally named 'obj' + +;;;; The entry + +(setq debug-on-error t) +(setq edebug-all-forms t) + +(if (not argv) + (error "Usage: el_client.el [additional_load_paths]") + (add-to-list 'load-path default-directory) + (dolist (i (cdr argv)) + (add-to-list 'load-path i)) + (require 'xcb-types) + (xelb-parse (car argv))) + +;;; el_client.el ends here diff --git a/elpa/xelb-0.18/xcb-bigreq.el b/elpa/xelb-0.18/xcb-bigreq.el new file mode 100644 index 0000000..80eef1e --- /dev/null +++ b/elpa/xelb-0.18/xcb-bigreq.el @@ -0,0 +1,48 @@ +;;; xcb-bigreq.el --- X11 BigRequests extension -*- lexical-binding: t -*- + +;; Copyright (C) 2015-2019 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This file was generated by 'el_client.el' from 'bigreq.xml', +;; which you can retrieve from . + +;;; Code: + +(require 'xcb-types) + +(defconst xcb:bigreq:-extension-xname "BIG-REQUESTS") +(defconst xcb:bigreq:-extension-name "BigRequests") +(defconst xcb:bigreq:-major-version 0) +(defconst xcb:bigreq:-minor-version 0) + +(defclass xcb:bigreq:Enable + (xcb:-request) + ((~opcode :initform 0 :type xcb:-u1))) +(defclass xcb:bigreq:Enable~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (maximum-request-length :initarg :maximum-request-length :type xcb:CARD32))) + + + +(provide 'xcb-bigreq) + +;;; xcb-bigreq.el ends here diff --git a/elpa/xelb-0.18/xcb-composite.el b/elpa/xelb-0.18/xcb-composite.el new file mode 100644 index 0000000..20fa0ff --- /dev/null +++ b/elpa/xelb-0.18/xcb-composite.el @@ -0,0 +1,116 @@ +;;; xcb-composite.el --- X11 Composite extension -*- lexical-binding: t -*- + +;; Copyright (C) 2015-2019 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This file was generated by 'el_client.el' from 'composite.xml', +;; which you can retrieve from . + +;;; Code: + +(require 'xcb-types) + +(defconst xcb:composite:-extension-xname "Composite") +(defconst xcb:composite:-extension-name "Composite") +(defconst xcb:composite:-major-version 0) +(defconst xcb:composite:-minor-version 4) + +(require 'xcb-xproto) + +(require 'xcb-xfixes) + +(defconst xcb:composite:Redirect:Automatic 0) +(defconst xcb:composite:Redirect:Manual 1) + +(defclass xcb:composite:QueryVersion + (xcb:-request) + ((~opcode :initform 0 :type xcb:-u1) + (client-major-version :initarg :client-major-version :type xcb:CARD32) + (client-minor-version :initarg :client-minor-version :type xcb:CARD32))) +(defclass xcb:composite:QueryVersion~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (major-version :initarg :major-version :type xcb:CARD32) + (minor-version :initarg :minor-version :type xcb:CARD32) + (pad~1 :initform 16 :type xcb:-pad))) + +(defclass xcb:composite:RedirectWindow + (xcb:-request) + ((~opcode :initform 1 :type xcb:-u1) + (window :initarg :window :type xcb:WINDOW) + (update :initarg :update :type xcb:CARD8) + (pad~0 :initform 3 :type xcb:-pad))) + +(defclass xcb:composite:RedirectSubwindows + (xcb:-request) + ((~opcode :initform 2 :type xcb:-u1) + (window :initarg :window :type xcb:WINDOW) + (update :initarg :update :type xcb:CARD8) + (pad~0 :initform 3 :type xcb:-pad))) + +(defclass xcb:composite:UnredirectWindow + (xcb:-request) + ((~opcode :initform 3 :type xcb:-u1) + (window :initarg :window :type xcb:WINDOW) + (update :initarg :update :type xcb:CARD8) + (pad~0 :initform 3 :type xcb:-pad))) + +(defclass xcb:composite:UnredirectSubwindows + (xcb:-request) + ((~opcode :initform 4 :type xcb:-u1) + (window :initarg :window :type xcb:WINDOW) + (update :initarg :update :type xcb:CARD8) + (pad~0 :initform 3 :type xcb:-pad))) + +(defclass xcb:composite:CreateRegionFromBorderClip + (xcb:-request) + ((~opcode :initform 5 :type xcb:-u1) + (region :initarg :region :type xcb:xfixes:REGION) + (window :initarg :window :type xcb:WINDOW))) + +(defclass xcb:composite:NameWindowPixmap + (xcb:-request) + ((~opcode :initform 6 :type xcb:-u1) + (window :initarg :window :type xcb:WINDOW) + (pixmap :initarg :pixmap :type xcb:PIXMAP))) + +(defclass xcb:composite:GetOverlayWindow + (xcb:-request) + ((~opcode :initform 7 :type xcb:-u1) + (window :initarg :window :type xcb:WINDOW))) +(defclass xcb:composite:GetOverlayWindow~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (overlay-win :initarg :overlay-win :type xcb:WINDOW) + (pad~1 :initform 20 :type xcb:-pad))) + +(defclass xcb:composite:ReleaseOverlayWindow + (xcb:-request) + ((~opcode :initform 8 :type xcb:-u1) + (window :initarg :window :type xcb:WINDOW))) + + + +(provide 'xcb-composite) + +;;; xcb-composite.el ends here diff --git a/elpa/xelb-0.18/xcb-cursor.el b/elpa/xelb-0.18/xcb-cursor.el new file mode 100644 index 0000000..85dfb6f --- /dev/null +++ b/elpa/xelb-0.18/xcb-cursor.el @@ -0,0 +1,432 @@ +;;; xcb-cursor.el --- Port of Xcursor -*- lexical-binding: t -*- + +;; Copyright (C) 2015-2019 Free Software Foundation, Inc. + +;; Author: Chris Feng + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This library is a port of Xcursor in Xlib, and roughly corresponds to the +;; xcb/util-cursor project. + +;; Usage tips: +;; + Do not forget to call `xcb:cursor:init' for _every_ connection using this +;; library. +;; + The only useful method in this library is `xcb:cursor:load-cursor', which +;; loads a cursor by its name (e.g. "left_ptr"), in the following order: +;; 1. themed cursor +;; 2. inherited themed cursor +;; 3. standard X cursor + +;; Todo: +;; + Add legacy support for RENDER. +;; + Cursor should be set per screen (only the first is used right now). +;; + Move codes corresponding to xcb/util-renderutil or xcb/util-image +;; elsewhere. + +;; References: +;; + Xcursor(3). +;; + xcb/util-cursor (git://anongit.freedesktop.org/xcb/util-cursor) +;; + xcb/util-renderutil (git://anongit.freedesktop.org/xcb/util-renderutil) +;; + xcb/util-image (git://anongit.freedesktop.org/xcb/util-image) + +;;; Code: + +(eval-when-compile (require 'cl-lib)) +(require 'xcb) +(require 'xcb-render) + +;; FIXME: check if resource manager really works +(cl-defmethod xcb:cursor:init ((obj xcb:connection)) + "Initialize Xcursor for connection OBJ." + ;; Initialize resource manager + (let* ((root (slot-value (car (slot-value (xcb:get-setup obj) 'roots)) + 'root)) + (rm (xcb:+request-unchecked+reply obj + (make-instance 'xcb:GetProperty + :delete 0 :window root + :property xcb:Atom:RESOURCE_MANAGER + :type xcb:Atom:STRING + :long-offset 0 + :long-length 16384))) ;FIXME: xcb/util-cursor + (rm (split-string + (decode-coding-string + (apply #'unibyte-string (append (slot-value rm 'value) nil)) + 'iso-latin-1) + "\n")) + theme size dpi) + (dolist (i rm) + (pcase (replace-regexp-in-string "^\\(\\S-+\\)" "\\1" i) + ("Xcursor.theme" + (setq theme + (replace-regexp-in-string "^[^:]+:\\s-*\\(.+$\\)" "\\1" i))) + ("Xcursor.size" + (setq size + (string-to-number + (replace-regexp-in-string "^[^:]+:\\s-*\\(.+$\\)" "\\1" i)))) + ("Xft.dpi" + (setq dpi + (string-to-number + (replace-regexp-in-string "^[^:]+:\\s-*\\(.+$\\)" "\\1" i)))))) + ;; Get cursor size from XCURSOR_SIZE environment variable + (let ((default-size (getenv "XCURSOR_SIZE"))) + (when default-size + (setq default-size (string-to-number default-size))) + (setq size (or default-size size))) + ;; Alternatives + (when (and (not size) dpi) + (setq size (/ (* dpi 16) 72))) ;FIXME: xcb/util-cursor + (unless size + (setq size + ;; FIXME: xcb/util-cursor + (/ (min (x-display-pixel-width) (x-display-pixel-height)) 48))) + ;; Save default values + (let ((plist (plist-get (slot-value obj 'extra-plist) 'cursor))) + (setq plist (plist-put plist 'theme theme) + plist (plist-put plist 'size size)) + (setf (slot-value obj 'extra-plist) + (plist-put (slot-value obj 'extra-plist) 'cursor plist)))) + ;; Initialize render extension + (if (= 0 (slot-value (xcb:get-extension-data obj 'xcb:render) 'present)) + (error "[XELB:CURSOR] Render extension is not supported by this server") + (with-slots (minor-version) + (xcb:+request-unchecked+reply obj + (make-instance 'xcb:render:QueryVersion + :client-major-version 0 :client-minor-version 8)) + (if (> 8 minor-version) + (error "[XELB:CURSOR] Render version 0.8 is not supported") + (let* ((formats + (slot-value (xcb:+request-unchecked+reply obj + (make-instance 'xcb:render:QueryPictFormats)) + 'formats)) + (format (catch 'break + (dolist (i formats) + (with-slots (type depth direct) i + (with-slots (red-shift red-mask + green-shift green-mask + blue-shift blue-mask + alpha-shift alpha-mask) + direct + ;; FIXME: xcb/util-renderutil + (when (and (= type xcb:render:PictType:Direct) + (= depth 32) + (= red-shift 16) (= red-mask #xFF) + (= green-shift 8) (= green-mask #xFF) + (= blue-shift 0) (= blue-mask #xFF) + (= alpha-shift 24) + (= alpha-mask #xFF)) + (throw 'break i))))))) + (plist (plist-get (slot-value obj 'extra-plist) 'cursor))) + (setf (slot-value obj 'extra-plist) + (plist-put (slot-value obj 'extra-plist) 'cursor + (plist-put plist 'pict-format format)))))))) + +(defsubst xcb:cursor:-get-path () + "Return a list of cursor paths." + (let ((path (getenv "XCURSOR_PATH"))) + (if path + (split-string path ":" t) + '("~/.icons" + "/usr/share/icons" + "/usr/share/pixmaps" + "/usr/X11R6/lib/X11/icons")))) + +(defun xcb:cursor:-get-theme-inherits (file) + "Return the inherited themes in a index.theme file FILE." + (let ((lines (with-temp-buffer + (insert-file-contents file) + (split-string (buffer-string) "\n" t)))) + (catch 'break + (dolist (line lines) + (when (string-match "^Inherits\\s-*=\\s-*" line) + (throw 'break + (split-string (replace-regexp-in-string "^[^=]+=\\(.*\\)$" + "\\1" line) + "[;, \t\n]+" t))))))) + +(defsubst xcb:cursor:-shape->id (name) + "Return the standard Xcursor font for cursor named NAME." + ;; Standard X cursor fonts are defined in Emacs + (intern-soft (concat "x-pointer-" (replace-regexp-in-string "_" "-" name)))) + +(defun xcb:cursor:-find-file (theme name &optional skip) + "Return the file for cursor named NAME in theme THEME, or nil if not found." + (catch 'return + ;; Skip searched themes + (when (memq theme skip) + (throw 'return nil)) + ;; Give up when supplied "core" theme and a valid cursor name + (when (and (string= "core" theme) (xcb:cursor:-shape->id name)) + (throw 'return nil)) + (let ((path (xcb:cursor:-get-path)) + file) + ;; 1. try THEME/cursors/NAME in each cursor path + (dolist (i path) + (setq file (concat i "/" theme "/cursors/" name)) + (when (file-readable-p file) + (throw 'return file))) + ;; 2. try "Inherits=" key in "index.theme" + (dolist (i path) + (setq file (concat i "/" theme "/index.theme")) + (when (file-readable-p file) + (cl-pushnew theme skip) + ;; try all inherited themes + (dolist (j (xcb:cursor:-get-theme-inherits file)) + (setq file (xcb:cursor:-find-file j name skip)) + (when file + (throw 'return file)) + (cl-pushnew j skip))))) + nil)) + +(defconst xcb:cursor:-file-magic-lsb "Xcur" + "The magic number for little-endian Xcursor file.") +(defconst xcb:cursor:-file-magic-msb "rucX" + "The magic number for big-endian Xcursor file.") + +(defclass xcb:cursor:-file-header (xcb:-struct) + ((magic :type xcb:CARD32) + (header :type xcb:CARD32) + (version :type xcb:CARD32) + (ntoc :type xcb:CARD32)) ;redundant, required for calculating TOC bytes + :documentation "Xcursor file header.") + +(defclass xcb:cursor:-file-header-toc (xcb:-struct) + ((ntoc :type xcb:CARD32) ;redundant slot + (toc :type xcb:-ignore) + (toc~ :initform '(name toc type xcb:cursor:-file-toc + size (xcb:-fieldref 'ntoc)) + :type xcb:-list)) + :documentation "The TOC field in Xcursor file header.") + +(defclass xcb:cursor:-file-toc (xcb:-struct) + ((type :type xcb:CARD32) + (subtype :type xcb:CARD32) + (position :type xcb:CARD32)) + :documentation "Xcursor file TOC entry.") + +(defclass xcb:cursor:-file-chunk-header (xcb:-struct) + ((header :type xcb:CARD32) + (type :type xcb:CARD32) + (subtype :type xcb:CARD32) + (version :type xcb:CARD32) + (width :type xcb:CARD32) ;redundant, required for calculating image bytes + (height :type xcb:CARD32)) ;redundant, required for calculating image bytes + :documentation "Xcursor file chunk header.") + +(defconst xcb:cursor:-file-chunk-image-header 36 + "Header value of image-type chunk in Xcursor file.") +(defconst xcb:cursor:-file-chunk-image-type 4294770690. + "Type of image-type chunk in Xcursor file.") +(defconst xcb:cursor:-file-chunk-image-version 1 + "Version of image-type chunk in Xcursor file.") + +(defclass xcb:cursor:-file-chunk-image (xcb:-struct) + ((width :type xcb:CARD32) ;<= #x7FFF, redundant + (height :type xcb:CARD32) ;<= #x7FFF, redundant + (xhot :type xcb:CARD32) ;<= width + (yhot :type xcb:CARD32) ;<= height + (delay :type xcb:CARD32) ;in ms + (pixels :type xcb:-ignore) + (pixels~ :initform '(name pixels type xcb:CARD32 + size (* (xcb:-fieldref 'width) + (xcb:-fieldref 'height))) + :type xcb:-list)) + :documentation "Image-type chunk in Xcursor file.") + +(cl-defmethod xcb:cursor:-parse-file ((obj xcb:connection) path) + "Parse an Xcursor file named PATH." + (catch 'return + (let ((data (let ((coding-system-for-read 'binary)) + (with-temp-buffer + (set-buffer-multibyte nil) + (insert-file-contents path) (buffer-string)))) + xcb:lsb ;override global byte order + best-size chunks + magic file-header file-header-toc chunk-header chunk) + ;; Determine byte order + (setq magic (substring data 0 4)) + (if (string= xcb:cursor:-file-magic-lsb magic) + (setq xcb:lsb t) ;LSB first + (if (string= xcb:cursor:-file-magic-msb magic) + (setq xcb:lsb nil) ;MSB first + (throw 'return nil))) + (setq file-header (make-instance 'xcb:cursor:-file-header)) + ;; + (xcb:unmarshal file-header (substring data 0 16)) + ;; FIXME: checks + (setq file-header-toc (make-instance 'xcb:cursor:-file-header-toc)) + (xcb:unmarshal file-header-toc + (substring data 12 (+ 16 (* 12 (slot-value file-header + 'ntoc))))) + (with-slots (toc) file-header-toc + (let ((target (plist-get + (plist-get (slot-value obj 'extra-plist) 'cursor) + 'size))) + (catch 'break + (dolist (i toc) + (with-slots (type subtype) i + (when (= type xcb:cursor:-file-chunk-image-type) + (when (= target subtype) + (setq best-size target) + (throw 'break nil)) + (when (or (not best-size) + (> (abs (- target best-size)) + (abs (- target subtype)))) + (setq best-size subtype))))))) + ;; Collect chunks fitting this size + (setq chunk-header (make-instance 'xcb:cursor:-file-chunk-header)) + (dolist (i toc) + (with-slots (type subtype position) i + (when (and (= type xcb:cursor:-file-chunk-image-type) + (= subtype best-size)) + (xcb:unmarshal chunk-header (substring data position + (+ position 24))) + ;; Validate the header of this chunk + (with-slots (header type subtype version) chunk-header + (when (or (/= header xcb:cursor:-file-chunk-image-header) + (/= type xcb:cursor:-file-chunk-image-type) + (/= subtype best-size) + (/= version xcb:cursor:-file-chunk-image-version)) + (throw 'return nil))) + ;; Parse this chunk + (setq chunk (make-instance 'xcb:cursor:-file-chunk-image)) + (xcb:unmarshal chunk (substring data (+ position 16) + (+ position 36 + (* 4 + (slot-value chunk-header + 'width) + (slot-value chunk-header + 'height))))) + (setq chunks (nconc chunks (list chunk)))))) + (list xcb:lsb chunks))))) + +(cl-defmethod xcb:cursor:-load-cursor ((obj xcb:connection) file) + "Load a cursor file FILE." + (let* ((images (xcb:cursor:-parse-file obj file)) + (lsb (car images)) + (images (cadr images)) + (root (slot-value (car (slot-value (xcb:get-setup obj) 'roots)) + 'root)) + (picture (xcb:generate-id obj)) + (pict-format (slot-value + (plist-get + (plist-get (slot-value obj 'extra-plist) 'cursor) + 'pict-format) + 'id)) + pixmap gc cursors cursor last-width last-height) + (dolist (image images) + (with-slots (width height xhot yhot delay pixels) image + (when (or (not pixmap) (/= last-width width) (/= last-height height)) + (if pixmap + (progn (xcb:+request obj (make-instance 'xcb:FreePixmap + :pixmap pixmap)) + (xcb:+request obj (make-instance 'xcb:FreeGC :gc gc))) + (setq pixmap (xcb:generate-id obj) + gc (xcb:generate-id obj))) + (xcb:+request obj (make-instance 'xcb:CreatePixmap + :depth 32 :pid pixmap :drawable root + :width width :height height)) + (xcb:+request obj (make-instance 'xcb:CreateGC + :cid gc :drawable pixmap + :value-mask 0)) + (setq last-width width + last-height height)) + (xcb:+request obj (make-instance 'xcb:PutImage + :format xcb:ImageFormat:ZPixmap + :drawable pixmap + :gc gc + :width width + :height height + :dst-x 0 + :dst-y 0 + :left-pad 0 + :depth 32 + :data (with-temp-buffer + (set-buffer-multibyte nil) + (mapconcat + (if lsb #'xcb:-pack-u4-lsb + #'xcb:-pack-u4) + pixels [])))) + (xcb:+request obj (make-instance 'xcb:render:CreatePicture + :pid picture + :drawable pixmap + :format pict-format + :value-mask 0)) + (setq cursor (xcb:generate-id obj) + cursors (nconc cursors + (list (make-instance 'xcb:render:ANIMCURSORELT + :cursor cursor + :delay delay)))) + (xcb:+request obj (make-instance 'xcb:render:CreateCursor + :cid cursor + :source picture + :x xhot :y yhot)) + (xcb:+request obj (make-instance 'xcb:render:FreePicture + :picture picture)))) + (xcb:+request obj (make-instance 'xcb:FreePixmap :pixmap pixmap)) + (xcb:+request obj (make-instance 'xcb:FreeGC :gc gc)) + (xcb:flush obj) + (if (= 1 (length cursors)) + ;; Non-animated cursor + (slot-value (car cursors) 'cursor) + ;; Animated cursor + (setq cursor (xcb:generate-id obj)) + (xcb:+request obj (make-instance 'xcb:render:CreateAnimCursor + :cid cursor + :cursors (vconcat cursors))) + (dolist (i cursors) + (xcb:+request obj (make-instance 'xcb:FreeCursor + :cursor (slot-value i 'cursor)))) + (xcb:flush obj) + cursor))) + +(cl-defmethod xcb:cursor:load-cursor ((obj xcb:connection) name) + "Return a cursor whose name is NAME." + (let* ((theme (or (plist-get + (plist-get (slot-value obj 'extra-plist) 'cursor) 'theme) + "default")) + (file (xcb:cursor:-find-file theme name))) + (if file + (xcb:cursor:-load-cursor obj file) + ;; Fallback to standard X cursors + (let ((pointer (xcb:cursor:-shape->id name)) + (cursor xcb:Cursor:None) + font) + (when (boundp pointer) + (setq pointer (symbol-value pointer) + font (xcb:generate-id obj) + cursor (xcb:generate-id obj)) + (xcb:+request obj + (make-instance 'xcb:OpenFont + :fid font :name-len (length "cursor") + :name "cursor")) + (xcb:+request obj + (make-instance 'xcb:CreateGlyphCursor + :cid cursor :source-font font :mask-font font + :source-char pointer :mask-char (1+ pointer) + :fore-red 0 :fore-green 0 :fore-blue 0 + :back-red #xFFFF :back-green #xFFFF + :back-blue #xFFFF)) + (xcb:flush obj)) + cursor)))) + + + +(provide 'xcb-cursor) + +;;; xcb-cursor.el ends here diff --git a/elpa/xelb-0.18/xcb-damage.el b/elpa/xelb-0.18/xcb-damage.el new file mode 100644 index 0000000..6289caa --- /dev/null +++ b/elpa/xelb-0.18/xcb-damage.el @@ -0,0 +1,112 @@ +;;; xcb-damage.el --- X11 Damage extension -*- lexical-binding: t -*- + +;; Copyright (C) 2015-2019 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This file was generated by 'el_client.el' from 'damage.xml', +;; which you can retrieve from . + +;;; Code: + +(require 'xcb-types) + +(defconst xcb:damage:-extension-xname "DAMAGE") +(defconst xcb:damage:-extension-name "Damage") +(defconst xcb:damage:-major-version 1) +(defconst xcb:damage:-minor-version 1) + +(require 'xcb-xproto) + +(require 'xcb-xfixes) + +(xcb:deftypealias 'xcb:damage:DAMAGE 'xcb:-u4) + +(defconst xcb:damage:ReportLevel:RawRectangles 0) +(defconst xcb:damage:ReportLevel:DeltaRectangles 1) +(defconst xcb:damage:ReportLevel:BoundingBox 2) +(defconst xcb:damage:ReportLevel:NonEmpty 3) + +(defclass xcb:damage:BadDamage + (xcb:-error) + ((~code :initform 0))) + +(defclass xcb:damage:QueryVersion + (xcb:-request) + ((~opcode :initform 0 :type xcb:-u1) + (client-major-version :initarg :client-major-version :type xcb:CARD32) + (client-minor-version :initarg :client-minor-version :type xcb:CARD32))) +(defclass xcb:damage:QueryVersion~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (major-version :initarg :major-version :type xcb:CARD32) + (minor-version :initarg :minor-version :type xcb:CARD32) + (pad~1 :initform 16 :type xcb:-pad))) + +(defclass xcb:damage:Create + (xcb:-request) + ((~opcode :initform 1 :type xcb:-u1) + (damage :initarg :damage :type xcb:damage:DAMAGE) + (drawable :initarg :drawable :type xcb:DRAWABLE) + (level :initarg :level :type xcb:CARD8) + (pad~0 :initform 3 :type xcb:-pad))) + +(defclass xcb:damage:Destroy + (xcb:-request) + ((~opcode :initform 2 :type xcb:-u1) + (damage :initarg :damage :type xcb:damage:DAMAGE))) + +(defclass xcb:damage:Subtract + (xcb:-request) + ((~opcode :initform 3 :type xcb:-u1) + (damage :initarg :damage :type xcb:damage:DAMAGE) + (repair :initarg :repair :type xcb:xfixes:REGION) + (parts :initarg :parts :type xcb:xfixes:REGION))) + +(defclass xcb:damage:Add + (xcb:-request) + ((~opcode :initform 4 :type xcb:-u1) + (drawable :initarg :drawable :type xcb:DRAWABLE) + (region :initarg :region :type xcb:xfixes:REGION))) + +(defclass xcb:damage:Notify + (xcb:-event) + ((~code :initform 0) + (level :initarg :level :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (drawable :initarg :drawable :type xcb:DRAWABLE) + (damage :initarg :damage :type xcb:damage:DAMAGE) + (timestamp :initarg :timestamp :type xcb:TIMESTAMP) + (area :initarg :area :type xcb:RECTANGLE) + (geometry :initarg :geometry :type xcb:RECTANGLE))) + +(defconst xcb:damage:error-number-class-alist + '((0 . xcb:damage:BadDamage)) + "(error-number . error-class) alist.") + +(defconst xcb:damage:event-number-class-alist + '((0 . xcb:damage:Notify)) + "(event-number . event-class) alist.") + + + +(provide 'xcb-damage) + +;;; xcb-damage.el ends here diff --git a/elpa/xelb-0.18/xcb-debug.el b/elpa/xelb-0.18/xcb-debug.el new file mode 100644 index 0000000..d9d017f --- /dev/null +++ b/elpa/xelb-0.18/xcb-debug.el @@ -0,0 +1,126 @@ +;;; xcb-debug.el --- Debugging helpers for XELB -*- lexical-binding: t -*- + +;; Copyright (C) 2018-2019 Free Software Foundation, Inc. + +;; Author: Adrián Medraño Calvo + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This module collects functions that help in debugging XELB. + +;;; Code: + +(defvar xcb-debug:buffer "*XELB-DEBUG*" "Buffer to write debug messages to.") + +(defvar xcb-debug:backtrace-start-frame 5 + "From which frame to start collecting backtraces.") + +(defvar xcb-debug:log-time-function #'xcb-debug:log-uptime + "Function used for generating timestamps in XELB debug logs. + +Here are some predefined candidates: +`xcb-debug:log-uptime': Display the uptime of this Emacs instance. +`xcb-debug:log-time': Display time of day. +`nil': Disable timestamp.") + +(defun xcb-debug:log-uptime () + "Add uptime to XELB debug logs." + (emacs-uptime "[%.2h:%.2m:%.2s] ")) + +(defun xcb-debug:log-time () + "Add time of day to XELB debug logs." + (format-time-string "[%T] ")) + +(defun xcb-debug:-call-stack () + "Return the current call stack frames." + (let (frames frame + ;; No need to acount for our setq, while, let, ... + (index xcb-debug:backtrace-start-frame)) + (while (setq frame (backtrace-frame index)) + (push frame frames) + (cl-incf index)) + (cl-remove-if-not 'car frames))) + +(defmacro xcb-debug:compile-time-function-name () + "Get the name of outermost definition at expansion time." + (let* ((frame (cl-find-if + (lambda (frame) + (ignore-errors + (let ((clause (car (cl-third frame)))) + (or (equal clause 'defalias) + (equal clause 'cl-defmethod))))) + (reverse (xcb-debug:-call-stack)))) + (defn (cl-third frame)) + (deftype (car defn))) + (cl-case deftype + ((defalias) (symbol-name (cl-cadadr defn))) + ((cl-defmethod) (symbol-name (cadr defn))) + (t "")))) + +(defmacro xcb-debug:-with-debug-buffer (&rest forms) + "Evaluate FORMS making sure `xcb-debug:buffer' is correctly updated." + `(with-current-buffer (get-buffer-create xcb-debug:buffer) + (let (windows-eob) + ;; Note windows whose point is at EOB. + (dolist (w (get-buffer-window-list xcb-debug:buffer t 'nomini)) + (when (= (window-point w) (point-max)) + (push w windows-eob))) + (save-excursion + (goto-char (point-max)) + ,@forms) + ;; Restore point. + (dolist (w windows-eob) + (set-window-point w (point-max)))))) + +(defun xcb-debug:message (format-string &rest objects) + "Print a message to `xcb-debug:buffer'. + +The FORMAT-STRING argument follows the speficies how to print each of +the passed OBJECTS. See `format' for details." + (xcb-debug:-with-debug-buffer + (insert (apply #'format format-string objects)))) + +(defmacro xcb-debug:backtrace () + "Print a backtrace to the `xcb-debug:buffer'." + '(xcb-debug:-with-debug-buffer + (let ((standard-output (get-buffer-create xcb-debug:buffer))) + (backtrace)))) + +(defmacro xcb-debug:backtrace-on-error (&rest forms) + "Evaluate FORMS. Printing a backtrace if an error is signaled." + `(let ((debug-on-error t) + (debugger (lambda (&rest _) (xcb-debug:backtrace)))) + ,@forms)) + +(defun xcb-debug:clear () + "Clear the debug buffer." + (interactive) + (xcb-debug:-with-debug-buffer + (erase-buffer))) + +(defun xcb-debug:mark () + "Insert a mark in the debug buffer." + (interactive) + (xcb-debug:-with-debug-buffer + (insert " \n"))) + + + +(provide 'xcb-debug) + +;;; xcb-debug.el ends here diff --git a/elpa/xelb-0.18/xcb-dpms.el b/elpa/xelb-0.18/xcb-dpms.el new file mode 100644 index 0000000..a195d96 --- /dev/null +++ b/elpa/xelb-0.18/xcb-dpms.el @@ -0,0 +1,112 @@ +;;; xcb-dpms.el --- X11 DPMS extension -*- lexical-binding: t -*- + +;; Copyright (C) 2015-2019 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This file was generated by 'el_client.el' from 'dpms.xml', +;; which you can retrieve from . + +;;; Code: + +(require 'xcb-types) + +(defconst xcb:dpms:-extension-xname "DPMS") +(defconst xcb:dpms:-extension-name "DPMS") +(defconst xcb:dpms:-major-version 0) +(defconst xcb:dpms:-minor-version 0) + +(defclass xcb:dpms:GetVersion + (xcb:-request) + ((~opcode :initform 0 :type xcb:-u1) + (client-major-version :initarg :client-major-version :type xcb:CARD16) + (client-minor-version :initarg :client-minor-version :type xcb:CARD16))) +(defclass xcb:dpms:GetVersion~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (server-major-version :initarg :server-major-version :type xcb:CARD16) + (server-minor-version :initarg :server-minor-version :type xcb:CARD16))) + +(defclass xcb:dpms:Capable + (xcb:-request) + ((~opcode :initform 1 :type xcb:-u1))) +(defclass xcb:dpms:Capable~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (capable :initarg :capable :type xcb:BOOL) + (pad~1 :initform 23 :type xcb:-pad))) + +(defclass xcb:dpms:GetTimeouts + (xcb:-request) + ((~opcode :initform 2 :type xcb:-u1))) +(defclass xcb:dpms:GetTimeouts~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (standby-timeout :initarg :standby-timeout :type xcb:CARD16) + (suspend-timeout :initarg :suspend-timeout :type xcb:CARD16) + (off-timeout :initarg :off-timeout :type xcb:CARD16) + (pad~1 :initform 18 :type xcb:-pad))) + +(defclass xcb:dpms:SetTimeouts + (xcb:-request) + ((~opcode :initform 3 :type xcb:-u1) + (standby-timeout :initarg :standby-timeout :type xcb:CARD16) + (suspend-timeout :initarg :suspend-timeout :type xcb:CARD16) + (off-timeout :initarg :off-timeout :type xcb:CARD16))) + +(defclass xcb:dpms:Enable + (xcb:-request) + ((~opcode :initform 4 :type xcb:-u1))) + +(defclass xcb:dpms:Disable + (xcb:-request) + ((~opcode :initform 5 :type xcb:-u1))) + +(defconst xcb:dpms:DPMSMode:On 0) +(defconst xcb:dpms:DPMSMode:Standby 1) +(defconst xcb:dpms:DPMSMode:Suspend 2) +(defconst xcb:dpms:DPMSMode:Off 3) + +(defclass xcb:dpms:ForceLevel + (xcb:-request) + ((~opcode :initform 6 :type xcb:-u1) + (power-level :initarg :power-level :type xcb:CARD16))) + +(defclass xcb:dpms:Info + (xcb:-request) + ((~opcode :initform 7 :type xcb:-u1))) +(defclass xcb:dpms:Info~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (power-level :initarg :power-level :type xcb:CARD16) + (state :initarg :state :type xcb:BOOL) + (pad~1 :initform 21 :type xcb:-pad))) + + + +(provide 'xcb-dpms) + +;;; xcb-dpms.el ends here diff --git a/elpa/xelb-0.18/xcb-dri2.el b/elpa/xelb-0.18/xcb-dri2.el new file mode 100644 index 0000000..b41fed1 --- /dev/null +++ b/elpa/xelb-0.18/xcb-dri2.el @@ -0,0 +1,322 @@ +;;; xcb-dri2.el --- X11 DRI2 extension -*- lexical-binding: t -*- + +;; Copyright (C) 2015-2019 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This file was generated by 'el_client.el' from 'dri2.xml', +;; which you can retrieve from . + +;;; Code: + +(require 'xcb-types) + +(defconst xcb:dri2:-extension-xname "DRI2") +(defconst xcb:dri2:-extension-name "DRI2") +(defconst xcb:dri2:-major-version 1) +(defconst xcb:dri2:-minor-version 4) + +(require 'xcb-xproto) + +(defconst xcb:dri2:Attachment:BufferFrontLeft 0) +(defconst xcb:dri2:Attachment:BufferBackLeft 1) +(defconst xcb:dri2:Attachment:BufferFrontRight 2) +(defconst xcb:dri2:Attachment:BufferBackRight 3) +(defconst xcb:dri2:Attachment:BufferDepth 4) +(defconst xcb:dri2:Attachment:BufferStencil 5) +(defconst xcb:dri2:Attachment:BufferAccum 6) +(defconst xcb:dri2:Attachment:BufferFakeFrontLeft 7) +(defconst xcb:dri2:Attachment:BufferFakeFrontRight 8) +(defconst xcb:dri2:Attachment:BufferDepthStencil 9) +(defconst xcb:dri2:Attachment:BufferHiz 10) + +(defconst xcb:dri2:DriverType:DRI 0) +(defconst xcb:dri2:DriverType:VDPAU 1) + +(defconst xcb:dri2:EventType:ExchangeComplete 1) +(defconst xcb:dri2:EventType:BlitComplete 2) +(defconst xcb:dri2:EventType:FlipComplete 3) + +(defclass xcb:dri2:DRI2Buffer + (xcb:-struct) + ((attachment :initarg :attachment :type xcb:CARD32) + (name :initarg :name :type xcb:CARD32) + (pitch :initarg :pitch :type xcb:CARD32) + (cpp :initarg :cpp :type xcb:CARD32) + (flags :initarg :flags :type xcb:CARD32))) + +(defclass xcb:dri2:AttachFormat + (xcb:-struct) + ((attachment :initarg :attachment :type xcb:CARD32) + (format :initarg :format :type xcb:CARD32))) + +(defclass xcb:dri2:QueryVersion + (xcb:-request) + ((~opcode :initform 0 :type xcb:-u1) + (major-version :initarg :major-version :type xcb:CARD32) + (minor-version :initarg :minor-version :type xcb:CARD32))) +(defclass xcb:dri2:QueryVersion~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (major-version :initarg :major-version :type xcb:CARD32) + (minor-version :initarg :minor-version :type xcb:CARD32))) + +(defclass xcb:dri2:Connect + (xcb:-request) + ((~opcode :initform 1 :type xcb:-u1) + (window :initarg :window :type xcb:WINDOW) + (driver-type :initarg :driver-type :type xcb:CARD32))) +(defclass xcb:dri2:Connect~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (driver-name-length :initarg :driver-name-length :type xcb:CARD32) + (device-name-length :initarg :device-name-length :type xcb:CARD32) + (pad~1 :initform 16 :type xcb:-pad) + (driver-name~ :initform + '(name driver-name type xcb:char size + (xcb:-fieldref 'driver-name-length)) + :type xcb:-list) + (driver-name :initarg :driver-name :type xcb:-ignore) + (alignment-pad~ :initform + '(name alignment-pad type xcb:void size + (- + (logand + (+ + (xcb:-fieldref 'driver-name-length) + 3) + (lognot 3)) + (xcb:-fieldref 'driver-name-length))) + :type xcb:-list) + (alignment-pad :initarg :alignment-pad :type xcb:-ignore) + (device-name~ :initform + '(name device-name type xcb:char size + (xcb:-fieldref 'device-name-length)) + :type xcb:-list) + (device-name :initarg :device-name :type xcb:-ignore))) + +(defclass xcb:dri2:Authenticate + (xcb:-request) + ((~opcode :initform 2 :type xcb:-u1) + (window :initarg :window :type xcb:WINDOW) + (magic :initarg :magic :type xcb:CARD32))) +(defclass xcb:dri2:Authenticate~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (authenticated :initarg :authenticated :type xcb:CARD32))) + +(defclass xcb:dri2:CreateDrawable + (xcb:-request) + ((~opcode :initform 3 :type xcb:-u1) + (drawable :initarg :drawable :type xcb:DRAWABLE))) + +(defclass xcb:dri2:DestroyDrawable + (xcb:-request) + ((~opcode :initform 4 :type xcb:-u1) + (drawable :initarg :drawable :type xcb:DRAWABLE))) + +(defclass xcb:dri2:GetBuffers + (xcb:-request) + ((~opcode :initform 5 :type xcb:-u1) + (drawable :initarg :drawable :type xcb:DRAWABLE) + (count :initarg :count :type xcb:CARD32) + (attachments~ :initform + '(name attachments type xcb:CARD32 size nil) + :type xcb:-list) + (attachments :initarg :attachments :type xcb:-ignore))) +(defclass xcb:dri2:GetBuffers~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (width :initarg :width :type xcb:CARD32) + (height :initarg :height :type xcb:CARD32) + (count :initarg :count :type xcb:CARD32) + (pad~1 :initform 12 :type xcb:-pad) + (buffers~ :initform + '(name buffers type xcb:dri2:DRI2Buffer size + (xcb:-fieldref 'count)) + :type xcb:-list) + (buffers :initarg :buffers :type xcb:-ignore))) + +(defclass xcb:dri2:CopyRegion + (xcb:-request) + ((~opcode :initform 6 :type xcb:-u1) + (drawable :initarg :drawable :type xcb:DRAWABLE) + (region :initarg :region :type xcb:CARD32) + (dest :initarg :dest :type xcb:CARD32) + (src :initarg :src :type xcb:CARD32))) +(defclass xcb:dri2:CopyRegion~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32))) + +(defclass xcb:dri2:GetBuffersWithFormat + (xcb:-request) + ((~opcode :initform 7 :type xcb:-u1) + (drawable :initarg :drawable :type xcb:DRAWABLE) + (count :initarg :count :type xcb:CARD32) + (attachments~ :initform + '(name attachments type xcb:dri2:AttachFormat size nil) + :type xcb:-list) + (attachments :initarg :attachments :type xcb:-ignore))) +(defclass xcb:dri2:GetBuffersWithFormat~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (width :initarg :width :type xcb:CARD32) + (height :initarg :height :type xcb:CARD32) + (count :initarg :count :type xcb:CARD32) + (pad~1 :initform 12 :type xcb:-pad) + (buffers~ :initform + '(name buffers type xcb:dri2:DRI2Buffer size + (xcb:-fieldref 'count)) + :type xcb:-list) + (buffers :initarg :buffers :type xcb:-ignore))) + +(defclass xcb:dri2:SwapBuffers + (xcb:-request) + ((~opcode :initform 8 :type xcb:-u1) + (drawable :initarg :drawable :type xcb:DRAWABLE) + (target-msc-hi :initarg :target-msc-hi :type xcb:CARD32) + (target-msc-lo :initarg :target-msc-lo :type xcb:CARD32) + (divisor-hi :initarg :divisor-hi :type xcb:CARD32) + (divisor-lo :initarg :divisor-lo :type xcb:CARD32) + (remainder-hi :initarg :remainder-hi :type xcb:CARD32) + (remainder-lo :initarg :remainder-lo :type xcb:CARD32))) +(defclass xcb:dri2:SwapBuffers~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (swap-hi :initarg :swap-hi :type xcb:CARD32) + (swap-lo :initarg :swap-lo :type xcb:CARD32))) + +(defclass xcb:dri2:GetMSC + (xcb:-request) + ((~opcode :initform 9 :type xcb:-u1) + (drawable :initarg :drawable :type xcb:DRAWABLE))) +(defclass xcb:dri2:GetMSC~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (ust-hi :initarg :ust-hi :type xcb:CARD32) + (ust-lo :initarg :ust-lo :type xcb:CARD32) + (msc-hi :initarg :msc-hi :type xcb:CARD32) + (msc-lo :initarg :msc-lo :type xcb:CARD32) + (sbc-hi :initarg :sbc-hi :type xcb:CARD32) + (sbc-lo :initarg :sbc-lo :type xcb:CARD32))) + +(defclass xcb:dri2:WaitMSC + (xcb:-request) + ((~opcode :initform 10 :type xcb:-u1) + (drawable :initarg :drawable :type xcb:DRAWABLE) + (target-msc-hi :initarg :target-msc-hi :type xcb:CARD32) + (target-msc-lo :initarg :target-msc-lo :type xcb:CARD32) + (divisor-hi :initarg :divisor-hi :type xcb:CARD32) + (divisor-lo :initarg :divisor-lo :type xcb:CARD32) + (remainder-hi :initarg :remainder-hi :type xcb:CARD32) + (remainder-lo :initarg :remainder-lo :type xcb:CARD32))) +(defclass xcb:dri2:WaitMSC~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (ust-hi :initarg :ust-hi :type xcb:CARD32) + (ust-lo :initarg :ust-lo :type xcb:CARD32) + (msc-hi :initarg :msc-hi :type xcb:CARD32) + (msc-lo :initarg :msc-lo :type xcb:CARD32) + (sbc-hi :initarg :sbc-hi :type xcb:CARD32) + (sbc-lo :initarg :sbc-lo :type xcb:CARD32))) + +(defclass xcb:dri2:WaitSBC + (xcb:-request) + ((~opcode :initform 11 :type xcb:-u1) + (drawable :initarg :drawable :type xcb:DRAWABLE) + (target-sbc-hi :initarg :target-sbc-hi :type xcb:CARD32) + (target-sbc-lo :initarg :target-sbc-lo :type xcb:CARD32))) +(defclass xcb:dri2:WaitSBC~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (ust-hi :initarg :ust-hi :type xcb:CARD32) + (ust-lo :initarg :ust-lo :type xcb:CARD32) + (msc-hi :initarg :msc-hi :type xcb:CARD32) + (msc-lo :initarg :msc-lo :type xcb:CARD32) + (sbc-hi :initarg :sbc-hi :type xcb:CARD32) + (sbc-lo :initarg :sbc-lo :type xcb:CARD32))) + +(defclass xcb:dri2:SwapInterval + (xcb:-request) + ((~opcode :initform 12 :type xcb:-u1) + (drawable :initarg :drawable :type xcb:DRAWABLE) + (interval :initarg :interval :type xcb:CARD32))) + +(defclass xcb:dri2:GetParam + (xcb:-request) + ((~opcode :initform 13 :type xcb:-u1) + (drawable :initarg :drawable :type xcb:DRAWABLE) + (param :initarg :param :type xcb:CARD32))) +(defclass xcb:dri2:GetParam~reply + (xcb:-reply) + ((is-param-recognized :initarg :is-param-recognized :type xcb:BOOL) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (value-hi :initarg :value-hi :type xcb:CARD32) + (value-lo :initarg :value-lo :type xcb:CARD32))) + +(defclass xcb:dri2:BufferSwapComplete + (xcb:-event) + ((~code :initform 0) + (pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (event-type :initarg :event-type :type xcb:CARD16) + (pad~1 :initform 2 :type xcb:-pad) + (drawable :initarg :drawable :type xcb:DRAWABLE) + (ust-hi :initarg :ust-hi :type xcb:CARD32) + (ust-lo :initarg :ust-lo :type xcb:CARD32) + (msc-hi :initarg :msc-hi :type xcb:CARD32) + (msc-lo :initarg :msc-lo :type xcb:CARD32) + (sbc :initarg :sbc :type xcb:CARD32))) + +(defclass xcb:dri2:InvalidateBuffers + (xcb:-event) + ((~code :initform 1) + (pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (drawable :initarg :drawable :type xcb:DRAWABLE))) + +(defconst xcb:dri2:event-number-class-alist + '((0 . xcb:dri2:BufferSwapComplete) + (1 . xcb:dri2:InvalidateBuffers)) + "(event-number . event-class) alist.") + + + +(provide 'xcb-dri2) + +;;; xcb-dri2.el ends here diff --git a/elpa/xelb-0.18/xcb-dri3.el b/elpa/xelb-0.18/xcb-dri3.el new file mode 100644 index 0000000..befd78e --- /dev/null +++ b/elpa/xelb-0.18/xcb-dri3.el @@ -0,0 +1,207 @@ +;;; xcb-dri3.el --- X11 DRI3 extension -*- lexical-binding: t -*- + +;; Copyright (C) 2015-2019 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This file was generated by 'el_client.el' from 'dri3.xml', +;; which you can retrieve from . + +;;; Code: + +(require 'xcb-types) + +(defconst xcb:dri3:-extension-xname "DRI3") +(defconst xcb:dri3:-extension-name "DRI3") +(defconst xcb:dri3:-major-version 1) +(defconst xcb:dri3:-minor-version 2) + +(require 'xcb-xproto) + +(defclass xcb:dri3:QueryVersion + (xcb:-request) + ((~opcode :initform 0 :type xcb:-u1) + (major-version :initarg :major-version :type xcb:CARD32) + (minor-version :initarg :minor-version :type xcb:CARD32))) +(defclass xcb:dri3:QueryVersion~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (major-version :initarg :major-version :type xcb:CARD32) + (minor-version :initarg :minor-version :type xcb:CARD32))) + +(defclass xcb:dri3:Open + (xcb:-request) + ((~opcode :initform 1 :type xcb:-u1) + (drawable :initarg :drawable :type xcb:DRAWABLE) + (provider :initarg :provider :type xcb:CARD32))) +(defclass xcb:dri3:Open~reply + (xcb:-reply) + ((nfd :initarg :nfd :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (device-fd :type xcb:fd) + (pad~0 :initform 24 :type xcb:-pad))) + +(defclass xcb:dri3:PixmapFromBuffer + (xcb:-request) + ((~opcode :initform 2 :type xcb:-u1) + (pixmap :initarg :pixmap :type xcb:PIXMAP) + (drawable :initarg :drawable :type xcb:DRAWABLE) + (size :initarg :size :type xcb:CARD32) + (width :initarg :width :type xcb:CARD16) + (height :initarg :height :type xcb:CARD16) + (stride :initarg :stride :type xcb:CARD16) + (depth :initarg :depth :type xcb:CARD8) + (bpp :initarg :bpp :type xcb:CARD8) + (pixmap-fd :type xcb:fd))) + +(defclass xcb:dri3:BufferFromPixmap + (xcb:-request) + ((~opcode :initform 3 :type xcb:-u1) + (pixmap :initarg :pixmap :type xcb:PIXMAP))) +(defclass xcb:dri3:BufferFromPixmap~reply + (xcb:-reply) + ((nfd :initarg :nfd :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (size :initarg :size :type xcb:CARD32) + (width :initarg :width :type xcb:CARD16) + (height :initarg :height :type xcb:CARD16) + (stride :initarg :stride :type xcb:CARD16) + (depth :initarg :depth :type xcb:CARD8) + (bpp :initarg :bpp :type xcb:CARD8) + (pixmap-fd :type xcb:fd) + (pad~0 :initform 12 :type xcb:-pad))) + +(defclass xcb:dri3:FenceFromFD + (xcb:-request) + ((~opcode :initform 4 :type xcb:-u1) + (drawable :initarg :drawable :type xcb:DRAWABLE) + (fence :initarg :fence :type xcb:CARD32) + (initially-triggered :initarg :initially-triggered :type xcb:BOOL) + (pad~0 :initform 3 :type xcb:-pad) + (fence-fd :type xcb:fd))) + +(defclass xcb:dri3:FDFromFence + (xcb:-request) + ((~opcode :initform 5 :type xcb:-u1) + (drawable :initarg :drawable :type xcb:DRAWABLE) + (fence :initarg :fence :type xcb:CARD32))) +(defclass xcb:dri3:FDFromFence~reply + (xcb:-reply) + ((nfd :initarg :nfd :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (fence-fd :type xcb:fd) + (pad~0 :initform 24 :type xcb:-pad))) + +(defclass xcb:dri3:GetSupportedModifiers + (xcb:-request) + ((~opcode :initform 6 :type xcb:-u1) + (window :initarg :window :type xcb:CARD32) + (depth :initarg :depth :type xcb:CARD8) + (bpp :initarg :bpp :type xcb:CARD8) + (pad~0 :initform 2 :type xcb:-pad))) +(defclass xcb:dri3:GetSupportedModifiers~reply + (xcb:-reply) + ((pad~0 :initform 8 :type xcb:-pad-align) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 1 :type xcb:-pad) + (num-window-modifiers :initarg :num-window-modifiers :type xcb:CARD32) + (num-screen-modifiers :initarg :num-screen-modifiers :type xcb:CARD32) + (pad~2 :initform 16 :type xcb:-pad) + (window-modifiers~ :initform + '(name window-modifiers type xcb:CARD64 size + (xcb:-fieldref 'num-window-modifiers)) + :type xcb:-list) + (window-modifiers :initarg :window-modifiers :type xcb:-ignore) + (screen-modifiers~ :initform + '(name screen-modifiers type xcb:CARD64 size + (xcb:-fieldref 'num-screen-modifiers)) + :type xcb:-list) + (screen-modifiers :initarg :screen-modifiers :type xcb:-ignore))) + +(defclass xcb:dri3:PixmapFromBuffers + (xcb:-request) + ((~opcode :initform 7 :type xcb:-u1) + (pad~0 :initform 8 :type xcb:-pad-align) + (pixmap :initarg :pixmap :type xcb:PIXMAP) + (window :initarg :window :type xcb:WINDOW) + (num-buffers :initarg :num-buffers :type xcb:CARD8) + (pad~1 :initform 3 :type xcb:-pad) + (width :initarg :width :type xcb:CARD16) + (height :initarg :height :type xcb:CARD16) + (stride0 :initarg :stride0 :type xcb:CARD32) + (offset0 :initarg :offset0 :type xcb:CARD32) + (stride1 :initarg :stride1 :type xcb:CARD32) + (offset1 :initarg :offset1 :type xcb:CARD32) + (stride2 :initarg :stride2 :type xcb:CARD32) + (offset2 :initarg :offset2 :type xcb:CARD32) + (stride3 :initarg :stride3 :type xcb:CARD32) + (offset3 :initarg :offset3 :type xcb:CARD32) + (depth :initarg :depth :type xcb:CARD8) + (bpp :initarg :bpp :type xcb:CARD8) + (pad~2 :initform 2 :type xcb:-pad) + (modifier :initarg :modifier :type xcb:CARD64) + (buffers~ :initform + '(name buffers type xcb:fd size + (xcb:-fieldref 'num-buffers)) + :type xcb:-list) + (buffers :initarg :buffers :type xcb:-ignore))) + +(defclass xcb:dri3:BuffersFromPixmap + (xcb:-request) + ((~opcode :initform 8 :type xcb:-u1) + (pixmap :initarg :pixmap :type xcb:PIXMAP))) +(defclass xcb:dri3:BuffersFromPixmap~reply + (xcb:-reply) + ((pad~0 :initform 8 :type xcb:-pad-align) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (nfd :initarg :nfd :type xcb:CARD8) + (width :initarg :width :type xcb:CARD16) + (height :initarg :height :type xcb:CARD16) + (pad~1 :initform 4 :type xcb:-pad) + (modifier :initarg :modifier :type xcb:CARD64) + (depth :initarg :depth :type xcb:CARD8) + (bpp :initarg :bpp :type xcb:CARD8) + (pad~2 :initform 6 :type xcb:-pad) + (strides~ :initform + '(name strides type xcb:CARD32 size + (xcb:-fieldref 'nfd)) + :type xcb:-list) + (strides :initarg :strides :type xcb:-ignore) + (offsets~ :initform + '(name offsets type xcb:CARD32 size + (xcb:-fieldref 'nfd)) + :type xcb:-list) + (offsets :initarg :offsets :type xcb:-ignore) + (buffers~ :initform + '(name buffers type xcb:fd size + (xcb:-fieldref 'nfd)) + :type xcb:-list) + (buffers :initarg :buffers :type xcb:-ignore))) + + + +(provide 'xcb-dri3) + +;;; xcb-dri3.el ends here diff --git a/elpa/xelb-0.18/xcb-ewmh.el b/elpa/xelb-0.18/xcb-ewmh.el new file mode 100644 index 0000000..fa988a5 --- /dev/null +++ b/elpa/xelb-0.18/xcb-ewmh.el @@ -0,0 +1,752 @@ +;;; xcb-ewmh.el --- Extended Window Manager Hints -*- lexical-binding: t -*- + +;; Copyright (C) 2015-2019 Free Software Foundation, Inc. + +;; Author: Chris Feng + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This library implements EWMH the same way as xcb/util-wm. + +;; Usage tips: +;; + Do not forget to call `xcb:ewmh:init' for _every_ connection using +;; this library. +;; + Use `xcb:ewmh:SendEvent' instead of `xcb:SendEvent' to send client +;; messages defined in this library. +;; + Initializing this library auto loads and initializes 'xcb-icccm'. + +;; References: +;; + EWMH (http://standards.freedesktop.org/wm-spec/wm-spec-latest.html) +;; + xcb/util-wm (git://anongit.freedesktop.org/xcb/util-wm) + +;;; Code: + +(require 'xcb) +(require 'xcb-icccm) + +;;;; EWMH Atoms + +(eval-and-compile + (defconst xcb:ewmh:-atoms + '( ;; Root Window Properties (and Related Messages) + _NET_SUPPORTED + _NET_CLIENT_LIST + _NET_CLIENT_LIST_STACKING + _NET_NUMBER_OF_DESKTOPS + _NET_DESKTOP_GEOMETRY + _NET_DESKTOP_VIEWPORT + _NET_CURRENT_DESKTOP + _NET_DESKTOP_NAMES + _NET_ACTIVE_WINDOW + _NET_WORKAREA + _NET_SUPPORTING_WM_CHECK + _NET_VIRTUAL_ROOTS + _NET_DESKTOP_LAYOUT + _NET_SHOWING_DESKTOP + ;; Other Root Window Messages + _NET_CLOSE_WINDOW + _NET_MOVERESIZE_WINDOW + _NET_WM_MOVERESIZE + _NET_RESTACK_WINDOW + _NET_REQUEST_FRAME_EXTENTS + ;; Application Window Properties + _NET_WM_NAME + _NET_WM_VISIBLE_NAME + _NET_WM_ICON_NAME + _NET_WM_VISIBLE_ICON_NAME + _NET_WM_DESKTOP + _NET_WM_WINDOW_TYPE + _NET_WM_STATE + _NET_WM_ALLOWED_ACTIONS + _NET_WM_STRUT + _NET_WM_STRUT_PARTIAL + _NET_WM_ICON_GEOMETRY + _NET_WM_ICON + _NET_WM_PID + _NET_WM_HANDLED_ICONS + _NET_WM_USER_TIME + _NET_WM_USER_TIME_WINDOW + _NET_FRAME_EXTENTS + _NET_WM_OPAQUE_REGION + _NET_WM_BYPASS_COMPOSITOR + ;; Window Manager Protocols + _NET_WM_PING + _NET_WM_SYNC_REQUEST + _NET_WM_SYNC_REQUEST_COUNTER + _NET_WM_FULLSCREEN_MONITORS + ;; Other Properties + _NET_WM_FULL_PLACEMENT + _NET_WM_CM_S0 ;_NET_WM_CM_Sn (n = 1, 2, ...) are left out here. + ;; _NET_WM_WINDOW_TYPE hint + _NET_WM_WINDOW_TYPE_DESKTOP + _NET_WM_WINDOW_TYPE_DOCK + _NET_WM_WINDOW_TYPE_TOOLBAR + _NET_WM_WINDOW_TYPE_MENU + _NET_WM_WINDOW_TYPE_UTILITY + _NET_WM_WINDOW_TYPE_SPLASH + _NET_WM_WINDOW_TYPE_DIALOG + _NET_WM_WINDOW_TYPE_DROPDOWN_MENU + _NET_WM_WINDOW_TYPE_POPUP_MENU + _NET_WM_WINDOW_TYPE_TOOLTIP + _NET_WM_WINDOW_TYPE_NOTIFICATION + _NET_WM_WINDOW_TYPE_COMBO + _NET_WM_WINDOW_TYPE_DND + _NET_WM_WINDOW_TYPE_NORMAL + ;; _NET_WM_STATE hint + _NET_WM_STATE_MODAL + _NET_WM_STATE_STICKY + _NET_WM_STATE_MAXIMIZED_VERT + _NET_WM_STATE_MAXIMIZED_HORZ + _NET_WM_STATE_SHADED + _NET_WM_STATE_SKIP_TASKBAR + _NET_WM_STATE_SKIP_PAGER + _NET_WM_STATE_HIDDEN + _NET_WM_STATE_FULLSCREEN + _NET_WM_STATE_ABOVE + _NET_WM_STATE_BELOW + _NET_WM_STATE_DEMANDS_ATTENTION + _NET_WM_STATE_FOCUSED + ;; _NET_WM_ACTION hint + _NET_WM_ACTION_MOVE + _NET_WM_ACTION_RESIZE + _NET_WM_ACTION_MINIMIZE + _NET_WM_ACTION_SHADE + _NET_WM_ACTION_STICK + _NET_WM_ACTION_MAXIMIZE_HORZ + _NET_WM_ACTION_MAXIMIZE_VERT + _NET_WM_ACTION_FULLSCREEN + _NET_WM_ACTION_CHANGE_DESKTOP + _NET_WM_ACTION_CLOSE + _NET_WM_ACTION_ABOVE + _NET_WM_ACTION_BELOW) + "EWMH atoms.") + + (dolist (atom xcb:ewmh:-atoms) + (eval `(defvar ,(intern (concat "xcb:Atom:" (symbol-name atom))) nil)))) + +(cl-defmethod xcb:ewmh:init ((obj xcb:connection) &optional force) + "Initialize EWMH module. + +This method must be called before using any other method in this module. + +This method also initializes ICCCM module automatically." + (when (or force (not xcb:Atom:_NET_SUPPORTED)) + (xcb:icccm:init obj) ;required + (let ((atoms xcb:ewmh:-atoms)) + (dotimes (i (1- (x-display-screens))) + (push (intern (format "_NET_WM_CM_S%d" (1+ i))) atoms)) + (xcb:icccm:intern-atoms obj atoms force)))) + +;;;; Client message + +(defclass xcb:ewmh:SendEvent (xcb:SendEvent) + ((propagate :initform 0) + (event-mask :initform (logior xcb:EventMask:SubstructureNotify + xcb:EventMask:SubstructureRedirect))) + :documentation "A fork of `xcb:SendEvent' to send EWMH client message. + +Note that this only applies to \"sending a message to the root window\" in +EWMH") + +(defclass xcb:ewmh:-ClientMessage (xcb:icccm:--ClientMessage xcb:ClientMessage) + ((format :initform 32))) + +;;;; Abstract classes for getting/changing (UTF-8) string properties + +(defclass xcb:ewmh:-GetProperty-utf8 (xcb:icccm:-GetProperty-text) + ((type :initform xcb:Atom:UTF8_STRING)) + :documentation "Get an EWMH UTF-8 text property (request part).") +(defclass xcb:ewmh:-GetProperty-utf8~reply (xcb:icccm:-GetProperty-text~reply) + nil + :documentation "Get an EWMH UTF-8 text property (reply part).") +(defclass xcb:ewmh:-ChangeProperty-utf8 (xcb:icccm:-ChangeProperty-text) + ((type :initform xcb:Atom:UTF8_STRING)) + :documentation "Change an EWMH UTF-8 text property.") + +;;;; Root Window Properties (and Related Messages) + +;; _NET_SUPPORTED +(defclass xcb:ewmh:get-_NET_SUPPORTED (xcb:icccm:-GetProperty) + ((property :initform xcb:Atom:_NET_SUPPORTED) + (type :initform xcb:Atom:ATOM))) +(defclass xcb:ewmh:get-_NET_SUPPORTED~reply (xcb:icccm:-GetProperty~reply) + nil) +(defclass xcb:ewmh:set-_NET_SUPPORTED (xcb:icccm:-ChangeProperty) + ((property :initform xcb:Atom:_NET_SUPPORTED) + (type :initform xcb:Atom:ATOM))) + +;; _NET_CLIENT_LIST +(defclass xcb:ewmh:get-_NET_CLIENT_LIST (xcb:icccm:-GetProperty) + ((property :initform xcb:Atom:_NET_CLIENT_LIST) + (type :initform xcb:Atom:WINDOW))) +(defclass xcb:ewmh:get-_NET_CLIENT_LIST~reply (xcb:icccm:-GetProperty~reply) + nil) +(defclass xcb:ewmh:set-_NET_CLIENT_LIST (xcb:icccm:-ChangeProperty) + ((property :initform xcb:Atom:_NET_CLIENT_LIST) + (type :initform xcb:Atom:WINDOW))) + +;; _NET_CLIENT_LIST_STACKING +(defclass xcb:ewmh:get-_NET_CLIENT_LIST_STACKING (xcb:icccm:-GetProperty) + ((property :initform xcb:Atom:_NET_CLIENT_LIST_STACKING) + (type :initform xcb:Atom:WINDOW))) +(defclass xcb:ewmh:get-_NET_CLIENT_LIST_STACKING~reply + (xcb:icccm:-GetProperty~reply) + nil) +(defclass xcb:ewmh:set-_NET_CLIENT_LIST_STACKING (xcb:icccm:-ChangeProperty) + ((property :initform xcb:Atom:_NET_CLIENT_LIST_STACKING) + (type :initform xcb:Atom:WINDOW))) + +;; _NET_NUMBER_OF_DESKTOPS +(defclass xcb:ewmh:get-_NET_NUMBER_OF_DESKTOPS (xcb:icccm:-GetProperty-single) + ((property :initform xcb:Atom:_NET_NUMBER_OF_DESKTOPS) + (type :initform xcb:Atom:CARDINAL))) +(defclass xcb:ewmh:get-_NET_NUMBER_OF_DESKTOPS~reply + (xcb:icccm:-GetProperty-single~reply) + nil) +(defclass xcb:ewmh:set-_NET_NUMBER_OF_DESKTOPS + (xcb:icccm:-ChangeProperty-single) + ((property :initform xcb:Atom:_NET_NUMBER_OF_DESKTOPS) + (type :initform xcb:Atom:CARDINAL))) + +;; _NET_DESKTOP_GEOMETRY +(defclass xcb:ewmh:-_NET_DESKTOP_GEOMETRY (xcb:--struct) + ((width :initarg :width :type xcb:-ignore) + (height :initarg :height :type xcb:-ignore))) +;; +(defclass xcb:ewmh:get-_NET_DESKTOP_GEOMETRY (xcb:icccm:-GetProperty-explicit) + ((property :initform xcb:Atom:_NET_DESKTOP_GEOMETRY) + (type :initform xcb:Atom:CARDINAL) + (long-length :initform 2))) +(defclass xcb:ewmh:get-_NET_DESKTOP_GEOMETRY~reply + (xcb:icccm:-GetProperty-explicit~reply xcb:ewmh:-_NET_DESKTOP_GEOMETRY) + nil) +(defclass xcb:ewmh:set-_NET_DESKTOP_GEOMETRY + (xcb:icccm:-ChangeProperty-explicit xcb:ewmh:-_NET_DESKTOP_GEOMETRY) + ((property :initform xcb:Atom:_NET_DESKTOP_GEOMETRY) + (type :initform xcb:Atom:CARDINAL))) +(defclass xcb:ewmh:_NET_DESKTOP_GEOMETRY + (xcb:ewmh:-ClientMessage xcb:ewmh:-_NET_DESKTOP_GEOMETRY) + ((type :initform xcb:Atom:_NET_DESKTOP_GEOMETRY))) + +;; _NET_DESKTOP_VIEWPORT +(defclass xcb:ewmh:get-_NET_DESKTOP_VIEWPORT (xcb:icccm:-GetProperty) + ((property :initform xcb:Atom:_NET_DESKTOP_VIEWPORT) + (type :initform xcb:Atom:CARDINAL))) +(defclass xcb:ewmh:get-_NET_DESKTOP_VIEWPORT~reply + (xcb:icccm:-GetProperty~reply) + nil) +(defclass xcb:ewmh:set-_NET_DESKTOP_VIEWPORT (xcb:icccm:-ChangeProperty) + ((property :initform xcb:Atom:_NET_DESKTOP_VIEWPORT) + (type :initform xcb:Atom:CARDINAL))) +(defclass xcb:ewmh:_NET_DESKTOP_VIEWPORT (xcb:ewmh:-ClientMessage) + ((type :initform xcb:Atom:_NET_DESKTOP_VIEWPORT) + (new-vx :initarg :new-vx :type xcb:CARD32) + (new-vy :initarg :new-vy :type xcb:CARD32))) + +;; _NET_CURRENT_DESKTOP +(defclass xcb:ewmh:get-_NET_CURRENT_DESKTOP (xcb:icccm:-GetProperty-single) + ((property :initform xcb:Atom:_NET_CURRENT_DESKTOP) + (type :initform xcb:Atom:CARDINAL))) +(defclass xcb:ewmh:get-_NET_CURRENT_DESKTOP~reply + (xcb:icccm:-GetProperty-single~reply) + nil) +(defclass xcb:ewmh:set-_NET_CURRENT_DESKTOP (xcb:icccm:-ChangeProperty-single) + ((property :initform xcb:Atom:_NET_CURRENT_DESKTOP) + (type :initform xcb:Atom:CARDINAL))) +(defclass xcb:ewmh:_NET_CURRENT_DESKTOP (xcb:ewmh:-ClientMessage) + ((type :initform xcb:Atom:_NET_CURRENT_DESKTOP) + (new-index :initarg :new-index :type xcb:CARD32) + (timestamp :initarg :timestamp :type xcb:CARD32))) + +;; _NET_DESKTOP_NAMES +(defclass xcb:ewmh:get-_NET_DESKTOP_NAMES (xcb:ewmh:-GetProperty-utf8) + ((property :initform xcb:Atom:_NET_DESKTOP_NAMES))) +(defclass xcb:ewmh:get-_NET_DESKTOP_NAMES~reply + (xcb:ewmh:-GetProperty-utf8~reply) + nil) +(defclass xcb:ewmh:set-_NET_DESKTOP_NAMES (xcb:ewmh:-ChangeProperty-utf8) + ((property :initform xcb:Atom:_NET_DESKTOP_NAMES))) + +;; _NET_ACTIVE_WINDOW +(defclass xcb:ewmh:get-_NET_ACTIVE_WINDOW (xcb:icccm:-GetProperty-single) + ((property :initform xcb:Atom:_NET_ACTIVE_WINDOW) + (type :initform xcb:Atom:WINDOW))) +(defclass xcb:ewmh:get-_NET_ACTIVE_WINDOW~reply + (xcb:icccm:-GetProperty-single~reply) + nil) +(defclass xcb:ewmh:set-_NET_ACTIVE_WINDOW (xcb:icccm:-ChangeProperty-single) + ((property :initform xcb:Atom:_NET_ACTIVE_WINDOW) + (type :initform xcb:Atom:WINDOW))) +(defclass xcb:ewmh:_NET_ACTIVE_WINDOW (xcb:ewmh:-ClientMessage) + ((type :initform xcb:Atom:_NET_ACTIVE_WINDOW) + (source-indication :initarg :source-indication :type xcb:CARD32) + (timestamp :initarg :timestamp :type xcb:CARD32) + (current-active-window :initarg :current-active-window :type xcb:WINDOW))) + +;; _NET_WORKAREA +(defclass xcb:ewmh:get-_NET_WORKAREA (xcb:icccm:-GetProperty) + ((property :initform xcb:Atom:_NET_WORKAREA) + (type :initform xcb:Atom:CARDINAL))) +(defclass xcb:ewmh:get-_NET_WORKAREA~reply (xcb:icccm:-GetProperty~reply) + nil) +(defclass xcb:ewmh:set-_NET_WORKAREA (xcb:icccm:-ChangeProperty) + ((property :initform xcb:Atom:_NET_WORKAREA) + (type :initform xcb:Atom:CARDINAL))) + +;; _NET_SUPPORTING_WM_CHECK +(defclass xcb:ewmh:get-_NET_SUPPORTING_WM_CHECK (xcb:icccm:-GetProperty-single) + ((property :initform xcb:Atom:_NET_SUPPORTING_WM_CHECK) + (type :initform xcb:Atom:WINDOW))) +(defclass xcb:ewmh:get-_NET_SUPPORTING_WM_CHECK~reply + (xcb:icccm:-GetProperty-single~reply) + nil) +(defclass xcb:ewmh:set-_NET_SUPPORTING_WM_CHECK + (xcb:icccm:-ChangeProperty-single) + ((property :initform xcb:Atom:_NET_SUPPORTING_WM_CHECK) + (type :initform xcb:Atom:WINDOW))) + +;; _NET_VIRTUAL_ROOTS +(defclass xcb:ewmh:get-_NET_VIRTUAL_ROOTS (xcb:icccm:-GetProperty) + ((property :initform xcb:Atom:_NET_VIRTUAL_ROOTS) + (type :initform xcb:Atom:WINDOW))) +(defclass xcb:ewmh:get-_NET_VIRTUAL_ROOTS~reply (xcb:icccm:-GetProperty~reply) + nil) +(defclass xcb:ewmh:set-_NET_VIRTUAL_ROOTS (xcb:icccm:-ChangeProperty) + ((property :initform xcb:Atom:_NET_VIRTUAL_ROOTS) + (type :initform xcb:Atom:WINDOW))) + +;; _NET_DESKTOP_LAYOUT +;; Orientations +(defconst xcb:ewmh:_NET_WM_ORIENTATION_HORZ 0) +(defconst xcb:ewmh:_NET_WM_ORIENTATION_VERT 1) +;; Starting corners +(defconst xcb:ewmh:_NET_WM_TOPLEFT 0) +(defconst xcb:ewmh:_NET_WM_TOPRIGHT 1) +(defconst xcb:ewmh:_NET_WM_BOTTOMRIGHT 2) +(defconst xcb:ewmh:_NET_WM_BOTTOMLEFT 3) +;; +(defclass xcb:ewmh:-_NET_DESKTOP_LAYOUT (xcb:--struct) + ((orientation :initarg :orientation :type xcb:-ignore) + (columns :initarg :columns :type xcb:-ignore) + (rows :initarg :rows :type xcb:-ignore) + (starting-corner :initarg :starting-corner :type xcb:-ignore))) +;; +(defclass xcb:ewmh:get-_NET_DESKTOP_LAYOUT (xcb:icccm:-GetProperty-explicit) + ((property :initform xcb:Atom:_NET_DESKTOP_LAYOUT) + (type :initform xcb:Atom:CARDINAL) + (long-length :initform 4))) +(defclass xcb:ewmh:get-_NET_DESKTOP_LAYOUT~reply + (xcb:icccm:-GetProperty-explicit~reply xcb:ewmh:-_NET_DESKTOP_LAYOUT) + nil) +(defclass xcb:ewmh:set-_NET_DESKTOP_LAYOUT + (xcb:icccm:-ChangeProperty-explicit xcb:ewmh:-_NET_DESKTOP_LAYOUT) + ((property :initform xcb:Atom:_NET_DESKTOP_LAYOUT) + (type :initform xcb:Atom:CARDINAL))) + +;; _NET_SHOWING_DESKTOP +(defclass xcb:ewmh:get-_NET_SHOWING_DESKTOP (xcb:icccm:-GetProperty-single) + ((property :initform xcb:Atom:_NET_SHOWING_DESKTOP) + (type :initform xcb:Atom:CARDINAL))) +(defclass xcb:ewmh:get-_NET_SHOWING_DESKTOP~reply + (xcb:icccm:-GetProperty-single~reply) + nil) +(defclass xcb:ewmh:set-_NET_SHOWING_DESKTOP (xcb:icccm:-ChangeProperty-single) + ((property :initform xcb:Atom:_NET_SHOWING_DESKTOP) + (type :initform xcb:Atom:CARDINAL))) +(defclass xcb:ewmh:_NET_SHOWING_DESKTOP (xcb:ewmh:-ClientMessage) + ((type :initform xcb:Atom:_NET_SHOWING_DESKTOP) + (show :initarg :show :type xcb:CARD32))) + +;;;; Other Root Window Messages + +;; _NET_CLOSE_WINDOW +(defclass xcb:ewmh:_NET_CLOSE_WINDOW (xcb:ewmh:-ClientMessage) + ((type :initform xcb:Atom:_NET_CLOSE_WINDOW) + (timestamp :initarg :timestamp :type xcb:CARD32) + (source-indication :initarg :source-indication :type xcb:CARD32))) + +;; _NET_MOVERESIZE_WINDOW +(defclass xcb:ewmh:_NET_MOVERESIZE_WINDOW (xcb:ewmh:-ClientMessage) + ((type :initform xcb:Atom:_NET_MOVERESIZE_WINDOW) + (gravity-and-flags :initarg :gravity-and-flags :type xcb:CARD32) + (x :initarg :x :type xcb:CARD32) + (y :initarg :y :type xcb:CARD32) + (width :initarg :width :type xcb:CARD32) + (height :initarg :height :type xcb:CARD32))) + +;; _NET_WM_MOVERESIZE +(defconst xcb:ewmh:_NET_WM_MOVERESIZE_SIZE_TOPLEFT 0) +(defconst xcb:ewmh:_NET_WM_MOVERESIZE_SIZE_TOP 1) +(defconst xcb:ewmh:_NET_WM_MOVERESIZE_SIZE_TOPRIGHT 2) +(defconst xcb:ewmh:_NET_WM_MOVERESIZE_SIZE_RIGHT 3) +(defconst xcb:ewmh:_NET_WM_MOVERESIZE_SIZE_BOTTOMRIGHT 4) +(defconst xcb:ewmh:_NET_WM_MOVERESIZE_SIZE_BOTTOM 5) +(defconst xcb:ewmh:_NET_WM_MOVERESIZE_SIZE_BOTTOMLEFT 6) +(defconst xcb:ewmh:_NET_WM_MOVERESIZE_SIZE_LEFT 7) +(defconst xcb:ewmh:_NET_WM_MOVERESIZE_MOVE 8) +(defconst xcb:ewmh:_NET_WM_MOVERESIZE_SIZE_KEYBOARD 9) +(defconst xcb:ewmh:_NET_WM_MOVERESIZE_MOVE_KEYBOARD 10) +(defconst xcb:ewmh:_NET_WM_MOVERESIZE_CANCEL 11) +;; +(defclass xcb:ewmh:_NET_WM_MOVERESIZE (xcb:ewmh:-ClientMessage) + ((type :initform xcb:Atom:_NET_WM_MOVERESIZE) + (x-root :initarg :x-root :type xcb:CARD32) + (y-root :initarg :y-root :type xcb:CARD32) + (direction :initarg :direction :type xcb:CARD32) + (button :initarg :button :type xcb:CARD32) + (source-indication :initarg :source-indication :type xcb:CARD32))) + +;; _NET_RESTACK_WINDOW +(defclass xcb:ewmh:_NET_RESTACK_WINDOW (xcb:ewmh:-ClientMessage) + ((type :initform xcb:Atom:_NET_RESTACK_WINDOW) + (source-indication :initarg :source-indication :type xcb:CARD32) + (sibling :initarg :sibling :type xcb:WINDOW) + (detail :initarg :detail :type xcb:CARD32))) + +;; _NET_REQUEST_FRAME_EXTENTS +(defclass xcb:ewmh:_NET_REQUEST_FRAME_EXTENTS (xcb:ewmh:-ClientMessage) + ((type :initform xcb:Atom:_NET_REQUEST_FRAME_EXTENTS))) + +;;;; Application Window Properties + +;; _NET_WM_NAME +(defclass xcb:ewmh:get-_NET_WM_NAME (xcb:ewmh:-GetProperty-utf8) + ((property :initform xcb:Atom:_NET_WM_NAME))) +(defclass xcb:ewmh:get-_NET_WM_NAME~reply (xcb:ewmh:-GetProperty-utf8~reply) + nil) +(defclass xcb:ewmh:set-_NET_WM_NAME (xcb:ewmh:-ChangeProperty-utf8) + ((property :initform xcb:Atom:_NET_WM_NAME))) + +;; _NET_WM_VISIBLE_NAME +(defclass xcb:ewmh:get-_NET_WM_VISIBLE_NAME (xcb:ewmh:-GetProperty-utf8) + ((property :initform xcb:Atom:_NET_WM_VISIBLE_NAME))) +(defclass xcb:ewmh:get-_NET_WM_VISIBLE_NAME~reply + (xcb:ewmh:-GetProperty-utf8~reply) + nil) +(defclass xcb:ewmh:set-_NET_WM_VISIBLE_NAME (xcb:ewmh:-ChangeProperty-utf8) + ((property :initform xcb:Atom:_NET_WM_VISIBLE_NAME))) + +;; _NET_WM_ICON_NAME +(defclass xcb:ewmh:get-_NET_WM_ICON_NAME (xcb:ewmh:-GetProperty-utf8) + ((property :initform xcb:Atom:_NET_WM_ICON_NAME))) +(defclass xcb:ewmh:get-_NET_WM_ICON_NAME~reply + (xcb:ewmh:-GetProperty-utf8~reply) + nil) +(defclass xcb:ewmh:set-_NET_WM_ICON_NAME (xcb:ewmh:-ChangeProperty-utf8) + ((property :initform xcb:Atom:_NET_WM_ICON_NAME))) + +;; _NET_WM_VISIBLE_ICON_NAME +(defclass xcb:ewmh:get-_NET_WM_VISIBLE_ICON_NAME (xcb:ewmh:-GetProperty-utf8) + ((property :initform xcb:Atom:_NET_WM_VISIBLE_ICON_NAME))) +(defclass xcb:ewmh:get-_NET_WM_VISIBLE_ICON_NAME~reply + (xcb:ewmh:-GetProperty-utf8~reply) + nil) +(defclass xcb:ewmh:set-_NET_WM_VISIBLE_ICON_NAME + (xcb:ewmh:-ChangeProperty-utf8) + ((property :initform xcb:Atom:_NET_WM_VISIBLE_ICON_NAME))) + +;; _NET_WM_DESKTOP +(defclass xcb:ewmh:get-_NET_WM_DESKTOP (xcb:icccm:-GetProperty-single) + ((property :initform xcb:Atom:_NET_WM_DESKTOP) + (type :initform xcb:Atom:CARDINAL))) +(defclass xcb:ewmh:get-_NET_WM_DESKTOP~reply + (xcb:icccm:-GetProperty-single~reply) + nil) +(defclass xcb:ewmh:set-_NET_WM_DESKTOP (xcb:icccm:-ChangeProperty-single) + ((property :initform xcb:Atom:_NET_WM_DESKTOP) + (type :initform xcb:Atom:CARDINAL))) +(defclass xcb:ewmh:_NET_WM_DESKTOP (xcb:ewmh:-ClientMessage) + ((type :initform xcb:Atom:_NET_WM_DESKTOP) + (new-desktop :initarg :new-desktop :type xcb:CARD32) + (source-indication :initarg :source-indication :type xcb:CARD32))) + +;; _NET_WM_WINDOW_TYPE +(defclass xcb:ewmh:get-_NET_WM_WINDOW_TYPE (xcb:icccm:-GetProperty) + ((property :initform xcb:Atom:_NET_WM_WINDOW_TYPE) + (type :initform xcb:Atom:ATOM))) +(defclass xcb:ewmh:get-_NET_WM_WINDOW_TYPE~reply (xcb:icccm:-GetProperty~reply) + nil) +(defclass xcb:ewmh:set-_NET_WM_WINDOW_TYPE (xcb:icccm:-ChangeProperty) + ((property :initform xcb:Atom:_NET_WM_WINDOW_TYPE) + (type :initform xcb:Atom:ATOM))) + +;; _NET_WM_STATE +(defconst xcb:ewmh:_NET_WM_STATE_REMOVE 0) +(defconst xcb:ewmh:_NET_WM_STATE_ADD 1) +(defconst xcb:ewmh:_NET_WM_STATE_TOGGLE 2) +;; +(defclass xcb:ewmh:get-_NET_WM_STATE (xcb:icccm:-GetProperty) + ((property :initform xcb:Atom:_NET_WM_STATE) + (type :initform xcb:Atom:ATOM))) +(defclass xcb:ewmh:get-_NET_WM_STATE~reply (xcb:icccm:-GetProperty~reply) + nil) +(defclass xcb:ewmh:set-_NET_WM_STATE (xcb:icccm:-ChangeProperty) + ((property :initform xcb:Atom:_NET_WM_STATE) + (type :initform xcb:Atom:ATOM))) +(defclass xcb:ewmh:_NET_WM_STATE (xcb:ewmh:-ClientMessage) + ((type :initform xcb:Atom:_NET_WM_STATE) + (action :initarg :action :type xcb:CARD32) + (first-property :initarg :first-property :type xcb:CARD32) + (second-property :initarg :second-property :type xcb:CARD32) + (source-indication :initarg :source-indication :type xcb:CARD32))) + +;; _NET_WM_ALLOWED_ACTIONS +(defclass xcb:ewmh:get-_NET_WM_ALLOWED_ACTIONS (xcb:icccm:-GetProperty) + ((property :initform xcb:Atom:_NET_WM_ALLOWED_ACTIONS) + (type :initform xcb:Atom:ATOM))) +(defclass xcb:ewmh:get-_NET_WM_ALLOWED_ACTIONS~reply + (xcb:icccm:-GetProperty~reply) + nil) +(defclass xcb:ewmh:set-_NET_WM_ALLOWED_ACTIONS (xcb:icccm:-ChangeProperty) + ((property :initform xcb:Atom:_NET_WM_ALLOWED_ACTIONS) + (type :initform xcb:Atom:ATOM))) + +;; _NET_WM_STRUT +(defclass xcb:ewmh:-_NET_WM_STRUT (xcb:--struct) + ((left :initarg :left :type xcb:-ignore) + (right :initarg :right :type xcb:-ignore) + (top :initarg :top :type xcb:-ignore) + (bottom :initarg :bottom :type xcb:-ignore))) +;; +(defclass xcb:ewmh:get-_NET_WM_STRUT (xcb:icccm:-GetProperty-explicit) + ((property :initform xcb:Atom:_NET_WM_STRUT) + (type :initform xcb:Atom:CARDINAL) + (long-length :initform 4))) +(defclass xcb:ewmh:get-_NET_WM_STRUT~reply + (xcb:icccm:-GetProperty-explicit~reply xcb:ewmh:-_NET_WM_STRUT) + nil) +(defclass xcb:ewmh:set-_NET_WM_STRUT + (xcb:icccm:-ChangeProperty-explicit xcb:ewmh:-_NET_WM_STRUT) + ((property :initform xcb:Atom:_NET_WM_STRUT) + (type :initform xcb:Atom:CARDINAL))) + +;; _NET_WM_STRUT_PARTIAL +(defclass xcb:ewmh:-_NET_WM_STRUT_PARTIAL (xcb:--struct) + ((left :initarg :left :type xcb:-ignore) + (right :initarg :right :type xcb:-ignore) + (top :initarg :top :type xcb:-ignore) + (bottom :initarg :bottom :type xcb:-ignore) + (left-start-y :initarg :left-start-y :type xcb:-ignore) + (left-end-y :initarg :left-end-y :type xcb:-ignore) + (right-start-y :initarg :right-start-y :type xcb:-ignore) + (right-end-y :initarg :right-end-y :type xcb:-ignore) + (top-start-x :initarg :top-start-x :type xcb:-ignore) + (top-end-x :initarg :top-end-x :type xcb:-ignore) + (bottom-start-x :initarg :bottom-start-x :type xcb:-ignore) + (bottom-end-x :initarg :bottom-end-x :type xcb:-ignore))) +;; +(defclass xcb:ewmh:get-_NET_WM_STRUT_PARTIAL (xcb:icccm:-GetProperty-explicit) + ((property :initform xcb:Atom:_NET_WM_STRUT_PARTIAL) + (type :initform xcb:Atom:CARDINAL) + (long-length :initform 12))) +(defclass xcb:ewmh:get-_NET_WM_STRUT_PARTIAL~reply + (xcb:icccm:-GetProperty-explicit~reply xcb:ewmh:-_NET_WM_STRUT_PARTIAL) + nil) +(defclass xcb:ewmh:set-_NET_WM_STRUT_PARTIAL + (xcb:icccm:-ChangeProperty-explicit xcb:ewmh:-_NET_WM_STRUT_PARTIAL) + ((property :initform xcb:Atom:_NET_WM_STRUT_PARTIAL) + (type :initform xcb:Atom:CARDINAL))) + +;; _NET_WM_ICON_GEOMETRY +(defclass xcb:ewmh:-_NET_WM_ICON_GEOMETRY (xcb:--struct) + ((x :initarg :x :type xcb:-ignore) + (y :initarg :y :type xcb:-ignore) + (width :initarg :width :type xcb:-ignore) + (height :initarg :height :type xcb:-ignore))) +;; +(defclass xcb:ewmh:get-_NET_WM_ICON_GEOMETRY (xcb:icccm:-GetProperty-explicit) + ((property :initform xcb:Atom:_NET_WM_ICON_GEOMETRY) + (type :initform xcb:Atom:CARDINAL) + (long-length :initform 4))) +(defclass xcb:ewmh:get-_NET_WM_ICON_GEOMETRY~reply + (xcb:icccm:-GetProperty-explicit~reply xcb:ewmh:-_NET_WM_ICON_GEOMETRY) + nil) +(defclass xcb:ewmh:set-_NET_WM_ICON_GEOMETRY + (xcb:icccm:-ChangeProperty-explicit xcb:ewmh:-_NET_WM_ICON_GEOMETRY) + ((property :initform xcb:Atom:_NET_WM_ICON_GEOMETRY) + (type :initform xcb:Atom:CARDINAL))) + +;; _NET_WM_ICON +(defclass xcb:ewmh:-get-_NET_WM_ICON (xcb:icccm:-GetProperty) + ((property :initform xcb:Atom:_NET_WM_ICON) + (type :initform xcb:Atom:CARDINAL))) +(defclass xcb:ewmh:-get-_NET_WM_ICON~reply (xcb:icccm:-GetProperty~reply) + nil) +(defclass xcb:ewmh:-set-_NET_WM_ICON (xcb:icccm:-ChangeProperty) + ((property :initform xcb:Atom:_NET_WM_ICON) + (type :initform xcb:Atom:CARDINAL))) + +;; _NET_WM_PID +(defclass xcb:ewmh:get-_NET_WM_PID (xcb:icccm:-GetProperty-single) + ((property :initform xcb:Atom:_NET_WM_PID) + (type :initform xcb:Atom:CARDINAL))) +(defclass xcb:ewmh:get-_NET_WM_PID~reply (xcb:icccm:-GetProperty-single~reply) + nil) +(defclass xcb:ewmh:set-_NET_WM_PID (xcb:icccm:-ChangeProperty-single) + ((property :initform xcb:Atom:_NET_WM_PID) + (type :initform xcb:Atom:CARDINAL))) + +;; _NET_WM_HANDLED_ICONS +(defclass xcb:ewmh:get-_NET_WM_HANDLED_ICONS (xcb:icccm:-GetProperty-single) + ((property :initform xcb:Atom:_NET_WM_HANDLED_ICONS) + (type :initform xcb:Atom:CARDINAL))) +(defclass xcb:ewmh:get-_NET_WM_HANDLED_ICONS~reply + (xcb:icccm:-GetProperty-single~reply) + nil) +(defclass xcb:ewmh:set-_NET_WM_HANDLED_ICONS (xcb:icccm:-ChangeProperty-single) + ((property :initform xcb:Atom:_NET_WM_HANDLED_ICONS) + (type :initform xcb:Atom:CARDINAL))) + +;; _NET_WM_USER_TIME +(defclass xcb:ewmh:get-_NET_WM_USER_TIME (xcb:icccm:-GetProperty-single) + ((property :initform xcb:Atom:_NET_WM_USER_TIME) + (type :initform xcb:Atom:CARDINAL))) +(defclass xcb:ewmh:get-_NET_WM_USER_TIME~reply + (xcb:icccm:-GetProperty-single~reply) + nil) +(defclass xcb:ewmh:set-_NET_WM_USER_TIME (xcb:icccm:-ChangeProperty-single) + ((property :initform xcb:Atom:_NET_WM_USER_TIME) + (type :initform xcb:Atom:CARDINAL))) + +;; _NET_WM_USER_TIME_WINDOW +(defclass xcb:ewmh:get-_NET_WM_USER_TIME_WINDOW (xcb:icccm:-GetProperty-single) + ((property :initform xcb:Atom:_NET_WM_USER_TIME_WINDOW) + (type :initform xcb:Atom:CARDINAL))) +(defclass xcb:ewmh:get-_NET_WM_USER_TIME_WINDOW~reply + (xcb:icccm:-GetProperty-single~reply) + nil) +(defclass xcb:ewmh:set-_NET_WM_USER_TIME_WINDOW + (xcb:icccm:-ChangeProperty-single) + ((property :initform xcb:Atom:_NET_WM_USER_TIME_WINDOW) + (type :initform xcb:Atom:CARDINAL))) + +;; _NET_FRAME_EXTENTS +(defclass xcb:ewmh:-_NET_FRAME_EXTENTS (xcb:--struct) + ((left :initarg :left :type xcb:-ignore) + (right :initarg :right :type xcb:-ignore) + (top :initarg :top :type xcb:-ignore) + (bottom :initarg :bottom :type xcb:-ignore))) +;; +(defclass xcb:ewmh:get-_NET_FRAME_EXTENTS (xcb:icccm:-GetProperty-explicit) + ((property :initform xcb:Atom:_NET_FRAME_EXTENTS) + (type :initform xcb:Atom:CARDINAL) + (long-length :initform 4))) +(defclass xcb:ewmh:get-_NET_FRAME_EXTENTS~reply + (xcb:icccm:-GetProperty-explicit~reply xcb:ewmh:-_NET_FRAME_EXTENTS) + nil) +(defclass xcb:ewmh:set-_NET_FRAME_EXTENTS + (xcb:icccm:-ChangeProperty-explicit xcb:ewmh:-_NET_FRAME_EXTENTS) + ((property :initform xcb:Atom:_NET_FRAME_EXTENTS) + (type :initform xcb:Atom:CARDINAL))) + +;; _NET_WM_OPAQUE_REGION +(defclass xcb:ewmh:get-_NET_WM_OPAQUE_REGION (xcb:icccm:-GetProperty) + ((property :initform xcb:Atom:_NET_WM_OPAQUE_REGION) + (type :initform xcb:Atom:ATOM))) +(defclass xcb:ewmh:get-_NET_WM_OPAQUE_REGION~reply + (xcb:icccm:-GetProperty~reply) + nil) +(defclass xcb:ewmh:set-_NET_WM_OPAQUE_REGION (xcb:icccm:-ChangeProperty) + ((property :initform xcb:Atom:_NET_WM_OPAQUE_REGION) + (type :initform xcb:Atom:ATOM))) + +;; _NET_WM_BYPASS_COMPOSITOR +(defclass xcb:ewmh:get-_NET_WM_BYPASS_COMPOSITOR + (xcb:icccm:-GetProperty-single) + ((property :initform xcb:Atom:_NET_WM_BYPASS_COMPOSITOR) + (type :initform xcb:Atom:CARDINAL))) +(defclass xcb:ewmh:get-_NET_WM_BYPASS_COMPOSITOR~reply + (xcb:icccm:-GetProperty-single~reply) + nil) +(defclass xcb:ewmh:set-_NET_WM_BYPASS_COMPOSITOR + (xcb:icccm:-ChangeProperty-single) + ((property :initform xcb:Atom:_NET_WM_BYPASS_COMPOSITOR) + (type :initform xcb:Atom:CARDINAL))) + +;;;; Window Manager Protocols + +;; _NET_WM_PING +(defclass xcb:ewmh:_NET_WM_PING (xcb:ewmh:-ClientMessage) + ((type :initform xcb:Atom:WM_PROTOCOLS) + (protocol :initform xcb:Atom:_NET_WM_PING :type xcb:CARD32) + (timestamp :initarg :timestamp :type xcb:CARD32) + (client-window :initarg :client-window :type xcb:WINDOW))) + +;; _NET_WM_SYNC_REQUEST +(defclass xcb:ewmh:_NET_WM_SYNC_REQUEST (xcb:ewmh:-ClientMessage) + ((type :initform xcb:Atom:WM_PROTOCOLS) + (protocol :initform xcb:Atom:_NET_WM_SYNC_REQUEST :type xcb:CARD32) + (timestamp :initarg :timestamp :type xcb:CARD32) + (low :initarg :low :type xcb:CARD32) + (high :initarg :high :type xcb:CARD32))) + +;; _NET_WM_SYNC_REQUEST_COUNTER +(defclass xcb:ewmh:-_NET_WM_SYNC_REQUEST_COUNTER (xcb:--struct) + ((low :initarg :low :type xcb:-ignore) + (high :initarg :hight :type xcb:-ignore))) +;; +(defclass xcb:ewmh:get-_NET_WM_SYNC_REQUEST_COUNTER + (xcb:icccm:-GetProperty-explicit) + ((property :initform xcb:Atom:_NET_WM_SYNC_REQUEST_COUNTER) + (type :initform xcb:Atom:CARDINAL) + (long-length :initform 2))) +(defclass xcb:ewmh:get-_NET_WM_SYNC_REQUEST_COUNTER~reply + (xcb:icccm:-GetProperty-explicit~reply + xcb:ewmh:-_NET_WM_SYNC_REQUEST_COUNTER) + nil) +(defclass xcb:ewmh:set-_NET_WM_SYNC_REQUEST_COUNTER + (xcb:icccm:-ChangeProperty-explicit xcb:ewmh:-_NET_WM_SYNC_REQUEST_COUNTER) + ((property :initform xcb:Atom:_NET_WM_SYNC_REQUEST_COUNTER) + (type :initform xcb:Atom:CARDINAL))) + +;; _NET_WM_FULLSCREEN_MONITORS +(defclass xcb:ewmh:-_NET_WM_FULLSCREEN_MONITORS (xcb:--struct) + ((top :initarg :top :type xcb:-ignore) + (bottom :initarg :bottom :type xcb:-ignore) + (left :initarg :left :type xcb:-ignore) + (right :initarg :right :type xcb:-ignore))) +;; +(defclass xcb:ewmh:get-_NET_WM_FULLSCREEN_MONITORS + (xcb:icccm:-GetProperty-explicit) + ((property :initform xcb:Atom:_NET_WM_FULLSCREEN_MONITORS) + (type :initform xcb:Atom:CARDINAL) + (long-length :initform 4))) +(defclass xcb:ewmh:get-_NET_WM_FULLSCREEN_MONITORS~reply + (xcb:icccm:-GetProperty-explicit~reply xcb:ewmh:-_NET_WM_FULLSCREEN_MONITORS) + nil) +(defclass xcb:ewmh:set-_NET_WM_FULLSCREEN_MONITORS + (xcb:icccm:-ChangeProperty-explicit xcb:ewmh:-_NET_WM_FULLSCREEN_MONITORS) + ((property :initform xcb:Atom:_NET_WM_FULLSCREEN_MONITORS) + (type :initform xcb:Atom:CARDINAL))) +(defclass xcb:ewmh:_NET_WM_FULLSCREEN_MONITORS + (xcb:ewmh:-ClientMessage xcb:ewmh:-_NET_WM_FULLSCREEN_MONITORS) + ((type :initform xcb:Atom:_NET_WM_FULLSCREEN_MONITORS))) + +;;;; Other Properties + +;;;; Misc. + +(defconst xcb:ewmh:source-indication:none 0) +(defconst xcb:ewmh:source-indication:normal 1) +(defconst xcb:ewmh:source-indication:other 2) + + + +(provide 'xcb-ewmh) + +;;; xcb-ewmh.el ends here diff --git a/elpa/xelb-0.18/xcb-ge.el b/elpa/xelb-0.18/xcb-ge.el new file mode 100644 index 0000000..0c07cc6 --- /dev/null +++ b/elpa/xelb-0.18/xcb-ge.el @@ -0,0 +1,52 @@ +;;; xcb-ge.el --- X11 GenericEvent extension -*- lexical-binding: t -*- + +;; Copyright (C) 2015-2019 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This file was generated by 'el_client.el' from 'ge.xml', +;; which you can retrieve from . + +;;; Code: + +(require 'xcb-types) + +(defconst xcb:ge:-extension-xname "Generic Event Extension") +(defconst xcb:ge:-extension-name "GenericEvent") +(defconst xcb:ge:-major-version 1) +(defconst xcb:ge:-minor-version 0) + +(defclass xcb:ge:QueryVersion + (xcb:-request) + ((~opcode :initform 0 :type xcb:-u1) + (client-major-version :initarg :client-major-version :type xcb:CARD16) + (client-minor-version :initarg :client-minor-version :type xcb:CARD16))) +(defclass xcb:ge:QueryVersion~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (major-version :initarg :major-version :type xcb:CARD16) + (minor-version :initarg :minor-version :type xcb:CARD16) + (pad~1 :initform 20 :type xcb:-pad))) + + + +(provide 'xcb-ge) + +;;; xcb-ge.el ends here diff --git a/elpa/xelb-0.18/xcb-glx.el b/elpa/xelb-0.18/xcb-glx.el new file mode 100644 index 0000000..28be9ab --- /dev/null +++ b/elpa/xelb-0.18/xcb-glx.el @@ -0,0 +1,1859 @@ +;;; xcb-glx.el --- X11 Glx extension -*- lexical-binding: t -*- + +;; Copyright (C) 2015-2019 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This file was generated by 'el_client.el' from 'glx.xml', +;; which you can retrieve from . + +;;; Code: + +(require 'xcb-types) + +(defconst xcb:glx:-extension-xname "GLX") +(defconst xcb:glx:-extension-name "Glx") +(defconst xcb:glx:-major-version 1) +(defconst xcb:glx:-minor-version 4) + +(require 'xcb-xproto) + +(xcb:deftypealias 'xcb:glx:PIXMAP 'xcb:-u4) + +(xcb:deftypealias 'xcb:glx:CONTEXT 'xcb:-u4) + +(xcb:deftypealias 'xcb:glx:PBUFFER 'xcb:-u4) + +(xcb:deftypealias 'xcb:glx:WINDOW 'xcb:-u4) + +(xcb:deftypealias 'xcb:glx:FBCONFIG 'xcb:-u4) + +(xcb:deftypealias 'xcb:glx:DRAWABLE 'xcb:-u4) + +(xcb:deftypealias 'xcb:glx:FLOAT32 'xcb:glx:float) + +(xcb:deftypealias 'xcb:glx:FLOAT64 'xcb:glx:double) + +(xcb:deftypealias 'xcb:glx:BOOL32 'xcb:CARD32) + +(xcb:deftypealias 'xcb:glx:CONTEXT_TAG 'xcb:CARD32) + +(defclass xcb:glx:Generic + (xcb:-error) + ((~code :initform -1) + (bad-value :initarg :bad-value :type xcb:CARD32) + (minor-opcode :initarg :minor-opcode :type xcb:CARD16) + (major-opcode :initarg :major-opcode :type xcb:CARD8) + (pad~0 :initform 21 :type xcb:-pad))) + +(defclass xcb:glx:BadContext + (xcb:-error xcb:glx:Generic) + ((~code :initform 0))) + +(defclass xcb:glx:BadContextState + (xcb:-error xcb:glx:Generic) + ((~code :initform 1))) + +(defclass xcb:glx:BadDrawable + (xcb:-error xcb:glx:Generic) + ((~code :initform 2))) + +(defclass xcb:glx:BadPixmap + (xcb:-error xcb:glx:Generic) + ((~code :initform 3))) + +(defclass xcb:glx:BadContextTag + (xcb:-error xcb:glx:Generic) + ((~code :initform 4))) + +(defclass xcb:glx:BadCurrentWindow + (xcb:-error xcb:glx:Generic) + ((~code :initform 5))) + +(defclass xcb:glx:BadRenderRequest + (xcb:-error xcb:glx:Generic) + ((~code :initform 6))) + +(defclass xcb:glx:BadLargeRequest + (xcb:-error xcb:glx:Generic) + ((~code :initform 7))) + +(defclass xcb:glx:UnsupportedPrivateRequest + (xcb:-error xcb:glx:Generic) + ((~code :initform 8))) + +(defclass xcb:glx:BadFBConfig + (xcb:-error xcb:glx:Generic) + ((~code :initform 9))) + +(defclass xcb:glx:BadPbuffer + (xcb:-error xcb:glx:Generic) + ((~code :initform 10))) + +(defclass xcb:glx:BadCurrentDrawable + (xcb:-error xcb:glx:Generic) + ((~code :initform 11))) + +(defclass xcb:glx:BadWindow + (xcb:-error xcb:glx:Generic) + ((~code :initform 12))) + +(defclass xcb:glx:GLXBadProfileARB + (xcb:-error xcb:glx:Generic) + ((~code :initform 13))) + +(defclass xcb:glx:PbufferClobber + (xcb:-event) + ((~code :initform 0) + (pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (event-type :initarg :event-type :type xcb:CARD16) + (draw-type :initarg :draw-type :type xcb:CARD16) + (drawable :initarg :drawable :type xcb:glx:DRAWABLE) + (b-mask :initarg :b-mask :type xcb:CARD32) + (aux-buffer :initarg :aux-buffer :type xcb:CARD16) + (x :initarg :x :type xcb:CARD16) + (y :initarg :y :type xcb:CARD16) + (width :initarg :width :type xcb:CARD16) + (height :initarg :height :type xcb:CARD16) + (count :initarg :count :type xcb:CARD16) + (pad~1 :initform 4 :type xcb:-pad))) + +(defclass xcb:glx:BufferSwapComplete + (xcb:-event) + ((~code :initform 1) + (pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (event-type :initarg :event-type :type xcb:CARD16) + (pad~1 :initform 2 :type xcb:-pad) + (drawable :initarg :drawable :type xcb:glx:DRAWABLE) + (ust-hi :initarg :ust-hi :type xcb:CARD32) + (ust-lo :initarg :ust-lo :type xcb:CARD32) + (msc-hi :initarg :msc-hi :type xcb:CARD32) + (msc-lo :initarg :msc-lo :type xcb:CARD32) + (sbc :initarg :sbc :type xcb:CARD32))) + +(defconst xcb:glx:PBCET:Damaged 32791) +(defconst xcb:glx:PBCET:Saved 32792) + +(defconst xcb:glx:PBCDT:Window 32793) +(defconst xcb:glx:PBCDT:Pbuffer 32794) + +(defclass xcb:glx:Render + (xcb:-request) + ((~opcode :initform 1 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (data~ :initform + '(name data type xcb:BYTE size nil) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:glx:RenderLarge + (xcb:-request) + ((~opcode :initform 2 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (request-num :initarg :request-num :type xcb:CARD16) + (request-total :initarg :request-total :type xcb:CARD16) + (data-len :initarg :data-len :type xcb:CARD32) + (data~ :initform + '(name data type xcb:BYTE size + (xcb:-fieldref 'data-len)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:glx:CreateContext + (xcb:-request) + ((~opcode :initform 3 :type xcb:-u1) + (context :initarg :context :type xcb:glx:CONTEXT) + (visual :initarg :visual :type xcb:VISUALID) + (screen :initarg :screen :type xcb:CARD32) + (share-list :initarg :share-list :type xcb:glx:CONTEXT) + (is-direct :initarg :is-direct :type xcb:BOOL) + (pad~0 :initform 3 :type xcb:-pad))) + +(defclass xcb:glx:DestroyContext + (xcb:-request) + ((~opcode :initform 4 :type xcb:-u1) + (context :initarg :context :type xcb:glx:CONTEXT))) + +(defclass xcb:glx:MakeCurrent + (xcb:-request) + ((~opcode :initform 5 :type xcb:-u1) + (drawable :initarg :drawable :type xcb:glx:DRAWABLE) + (context :initarg :context :type xcb:glx:CONTEXT) + (old-context-tag :initarg :old-context-tag :type xcb:glx:CONTEXT_TAG))) +(defclass xcb:glx:MakeCurrent~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (pad~1 :initform 20 :type xcb:-pad))) + +(defclass xcb:glx:IsDirect + (xcb:-request) + ((~opcode :initform 6 :type xcb:-u1) + (context :initarg :context :type xcb:glx:CONTEXT))) +(defclass xcb:glx:IsDirect~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (is-direct :initarg :is-direct :type xcb:BOOL) + (pad~1 :initform 23 :type xcb:-pad))) + +(defclass xcb:glx:QueryVersion + (xcb:-request) + ((~opcode :initform 7 :type xcb:-u1) + (major-version :initarg :major-version :type xcb:CARD32) + (minor-version :initarg :minor-version :type xcb:CARD32))) +(defclass xcb:glx:QueryVersion~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (major-version :initarg :major-version :type xcb:CARD32) + (minor-version :initarg :minor-version :type xcb:CARD32) + (pad~1 :initform 16 :type xcb:-pad))) + +(defclass xcb:glx:WaitGL + (xcb:-request) + ((~opcode :initform 8 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG))) + +(defclass xcb:glx:WaitX + (xcb:-request) + ((~opcode :initform 9 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG))) + +(defclass xcb:glx:CopyContext + (xcb:-request) + ((~opcode :initform 10 :type xcb:-u1) + (src :initarg :src :type xcb:glx:CONTEXT) + (dest :initarg :dest :type xcb:glx:CONTEXT) + (mask :initarg :mask :type xcb:CARD32) + (src-context-tag :initarg :src-context-tag :type xcb:glx:CONTEXT_TAG))) + +(defconst xcb:glx:GC:GL_CURRENT_BIT 1) +(defconst xcb:glx:GC:GL_POINT_BIT 2) +(defconst xcb:glx:GC:GL_LINE_BIT 4) +(defconst xcb:glx:GC:GL_POLYGON_BIT 8) +(defconst xcb:glx:GC:GL_POLYGON_STIPPLE_BIT 16) +(defconst xcb:glx:GC:GL_PIXEL_MODE_BIT 32) +(defconst xcb:glx:GC:GL_LIGHTING_BIT 64) +(defconst xcb:glx:GC:GL_FOG_BIT 128) +(defconst xcb:glx:GC:GL_DEPTH_BUFFER_BIT 256) +(defconst xcb:glx:GC:GL_ACCUM_BUFFER_BIT 512) +(defconst xcb:glx:GC:GL_STENCIL_BUFFER_BIT 1024) +(defconst xcb:glx:GC:GL_VIEWPORT_BIT 2048) +(defconst xcb:glx:GC:GL_TRANSFORM_BIT 4096) +(defconst xcb:glx:GC:GL_ENABLE_BIT 8192) +(defconst xcb:glx:GC:GL_COLOR_BUFFER_BIT 16384) +(defconst xcb:glx:GC:GL_HINT_BIT 32768) +(defconst xcb:glx:GC:GL_EVAL_BIT 65536) +(defconst xcb:glx:GC:GL_LIST_BIT 131072) +(defconst xcb:glx:GC:GL_TEXTURE_BIT 262144) +(defconst xcb:glx:GC:GL_SCISSOR_BIT 524288) +(defconst xcb:glx:GC:GL_ALL_ATTRIB_BITS 16777215) + +(defclass xcb:glx:SwapBuffers + (xcb:-request) + ((~opcode :initform 11 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (drawable :initarg :drawable :type xcb:glx:DRAWABLE))) + +(defclass xcb:glx:UseXFont + (xcb:-request) + ((~opcode :initform 12 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (font :initarg :font :type xcb:FONT) + (first :initarg :first :type xcb:CARD32) + (count :initarg :count :type xcb:CARD32) + (list-base :initarg :list-base :type xcb:CARD32))) + +(defclass xcb:glx:CreateGLXPixmap + (xcb:-request) + ((~opcode :initform 13 :type xcb:-u1) + (screen :initarg :screen :type xcb:CARD32) + (visual :initarg :visual :type xcb:VISUALID) + (pixmap :initarg :pixmap :type xcb:PIXMAP) + (glx-pixmap :initarg :glx-pixmap :type xcb:glx:PIXMAP))) + +(defclass xcb:glx:GetVisualConfigs + (xcb:-request) + ((~opcode :initform 14 :type xcb:-u1) + (screen :initarg :screen :type xcb:CARD32))) +(defclass xcb:glx:GetVisualConfigs~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (num-visuals :initarg :num-visuals :type xcb:CARD32) + (num-properties :initarg :num-properties :type xcb:CARD32) + (pad~1 :initform 16 :type xcb:-pad) + (property-list~ :initform + '(name property-list type xcb:CARD32 size + (xcb:-fieldref 'length)) + :type xcb:-list) + (property-list :initarg :property-list :type xcb:-ignore))) + +(defclass xcb:glx:DestroyGLXPixmap + (xcb:-request) + ((~opcode :initform 15 :type xcb:-u1) + (glx-pixmap :initarg :glx-pixmap :type xcb:glx:PIXMAP))) + +(defclass xcb:glx:VendorPrivate + (xcb:-request) + ((~opcode :initform 16 :type xcb:-u1) + (vendor-code :initarg :vendor-code :type xcb:CARD32) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (data~ :initform + '(name data type xcb:BYTE size nil) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:glx:VendorPrivateWithReply + (xcb:-request) + ((~opcode :initform 17 :type xcb:-u1) + (vendor-code :initarg :vendor-code :type xcb:CARD32) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (data~ :initform + '(name data type xcb:BYTE size nil) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) +(defclass xcb:glx:VendorPrivateWithReply~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (retval :initarg :retval :type xcb:CARD32) + (data1~ :initform + '(name data1 type xcb:BYTE size 24) + :type xcb:-list) + (data1 :initarg :data1 :type xcb:-ignore) + (data2~ :initform + '(name data2 type xcb:BYTE size + (* + (xcb:-fieldref 'length) + 4)) + :type xcb:-list) + (data2 :initarg :data2 :type xcb:-ignore))) + +(defclass xcb:glx:QueryExtensionsString + (xcb:-request) + ((~opcode :initform 18 :type xcb:-u1) + (screen :initarg :screen :type xcb:CARD32))) +(defclass xcb:glx:QueryExtensionsString~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 4 :type xcb:-pad) + (n :initarg :n :type xcb:CARD32) + (pad~2 :initform 16 :type xcb:-pad))) + +(defclass xcb:glx:QueryServerString + (xcb:-request) + ((~opcode :initform 19 :type xcb:-u1) + (screen :initarg :screen :type xcb:CARD32) + (name :initarg :name :type xcb:CARD32))) +(defclass xcb:glx:QueryServerString~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 4 :type xcb:-pad) + (str-len :initarg :str-len :type xcb:CARD32) + (pad~2 :initform 16 :type xcb:-pad) + (string~ :initform + '(name string type xcb:char size + (xcb:-fieldref 'str-len)) + :type xcb:-list) + (string :initarg :string :type xcb:-ignore))) + +(defclass xcb:glx:ClientInfo + (xcb:-request) + ((~opcode :initform 20 :type xcb:-u1) + (major-version :initarg :major-version :type xcb:CARD32) + (minor-version :initarg :minor-version :type xcb:CARD32) + (str-len :initarg :str-len :type xcb:CARD32) + (string~ :initform + '(name string type xcb:char size + (xcb:-fieldref 'str-len)) + :type xcb:-list) + (string :initarg :string :type xcb:-ignore))) + +(defclass xcb:glx:GetFBConfigs + (xcb:-request) + ((~opcode :initform 21 :type xcb:-u1) + (screen :initarg :screen :type xcb:CARD32))) +(defclass xcb:glx:GetFBConfigs~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (num-FB-configs :initarg :num-FB-configs :type xcb:CARD32) + (num-properties :initarg :num-properties :type xcb:CARD32) + (pad~1 :initform 16 :type xcb:-pad) + (property-list~ :initform + '(name property-list type xcb:CARD32 size + (xcb:-fieldref 'length)) + :type xcb:-list) + (property-list :initarg :property-list :type xcb:-ignore))) + +(defclass xcb:glx:CreatePixmap + (xcb:-request) + ((~opcode :initform 22 :type xcb:-u1) + (screen :initarg :screen :type xcb:CARD32) + (fbconfig :initarg :fbconfig :type xcb:glx:FBCONFIG) + (pixmap :initarg :pixmap :type xcb:PIXMAP) + (glx-pixmap :initarg :glx-pixmap :type xcb:glx:PIXMAP) + (num-attribs :initarg :num-attribs :type xcb:CARD32) + (attribs~ :initform + '(name attribs type xcb:CARD32 size + (* + (xcb:-fieldref 'num-attribs) + 2)) + :type xcb:-list) + (attribs :initarg :attribs :type xcb:-ignore))) + +(defclass xcb:glx:DestroyPixmap + (xcb:-request) + ((~opcode :initform 23 :type xcb:-u1) + (glx-pixmap :initarg :glx-pixmap :type xcb:glx:PIXMAP))) + +(defclass xcb:glx:CreateNewContext + (xcb:-request) + ((~opcode :initform 24 :type xcb:-u1) + (context :initarg :context :type xcb:glx:CONTEXT) + (fbconfig :initarg :fbconfig :type xcb:glx:FBCONFIG) + (screen :initarg :screen :type xcb:CARD32) + (render-type :initarg :render-type :type xcb:CARD32) + (share-list :initarg :share-list :type xcb:glx:CONTEXT) + (is-direct :initarg :is-direct :type xcb:BOOL) + (pad~0 :initform 3 :type xcb:-pad))) + +(defclass xcb:glx:QueryContext + (xcb:-request) + ((~opcode :initform 25 :type xcb:-u1) + (context :initarg :context :type xcb:glx:CONTEXT))) +(defclass xcb:glx:QueryContext~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (num-attribs :initarg :num-attribs :type xcb:CARD32) + (pad~1 :initform 20 :type xcb:-pad) + (attribs~ :initform + '(name attribs type xcb:CARD32 size + (* + (xcb:-fieldref 'num-attribs) + 2)) + :type xcb:-list) + (attribs :initarg :attribs :type xcb:-ignore))) + +(defclass xcb:glx:MakeContextCurrent + (xcb:-request) + ((~opcode :initform 26 :type xcb:-u1) + (old-context-tag :initarg :old-context-tag :type xcb:glx:CONTEXT_TAG) + (drawable :initarg :drawable :type xcb:glx:DRAWABLE) + (read-drawable :initarg :read-drawable :type xcb:glx:DRAWABLE) + (context :initarg :context :type xcb:glx:CONTEXT))) +(defclass xcb:glx:MakeContextCurrent~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (pad~1 :initform 20 :type xcb:-pad))) + +(defclass xcb:glx:CreatePbuffer + (xcb:-request) + ((~opcode :initform 27 :type xcb:-u1) + (screen :initarg :screen :type xcb:CARD32) + (fbconfig :initarg :fbconfig :type xcb:glx:FBCONFIG) + (pbuffer :initarg :pbuffer :type xcb:glx:PBUFFER) + (num-attribs :initarg :num-attribs :type xcb:CARD32) + (attribs~ :initform + '(name attribs type xcb:CARD32 size + (* + (xcb:-fieldref 'num-attribs) + 2)) + :type xcb:-list) + (attribs :initarg :attribs :type xcb:-ignore))) + +(defclass xcb:glx:DestroyPbuffer + (xcb:-request) + ((~opcode :initform 28 :type xcb:-u1) + (pbuffer :initarg :pbuffer :type xcb:glx:PBUFFER))) + +(defclass xcb:glx:GetDrawableAttributes + (xcb:-request) + ((~opcode :initform 29 :type xcb:-u1) + (drawable :initarg :drawable :type xcb:glx:DRAWABLE))) +(defclass xcb:glx:GetDrawableAttributes~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (num-attribs :initarg :num-attribs :type xcb:CARD32) + (pad~1 :initform 20 :type xcb:-pad) + (attribs~ :initform + '(name attribs type xcb:CARD32 size + (* + (xcb:-fieldref 'num-attribs) + 2)) + :type xcb:-list) + (attribs :initarg :attribs :type xcb:-ignore))) + +(defclass xcb:glx:ChangeDrawableAttributes + (xcb:-request) + ((~opcode :initform 30 :type xcb:-u1) + (drawable :initarg :drawable :type xcb:glx:DRAWABLE) + (num-attribs :initarg :num-attribs :type xcb:CARD32) + (attribs~ :initform + '(name attribs type xcb:CARD32 size + (* + (xcb:-fieldref 'num-attribs) + 2)) + :type xcb:-list) + (attribs :initarg :attribs :type xcb:-ignore))) + +(defclass xcb:glx:CreateWindow + (xcb:-request) + ((~opcode :initform 31 :type xcb:-u1) + (screen :initarg :screen :type xcb:CARD32) + (fbconfig :initarg :fbconfig :type xcb:glx:FBCONFIG) + (window :initarg :window :type xcb:WINDOW) + (glx-window :initarg :glx-window :type xcb:glx:WINDOW) + (num-attribs :initarg :num-attribs :type xcb:CARD32) + (attribs~ :initform + '(name attribs type xcb:CARD32 size + (* + (xcb:-fieldref 'num-attribs) + 2)) + :type xcb:-list) + (attribs :initarg :attribs :type xcb:-ignore))) + +(defclass xcb:glx:DeleteWindow + (xcb:-request) + ((~opcode :initform 32 :type xcb:-u1) + (glxwindow :initarg :glxwindow :type xcb:glx:WINDOW))) + +(defclass xcb:glx:SetClientInfoARB + (xcb:-request) + ((~opcode :initform 33 :type xcb:-u1) + (major-version :initarg :major-version :type xcb:CARD32) + (minor-version :initarg :minor-version :type xcb:CARD32) + (num-versions :initarg :num-versions :type xcb:CARD32) + (gl-str-len :initarg :gl-str-len :type xcb:CARD32) + (glx-str-len :initarg :glx-str-len :type xcb:CARD32) + (gl-versions~ :initform + '(name gl-versions type xcb:CARD32 size + (* + (xcb:-fieldref 'num-versions) + 2)) + :type xcb:-list) + (gl-versions :initarg :gl-versions :type xcb:-ignore) + (gl-extension-string~ :initform + '(name gl-extension-string type xcb:char size + (xcb:-fieldref 'gl-str-len)) + :type xcb:-list) + (gl-extension-string :initarg :gl-extension-string :type xcb:-ignore) + (glx-extension-string~ :initform + '(name glx-extension-string type xcb:char size + (xcb:-fieldref 'glx-str-len)) + :type xcb:-list) + (glx-extension-string :initarg :glx-extension-string :type xcb:-ignore))) + +(defclass xcb:glx:CreateContextAttribsARB + (xcb:-request) + ((~opcode :initform 34 :type xcb:-u1) + (context :initarg :context :type xcb:glx:CONTEXT) + (fbconfig :initarg :fbconfig :type xcb:glx:FBCONFIG) + (screen :initarg :screen :type xcb:CARD32) + (share-list :initarg :share-list :type xcb:glx:CONTEXT) + (is-direct :initarg :is-direct :type xcb:BOOL) + (pad~0 :initform 3 :type xcb:-pad) + (num-attribs :initarg :num-attribs :type xcb:CARD32) + (attribs~ :initform + '(name attribs type xcb:CARD32 size + (* + (xcb:-fieldref 'num-attribs) + 2)) + :type xcb:-list) + (attribs :initarg :attribs :type xcb:-ignore))) + +(defclass xcb:glx:SetClientInfo2ARB + (xcb:-request) + ((~opcode :initform 35 :type xcb:-u1) + (major-version :initarg :major-version :type xcb:CARD32) + (minor-version :initarg :minor-version :type xcb:CARD32) + (num-versions :initarg :num-versions :type xcb:CARD32) + (gl-str-len :initarg :gl-str-len :type xcb:CARD32) + (glx-str-len :initarg :glx-str-len :type xcb:CARD32) + (gl-versions~ :initform + '(name gl-versions type xcb:CARD32 size + (* + (xcb:-fieldref 'num-versions) + 3)) + :type xcb:-list) + (gl-versions :initarg :gl-versions :type xcb:-ignore) + (gl-extension-string~ :initform + '(name gl-extension-string type xcb:char size + (xcb:-fieldref 'gl-str-len)) + :type xcb:-list) + (gl-extension-string :initarg :gl-extension-string :type xcb:-ignore) + (glx-extension-string~ :initform + '(name glx-extension-string type xcb:char size + (xcb:-fieldref 'glx-str-len)) + :type xcb:-list) + (glx-extension-string :initarg :glx-extension-string :type xcb:-ignore))) + +(defclass xcb:glx:NewList + (xcb:-request) + ((~opcode :initform 101 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (list :initarg :list :type xcb:CARD32) + (mode :initarg :mode :type xcb:CARD32))) + +(defclass xcb:glx:EndList + (xcb:-request) + ((~opcode :initform 102 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG))) + +(defclass xcb:glx:DeleteLists + (xcb:-request) + ((~opcode :initform 103 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (list :initarg :list :type xcb:CARD32) + (range :initarg :range :type xcb:INT32))) + +(defclass xcb:glx:GenLists + (xcb:-request) + ((~opcode :initform 104 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (range :initarg :range :type xcb:INT32))) +(defclass xcb:glx:GenLists~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (ret-val :initarg :ret-val :type xcb:CARD32))) + +(defclass xcb:glx:FeedbackBuffer + (xcb:-request) + ((~opcode :initform 105 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (size :initarg :size :type xcb:INT32) + (type :initarg :type :type xcb:INT32))) + +(defclass xcb:glx:SelectBuffer + (xcb:-request) + ((~opcode :initform 106 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (size :initarg :size :type xcb:INT32))) + +(defclass xcb:glx:RenderMode + (xcb:-request) + ((~opcode :initform 107 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (mode :initarg :mode :type xcb:CARD32))) +(defclass xcb:glx:RenderMode~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (ret-val :initarg :ret-val :type xcb:CARD32) + (n :initarg :n :type xcb:CARD32) + (new-mode :initarg :new-mode :type xcb:CARD32) + (pad~1 :initform 12 :type xcb:-pad) + (data~ :initform + '(name data type xcb:CARD32 size + (xcb:-fieldref 'n)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defconst xcb:glx:RM:GL_RENDER 7168) +(defconst xcb:glx:RM:GL_FEEDBACK 7169) +(defconst xcb:glx:RM:GL_SELECT 7170) + +(defclass xcb:glx:Finish + (xcb:-request) + ((~opcode :initform 108 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG))) +(defclass xcb:glx:Finish~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32))) + +(defclass xcb:glx:PixelStoref + (xcb:-request) + ((~opcode :initform 109 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (pname :initarg :pname :type xcb:CARD32) + (datum :initarg :datum :type xcb:glx:FLOAT32))) + +(defclass xcb:glx:PixelStorei + (xcb:-request) + ((~opcode :initform 110 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (pname :initarg :pname :type xcb:CARD32) + (datum :initarg :datum :type xcb:INT32))) + +(defclass xcb:glx:ReadPixels + (xcb:-request) + ((~opcode :initform 111 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (x :initarg :x :type xcb:INT32) + (y :initarg :y :type xcb:INT32) + (width :initarg :width :type xcb:INT32) + (height :initarg :height :type xcb:INT32) + (format :initarg :format :type xcb:CARD32) + (type :initarg :type :type xcb:CARD32) + (swap-bytes :initarg :swap-bytes :type xcb:BOOL) + (lsb-first :initarg :lsb-first :type xcb:BOOL))) +(defclass xcb:glx:ReadPixels~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 24 :type xcb:-pad) + (data~ :initform + '(name data type xcb:BYTE size + (* + (xcb:-fieldref 'length) + 4)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:glx:GetBooleanv + (xcb:-request) + ((~opcode :initform 112 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (pname :initarg :pname :type xcb:INT32))) +(defclass xcb:glx:GetBooleanv~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 4 :type xcb:-pad) + (n :initarg :n :type xcb:CARD32) + (datum :initarg :datum :type xcb:BOOL) + (pad~2 :initform 15 :type xcb:-pad) + (data~ :initform + '(name data type xcb:BOOL size + (xcb:-fieldref 'n)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:glx:GetClipPlane + (xcb:-request) + ((~opcode :initform 113 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (plane :initarg :plane :type xcb:INT32))) +(defclass xcb:glx:GetClipPlane~reply + (xcb:-reply) + ((pad~0 :initform 8 :type xcb:-pad-align) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 1 :type xcb:-pad) + (pad~2 :initform 24 :type xcb:-pad) + (data~ :initform + '(name data type xcb:glx:FLOAT64 size + (/ + (xcb:-fieldref 'length) + 2)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:glx:GetDoublev + (xcb:-request) + ((~opcode :initform 114 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (pname :initarg :pname :type xcb:CARD32))) +(defclass xcb:glx:GetDoublev~reply + (xcb:-reply) + ((pad~0 :initform 8 :type xcb:-pad-align) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 1 :type xcb:-pad) + (pad~2 :initform 4 :type xcb:-pad) + (n :initarg :n :type xcb:CARD32) + (datum :initarg :datum :type xcb:glx:FLOAT64) + (pad~3 :initform 8 :type xcb:-pad) + (data~ :initform + '(name data type xcb:glx:FLOAT64 size + (xcb:-fieldref 'n)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:glx:GetError + (xcb:-request) + ((~opcode :initform 115 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG))) +(defclass xcb:glx:GetError~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (error :initarg :error :type xcb:INT32))) + +(defclass xcb:glx:GetFloatv + (xcb:-request) + ((~opcode :initform 116 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (pname :initarg :pname :type xcb:CARD32))) +(defclass xcb:glx:GetFloatv~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 4 :type xcb:-pad) + (n :initarg :n :type xcb:CARD32) + (datum :initarg :datum :type xcb:glx:FLOAT32) + (pad~2 :initform 12 :type xcb:-pad) + (data~ :initform + '(name data type xcb:glx:FLOAT32 size + (xcb:-fieldref 'n)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:glx:GetIntegerv + (xcb:-request) + ((~opcode :initform 117 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (pname :initarg :pname :type xcb:CARD32))) +(defclass xcb:glx:GetIntegerv~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 4 :type xcb:-pad) + (n :initarg :n :type xcb:CARD32) + (datum :initarg :datum :type xcb:INT32) + (pad~2 :initform 12 :type xcb:-pad) + (data~ :initform + '(name data type xcb:INT32 size + (xcb:-fieldref 'n)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:glx:GetLightfv + (xcb:-request) + ((~opcode :initform 118 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (light :initarg :light :type xcb:CARD32) + (pname :initarg :pname :type xcb:CARD32))) +(defclass xcb:glx:GetLightfv~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 4 :type xcb:-pad) + (n :initarg :n :type xcb:CARD32) + (datum :initarg :datum :type xcb:glx:FLOAT32) + (pad~2 :initform 12 :type xcb:-pad) + (data~ :initform + '(name data type xcb:glx:FLOAT32 size + (xcb:-fieldref 'n)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:glx:GetLightiv + (xcb:-request) + ((~opcode :initform 119 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (light :initarg :light :type xcb:CARD32) + (pname :initarg :pname :type xcb:CARD32))) +(defclass xcb:glx:GetLightiv~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 4 :type xcb:-pad) + (n :initarg :n :type xcb:CARD32) + (datum :initarg :datum :type xcb:INT32) + (pad~2 :initform 12 :type xcb:-pad) + (data~ :initform + '(name data type xcb:INT32 size + (xcb:-fieldref 'n)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:glx:GetMapdv + (xcb:-request) + ((~opcode :initform 120 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (target :initarg :target :type xcb:CARD32) + (query :initarg :query :type xcb:CARD32))) +(defclass xcb:glx:GetMapdv~reply + (xcb:-reply) + ((pad~0 :initform 8 :type xcb:-pad-align) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 1 :type xcb:-pad) + (pad~2 :initform 4 :type xcb:-pad) + (n :initarg :n :type xcb:CARD32) + (datum :initarg :datum :type xcb:glx:FLOAT64) + (pad~3 :initform 8 :type xcb:-pad) + (data~ :initform + '(name data type xcb:glx:FLOAT64 size + (xcb:-fieldref 'n)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:glx:GetMapfv + (xcb:-request) + ((~opcode :initform 121 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (target :initarg :target :type xcb:CARD32) + (query :initarg :query :type xcb:CARD32))) +(defclass xcb:glx:GetMapfv~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 4 :type xcb:-pad) + (n :initarg :n :type xcb:CARD32) + (datum :initarg :datum :type xcb:glx:FLOAT32) + (pad~2 :initform 12 :type xcb:-pad) + (data~ :initform + '(name data type xcb:glx:FLOAT32 size + (xcb:-fieldref 'n)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:glx:GetMapiv + (xcb:-request) + ((~opcode :initform 122 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (target :initarg :target :type xcb:CARD32) + (query :initarg :query :type xcb:CARD32))) +(defclass xcb:glx:GetMapiv~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 4 :type xcb:-pad) + (n :initarg :n :type xcb:CARD32) + (datum :initarg :datum :type xcb:INT32) + (pad~2 :initform 12 :type xcb:-pad) + (data~ :initform + '(name data type xcb:INT32 size + (xcb:-fieldref 'n)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:glx:GetMaterialfv + (xcb:-request) + ((~opcode :initform 123 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (face :initarg :face :type xcb:CARD32) + (pname :initarg :pname :type xcb:CARD32))) +(defclass xcb:glx:GetMaterialfv~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 4 :type xcb:-pad) + (n :initarg :n :type xcb:CARD32) + (datum :initarg :datum :type xcb:glx:FLOAT32) + (pad~2 :initform 12 :type xcb:-pad) + (data~ :initform + '(name data type xcb:glx:FLOAT32 size + (xcb:-fieldref 'n)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:glx:GetMaterialiv + (xcb:-request) + ((~opcode :initform 124 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (face :initarg :face :type xcb:CARD32) + (pname :initarg :pname :type xcb:CARD32))) +(defclass xcb:glx:GetMaterialiv~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 4 :type xcb:-pad) + (n :initarg :n :type xcb:CARD32) + (datum :initarg :datum :type xcb:INT32) + (pad~2 :initform 12 :type xcb:-pad) + (data~ :initform + '(name data type xcb:INT32 size + (xcb:-fieldref 'n)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:glx:GetPixelMapfv + (xcb:-request) + ((~opcode :initform 125 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (map :initarg :map :type xcb:CARD32))) +(defclass xcb:glx:GetPixelMapfv~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 4 :type xcb:-pad) + (n :initarg :n :type xcb:CARD32) + (datum :initarg :datum :type xcb:glx:FLOAT32) + (pad~2 :initform 12 :type xcb:-pad) + (data~ :initform + '(name data type xcb:glx:FLOAT32 size + (xcb:-fieldref 'n)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:glx:GetPixelMapuiv + (xcb:-request) + ((~opcode :initform 126 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (map :initarg :map :type xcb:CARD32))) +(defclass xcb:glx:GetPixelMapuiv~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 4 :type xcb:-pad) + (n :initarg :n :type xcb:CARD32) + (datum :initarg :datum :type xcb:CARD32) + (pad~2 :initform 12 :type xcb:-pad) + (data~ :initform + '(name data type xcb:CARD32 size + (xcb:-fieldref 'n)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:glx:GetPixelMapusv + (xcb:-request) + ((~opcode :initform 127 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (map :initarg :map :type xcb:CARD32))) +(defclass xcb:glx:GetPixelMapusv~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 4 :type xcb:-pad) + (n :initarg :n :type xcb:CARD32) + (datum :initarg :datum :type xcb:CARD16) + (pad~2 :initform 16 :type xcb:-pad) + (data~ :initform + '(name data type xcb:CARD16 size + (xcb:-fieldref 'n)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:glx:GetPolygonStipple + (xcb:-request) + ((~opcode :initform 128 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (lsb-first :initarg :lsb-first :type xcb:BOOL))) +(defclass xcb:glx:GetPolygonStipple~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 24 :type xcb:-pad) + (data~ :initform + '(name data type xcb:BYTE size + (* + (xcb:-fieldref 'length) + 4)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:glx:GetString + (xcb:-request) + ((~opcode :initform 129 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (name :initarg :name :type xcb:CARD32))) +(defclass xcb:glx:GetString~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 4 :type xcb:-pad) + (n :initarg :n :type xcb:CARD32) + (pad~2 :initform 16 :type xcb:-pad) + (string~ :initform + '(name string type xcb:char size + (xcb:-fieldref 'n)) + :type xcb:-list) + (string :initarg :string :type xcb:-ignore))) + +(defclass xcb:glx:GetTexEnvfv + (xcb:-request) + ((~opcode :initform 130 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (target :initarg :target :type xcb:CARD32) + (pname :initarg :pname :type xcb:CARD32))) +(defclass xcb:glx:GetTexEnvfv~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 4 :type xcb:-pad) + (n :initarg :n :type xcb:CARD32) + (datum :initarg :datum :type xcb:glx:FLOAT32) + (pad~2 :initform 12 :type xcb:-pad) + (data~ :initform + '(name data type xcb:glx:FLOAT32 size + (xcb:-fieldref 'n)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:glx:GetTexEnviv + (xcb:-request) + ((~opcode :initform 131 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (target :initarg :target :type xcb:CARD32) + (pname :initarg :pname :type xcb:CARD32))) +(defclass xcb:glx:GetTexEnviv~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 4 :type xcb:-pad) + (n :initarg :n :type xcb:CARD32) + (datum :initarg :datum :type xcb:INT32) + (pad~2 :initform 12 :type xcb:-pad) + (data~ :initform + '(name data type xcb:INT32 size + (xcb:-fieldref 'n)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:glx:GetTexGendv + (xcb:-request) + ((~opcode :initform 132 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (coord :initarg :coord :type xcb:CARD32) + (pname :initarg :pname :type xcb:CARD32))) +(defclass xcb:glx:GetTexGendv~reply + (xcb:-reply) + ((pad~0 :initform 8 :type xcb:-pad-align) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 1 :type xcb:-pad) + (pad~2 :initform 4 :type xcb:-pad) + (n :initarg :n :type xcb:CARD32) + (datum :initarg :datum :type xcb:glx:FLOAT64) + (pad~3 :initform 8 :type xcb:-pad) + (data~ :initform + '(name data type xcb:glx:FLOAT64 size + (xcb:-fieldref 'n)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:glx:GetTexGenfv + (xcb:-request) + ((~opcode :initform 133 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (coord :initarg :coord :type xcb:CARD32) + (pname :initarg :pname :type xcb:CARD32))) +(defclass xcb:glx:GetTexGenfv~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 4 :type xcb:-pad) + (n :initarg :n :type xcb:CARD32) + (datum :initarg :datum :type xcb:glx:FLOAT32) + (pad~2 :initform 12 :type xcb:-pad) + (data~ :initform + '(name data type xcb:glx:FLOAT32 size + (xcb:-fieldref 'n)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:glx:GetTexGeniv + (xcb:-request) + ((~opcode :initform 134 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (coord :initarg :coord :type xcb:CARD32) + (pname :initarg :pname :type xcb:CARD32))) +(defclass xcb:glx:GetTexGeniv~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 4 :type xcb:-pad) + (n :initarg :n :type xcb:CARD32) + (datum :initarg :datum :type xcb:INT32) + (pad~2 :initform 12 :type xcb:-pad) + (data~ :initform + '(name data type xcb:INT32 size + (xcb:-fieldref 'n)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:glx:GetTexImage + (xcb:-request) + ((~opcode :initform 135 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (target :initarg :target :type xcb:CARD32) + (level :initarg :level :type xcb:INT32) + (format :initarg :format :type xcb:CARD32) + (type :initarg :type :type xcb:CARD32) + (swap-bytes :initarg :swap-bytes :type xcb:BOOL))) +(defclass xcb:glx:GetTexImage~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 8 :type xcb:-pad) + (width :initarg :width :type xcb:INT32) + (height :initarg :height :type xcb:INT32) + (depth :initarg :depth :type xcb:INT32) + (pad~2 :initform 4 :type xcb:-pad) + (data~ :initform + '(name data type xcb:BYTE size + (* + (xcb:-fieldref 'length) + 4)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:glx:GetTexParameterfv + (xcb:-request) + ((~opcode :initform 136 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (target :initarg :target :type xcb:CARD32) + (pname :initarg :pname :type xcb:CARD32))) +(defclass xcb:glx:GetTexParameterfv~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 4 :type xcb:-pad) + (n :initarg :n :type xcb:CARD32) + (datum :initarg :datum :type xcb:glx:FLOAT32) + (pad~2 :initform 12 :type xcb:-pad) + (data~ :initform + '(name data type xcb:glx:FLOAT32 size + (xcb:-fieldref 'n)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:glx:GetTexParameteriv + (xcb:-request) + ((~opcode :initform 137 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (target :initarg :target :type xcb:CARD32) + (pname :initarg :pname :type xcb:CARD32))) +(defclass xcb:glx:GetTexParameteriv~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 4 :type xcb:-pad) + (n :initarg :n :type xcb:CARD32) + (datum :initarg :datum :type xcb:INT32) + (pad~2 :initform 12 :type xcb:-pad) + (data~ :initform + '(name data type xcb:INT32 size + (xcb:-fieldref 'n)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:glx:GetTexLevelParameterfv + (xcb:-request) + ((~opcode :initform 138 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (target :initarg :target :type xcb:CARD32) + (level :initarg :level :type xcb:INT32) + (pname :initarg :pname :type xcb:CARD32))) +(defclass xcb:glx:GetTexLevelParameterfv~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 4 :type xcb:-pad) + (n :initarg :n :type xcb:CARD32) + (datum :initarg :datum :type xcb:glx:FLOAT32) + (pad~2 :initform 12 :type xcb:-pad) + (data~ :initform + '(name data type xcb:glx:FLOAT32 size + (xcb:-fieldref 'n)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:glx:GetTexLevelParameteriv + (xcb:-request) + ((~opcode :initform 139 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (target :initarg :target :type xcb:CARD32) + (level :initarg :level :type xcb:INT32) + (pname :initarg :pname :type xcb:CARD32))) +(defclass xcb:glx:GetTexLevelParameteriv~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 4 :type xcb:-pad) + (n :initarg :n :type xcb:CARD32) + (datum :initarg :datum :type xcb:INT32) + (pad~2 :initform 12 :type xcb:-pad) + (data~ :initform + '(name data type xcb:INT32 size + (xcb:-fieldref 'n)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:glx:IsEnabled + (xcb:-request) + ((~opcode :initform 140 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (capability :initarg :capability :type xcb:CARD32))) +(defclass xcb:glx:IsEnabled~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (ret-val :initarg :ret-val :type xcb:glx:BOOL32))) + +(defclass xcb:glx:IsList + (xcb:-request) + ((~opcode :initform 141 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (list :initarg :list :type xcb:CARD32))) +(defclass xcb:glx:IsList~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (ret-val :initarg :ret-val :type xcb:glx:BOOL32))) + +(defclass xcb:glx:Flush + (xcb:-request) + ((~opcode :initform 142 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG))) + +(defclass xcb:glx:AreTexturesResident + (xcb:-request) + ((~opcode :initform 143 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (n :initarg :n :type xcb:INT32) + (textures~ :initform + '(name textures type xcb:CARD32 size + (xcb:-fieldref 'n)) + :type xcb:-list) + (textures :initarg :textures :type xcb:-ignore))) +(defclass xcb:glx:AreTexturesResident~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (ret-val :initarg :ret-val :type xcb:glx:BOOL32) + (pad~1 :initform 20 :type xcb:-pad) + (data~ :initform + '(name data type xcb:BOOL size + (* + (xcb:-fieldref 'length) + 4)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:glx:DeleteTextures + (xcb:-request) + ((~opcode :initform 144 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (n :initarg :n :type xcb:INT32) + (textures~ :initform + '(name textures type xcb:CARD32 size + (xcb:-fieldref 'n)) + :type xcb:-list) + (textures :initarg :textures :type xcb:-ignore))) + +(defclass xcb:glx:GenTextures + (xcb:-request) + ((~opcode :initform 145 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (n :initarg :n :type xcb:INT32))) +(defclass xcb:glx:GenTextures~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 24 :type xcb:-pad) + (data~ :initform + '(name data type xcb:CARD32 size + (xcb:-fieldref 'length)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:glx:IsTexture + (xcb:-request) + ((~opcode :initform 146 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (texture :initarg :texture :type xcb:CARD32))) +(defclass xcb:glx:IsTexture~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (ret-val :initarg :ret-val :type xcb:glx:BOOL32))) + +(defclass xcb:glx:GetColorTable + (xcb:-request) + ((~opcode :initform 147 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (target :initarg :target :type xcb:CARD32) + (format :initarg :format :type xcb:CARD32) + (type :initarg :type :type xcb:CARD32) + (swap-bytes :initarg :swap-bytes :type xcb:BOOL))) +(defclass xcb:glx:GetColorTable~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 8 :type xcb:-pad) + (width :initarg :width :type xcb:INT32) + (pad~2 :initform 12 :type xcb:-pad) + (data~ :initform + '(name data type xcb:BYTE size + (* + (xcb:-fieldref 'length) + 4)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:glx:GetColorTableParameterfv + (xcb:-request) + ((~opcode :initform 148 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (target :initarg :target :type xcb:CARD32) + (pname :initarg :pname :type xcb:CARD32))) +(defclass xcb:glx:GetColorTableParameterfv~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 4 :type xcb:-pad) + (n :initarg :n :type xcb:CARD32) + (datum :initarg :datum :type xcb:glx:FLOAT32) + (pad~2 :initform 12 :type xcb:-pad) + (data~ :initform + '(name data type xcb:glx:FLOAT32 size + (xcb:-fieldref 'n)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:glx:GetColorTableParameteriv + (xcb:-request) + ((~opcode :initform 149 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (target :initarg :target :type xcb:CARD32) + (pname :initarg :pname :type xcb:CARD32))) +(defclass xcb:glx:GetColorTableParameteriv~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 4 :type xcb:-pad) + (n :initarg :n :type xcb:CARD32) + (datum :initarg :datum :type xcb:INT32) + (pad~2 :initform 12 :type xcb:-pad) + (data~ :initform + '(name data type xcb:INT32 size + (xcb:-fieldref 'n)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:glx:GetConvolutionFilter + (xcb:-request) + ((~opcode :initform 150 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (target :initarg :target :type xcb:CARD32) + (format :initarg :format :type xcb:CARD32) + (type :initarg :type :type xcb:CARD32) + (swap-bytes :initarg :swap-bytes :type xcb:BOOL))) +(defclass xcb:glx:GetConvolutionFilter~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 8 :type xcb:-pad) + (width :initarg :width :type xcb:INT32) + (height :initarg :height :type xcb:INT32) + (pad~2 :initform 8 :type xcb:-pad) + (data~ :initform + '(name data type xcb:BYTE size + (* + (xcb:-fieldref 'length) + 4)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:glx:GetConvolutionParameterfv + (xcb:-request) + ((~opcode :initform 151 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (target :initarg :target :type xcb:CARD32) + (pname :initarg :pname :type xcb:CARD32))) +(defclass xcb:glx:GetConvolutionParameterfv~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 4 :type xcb:-pad) + (n :initarg :n :type xcb:CARD32) + (datum :initarg :datum :type xcb:glx:FLOAT32) + (pad~2 :initform 12 :type xcb:-pad) + (data~ :initform + '(name data type xcb:glx:FLOAT32 size + (xcb:-fieldref 'n)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:glx:GetConvolutionParameteriv + (xcb:-request) + ((~opcode :initform 152 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (target :initarg :target :type xcb:CARD32) + (pname :initarg :pname :type xcb:CARD32))) +(defclass xcb:glx:GetConvolutionParameteriv~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 4 :type xcb:-pad) + (n :initarg :n :type xcb:CARD32) + (datum :initarg :datum :type xcb:INT32) + (pad~2 :initform 12 :type xcb:-pad) + (data~ :initform + '(name data type xcb:INT32 size + (xcb:-fieldref 'n)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:glx:GetSeparableFilter + (xcb:-request) + ((~opcode :initform 153 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (target :initarg :target :type xcb:CARD32) + (format :initarg :format :type xcb:CARD32) + (type :initarg :type :type xcb:CARD32) + (swap-bytes :initarg :swap-bytes :type xcb:BOOL))) +(defclass xcb:glx:GetSeparableFilter~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 8 :type xcb:-pad) + (row-w :initarg :row-w :type xcb:INT32) + (col-h :initarg :col-h :type xcb:INT32) + (pad~2 :initform 8 :type xcb:-pad) + (rows-and-cols~ :initform + '(name rows-and-cols type xcb:BYTE size + (* + (xcb:-fieldref 'length) + 4)) + :type xcb:-list) + (rows-and-cols :initarg :rows-and-cols :type xcb:-ignore))) + +(defclass xcb:glx:GetHistogram + (xcb:-request) + ((~opcode :initform 154 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (target :initarg :target :type xcb:CARD32) + (format :initarg :format :type xcb:CARD32) + (type :initarg :type :type xcb:CARD32) + (swap-bytes :initarg :swap-bytes :type xcb:BOOL) + (reset :initarg :reset :type xcb:BOOL))) +(defclass xcb:glx:GetHistogram~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 8 :type xcb:-pad) + (width :initarg :width :type xcb:INT32) + (pad~2 :initform 12 :type xcb:-pad) + (data~ :initform + '(name data type xcb:BYTE size + (* + (xcb:-fieldref 'length) + 4)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:glx:GetHistogramParameterfv + (xcb:-request) + ((~opcode :initform 155 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (target :initarg :target :type xcb:CARD32) + (pname :initarg :pname :type xcb:CARD32))) +(defclass xcb:glx:GetHistogramParameterfv~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 4 :type xcb:-pad) + (n :initarg :n :type xcb:CARD32) + (datum :initarg :datum :type xcb:glx:FLOAT32) + (pad~2 :initform 12 :type xcb:-pad) + (data~ :initform + '(name data type xcb:glx:FLOAT32 size + (xcb:-fieldref 'n)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:glx:GetHistogramParameteriv + (xcb:-request) + ((~opcode :initform 156 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (target :initarg :target :type xcb:CARD32) + (pname :initarg :pname :type xcb:CARD32))) +(defclass xcb:glx:GetHistogramParameteriv~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 4 :type xcb:-pad) + (n :initarg :n :type xcb:CARD32) + (datum :initarg :datum :type xcb:INT32) + (pad~2 :initform 12 :type xcb:-pad) + (data~ :initform + '(name data type xcb:INT32 size + (xcb:-fieldref 'n)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:glx:GetMinmax + (xcb:-request) + ((~opcode :initform 157 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (target :initarg :target :type xcb:CARD32) + (format :initarg :format :type xcb:CARD32) + (type :initarg :type :type xcb:CARD32) + (swap-bytes :initarg :swap-bytes :type xcb:BOOL) + (reset :initarg :reset :type xcb:BOOL))) +(defclass xcb:glx:GetMinmax~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 24 :type xcb:-pad) + (data~ :initform + '(name data type xcb:BYTE size + (* + (xcb:-fieldref 'length) + 4)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:glx:GetMinmaxParameterfv + (xcb:-request) + ((~opcode :initform 158 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (target :initarg :target :type xcb:CARD32) + (pname :initarg :pname :type xcb:CARD32))) +(defclass xcb:glx:GetMinmaxParameterfv~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 4 :type xcb:-pad) + (n :initarg :n :type xcb:CARD32) + (datum :initarg :datum :type xcb:glx:FLOAT32) + (pad~2 :initform 12 :type xcb:-pad) + (data~ :initform + '(name data type xcb:glx:FLOAT32 size + (xcb:-fieldref 'n)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:glx:GetMinmaxParameteriv + (xcb:-request) + ((~opcode :initform 159 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (target :initarg :target :type xcb:CARD32) + (pname :initarg :pname :type xcb:CARD32))) +(defclass xcb:glx:GetMinmaxParameteriv~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 4 :type xcb:-pad) + (n :initarg :n :type xcb:CARD32) + (datum :initarg :datum :type xcb:INT32) + (pad~2 :initform 12 :type xcb:-pad) + (data~ :initform + '(name data type xcb:INT32 size + (xcb:-fieldref 'n)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:glx:GetCompressedTexImageARB + (xcb:-request) + ((~opcode :initform 160 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (target :initarg :target :type xcb:CARD32) + (level :initarg :level :type xcb:INT32))) +(defclass xcb:glx:GetCompressedTexImageARB~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 8 :type xcb:-pad) + (size :initarg :size :type xcb:INT32) + (pad~2 :initform 12 :type xcb:-pad) + (data~ :initform + '(name data type xcb:BYTE size + (* + (xcb:-fieldref 'length) + 4)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:glx:DeleteQueriesARB + (xcb:-request) + ((~opcode :initform 161 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (n :initarg :n :type xcb:INT32) + (ids~ :initform + '(name ids type xcb:CARD32 size + (xcb:-fieldref 'n)) + :type xcb:-list) + (ids :initarg :ids :type xcb:-ignore))) + +(defclass xcb:glx:GenQueriesARB + (xcb:-request) + ((~opcode :initform 162 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (n :initarg :n :type xcb:INT32))) +(defclass xcb:glx:GenQueriesARB~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 24 :type xcb:-pad) + (data~ :initform + '(name data type xcb:CARD32 size + (xcb:-fieldref 'length)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:glx:IsQueryARB + (xcb:-request) + ((~opcode :initform 163 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (id :initarg :id :type xcb:CARD32))) +(defclass xcb:glx:IsQueryARB~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (ret-val :initarg :ret-val :type xcb:glx:BOOL32))) + +(defclass xcb:glx:GetQueryivARB + (xcb:-request) + ((~opcode :initform 164 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (target :initarg :target :type xcb:CARD32) + (pname :initarg :pname :type xcb:CARD32))) +(defclass xcb:glx:GetQueryivARB~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 4 :type xcb:-pad) + (n :initarg :n :type xcb:CARD32) + (datum :initarg :datum :type xcb:INT32) + (pad~2 :initform 12 :type xcb:-pad) + (data~ :initform + '(name data type xcb:INT32 size + (xcb:-fieldref 'n)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:glx:GetQueryObjectivARB + (xcb:-request) + ((~opcode :initform 165 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (id :initarg :id :type xcb:CARD32) + (pname :initarg :pname :type xcb:CARD32))) +(defclass xcb:glx:GetQueryObjectivARB~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 4 :type xcb:-pad) + (n :initarg :n :type xcb:CARD32) + (datum :initarg :datum :type xcb:INT32) + (pad~2 :initform 12 :type xcb:-pad) + (data~ :initform + '(name data type xcb:INT32 size + (xcb:-fieldref 'n)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:glx:GetQueryObjectuivARB + (xcb:-request) + ((~opcode :initform 166 :type xcb:-u1) + (context-tag :initarg :context-tag :type xcb:glx:CONTEXT_TAG) + (id :initarg :id :type xcb:CARD32) + (pname :initarg :pname :type xcb:CARD32))) +(defclass xcb:glx:GetQueryObjectuivARB~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 4 :type xcb:-pad) + (n :initarg :n :type xcb:CARD32) + (datum :initarg :datum :type xcb:CARD32) + (pad~2 :initform 12 :type xcb:-pad) + (data~ :initform + '(name data type xcb:CARD32 size + (xcb:-fieldref 'n)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defconst xcb:glx:error-number-class-alist + '((-1 . xcb:glx:Generic) + (0 . xcb:glx:BadContext) + (1 . xcb:glx:BadContextState) + (2 . xcb:glx:BadDrawable) + (3 . xcb:glx:BadPixmap) + (4 . xcb:glx:BadContextTag) + (5 . xcb:glx:BadCurrentWindow) + (6 . xcb:glx:BadRenderRequest) + (7 . xcb:glx:BadLargeRequest) + (8 . xcb:glx:UnsupportedPrivateRequest) + (9 . xcb:glx:BadFBConfig) + (10 . xcb:glx:BadPbuffer) + (11 . xcb:glx:BadCurrentDrawable) + (12 . xcb:glx:BadWindow) + (13 . xcb:glx:GLXBadProfileARB)) + "(error-number . error-class) alist.") + +(defconst xcb:glx:event-number-class-alist + '((0 . xcb:glx:PbufferClobber) + (1 . xcb:glx:BufferSwapComplete)) + "(event-number . event-class) alist.") + + + +(provide 'xcb-glx) + +;;; xcb-glx.el ends here diff --git a/elpa/xelb-0.18/xcb-icccm.el b/elpa/xelb-0.18/xcb-icccm.el new file mode 100644 index 0000000..27b224a --- /dev/null +++ b/elpa/xelb-0.18/xcb-icccm.el @@ -0,0 +1,554 @@ +;;; xcb-icccm.el --- Inter-Client Communication -*- lexical-binding: t -*- +;;; Conventions Manual + +;; Copyright (C) 2015-2019 Free Software Foundation, Inc. + +;; Author: Chris Feng + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This library implements ICCCM the same way as xcb/util-wm. + +;; Usage tips: +;; + Do not forget to call `xcb:icccm:init' for _every_ connection using +;; this library. +;; + Use `xcb:icccm:SendEvent' instead of `xcb:SendEvent' to send client +;; messages defined in this library. + +;; Todo: +;; + Interned atoms are actually connection-dependent. Currently they are +;; simply saved as global variables. + +;; References: +;; + ICCCM (http://www.x.org/releases/X11R7.7/doc/xorg-docs/icccm/icccm.txt) +;; + xcb/util-wm (git://anongit.freedesktop.org/xcb/util-wm) + +;;; Code: + +(eval-when-compile (require 'cl-lib)) +(require 'xcb) + +;;;; ICCCM atoms + +(eval-and-compile + (defconst xcb:icccm:-atoms + '(UTF8_STRING COMPOUND_TEXT TEXT C_STRING MANAGER + WM_PROTOCOLS WM_TAKE_FOCUS WM_DELETE_WINDOW + WM_STATE WM_CHANGE_STATE WM_S0) + "Atoms involved in ICCCM.") + + (dolist (atom xcb:icccm:-atoms) + (eval `(defvar ,(intern (concat "xcb:Atom:" (symbol-name atom))) nil)))) + +(cl-defmethod xcb:icccm:init ((obj xcb:connection) &optional force) + "Initialize ICCCM module. + +This method must be called before using any other method in this module." + (when (or force (not xcb:Atom:WM_PROTOCOLS)) + (let ((atoms xcb:icccm:-atoms)) + (dotimes (i (1- (x-display-screens))) + (push (intern (format "WM_S%d" (1+ i))) atoms)) + (xcb:icccm:intern-atoms obj atoms force)))) + +(cl-defmethod xcb:icccm:intern-atoms ((obj xcb:connection) atoms + &optional force) + "Intern the X atoms listed in the list ATOMS. + +The value of these atoms will be available in `xcb:Atom' namespace." + (dolist (atom atoms) + (let* ((name (symbol-name atom)) + (var-name (intern (concat "xcb:Atom:" name)))) + (when (or force (not (and (boundp var-name) (symbol-value var-name)))) + (set var-name + (slot-value (xcb:+request-unchecked+reply obj + (make-instance 'xcb:InternAtom + :only-if-exists 0 + :name-len (length name) + :name name)) + 'atom)))))) + +;;;; Client message + +(defclass xcb:icccm:SendEvent (xcb:SendEvent) + ((propagate :initform 0) + (event-mask :initform xcb:EventMask:NoEvent)) + :documentation "A fork of `xcb:SendEvent' to send ICCCM client messages.") + +(defclass xcb:icccm:--ClientMessage (xcb:--struct) + ((data :type xcb:-ignore)) ;shadowed slot + :documentation "To shadow the data slot in `xcb:ClientMessage'.") +;; +(defclass xcb:icccm:-ClientMessage + (xcb:icccm:--ClientMessage xcb:ClientMessage) + ((format :initform 32) + (type :initform xcb:Atom:WM_PROTOCOLS) + (protocol :type xcb:ATOM) ;new slot + (time :initarg :time :type xcb:TIMESTAMP) ;new slot + (pad~0 :initform 12 :type xcb:-pad)) ;new slot + :documentation "An ICCCM client message with data slot replaced by +protocol and time.") + +(defclass xcb:icccm:WM_DELETE_WINDOW (xcb:icccm:-ClientMessage) + ((protocol :initform xcb:Atom:WM_DELETE_WINDOW) + (time :initform xcb:Time:CurrentTime)) + :documentation "Delete a window using the WM_DELETE_WINDOW client message.") + +(defclass xcb:icccm:WM_TAKE_FOCUS (xcb:icccm:-ClientMessage) + ((protocol :initform xcb:Atom:WM_TAKE_FOCUS)) + :documentation "Set a focus using the WM_TAKE_FOCUS client message. + +A valid timestamp (rather than `xcb:Time:CurrentTime') must be supplied.") + +;;;; Abstract classes for getting/changing (plain) list properties + +(defclass xcb:icccm:-GetProperty (xcb:GetProperty) + ((delete :initform 0) + (long-offset :initform 0) + (long-length :initform 1000000000.)) ;as long as possible + :documentation "Get an ICCCM property (request part).") + +(defclass xcb:icccm:-GetProperty~reply (xcb:GetProperty~reply) + nil + :documentation "Get an ICCCM property (reply part).") +;; +(cl-defmethod xcb:unmarshal ((obj xcb:icccm:-GetProperty~reply) byte-array) + "Fill in the fields in the reply of ICCCM GetProperty request OBJ +according to BYTE-ARRAY. + +This method automatically format the value as 8, 16 or 32 bits array." + (let ((retval (cl-call-next-method obj byte-array)) + tmp) + (with-slots (~lsb length format value-len value) obj + (if (or (= 0 value-len) (= 0 length)) + (setf value nil) ;no available value + (setq tmp value ;long-offset is always 0 + value nil) + (pcase format + (8 + (cl-assert (= value-len (length tmp))) + (setf value tmp)) + (16 + (cl-assert (= (* 2 value-len) (length tmp))) + (if ~lsb + (dotimes (_ value-len) + (setf value (vconcat value + (vector (xcb:-unpack-u2-lsb tmp 0)))) + (setq tmp (substring tmp 2))) + (dotimes (_ value-len) + (setf value (vconcat value + (vector (xcb:-unpack-u2 tmp 0)))) + (setq tmp (substring tmp 2))))) + (32 + (cl-assert (= (* 4 value-len) (length tmp))) + (if ~lsb + (dotimes (_ value-len) + (setf value (vconcat value + (vector (xcb:-unpack-u4-lsb tmp 0)))) + (setq tmp (substring tmp 4))) + (dotimes (_ value-len) + (setf value (vconcat value (vector (xcb:-unpack-u4 tmp 0)))) + (setq tmp (substring tmp 4))))) + (_ (cl-assert nil))))) + retval)) + +(defclass xcb:icccm:-ChangeProperty (xcb:ChangeProperty) + ((mode :initform xcb:PropMode:Replace) + (format :initform 32) + (data :initform nil)) + :documentation "Change an ICCCM property.") +;; +(cl-defmethod xcb:marshal ((obj xcb:icccm:-ChangeProperty)) + "Return the byte-array representation of an ICCCM ChangeProperty request. + +This method automatically sets the data length." + (with-slots (~lsb format data-len data) obj + (setf data-len (length data)) + (setf data + (pcase format + (8 data) + (16 (mapconcat (lambda (i) (if ~lsb (xcb:-pack-u2-lsb i) + (xcb:-pack-u2 i))) + data [])) + (32 (mapconcat (lambda (i) (if ~lsb (xcb:-pack-u4-lsb i) + (xcb:-pack-u4 i))) + data [])) + (_ (cl-assert nil))))) + (cl-call-next-method obj)) + +;;;; Abstract classes for getting/changing text properties + +(defclass xcb:icccm:-GetProperty-text (xcb:icccm:-GetProperty) + ((type :initform xcb:GetPropertyType:Any)) + :documentation "Get an ICCCM text property (request part).") + +(defclass xcb:icccm:-GetProperty-text~reply (xcb:icccm:-GetProperty~reply) + nil + :documentation "Get an ICCCM text property (reply part).") +;; +(cl-defmethod xcb:unmarshal ((obj xcb:icccm:-GetProperty-text~reply) + byte-array) + "Fill in the fields in the reply of ICCCM GetProperty (text) request OBJ +according to BYTE-ARRAY. + +This method automatically decodes the value (as string)." + (let* ((retval (cl-call-next-method obj byte-array))) + (with-slots (format type value) obj + (when (symbolp type) (setq type (symbol-value type))) + (when (and value (= format 8)) + (setf value + (decode-coding-string + (apply #'unibyte-string (append value nil)) + (cond ((= type xcb:Atom:UTF8_STRING) 'utf-8) + ((= type xcb:Atom:STRING) 'iso-latin-1) + ((= type xcb:Atom:COMPOUND_TEXT) + 'compound-text-with-extensions) + ((or (eq type xcb:Atom:TEXT) (eq type xcb:Atom:C_STRING)) + 'no-conversion) + (t (error "[XELB:ICCCM] Unsupported encoding: %d" + type))))))) + retval)) + +(defclass xcb:icccm:-ChangeProperty-text (xcb:icccm:-ChangeProperty) + ((type :initform xcb:Atom:STRING) ;may be changed + (format :initform 8)) + :documentation "Change an ICCCM text property.") +;; +(cl-defmethod xcb:marshal ((obj xcb:icccm:-ChangeProperty-text)) + "Return the byte-array representation of an ICCCM ChangeProperty (text) +request OBJ. + +This method automatically encodes the data (which is a string)." + (with-slots (type data) obj + (when (symbolp type) (setq type (symbol-value type))) + (setf data + (vconcat + (encode-coding-string + data + (cond ((= type xcb:Atom:UTF8_STRING) 'utf-8) + ((= type xcb:Atom:STRING) 'iso-latin-1) + ((= type xcb:Atom:COMPOUND_TEXT) + 'compound-text-with-extensions) + ((or (eq type xcb:Atom:TEXT) (eq type xcb:Atom:C_STRING)) + 'no-conversion) + (t (error "[XELB:ICCCM] Unsupported encoding: %d" type))))))) + (cl-call-next-method obj)) + +;;;; Abstract classes for getting/changing single field properties + +(defclass xcb:icccm:-GetProperty-single (xcb:icccm:-GetProperty) + nil + :documentation "Get an ICCCM single-valued property (request part).") + +(defclass xcb:icccm:-GetProperty-single~reply (xcb:icccm:-GetProperty~reply) + nil + :documentation "Get a single-valued ICCCM property (reply part).") +;; +(cl-defmethod xcb:unmarshal ((obj xcb:icccm:-GetProperty-single~reply) + byte-array) + "Fill in the fields in the reply of an ICCCM GetProperty (single-valued) +request OBJ according to BYTE-ARRAY." + (let ((retval (cl-call-next-method obj byte-array))) + (with-slots (value) obj + (when value + (cl-assert (= 1 (length value))) + (setf value (elt value 0)))) + retval)) + +(defclass xcb:icccm:-ChangeProperty-single (xcb:icccm:-ChangeProperty) + nil + :documentation "Change a single-valued ICCCM property.") +;; +(cl-defmethod xcb:marshal ((obj xcb:icccm:-ChangeProperty-single)) + "Return the byte-array representation of a single-valued ICCCM ChangeProperty +request OBJ." + (with-slots (data) obj + (setf data `[,data])) + (cl-call-next-method obj)) + +;;;; Abstract classes for getting/changing property with explicit fields + +(defclass xcb:icccm:-GetProperty-explicit (xcb:icccm:-GetProperty) + nil + :documentation "Get an ICCCM property whose fields are explicitly listed out +(request part).") + +(defclass xcb:icccm:-GetProperty-explicit~reply (xcb:icccm:-GetProperty~reply) + nil + :documentation "Get an ICCCM property whose fields are explicitly listed out +(reply part).") +;; +(cl-defmethod xcb:unmarshal ((obj xcb:icccm:-GetProperty-explicit~reply) + byte-array) + "Fill in the reply of an ICCCM GetProperty request whose fields are +explicitly listed out." + (let* ((retval (cl-call-next-method obj byte-array)) + (slots-orig (eieio-class-slots 'xcb:icccm:-GetProperty~reply)) + (slots (eieio-class-slots (eieio-object-class obj))) + (slots (nthcdr (length slots-orig) slots)) + (value (slot-value obj 'value))) + (unless value (setq value (make-vector (length slots) nil))) ;fallback + ;; Set explicit fields from value field + (dotimes (i (length value)) + (setf (slot-value obj (eieio-slot-descriptor-name (elt slots i))) + (elt value i))) + retval)) + +(defclass xcb:icccm:-ChangeProperty-explicit (xcb:icccm:-ChangeProperty) + ((format :initform 32)) + :documentation "Change an ICCCM property whose fields are explicitly listed +out.") +;; +(cl-defmethod xcb:marshal ((obj xcb:icccm:-ChangeProperty-explicit)) + "Return the byte-array representation of an ICCCM ChangeProperty request +whose fields are explicitly listed out." + (let* ((slots-orig (eieio-class-slots 'xcb:icccm:-ChangeProperty)) + (slots (eieio-class-slots (eieio-object-class obj))) + (slots (nthcdr (length slots-orig) slots))) + ;; Set data field from explicit fields + (setf (slot-value obj 'data) + (mapconcat (lambda (slot) + (list (slot-value obj + (eieio-slot-descriptor-name slot)))) + slots [])) + (cl-call-next-method obj))) + +;;;; Client Properties + +;; WM_NAME +(defclass xcb:icccm:get-WM_NAME (xcb:icccm:-GetProperty-text) + ((property :initform xcb:Atom:WM_NAME))) +(defclass xcb:icccm:get-WM_NAME~reply (xcb:icccm:-GetProperty-text~reply) + nil) +(defclass xcb:icccm:set-WM_NAME (xcb:icccm:-ChangeProperty-text) + ((property :initform xcb:Atom:WM_NAME))) + +;; WM_ICON_NAME +(defclass xcb:icccm:get-WM_ICON_NAME (xcb:icccm:-GetProperty-text) + ((property :initform xcb:Atom:WM_ICON_NAME))) +(defclass xcb:icccm:get-WM_ICON_NAME~reply (xcb:icccm:-GetProperty-text~reply) + nil) +(defclass xcb:icccm:set-WM_ICON_NAME (xcb:icccm:-ChangeProperty-text) + ((property :initform xcb:Atom:WM_ICON_NAME))) + +;; WM_SIZE_HINTS +(defconst xcb:icccm:WM_SIZE_HINTS:USPosition 1) +(defconst xcb:icccm:WM_SIZE_HINTS:USSize 2) +(defconst xcb:icccm:WM_SIZE_HINTS:PPosition 4) +(defconst xcb:icccm:WM_SIZE_HINTS:PSize 8) +(defconst xcb:icccm:WM_SIZE_HINTS:PMinSize 16) +(defconst xcb:icccm:WM_SIZE_HINTS:PMaxSize 32) +(defconst xcb:icccm:WM_SIZE_HINTS:PResizeInc 64) +(defconst xcb:icccm:WM_SIZE_HINTS:PAspect 128) +(defconst xcb:icccm:WM_SIZE_HINTS:PBaseSize 256) +(defconst xcb:icccm:WM_SIZE_HINTS:PWinGravity 512) +;; +(defclass xcb:icccm:-WM_SIZE_HINTS (xcb:--struct) + ((flags :initarg :flags :initform 0 :type xcb:-ignore) + (x :initarg :x :initform 0 :type xcb:-ignore) + (y :initarg :y :initform 0 :type xcb:-ignore) + (width :initarg :width :initform 0 :type xcb:-ignore) + (height :initarg :height :initform 0 :type xcb:-ignore) + (min-width :initarg :min-width :initform 0 :type xcb:-ignore) + (min-height :initarg :min-height :initform 0 :type xcb:-ignore) + (max-width :initarg :max-width :initform 0 :type xcb:-ignore) + (max-height :initarg :max-height :initform 0 :type xcb:-ignore) + (width-inc :initarg :width-inc :initform 0 :type xcb:-ignore) + (height-inc :initarg :height-inc :initform 0 :type xcb:-ignore) + (min-aspect-num :initarg :min-aspect-num :initform 0 :type xcb:-ignore) + (min-aspect-den :initarg :min-aspect-den :initform 0 :type xcb:-ignore) + (max-aspect-num :initarg :max-aspect-num :initform 0 :type xcb:-ignore) + (max-aspect-den :initarg :max-aspect-den :initform 0 :type xcb:-ignore) + (base-width :initarg :base-width :initform 0 :type xcb:-ignore) + (base-height :initarg :base-height :initform 0 :type xcb:-ignore) + (win-gravity :initarg :win-gravity :initform 0 :type xcb:-ignore))) +;; +(defclass xcb:icccm:get-WM_SIZE_HINTS (xcb:icccm:-GetProperty-explicit) + ((property :initform xcb:Atom:WM_SIZE_HINTS) + (type :initform xcb:Atom:WM_SIZE_HINTS) + (long-length :initform 18))) ;fixed +(defclass xcb:icccm:get-WM_SIZE_HINTS~reply + (xcb:icccm:-GetProperty-explicit~reply xcb:icccm:-WM_SIZE_HINTS) + nil) +(defclass xcb:icccm:set-WM_SIZE_HINTS + (xcb:icccm:-ChangeProperty-explicit xcb:icccm:-WM_SIZE_HINTS) + ((property :initform xcb:Atom:WM_SIZE_HINTS) + (type :initform xcb:Atom:WM_SIZE_HINTS))) + +;; WM_NORMAL_HINTS +(defclass xcb:icccm:get-WM_NORMAL_HINTS (xcb:icccm:get-WM_SIZE_HINTS) + ((property :initform xcb:Atom:WM_NORMAL_HINTS))) +(defclass xcb:icccm:get-WM_NORMAL_HINTS~reply + (xcb:icccm:get-WM_SIZE_HINTS~reply) + nil) +(defclass xcb:icccm:set-WM_NORMAL_HINTS (xcb:icccm:set-WM_SIZE_HINTS) + ((property :initform xcb:Atom:WM_NORMAL_HINTS))) + +;; WM_HINTS +(defconst xcb:icccm:WM_HINTS:InputHint 1) +(defconst xcb:icccm:WM_HINTS:StateHint 2) +(defconst xcb:icccm:WM_HINTS:IconPixmapHint 4) +(defconst xcb:icccm:WM_HINTS:IconWindowHint 8) +(defconst xcb:icccm:WM_HINTS:IconPositionHint 16) +(defconst xcb:icccm:WM_HINTS:IconMaskHint 32) +(defconst xcb:icccm:WM_HINTS:WindowGroupHint 64) +(defconst xcb:icccm:WM_HINTS:MessageHint 128) +(defconst xcb:icccm:WM_HINTS:UrgencyHint 256) +;; +(defclass xcb:icccm:-WM_HINTS (xcb:--struct) + ((flags :initarg :flags :initform 0 :type xcb:-ignore) + (input :initarg :input :initform 0 :type xcb:-ignore) + (initial-state :initarg :initial-state :initform 0 :type xcb:-ignore) + (icon-pixmap :initarg :icon-pixmap :initform 0 :type xcb:-ignore) + (icon-window :initarg :icon-window :initform 0 :type xcb:-ignore) + (icon-x :initarg :icon-x :initform 0 :type xcb:-ignore) + (icon-y :initarg :icon-y :initform 0 :type xcb:-ignore) + (icon-mask :initarg :icon-mask :initform 0 :type xcb:-ignore) + (window-group :initarg :window-group :initform 0 :type xcb:-ignore))) +;; +(defclass xcb:icccm:get-WM_HINTS (xcb:icccm:-GetProperty-explicit) + ;; (xcb:icccm:-GetProperty) + ((property :initform xcb:Atom:WM_HINTS) + (type :initform xcb:Atom:WM_HINTS) + (long-length :initform 9))) ;fixed +(defclass xcb:icccm:get-WM_HINTS~reply + (xcb:icccm:-GetProperty-explicit~reply xcb:icccm:-WM_HINTS) + nil) +(defclass xcb:icccm:set-WM_HINTS + (xcb:icccm:-ChangeProperty-explicit xcb:icccm:-WM_HINTS) + ((property :initform xcb:Atom:WM_HINTS) + (type :initform xcb:Atom:WM_HINTS))) + +;; WM_CLASS +(defclass xcb:icccm:get-WM_CLASS (xcb:icccm:-GetProperty-text) + ((property :initform xcb:Atom:WM_CLASS) + (type :initform xcb:Atom:STRING))) +(defclass xcb:icccm:get-WM_CLASS~reply (xcb:icccm:-GetProperty-text~reply) + ((instance-name :type xcb:-ignore) + (class-name :type xcb:-ignore))) +;; +(cl-defmethod xcb:unmarshal ((obj xcb:icccm:get-WM_CLASS~reply) byte-array) + ;; Split value into instance & class names + (let* ((retval (cl-call-next-method obj byte-array)) + (tmp (slot-value obj 'value)) + (tmp (if tmp (split-string tmp "\0" t) '(nil nil)))) + (with-slots (instance-name class-name) obj + (setf instance-name (car tmp) + class-name (cadr tmp))) + retval)) +;; +(defclass xcb:icccm:set-WM_CLASS (xcb:icccm:-ChangeProperty-text) + ((property :initform xcb:Atom:WM_CLASS) + (type :initform xcb:Atom:STRING) + (instance-name :initarg :instance-name :type xcb:-ignore) + (class-name :initarg :class-name :type xcb:-ignore))) +;; +(cl-defmethod xcb:marshal ((obj xcb:icccm:set-WM_CLASS)) + (with-slots (data instance-name class-name) obj + (setf data (concat instance-name "\0" class-name "\0"))) + (cl-call-next-method obj)) + +;; WM_TRANSIENT_FOR +(defclass xcb:icccm:get-WM_TRANSIENT_FOR (xcb:icccm:-GetProperty-single) + ((property :initform xcb:Atom:WM_TRANSIENT_FOR) + (type :initform xcb:Atom:WINDOW) + (long-length :initform 1))) +(defclass xcb:icccm:get-WM_TRANSIENT_FOR~reply + (xcb:icccm:-GetProperty-single~reply) + nil) +(defclass xcb:icccm:set-WM_TRANSIENT_FOR (xcb:icccm:-ChangeProperty-single) + ((property :initform xcb:Atom:WM_TRANSIENT_FOR) + (type :initform xcb:Atom:WINDOW))) + +;; WM_PROTOCOLS +(defclass xcb:icccm:get-WM_PROTOCOLS (xcb:icccm:-GetProperty) + ((property :initform xcb:Atom:WM_PROTOCOLS) + (type :initform xcb:Atom:ATOM))) +(defclass xcb:icccm:get-WM_PROTOCOLS~reply (xcb:icccm:-GetProperty~reply) + nil) +(defclass xcb:icccm:set-WM_PROTOCOLS (xcb:icccm:-ChangeProperty) + ((type :initform xcb:Atom:ATOM) + (format :initform 32))) + +;; WM_COLORMAP_WINDOWS +(defclass xcb:icccm:get-WM_COLORMAP_WINDOWS (xcb:icccm:-GetProperty) + ((type :initform xcb:Atom:WINDOW))) +(defclass xcb:icccm:get-WM_COLORMAP_WINDOWS~reply + (xcb:icccm:-GetProperty~reply) + nil) +(defclass xcb:icccm:set-WM_COLORMAP_WINDOWS (xcb:icccm:-ChangeProperty) + ((type :initform xcb:Atom:WINDOW) + (format :initform 32))) + +;; WM_CLIENT_MACHINE +(defclass xcb:icccm:get-WM_CLIENT_MACHINE (xcb:icccm:-GetProperty-text) + ((property :initform xcb:Atom:WM_CLIENT_MACHINE))) +(defclass xcb:icccm:get-WM_CLIENT_MACHINE~reply + (xcb:icccm:-GetProperty-text~reply) + nil) +(defclass xcb:icccm:set-WM_CLIENT_MACHINE (xcb:icccm:-ChangeProperty-text) + ((property :initform xcb:Atom:WM_CLIENT_MACHINE))) + +;;;; Window Manager Properties + +;; WM_STATE +(defconst xcb:icccm:WM_STATE:WithdrawnState 0) +(defconst xcb:icccm:WM_STATE:NormalState 1) +(defconst xcb:icccm:WM_STATE:IconicState 3) +;; +(defclass xcb:icccm:-WM_STATE (xcb:--struct) + ((state :initarg :state :type xcb:-ignore) + (icon :initarg :icon :type xcb:-ignore))) +;; +(defclass xcb:icccm:get-WM_STATE (xcb:icccm:-GetProperty-explicit) + ((property :initform xcb:Atom:WM_STATE) + (type :initform xcb:Atom:WM_STATE) + (long-length :initform 2))) +(defclass xcb:icccm:get-WM_STATE~reply + (xcb:icccm:-GetProperty-explicit~reply xcb:icccm:-WM_STATE) + nil) +(defclass xcb:icccm:set-WM_STATE + (xcb:icccm:-ChangeProperty-explicit xcb:icccm:-WM_STATE) + ((property :initform xcb:Atom:WM_STATE) + (type :initform xcb:Atom:WM_STATE))) + +;; WM_ICON_SIZE +(defclass xcb:icccm:-WM_ICON_SIZE (xcb:--struct) + ((min-width :initarg :min-width :type xcb:-ignore) + (min-height :initarg :min-height :type xcb:-ignore) + (max-width :initarg :max-width :type xcb:-ignore) + (max-height :initarg :max-height :type xcb:-ignore) + (width-inc :initarg :width-inc :type xcb:-ignore) + (height-inc :initarg :height-inc :type xcb:-ignore))) +;; +(defclass xcb:icccm:get-WM_ICON_SIZE (xcb:icccm:-GetProperty-explicit) + ((property :initform xcb:Atom:WM_ICON_SIZE) + (type :initform xcb:Atom:WM_ICON_SIZE) + (long-length :initform 6))) +(defclass xcb:icccm:get-WM_ICON_SIZE~reply + (xcb:icccm:-GetProperty-explicit~reply xcb:icccm:-WM_ICON_SIZE) + nil) +(defclass xcb:icccm:set-WM_ICON_SIZE + (xcb:icccm:-ChangeProperty-explicit xcb:icccm:-WM_ICON_SIZE) + ((property :initform xcb:Atom:WM_ICON_SIZE) + (type :initform xcb:Atom:WM_ICON_SIZE))) + + + +(provide 'xcb-icccm) + +;;; xcb-icccm.el ends here diff --git a/elpa/xelb-0.18/xcb-keysyms.el b/elpa/xelb-0.18/xcb-keysyms.el new file mode 100644 index 0000000..af4f97b --- /dev/null +++ b/elpa/xelb-0.18/xcb-keysyms.el @@ -0,0 +1,817 @@ +;;; xcb-keysyms.el --- Conversion between -*- lexical-binding: t -*- +;;; X keysyms, X keycodes and Emacs key event. + +;; Copyright (C) 2015-2019 Free Software Foundation, Inc. + +;; Author: Chris Feng + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This library mainly deals with the conversion between X keycodes, X keysyms +;; and Emacs key events, roughly corresponding to the xcb/util-keysyms project. + +;; Usage tips: +;; + Do not forget to call `xcb:keysyms:init' for _every_ connection using +;; this library. +;; + xcb:keysyms:*-mask correctly relate Emacs modifier keys to X ones, +;; thus shall be used in preference to 'xcb:ModMask:*' or +;; 'xcb:KeyButMask:Mod*'. + +;; References: +;; + X protocol (http://www.x.org/releases/X11R7.7/doc/xproto/x11protocol.txt) +;; + XKB protocol (https://www.x.org/releases/X11R7.7/doc/kbproto/xkbproto.txt) +;; + xcb/util-keysyms (git://anongit.freedesktop.org/xcb/util-keysyms) + +;;; Code: + +(eval-when-compile (require 'cl-lib)) + +(require 'xcb) +(require 'xcb-xkb) + +(defclass xcb:keysyms:-device (xcb:--struct) + ((keytypes :initform nil) + (keycodes :initform nil) + (min-keycode :initform 0) + (max-keycode :initform 0) + (updated :initform nil)) + :documentation "Device (keyboard) properties.") + +;; These variables are shared by all connections. +(defvar xcb:keysyms:meta-mask 0 "META key mask.") +(defvar xcb:keysyms:control-mask xcb:ModMask:Control "CONTROL key mask.") +(defvar xcb:keysyms:shift-mask xcb:ModMask:Shift "SHIFT key mask.") +(defvar xcb:keysyms:hyper-mask 0 "HYPER key mask.") +(defvar xcb:keysyms:super-mask 0 "SUPER key mask.") +(defvar xcb:keysyms:alt-mask 0 "ALT key mask.") +(defvar xcb:keysyms:lock-mask xcb:ModMask:Lock "LOCK key mask.") +(defvar xcb:keysyms:shift-lock-mask 0 "SHIFT-LOCK key mask.") +(defvar xcb:keysyms:num-lock-mask 0 "NUM-LOCK key mask.") + +(cl-defmethod xcb:keysyms:-get-current-device ((conn xcb:connection)) + "Return the device currently used." + (or (xcb:-get-extra-plist conn 'keysyms + (xcb:-get-extra-plist conn 'keysyms 'device-id)) + (make-instance 'xcb:keysyms:-device))) + +(cl-defmethod xcb:keysyms:init ((obj xcb:connection) &optional callback) + "Initialize keysyms module. + +CALLBACK specifies a function to call every time the keyboard is updated. + +This method must be called before using any other method in this module." + (cond + ;; Avoid duplicated initializations. + ((xcb:-get-extra-plist obj 'keysyms 'opcode)) + ((= 0 (slot-value (xcb:get-extension-data obj 'xcb:xkb) + 'present)) + (error "[XCB] XKB extension is not supported by the server")) + ((not (slot-value (xcb:+request-unchecked+reply obj + (make-instance 'xcb:xkb:UseExtension + :wantedMajor 1 + :wantedMinor 0)) + 'supported)) + (error "[XCB] XKB extension version 1.0 is not supported by the server")) + (t + ;; Save the major opcode of XKB and callback function. + (xcb:-set-extra-plist obj 'keysyms 'opcode + (slot-value (xcb:get-extension-data obj 'xcb:xkb) + 'major-opcode)) + (xcb:-set-extra-plist obj 'keysyms 'callback callback) + ;; Set per-client flags. + (xcb:keysyms:-set-per-client-flags obj xcb:xkb:ID:UseCoreKbd) + ;; Update data. + (xcb:keysyms:-update-keytypes obj xcb:xkb:ID:UseCoreKbd) + (xcb:-set-extra-plist obj 'keysyms 'device-id + (xcb:keysyms:-update-keycodes obj + xcb:xkb:ID:UseCoreKbd)) + (xcb:keysyms:-update-modkeys obj xcb:xkb:ID:UseCoreKbd) + ;; Attach event listeners. + (xcb:+event obj 'xcb:xkb:NewKeyboardNotify + (lambda (data _) + (xcb:keysyms:-on-NewKeyboardNotify obj data))) + (xcb:+event obj 'xcb:xkb:MapNotify + (lambda (data _) + (xcb:keysyms:-on-MapNotify obj data))) + ;; Select XKB MapNotify and NewKeyboardNotify events. + (let ((map (logior xcb:xkb:MapPart:KeyTypes + xcb:xkb:MapPart:KeySyms + xcb:xkb:MapPart:ModifierMap)) + (new-keyboard (logior xcb:xkb:NKNDetail:DeviceID + xcb:xkb:NKNDetail:Keycodes))) + (xcb:+request obj + (make-instance 'xcb:xkb:SelectEvents + :deviceSpec xcb:xkb:ID:UseCoreKbd + :affectWhich (logior + xcb:xkb:EventType:NewKeyboardNotify + xcb:xkb:EventType:MapNotify) + :clear 0 + :selectAll 0 + :affectMap map + :map map + :affectNewKeyboard new-keyboard + :newKeyboardDetails new-keyboard))) + (xcb:flush obj)))) + +(cl-defmethod xcb:keysyms:-set-per-client-flags ((obj xcb:connection) + device-id) + "Set per-client flags." + (let ((per-client-flags (logior + ;; Instead of compatibility state. + xcb:xkb:PerClientFlag:GrabsUseXKBState + ;; Instead of grab state. + xcb:xkb:PerClientFlag:LookupStateWhenGrabbed + ;; Use XKB state in 'SendEvent'. + xcb:xkb:PerClientFlag:SendEventUsesXKBState))) + ;; The reply is not used. + (xcb:+request-unchecked+reply obj + (make-instance 'xcb:xkb:PerClientFlags + :deviceSpec device-id + :change per-client-flags + :value per-client-flags + :ctrlsToChange 0 + :autoCtrls 0 + :autoCtrlsValues 0)))) + +(cl-defmethod xcb:keysyms:-on-NewKeyboardNotify ((obj xcb:connection) data) + "Handle 'NewKeyboardNotify' event." + (let ((device-id (xcb:-get-extra-plist obj 'keysyms 'device-id)) + (callback (xcb:-get-extra-plist obj 'keysyms 'callback)) + (obj1 (make-instance 'xcb:xkb:NewKeyboardNotify)) + device updated) + (xcb:unmarshal obj1 data) + (with-slots (deviceID oldDeviceID requestMajor requestMinor changed) obj1 + (if (= 0 (logand changed xcb:xkb:NKNDetail:DeviceID)) + (when (/= 0 (logand changed xcb:xkb:NKNDetail:Keycodes)) + (setq device (xcb:-get-extra-plist obj 'keysyms deviceID)) + (when (and device + (not (slot-value device 'updated))) + (xcb:keysyms:-update-keycodes obj deviceID) + (when (= deviceID device-id) + (setq updated t) + (xcb:keysyms:-update-modkeys obj deviceID)) + (setf (slot-value device 'updated) t))) + (xcb:keysyms:-set-per-client-flags obj deviceID) + (xcb:keysyms:-update-keytypes obj deviceID) + (xcb:keysyms:-update-keycodes obj deviceID) + (when (or (= oldDeviceID device-id) + ;; 0 is a special value for servers not supporting + ;; the X Input Extension. + (= oldDeviceID 0)) + ;; Device changed; update the per-client flags and local data. + (setq updated t) + (xcb:keysyms:-update-modkeys obj deviceID) + (xcb:-set-extra-plist obj 'keysyms 'device-id deviceID)))) + (when (and callback updated) + (with-demoted-errors "[XELB ERROR] %S" + (funcall callback))))) + +(cl-defmethod xcb:keysyms:-on-MapNotify ((obj xcb:connection) data) + "Handle 'MapNotify' event." + (let ((device-id (xcb:-get-extra-plist obj 'keysyms 'device-id)) + (callback (xcb:-get-extra-plist obj 'keysyms 'callback)) + (obj1 (make-instance 'xcb:xkb:MapNotify)) + updated) + (xcb:unmarshal obj1 data) + (with-slots (deviceID changed firstType nTypes firstKeySym nKeySyms) obj1 + ;; Ensure this event is for the current device. + (when (/= 0 (logand changed xcb:xkb:MapPart:KeyTypes)) + (setq updated t) + (xcb:keysyms:-update-keytypes obj deviceID firstType nTypes)) + (when (/= 0 (logand changed xcb:xkb:MapPart:KeySyms)) + (setq updated t) + (xcb:keysyms:-update-keycodes obj deviceID firstKeySym nKeySyms)) + (when (/= 0 (logand changed xcb:xkb:MapPart:ModifierMap)) + (setq updated t) + (xcb:keysyms:-update-modkeys obj deviceID)) + (when (and updated + callback + (= deviceID device-id)) + (with-demoted-errors "[XELB ERROR] %S" + (funcall callback)))))) + +(cl-defmethod xcb:keysyms:-update-keytypes ((obj xcb:connection) device-id + &optional first-keytype count) + "Update key types. + +FIRST-KEYTYPE and count specify the range of key types to update." + (let (device full partial) + (if (and first-keytype count) + (setq full 0 + partial xcb:xkb:MapPart:KeyTypes) + (setq full xcb:xkb:MapPart:KeyTypes + partial 0 + first-keytype 0 + count 0)) + (with-slots (deviceID present firstType nTypes totalTypes types-rtrn) + (xcb:+request-unchecked+reply obj + (make-instance 'xcb:xkb:GetMap + :deviceSpec device-id + :full full + :partial partial + :firstType first-keytype + :nTypes count + :firstKeySym 0 + :nKeySyms 0 + :firstKeyAction 0 + :nKeyActions 0 + :firstKeyBehavior 0 + :nKeyBehaviors 0 + :virtualMods 0 + :firstKeyExplicit 0 + :nKeyExplicit 0 + :firstModMapKey 0 + :nModMapKeys 0 + :firstVModMapKey 0 + :nVModMapKeys 0)) + (cl-assert (/= 0 (logand present xcb:xkb:MapPart:KeyTypes))) + (setq device (or (xcb:-get-extra-plist obj 'keysyms deviceID) + (make-instance 'xcb:keysyms:-device))) + (with-slots (keytypes) device + (when (or (/= 0 full) + (not keytypes)) + (setf keytypes (make-vector totalTypes nil))) + (setf keytypes (vconcat (substring keytypes 0 firstType) + types-rtrn + (substring keytypes (min (+ firstType nTypes) + totalTypes))))) + (xcb:-set-extra-plist obj 'keysyms deviceID device) + deviceID))) + +(cl-defmethod xcb:keysyms:-update-keycodes ((obj xcb:connection) device-id + &optional first-keycode count) + "Update keycode-keysym mapping. + +FIRST-KEYCODE and COUNT specify the keycode range to update." + (let (device full partial) + (if (and first-keycode count) + (setq full 0 + partial xcb:xkb:MapPart:KeySyms) + (setq full xcb:xkb:MapPart:KeySyms + partial 0 + first-keycode 0 + count 0)) + (with-slots (deviceID minKeyCode maxKeyCode present + firstKeySym nKeySyms syms-rtrn) + (xcb:+request-unchecked+reply obj + (make-instance 'xcb:xkb:GetMap + :deviceSpec device-id + :full full + :partial partial + :firstType 0 + :nTypes 0 + :firstKeySym first-keycode + :nKeySyms count + :firstKeyAction 0 + :nKeyActions 0 + :firstKeyBehavior 0 + :nKeyBehaviors 0 + :virtualMods 0 + :firstKeyExplicit 0 + :nKeyExplicit 0 + :firstModMapKey 0 + :nModMapKeys 0 + :firstVModMapKey 0 + :nVModMapKeys 0)) + (cl-assert (/= 0 (logand present xcb:xkb:MapPart:KeySyms))) + (setq device (or (xcb:-get-extra-plist obj 'keysyms deviceID) + (make-instance 'xcb:keysyms:-device))) + (with-slots (keycodes min-keycode max-keycode) device + (when (or (/= 0 full) + ;; Unlikely? + (/= min-keycode minKeyCode) + (/= max-keycode maxKeyCode)) + (setf keycodes (make-vector (- maxKeyCode minKeyCode -1) nil) + min-keycode minKeyCode + max-keycode maxKeyCode)) + (setf keycodes + (vconcat + (substring keycodes 0 (- firstKeySym min-keycode)) + syms-rtrn + (substring keycodes + (- (min (+ firstKeySym nKeySyms) max-keycode) + min-keycode))))) + (xcb:-set-extra-plist obj 'keysyms deviceID device) + deviceID))) + +(cl-defmethod xcb:keysyms:-update-modkeys ((obj xcb:connection) _device-id) + "Update modifier keys." + ;; Reference: 'x_find_modifier_meanings' in 'xterm.c'. + (with-slots (keycodes-per-modifier keycodes) + (xcb:+request-unchecked+reply obj + (make-instance 'xcb:GetModifierMapping)) + (setq xcb:keysyms:meta-mask 0 + xcb:keysyms:hyper-mask 0 + xcb:keysyms:super-mask 0 + xcb:keysyms:alt-mask 0 + xcb:keysyms:shift-lock-mask 0 + xcb:keysyms:num-lock-mask 0) + (dolist (row (number-sequence 3 7)) + (let ((mask (lsh 1 row)) + (col 0) + found-alt-or-meta keycode keysym) + (while (< col keycodes-per-modifier) + (setq keycode (elt keycodes (+ (* row keycodes-per-modifier) col))) + (when (/= keycode 0) + (setq keysym (car (xcb:keysyms:keycode->keysym obj keycode 0))) + (when (/= keysym 0) + (pcase (xcb:keysyms:keysym->event obj keysym nil t) + ((or `lmeta* `rmeta*) + (setq found-alt-or-meta t + xcb:keysyms:meta-mask (logior xcb:keysyms:meta-mask + mask))) + ((or `lalt* `ralt*) + (setq found-alt-or-meta t + xcb:keysyms:alt-mask (logior xcb:keysyms:alt-mask + mask))) + ((or `lhyper* `rhyper*) + (unless found-alt-or-meta + (setq xcb:keysyms:hyper-mask (logior xcb:keysyms:hyper-mask + mask))) + (setq col keycodes-per-modifier)) + ((or `lsuper* `rsuper*) + (unless found-alt-or-meta + (setq xcb:keysyms:super-mask (logior xcb:keysyms:super-mask + mask))) + (setq col keycodes-per-modifier)) + (`shift-lock* + (unless found-alt-or-meta + (setq xcb:keysyms:lock-mask (logior xcb:keysyms:lock-mask + mask))) + (setq col keycodes-per-modifier)) + (`kp-numlock + (setq xcb:keysyms:num-lock-mask + (logior xcb:keysyms:num-lock-mask mask)))))) + (cl-incf col))))) + ;; Meta fallbacks to Alt. + (unless (/= 0 xcb:keysyms:meta-mask) + (setq xcb:keysyms:meta-mask xcb:keysyms:alt-mask + xcb:keysyms:alt-mask 0)) + ;; A key cannot be both Meta and Alt. + (when (and (/= 0 xcb:keysyms:meta-mask) + (/= 0 xcb:keysyms:alt-mask) + (/= 0 (logand xcb:keysyms:meta-mask xcb:keysyms:alt-mask))) + (setq xcb:keysyms:alt-mask (logand xcb:keysyms:alt-mask + (lognot xcb:keysyms:meta-mask))))) + +(cl-defmethod xcb:keysyms:keycode->keysym ((obj xcb:connection) keycode + modifiers) + "Convert KEYCODE to keysym or get possible modifier combinations for keycode. + +If MODIFIERS is non-nil, return (KEYSYM . CONSUMED-MODIFIERS) where +CONSUMED-MODIFIERS should be lognot'ed with MODIFIERS so as to make further +conversion correct. (0 . 0) is returned when conversion fails. + +If MODIFIERS is nil, return all possible modifier combinations for this +keycode. The caller is responsible for checking which modifiers to use." + (let ((preserve 0) + group group-info group-number index keytype) + (with-slots (keytypes keycodes min-keycode max-keycode) + (xcb:keysyms:-get-current-device obj) + ;; Reference: `XkbTranslateKeyCode' in 'XKBBind.c'. + (catch 'return + ;; Check keycode range. + (unless (<= min-keycode keycode max-keycode) + (throw 'return '(0 . 0))) + ;; Retrieve KeySymMap and group info. + (setq keycode (aref keycodes (- keycode min-keycode)) + group-info (slot-value keycode 'groupInfo) + group-number (logand group-info #xF)) ; See . + ;; Check group number. + (when (= group-number 0) + (throw 'return '(0 . 0))) + (setq group (if (null modifiers) + 0 + (logand (lsh modifiers -13) #b11))) ;The 13, 14 bits. + ;; Wrap group. + (when (>= group group-number) + (pcase (logand group-info #xC0) ;See . + (`xcb:xkb:GroupsWrap:RedirectIntoRange + (setq group (logand #xFF (lsh group-info -4))) ;See . + ;; Check if it's also out of range. + (when (>= group group-number) + (setq group 0))) + (`xcb:xkb:GroupsWrap:ClampIntoRange + (setq group (1- group-number))) + (_ + (setq group (% group group-number))))) + ;; Calculate the index of keysym. + (setq index (* group (slot-value keycode 'width))) + ;; Get key type. + (setq keytype (aref keytypes + (elt (slot-value keycode 'kt-index) group))) + (with-slots (mods-mask hasPreserve map (preserve* preserve)) keytype + (if (null modifiers) + ;; Return all possible modifier combinations. + (delq nil + (mapcar (lambda (entry) + (when (= (slot-value entry 'active) 1) + (slot-value entry 'mods-mask))) + map)) + ;; Find the shift level and preserved modifiers. + (catch 'break + (dolist (entry map) + (with-slots (active (mods-mask* mods-mask) level) entry + (when (and (= 1 active) + (= (logand modifiers mods-mask) mods-mask*)) + (cl-incf index level) + (when (= 1 hasPreserve) + (setq preserve (slot-value (elt preserve* + (cl-position entry map)) + 'mask))) + (throw 'break nil))))) + (cons (elt (slot-value keycode 'syms) index) + (logand mods-mask (lognot preserve))))))))) + +(cl-defmethod xcb:keysyms:keysym->keycode ((obj xcb:connection) keysym) + "Convert keysym to (the first matching) keycode. + +Return 0 if conversion fails." + (let ((index 0) + (continue t)) + (with-slots (keycodes min-keycode max-keycode) + (xcb:keysyms:-get-current-device obj) + ;; Traverse all keycodes, column by column. + ;; Reference: `XKeysymToKeycode' in 'XKBBind.c'. + (catch 'break + (when (= 0 keysym) + (throw 'break 0)) + (while continue + (setq continue nil) + (dotimes (i (- max-keycode min-keycode -1)) + (with-slots (nSyms syms) (aref keycodes i) + (when (< index nSyms) + (setq continue t) + (when (= keysym (elt syms index)) + (throw 'break (+ i min-keycode)))))) + (cl-incf index)) + 0)))) + +;; This list is largely base on 'lispy_function_keys' in 'keyboard.c'. +(defconst xcb:keysyms:-function-keys + `[ ;#xff00 - #xff0f + ,@(make-list 8 nil) backspace tab linefeed clear nil return nil nil + ;#xff10 - #xff1f + nil nil nil pause nil nil nil nil nil nil nil escape nil nil nil nil + ;#xff20 - #xff2f + nil kanji muhenkan henkan romaji hiragana katakana hiragana-katakana + zenkaku hankaku zenkaku-hankaku touroku massyo kana-lock kana-shift + eisu-shift + ;#xff30 - #xff3f + eisu-toggle ,@(make-list 15 nil) + ;#xff40 - #xff4f + ,@(make-list 16 nil) + ;#xff50 - #xff5f + home left up right down prior next end begin ,@(make-list 7 nil) + ;#xff60 - #xff6f + select print execute insert nil undo redo menu find cancel help break + nil nil nil nil + ;#xff70 - #xff7f + ;; nil nil nil nil backtab ,@(make-list 10 nil) kp-numlock + nil nil nil nil backtab ,@(make-list 9 nil) mode-switch* kp-numlock + ;#xff80 - #xff8f + kp-space ,@(make-list 8 nil) kp-tab nil nil nil kp-enter nil nil + ;#xff90 - #xff9f + nil kp-f1 kp-f2 kp-f3 kp-f4 kp-home kp-left kp-up kp-right kp-down + kp-prior kp-next kp-end kp-begin kp-insert kp-delete + ;#xffa0 - #xffaf + ,@(make-list 10 nil) + kp-multiply kp-add kp-separator kp-subtract kp-decimal kp-divide + ;#xffb0 - #xffbf + kp-0 kp-1 kp-2 kp-3 kp-4 kp-5 kp-6 kp-7 kp-8 kp-9 nil nil nil kp-equal + f1 f2 + ;#xffc0 - #xffcf + f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 f13 f14 f15 f16 f17 f18 + ;#xffd0 - #xffdf + f19 f20 f21 f22 f23 f24 f25 f26 f27 f28 f29 f30 f31 f32 f33 f34 + ;#xffe0 - #xffef + ;; f35 ,@(make-list 15 nil) + f35 lshift* rshift* lcontrol* rcontrol* caps-lock* shift-lock* + lmeta* rmeta* lalt* ralt* lsuper* rsuper* lhyper* rhyper* nil + ;#xff00 - #xffff + ,@(make-list 15 nil) delete] + "Emacs event representations of X function keys (keysym #xff00 to #xffff).") + +;; From 'iso_lispy_function_keys' in 'keyboard.c' +(defconst xcb:keysyms:-iso-function-keys + `[ + ;#xfe00 - #xfe0f + ,@(make-list 16 nil) + ;#xfe10 - #xfe1f + ,@(make-list 16 nil) + ;#xfe20 - #xfe2f + iso-lefttab iso-move-line-up iso-move-line-down iso-partial-line-up + iso-partial-line-down iso-partial-space-left iso-partial-space-right + iso-set-margin-left iso-set-margin-right iso-release-margin-left + iso-release-margin-right iso-release-both-margins iso-fast-cursor-left + iso-fast-cursor-right iso-fast-cursor-up iso-fast-cursor-down + ;#xfe30 - #xfe3f + iso-continuous-underline iso-discontinuous-underline iso-emphasize + iso-center-object iso-enter ,@(make-list 11 nil) + ;everything else + ,@(make-list 192 nil)] + "Emacs event representations of ISO function keys (#xfe00 to #xfeff).") + +;; This list is adapted from 'XF86keysym.h' in X source. +;; FIXME: We've intentionally left out keysyms outside the range 0x1008FF00 ~ +;; 0x1008FFFF. +;; REVIEW: Could anybody verify this list? +(defconst xcb:keysyms:-xf86-keys + `[ ;#x1008ff00 - #x1008ff0f + nil XF86ModeLock XF86MonBrightnessUp XF86MonBrightnessDown + XF86KbdLightOnOff XF86KbdBrightnessUp XF86KbdBrightnessDown + ,@(make-list 9 nil) + ;#x1008ff10 - #x1008ff1f + XF86Standby XF86AudioLowerVolume XF86AudioMute XF86AudioRaiseVolume + XF86AudioPlay XF86AudioStop XF86AudioPrev XF86AudioNext XF86HomePage + XF86Mail XF86Start XF86Search XF86AudioRecord XF86Calculator XF86Memo + XF86ToDoList + ;#x1008ff20 - #x1008ff2f + XF86Calendar XF86PowerDown XF86ContrastAdjust XF86RockerUp + XF86RockerDown XF86RockerEnter XF86Back XF86Forward XF86Stop + XF86Refresh XF86PowerOff XF86WakeUp XF86Eject XF86ScreenSaver XF86WWW + XF86Sleep + ;#x1008ff30 - #x1008ff3f + XF86Favorites XF86AudioPause XF86AudioMedia XF86MyComputer + XF86VendorHome XF86LightBulb XF86Shop XF86History XF86OpenURL + XF86AddFavorite XF86HotLinks XF86BrightnessAdjust XF86Finance + XF86Community XF86AudioRewind XF86BackForward + ;#x1008ff40 - #x1008ff4f + XF86Launch0 XF86Launch1 XF86Launch2 XF86Launch3 XF86Launch4 XF86Launch5 + XF86Launch6 XF86Launch7 XF86Launch8 XF86Launch9 XF86LaunchA XF86LaunchB + XF86LaunchC XF86LaunchD XF86LaunchE XF86LaunchF + ;#x1008ff50 - #x1008ff5f + XF86ApplicationLeft XF86ApplicationRight XF86Book XF86CD XF86Calculater + XF86Clear XF86Close XF86Copy XF86Cut XF86Display XF86DOS XF86Documents + XF86Excel XF86Explorer XF86Game XF86Go + ;#x1008ff60 - #x1008ff6f + XF86iTouch XF86LogOff XF86Market XF86Meeting nil XF86MenuKB XF86MenuPB + XF86MySites XF86New XF86News XF86OfficeHome XF86Open XF86Option + XF86Paste XF86Phone nil + ;#x1008ff70 - #x1008ff7f + XF86Q nil XF86Reply XF86Reload XF86RotateWindows XF86RotationPB + XF86RotationKB XF86Save XF86ScrollUp XF86ScrollDown XF86ScrollClick + XF86Send XF86Spell XF86SplitScreen XF86Support XF86TaskPane + ;#x1008ff80 - #x1008ff8f + XF86Terminal XF86Tools XF86Travel nil XF86UserPB XF86User1KB + XF86User2KB XF86Video XF86WheelButton XF86Word XF86Xfer XF86ZoomIn + XF86ZoomOut XF86Away XF86Messenger XF86WebCam + ;#x1008ff90 - #x1008ff9f + XF86MailForward XF86Pictures XF86Music XF86Battery XF86Bluetooth + XF86WLAN XF86UWB XF86AudioForward XF86AudioRepeat XF86AudioRandomPlay + XF86Subtitle XF86AudioCycleTrack XF86CycleAngle XF86FrameBack + XF86FrameForward XF86Time + ;#x1008ffa0 - #x1008ffaf + XF86Select XF86View XF86TopMenu XF86Red XF86Green XF86Yellow XF86Blue + XF86Suspend XF86Hibernate XF86TouchpadToggle ,@(make-list 6 nil) + ;#x1008ffb0 - #x1008ffbf + XF86TouchpadOn XF86TouchpadOff XF86AudioMicMute ,@(make-list 13 nil) + ;everything rest + ,@(make-list 64 nil)] + "Emacs event representations of XF86keysym (#x1008ff00 - #x1008ffff).") + +(cl-defmethod xcb:keysyms:event->keysym ((obj xcb:connection) event) + (declare (obsolete nil "27")) + (car (xcb:keysyms:event->keysyms obj event))) + +(cl-defmethod xcb:keysyms:event->keysyms ((obj xcb:connection) event) + "Translate Emacs key event EVENT to list of (keysym . mod-mask). + +Return ((0 . 0)) when conversion fails." + (let ((modifiers (event-modifiers event)) + (event (event-basic-type event)) + keysym) + (if (not (integerp event)) + (setq keysym + (pcase event + (`mouse-1 xcb:ButtonIndex:1) + (`mouse-2 xcb:ButtonIndex:2) + (`mouse-3 xcb:ButtonIndex:3) + (`mouse-4 xcb:ButtonIndex:4) + (`mouse-5 xcb:ButtonIndex:5) + (_ + (cond + ((setq keysym (cl-position event + xcb:keysyms:-function-keys)) + ;; Function keys. + (logior keysym #xff00)) + ((setq keysym (cl-position event xcb:keysyms:-xf86-keys)) + ;; XF86 keys. + (logior keysym #x1008ff00)) + ((setq keysym (cl-position event + xcb:keysyms:-iso-function-keys)) + ;; ISO function keys. + (logior keysym #xfe00)) + ((and (symbolp event) + (= 1 (length (symbol-name event)))) + ;; Symbol representations of ASCII characters. + (aref (symbol-name event) 0)) + (t + ;; Finally try system-specific keysyms. + (car (rassq event system-key-alist))))))) + (setq keysym + (cond + ((<= #x20 event #xff) + ;; Latin-1. + event) + ((<= #x100 event #x10ffff) + ;; Unicode. + (+ #x1000000 event)) + (t (or + ;; Try system-specific keysyms. + (car (rassq event system-key-alist)) + ;; Try legacy keysyms. + (catch 'break + (maphash (lambda (key val) + (when (= event val) + (throw 'break key))) + x-keysym-table))))))) + (if (not keysym) + '((0 . 0)) + (when modifiers + ;; Do transforms: * -> x-*-keysym -> xcb:keysyms:*-mask. + (setq modifiers (mapcar (lambda (i) + (or (pcase i + (`alt x-alt-keysym) + (`meta x-meta-keysym) + (`hyper x-hyper-keysym) + (`super x-super-keysym)) + i)) + modifiers) + modifiers (mapcar (lambda (i) + (pcase i + ((and x (pred integerp)) x) + (`meta + (when (= 0 xcb:keysyms:meta-mask) + (setq keysym 0)) + xcb:keysyms:meta-mask) + (`control + (when (= 0 xcb:keysyms:control-mask) + (setq keysym 0)) + xcb:keysyms:control-mask) + (`shift + (when (= 0 xcb:keysyms:shift-mask) + (setq keysym 0)) + xcb:keysyms:shift-mask) + (`hyper + (when (= 0 xcb:keysyms:hyper-mask) + (setq keysym 0)) + xcb:keysyms:hyper-mask) + (`super + (when (= 0 xcb:keysyms:super-mask) + (setq keysym 0)) + xcb:keysyms:super-mask) + (`alt + (when (= 0 xcb:keysyms:alt-mask) + (setq keysym 0)) + xcb:keysyms:alt-mask) + (_ + ;; Include but not limit to: down. + 0))) + modifiers) + modifiers (apply #'logior modifiers))) + (let ((keycode (xcb:keysyms:keysym->keycode obj keysym)) + extra-modifiers) + (when (/= 0 keycode) + (setq extra-modifiers (xcb:keysyms:keycode->keysym obj keycode nil) + ;; Always try without other modifier. + extra-modifiers (append '(0) extra-modifiers) + ;; Keep all modifiers helping convert keycode to this keysym. + extra-modifiers + (delq nil + (mapcar (lambda (modifier) + (when (= (car (xcb:keysyms:keycode->keysym + obj keycode modifier)) + keysym) + modifier)) + extra-modifiers)))) + (mapcar (lambda (extra-modifier) + (cons keysym (logior (or modifiers 0) extra-modifier))) + extra-modifiers))))) + +(cl-defmethod xcb:keysyms:keysym->event ((_obj xcb:connection) keysym + &optional mask allow-modifiers) + "Translate X Keysym KEYSYM into Emacs key event. + +One may use MASK to provide modifier keys. If ALLOW-MODIFIERS is non-nil, +this function will also return symbols for pure modifiers keys." + ;; Convert nil to 0. + (unless mask + (setq mask 0)) + (let ((event (cond ((<= #x20 keysym #xff) + keysym) + ((<= #xff00 keysym #xffff) + (aref xcb:keysyms:-function-keys (logand keysym #xff))) + ((<= #x1000100 keysym #x110ffff) + (- keysym #x1000000)) + ((<= 1 keysym 5) ;ButtonPress assuemd + (intern-soft (format "down-mouse-%d" keysym))) + ((<= #x1008ff00 keysym #x1008ffff) + (aref xcb:keysyms:-xf86-keys (logand keysym #xff))) + ((<= #xfe00 keysym #xfeff) + (aref xcb:keysyms:-iso-function-keys + (logand keysym #xff))) + (t (or + ;; Search system-specific keysyms. + (car (assq keysym system-key-alist)) + ;; Search `x-keysym-table' for legacy keysyms. + (gethash keysym x-keysym-table))))) + mod-alt mod-meta mod-hyper mod-super) + (when event + (if allow-modifiers + (when (/= 0 mask) + ;; Clear modifier bits for modifier keys. + (pcase event + ((or `lmeta* `rmeta*) + (setq mask (logand mask (lognot xcb:keysyms:meta-mask)))) + ((or `lcontrol* `rcontrol*) + (setq mask (logand mask (lognot xcb:keysyms:control-mask)))) + ((or `lshift* `rshift*) + (setq mask (logand mask (lognot xcb:keysyms:shift-mask)))) + ((or `lhyper* `rhyper*) + (setq mask (logand mask (lognot xcb:keysyms:hyper-mask)))) + ((or `lsuper* `rsuper*) + (setq mask (logand mask (lognot xcb:keysyms:super-mask)))) + ((or `lalt* `ralt*) + (setq mask (logand mask (lognot xcb:keysyms:alt-mask)))))) + (when (memq event + '(lshift* + rshift* + lcontrol* + rcontrol* + caps-lock* + shift-lock* + lmeta* + rmeta* + lalt* + ralt* + lsuper* + rsuper* + lhyper* + rhyper* + mode-switch* + kp-numlock)) + (setq event nil)))) + (when event + (if (= 0 mask) + event + ;; Set mod-* if possible. + (when x-alt-keysym + (pcase x-alt-keysym + (`meta (setq mod-meta 'alt)) + (`hyper (setq mod-hyper 'alt)) + (`super (setq mod-super 'alt)))) + (when x-meta-keysym + (pcase x-meta-keysym + (`alt (setq mod-alt 'meta)) + (`hyper (setq mod-hyper 'meta)) + (`super (setq mod-super 'meta)))) + (when x-hyper-keysym + (pcase x-hyper-keysym + (`alt (setq mod-alt 'hyper)) + (`meta (setq mod-meta 'hyper)) + (`super (setq mod-super 'hyper)))) + (when x-super-keysym + (pcase x-super-keysym + (`alt (setq mod-alt 'super)) + (`meta (setq mod-meta 'super)) + (`hyper (setq mod-hyper 'super)))) + ;; Convert modifiers. + (setq event (list event)) + (when (/= 0 (logand mask xcb:keysyms:meta-mask)) + (push (or mod-meta 'meta) event)) + (when (/= 0 (logand mask xcb:keysyms:control-mask)) + (push 'control event)) + (when (and (/= 0 (logand mask (logior xcb:keysyms:shift-mask + xcb:keysyms:shift-lock-mask))) + (or (not (<= #x20 keysym #xff)) ;Not a Latin-1 character + (<= ?A keysym ?Z))) ;An uppercase letter + (push 'shift event)) + (when (/= 0 (logand mask xcb:keysyms:hyper-mask)) + (push (or mod-hyper 'hyper) event)) + (when (/= 0 (logand mask xcb:keysyms:super-mask)) + (push (or mod-super 'super) event)) + (when (/= 0 (logand mask xcb:keysyms:alt-mask)) + (push (or mod-alt 'alt) event)) + (event-convert-list event))))) + + + +(provide 'xcb-keysyms) + +;;; xcb-keysyms.el ends here diff --git a/elpa/xelb-0.18/xcb-present.el b/elpa/xelb-0.18/xcb-present.el new file mode 100644 index 0000000..7d2fb49 --- /dev/null +++ b/elpa/xelb-0.18/xcb-present.el @@ -0,0 +1,238 @@ +;;; xcb-present.el --- X11 Present extension -*- lexical-binding: t -*- + +;; Copyright (C) 2015-2019 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This file was generated by 'el_client.el' from 'present.xml', +;; which you can retrieve from . + +;;; Code: + +(require 'xcb-types) + +(defconst xcb:present:-extension-xname "Present") +(defconst xcb:present:-extension-name "Present") +(defconst xcb:present:-major-version 1) +(defconst xcb:present:-minor-version 2) + +(require 'xcb-xproto) + +(require 'xcb-randr) + +(require 'xcb-xfixes) + +(require 'xcb-sync) + +(defconst xcb:present:Event:ConfigureNotify 0) +(defconst xcb:present:Event:CompleteNotify 1) +(defconst xcb:present:Event:IdleNotify 2) +(defconst xcb:present:Event:RedirectNotify 3) + +(defconst xcb:present:EventMask:NoEvent 0) +(defconst xcb:present:EventMask:ConfigureNotify 1) +(defconst xcb:present:EventMask:CompleteNotify 2) +(defconst xcb:present:EventMask:IdleNotify 4) +(defconst xcb:present:EventMask:RedirectNotify 8) + +(defconst xcb:present:Option:None 0) +(defconst xcb:present:Option:Async 1) +(defconst xcb:present:Option:Copy 2) +(defconst xcb:present:Option:UST 4) +(defconst xcb:present:Option:Suboptimal 8) + +(defconst xcb:present:Capability:None 0) +(defconst xcb:present:Capability:Async 1) +(defconst xcb:present:Capability:Fence 2) +(defconst xcb:present:Capability:UST 4) + +(defconst xcb:present:CompleteKind:Pixmap 0) +(defconst xcb:present:CompleteKind:NotifyMSC 1) + +(defconst xcb:present:CompleteMode:Copy 0) +(defconst xcb:present:CompleteMode:Flip 1) +(defconst xcb:present:CompleteMode:Skip 2) +(defconst xcb:present:CompleteMode:SuboptimalCopy 3) + +(defclass xcb:present:Notify + (xcb:-struct) + ((window :initarg :window :type xcb:WINDOW) + (serial :initarg :serial :type xcb:CARD32))) + +(defclass xcb:present:QueryVersion + (xcb:-request) + ((~opcode :initform 0 :type xcb:-u1) + (major-version :initarg :major-version :type xcb:CARD32) + (minor-version :initarg :minor-version :type xcb:CARD32))) +(defclass xcb:present:QueryVersion~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (major-version :initarg :major-version :type xcb:CARD32) + (minor-version :initarg :minor-version :type xcb:CARD32))) + +(defclass xcb:present:Pixmap + (xcb:-request) + ((~opcode :initform 1 :type xcb:-u1) + (pad~0 :initform 8 :type xcb:-pad-align) + (window :initarg :window :type xcb:WINDOW) + (pixmap :initarg :pixmap :type xcb:PIXMAP) + (serial :initarg :serial :type xcb:CARD32) + (valid :initarg :valid :type xcb:xfixes:REGION) + (update :initarg :update :type xcb:xfixes:REGION) + (x-off :initarg :x-off :type xcb:INT16) + (y-off :initarg :y-off :type xcb:INT16) + (target-crtc :initarg :target-crtc :type xcb:randr:CRTC) + (wait-fence :initarg :wait-fence :type xcb:sync:FENCE) + (idle-fence :initarg :idle-fence :type xcb:sync:FENCE) + (options :initarg :options :type xcb:CARD32) + (pad~1 :initform 4 :type xcb:-pad) + (target-msc :initarg :target-msc :type xcb:CARD64) + (divisor :initarg :divisor :type xcb:CARD64) + (remainder :initarg :remainder :type xcb:CARD64) + (notifies~ :initform + '(name notifies type xcb:present:Notify size nil) + :type xcb:-list) + (notifies :initarg :notifies :type xcb:-ignore))) + +(defclass xcb:present:NotifyMSC + (xcb:-request) + ((~opcode :initform 2 :type xcb:-u1) + (pad~0 :initform 8 :type xcb:-pad-align) + (window :initarg :window :type xcb:WINDOW) + (serial :initarg :serial :type xcb:CARD32) + (pad~1 :initform 4 :type xcb:-pad) + (target-msc :initarg :target-msc :type xcb:CARD64) + (divisor :initarg :divisor :type xcb:CARD64) + (remainder :initarg :remainder :type xcb:CARD64))) + +(xcb:deftypealias 'xcb:present:EVENT 'xcb:-u4) + +(defclass xcb:present:SelectInput + (xcb:-request) + ((~opcode :initform 3 :type xcb:-u1) + (eid :initarg :eid :type xcb:present:EVENT) + (window :initarg :window :type xcb:WINDOW) + (event-mask :initarg :event-mask :type xcb:CARD32))) + +(defclass xcb:present:QueryCapabilities + (xcb:-request) + ((~opcode :initform 4 :type xcb:-u1) + (target :initarg :target :type xcb:CARD32))) +(defclass xcb:present:QueryCapabilities~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (capabilities :initarg :capabilities :type xcb:CARD32))) + +(defclass xcb:present:Generic + (xcb:-event) + ((~code :initform 0) + (extension :initarg :extension :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :initarg :length :type xcb:CARD32) + (evtype :initarg :evtype :type xcb:CARD16) + (pad~0 :initform 2 :type xcb:-pad) + (event :initarg :event :type xcb:present:EVENT))) + +(defclass xcb:present:ConfigureNotify + (xcb:-generic-event) + ((~evtype :initform 0) + (pad~0 :initform 2 :type xcb:-pad) + (event :initarg :event :type xcb:present:EVENT) + (window :initarg :window :type xcb:WINDOW) + (x :initarg :x :type xcb:INT16) + (y :initarg :y :type xcb:INT16) + (width :initarg :width :type xcb:CARD16) + (height :initarg :height :type xcb:CARD16) + (off-x :initarg :off-x :type xcb:INT16) + (off-y :initarg :off-y :type xcb:INT16) + (pixmap-width :initarg :pixmap-width :type xcb:CARD16) + (pixmap-height :initarg :pixmap-height :type xcb:CARD16) + (pixmap-flags :initarg :pixmap-flags :type xcb:CARD32))) + +(defclass xcb:present:CompleteNotify + (xcb:-generic-event) + ((~evtype :initform 1) + (pad~0 :initform 8 :type xcb:-pad-align) + (kind :initarg :kind :type xcb:CARD8) + (mode :initarg :mode :type xcb:CARD8) + (event :initarg :event :type xcb:present:EVENT) + (window :initarg :window :type xcb:WINDOW) + (serial :initarg :serial :type xcb:CARD32) + (ust :initarg :ust :type xcb:CARD64) + (msc :initarg :msc :type xcb:CARD64))) + +(defclass xcb:present:IdleNotify + (xcb:-generic-event) + ((~evtype :initform 2) + (pad~0 :initform 2 :type xcb:-pad) + (event :initarg :event :type xcb:present:EVENT) + (window :initarg :window :type xcb:WINDOW) + (serial :initarg :serial :type xcb:CARD32) + (pixmap :initarg :pixmap :type xcb:PIXMAP) + (idle-fence :initarg :idle-fence :type xcb:sync:FENCE))) + +(defclass xcb:present:RedirectNotify + (xcb:-generic-event) + ((~evtype :initform 3) + (pad~0 :initform 8 :type xcb:-pad-align) + (update-window :initarg :update-window :type xcb:BOOL) + (pad~1 :initform 1 :type xcb:-pad) + (event :initarg :event :type xcb:present:EVENT) + (event-window :initarg :event-window :type xcb:WINDOW) + (window :initarg :window :type xcb:WINDOW) + (pixmap :initarg :pixmap :type xcb:PIXMAP) + (serial :initarg :serial :type xcb:CARD32) + (valid-region :initarg :valid-region :type xcb:xfixes:REGION) + (update-region :initarg :update-region :type xcb:xfixes:REGION) + (valid-rect :initarg :valid-rect :type xcb:RECTANGLE) + (update-rect :initarg :update-rect :type xcb:RECTANGLE) + (x-off :initarg :x-off :type xcb:INT16) + (y-off :initarg :y-off :type xcb:INT16) + (target-crtc :initarg :target-crtc :type xcb:randr:CRTC) + (wait-fence :initarg :wait-fence :type xcb:sync:FENCE) + (idle-fence :initarg :idle-fence :type xcb:sync:FENCE) + (options :initarg :options :type xcb:CARD32) + (pad~2 :initform 4 :type xcb:-pad) + (target-msc :initarg :target-msc :type xcb:CARD64) + (divisor :initarg :divisor :type xcb:CARD64) + (remainder :initarg :remainder :type xcb:CARD64) + (notifies~ :initform + '(name notifies type xcb:present:Notify size nil) + :type xcb:-list) + (notifies :initarg :notifies :type xcb:-ignore))) + +(defconst xcb:present:event-number-class-alist + '((0 . xcb:present:Generic)) + "(event-number . event-class) alist.") + +(defconst xcb:present:xge-number-class-alist + '((0 . xcb:present:ConfigureNotify) + (1 . xcb:present:CompleteNotify) + (2 . xcb:present:IdleNotify) + (3 . xcb:present:RedirectNotify)) + "(xge-number . event-class) alist.") + + + +(provide 'xcb-present) + +;;; xcb-present.el ends here diff --git a/elpa/xelb-0.18/xcb-randr.el b/elpa/xelb-0.18/xcb-randr.el new file mode 100644 index 0000000..8a00cfe --- /dev/null +++ b/elpa/xelb-0.18/xcb-randr.el @@ -0,0 +1,1121 @@ +;;; xcb-randr.el --- X11 RandR extension -*- lexical-binding: t -*- + +;; Copyright (C) 2015-2019 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This file was generated by 'el_client.el' from 'randr.xml', +;; which you can retrieve from . + +;;; Code: + +(require 'xcb-types) + +(defconst xcb:randr:-extension-xname "RANDR") +(defconst xcb:randr:-extension-name "RandR") +(defconst xcb:randr:-major-version 1) +(defconst xcb:randr:-minor-version 6) + +(require 'xcb-xproto) + +(require 'xcb-render) + +(xcb:deftypealias 'xcb:randr:MODE 'xcb:-u4) + +(xcb:deftypealias 'xcb:randr:CRTC 'xcb:-u4) + +(xcb:deftypealias 'xcb:randr:OUTPUT 'xcb:-u4) + +(xcb:deftypealias 'xcb:randr:PROVIDER 'xcb:-u4) + +(xcb:deftypealias 'xcb:randr:LEASE 'xcb:-u4) + +(defclass xcb:randr:BadOutput + (xcb:-error) + ((~code :initform 0))) + +(defclass xcb:randr:BadCrtc + (xcb:-error) + ((~code :initform 1))) + +(defclass xcb:randr:BadMode + (xcb:-error) + ((~code :initform 2))) + +(defclass xcb:randr:BadProvider + (xcb:-error) + ((~code :initform 3))) + +(defconst xcb:randr:Rotation:Rotate_0 1) +(defconst xcb:randr:Rotation:Rotate_90 2) +(defconst xcb:randr:Rotation:Rotate_180 4) +(defconst xcb:randr:Rotation:Rotate_270 8) +(defconst xcb:randr:Rotation:Reflect_X 16) +(defconst xcb:randr:Rotation:Reflect_Y 32) + +(defclass xcb:randr:ScreenSize + (xcb:-struct) + ((width :initarg :width :type xcb:CARD16) + (height :initarg :height :type xcb:CARD16) + (mwidth :initarg :mwidth :type xcb:CARD16) + (mheight :initarg :mheight :type xcb:CARD16))) + +(defclass xcb:randr:RefreshRates + (xcb:-struct) + ((nRates :initarg :nRates :type xcb:CARD16) + (rates~ :initform + '(name rates type xcb:CARD16 size + (xcb:-fieldref 'nRates)) + :type xcb:-list) + (rates :initarg :rates :type xcb:-ignore))) + +(defclass xcb:randr:QueryVersion + (xcb:-request) + ((~opcode :initform 0 :type xcb:-u1) + (major-version :initarg :major-version :type xcb:CARD32) + (minor-version :initarg :minor-version :type xcb:CARD32))) +(defclass xcb:randr:QueryVersion~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (major-version :initarg :major-version :type xcb:CARD32) + (minor-version :initarg :minor-version :type xcb:CARD32) + (pad~1 :initform 16 :type xcb:-pad))) + +(defconst xcb:randr:SetConfig:Success 0) +(defconst xcb:randr:SetConfig:InvalidConfigTime 1) +(defconst xcb:randr:SetConfig:InvalidTime 2) +(defconst xcb:randr:SetConfig:Failed 3) + +(defclass xcb:randr:SetScreenConfig + (xcb:-request) + ((~opcode :initform 2 :type xcb:-u1) + (window :initarg :window :type xcb:WINDOW) + (timestamp :initarg :timestamp :type xcb:TIMESTAMP) + (config-timestamp :initarg :config-timestamp :type xcb:TIMESTAMP) + (sizeID :initarg :sizeID :type xcb:CARD16) + (rotation :initarg :rotation :type xcb:CARD16) + (rate :initarg :rate :type xcb:CARD16) + (pad~0 :initform 2 :type xcb:-pad))) +(defclass xcb:randr:SetScreenConfig~reply + (xcb:-reply) + ((status :initarg :status :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (new-timestamp :initarg :new-timestamp :type xcb:TIMESTAMP) + (config-timestamp :initarg :config-timestamp :type xcb:TIMESTAMP) + (root :initarg :root :type xcb:WINDOW) + (subpixel-order :initarg :subpixel-order :type xcb:CARD16) + (pad~0 :initform 10 :type xcb:-pad))) + +(defconst xcb:randr:NotifyMask:ScreenChange 1) +(defconst xcb:randr:NotifyMask:CrtcChange 2) +(defconst xcb:randr:NotifyMask:OutputChange 4) +(defconst xcb:randr:NotifyMask:OutputProperty 8) +(defconst xcb:randr:NotifyMask:ProviderChange 16) +(defconst xcb:randr:NotifyMask:ProviderProperty 32) +(defconst xcb:randr:NotifyMask:ResourceChange 64) +(defconst xcb:randr:NotifyMask:Lease 128) + +(defclass xcb:randr:SelectInput + (xcb:-request) + ((~opcode :initform 4 :type xcb:-u1) + (window :initarg :window :type xcb:WINDOW) + (enable :initarg :enable :type xcb:CARD16) + (pad~0 :initform 2 :type xcb:-pad))) + +(defclass xcb:randr:GetScreenInfo + (xcb:-request) + ((~opcode :initform 5 :type xcb:-u1) + (window :initarg :window :type xcb:WINDOW))) +(defclass xcb:randr:GetScreenInfo~reply + (xcb:-reply) + ((rotations :initarg :rotations :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (root :initarg :root :type xcb:WINDOW) + (timestamp :initarg :timestamp :type xcb:TIMESTAMP) + (config-timestamp :initarg :config-timestamp :type xcb:TIMESTAMP) + (nSizes :initarg :nSizes :type xcb:CARD16) + (sizeID :initarg :sizeID :type xcb:CARD16) + (rotation :initarg :rotation :type xcb:CARD16) + (rate :initarg :rate :type xcb:CARD16) + (nInfo :initarg :nInfo :type xcb:CARD16) + (pad~0 :initform 2 :type xcb:-pad) + (sizes~ :initform + '(name sizes type xcb:randr:ScreenSize size + (xcb:-fieldref 'nSizes)) + :type xcb:-list) + (sizes :initarg :sizes :type xcb:-ignore) + (rates~ :initform + '(name rates type xcb:randr:RefreshRates size + (- + (xcb:-fieldref 'nInfo) + (xcb:-fieldref 'nSizes))) + :type xcb:-list) + (rates :initarg :rates :type xcb:-ignore))) + +(defclass xcb:randr:GetScreenSizeRange + (xcb:-request) + ((~opcode :initform 6 :type xcb:-u1) + (window :initarg :window :type xcb:WINDOW))) +(defclass xcb:randr:GetScreenSizeRange~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (min-width :initarg :min-width :type xcb:CARD16) + (min-height :initarg :min-height :type xcb:CARD16) + (max-width :initarg :max-width :type xcb:CARD16) + (max-height :initarg :max-height :type xcb:CARD16) + (pad~1 :initform 16 :type xcb:-pad))) + +(defclass xcb:randr:SetScreenSize + (xcb:-request) + ((~opcode :initform 7 :type xcb:-u1) + (window :initarg :window :type xcb:WINDOW) + (width :initarg :width :type xcb:CARD16) + (height :initarg :height :type xcb:CARD16) + (mm-width :initarg :mm-width :type xcb:CARD32) + (mm-height :initarg :mm-height :type xcb:CARD32))) + +(defconst xcb:randr:ModeFlag:HsyncPositive 1) +(defconst xcb:randr:ModeFlag:HsyncNegative 2) +(defconst xcb:randr:ModeFlag:VsyncPositive 4) +(defconst xcb:randr:ModeFlag:VsyncNegative 8) +(defconst xcb:randr:ModeFlag:Interlace 16) +(defconst xcb:randr:ModeFlag:DoubleScan 32) +(defconst xcb:randr:ModeFlag:Csync 64) +(defconst xcb:randr:ModeFlag:CsyncPositive 128) +(defconst xcb:randr:ModeFlag:CsyncNegative 256) +(defconst xcb:randr:ModeFlag:HskewPresent 512) +(defconst xcb:randr:ModeFlag:Bcast 1024) +(defconst xcb:randr:ModeFlag:PixelMultiplex 2048) +(defconst xcb:randr:ModeFlag:DoubleClock 4096) +(defconst xcb:randr:ModeFlag:HalveClock 8192) + +(defclass xcb:randr:ModeInfo + (xcb:-struct) + ((id :initarg :id :type xcb:CARD32) + (width :initarg :width :type xcb:CARD16) + (height :initarg :height :type xcb:CARD16) + (dot-clock :initarg :dot-clock :type xcb:CARD32) + (hsync-start :initarg :hsync-start :type xcb:CARD16) + (hsync-end :initarg :hsync-end :type xcb:CARD16) + (htotal :initarg :htotal :type xcb:CARD16) + (hskew :initarg :hskew :type xcb:CARD16) + (vsync-start :initarg :vsync-start :type xcb:CARD16) + (vsync-end :initarg :vsync-end :type xcb:CARD16) + (vtotal :initarg :vtotal :type xcb:CARD16) + (name-len :initarg :name-len :type xcb:CARD16) + (mode-flags :initarg :mode-flags :type xcb:CARD32))) + +(defclass xcb:randr:GetScreenResources + (xcb:-request) + ((~opcode :initform 8 :type xcb:-u1) + (window :initarg :window :type xcb:WINDOW))) +(defclass xcb:randr:GetScreenResources~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (timestamp :initarg :timestamp :type xcb:TIMESTAMP) + (config-timestamp :initarg :config-timestamp :type xcb:TIMESTAMP) + (num-crtcs :initarg :num-crtcs :type xcb:CARD16) + (num-outputs :initarg :num-outputs :type xcb:CARD16) + (num-modes :initarg :num-modes :type xcb:CARD16) + (names-len :initarg :names-len :type xcb:CARD16) + (pad~1 :initform 8 :type xcb:-pad) + (crtcs~ :initform + '(name crtcs type xcb:randr:CRTC size + (xcb:-fieldref 'num-crtcs)) + :type xcb:-list) + (crtcs :initarg :crtcs :type xcb:-ignore) + (outputs~ :initform + '(name outputs type xcb:randr:OUTPUT size + (xcb:-fieldref 'num-outputs)) + :type xcb:-list) + (outputs :initarg :outputs :type xcb:-ignore) + (modes~ :initform + '(name modes type xcb:randr:ModeInfo size + (xcb:-fieldref 'num-modes)) + :type xcb:-list) + (modes :initarg :modes :type xcb:-ignore) + (names~ :initform + '(name names type xcb:BYTE size + (xcb:-fieldref 'names-len)) + :type xcb:-list) + (names :initarg :names :type xcb:-ignore))) + +(defconst xcb:randr:Connection:Connected 0) +(defconst xcb:randr:Connection:Disconnected 1) +(defconst xcb:randr:Connection:Unknown 2) + +(defclass xcb:randr:GetOutputInfo + (xcb:-request) + ((~opcode :initform 9 :type xcb:-u1) + (output :initarg :output :type xcb:randr:OUTPUT) + (config-timestamp :initarg :config-timestamp :type xcb:TIMESTAMP))) +(defclass xcb:randr:GetOutputInfo~reply + (xcb:-reply) + ((status :initarg :status :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (timestamp :initarg :timestamp :type xcb:TIMESTAMP) + (crtc :initarg :crtc :type xcb:randr:CRTC) + (mm-width :initarg :mm-width :type xcb:CARD32) + (mm-height :initarg :mm-height :type xcb:CARD32) + (connection :initarg :connection :type xcb:CARD8) + (subpixel-order :initarg :subpixel-order :type xcb:CARD8) + (num-crtcs :initarg :num-crtcs :type xcb:CARD16) + (num-modes :initarg :num-modes :type xcb:CARD16) + (num-preferred :initarg :num-preferred :type xcb:CARD16) + (num-clones :initarg :num-clones :type xcb:CARD16) + (name-len :initarg :name-len :type xcb:CARD16) + (crtcs~ :initform + '(name crtcs type xcb:randr:CRTC size + (xcb:-fieldref 'num-crtcs)) + :type xcb:-list) + (crtcs :initarg :crtcs :type xcb:-ignore) + (modes~ :initform + '(name modes type xcb:randr:MODE size + (xcb:-fieldref 'num-modes)) + :type xcb:-list) + (modes :initarg :modes :type xcb:-ignore) + (clones~ :initform + '(name clones type xcb:randr:OUTPUT size + (xcb:-fieldref 'num-clones)) + :type xcb:-list) + (clones :initarg :clones :type xcb:-ignore) + (name~ :initform + '(name name type xcb:BYTE size + (xcb:-fieldref 'name-len)) + :type xcb:-list) + (name :initarg :name :type xcb:-ignore))) + +(defclass xcb:randr:ListOutputProperties + (xcb:-request) + ((~opcode :initform 10 :type xcb:-u1) + (output :initarg :output :type xcb:randr:OUTPUT))) +(defclass xcb:randr:ListOutputProperties~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (num-atoms :initarg :num-atoms :type xcb:CARD16) + (pad~1 :initform 22 :type xcb:-pad) + (atoms~ :initform + '(name atoms type xcb:ATOM size + (xcb:-fieldref 'num-atoms)) + :type xcb:-list) + (atoms :initarg :atoms :type xcb:-ignore))) + +(defclass xcb:randr:QueryOutputProperty + (xcb:-request) + ((~opcode :initform 11 :type xcb:-u1) + (output :initarg :output :type xcb:randr:OUTPUT) + (property :initarg :property :type xcb:ATOM))) +(defclass xcb:randr:QueryOutputProperty~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pending :initarg :pending :type xcb:BOOL) + (range :initarg :range :type xcb:BOOL) + (immutable :initarg :immutable :type xcb:BOOL) + (pad~1 :initform 21 :type xcb:-pad) + (validValues~ :initform + '(name validValues type xcb:INT32 size + (xcb:-fieldref 'length)) + :type xcb:-list) + (validValues :initarg :validValues :type xcb:-ignore))) + +(defclass xcb:randr:ConfigureOutputProperty + (xcb:-request) + ((~opcode :initform 12 :type xcb:-u1) + (output :initarg :output :type xcb:randr:OUTPUT) + (property :initarg :property :type xcb:ATOM) + (pending :initarg :pending :type xcb:BOOL) + (range :initarg :range :type xcb:BOOL) + (pad~0 :initform 2 :type xcb:-pad) + (values~ :initform + '(name values type xcb:INT32 size nil) + :type xcb:-list) + (values :initarg :values :type xcb:-ignore))) + +(defclass xcb:randr:ChangeOutputProperty + (xcb:-request) + ((~opcode :initform 13 :type xcb:-u1) + (output :initarg :output :type xcb:randr:OUTPUT) + (property :initarg :property :type xcb:ATOM) + (type :initarg :type :type xcb:ATOM) + (format :initarg :format :type xcb:CARD8) + (mode :initarg :mode :type xcb:CARD8) + (pad~0 :initform 2 :type xcb:-pad) + (num-units :initarg :num-units :type xcb:CARD32) + (data~ :initform + '(name data type xcb:void size + (/ + (* + (xcb:-fieldref 'num-units) + (xcb:-fieldref 'format)) + 8)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:randr:DeleteOutputProperty + (xcb:-request) + ((~opcode :initform 14 :type xcb:-u1) + (output :initarg :output :type xcb:randr:OUTPUT) + (property :initarg :property :type xcb:ATOM))) + +(defclass xcb:randr:GetOutputProperty + (xcb:-request) + ((~opcode :initform 15 :type xcb:-u1) + (output :initarg :output :type xcb:randr:OUTPUT) + (property :initarg :property :type xcb:ATOM) + (type :initarg :type :type xcb:ATOM) + (long-offset :initarg :long-offset :type xcb:CARD32) + (long-length :initarg :long-length :type xcb:CARD32) + (delete :initarg :delete :type xcb:BOOL) + (pending :initarg :pending :type xcb:BOOL) + (pad~0 :initform 2 :type xcb:-pad))) +(defclass xcb:randr:GetOutputProperty~reply + (xcb:-reply) + ((format :initarg :format :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (type :initarg :type :type xcb:ATOM) + (bytes-after :initarg :bytes-after :type xcb:CARD32) + (num-items :initarg :num-items :type xcb:CARD32) + (pad~0 :initform 12 :type xcb:-pad) + (data~ :initform + '(name data type xcb:BYTE size + (* + (xcb:-fieldref 'num-items) + (/ + (xcb:-fieldref 'format) + 8))) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:randr:CreateMode + (xcb:-request) + ((~opcode :initform 16 :type xcb:-u1) + (window :initarg :window :type xcb:WINDOW) + (mode-info :initarg :mode-info :type xcb:randr:ModeInfo) + (name~ :initform + '(name name type xcb:char size nil) + :type xcb:-list) + (name :initarg :name :type xcb:-ignore))) +(defclass xcb:randr:CreateMode~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (mode :initarg :mode :type xcb:randr:MODE) + (pad~1 :initform 20 :type xcb:-pad))) + +(defclass xcb:randr:DestroyMode + (xcb:-request) + ((~opcode :initform 17 :type xcb:-u1) + (mode :initarg :mode :type xcb:randr:MODE))) + +(defclass xcb:randr:AddOutputMode + (xcb:-request) + ((~opcode :initform 18 :type xcb:-u1) + (output :initarg :output :type xcb:randr:OUTPUT) + (mode :initarg :mode :type xcb:randr:MODE))) + +(defclass xcb:randr:DeleteOutputMode + (xcb:-request) + ((~opcode :initform 19 :type xcb:-u1) + (output :initarg :output :type xcb:randr:OUTPUT) + (mode :initarg :mode :type xcb:randr:MODE))) + +(defclass xcb:randr:GetCrtcInfo + (xcb:-request) + ((~opcode :initform 20 :type xcb:-u1) + (crtc :initarg :crtc :type xcb:randr:CRTC) + (config-timestamp :initarg :config-timestamp :type xcb:TIMESTAMP))) +(defclass xcb:randr:GetCrtcInfo~reply + (xcb:-reply) + ((status :initarg :status :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (timestamp :initarg :timestamp :type xcb:TIMESTAMP) + (x :initarg :x :type xcb:INT16) + (y :initarg :y :type xcb:INT16) + (width :initarg :width :type xcb:CARD16) + (height :initarg :height :type xcb:CARD16) + (mode :initarg :mode :type xcb:randr:MODE) + (rotation :initarg :rotation :type xcb:CARD16) + (rotations :initarg :rotations :type xcb:CARD16) + (num-outputs :initarg :num-outputs :type xcb:CARD16) + (num-possible-outputs :initarg :num-possible-outputs :type xcb:CARD16) + (outputs~ :initform + '(name outputs type xcb:randr:OUTPUT size + (xcb:-fieldref 'num-outputs)) + :type xcb:-list) + (outputs :initarg :outputs :type xcb:-ignore) + (possible~ :initform + '(name possible type xcb:randr:OUTPUT size + (xcb:-fieldref 'num-possible-outputs)) + :type xcb:-list) + (possible :initarg :possible :type xcb:-ignore))) + +(defclass xcb:randr:SetCrtcConfig + (xcb:-request) + ((~opcode :initform 21 :type xcb:-u1) + (crtc :initarg :crtc :type xcb:randr:CRTC) + (timestamp :initarg :timestamp :type xcb:TIMESTAMP) + (config-timestamp :initarg :config-timestamp :type xcb:TIMESTAMP) + (x :initarg :x :type xcb:INT16) + (y :initarg :y :type xcb:INT16) + (mode :initarg :mode :type xcb:randr:MODE) + (rotation :initarg :rotation :type xcb:CARD16) + (pad~0 :initform 2 :type xcb:-pad) + (outputs~ :initform + '(name outputs type xcb:randr:OUTPUT size nil) + :type xcb:-list) + (outputs :initarg :outputs :type xcb:-ignore))) +(defclass xcb:randr:SetCrtcConfig~reply + (xcb:-reply) + ((status :initarg :status :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (timestamp :initarg :timestamp :type xcb:TIMESTAMP) + (pad~0 :initform 20 :type xcb:-pad))) + +(defclass xcb:randr:GetCrtcGammaSize + (xcb:-request) + ((~opcode :initform 22 :type xcb:-u1) + (crtc :initarg :crtc :type xcb:randr:CRTC))) +(defclass xcb:randr:GetCrtcGammaSize~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (size :initarg :size :type xcb:CARD16) + (pad~1 :initform 22 :type xcb:-pad))) + +(defclass xcb:randr:GetCrtcGamma + (xcb:-request) + ((~opcode :initform 23 :type xcb:-u1) + (crtc :initarg :crtc :type xcb:randr:CRTC))) +(defclass xcb:randr:GetCrtcGamma~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (size :initarg :size :type xcb:CARD16) + (pad~1 :initform 22 :type xcb:-pad) + (red~ :initform + '(name red type xcb:CARD16 size + (xcb:-fieldref 'size)) + :type xcb:-list) + (red :initarg :red :type xcb:-ignore) + (green~ :initform + '(name green type xcb:CARD16 size + (xcb:-fieldref 'size)) + :type xcb:-list) + (green :initarg :green :type xcb:-ignore) + (blue~ :initform + '(name blue type xcb:CARD16 size + (xcb:-fieldref 'size)) + :type xcb:-list) + (blue :initarg :blue :type xcb:-ignore))) + +(defclass xcb:randr:SetCrtcGamma + (xcb:-request) + ((~opcode :initform 24 :type xcb:-u1) + (crtc :initarg :crtc :type xcb:randr:CRTC) + (size :initarg :size :type xcb:CARD16) + (pad~0 :initform 2 :type xcb:-pad) + (red~ :initform + '(name red type xcb:CARD16 size + (xcb:-fieldref 'size)) + :type xcb:-list) + (red :initarg :red :type xcb:-ignore) + (green~ :initform + '(name green type xcb:CARD16 size + (xcb:-fieldref 'size)) + :type xcb:-list) + (green :initarg :green :type xcb:-ignore) + (blue~ :initform + '(name blue type xcb:CARD16 size + (xcb:-fieldref 'size)) + :type xcb:-list) + (blue :initarg :blue :type xcb:-ignore))) + +(defclass xcb:randr:GetScreenResourcesCurrent + (xcb:-request) + ((~opcode :initform 25 :type xcb:-u1) + (window :initarg :window :type xcb:WINDOW))) +(defclass xcb:randr:GetScreenResourcesCurrent~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (timestamp :initarg :timestamp :type xcb:TIMESTAMP) + (config-timestamp :initarg :config-timestamp :type xcb:TIMESTAMP) + (num-crtcs :initarg :num-crtcs :type xcb:CARD16) + (num-outputs :initarg :num-outputs :type xcb:CARD16) + (num-modes :initarg :num-modes :type xcb:CARD16) + (names-len :initarg :names-len :type xcb:CARD16) + (pad~1 :initform 8 :type xcb:-pad) + (crtcs~ :initform + '(name crtcs type xcb:randr:CRTC size + (xcb:-fieldref 'num-crtcs)) + :type xcb:-list) + (crtcs :initarg :crtcs :type xcb:-ignore) + (outputs~ :initform + '(name outputs type xcb:randr:OUTPUT size + (xcb:-fieldref 'num-outputs)) + :type xcb:-list) + (outputs :initarg :outputs :type xcb:-ignore) + (modes~ :initform + '(name modes type xcb:randr:ModeInfo size + (xcb:-fieldref 'num-modes)) + :type xcb:-list) + (modes :initarg :modes :type xcb:-ignore) + (names~ :initform + '(name names type xcb:BYTE size + (xcb:-fieldref 'names-len)) + :type xcb:-list) + (names :initarg :names :type xcb:-ignore))) + +(defconst xcb:randr:Transform:Unit 1) +(defconst xcb:randr:Transform:ScaleUp 2) +(defconst xcb:randr:Transform:ScaleDown 4) +(defconst xcb:randr:Transform:Projective 8) + +(defclass xcb:randr:SetCrtcTransform + (xcb:-request) + ((~opcode :initform 26 :type xcb:-u1) + (crtc :initarg :crtc :type xcb:randr:CRTC) + (transform :initarg :transform :type xcb:render:TRANSFORM) + (filter-len :initarg :filter-len :type xcb:CARD16) + (pad~0 :initform 2 :type xcb:-pad) + (filter-name~ :initform + '(name filter-name type xcb:char size + (xcb:-fieldref 'filter-len)) + :type xcb:-list) + (filter-name :initarg :filter-name :type xcb:-ignore) + (pad~1 :initform 4 :type xcb:-pad-align) + (filter-params~ :initform + '(name filter-params type xcb:render:FIXED size nil) + :type xcb:-list) + (filter-params :initarg :filter-params :type xcb:-ignore))) + +(defclass xcb:randr:GetCrtcTransform + (xcb:-request) + ((~opcode :initform 27 :type xcb:-u1) + (crtc :initarg :crtc :type xcb:randr:CRTC))) +(defclass xcb:randr:GetCrtcTransform~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pending-transform :initarg :pending-transform :type xcb:render:TRANSFORM) + (has-transforms :initarg :has-transforms :type xcb:BOOL) + (pad~1 :initform 3 :type xcb:-pad) + (current-transform :initarg :current-transform :type xcb:render:TRANSFORM) + (pad~2 :initform 4 :type xcb:-pad) + (pending-len :initarg :pending-len :type xcb:CARD16) + (pending-nparams :initarg :pending-nparams :type xcb:CARD16) + (current-len :initarg :current-len :type xcb:CARD16) + (current-nparams :initarg :current-nparams :type xcb:CARD16) + (pending-filter-name~ :initform + '(name pending-filter-name type xcb:char size + (xcb:-fieldref 'pending-len)) + :type xcb:-list) + (pending-filter-name :initarg :pending-filter-name :type xcb:-ignore) + (pad~3 :initform 4 :type xcb:-pad-align) + (pending-params~ :initform + '(name pending-params type xcb:render:FIXED size + (xcb:-fieldref 'pending-nparams)) + :type xcb:-list) + (pending-params :initarg :pending-params :type xcb:-ignore) + (current-filter-name~ :initform + '(name current-filter-name type xcb:char size + (xcb:-fieldref 'current-len)) + :type xcb:-list) + (current-filter-name :initarg :current-filter-name :type xcb:-ignore) + (pad~4 :initform 4 :type xcb:-pad-align) + (current-params~ :initform + '(name current-params type xcb:render:FIXED size + (xcb:-fieldref 'current-nparams)) + :type xcb:-list) + (current-params :initarg :current-params :type xcb:-ignore))) + +(defclass xcb:randr:GetPanning + (xcb:-request) + ((~opcode :initform 28 :type xcb:-u1) + (crtc :initarg :crtc :type xcb:randr:CRTC))) +(defclass xcb:randr:GetPanning~reply + (xcb:-reply) + ((status :initarg :status :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (timestamp :initarg :timestamp :type xcb:TIMESTAMP) + (left :initarg :left :type xcb:CARD16) + (top :initarg :top :type xcb:CARD16) + (width :initarg :width :type xcb:CARD16) + (height :initarg :height :type xcb:CARD16) + (track-left :initarg :track-left :type xcb:CARD16) + (track-top :initarg :track-top :type xcb:CARD16) + (track-width :initarg :track-width :type xcb:CARD16) + (track-height :initarg :track-height :type xcb:CARD16) + (border-left :initarg :border-left :type xcb:INT16) + (border-top :initarg :border-top :type xcb:INT16) + (border-right :initarg :border-right :type xcb:INT16) + (border-bottom :initarg :border-bottom :type xcb:INT16))) + +(defclass xcb:randr:SetPanning + (xcb:-request) + ((~opcode :initform 29 :type xcb:-u1) + (crtc :initarg :crtc :type xcb:randr:CRTC) + (timestamp :initarg :timestamp :type xcb:TIMESTAMP) + (left :initarg :left :type xcb:CARD16) + (top :initarg :top :type xcb:CARD16) + (width :initarg :width :type xcb:CARD16) + (height :initarg :height :type xcb:CARD16) + (track-left :initarg :track-left :type xcb:CARD16) + (track-top :initarg :track-top :type xcb:CARD16) + (track-width :initarg :track-width :type xcb:CARD16) + (track-height :initarg :track-height :type xcb:CARD16) + (border-left :initarg :border-left :type xcb:INT16) + (border-top :initarg :border-top :type xcb:INT16) + (border-right :initarg :border-right :type xcb:INT16) + (border-bottom :initarg :border-bottom :type xcb:INT16))) +(defclass xcb:randr:SetPanning~reply + (xcb:-reply) + ((status :initarg :status :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (timestamp :initarg :timestamp :type xcb:TIMESTAMP))) + +(defclass xcb:randr:SetOutputPrimary + (xcb:-request) + ((~opcode :initform 30 :type xcb:-u1) + (window :initarg :window :type xcb:WINDOW) + (output :initarg :output :type xcb:randr:OUTPUT))) + +(defclass xcb:randr:GetOutputPrimary + (xcb:-request) + ((~opcode :initform 31 :type xcb:-u1) + (window :initarg :window :type xcb:WINDOW))) +(defclass xcb:randr:GetOutputPrimary~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (output :initarg :output :type xcb:randr:OUTPUT))) + +(defclass xcb:randr:GetProviders + (xcb:-request) + ((~opcode :initform 32 :type xcb:-u1) + (window :initarg :window :type xcb:WINDOW))) +(defclass xcb:randr:GetProviders~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (timestamp :initarg :timestamp :type xcb:TIMESTAMP) + (num-providers :initarg :num-providers :type xcb:CARD16) + (pad~1 :initform 18 :type xcb:-pad) + (providers~ :initform + '(name providers type xcb:randr:PROVIDER size + (xcb:-fieldref 'num-providers)) + :type xcb:-list) + (providers :initarg :providers :type xcb:-ignore))) + +(defconst xcb:randr:ProviderCapability:SourceOutput 1) +(defconst xcb:randr:ProviderCapability:SinkOutput 2) +(defconst xcb:randr:ProviderCapability:SourceOffload 4) +(defconst xcb:randr:ProviderCapability:SinkOffload 8) + +(defclass xcb:randr:GetProviderInfo + (xcb:-request) + ((~opcode :initform 33 :type xcb:-u1) + (provider :initarg :provider :type xcb:randr:PROVIDER) + (config-timestamp :initarg :config-timestamp :type xcb:TIMESTAMP))) +(defclass xcb:randr:GetProviderInfo~reply + (xcb:-reply) + ((status :initarg :status :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (timestamp :initarg :timestamp :type xcb:TIMESTAMP) + (capabilities :initarg :capabilities :type xcb:CARD32) + (num-crtcs :initarg :num-crtcs :type xcb:CARD16) + (num-outputs :initarg :num-outputs :type xcb:CARD16) + (num-associated-providers :initarg :num-associated-providers :type xcb:CARD16) + (name-len :initarg :name-len :type xcb:CARD16) + (pad~0 :initform 8 :type xcb:-pad) + (crtcs~ :initform + '(name crtcs type xcb:randr:CRTC size + (xcb:-fieldref 'num-crtcs)) + :type xcb:-list) + (crtcs :initarg :crtcs :type xcb:-ignore) + (outputs~ :initform + '(name outputs type xcb:randr:OUTPUT size + (xcb:-fieldref 'num-outputs)) + :type xcb:-list) + (outputs :initarg :outputs :type xcb:-ignore) + (associated-providers~ :initform + '(name associated-providers type xcb:randr:PROVIDER size + (xcb:-fieldref 'num-associated-providers)) + :type xcb:-list) + (associated-providers :initarg :associated-providers :type xcb:-ignore) + (associated-capability~ :initform + '(name associated-capability type xcb:CARD32 size + (xcb:-fieldref 'num-associated-providers)) + :type xcb:-list) + (associated-capability :initarg :associated-capability :type xcb:-ignore) + (name~ :initform + '(name name type xcb:char size + (xcb:-fieldref 'name-len)) + :type xcb:-list) + (name :initarg :name :type xcb:-ignore))) + +(defclass xcb:randr:SetProviderOffloadSink + (xcb:-request) + ((~opcode :initform 34 :type xcb:-u1) + (provider :initarg :provider :type xcb:randr:PROVIDER) + (sink-provider :initarg :sink-provider :type xcb:randr:PROVIDER) + (config-timestamp :initarg :config-timestamp :type xcb:TIMESTAMP))) + +(defclass xcb:randr:SetProviderOutputSource + (xcb:-request) + ((~opcode :initform 35 :type xcb:-u1) + (provider :initarg :provider :type xcb:randr:PROVIDER) + (source-provider :initarg :source-provider :type xcb:randr:PROVIDER) + (config-timestamp :initarg :config-timestamp :type xcb:TIMESTAMP))) + +(defclass xcb:randr:ListProviderProperties + (xcb:-request) + ((~opcode :initform 36 :type xcb:-u1) + (provider :initarg :provider :type xcb:randr:PROVIDER))) +(defclass xcb:randr:ListProviderProperties~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (num-atoms :initarg :num-atoms :type xcb:CARD16) + (pad~1 :initform 22 :type xcb:-pad) + (atoms~ :initform + '(name atoms type xcb:ATOM size + (xcb:-fieldref 'num-atoms)) + :type xcb:-list) + (atoms :initarg :atoms :type xcb:-ignore))) + +(defclass xcb:randr:QueryProviderProperty + (xcb:-request) + ((~opcode :initform 37 :type xcb:-u1) + (provider :initarg :provider :type xcb:randr:PROVIDER) + (property :initarg :property :type xcb:ATOM))) +(defclass xcb:randr:QueryProviderProperty~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pending :initarg :pending :type xcb:BOOL) + (range :initarg :range :type xcb:BOOL) + (immutable :initarg :immutable :type xcb:BOOL) + (pad~1 :initform 21 :type xcb:-pad) + (valid-values~ :initform + '(name valid-values type xcb:INT32 size + (xcb:-fieldref 'length)) + :type xcb:-list) + (valid-values :initarg :valid-values :type xcb:-ignore))) + +(defclass xcb:randr:ConfigureProviderProperty + (xcb:-request) + ((~opcode :initform 38 :type xcb:-u1) + (provider :initarg :provider :type xcb:randr:PROVIDER) + (property :initarg :property :type xcb:ATOM) + (pending :initarg :pending :type xcb:BOOL) + (range :initarg :range :type xcb:BOOL) + (pad~0 :initform 2 :type xcb:-pad) + (values~ :initform + '(name values type xcb:INT32 size nil) + :type xcb:-list) + (values :initarg :values :type xcb:-ignore))) + +(defclass xcb:randr:ChangeProviderProperty + (xcb:-request) + ((~opcode :initform 39 :type xcb:-u1) + (provider :initarg :provider :type xcb:randr:PROVIDER) + (property :initarg :property :type xcb:ATOM) + (type :initarg :type :type xcb:ATOM) + (format :initarg :format :type xcb:CARD8) + (mode :initarg :mode :type xcb:CARD8) + (pad~0 :initform 2 :type xcb:-pad) + (num-items :initarg :num-items :type xcb:CARD32) + (data~ :initform + '(name data type xcb:void size + (* + (xcb:-fieldref 'num-items) + (/ + (xcb:-fieldref 'format) + 8))) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:randr:DeleteProviderProperty + (xcb:-request) + ((~opcode :initform 40 :type xcb:-u1) + (provider :initarg :provider :type xcb:randr:PROVIDER) + (property :initarg :property :type xcb:ATOM))) + +(defclass xcb:randr:GetProviderProperty + (xcb:-request) + ((~opcode :initform 41 :type xcb:-u1) + (provider :initarg :provider :type xcb:randr:PROVIDER) + (property :initarg :property :type xcb:ATOM) + (type :initarg :type :type xcb:ATOM) + (long-offset :initarg :long-offset :type xcb:CARD32) + (long-length :initarg :long-length :type xcb:CARD32) + (delete :initarg :delete :type xcb:BOOL) + (pending :initarg :pending :type xcb:BOOL) + (pad~0 :initform 2 :type xcb:-pad))) +(defclass xcb:randr:GetProviderProperty~reply + (xcb:-reply) + ((format :initarg :format :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (type :initarg :type :type xcb:ATOM) + (bytes-after :initarg :bytes-after :type xcb:CARD32) + (num-items :initarg :num-items :type xcb:CARD32) + (pad~0 :initform 12 :type xcb:-pad) + (data~ :initform + '(name data type xcb:void size + (* + (xcb:-fieldref 'num-items) + (/ + (xcb:-fieldref 'format) + 8))) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:randr:ScreenChangeNotify + (xcb:-event) + ((~code :initform 0) + (rotation :initarg :rotation :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (timestamp :initarg :timestamp :type xcb:TIMESTAMP) + (config-timestamp :initarg :config-timestamp :type xcb:TIMESTAMP) + (root :initarg :root :type xcb:WINDOW) + (request-window :initarg :request-window :type xcb:WINDOW) + (sizeID :initarg :sizeID :type xcb:CARD16) + (subpixel-order :initarg :subpixel-order :type xcb:CARD16) + (width :initarg :width :type xcb:CARD16) + (height :initarg :height :type xcb:CARD16) + (mwidth :initarg :mwidth :type xcb:CARD16) + (mheight :initarg :mheight :type xcb:CARD16))) + +(defconst xcb:randr:Notify:CrtcChange 0) +(defconst xcb:randr:Notify:OutputChange 1) +(defconst xcb:randr:Notify:OutputProperty 2) +(defconst xcb:randr:Notify:ProviderChange 3) +(defconst xcb:randr:Notify:ProviderProperty 4) +(defconst xcb:randr:Notify:ResourceChange 5) +(defconst xcb:randr:Notify:Lease 6) + +(defclass xcb:randr:CrtcChange + (xcb:-struct) + ((timestamp :initarg :timestamp :type xcb:TIMESTAMP) + (window :initarg :window :type xcb:WINDOW) + (crtc :initarg :crtc :type xcb:randr:CRTC) + (mode :initarg :mode :type xcb:randr:MODE) + (rotation :initarg :rotation :type xcb:CARD16) + (pad~0 :initform 2 :type xcb:-pad) + (x :initarg :x :type xcb:INT16) + (y :initarg :y :type xcb:INT16) + (width :initarg :width :type xcb:CARD16) + (height :initarg :height :type xcb:CARD16))) + +(defclass xcb:randr:OutputChange + (xcb:-struct) + ((timestamp :initarg :timestamp :type xcb:TIMESTAMP) + (config-timestamp :initarg :config-timestamp :type xcb:TIMESTAMP) + (window :initarg :window :type xcb:WINDOW) + (output :initarg :output :type xcb:randr:OUTPUT) + (crtc :initarg :crtc :type xcb:randr:CRTC) + (mode :initarg :mode :type xcb:randr:MODE) + (rotation :initarg :rotation :type xcb:CARD16) + (connection :initarg :connection :type xcb:CARD8) + (subpixel-order :initarg :subpixel-order :type xcb:CARD8))) + +(defclass xcb:randr:OutputProperty + (xcb:-struct) + ((window :initarg :window :type xcb:WINDOW) + (output :initarg :output :type xcb:randr:OUTPUT) + (atom :initarg :atom :type xcb:ATOM) + (timestamp :initarg :timestamp :type xcb:TIMESTAMP) + (status :initarg :status :type xcb:CARD8) + (pad~0 :initform 11 :type xcb:-pad))) + +(defclass xcb:randr:ProviderChange + (xcb:-struct) + ((timestamp :initarg :timestamp :type xcb:TIMESTAMP) + (window :initarg :window :type xcb:WINDOW) + (provider :initarg :provider :type xcb:randr:PROVIDER) + (pad~0 :initform 16 :type xcb:-pad))) + +(defclass xcb:randr:ProviderProperty + (xcb:-struct) + ((window :initarg :window :type xcb:WINDOW) + (provider :initarg :provider :type xcb:randr:PROVIDER) + (atom :initarg :atom :type xcb:ATOM) + (timestamp :initarg :timestamp :type xcb:TIMESTAMP) + (state :initarg :state :type xcb:CARD8) + (pad~0 :initform 11 :type xcb:-pad))) + +(defclass xcb:randr:ResourceChange + (xcb:-struct) + ((timestamp :initarg :timestamp :type xcb:TIMESTAMP) + (window :initarg :window :type xcb:WINDOW) + (pad~0 :initform 20 :type xcb:-pad))) + +(defclass xcb:randr:MonitorInfo + (xcb:-struct) + ((name :initarg :name :type xcb:ATOM) + (primary :initarg :primary :type xcb:BOOL) + (automatic :initarg :automatic :type xcb:BOOL) + (nOutput :initarg :nOutput :type xcb:CARD16) + (x :initarg :x :type xcb:INT16) + (y :initarg :y :type xcb:INT16) + (width :initarg :width :type xcb:CARD16) + (height :initarg :height :type xcb:CARD16) + (width-in-millimeters :initarg :width-in-millimeters :type xcb:CARD32) + (height-in-millimeters :initarg :height-in-millimeters :type xcb:CARD32) + (outputs~ :initform + '(name outputs type xcb:randr:OUTPUT size + (xcb:-fieldref 'nOutput)) + :type xcb:-list) + (outputs :initarg :outputs :type xcb:-ignore))) + +(defclass xcb:randr:GetMonitors + (xcb:-request) + ((~opcode :initform 42 :type xcb:-u1) + (window :initarg :window :type xcb:WINDOW) + (get-active :initarg :get-active :type xcb:BOOL))) +(defclass xcb:randr:GetMonitors~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (timestamp :initarg :timestamp :type xcb:TIMESTAMP) + (nMonitors :initarg :nMonitors :type xcb:CARD32) + (nOutputs :initarg :nOutputs :type xcb:CARD32) + (pad~1 :initform 12 :type xcb:-pad) + (monitors~ :initform + '(name monitors type xcb:randr:MonitorInfo size + (xcb:-fieldref 'nMonitors)) + :type xcb:-list) + (monitors :initarg :monitors :type xcb:-ignore))) + +(defclass xcb:randr:SetMonitor + (xcb:-request) + ((~opcode :initform 43 :type xcb:-u1) + (window :initarg :window :type xcb:WINDOW) + (monitorinfo :initarg :monitorinfo :type xcb:randr:MonitorInfo))) + +(defclass xcb:randr:DeleteMonitor + (xcb:-request) + ((~opcode :initform 44 :type xcb:-u1) + (window :initarg :window :type xcb:WINDOW) + (name :initarg :name :type xcb:ATOM))) + +(defclass xcb:randr:CreateLease + (xcb:-request) + ((~opcode :initform 45 :type xcb:-u1) + (window :initarg :window :type xcb:WINDOW) + (lid :initarg :lid :type xcb:randr:LEASE) + (num-crtcs :initarg :num-crtcs :type xcb:CARD16) + (num-outputs :initarg :num-outputs :type xcb:CARD16) + (crtcs~ :initform + '(name crtcs type xcb:randr:CRTC size + (xcb:-fieldref 'num-crtcs)) + :type xcb:-list) + (crtcs :initarg :crtcs :type xcb:-ignore) + (outputs~ :initform + '(name outputs type xcb:randr:OUTPUT size + (xcb:-fieldref 'num-outputs)) + :type xcb:-list) + (outputs :initarg :outputs :type xcb:-ignore))) +(defclass xcb:randr:CreateLease~reply + (xcb:-reply) + ((nfd :initarg :nfd :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (master-fd :type xcb:fd) + (pad~0 :initform 24 :type xcb:-pad))) + +(defclass xcb:randr:FreeLease + (xcb:-request) + ((~opcode :initform 46 :type xcb:-u1) + (lid :initarg :lid :type xcb:randr:LEASE) + (terminate :initarg :terminate :type xcb:BYTE))) + +(defclass xcb:randr:LeaseNotify + (xcb:-struct) + ((timestamp :initarg :timestamp :type xcb:TIMESTAMP) + (window :initarg :window :type xcb:WINDOW) + (lease :initarg :lease :type xcb:randr:LEASE) + (created :initarg :created :type xcb:CARD8) + (pad~0 :initform 15 :type xcb:-pad))) + +(defclass xcb:randr:NotifyData + (xcb:-union) + ((~size :initform 28) + (cc :initarg :cc :type xcb:randr:CrtcChange) + (oc :initarg :oc :type xcb:randr:OutputChange) + (op :initarg :op :type xcb:randr:OutputProperty) + (pc :initarg :pc :type xcb:randr:ProviderChange) + (pp :initarg :pp :type xcb:randr:ProviderProperty) + (rc :initarg :rc :type xcb:randr:ResourceChange) + (lc :initarg :lc :type xcb:randr:LeaseNotify))) + +(defclass xcb:randr:Notify + (xcb:-event) + ((~code :initform 1) + (subCode :initarg :subCode :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (u :initarg :u :type xcb:randr:NotifyData))) + +(defconst xcb:randr:error-number-class-alist + '((0 . xcb:randr:BadOutput) + (1 . xcb:randr:BadCrtc) + (2 . xcb:randr:BadMode) + (3 . xcb:randr:BadProvider)) + "(error-number . error-class) alist.") + +(defconst xcb:randr:event-number-class-alist + '((0 . xcb:randr:ScreenChangeNotify) + (1 . xcb:randr:Notify)) + "(event-number . event-class) alist.") + + + +(provide 'xcb-randr) + +;;; xcb-randr.el ends here diff --git a/elpa/xelb-0.18/xcb-record.el b/elpa/xelb-0.18/xcb-record.el new file mode 100644 index 0000000..90bf262 --- /dev/null +++ b/elpa/xelb-0.18/xcb-record.el @@ -0,0 +1,213 @@ +;;; xcb-record.el --- X11 Record extension -*- lexical-binding: t -*- + +;; Copyright (C) 2015-2019 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This file was generated by 'el_client.el' from 'record.xml', +;; which you can retrieve from . + +;;; Code: + +(require 'xcb-types) + +(defconst xcb:record:-extension-xname "RECORD") +(defconst xcb:record:-extension-name "Record") +(defconst xcb:record:-major-version 1) +(defconst xcb:record:-minor-version 13) + +(xcb:deftypealias 'xcb:record:CONTEXT 'xcb:-u4) + +(defclass xcb:record:Range8 + (xcb:-struct) + ((first :initarg :first :type xcb:CARD8) + (last :initarg :last :type xcb:CARD8))) + +(defclass xcb:record:Range16 + (xcb:-struct) + ((first :initarg :first :type xcb:CARD16) + (last :initarg :last :type xcb:CARD16))) + +(defclass xcb:record:ExtRange + (xcb:-struct) + ((major :initarg :major :type xcb:record:Range8) + (minor :initarg :minor :type xcb:record:Range16))) + +(defclass xcb:record:Range + (xcb:-struct) + ((core-requests :initarg :core-requests :type xcb:record:Range8) + (core-replies :initarg :core-replies :type xcb:record:Range8) + (ext-requests :initarg :ext-requests :type xcb:record:ExtRange) + (ext-replies :initarg :ext-replies :type xcb:record:ExtRange) + (delivered-events :initarg :delivered-events :type xcb:record:Range8) + (device-events :initarg :device-events :type xcb:record:Range8) + (errors :initarg :errors :type xcb:record:Range8) + (client-started :initarg :client-started :type xcb:BOOL) + (client-died :initarg :client-died :type xcb:BOOL))) + +(xcb:deftypealias 'xcb:record:ElementHeader 'xcb:CARD8) + +(defconst xcb:record:HType:FromServerTime 1) +(defconst xcb:record:HType:FromClientTime 2) +(defconst xcb:record:HType:FromClientSequence 4) + +(xcb:deftypealias 'xcb:record:ClientSpec 'xcb:CARD32) + +(defconst xcb:record:CS:CurrentClients 1) +(defconst xcb:record:CS:FutureClients 2) +(defconst xcb:record:CS:AllClients 3) + +(defclass xcb:record:ClientInfo + (xcb:-struct) + ((client-resource :initarg :client-resource :type xcb:record:ClientSpec) + (num-ranges :initarg :num-ranges :type xcb:CARD32) + (ranges~ :initform + '(name ranges type xcb:record:Range size + (xcb:-fieldref 'num-ranges)) + :type xcb:-list) + (ranges :initarg :ranges :type xcb:-ignore))) + +(defclass xcb:record:BadContext + (xcb:-error) + ((~code :initform 0) + (invalid-record :initarg :invalid-record :type xcb:CARD32))) + +(defclass xcb:record:QueryVersion + (xcb:-request) + ((~opcode :initform 0 :type xcb:-u1) + (major-version :initarg :major-version :type xcb:CARD16) + (minor-version :initarg :minor-version :type xcb:CARD16))) +(defclass xcb:record:QueryVersion~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (major-version :initarg :major-version :type xcb:CARD16) + (minor-version :initarg :minor-version :type xcb:CARD16))) + +(defclass xcb:record:CreateContext + (xcb:-request) + ((~opcode :initform 1 :type xcb:-u1) + (context :initarg :context :type xcb:record:CONTEXT) + (element-header :initarg :element-header :type xcb:record:ElementHeader) + (pad~0 :initform 3 :type xcb:-pad) + (num-client-specs :initarg :num-client-specs :type xcb:CARD32) + (num-ranges :initarg :num-ranges :type xcb:CARD32) + (client-specs~ :initform + '(name client-specs type xcb:record:ClientSpec size + (xcb:-fieldref 'num-client-specs)) + :type xcb:-list) + (client-specs :initarg :client-specs :type xcb:-ignore) + (ranges~ :initform + '(name ranges type xcb:record:Range size + (xcb:-fieldref 'num-ranges)) + :type xcb:-list) + (ranges :initarg :ranges :type xcb:-ignore))) + +(defclass xcb:record:RegisterClients + (xcb:-request) + ((~opcode :initform 2 :type xcb:-u1) + (context :initarg :context :type xcb:record:CONTEXT) + (element-header :initarg :element-header :type xcb:record:ElementHeader) + (pad~0 :initform 3 :type xcb:-pad) + (num-client-specs :initarg :num-client-specs :type xcb:CARD32) + (num-ranges :initarg :num-ranges :type xcb:CARD32) + (client-specs~ :initform + '(name client-specs type xcb:record:ClientSpec size + (xcb:-fieldref 'num-client-specs)) + :type xcb:-list) + (client-specs :initarg :client-specs :type xcb:-ignore) + (ranges~ :initform + '(name ranges type xcb:record:Range size + (xcb:-fieldref 'num-ranges)) + :type xcb:-list) + (ranges :initarg :ranges :type xcb:-ignore))) + +(defclass xcb:record:UnregisterClients + (xcb:-request) + ((~opcode :initform 3 :type xcb:-u1) + (context :initarg :context :type xcb:record:CONTEXT) + (num-client-specs :initarg :num-client-specs :type xcb:CARD32) + (client-specs~ :initform + '(name client-specs type xcb:record:ClientSpec size + (xcb:-fieldref 'num-client-specs)) + :type xcb:-list) + (client-specs :initarg :client-specs :type xcb:-ignore))) + +(defclass xcb:record:GetContext + (xcb:-request) + ((~opcode :initform 4 :type xcb:-u1) + (context :initarg :context :type xcb:record:CONTEXT))) +(defclass xcb:record:GetContext~reply + (xcb:-reply) + ((enabled :initarg :enabled :type xcb:BOOL) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (element-header :initarg :element-header :type xcb:record:ElementHeader) + (pad~0 :initform 3 :type xcb:-pad) + (num-intercepted-clients :initarg :num-intercepted-clients :type xcb:CARD32) + (pad~1 :initform 16 :type xcb:-pad) + (intercepted-clients~ :initform + '(name intercepted-clients type xcb:record:ClientInfo size + (xcb:-fieldref 'num-intercepted-clients)) + :type xcb:-list) + (intercepted-clients :initarg :intercepted-clients :type xcb:-ignore))) + +(defclass xcb:record:EnableContext + (xcb:-request) + ((~opcode :initform 5 :type xcb:-u1) + (context :initarg :context :type xcb:record:CONTEXT))) +(defclass xcb:record:EnableContext~reply + (xcb:-reply) + ((category :initarg :category :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (element-header :initarg :element-header :type xcb:record:ElementHeader) + (client-swapped :initarg :client-swapped :type xcb:BOOL) + (pad~0 :initform 2 :type xcb:-pad) + (xid-base :initarg :xid-base :type xcb:CARD32) + (server-time :initarg :server-time :type xcb:CARD32) + (rec-sequence-num :initarg :rec-sequence-num :type xcb:CARD32) + (pad~1 :initform 8 :type xcb:-pad) + (data~ :initform + '(name data type xcb:BYTE size + (* + (xcb:-fieldref 'length) + 4)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:record:DisableContext + (xcb:-request) + ((~opcode :initform 6 :type xcb:-u1) + (context :initarg :context :type xcb:record:CONTEXT))) + +(defclass xcb:record:FreeContext + (xcb:-request) + ((~opcode :initform 7 :type xcb:-u1) + (context :initarg :context :type xcb:record:CONTEXT))) + +(defconst xcb:record:error-number-class-alist + '((0 . xcb:record:BadContext)) + "(error-number . error-class) alist.") + + + +(provide 'xcb-record) + +;;; xcb-record.el ends here diff --git a/elpa/xelb-0.18/xcb-render.el b/elpa/xelb-0.18/xcb-render.el new file mode 100644 index 0000000..bf2e77e --- /dev/null +++ b/elpa/xelb-0.18/xcb-render.el @@ -0,0 +1,763 @@ +;;; xcb-render.el --- X11 Render extension -*- lexical-binding: t -*- + +;; Copyright (C) 2015-2019 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This file was generated by 'el_client.el' from 'render.xml', +;; which you can retrieve from . + +;;; Code: + +(require 'xcb-types) + +(defconst xcb:render:-extension-xname "RENDER") +(defconst xcb:render:-extension-name "Render") +(defconst xcb:render:-major-version 0) +(defconst xcb:render:-minor-version 11) + +(require 'xcb-xproto) + +(defconst xcb:render:PictType:Indexed 0) +(defconst xcb:render:PictType:Direct 1) + +(defconst xcb:render:Picture:None 0) + +(defconst xcb:render:PictOp:Clear 0) +(defconst xcb:render:PictOp:Src 1) +(defconst xcb:render:PictOp:Dst 2) +(defconst xcb:render:PictOp:Over 3) +(defconst xcb:render:PictOp:OverReverse 4) +(defconst xcb:render:PictOp:In 5) +(defconst xcb:render:PictOp:InReverse 6) +(defconst xcb:render:PictOp:Out 7) +(defconst xcb:render:PictOp:OutReverse 8) +(defconst xcb:render:PictOp:Atop 9) +(defconst xcb:render:PictOp:AtopReverse 10) +(defconst xcb:render:PictOp:Xor 11) +(defconst xcb:render:PictOp:Add 12) +(defconst xcb:render:PictOp:Saturate 13) +(defconst xcb:render:PictOp:DisjointClear 16) +(defconst xcb:render:PictOp:DisjointSrc 17) +(defconst xcb:render:PictOp:DisjointDst 18) +(defconst xcb:render:PictOp:DisjointOver 19) +(defconst xcb:render:PictOp:DisjointOverReverse 20) +(defconst xcb:render:PictOp:DisjointIn 21) +(defconst xcb:render:PictOp:DisjointInReverse 22) +(defconst xcb:render:PictOp:DisjointOut 23) +(defconst xcb:render:PictOp:DisjointOutReverse 24) +(defconst xcb:render:PictOp:DisjointAtop 25) +(defconst xcb:render:PictOp:DisjointAtopReverse 26) +(defconst xcb:render:PictOp:DisjointXor 27) +(defconst xcb:render:PictOp:ConjointClear 32) +(defconst xcb:render:PictOp:ConjointSrc 33) +(defconst xcb:render:PictOp:ConjointDst 34) +(defconst xcb:render:PictOp:ConjointOver 35) +(defconst xcb:render:PictOp:ConjointOverReverse 36) +(defconst xcb:render:PictOp:ConjointIn 37) +(defconst xcb:render:PictOp:ConjointInReverse 38) +(defconst xcb:render:PictOp:ConjointOut 39) +(defconst xcb:render:PictOp:ConjointOutReverse 40) +(defconst xcb:render:PictOp:ConjointAtop 41) +(defconst xcb:render:PictOp:ConjointAtopReverse 42) +(defconst xcb:render:PictOp:ConjointXor 43) +(defconst xcb:render:PictOp:Multiply 48) +(defconst xcb:render:PictOp:Screen 49) +(defconst xcb:render:PictOp:Overlay 50) +(defconst xcb:render:PictOp:Darken 51) +(defconst xcb:render:PictOp:Lighten 52) +(defconst xcb:render:PictOp:ColorDodge 53) +(defconst xcb:render:PictOp:ColorBurn 54) +(defconst xcb:render:PictOp:HardLight 55) +(defconst xcb:render:PictOp:SoftLight 56) +(defconst xcb:render:PictOp:Difference 57) +(defconst xcb:render:PictOp:Exclusion 58) +(defconst xcb:render:PictOp:HSLHue 59) +(defconst xcb:render:PictOp:HSLSaturation 60) +(defconst xcb:render:PictOp:HSLColor 61) +(defconst xcb:render:PictOp:HSLLuminosity 62) + +(defconst xcb:render:PolyEdge:Sharp 0) +(defconst xcb:render:PolyEdge:Smooth 1) + +(defconst xcb:render:PolyMode:Precise 0) +(defconst xcb:render:PolyMode:Imprecise 1) + +(defconst xcb:render:CP:Repeat 1) +(defconst xcb:render:CP:AlphaMap 2) +(defconst xcb:render:CP:AlphaXOrigin 4) +(defconst xcb:render:CP:AlphaYOrigin 8) +(defconst xcb:render:CP:ClipXOrigin 16) +(defconst xcb:render:CP:ClipYOrigin 32) +(defconst xcb:render:CP:ClipMask 64) +(defconst xcb:render:CP:GraphicsExposure 128) +(defconst xcb:render:CP:SubwindowMode 256) +(defconst xcb:render:CP:PolyEdge 512) +(defconst xcb:render:CP:PolyMode 1024) +(defconst xcb:render:CP:Dither 2048) +(defconst xcb:render:CP:ComponentAlpha 4096) + +(defconst xcb:render:SubPixel:Unknown 0) +(defconst xcb:render:SubPixel:HorizontalRGB 1) +(defconst xcb:render:SubPixel:HorizontalBGR 2) +(defconst xcb:render:SubPixel:VerticalRGB 3) +(defconst xcb:render:SubPixel:VerticalBGR 4) +(defconst xcb:render:SubPixel:None 5) + +(defconst xcb:render:Repeat:None 0) +(defconst xcb:render:Repeat:Normal 1) +(defconst xcb:render:Repeat:Pad 2) +(defconst xcb:render:Repeat:Reflect 3) + +(xcb:deftypealias 'xcb:render:GLYPH 'xcb:CARD32) + +(xcb:deftypealias 'xcb:render:GLYPHSET 'xcb:-u4) + +(xcb:deftypealias 'xcb:render:PICTURE 'xcb:-u4) + +(xcb:deftypealias 'xcb:render:PICTFORMAT 'xcb:-u4) + +(xcb:deftypealias 'xcb:render:FIXED 'xcb:INT32) + +(defclass xcb:render:PictFormat + (xcb:-error) + ((~code :initform 0))) + +(defclass xcb:render:Picture + (xcb:-error) + ((~code :initform 1))) + +(defclass xcb:render:PictOp + (xcb:-error) + ((~code :initform 2))) + +(defclass xcb:render:GlyphSet + (xcb:-error) + ((~code :initform 3))) + +(defclass xcb:render:Glyph + (xcb:-error) + ((~code :initform 4))) + +(defclass xcb:render:DIRECTFORMAT + (xcb:-struct) + ((red-shift :initarg :red-shift :type xcb:CARD16) + (red-mask :initarg :red-mask :type xcb:CARD16) + (green-shift :initarg :green-shift :type xcb:CARD16) + (green-mask :initarg :green-mask :type xcb:CARD16) + (blue-shift :initarg :blue-shift :type xcb:CARD16) + (blue-mask :initarg :blue-mask :type xcb:CARD16) + (alpha-shift :initarg :alpha-shift :type xcb:CARD16) + (alpha-mask :initarg :alpha-mask :type xcb:CARD16))) + +(defclass xcb:render:PICTFORMINFO + (xcb:-struct) + ((id :initarg :id :type xcb:render:PICTFORMAT) + (type :initarg :type :type xcb:CARD8) + (depth :initarg :depth :type xcb:CARD8) + (pad~0 :initform 2 :type xcb:-pad) + (direct :initarg :direct :type xcb:render:DIRECTFORMAT) + (colormap :initarg :colormap :type xcb:COLORMAP))) + +(defclass xcb:render:PICTVISUAL + (xcb:-struct) + ((visual :initarg :visual :type xcb:VISUALID) + (format :initarg :format :type xcb:render:PICTFORMAT))) + +(defclass xcb:render:PICTDEPTH + (xcb:-struct) + ((depth :initarg :depth :type xcb:CARD8) + (pad~0 :initform 1 :type xcb:-pad) + (num-visuals :initarg :num-visuals :type xcb:CARD16) + (pad~1 :initform 4 :type xcb:-pad) + (visuals~ :initform + '(name visuals type xcb:render:PICTVISUAL size + (xcb:-fieldref 'num-visuals)) + :type xcb:-list) + (visuals :initarg :visuals :type xcb:-ignore))) + +(defclass xcb:render:PICTSCREEN + (xcb:-struct) + ((num-depths :initarg :num-depths :type xcb:CARD32) + (fallback :initarg :fallback :type xcb:render:PICTFORMAT) + (depths~ :initform + '(name depths type xcb:render:PICTDEPTH size + (xcb:-fieldref 'num-depths)) + :type xcb:-list) + (depths :initarg :depths :type xcb:-ignore))) + +(defclass xcb:render:INDEXVALUE + (xcb:-struct) + ((pixel :initarg :pixel :type xcb:CARD32) + (red :initarg :red :type xcb:CARD16) + (green :initarg :green :type xcb:CARD16) + (blue :initarg :blue :type xcb:CARD16) + (alpha :initarg :alpha :type xcb:CARD16))) + +(defclass xcb:render:COLOR + (xcb:-struct) + ((red :initarg :red :type xcb:CARD16) + (green :initarg :green :type xcb:CARD16) + (blue :initarg :blue :type xcb:CARD16) + (alpha :initarg :alpha :type xcb:CARD16))) + +(defclass xcb:render:POINTFIX + (xcb:-struct) + ((x :initarg :x :type xcb:render:FIXED) + (y :initarg :y :type xcb:render:FIXED))) + +(defclass xcb:render:LINEFIX + (xcb:-struct) + ((p1 :initarg :p1 :type xcb:render:POINTFIX) + (p2 :initarg :p2 :type xcb:render:POINTFIX))) + +(defclass xcb:render:TRIANGLE + (xcb:-struct) + ((p1 :initarg :p1 :type xcb:render:POINTFIX) + (p2 :initarg :p2 :type xcb:render:POINTFIX) + (p3 :initarg :p3 :type xcb:render:POINTFIX))) + +(defclass xcb:render:TRAPEZOID + (xcb:-struct) + ((top :initarg :top :type xcb:render:FIXED) + (bottom :initarg :bottom :type xcb:render:FIXED) + (left :initarg :left :type xcb:render:LINEFIX) + (right :initarg :right :type xcb:render:LINEFIX))) + +(defclass xcb:render:GLYPHINFO + (xcb:-struct) + ((width :initarg :width :type xcb:CARD16) + (height :initarg :height :type xcb:CARD16) + (x :initarg :x :type xcb:INT16) + (y :initarg :y :type xcb:INT16) + (x-off :initarg :x-off :type xcb:INT16) + (y-off :initarg :y-off :type xcb:INT16))) + +(defclass xcb:render:QueryVersion + (xcb:-request) + ((~opcode :initform 0 :type xcb:-u1) + (client-major-version :initarg :client-major-version :type xcb:CARD32) + (client-minor-version :initarg :client-minor-version :type xcb:CARD32))) +(defclass xcb:render:QueryVersion~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (major-version :initarg :major-version :type xcb:CARD32) + (minor-version :initarg :minor-version :type xcb:CARD32) + (pad~1 :initform 16 :type xcb:-pad))) + +(defclass xcb:render:QueryPictFormats + (xcb:-request) + ((~opcode :initform 1 :type xcb:-u1))) +(defclass xcb:render:QueryPictFormats~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (num-formats :initarg :num-formats :type xcb:CARD32) + (num-screens :initarg :num-screens :type xcb:CARD32) + (num-depths :initarg :num-depths :type xcb:CARD32) + (num-visuals :initarg :num-visuals :type xcb:CARD32) + (num-subpixel :initarg :num-subpixel :type xcb:CARD32) + (pad~1 :initform 4 :type xcb:-pad) + (formats~ :initform + '(name formats type xcb:render:PICTFORMINFO size + (xcb:-fieldref 'num-formats)) + :type xcb:-list) + (formats :initarg :formats :type xcb:-ignore) + (screens~ :initform + '(name screens type xcb:render:PICTSCREEN size + (xcb:-fieldref 'num-screens)) + :type xcb:-list) + (screens :initarg :screens :type xcb:-ignore) + (subpixels~ :initform + '(name subpixels type xcb:CARD32 size + (xcb:-fieldref 'num-subpixel)) + :type xcb:-list) + (subpixels :initarg :subpixels :type xcb:-ignore))) + +(defclass xcb:render:QueryPictIndexValues + (xcb:-request) + ((~opcode :initform 2 :type xcb:-u1) + (format :initarg :format :type xcb:render:PICTFORMAT))) +(defclass xcb:render:QueryPictIndexValues~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (num-values :initarg :num-values :type xcb:CARD32) + (pad~1 :initform 20 :type xcb:-pad) + (values~ :initform + '(name values type xcb:render:INDEXVALUE size + (xcb:-fieldref 'num-values)) + :type xcb:-list) + (values :initarg :values :type xcb:-ignore))) + +(defclass xcb:render:CreatePicture + (xcb:-request) + ((~opcode :initform 4 :type xcb:-u1) + (pid :initarg :pid :type xcb:render:PICTURE) + (drawable :initarg :drawable :type xcb:DRAWABLE) + (format :initarg :format :type xcb:render:PICTFORMAT) + (value-mask :initarg :value-mask :type xcb:CARD32) + (value-list :initform + '(expression + (xcb:-fieldref 'value-mask) + cases + ((1 repeat) + (2 alphamap) + (4 alphaxorigin) + (8 alphayorigin) + (16 clipxorigin) + (32 clipyorigin) + (64 clipmask) + (128 graphicsexposure) + (256 subwindowmode) + (512 polyedge) + (1024 polymode) + (2048 dither) + (4096 componentalpha))) + :type xcb:-switch) + (repeat :initarg :repeat :type xcb:CARD32) + (alphamap :initarg :alphamap :type xcb:render:PICTURE) + (alphaxorigin :initarg :alphaxorigin :type xcb:INT32) + (alphayorigin :initarg :alphayorigin :type xcb:INT32) + (clipxorigin :initarg :clipxorigin :type xcb:INT32) + (clipyorigin :initarg :clipyorigin :type xcb:INT32) + (clipmask :initarg :clipmask :type xcb:PIXMAP) + (graphicsexposure :initarg :graphicsexposure :type xcb:CARD32) + (subwindowmode :initarg :subwindowmode :type xcb:CARD32) + (polyedge :initarg :polyedge :type xcb:CARD32) + (polymode :initarg :polymode :type xcb:CARD32) + (dither :initarg :dither :type xcb:ATOM) + (componentalpha :initarg :componentalpha :type xcb:CARD32))) + +(defclass xcb:render:ChangePicture + (xcb:-request) + ((~opcode :initform 5 :type xcb:-u1) + (picture :initarg :picture :type xcb:render:PICTURE) + (value-mask :initarg :value-mask :type xcb:CARD32) + (value-list :initform + '(expression + (xcb:-fieldref 'value-mask) + cases + ((1 repeat) + (2 alphamap) + (4 alphaxorigin) + (8 alphayorigin) + (16 clipxorigin) + (32 clipyorigin) + (64 clipmask) + (128 graphicsexposure) + (256 subwindowmode) + (512 polyedge) + (1024 polymode) + (2048 dither) + (4096 componentalpha))) + :type xcb:-switch) + (repeat :initarg :repeat :type xcb:CARD32) + (alphamap :initarg :alphamap :type xcb:render:PICTURE) + (alphaxorigin :initarg :alphaxorigin :type xcb:INT32) + (alphayorigin :initarg :alphayorigin :type xcb:INT32) + (clipxorigin :initarg :clipxorigin :type xcb:INT32) + (clipyorigin :initarg :clipyorigin :type xcb:INT32) + (clipmask :initarg :clipmask :type xcb:PIXMAP) + (graphicsexposure :initarg :graphicsexposure :type xcb:CARD32) + (subwindowmode :initarg :subwindowmode :type xcb:CARD32) + (polyedge :initarg :polyedge :type xcb:CARD32) + (polymode :initarg :polymode :type xcb:CARD32) + (dither :initarg :dither :type xcb:ATOM) + (componentalpha :initarg :componentalpha :type xcb:CARD32))) + +(defclass xcb:render:SetPictureClipRectangles + (xcb:-request) + ((~opcode :initform 6 :type xcb:-u1) + (picture :initarg :picture :type xcb:render:PICTURE) + (clip-x-origin :initarg :clip-x-origin :type xcb:INT16) + (clip-y-origin :initarg :clip-y-origin :type xcb:INT16) + (rectangles~ :initform + '(name rectangles type xcb:RECTANGLE size nil) + :type xcb:-list) + (rectangles :initarg :rectangles :type xcb:-ignore))) + +(defclass xcb:render:FreePicture + (xcb:-request) + ((~opcode :initform 7 :type xcb:-u1) + (picture :initarg :picture :type xcb:render:PICTURE))) + +(defclass xcb:render:Composite + (xcb:-request) + ((~opcode :initform 8 :type xcb:-u1) + (op :initarg :op :type xcb:CARD8) + (pad~0 :initform 3 :type xcb:-pad) + (src :initarg :src :type xcb:render:PICTURE) + (mask :initarg :mask :type xcb:render:PICTURE) + (dst :initarg :dst :type xcb:render:PICTURE) + (src-x :initarg :src-x :type xcb:INT16) + (src-y :initarg :src-y :type xcb:INT16) + (mask-x :initarg :mask-x :type xcb:INT16) + (mask-y :initarg :mask-y :type xcb:INT16) + (dst-x :initarg :dst-x :type xcb:INT16) + (dst-y :initarg :dst-y :type xcb:INT16) + (width :initarg :width :type xcb:CARD16) + (height :initarg :height :type xcb:CARD16))) + +(defclass xcb:render:Trapezoids + (xcb:-request) + ((~opcode :initform 10 :type xcb:-u1) + (op :initarg :op :type xcb:CARD8) + (pad~0 :initform 3 :type xcb:-pad) + (src :initarg :src :type xcb:render:PICTURE) + (dst :initarg :dst :type xcb:render:PICTURE) + (mask-format :initarg :mask-format :type xcb:render:PICTFORMAT) + (src-x :initarg :src-x :type xcb:INT16) + (src-y :initarg :src-y :type xcb:INT16) + (traps~ :initform + '(name traps type xcb:render:TRAPEZOID size nil) + :type xcb:-list) + (traps :initarg :traps :type xcb:-ignore))) + +(defclass xcb:render:Triangles + (xcb:-request) + ((~opcode :initform 11 :type xcb:-u1) + (op :initarg :op :type xcb:CARD8) + (pad~0 :initform 3 :type xcb:-pad) + (src :initarg :src :type xcb:render:PICTURE) + (dst :initarg :dst :type xcb:render:PICTURE) + (mask-format :initarg :mask-format :type xcb:render:PICTFORMAT) + (src-x :initarg :src-x :type xcb:INT16) + (src-y :initarg :src-y :type xcb:INT16) + (triangles~ :initform + '(name triangles type xcb:render:TRIANGLE size nil) + :type xcb:-list) + (triangles :initarg :triangles :type xcb:-ignore))) + +(defclass xcb:render:TriStrip + (xcb:-request) + ((~opcode :initform 12 :type xcb:-u1) + (op :initarg :op :type xcb:CARD8) + (pad~0 :initform 3 :type xcb:-pad) + (src :initarg :src :type xcb:render:PICTURE) + (dst :initarg :dst :type xcb:render:PICTURE) + (mask-format :initarg :mask-format :type xcb:render:PICTFORMAT) + (src-x :initarg :src-x :type xcb:INT16) + (src-y :initarg :src-y :type xcb:INT16) + (points~ :initform + '(name points type xcb:render:POINTFIX size nil) + :type xcb:-list) + (points :initarg :points :type xcb:-ignore))) + +(defclass xcb:render:TriFan + (xcb:-request) + ((~opcode :initform 13 :type xcb:-u1) + (op :initarg :op :type xcb:CARD8) + (pad~0 :initform 3 :type xcb:-pad) + (src :initarg :src :type xcb:render:PICTURE) + (dst :initarg :dst :type xcb:render:PICTURE) + (mask-format :initarg :mask-format :type xcb:render:PICTFORMAT) + (src-x :initarg :src-x :type xcb:INT16) + (src-y :initarg :src-y :type xcb:INT16) + (points~ :initform + '(name points type xcb:render:POINTFIX size nil) + :type xcb:-list) + (points :initarg :points :type xcb:-ignore))) + +(defclass xcb:render:CreateGlyphSet + (xcb:-request) + ((~opcode :initform 17 :type xcb:-u1) + (gsid :initarg :gsid :type xcb:render:GLYPHSET) + (format :initarg :format :type xcb:render:PICTFORMAT))) + +(defclass xcb:render:ReferenceGlyphSet + (xcb:-request) + ((~opcode :initform 18 :type xcb:-u1) + (gsid :initarg :gsid :type xcb:render:GLYPHSET) + (existing :initarg :existing :type xcb:render:GLYPHSET))) + +(defclass xcb:render:FreeGlyphSet + (xcb:-request) + ((~opcode :initform 19 :type xcb:-u1) + (glyphset :initarg :glyphset :type xcb:render:GLYPHSET))) + +(defclass xcb:render:AddGlyphs + (xcb:-request) + ((~opcode :initform 20 :type xcb:-u1) + (glyphset :initarg :glyphset :type xcb:render:GLYPHSET) + (glyphs-len :initarg :glyphs-len :type xcb:CARD32) + (glyphids~ :initform + '(name glyphids type xcb:CARD32 size + (xcb:-fieldref 'glyphs-len)) + :type xcb:-list) + (glyphids :initarg :glyphids :type xcb:-ignore) + (glyphs~ :initform + '(name glyphs type xcb:render:GLYPHINFO size + (xcb:-fieldref 'glyphs-len)) + :type xcb:-list) + (glyphs :initarg :glyphs :type xcb:-ignore) + (data~ :initform + '(name data type xcb:BYTE size nil) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:render:FreeGlyphs + (xcb:-request) + ((~opcode :initform 22 :type xcb:-u1) + (glyphset :initarg :glyphset :type xcb:render:GLYPHSET) + (glyphs~ :initform + '(name glyphs type xcb:render:GLYPH size nil) + :type xcb:-list) + (glyphs :initarg :glyphs :type xcb:-ignore))) + +(defclass xcb:render:CompositeGlyphs8 + (xcb:-request) + ((~opcode :initform 23 :type xcb:-u1) + (op :initarg :op :type xcb:CARD8) + (pad~0 :initform 3 :type xcb:-pad) + (src :initarg :src :type xcb:render:PICTURE) + (dst :initarg :dst :type xcb:render:PICTURE) + (mask-format :initarg :mask-format :type xcb:render:PICTFORMAT) + (glyphset :initarg :glyphset :type xcb:render:GLYPHSET) + (src-x :initarg :src-x :type xcb:INT16) + (src-y :initarg :src-y :type xcb:INT16) + (glyphcmds~ :initform + '(name glyphcmds type xcb:BYTE size nil) + :type xcb:-list) + (glyphcmds :initarg :glyphcmds :type xcb:-ignore))) + +(defclass xcb:render:CompositeGlyphs16 + (xcb:-request) + ((~opcode :initform 24 :type xcb:-u1) + (op :initarg :op :type xcb:CARD8) + (pad~0 :initform 3 :type xcb:-pad) + (src :initarg :src :type xcb:render:PICTURE) + (dst :initarg :dst :type xcb:render:PICTURE) + (mask-format :initarg :mask-format :type xcb:render:PICTFORMAT) + (glyphset :initarg :glyphset :type xcb:render:GLYPHSET) + (src-x :initarg :src-x :type xcb:INT16) + (src-y :initarg :src-y :type xcb:INT16) + (glyphcmds~ :initform + '(name glyphcmds type xcb:BYTE size nil) + :type xcb:-list) + (glyphcmds :initarg :glyphcmds :type xcb:-ignore))) + +(defclass xcb:render:CompositeGlyphs32 + (xcb:-request) + ((~opcode :initform 25 :type xcb:-u1) + (op :initarg :op :type xcb:CARD8) + (pad~0 :initform 3 :type xcb:-pad) + (src :initarg :src :type xcb:render:PICTURE) + (dst :initarg :dst :type xcb:render:PICTURE) + (mask-format :initarg :mask-format :type xcb:render:PICTFORMAT) + (glyphset :initarg :glyphset :type xcb:render:GLYPHSET) + (src-x :initarg :src-x :type xcb:INT16) + (src-y :initarg :src-y :type xcb:INT16) + (glyphcmds~ :initform + '(name glyphcmds type xcb:BYTE size nil) + :type xcb:-list) + (glyphcmds :initarg :glyphcmds :type xcb:-ignore))) + +(defclass xcb:render:FillRectangles + (xcb:-request) + ((~opcode :initform 26 :type xcb:-u1) + (op :initarg :op :type xcb:CARD8) + (pad~0 :initform 3 :type xcb:-pad) + (dst :initarg :dst :type xcb:render:PICTURE) + (color :initarg :color :type xcb:render:COLOR) + (rects~ :initform + '(name rects type xcb:RECTANGLE size nil) + :type xcb:-list) + (rects :initarg :rects :type xcb:-ignore))) + +(defclass xcb:render:CreateCursor + (xcb:-request) + ((~opcode :initform 27 :type xcb:-u1) + (cid :initarg :cid :type xcb:CURSOR) + (source :initarg :source :type xcb:render:PICTURE) + (x :initarg :x :type xcb:CARD16) + (y :initarg :y :type xcb:CARD16))) + +(defclass xcb:render:TRANSFORM + (xcb:-struct) + ((matrix11 :initarg :matrix11 :type xcb:render:FIXED) + (matrix12 :initarg :matrix12 :type xcb:render:FIXED) + (matrix13 :initarg :matrix13 :type xcb:render:FIXED) + (matrix21 :initarg :matrix21 :type xcb:render:FIXED) + (matrix22 :initarg :matrix22 :type xcb:render:FIXED) + (matrix23 :initarg :matrix23 :type xcb:render:FIXED) + (matrix31 :initarg :matrix31 :type xcb:render:FIXED) + (matrix32 :initarg :matrix32 :type xcb:render:FIXED) + (matrix33 :initarg :matrix33 :type xcb:render:FIXED))) + +(defclass xcb:render:SetPictureTransform + (xcb:-request) + ((~opcode :initform 28 :type xcb:-u1) + (picture :initarg :picture :type xcb:render:PICTURE) + (transform :initarg :transform :type xcb:render:TRANSFORM))) + +(defclass xcb:render:QueryFilters + (xcb:-request) + ((~opcode :initform 29 :type xcb:-u1) + (drawable :initarg :drawable :type xcb:DRAWABLE))) +(defclass xcb:render:QueryFilters~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (num-aliases :initarg :num-aliases :type xcb:CARD32) + (num-filters :initarg :num-filters :type xcb:CARD32) + (pad~1 :initform 16 :type xcb:-pad) + (aliases~ :initform + '(name aliases type xcb:CARD16 size + (xcb:-fieldref 'num-aliases)) + :type xcb:-list) + (aliases :initarg :aliases :type xcb:-ignore) + (filters~ :initform + '(name filters type xcb:STR size + (xcb:-fieldref 'num-filters)) + :type xcb:-list) + (filters :initarg :filters :type xcb:-ignore))) + +(defclass xcb:render:SetPictureFilter + (xcb:-request) + ((~opcode :initform 30 :type xcb:-u1) + (picture :initarg :picture :type xcb:render:PICTURE) + (filter-len :initarg :filter-len :type xcb:CARD16) + (pad~0 :initform 2 :type xcb:-pad) + (filter~ :initform + '(name filter type xcb:char size + (xcb:-fieldref 'filter-len)) + :type xcb:-list) + (filter :initarg :filter :type xcb:-ignore) + (pad~1 :initform 4 :type xcb:-pad-align) + (values~ :initform + '(name values type xcb:render:FIXED size nil) + :type xcb:-list) + (values :initarg :values :type xcb:-ignore))) + +(defclass xcb:render:ANIMCURSORELT + (xcb:-struct) + ((cursor :initarg :cursor :type xcb:CURSOR) + (delay :initarg :delay :type xcb:CARD32))) + +(defclass xcb:render:CreateAnimCursor + (xcb:-request) + ((~opcode :initform 31 :type xcb:-u1) + (cid :initarg :cid :type xcb:CURSOR) + (cursors~ :initform + '(name cursors type xcb:render:ANIMCURSORELT size nil) + :type xcb:-list) + (cursors :initarg :cursors :type xcb:-ignore))) + +(defclass xcb:render:SPANFIX + (xcb:-struct) + ((l :initarg :l :type xcb:render:FIXED) + (r :initarg :r :type xcb:render:FIXED) + (y :initarg :y :type xcb:render:FIXED))) + +(defclass xcb:render:TRAP + (xcb:-struct) + ((top :initarg :top :type xcb:render:SPANFIX) + (bot :initarg :bot :type xcb:render:SPANFIX))) + +(defclass xcb:render:AddTraps + (xcb:-request) + ((~opcode :initform 32 :type xcb:-u1) + (picture :initarg :picture :type xcb:render:PICTURE) + (x-off :initarg :x-off :type xcb:INT16) + (y-off :initarg :y-off :type xcb:INT16) + (traps~ :initform + '(name traps type xcb:render:TRAP size nil) + :type xcb:-list) + (traps :initarg :traps :type xcb:-ignore))) + +(defclass xcb:render:CreateSolidFill + (xcb:-request) + ((~opcode :initform 33 :type xcb:-u1) + (picture :initarg :picture :type xcb:render:PICTURE) + (color :initarg :color :type xcb:render:COLOR))) + +(defclass xcb:render:CreateLinearGradient + (xcb:-request) + ((~opcode :initform 34 :type xcb:-u1) + (picture :initarg :picture :type xcb:render:PICTURE) + (p1 :initarg :p1 :type xcb:render:POINTFIX) + (p2 :initarg :p2 :type xcb:render:POINTFIX) + (num-stops :initarg :num-stops :type xcb:CARD32) + (stops~ :initform + '(name stops type xcb:render:FIXED size + (xcb:-fieldref 'num-stops)) + :type xcb:-list) + (stops :initarg :stops :type xcb:-ignore) + (colors~ :initform + '(name colors type xcb:render:COLOR size + (xcb:-fieldref 'num-stops)) + :type xcb:-list) + (colors :initarg :colors :type xcb:-ignore))) + +(defclass xcb:render:CreateRadialGradient + (xcb:-request) + ((~opcode :initform 35 :type xcb:-u1) + (picture :initarg :picture :type xcb:render:PICTURE) + (inner :initarg :inner :type xcb:render:POINTFIX) + (outer :initarg :outer :type xcb:render:POINTFIX) + (inner-radius :initarg :inner-radius :type xcb:render:FIXED) + (outer-radius :initarg :outer-radius :type xcb:render:FIXED) + (num-stops :initarg :num-stops :type xcb:CARD32) + (stops~ :initform + '(name stops type xcb:render:FIXED size + (xcb:-fieldref 'num-stops)) + :type xcb:-list) + (stops :initarg :stops :type xcb:-ignore) + (colors~ :initform + '(name colors type xcb:render:COLOR size + (xcb:-fieldref 'num-stops)) + :type xcb:-list) + (colors :initarg :colors :type xcb:-ignore))) + +(defclass xcb:render:CreateConicalGradient + (xcb:-request) + ((~opcode :initform 36 :type xcb:-u1) + (picture :initarg :picture :type xcb:render:PICTURE) + (center :initarg :center :type xcb:render:POINTFIX) + (angle :initarg :angle :type xcb:render:FIXED) + (num-stops :initarg :num-stops :type xcb:CARD32) + (stops~ :initform + '(name stops type xcb:render:FIXED size + (xcb:-fieldref 'num-stops)) + :type xcb:-list) + (stops :initarg :stops :type xcb:-ignore) + (colors~ :initform + '(name colors type xcb:render:COLOR size + (xcb:-fieldref 'num-stops)) + :type xcb:-list) + (colors :initarg :colors :type xcb:-ignore))) + +(defconst xcb:render:error-number-class-alist + '((0 . xcb:render:PictFormat) + (1 . xcb:render:Picture) + (2 . xcb:render:PictOp) + (3 . xcb:render:GlyphSet) + (4 . xcb:render:Glyph)) + "(error-number . error-class) alist.") + + + +(provide 'xcb-render) + +;;; xcb-render.el ends here diff --git a/elpa/xelb-0.18/xcb-renderutil.el b/elpa/xelb-0.18/xcb-renderutil.el new file mode 100644 index 0000000..0e496e2 --- /dev/null +++ b/elpa/xelb-0.18/xcb-renderutil.el @@ -0,0 +1,296 @@ +;;; xcb-renderutil.el --- Utility functions for -*- lexical-binding: t -*- +;;; the Render extension + +;; Copyright (C) 2016-2019 Free Software Foundation, Inc. + +;; Author: Chris Feng + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This library provides utility functions for the Render extension. + +;; Todo +;; + Glyph-related functions are not implemented. + +;; References: +;; + xcb/util-renderutil (git://anongit.freedesktop.org/xcb/util-renderutil) + +;;; Code: + +(require 'xcb) +(require 'xcb-render) + +;; Protocol version. +(defconst xcb:renderutil:-MAJOR_VERSION 0) +(defconst xcb:renderutil:-MINOR_VERSION 11) + +;; PICTFORMINFO masks. +(defconst xcb:renderutil:PICT_FORMAT:ID 1) +(defconst xcb:renderutil:PICT_FORMAT:TYPE 2) +(defconst xcb:renderutil:PICT_FORMAT:DEPTH 4) +(defconst xcb:renderutil:PICT_FORMAT:RED 8) +(defconst xcb:renderutil:PICT_FORMAT:RED_MASK 16) +(defconst xcb:renderutil:PICT_FORMAT:GREEN 32) +(defconst xcb:renderutil:PICT_FORMAT:GREEN_MASK 64) +(defconst xcb:renderutil:PICT_FORMAT:BLUE 128) +(defconst xcb:renderutil:PICT_FORMAT:BLUE_MASK 256) +(defconst xcb:renderutil:PICT_FORMAT:ALPHA 512) +(defconst xcb:renderutil:PICT_FORMAT:ALPHA_MASK 1024) +(defconst xcb:renderutil:PICT_FORMAT:COLORMAP 2048) + +;; Indices of standard PictFormats. +(defconst xcb:renderutil:PICT_STANDARD:ARGB_32 0) +(defconst xcb:renderutil:PICT_STANDARD:RGB_24 1) +(defconst xcb:renderutil:PICT_STANDARD:A_8 2) +(defconst xcb:renderutil:PICT_STANDARD:A_4 3) +(defconst xcb:renderutil:PICT_STANDARD:A_1 4) + +(defconst xcb:renderutil:STANDARD-TEMPLATES + (list + ;; xcb:renderutil:PICT_STANDARD:ARGB_32 + (vector (make-instance 'xcb:render:PICTFORMINFO + :id 0 + :type xcb:render:PictType:Direct + :depth 32 + :direct (make-instance 'xcb:render:DIRECTFORMAT + :red-shift 16 + :red-mask #xFF + :green-shift 8 + :green-mask #xFF + :blue-shift 0 + :blue-mask #xFF + :alpha-shift 24 + :alpha-mask #xFF) + :colormap 0) + (logior xcb:renderutil:PICT_FORMAT:TYPE + xcb:renderutil:PICT_FORMAT:DEPTH + xcb:renderutil:PICT_FORMAT:RED + xcb:renderutil:PICT_FORMAT:RED_MASK + xcb:renderutil:PICT_FORMAT:GREEN + xcb:renderutil:PICT_FORMAT:GREEN_MASK + xcb:renderutil:PICT_FORMAT:BLUE + xcb:renderutil:PICT_FORMAT:BLUE_MASK + xcb:renderutil:PICT_FORMAT:ALPHA + xcb:renderutil:PICT_FORMAT:ALPHA_MASK)) + ;; xcb:renderutil:PICT_STANDARD:RGB_24 + (vector (make-instance 'xcb:render:PICTFORMINFO + :id 0 + :type xcb:render:PictType:Direct + :depth 24 + :direct (make-instance 'xcb:render:DIRECTFORMAT + :red-shift 16 + :red-mask #xFF + :green-shift 8 + :green-mask #xFF + :blue-shift 0 + :blue-mask #xFF + :alpha-shift 0 + :alpha-mask #x00) + :colormap 0) + (logior xcb:renderutil:PICT_FORMAT:TYPE + xcb:renderutil:PICT_FORMAT:DEPTH + xcb:renderutil:PICT_FORMAT:RED + xcb:renderutil:PICT_FORMAT:RED_MASK + xcb:renderutil:PICT_FORMAT:GREEN + xcb:renderutil:PICT_FORMAT:GREEN_MASK + xcb:renderutil:PICT_FORMAT:BLUE + xcb:renderutil:PICT_FORMAT:BLUE_MASK + xcb:renderutil:PICT_FORMAT:ALPHA_MASK)) + ;; xcb:renderutil:PICT_STANDARD:A_8 + (vector (make-instance 'xcb:render:PICTFORMINFO + :id 0 + :type xcb:render:PictType:Direct + :depth 8 + :direct (make-instance 'xcb:render:DIRECTFORMAT + :red-shift 0 + :red-mask #x00 + :green-shift 0 + :green-mask #x00 + :blue-shift 0 + :blue-mask #x00 + :alpha-shift 0 + :alpha-mask #xFF) + :colormap 0) + (logior xcb:renderutil:PICT_FORMAT:TYPE + xcb:renderutil:PICT_FORMAT:DEPTH + xcb:renderutil:PICT_FORMAT:RED_MASK + xcb:renderutil:PICT_FORMAT:GREEN_MASK + xcb:renderutil:PICT_FORMAT:BLUE_MASK + xcb:renderutil:PICT_FORMAT:ALPHA + xcb:renderutil:PICT_FORMAT:ALPHA_MASK)) + ;; xcb:renderutil:PICT_STANDARD:A_4 + (vector (make-instance 'xcb:render:PICTFORMINFO + :id 0 + :type xcb:render:PictType:Direct + :depth 4 + :direct (make-instance 'xcb:render:DIRECTFORMAT + :red-shift 0 + :red-mask #x00 + :green-shift 0 + :green-mask #x00 + :blue-shift 0 + :blue-mask #x00 + :alpha-shift 0 + :alpha-mask #x0F) + :colormap 0) + (logior xcb:renderutil:PICT_FORMAT:TYPE + xcb:renderutil:PICT_FORMAT:DEPTH + xcb:renderutil:PICT_FORMAT:RED_MASK + xcb:renderutil:PICT_FORMAT:GREEN_MASK + xcb:renderutil:PICT_FORMAT:BLUE_MASK + xcb:renderutil:PICT_FORMAT:ALPHA + xcb:renderutil:PICT_FORMAT:ALPHA_MASK)) + ;; xcb:renderutil:PICT_STANDARD:A_1 + (vector (make-instance 'xcb:render:PICTFORMINFO + :id 0 + :type xcb:render:PictType:Direct + :depth 1 + :direct (make-instance 'xcb:render:DIRECTFORMAT + :red-shift 0 + :red-mask #x00 + :green-shift 0 + :green-mask #x00 + :blue-shift 0 + :blue-mask #x00 + :alpha-shift 0 + :alpha-mask #x01) + :colormap 0) + (logior xcb:renderutil:PICT_FORMAT:TYPE + xcb:renderutil:PICT_FORMAT:DEPTH + xcb:renderutil:PICT_FORMAT:RED_MASK + xcb:renderutil:PICT_FORMAT:GREEN_MASK + xcb:renderutil:PICT_FORMAT:BLUE_MASK + xcb:renderutil:PICT_FORMAT:ALPHA + xcb:renderutil:PICT_FORMAT:ALPHA_MASK))) + "Standard PictFormats.") + +(cl-defmethod xcb:renderutil:-get-cache ((obj xcb:connection)) + "Return the cache and initialize the extension when first called." + (let ((result (plist-get (slot-value obj 'extra-plist) 'renderutil)) + required-depths) + (unless (or result + (= 0 (slot-value + (xcb:get-extension-data obj 'xcb:render) + 'present))) + (setq result + (vector (xcb:+request-unchecked+reply obj + (make-instance 'xcb:render:QueryVersion + :client-major-version + xcb:renderutil:-MAJOR_VERSION + :client-minor-version + xcb:renderutil:-MINOR_VERSION)) + (xcb:+request-unchecked+reply obj + (make-instance 'xcb:render:QueryPictFormats)))) + (setq required-depths '(1 4 8 24 32)) + (catch 'break + (dolist (s (slot-value (aref result 1) 'screens)) + (dolist (d (slot-value s 'depths)) + (setq required-depths + (delq (slot-value d 'depth) required-depths)) + (unless required-depths + (throw 'break nil))))) + (if required-depths + (setq result nil) + (setf (slot-value obj 'extra-plist) + (plist-put (slot-value obj 'extra-plist) 'renderutil result)))) + result)) + +(defun xcb:renderutil:find-visual-format (formats visual) + "Search FORMATS for a format matching visual VISUAL." + (catch 'return + (dolist (s (slot-value formats 'screens)) + (dolist (d (slot-value s 'depths)) + (dolist (v (slot-value d 'visuals)) + (when (= (slot-value v 'visual) visual) + (throw 'return (slot-value v 'format)))))))) + +(defun xcb:renderutil:find-format (formats mask template count) + "Search FORMATS for a format matching mask MASK and template TEMPLATE. + +Return COUNT-th match." + (catch 'return + (unless formats + (throw 'return nil)) + (dolist (f (slot-value formats 'formats)) + (when (and (if (/= 0 (logand mask xcb:renderutil:PICT_FORMAT:ID)) + (eq (slot-value template 'id) (slot-value f 'id)) + t) + (if (/= 0 (logand mask xcb:renderutil:PICT_FORMAT:TYPE)) + (eq (slot-value template 'type) (slot-value f 'type)) + t) + (if (/= 0 (logand mask xcb:renderutil:PICT_FORMAT:DEPTH)) + (eq (slot-value template 'depth) (slot-value f 'depth)) + t) + (if (/= 0 (logand mask xcb:renderutil:PICT_FORMAT:RED)) + (eq (slot-value (slot-value template 'direct) 'red-shift) + (slot-value (slot-value f 'direct) 'red-shift)) + t) + (if (/= 0 (logand mask xcb:renderutil:PICT_FORMAT:RED_MASK)) + (eq (slot-value (slot-value template 'direct) 'red-mask) + (slot-value (slot-value f 'direct) 'red-mask)) + t) + (if (/= 0 (logand mask xcb:renderutil:PICT_FORMAT:GREEN)) + (eq (slot-value (slot-value template 'direct) 'red-shift) + (slot-value (slot-value f 'direct) 'red-shift)) + t) + (if (/= 0 (logand mask xcb:renderutil:PICT_FORMAT:GREEN_MASK)) + (eq (slot-value (slot-value template 'direct) 'red-mask) + (slot-value (slot-value f 'direct) 'red-mask)) + t) + (if (/= 0 (logand mask xcb:renderutil:PICT_FORMAT:BLUE)) + (eq (slot-value (slot-value template 'direct) 'red-shift) + (slot-value (slot-value f 'direct) 'red-shift)) + t) + (if (/= 0 (logand mask xcb:renderutil:PICT_FORMAT:BLUE_MASK)) + (eq (slot-value (slot-value template 'direct) 'red-mask) + (slot-value (slot-value f 'direct) 'red-mask)) + t) + (if (/= 0 (logand mask xcb:renderutil:PICT_FORMAT:COLORMAP)) + (eq (slot-value template 'colormap) + (slot-value f 'colormap)) + t)) + (when (= count 0) + (throw 'return (slot-value f 'id)) + (cl-decf count)))))) + +(defun xcb:renderutil:find-standard (formats format) + "Search FORMATS for a standard format matching format ID FORMAT." + (when (and (<= 0 format (1- (length xcb:renderutil:STANDARD-TEMPLATES)))) + (let ((standard-format (elt xcb:renderutil:STANDARD-TEMPLATES format))) + (xcb:renderutil:find-format formats + (aref standard-format 1) + (aref standard-format 0) + 0)))) + +(cl-defmethod xcb:renderutil:query-version ((obj xcb:connection)) + "Return the version of Render extension." + (let ((cache (xcb:renderutil:-get-cache obj))) + (when cache + (aref cache 0)))) + +(cl-defmethod xcb:renderutil:query-formats ((obj xcb:connection)) + "Return supported formats of this X server." + (let ((cache (xcb:renderutil:-get-cache obj))) + (when cache + (aref cache 1)))) + + + +(provide 'xcb-renderutil) + +;;; xcb-renderutil.el ends here diff --git a/elpa/xelb-0.18/xcb-res.el b/elpa/xelb-0.18/xcb-res.el new file mode 100644 index 0000000..0ce66ca --- /dev/null +++ b/elpa/xelb-0.18/xcb-res.el @@ -0,0 +1,195 @@ +;;; xcb-res.el --- X11 Res extension -*- lexical-binding: t -*- + +;; Copyright (C) 2015-2019 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This file was generated by 'el_client.el' from 'res.xml', +;; which you can retrieve from . + +;;; Code: + +(require 'xcb-types) + +(defconst xcb:res:-extension-xname "X-Resource") +(defconst xcb:res:-extension-name "Res") +(defconst xcb:res:-major-version 1) +(defconst xcb:res:-minor-version 2) + +(require 'xcb-xproto) + +(defclass xcb:res:Client + (xcb:-struct) + ((resource-base :initarg :resource-base :type xcb:CARD32) + (resource-mask :initarg :resource-mask :type xcb:CARD32))) + +(defclass xcb:res:Type + (xcb:-struct) + ((resource-type :initarg :resource-type :type xcb:ATOM) + (count :initarg :count :type xcb:CARD32))) + +(defconst xcb:res:ClientIdMask:ClientXID 1) +(defconst xcb:res:ClientIdMask:LocalClientPID 2) + +(defclass xcb:res:ClientIdSpec + (xcb:-struct) + ((client :initarg :client :type xcb:CARD32) + (mask :initarg :mask :type xcb:CARD32))) + +(defclass xcb:res:ClientIdValue + (xcb:-struct) + ((spec :initarg :spec :type xcb:res:ClientIdSpec) + (length :initarg :length :type xcb:CARD32) + (value~ :initform + '(name value type xcb:CARD32 size + (/ + (xcb:-fieldref 'length) + 4)) + :type xcb:-list) + (value :initarg :value :type xcb:-ignore))) + +(defclass xcb:res:ResourceIdSpec + (xcb:-struct) + ((resource :initarg :resource :type xcb:CARD32) + (type :initarg :type :type xcb:CARD32))) + +(defclass xcb:res:ResourceSizeSpec + (xcb:-struct) + ((spec :initarg :spec :type xcb:res:ResourceIdSpec) + (bytes :initarg :bytes :type xcb:CARD32) + (ref-count :initarg :ref-count :type xcb:CARD32) + (use-count :initarg :use-count :type xcb:CARD32))) + +(defclass xcb:res:ResourceSizeValue + (xcb:-struct) + ((size :initarg :size :type xcb:res:ResourceSizeSpec) + (num-cross-references :initarg :num-cross-references :type xcb:CARD32) + (cross-references~ :initform + '(name cross-references type xcb:res:ResourceSizeSpec size + (xcb:-fieldref 'num-cross-references)) + :type xcb:-list) + (cross-references :initarg :cross-references :type xcb:-ignore))) + +(defclass xcb:res:QueryVersion + (xcb:-request) + ((~opcode :initform 0 :type xcb:-u1) + (client-major :initarg :client-major :type xcb:CARD8) + (client-minor :initarg :client-minor :type xcb:CARD8))) +(defclass xcb:res:QueryVersion~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (server-major :initarg :server-major :type xcb:CARD16) + (server-minor :initarg :server-minor :type xcb:CARD16))) + +(defclass xcb:res:QueryClients + (xcb:-request) + ((~opcode :initform 1 :type xcb:-u1))) +(defclass xcb:res:QueryClients~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (num-clients :initarg :num-clients :type xcb:CARD32) + (pad~1 :initform 20 :type xcb:-pad) + (clients~ :initform + '(name clients type xcb:res:Client size + (xcb:-fieldref 'num-clients)) + :type xcb:-list) + (clients :initarg :clients :type xcb:-ignore))) + +(defclass xcb:res:QueryClientResources + (xcb:-request) + ((~opcode :initform 2 :type xcb:-u1) + (xid :initarg :xid :type xcb:CARD32))) +(defclass xcb:res:QueryClientResources~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (num-types :initarg :num-types :type xcb:CARD32) + (pad~1 :initform 20 :type xcb:-pad) + (types~ :initform + '(name types type xcb:res:Type size + (xcb:-fieldref 'num-types)) + :type xcb:-list) + (types :initarg :types :type xcb:-ignore))) + +(defclass xcb:res:QueryClientPixmapBytes + (xcb:-request) + ((~opcode :initform 3 :type xcb:-u1) + (xid :initarg :xid :type xcb:CARD32))) +(defclass xcb:res:QueryClientPixmapBytes~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (bytes :initarg :bytes :type xcb:CARD32) + (bytes-overflow :initarg :bytes-overflow :type xcb:CARD32))) + +(defclass xcb:res:QueryClientIds + (xcb:-request) + ((~opcode :initform 4 :type xcb:-u1) + (num-specs :initarg :num-specs :type xcb:CARD32) + (specs~ :initform + '(name specs type xcb:res:ClientIdSpec size + (xcb:-fieldref 'num-specs)) + :type xcb:-list) + (specs :initarg :specs :type xcb:-ignore))) +(defclass xcb:res:QueryClientIds~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (num-ids :initarg :num-ids :type xcb:CARD32) + (pad~1 :initform 20 :type xcb:-pad) + (ids~ :initform + '(name ids type xcb:res:ClientIdValue size + (xcb:-fieldref 'num-ids)) + :type xcb:-list) + (ids :initarg :ids :type xcb:-ignore))) + +(defclass xcb:res:QueryResourceBytes + (xcb:-request) + ((~opcode :initform 5 :type xcb:-u1) + (client :initarg :client :type xcb:CARD32) + (num-specs :initarg :num-specs :type xcb:CARD32) + (specs~ :initform + '(name specs type xcb:res:ResourceIdSpec size + (xcb:-fieldref 'num-specs)) + :type xcb:-list) + (specs :initarg :specs :type xcb:-ignore))) +(defclass xcb:res:QueryResourceBytes~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (num-sizes :initarg :num-sizes :type xcb:CARD32) + (pad~1 :initform 20 :type xcb:-pad) + (sizes~ :initform + '(name sizes type xcb:res:ResourceSizeValue size + (xcb:-fieldref 'num-sizes)) + :type xcb:-list) + (sizes :initarg :sizes :type xcb:-ignore))) + + + +(provide 'xcb-res) + +;;; xcb-res.el ends here diff --git a/elpa/xelb-0.18/xcb-screensaver.el b/elpa/xelb-0.18/xcb-screensaver.el new file mode 100644 index 0000000..9e7e7b2 --- /dev/null +++ b/elpa/xelb-0.18/xcb-screensaver.el @@ -0,0 +1,164 @@ +;;; xcb-screensaver.el --- X11 ScreenSaver extension -*- lexical-binding: t -*- + +;; Copyright (C) 2015-2019 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This file was generated by 'el_client.el' from 'screensaver.xml', +;; which you can retrieve from . + +;;; Code: + +(require 'xcb-types) + +(defconst xcb:screensaver:-extension-xname "MIT-SCREEN-SAVER") +(defconst xcb:screensaver:-extension-name "ScreenSaver") +(defconst xcb:screensaver:-major-version 1) +(defconst xcb:screensaver:-minor-version 1) + +(require 'xcb-xproto) + +(defconst xcb:screensaver:Kind:Blanked 0) +(defconst xcb:screensaver:Kind:Internal 1) +(defconst xcb:screensaver:Kind:External 2) + +(defconst xcb:screensaver:Event:NotifyMask 1) +(defconst xcb:screensaver:Event:CycleMask 2) + +(defconst xcb:screensaver:State:Off 0) +(defconst xcb:screensaver:State:On 1) +(defconst xcb:screensaver:State:Cycle 2) +(defconst xcb:screensaver:State:Disabled 3) + +(defclass xcb:screensaver:QueryVersion + (xcb:-request) + ((~opcode :initform 0 :type xcb:-u1) + (client-major-version :initarg :client-major-version :type xcb:CARD8) + (client-minor-version :initarg :client-minor-version :type xcb:CARD8) + (pad~0 :initform 2 :type xcb:-pad))) +(defclass xcb:screensaver:QueryVersion~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (server-major-version :initarg :server-major-version :type xcb:CARD16) + (server-minor-version :initarg :server-minor-version :type xcb:CARD16) + (pad~1 :initform 20 :type xcb:-pad))) + +(defclass xcb:screensaver:QueryInfo + (xcb:-request) + ((~opcode :initform 1 :type xcb:-u1) + (drawable :initarg :drawable :type xcb:DRAWABLE))) +(defclass xcb:screensaver:QueryInfo~reply + (xcb:-reply) + ((state :initarg :state :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (saver-window :initarg :saver-window :type xcb:WINDOW) + (ms-until-server :initarg :ms-until-server :type xcb:CARD32) + (ms-since-user-input :initarg :ms-since-user-input :type xcb:CARD32) + (event-mask :initarg :event-mask :type xcb:CARD32) + (kind :initarg :kind :type xcb:BYTE) + (pad~0 :initform 7 :type xcb:-pad))) + +(defclass xcb:screensaver:SelectInput + (xcb:-request) + ((~opcode :initform 2 :type xcb:-u1) + (drawable :initarg :drawable :type xcb:DRAWABLE) + (event-mask :initarg :event-mask :type xcb:CARD32))) + +(defclass xcb:screensaver:SetAttributes + (xcb:-request) + ((~opcode :initform 3 :type xcb:-u1) + (drawable :initarg :drawable :type xcb:DRAWABLE) + (x :initarg :x :type xcb:INT16) + (y :initarg :y :type xcb:INT16) + (width :initarg :width :type xcb:CARD16) + (height :initarg :height :type xcb:CARD16) + (border-width :initarg :border-width :type xcb:CARD16) + (class :initarg :class :type xcb:BYTE) + (depth :initarg :depth :type xcb:CARD8) + (visual :initarg :visual :type xcb:VISUALID) + (value-mask :initarg :value-mask :type xcb:CARD32) + (value-list :initform + '(expression + (xcb:-fieldref 'value-mask) + cases + ((1 background-pixmap) + (2 background-pixel) + (4 border-pixmap) + (8 border-pixel) + (16 bit-gravity) + (32 win-gravity) + (64 backing-store) + (128 backing-planes) + (256 backing-pixel) + (512 override-redirect) + (1024 save-under) + (2048 event-mask) + (4096 do-not-propogate-mask) + (8192 colormap) + (16384 cursor))) + :type xcb:-switch) + (background-pixmap :initarg :background-pixmap :type xcb:PIXMAP) + (background-pixel :initarg :background-pixel :type xcb:CARD32) + (border-pixmap :initarg :border-pixmap :type xcb:PIXMAP) + (border-pixel :initarg :border-pixel :type xcb:CARD32) + (bit-gravity :initarg :bit-gravity :type xcb:CARD32) + (win-gravity :initarg :win-gravity :type xcb:CARD32) + (backing-store :initarg :backing-store :type xcb:CARD32) + (backing-planes :initarg :backing-planes :type xcb:CARD32) + (backing-pixel :initarg :backing-pixel :type xcb:CARD32) + (override-redirect :initarg :override-redirect :type xcb:BOOL32) + (save-under :initarg :save-under :type xcb:BOOL32) + (event-mask :initarg :event-mask :type xcb:CARD32) + (do-not-propogate-mask :initarg :do-not-propogate-mask :type xcb:CARD32) + (colormap :initarg :colormap :type xcb:COLORMAP) + (cursor :initarg :cursor :type xcb:CURSOR))) + +(defclass xcb:screensaver:UnsetAttributes + (xcb:-request) + ((~opcode :initform 4 :type xcb:-u1) + (drawable :initarg :drawable :type xcb:DRAWABLE))) + +(defclass xcb:screensaver:Suspend + (xcb:-request) + ((~opcode :initform 5 :type xcb:-u1) + (suspend :initarg :suspend :type xcb:CARD32))) + +(defclass xcb:screensaver:Notify + (xcb:-event) + ((~code :initform 0) + (state :initarg :state :type xcb:BYTE) + (~sequence :type xcb:CARD16) + (time :initarg :time :type xcb:TIMESTAMP) + (root :initarg :root :type xcb:WINDOW) + (window :initarg :window :type xcb:WINDOW) + (kind :initarg :kind :type xcb:BYTE) + (forced :initarg :forced :type xcb:BOOL) + (pad~0 :initform 14 :type xcb:-pad))) + +(defconst xcb:screensaver:event-number-class-alist + '((0 . xcb:screensaver:Notify)) + "(event-number . event-class) alist.") + + + +(provide 'xcb-screensaver) + +;;; xcb-screensaver.el ends here diff --git a/elpa/xelb-0.18/xcb-shape.el b/elpa/xelb-0.18/xcb-shape.el new file mode 100644 index 0000000..e45eba8 --- /dev/null +++ b/elpa/xelb-0.18/xcb-shape.el @@ -0,0 +1,187 @@ +;;; xcb-shape.el --- X11 Shape extension -*- lexical-binding: t -*- + +;; Copyright (C) 2015-2019 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This file was generated by 'el_client.el' from 'shape.xml', +;; which you can retrieve from . + +;;; Code: + +(require 'xcb-types) + +(defconst xcb:shape:-extension-xname "SHAPE") +(defconst xcb:shape:-extension-name "Shape") +(defconst xcb:shape:-major-version 1) +(defconst xcb:shape:-minor-version 1) + +(require 'xcb-xproto) + +(xcb:deftypealias 'xcb:shape:OP 'xcb:CARD8) + +(xcb:deftypealias 'xcb:shape:KIND 'xcb:CARD8) + +(defconst xcb:shape:SO:Set 0) +(defconst xcb:shape:SO:Union 1) +(defconst xcb:shape:SO:Intersect 2) +(defconst xcb:shape:SO:Subtract 3) +(defconst xcb:shape:SO:Invert 4) + +(defconst xcb:shape:SK:Bounding 0) +(defconst xcb:shape:SK:Clip 1) +(defconst xcb:shape:SK:Input 2) + +(defclass xcb:shape:Notify + (xcb:-event) + ((~code :initform 0) + (shape-kind :initarg :shape-kind :type xcb:shape:KIND) + (~sequence :type xcb:CARD16) + (affected-window :initarg :affected-window :type xcb:WINDOW) + (extents-x :initarg :extents-x :type xcb:INT16) + (extents-y :initarg :extents-y :type xcb:INT16) + (extents-width :initarg :extents-width :type xcb:CARD16) + (extents-height :initarg :extents-height :type xcb:CARD16) + (server-time :initarg :server-time :type xcb:TIMESTAMP) + (shaped :initarg :shaped :type xcb:BOOL) + (pad~0 :initform 11 :type xcb:-pad))) + +(defclass xcb:shape:QueryVersion + (xcb:-request) + ((~opcode :initform 0 :type xcb:-u1))) +(defclass xcb:shape:QueryVersion~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (major-version :initarg :major-version :type xcb:CARD16) + (minor-version :initarg :minor-version :type xcb:CARD16))) + +(defclass xcb:shape:Rectangles + (xcb:-request) + ((~opcode :initform 1 :type xcb:-u1) + (operation :initarg :operation :type xcb:shape:OP) + (destination-kind :initarg :destination-kind :type xcb:shape:KIND) + (ordering :initarg :ordering :type xcb:BYTE) + (pad~0 :initform 1 :type xcb:-pad) + (destination-window :initarg :destination-window :type xcb:WINDOW) + (x-offset :initarg :x-offset :type xcb:INT16) + (y-offset :initarg :y-offset :type xcb:INT16) + (rectangles~ :initform + '(name rectangles type xcb:RECTANGLE size nil) + :type xcb:-list) + (rectangles :initarg :rectangles :type xcb:-ignore))) + +(defclass xcb:shape:Mask + (xcb:-request) + ((~opcode :initform 2 :type xcb:-u1) + (operation :initarg :operation :type xcb:shape:OP) + (destination-kind :initarg :destination-kind :type xcb:shape:KIND) + (pad~0 :initform 2 :type xcb:-pad) + (destination-window :initarg :destination-window :type xcb:WINDOW) + (x-offset :initarg :x-offset :type xcb:INT16) + (y-offset :initarg :y-offset :type xcb:INT16) + (source-bitmap :initarg :source-bitmap :type xcb:PIXMAP))) + +(defclass xcb:shape:Combine + (xcb:-request) + ((~opcode :initform 3 :type xcb:-u1) + (operation :initarg :operation :type xcb:shape:OP) + (destination-kind :initarg :destination-kind :type xcb:shape:KIND) + (source-kind :initarg :source-kind :type xcb:shape:KIND) + (pad~0 :initform 1 :type xcb:-pad) + (destination-window :initarg :destination-window :type xcb:WINDOW) + (x-offset :initarg :x-offset :type xcb:INT16) + (y-offset :initarg :y-offset :type xcb:INT16) + (source-window :initarg :source-window :type xcb:WINDOW))) + +(defclass xcb:shape:Offset + (xcb:-request) + ((~opcode :initform 4 :type xcb:-u1) + (destination-kind :initarg :destination-kind :type xcb:shape:KIND) + (pad~0 :initform 3 :type xcb:-pad) + (destination-window :initarg :destination-window :type xcb:WINDOW) + (x-offset :initarg :x-offset :type xcb:INT16) + (y-offset :initarg :y-offset :type xcb:INT16))) + +(defclass xcb:shape:QueryExtents + (xcb:-request) + ((~opcode :initform 5 :type xcb:-u1) + (destination-window :initarg :destination-window :type xcb:WINDOW))) +(defclass xcb:shape:QueryExtents~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (bounding-shaped :initarg :bounding-shaped :type xcb:BOOL) + (clip-shaped :initarg :clip-shaped :type xcb:BOOL) + (pad~1 :initform 2 :type xcb:-pad) + (bounding-shape-extents-x :initarg :bounding-shape-extents-x :type xcb:INT16) + (bounding-shape-extents-y :initarg :bounding-shape-extents-y :type xcb:INT16) + (bounding-shape-extents-width :initarg :bounding-shape-extents-width :type xcb:CARD16) + (bounding-shape-extents-height :initarg :bounding-shape-extents-height :type xcb:CARD16) + (clip-shape-extents-x :initarg :clip-shape-extents-x :type xcb:INT16) + (clip-shape-extents-y :initarg :clip-shape-extents-y :type xcb:INT16) + (clip-shape-extents-width :initarg :clip-shape-extents-width :type xcb:CARD16) + (clip-shape-extents-height :initarg :clip-shape-extents-height :type xcb:CARD16))) + +(defclass xcb:shape:SelectInput + (xcb:-request) + ((~opcode :initform 6 :type xcb:-u1) + (destination-window :initarg :destination-window :type xcb:WINDOW) + (enable :initarg :enable :type xcb:BOOL) + (pad~0 :initform 3 :type xcb:-pad))) + +(defclass xcb:shape:InputSelected + (xcb:-request) + ((~opcode :initform 7 :type xcb:-u1) + (destination-window :initarg :destination-window :type xcb:WINDOW))) +(defclass xcb:shape:InputSelected~reply + (xcb:-reply) + ((enabled :initarg :enabled :type xcb:BOOL) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32))) + +(defclass xcb:shape:GetRectangles + (xcb:-request) + ((~opcode :initform 8 :type xcb:-u1) + (window :initarg :window :type xcb:WINDOW) + (source-kind :initarg :source-kind :type xcb:shape:KIND) + (pad~0 :initform 3 :type xcb:-pad))) +(defclass xcb:shape:GetRectangles~reply + (xcb:-reply) + ((ordering :initarg :ordering :type xcb:BYTE) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (rectangles-len :initarg :rectangles-len :type xcb:CARD32) + (pad~0 :initform 20 :type xcb:-pad) + (rectangles~ :initform + '(name rectangles type xcb:RECTANGLE size + (xcb:-fieldref 'rectangles-len)) + :type xcb:-list) + (rectangles :initarg :rectangles :type xcb:-ignore))) + +(defconst xcb:shape:event-number-class-alist + '((0 . xcb:shape:Notify)) + "(event-number . event-class) alist.") + + + +(provide 'xcb-shape) + +;;; xcb-shape.el ends here diff --git a/elpa/xelb-0.18/xcb-shm.el b/elpa/xelb-0.18/xcb-shm.el new file mode 100644 index 0000000..1cea9e6 --- /dev/null +++ b/elpa/xelb-0.18/xcb-shm.el @@ -0,0 +1,170 @@ +;;; xcb-shm.el --- X11 Shm extension -*- lexical-binding: t -*- + +;; Copyright (C) 2015-2019 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This file was generated by 'el_client.el' from 'shm.xml', +;; which you can retrieve from . + +;;; Code: + +(require 'xcb-types) + +(defconst xcb:shm:-extension-xname "MIT-SHM") +(defconst xcb:shm:-extension-name "Shm") +(defconst xcb:shm:-major-version 1) +(defconst xcb:shm:-minor-version 2) + +(require 'xcb-xproto) + +(xcb:deftypealias 'xcb:shm:SEG 'xcb:-u4) + +(defclass xcb:shm:Completion + (xcb:-event) + ((~code :initform 0) + (pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (drawable :initarg :drawable :type xcb:DRAWABLE) + (minor-event :initarg :minor-event :type xcb:CARD16) + (major-event :initarg :major-event :type xcb:BYTE) + (pad~1 :initform 1 :type xcb:-pad) + (shmseg :initarg :shmseg :type xcb:shm:SEG) + (offset :initarg :offset :type xcb:CARD32))) + +(defclass xcb:shm:BadSeg + (xcb:-error xcb:Value) + ((~code :initform 0))) + +(defclass xcb:shm:QueryVersion + (xcb:-request) + ((~opcode :initform 0 :type xcb:-u1))) +(defclass xcb:shm:QueryVersion~reply + (xcb:-reply) + ((shared-pixmaps :initarg :shared-pixmaps :type xcb:BOOL) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (major-version :initarg :major-version :type xcb:CARD16) + (minor-version :initarg :minor-version :type xcb:CARD16) + (uid :initarg :uid :type xcb:CARD16) + (gid :initarg :gid :type xcb:CARD16) + (pixmap-format :initarg :pixmap-format :type xcb:CARD8) + (pad~0 :initform 15 :type xcb:-pad))) + +(defclass xcb:shm:Attach + (xcb:-request) + ((~opcode :initform 1 :type xcb:-u1) + (shmseg :initarg :shmseg :type xcb:shm:SEG) + (shmid :initarg :shmid :type xcb:CARD32) + (read-only :initarg :read-only :type xcb:BOOL) + (pad~0 :initform 3 :type xcb:-pad))) + +(defclass xcb:shm:Detach + (xcb:-request) + ((~opcode :initform 2 :type xcb:-u1) + (shmseg :initarg :shmseg :type xcb:shm:SEG))) + +(defclass xcb:shm:PutImage + (xcb:-request) + ((~opcode :initform 3 :type xcb:-u1) + (drawable :initarg :drawable :type xcb:DRAWABLE) + (gc :initarg :gc :type xcb:GCONTEXT) + (total-width :initarg :total-width :type xcb:CARD16) + (total-height :initarg :total-height :type xcb:CARD16) + (src-x :initarg :src-x :type xcb:CARD16) + (src-y :initarg :src-y :type xcb:CARD16) + (src-width :initarg :src-width :type xcb:CARD16) + (src-height :initarg :src-height :type xcb:CARD16) + (dst-x :initarg :dst-x :type xcb:INT16) + (dst-y :initarg :dst-y :type xcb:INT16) + (depth :initarg :depth :type xcb:CARD8) + (format :initarg :format :type xcb:CARD8) + (send-event :initarg :send-event :type xcb:BOOL) + (pad~0 :initform 1 :type xcb:-pad) + (shmseg :initarg :shmseg :type xcb:shm:SEG) + (offset :initarg :offset :type xcb:CARD32))) + +(defclass xcb:shm:GetImage + (xcb:-request) + ((~opcode :initform 4 :type xcb:-u1) + (drawable :initarg :drawable :type xcb:DRAWABLE) + (x :initarg :x :type xcb:INT16) + (y :initarg :y :type xcb:INT16) + (width :initarg :width :type xcb:CARD16) + (height :initarg :height :type xcb:CARD16) + (plane-mask :initarg :plane-mask :type xcb:CARD32) + (format :initarg :format :type xcb:CARD8) + (pad~0 :initform 3 :type xcb:-pad) + (shmseg :initarg :shmseg :type xcb:shm:SEG) + (offset :initarg :offset :type xcb:CARD32))) +(defclass xcb:shm:GetImage~reply + (xcb:-reply) + ((depth :initarg :depth :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (visual :initarg :visual :type xcb:VISUALID) + (size :initarg :size :type xcb:CARD32))) + +(defclass xcb:shm:CreatePixmap + (xcb:-request) + ((~opcode :initform 5 :type xcb:-u1) + (pid :initarg :pid :type xcb:PIXMAP) + (drawable :initarg :drawable :type xcb:DRAWABLE) + (width :initarg :width :type xcb:CARD16) + (height :initarg :height :type xcb:CARD16) + (depth :initarg :depth :type xcb:CARD8) + (pad~0 :initform 3 :type xcb:-pad) + (shmseg :initarg :shmseg :type xcb:shm:SEG) + (offset :initarg :offset :type xcb:CARD32))) + +(defclass xcb:shm:AttachFd + (xcb:-request) + ((~opcode :initform 6 :type xcb:-u1) + (shmseg :initarg :shmseg :type xcb:shm:SEG) + (shm-fd :type xcb:fd) + (read-only :initarg :read-only :type xcb:BOOL) + (pad~0 :initform 3 :type xcb:-pad))) + +(defclass xcb:shm:CreateSegment + (xcb:-request) + ((~opcode :initform 7 :type xcb:-u1) + (shmseg :initarg :shmseg :type xcb:shm:SEG) + (size :initarg :size :type xcb:CARD32) + (read-only :initarg :read-only :type xcb:BOOL) + (pad~0 :initform 3 :type xcb:-pad))) +(defclass xcb:shm:CreateSegment~reply + (xcb:-reply) + ((nfd :initarg :nfd :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (shm-fd :type xcb:fd) + (pad~0 :initform 24 :type xcb:-pad))) + +(defconst xcb:shm:error-number-class-alist + '((0 . xcb:shm:BadSeg)) + "(error-number . error-class) alist.") + +(defconst xcb:shm:event-number-class-alist + '((0 . xcb:shm:Completion)) + "(event-number . event-class) alist.") + + + +(provide 'xcb-shm) + +;;; xcb-shm.el ends here diff --git a/elpa/xelb-0.18/xcb-sync.el b/elpa/xelb-0.18/xcb-sync.el new file mode 100644 index 0000000..d37e02c --- /dev/null +++ b/elpa/xelb-0.18/xcb-sync.el @@ -0,0 +1,340 @@ +;;; xcb-sync.el --- X11 Sync extension -*- lexical-binding: t -*- + +;; Copyright (C) 2015-2019 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This file was generated by 'el_client.el' from 'sync.xml', +;; which you can retrieve from . + +;;; Code: + +(require 'xcb-types) + +(defconst xcb:sync:-extension-xname "SYNC") +(defconst xcb:sync:-extension-name "Sync") +(defconst xcb:sync:-major-version 3) +(defconst xcb:sync:-minor-version 1) + +(require 'xcb-xproto) + +(xcb:deftypealias 'xcb:sync:ALARM 'xcb:-u4) + +(defconst xcb:sync:ALARMSTATE:Active 0) +(defconst xcb:sync:ALARMSTATE:Inactive 1) +(defconst xcb:sync:ALARMSTATE:Destroyed 2) + +(xcb:deftypealias 'xcb:sync:COUNTER 'xcb:-u4) + +(xcb:deftypealias 'xcb:sync:FENCE 'xcb:-u4) + +(defconst xcb:sync:TESTTYPE:PositiveTransition 0) +(defconst xcb:sync:TESTTYPE:NegativeTransition 1) +(defconst xcb:sync:TESTTYPE:PositiveComparison 2) +(defconst xcb:sync:TESTTYPE:NegativeComparison 3) + +(defconst xcb:sync:VALUETYPE:Absolute 0) +(defconst xcb:sync:VALUETYPE:Relative 1) + +(defconst xcb:sync:CA:Counter 1) +(defconst xcb:sync:CA:ValueType 2) +(defconst xcb:sync:CA:Value 4) +(defconst xcb:sync:CA:TestType 8) +(defconst xcb:sync:CA:Delta 16) +(defconst xcb:sync:CA:Events 32) + +(defclass xcb:sync:INT64 + (xcb:-struct) + ((hi :initarg :hi :type xcb:INT32) + (lo :initarg :lo :type xcb:CARD32))) + +(defclass xcb:sync:SYSTEMCOUNTER + (xcb:-struct) + ((counter :initarg :counter :type xcb:sync:COUNTER) + (resolution :initarg :resolution :type xcb:sync:INT64) + (name-len :initarg :name-len :type xcb:CARD16) + (name~ :initform + '(name name type xcb:char size + (xcb:-fieldref 'name-len)) + :type xcb:-list) + (name :initarg :name :type xcb:-ignore) + (pad~0 :initform 4 :type xcb:-pad-align))) + +(defclass xcb:sync:TRIGGER + (xcb:-struct) + ((counter :initarg :counter :type xcb:sync:COUNTER) + (wait-type :initarg :wait-type :type xcb:CARD32) + (wait-value :initarg :wait-value :type xcb:sync:INT64) + (test-type :initarg :test-type :type xcb:CARD32))) + +(defclass xcb:sync:WAITCONDITION + (xcb:-struct) + ((trigger :initarg :trigger :type xcb:sync:TRIGGER) + (event-threshold :initarg :event-threshold :type xcb:sync:INT64))) + +(defclass xcb:sync:Counter + (xcb:-error) + ((~code :initform 0) + (bad-counter :initarg :bad-counter :type xcb:CARD32) + (minor-opcode :initarg :minor-opcode :type xcb:CARD16) + (major-opcode :initarg :major-opcode :type xcb:CARD8))) + +(defclass xcb:sync:Alarm + (xcb:-error) + ((~code :initform 1) + (bad-alarm :initarg :bad-alarm :type xcb:CARD32) + (minor-opcode :initarg :minor-opcode :type xcb:CARD16) + (major-opcode :initarg :major-opcode :type xcb:CARD8))) + +(defclass xcb:sync:Initialize + (xcb:-request) + ((~opcode :initform 0 :type xcb:-u1) + (desired-major-version :initarg :desired-major-version :type xcb:CARD8) + (desired-minor-version :initarg :desired-minor-version :type xcb:CARD8))) +(defclass xcb:sync:Initialize~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (major-version :initarg :major-version :type xcb:CARD8) + (minor-version :initarg :minor-version :type xcb:CARD8) + (pad~1 :initform 22 :type xcb:-pad))) + +(defclass xcb:sync:ListSystemCounters + (xcb:-request) + ((~opcode :initform 1 :type xcb:-u1))) +(defclass xcb:sync:ListSystemCounters~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (counters-len :initarg :counters-len :type xcb:CARD32) + (pad~1 :initform 20 :type xcb:-pad) + (counters~ :initform + '(name counters type xcb:sync:SYSTEMCOUNTER size + (xcb:-fieldref 'counters-len)) + :type xcb:-list) + (counters :initarg :counters :type xcb:-ignore))) + +(defclass xcb:sync:CreateCounter + (xcb:-request) + ((~opcode :initform 2 :type xcb:-u1) + (id :initarg :id :type xcb:sync:COUNTER) + (initial-value :initarg :initial-value :type xcb:sync:INT64))) + +(defclass xcb:sync:DestroyCounter + (xcb:-request) + ((~opcode :initform 6 :type xcb:-u1) + (counter :initarg :counter :type xcb:sync:COUNTER))) + +(defclass xcb:sync:QueryCounter + (xcb:-request) + ((~opcode :initform 5 :type xcb:-u1) + (counter :initarg :counter :type xcb:sync:COUNTER))) +(defclass xcb:sync:QueryCounter~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (counter-value :initarg :counter-value :type xcb:sync:INT64))) + +(defclass xcb:sync:Await + (xcb:-request) + ((~opcode :initform 7 :type xcb:-u1) + (wait-list~ :initform + '(name wait-list type xcb:sync:WAITCONDITION size nil) + :type xcb:-list) + (wait-list :initarg :wait-list :type xcb:-ignore))) + +(defclass xcb:sync:ChangeCounter + (xcb:-request) + ((~opcode :initform 4 :type xcb:-u1) + (counter :initarg :counter :type xcb:sync:COUNTER) + (amount :initarg :amount :type xcb:sync:INT64))) + +(defclass xcb:sync:SetCounter + (xcb:-request) + ((~opcode :initform 3 :type xcb:-u1) + (counter :initarg :counter :type xcb:sync:COUNTER) + (value :initarg :value :type xcb:sync:INT64))) + +(defclass xcb:sync:CreateAlarm + (xcb:-request) + ((~opcode :initform 8 :type xcb:-u1) + (id :initarg :id :type xcb:sync:ALARM) + (value-mask :initarg :value-mask :type xcb:CARD32) + (value-list :initform + '(expression + (xcb:-fieldref 'value-mask) + cases + ((1 counter) + (2 valueType) + (4 value) + (8 testType) + (16 delta) + (32 events))) + :type xcb:-switch) + (counter :initarg :counter :type xcb:sync:COUNTER) + (valueType :initarg :valueType :type xcb:CARD32) + (value :initarg :value :type xcb:sync:INT64) + (testType :initarg :testType :type xcb:CARD32) + (delta :initarg :delta :type xcb:sync:INT64) + (events :initarg :events :type xcb:CARD32))) + +(defclass xcb:sync:ChangeAlarm + (xcb:-request) + ((~opcode :initform 9 :type xcb:-u1) + (id :initarg :id :type xcb:sync:ALARM) + (value-mask :initarg :value-mask :type xcb:CARD32) + (value-list :initform + '(expression + (xcb:-fieldref 'value-mask) + cases + ((1 counter) + (2 valueType) + (4 value) + (8 testType) + (16 delta) + (32 events))) + :type xcb:-switch) + (counter :initarg :counter :type xcb:sync:COUNTER) + (valueType :initarg :valueType :type xcb:CARD32) + (value :initarg :value :type xcb:sync:INT64) + (testType :initarg :testType :type xcb:CARD32) + (delta :initarg :delta :type xcb:sync:INT64) + (events :initarg :events :type xcb:CARD32))) + +(defclass xcb:sync:DestroyAlarm + (xcb:-request) + ((~opcode :initform 11 :type xcb:-u1) + (alarm :initarg :alarm :type xcb:sync:ALARM))) + +(defclass xcb:sync:QueryAlarm + (xcb:-request) + ((~opcode :initform 10 :type xcb:-u1) + (alarm :initarg :alarm :type xcb:sync:ALARM))) +(defclass xcb:sync:QueryAlarm~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (trigger :initarg :trigger :type xcb:sync:TRIGGER) + (delta :initarg :delta :type xcb:sync:INT64) + (events :initarg :events :type xcb:BOOL) + (state :initarg :state :type xcb:CARD8) + (pad~1 :initform 2 :type xcb:-pad))) + +(defclass xcb:sync:SetPriority + (xcb:-request) + ((~opcode :initform 12 :type xcb:-u1) + (id :initarg :id :type xcb:CARD32) + (priority :initarg :priority :type xcb:INT32))) + +(defclass xcb:sync:GetPriority + (xcb:-request) + ((~opcode :initform 13 :type xcb:-u1) + (id :initarg :id :type xcb:CARD32))) +(defclass xcb:sync:GetPriority~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (priority :initarg :priority :type xcb:INT32))) + +(defclass xcb:sync:CreateFence + (xcb:-request) + ((~opcode :initform 14 :type xcb:-u1) + (drawable :initarg :drawable :type xcb:DRAWABLE) + (fence :initarg :fence :type xcb:sync:FENCE) + (initially-triggered :initarg :initially-triggered :type xcb:BOOL))) + +(defclass xcb:sync:TriggerFence + (xcb:-request) + ((~opcode :initform 15 :type xcb:-u1) + (fence :initarg :fence :type xcb:sync:FENCE))) + +(defclass xcb:sync:ResetFence + (xcb:-request) + ((~opcode :initform 16 :type xcb:-u1) + (fence :initarg :fence :type xcb:sync:FENCE))) + +(defclass xcb:sync:DestroyFence + (xcb:-request) + ((~opcode :initform 17 :type xcb:-u1) + (fence :initarg :fence :type xcb:sync:FENCE))) + +(defclass xcb:sync:QueryFence + (xcb:-request) + ((~opcode :initform 18 :type xcb:-u1) + (fence :initarg :fence :type xcb:sync:FENCE))) +(defclass xcb:sync:QueryFence~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (triggered :initarg :triggered :type xcb:BOOL) + (pad~1 :initform 23 :type xcb:-pad))) + +(defclass xcb:sync:AwaitFence + (xcb:-request) + ((~opcode :initform 19 :type xcb:-u1) + (fence-list~ :initform + '(name fence-list type xcb:sync:FENCE size nil) + :type xcb:-list) + (fence-list :initarg :fence-list :type xcb:-ignore))) + +(defclass xcb:sync:CounterNotify + (xcb:-event) + ((~code :initform 0) + (kind :initarg :kind :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (counter :initarg :counter :type xcb:sync:COUNTER) + (wait-value :initarg :wait-value :type xcb:sync:INT64) + (counter-value :initarg :counter-value :type xcb:sync:INT64) + (timestamp :initarg :timestamp :type xcb:TIMESTAMP) + (count :initarg :count :type xcb:CARD16) + (destroyed :initarg :destroyed :type xcb:BOOL) + (pad~0 :initform 1 :type xcb:-pad))) + +(defclass xcb:sync:AlarmNotify + (xcb:-event) + ((~code :initform 1) + (kind :initarg :kind :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (alarm :initarg :alarm :type xcb:sync:ALARM) + (counter-value :initarg :counter-value :type xcb:sync:INT64) + (alarm-value :initarg :alarm-value :type xcb:sync:INT64) + (timestamp :initarg :timestamp :type xcb:TIMESTAMP) + (state :initarg :state :type xcb:CARD8) + (pad~0 :initform 3 :type xcb:-pad))) + +(defconst xcb:sync:error-number-class-alist + '((0 . xcb:sync:Counter) + (1 . xcb:sync:Alarm)) + "(error-number . error-class) alist.") + +(defconst xcb:sync:event-number-class-alist + '((0 . xcb:sync:CounterNotify) + (1 . xcb:sync:AlarmNotify)) + "(event-number . event-class) alist.") + + + +(provide 'xcb-sync) + +;;; xcb-sync.el ends here diff --git a/elpa/xelb-0.18/xcb-systemtray.el b/elpa/xelb-0.18/xcb-systemtray.el new file mode 100644 index 0000000..e8e63bd --- /dev/null +++ b/elpa/xelb-0.18/xcb-systemtray.el @@ -0,0 +1,142 @@ +;;; xcb-systemtray.el --- System tray protocol -*- lexical-binding: t -*- + +;; Copyright (C) 2016-2019 Free Software Foundation, Inc. + +;; Author: Chris Feng + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This library implements the system tray protocol. + +;; Usage tips: +;; + Do not forget to call `xcb:systemtray:init' for _every_ connection using +;; this library. +;; + Use `xcb:systemtray:SendEvent' instead of `xcb:SendEvent' to send opcode +;; messages defined in this library. +;; + Initializing this library auto loads and initializes 'xcb-ewmh'. + +;; References: +;; + System Tray Protocol (https://specifications.freedesktop.org/ +;; systemtray-spec/systemtray-spec-0.3.html) + +;;; Code: + +(require 'xcb-ewmh) + +;; System tray atoms. +(eval-and-compile + (defconst xcb:systemtray:-atoms ;_NET_SYSTEM_TRAY_Sn are left out. + '(_NET_SYSTEM_TRAY_OPCODE + _NET_SYSTEM_TRAY_ORIENTATION + _NET_SYSTEM_TRAY_VISUAL + _NET_SYSTEM_TRAY_MESSAGE_DATA) + "Atoms involved in the system tray protocol.") + + (dolist (atom xcb:systemtray:-atoms) + (eval `(defvar ,(intern (concat "xcb:Atom:" (symbol-name atom))) nil)))) + +;; Opcodes. +(defconst xcb:systemtray:opcode:REQUEST-DOCK 0) +(defconst xcb:systemtray:opcode:BEGIN-MESSAGE 1) +(defconst xcb:systemtray:opcode:CANCEL-MESSAGE 2) + +(cl-defmethod xcb:systemtray:init ((obj xcb:connection) &optional force) + "Initialize the system tray module. + +This method must be called before using any other method in this module." + (when (or force (not xcb:Atom:_NET_SYSTEM_TRAY_OPCODE)) + (xcb:ewmh:init obj) ;required. + (let ((atoms xcb:systemtray:-atoms)) + (dotimes (i (x-display-screens)) + (push (intern (format "_NET_SYSTEM_TRAY_S%d" i)) atoms)) + (xcb:icccm:intern-atoms obj atoms force)))) + +(defclass xcb:systemtray:SendEvent (xcb:SendEvent) + ((propagate :initform 0) + (event-mask :initform xcb:EventMask:NoEvent)) + :documentation "Send system tray opcode message.") + +(defclass xcb:systemtray:-ClientMessage + (xcb:icccm:--ClientMessage xcb:ClientMessage) + ((format :initform 32) + (type :initform xcb:Atom:_NET_SYSTEM_TRAY_OPCODE) + (time :initarg :time :type xcb:TIMESTAMP) ;new slot + (opcode :initarg :opcode :type xcb:CARD32)) ;new slot + :documentation "An system tray opcode message.") + +(defclass xcb:systemtray:REQUEST-DOCK (xcb:systemtray:-ClientMessage) + ((opcode :initform xcb:systemtray:opcode:REQUEST-DOCK) + (id :initarg :id :type xcb:CARD32) + (pad~0 :initform 8 :type xcb:-pad)) + :documentation "Dock a tray icon.") + +(defclass xcb:systemtray:BEGIN-MESSAGE (xcb:systemtray:-ClientMessage) + ((opcode :initform xcb:systemtray:opcode:BEGIN-MESSAGE) + (timeout :initarg :timeout :type xcb:TIMESTAMP) + (length :initarg :length :type xcb:CARD32) + (id :initarg :id :type xcb:CARD32)) + :documentation "Begin balloon message.") + +(defclass xcb:systemtray:MESSAGE-DATA + (xcb:icccm:--ClientMessage xcb:ClientMessage) + ((format :initform 8) + (type :initform xcb:Atom:_NET_SYSTEM_TRAY_MESSAGE_DATA) + (data~ :initform '(name data type xcb:CARD8 size 20) :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:systemtray:CANCEL-MESSAGE (xcb:systemtray:-ClientMessage) + ((opcode :initform xcb:systemtray:opcode:CANCEL-MESSAGE) + (id :initarg :id :type xcb:CARD32) + (pad~0 :initform 8 :type xcb:-pad)) + :documentation "Cancel balloon message.") + +;; Value of _NET_SYSTEM_TRAY_ORIENTATION. +(defconst xcb:systemtray:ORIENTATION:HORZ 0) +(defconst xcb:systemtray:ORIENTATION:VERT 1) + +(defclass xcb:xembed:get-_NET_SYSTEM_TRAY_ORIENTATION + (xcb:icccm:-GetProperty-single) + ((property :initform xcb:Atom:_NET_SYSTEM_TRAY_ORIENTATION) + (type :initform xcb:Atom:CARDINAL))) +(defclass xcb:xembed:get-_NET_SYSTEM_TRAY_ORIENTATION~reply + (xcb:icccm:-GetProperty-single~reply) + nil) +(defclass xcb:xembed:set-_NET_SYSTEM_TRAY_ORIENTATION + (xcb:icccm:-ChangeProperty-single) + ((property :initform xcb:Atom:_NET_SYSTEM_TRAY_ORIENTATION) + (type :initform xcb:Atom:CARDINAL) + (format :initform 32))) + +(defclass xcb:xembed:get-_NET_SYSTEM_TRAY_VISUAL + (xcb:icccm:-GetProperty-single) + ((property :initform xcb:Atom:_NET_SYSTEM_TRAY_VISUAL) + (type :initform xcb:Atom:VISUALID))) +(defclass xcb:xembed:get-_NET_SYSTEM_TRAY_VISUAL~reply + (xcb:icccm:-GetProperty-single~reply) + nil) +(defclass xcb:xembed:set-_NET_SYSTEM_TRAY_VISUAL + (xcb:icccm:-ChangeProperty-single) + ((property :initform xcb:Atom:_NET_SYSTEM_TRAY_VISUAL) + (type :initform xcb:Atom:VISUALID) + (format :initform 32))) + + + +(provide 'xcb-systemtray) + +;;; xcb-systemtray.el ends here diff --git a/elpa/xelb-0.18/xcb-types.el b/elpa/xelb-0.18/xcb-types.el new file mode 100644 index 0000000..c9f60f1 --- /dev/null +++ b/elpa/xelb-0.18/xcb-types.el @@ -0,0 +1,851 @@ +;;; xcb-types.el --- Type definitions for XCB -*- lexical-binding: t -*- + +;; Copyright (C) 2015-2019 Free Software Foundation, Inc. + +;; Author: Chris Feng + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This library defines various data types frequently used in XELB. Simple +;; types are defined with `cl-deftype' while others are defined as classes. +;; Basically, data types are used for converting objects to/from byte arrays +;; rather than for validation purpose. Classes defined elsewhere should also +;; support `xcb:marshal' and `xcb:unmarshal' methods in order to be considered +;; a type. Most classes defined here are direct or indirect subclasses of +;; `xcb:-struct', which has implemented the fundamental marshalling and +;; unmarshalling methods. These classes again act as the superclasses for more +;; concrete ones. You may use `eieio-browse' to easily get an overview of the +;; inheritance hierarchies of all classes defined. + +;; Please pay special attention to the byte order adopted in your application. +;; The global variable `xcb:lsb' specifies the byte order at the time of +;; instantiating a class (e.g. via `make-instance'). You may let-bind it to +;; temporarily change the byte order locally. + +;; Todo: +;; + The current implementation of `eieio-default-eval-maybe' only `eval's a +;; certain type of forms. If this is changed in the future, we will have to +;; adapt our codes accordingly. +;; + for `xcb:-marshal-field'? + +;; References: +;; + X protocol (http://www.x.org/releases/X11R7.7/doc/xproto/x11protocol.txt) + +;;; Code: + +(eval-when-compile (require 'cl-lib)) +(require 'cl-generic) +(require 'eieio) +(require 'xcb-debug) + +(define-minor-mode xcb:debug + "Debug-logging enabled if non-nil" + :global t) + +(defmacro xcb:-log (&optional format-string &rest objects) + "Emit a message prepending the name of the function being executed. + +FORMAT-STRING is a string specifying the message to output, as in +`format'. The OBJECTS arguments specify the substitutions." + (unless format-string (setq format-string "")) + `(when xcb:debug + (xcb-debug:message ,(concat "%s%s:\t" format-string "\n") + (if xcb-debug:log-time-function + (funcall xcb-debug:log-time-function) + "") + (xcb-debug:compile-time-function-name) + ,@objects) + nil)) + +;;;; Fix backward compatibility issues with Emacs 24 + +(eval-and-compile + (when (< emacs-major-version 25) + ;; Copied from Emacs 25 with documentation and comments stripped. + ;; The version of `with-slots' in Emacs 24 is buggy and inefficient. + (defmacro with-slots (spec-list object &rest body) + (declare (indent 2) (debug (sexp sexp def-body))) + (require 'cl-lib) + (macroexp-let2 nil object object + `(cl-symbol-macrolet + ,(mapcar (lambda (entry) + (let ((var (if (listp entry) (car entry) entry)) + (slot (if (listp entry) (cadr entry) entry))) + (list var `(slot-value ,object ',slot)))) + spec-list) + ,@body))))) + +;; Backport some functions to Emacs 24 + +(eval-and-compile + (unless (fboundp 'eieio-class-slots) + (defun eieio-class-slots (class) + (let* ((tmp (get class 'eieio-class-definition)) + (names (aref tmp 5)) + (initforms (aref tmp 6)) + (types (aref tmp 8)) + result) + (dotimes (i (length names)) + (setq result (nconc result (list (vector (elt names i) + (elt initforms i) + (elt types i)))))) + result)))) + +(eval-and-compile + (unless (fboundp 'eieio-slot-descriptor-name) + (defsubst eieio-slot-descriptor-name (slot) (aref slot 0)))) + +(eval-and-compile + (unless (fboundp 'cl--slot-descriptor-initform) + (defsubst cl--slot-descriptor-initform (slot) (aref slot 1)))) + +(eval-when-compile + (unless (fboundp 'cl--slot-descriptor-type) + (defsubst cl--slot-descriptor-type (slot) (aref slot 2)))) + +;;;; Utility functions + +(defsubst xcb:-pack-u1 (value) + "1 byte unsigned integer => byte array." + (vector value)) + +(defsubst xcb:-pack-i1 (value) + "1 byte signed integer => byte array." + (xcb:-pack-u1 (if (>= value 0) value + (1+ (logand #xFF (lognot (- value))))))) + +(defsubst xcb:-pack-u2 (value) + "2 bytes unsigned integer => byte array (MSB first)." + (vector (logand (lsh value -8) #xFF) (logand value #xFF))) + +(defsubst xcb:-pack-u2-lsb (value) + "2 bytes unsigned integer => byte array (LSB first)." + (vector (logand value #xFF) (logand (lsh value -8) #xFF))) + +(defsubst xcb:-pack-i2 (value) + "2 bytes signed integer => byte array (MSB first)." + (xcb:-pack-u2 (if (>= value 0) value + (1+ (logand #xFFFF (lognot (- value))))))) + +(defsubst xcb:-pack-i2-lsb (value) + "2 bytes signed integer => byte array (LSB first)." + (xcb:-pack-u2-lsb (if (>= value 0) value + (1+ (logand #xFFFF (lognot (- value))))))) + +;; Due to loss of significance of floating-point numbers, `xcb:-pack-u8' and +;; `xcb:-pack-u8-lsb' may return approximate results. +(eval-and-compile + (if (/= 0 (lsh 1 32)) + ;; 64 bit + (progn + (defsubst xcb:-pack-u4 (value) + "4 bytes unsigned integer => byte array (MSB first, 64-bit)." + (vector (logand (lsh value -24) #xFF) (logand (lsh value -16) #xFF) + (logand (lsh value -8) #xFF) (logand value #xFF))) + (defsubst xcb:-pack-u4-lsb (value) + "4 byte unsigned integer => byte array (LSB first, 64-bit)." + (vector (logand value #xFF) + (logand (lsh value -8) #xFF) + (logand (lsh value -16) #xFF) + (logand (lsh value -24) #xFF))) + (defsubst xcb:-pack-u8 (value) + "8 bytes unsigned integer => byte array (MSB first)." + (if (integerp value) + (vector (logand (lsh value -56) #xFF) + (logand (lsh value -48) #xFF) + (logand (lsh value -40) #xFF) + (logand (lsh value -32) #xFF) + (logand (lsh value -24) #xFF) + (logand (lsh value -16) #xFF) + (logand (lsh value -8) #xFF) + (logand value #xFF)) + (let* ((msdw (min 4294967295. (truncate value 4294967296.))) + (lsdw (min 4294967295. + (truncate (- value (* msdw 4294967296.0)))))) + (vector (logand (lsh msdw -24) #xFF) (logand (lsh msdw -16) #xFF) + (logand (lsh msdw -8) #xFF) (logand msdw #xFF) + (logand (lsh lsdw -24) #xFF) (logand (lsh lsdw -16) #xFF) + (logand (lsh lsdw -8) #xFF) (logand lsdw #xFF))))) + (defsubst xcb:-pack-u8-lsb (value) + "8 bytes unsigned integer => byte array (LSB first)." + (if (integerp value) + (vector (logand value #xFF) + (logand (lsh value -8) #xFF) + (logand (lsh value -16) #xFF) + (logand (lsh value -24) #xFF) + (logand (lsh value -32) #xFF) + (logand (lsh value -40) #xFF) + (logand (lsh value -48) #xFF) + (logand (lsh value -56) #xFF)) + (let* ((msdw (min 4294967295. (truncate value 4294967296.))) + (lsdw (min 4294967295. + (truncate (- value (* msdw 4294967296.0)))))) + (vector (logand lsdw #xFF) (logand (lsh lsdw -8) #xFF) + (logand (lsh lsdw -16) #xFF) (logand (lsh lsdw -24) #xFF) + (logand msdw #xFF) + (logand (lsh msdw -8) #xFF) + (logand (lsh msdw -16) #xFF) + (logand (lsh msdw -24) #xFF)))))) + ;; 32 bit (30-bit actually; large numbers are represented as float type) + (defsubst xcb:-pack-u4 (value) + "4 bytes unsigned integer => byte array (MSB first, 32-bit)." + (if (integerp value) + (vector (logand (lsh value -24) #xFF) (logand (lsh value -16) #xFF) + (logand (lsh value -8) #xFF) (logand value #xFF)) + (let* ((msw (truncate value #x10000)) + (lsw (truncate (- value (* msw 65536.0))))) + (vector (logand (lsh msw -8) #xFF) (logand msw #xFF) + (logand (lsh lsw -8) #xFF) (logand lsw #xFF))))) + (defsubst xcb:-pack-u4-lsb (value) + "4 bytes unsigned integer => byte array (LSB first, 32-bit)." + (if (integerp value) + (vector (logand value #xFF) (logand (lsh value -8) #xFF) + (logand (lsh value -16) #xFF) (logand (lsh value -24) #xFF)) + (let* ((msw (truncate value #x10000)) + (lsw (truncate (- value (* msw 65536.0))))) + (vector (logand lsw #xFF) (logand (lsh lsw -8) #xFF) + (logand msw #xFF) (logand (lsh msw -8) #xFF))))) + (defsubst xcb:-pack-u8 (value) + "8 bytes unsigned integer => byte array (MSB first, 32-bit)." + (if (integerp value) + (vector 0 0 0 0 + (logand (lsh value -24) #xFF) (logand (lsh value -16) #xFF) + (logand (lsh value -8) #xFF) (logand value #xFF)) + (let* ((msw (min #xFFFF (truncate value 281474976710656.))) + (w1 (min #xFFFF + (truncate (setq value + (- value (* msw 281474976710656.0))) + 4294967296.))) + (w2 (min #xFFFF + (truncate (setq value (- value (* w1 4294967296.0))) + #x10000))) + (lsw (min #xFFFF (truncate (- value (* w2 65536.0)))))) + (vector (logand (lsh msw -8) #xFF) (logand msw #xFF) + (logand (lsh w1 -8) #xFF) (logand w1 #xFF) + (logand (lsh w2 -8) #xFF) (logand w2 #xFF) + (logand (lsh lsw -8) #xFF) (logand lsw #xFF))))) + (defsubst xcb:-pack-u8-lsb (value) + "8 bytes unsigned integer => byte array (LSB first, 32-bit)." + (if (integerp value) + (vector (logand value #xFF) (logand (lsh value -8) #xFF) + (logand (lsh value -16) #xFF) (logand (lsh value -24) #xFF) + 0 0 0 0) + (let* ((msw (min #xFFFF (truncate value 281474976710656.))) + (w1 (min #xFFFF + (truncate (setq value + (- value (* msw 281474976710656.0))) + 4294967296.))) + (w2 (min #xFFFF + (truncate (setq value (- value (* w1 4294967296.0))) + #x10000))) + (lsw (min #xFFFF (truncate (- value (* w2 65536.0)))))) + (vector (logand lsw #xFF) (logand (lsh lsw -8) #xFF) + (logand w2 #xFF) (logand (lsh w2 -8) #xFF) + (logand w1 #xFF) (logand (lsh w1 -8) #xFF) + (logand msw #xFF) (logand (lsh msw -8) #xFF))))))) + +(defsubst xcb:-pack-i4 (value) + "4 bytes signed integer => byte array (MSB first)." + (xcb:-pack-u4 (if (>= value 0) + value + (+ value 4294967296.)))) ;treated as float for 32-bit + +(defsubst xcb:-pack-i4-lsb (value) + "4 bytes signed integer => byte array (LSB first)." + (xcb:-pack-u4-lsb (if (>= value 0) + value + (+ value 4294967296.)))) ;treated as float for 32-bit + +(defsubst xcb:-unpack-u1 (data offset) + "Byte array => 1 byte unsigned integer." + (aref data offset)) + +(defsubst xcb:-unpack-i1 (data offset) + "Byte array => 1 byte signed integer." + (let ((value (xcb:-unpack-u1 data offset))) + (if (= 0 (logand #x80 value)) + value + (- (logand #xFF (lognot (1- value))))))) + +(defsubst xcb:-unpack-u2 (data offset) + "Byte array => 2 bytes unsigned integer (MSB first)." + (logior (lsh (aref data offset) 8) (aref data (1+ offset)))) + +(defsubst xcb:-unpack-u2-lsb (data offset) + "Byte array => 2 bytes unsigned integer (LSB first)." + (logior (aref data offset) (lsh (aref data (1+ offset)) 8))) + +(defsubst xcb:-unpack-i2 (data offset) + "Byte array => 2 bytes signed integer (MSB first)." + (let ((value (xcb:-unpack-u2 data offset))) + (if (= 0 (logand #x8000 value)) + value + (- (logand #xFFFF (lognot (1- value))))))) + +(defsubst xcb:-unpack-i2-lsb (data offset) + "Byte array => 2 bytes signed integer (LSB first)." + (let ((value (xcb:-unpack-u2-lsb data offset))) + (if (= 0 (logand #x8000 value)) + value + (- (logand #xFFFF (lognot (1- value))))))) + +;; Due to loss of significance of floating-point numbers, `xcb:-unpack-u8' and +;; `xcb:-unpack-u8-lsb' may return approximate results. +(eval-and-compile + (if (/= 0 (lsh 1 32)) + ;; 64-bit + (progn + (defsubst xcb:-unpack-u4 (data offset) + "Byte array => 4 bytes unsigned integer (MSB first, 64-bit)." + (logior (lsh (aref data offset) 24) (lsh (aref data (1+ offset)) 16) + (lsh (aref data (+ offset 2)) 8) (aref data (+ offset 3)))) + (defsubst xcb:-unpack-u4-lsb (data offset) + "Byte array => 4 bytes unsigned integer (LSB first, 64-bit)." + (logior (aref data offset) (lsh (aref data (1+ offset)) 8) + (lsh (aref data (+ offset 2)) 16) + (lsh (aref data (+ offset 3)) 24))) + (defsubst xcb:-unpack-u8 (data offset) + "Byte array => 8 bytes unsigned integer (MSB first)." + (let ((msb (aref data offset))) + (+ (if (> msb 31) (* msb 72057594037927936.0) (lsh msb 56)) + (logior (lsh (aref data (1+ offset)) 48) + (lsh (aref data (+ offset 2)) 40) + (lsh (aref data (+ offset 3)) 32) + (lsh (aref data (+ offset 4)) 24) + (lsh (aref data (+ offset 5)) 16) + (lsh (aref data (+ offset 6)) 8) + (aref data (+ offset 7)))))) + (defsubst xcb:-unpack-u8-lsb (data offset) + "Byte array => 8 bytes unsigned integer (LSB first)." + (let ((msb (aref data (+ offset 7)))) + (+ (if (> msb 31) (* msb 72057594037927936.0) (lsh msb 56)) + (logior (lsh (aref data (+ offset 6)) 48) + (lsh (aref data (+ offset 5)) 40) + (lsh (aref data (+ offset 4)) 32) + (lsh (aref data (+ offset 3)) 24) + (lsh (aref data (+ offset 2)) 16) + (lsh (aref data (1+ offset)) 8) + (aref data offset)))))) + ;; 32-bit (30-bit actually; large numbers are represented as float type) + (defsubst xcb:-unpack-u4 (data offset) + "Byte array => 4 bytes unsigned integer (MSB first, 32-bit)." + (let ((msb (aref data offset))) + (+ (if (> msb 31) (* msb 16777216.0) (lsh msb 24)) + (logior (lsh (aref data (1+ offset)) 16) + (lsh (aref data (+ offset 2)) 8) + (aref data (+ offset 3)))))) + (defsubst xcb:-unpack-u4-lsb (data offset) + "Byte array => 4 bytes unsigned integer (LSB first, 32-bit)." + (let ((msb (aref data (+ offset 3)))) + (+ (if (> msb 31) (* msb 16777216.0) (lsh msb 24)) + (logior (aref data offset) + (lsh (aref data (1+ offset)) 8) + (lsh (aref data (+ offset 2)) 16))))) + (defsubst xcb:-unpack-u8 (data offset) + "Byte array => 8 bytes unsigned integer (MSB first, 32-bit)." + (+ (* (aref data offset) 72057594037927936.0) + (* (aref data (1+ offset)) 281474976710656.0) + (* (aref data (+ offset 2)) 1099511627776.0) + (* (aref data (+ offset 3)) 4294967296.0) + (* (aref data (+ offset 4)) 16777216.0) + (logior (lsh (aref data (+ offset 5)) 16) + (lsh (aref data (+ offset 6)) 8) + (aref data (+ offset 7))))) + (defsubst xcb:-unpack-u8-lsb (data offset) + "Byte array => 8 bytes unsigned integer (LSB first, 32-bit)." + (+ (* (aref data (+ offset 7)) 72057594037927936.0) + (* (aref data (+ offset 6)) 281474976710656.0) + (* (aref data (+ offset 5)) 1099511627776.0) + (* (aref data (+ offset 4)) 4294967296.0) + (* (aref data (+ offset 3)) 16777216.0) + (logior (lsh (aref data (+ offset 2)) 16) + (lsh (aref data (1+ offset)) 8) + (aref data offset)))))) + +(defsubst xcb:-unpack-i4 (data offset) + "Byte array => 4 bytes signed integer (MSB first)." + (let ((value (xcb:-unpack-u4 data offset))) + (if (< value 2147483648.) ;treated as float for 32-bit + value + (- value 4294967296.)))) ;treated as float for 32-bit + +(defsubst xcb:-unpack-i4-lsb (data offset) + "Byte array => 4 bytes signed integer (LSB first)." + (let ((value (xcb:-unpack-u4-lsb data offset))) + (if (< value 2147483648.) ;treated as float for 32-bit + value + (- value 4294967296.)))) ;treated as float for 32-bit + +(defmacro xcb:-fieldref (field) + "Evaluate a field." + `(slot-value obj ,field)) + +(defmacro xcb:-paramref (field) + "Evaluate a field." + `(slot-value ctx ,field)) + +(defsubst xcb:-popcount (mask) + "Return the popcount of integer MASK." + (apply #'+ (mapcar (lambda (i) + (logand (lsh mask i) 1)) + ;; 32-bit number assumed (CARD32) + (eval-when-compile (number-sequence -31 0))))) + +(defsubst xcb:-request-class->reply-class (request) + "Return the reply class corresponding to the request class REQUEST." + (intern-soft (concat (symbol-name request) "~reply"))) + +;;;; Basic types + +;; typedef in C +(defmacro xcb:deftypealias (new-type old-type) + "Define NEW-TYPE as an alias of type OLD-TYPE. + +Also the fundamental type is stored in 'the xcb--typealias' variable +property (for internal use only)." + `(progn + ;; FIXME: `new-type' should probably just not be eval'd at all, + ;; but that requires changing all callers not to quote their arg. + (cl-deftype ,(eval new-type t) nil ,old-type) + (put ,new-type 'xcb--typealias + (or (get ,old-type 'xcb--typealias) ,old-type)))) + +;; 1/2/4 B signed/unsigned integer +(cl-deftype xcb:-i1 () t) +(cl-deftype xcb:-i2 () t) +(cl-deftype xcb:-i4 () t) +(cl-deftype xcb:-u1 () t) +(cl-deftype xcb:-u2 () t) +(cl-deftype xcb:-u4 () t) +;; 8 B unsigned integer +(cl-deftype xcb:-u8 () t) +;; +(cl-deftype xcb:-pad () t) +;; with align attribute +(cl-deftype xcb:-pad-align () t) +;; +(xcb:deftypealias 'xcb:fd 'xcb:-i4) +;; +(cl-deftype xcb:-list () t) +;; +(cl-deftype xcb:-switch () t) +;; This type of data is not involved in marshalling/unmarshalling +(cl-deftype xcb:-ignore () t) +;; C types and types missing in XCB +(cl-deftype xcb:void () t) +(xcb:deftypealias 'xcb:char 'xcb:-u1) +(xcb:deftypealias 'xcb:BYTE 'xcb:-u1) +(xcb:deftypealias 'xcb:INT8 'xcb:-i1) +(xcb:deftypealias 'xcb:INT16 'xcb:-i2) +(xcb:deftypealias 'xcb:INT32 'xcb:-i4) +(xcb:deftypealias 'xcb:CARD8 'xcb:-u1) +(xcb:deftypealias 'xcb:CARD16 'xcb:-u2) +(xcb:deftypealias 'xcb:CARD32 'xcb:-u4) +(xcb:deftypealias 'xcb:CARD64 'xcb:-u8) +(xcb:deftypealias 'xcb:BOOL 'xcb:-u1) + +;;;; Struct type + +(eval-and-compile + (defvar xcb:lsb t + "Non-nil for LSB first (i.e., little-endian), nil otherwise. + +Consider let-bind it rather than change its global value.")) + +(defclass xcb:--struct () + nil) + +(cl-defmethod slot-unbound ((object xcb:--struct) class slot-name fn) + (unless (eq fn #'oref-default) + (xcb:-log "unbound-slot: %s" (list (eieio-class-name class) + (eieio-object-name object) + slot-name fn)))) + +(defclass xcb:-struct (xcb:--struct) + ((~lsb :initarg :~lsb + :initform (symbol-value 'xcb:lsb) ;see `eieio-default-eval-maybe' + :type xcb:-ignore)) + :documentation "Struct type.") + +(cl-defmethod xcb:marshal ((obj xcb:-struct)) + "Return the byte-array representation of struct OBJ." + (let ((slots (eieio-class-slots (eieio-object-class obj))) + result name type value) + (catch 'break + (dolist (slot slots) + (setq type (cl--slot-descriptor-type slot)) + (unless (eq type 'xcb:-ignore) + (setq name (eieio-slot-descriptor-name slot)) + (setq value (slot-value obj name)) + (when (symbolp value) ;see `eieio-default-eval-maybe' + (setq value (symbol-value value))) + (setq result + (vconcat result (xcb:-marshal-field obj type value + (length result)))) + (when (eq type 'xcb:-switch) ;xcb:-switch always finishes a struct + (throw 'break 'nil))))) + result)) + +(cl-defmethod xcb:-marshal-field ((obj xcb:-struct) type value &optional pos) + "Return the byte-array representation of a field in struct OBJ of type TYPE +and value VALUE. + +The optional POS argument indicates current byte index of the field (used by +`xcb:-pad-align' type)." + (pcase (or (get type 'xcb--typealias) type) + (`xcb:-u1 (xcb:-pack-u1 value)) + (`xcb:-i1 (xcb:-pack-i1 value)) + (`xcb:-u2 + (if (slot-value obj '~lsb) (xcb:-pack-u2-lsb value) (xcb:-pack-u2 value))) + (`xcb:-i2 + (if (slot-value obj '~lsb) (xcb:-pack-i2-lsb value) (xcb:-pack-i2 value))) + (`xcb:-u4 + (if (slot-value obj '~lsb) (xcb:-pack-u4-lsb value) (xcb:-pack-u4 value))) + (`xcb:-i4 + (if (slot-value obj '~lsb) (xcb:-pack-i4-lsb value) (xcb:-pack-i4 value))) + (`xcb:-u8 + (if (slot-value obj '~lsb) (xcb:-pack-u8-lsb value) (xcb:-pack-u8 value))) + (`xcb:void (vector value)) + (`xcb:-pad + (unless (integerp value) + (setq value (eval value `((obj . ,obj))))) + (make-vector value 0)) + (`xcb:-pad-align + ;; The length slot in xcb:-request is left out + (let ((len (if (object-of-class-p obj 'xcb:-request) (+ pos 2) pos))) + (when (vectorp value) + ;; Alignment with offset. + (setq len (- len (aref value 1)) + value (aref value 0))) + (unless (integerp value) + (setq value (eval value `((obj . ,obj))))) + (make-vector (% (- value (% len value)) value) 0))) + (`xcb:-list + (let* ((list-name (plist-get value 'name)) + (list-type (plist-get value 'type)) + (list-size (plist-get value 'size)) + (data (slot-value obj list-name))) + (unless (integerp list-size) + (setq list-size (eval list-size `((obj . ,obj)))) + (unless list-size + (setq list-size (length data)))) ;list-size can be nil + (cl-assert (= list-size (length data))) + (mapconcat (lambda (i) (xcb:-marshal-field obj list-type i)) data []))) + (`xcb:-switch + (let ((slots (eieio-class-slots (eieio-object-class obj))) + (expression (plist-get value 'expression)) + (cases (plist-get value 'cases)) + result condition name-list flag slot-type) + (unless (integerp expression) + (setq expression (eval expression `((obj . ,obj))))) + (cl-assert (integerp expression)) + (dolist (i cases) + (setq condition (car i)) + (setq name-list (cdr i)) + (setq flag nil) + (cl-assert (or (integerp condition) (listp condition))) + (if (integerp condition) + (setq flag (/= 0 (logand expression condition))) + (if (eq 'logior (car condition)) + (setq flag (/= 0 (logand expression + (apply #'logior (cdr condition))))) + (setq flag (memq expression condition)))) + (when flag + (dolist (name name-list) + (catch 'break + (dolist (slot slots) ;better way to find the slot type? + (when (eq name (eieio-slot-descriptor-name slot)) + (setq slot-type (cl--slot-descriptor-type slot)) + (throw 'break nil)))) + (unless (eq slot-type 'xcb:-ignore) + (setq result + (vconcat result + (xcb:-marshal-field obj slot-type + (slot-value obj name) + (+ pos + (length result))))))))) + result)) + ((guard (child-of-class-p type 'xcb:-struct)) + (xcb:marshal value)) + (x (error "[XCB] Unsupported type for marshalling: %s" x)))) + +(cl-defmethod xcb:unmarshal ((obj xcb:-struct) byte-array &optional ctx + total-length) + "Fill in fields of struct OBJ according to its byte-array representation. + +The optional argument CTX is for ." + (unless total-length + (setq total-length (length byte-array))) + (let ((slots (eieio-class-slots (eieio-object-class obj))) + (result 0) + slot-name tmp type) + (catch 'break + (dolist (slot slots) + (setq type (cl--slot-descriptor-type slot)) + (unless (eq type 'xcb:-ignore) + (setq slot-name (eieio-slot-descriptor-name slot) + tmp (xcb:-unmarshal-field obj type byte-array 0 + (eieio-oref-default obj slot-name) + ctx total-length)) + (setf (slot-value obj slot-name) (car tmp)) + (setq byte-array (substring byte-array (cadr tmp))) + (setq result (+ result (cadr tmp))) + (when (eq type 'xcb:-switch) ;xcb:-switch always finishes a struct + (throw 'break 'nil))))) + result)) + +(cl-defmethod xcb:-unmarshal-field ((obj xcb:-struct) type data offset + initform &optional ctx total-length) + "Return the value of a field in struct OBJ of type TYPE, byte-array +representation DATA, and default value INITFORM. + +The optional argument CTX is for . + +This method returns a list of two components, with the first being the result +and the second the consumed length." + (pcase (or (get type 'xcb--typealias) type) + (`xcb:-u1 (list (aref data offset) 1)) + (`xcb:-i1 (let ((result (aref data offset))) + (list (if (< result 128) result (- result 255)) 1))) + (`xcb:-u2 (list (if (slot-value obj '~lsb) + (xcb:-unpack-u2-lsb data offset) + (xcb:-unpack-u2 data offset)) + 2)) + (`xcb:-i2 (list (if (slot-value obj '~lsb) + (xcb:-unpack-i2-lsb data offset) + (xcb:-unpack-i2 data offset)) + 2)) + (`xcb:-u4 (list (if (slot-value obj '~lsb) + (xcb:-unpack-u4-lsb data offset) + (xcb:-unpack-u4 data offset)) + 4)) + (`xcb:-i4 (list (if (slot-value obj '~lsb) + (xcb:-unpack-i4-lsb data offset) + (xcb:-unpack-i4 data offset)) + 4)) + (`xcb:-u8 (list (if (slot-value obj '~lsb) + (xcb:-unpack-u8-lsb data offset) + (xcb:-unpack-u8 data offset)) + 8)) + (`xcb:void (list (aref data offset) 1)) + (`xcb:-pad + (unless (integerp initform) + (when (eq 'quote (car initform)) + (setq initform (cadr initform))) + (setq initform (eval initform `((obj . ,obj) (ctx . ,ctx))))) + (list initform initform)) + (`xcb:-pad-align + (let ((len (- total-length (- (length data) offset)))) + (if (vectorp initform) + ;; Alignment with offset. + (setq len (- len (aref initform 1)) + initform (aref initform 0)) + (unless (integerp initform) + (when (eq 'quote (car initform)) + (setq initform (cadr initform))) + (setq initform (eval initform `((obj . ,obj) (ctx . ,ctx)))))) + (list initform (% (- initform (% len initform)) initform)))) + (`xcb:-list + (when (eq 'quote (car initform)) ;unquote the form + (setq initform (cadr initform))) + (let ((list-name (plist-get initform 'name)) + (list-type (plist-get initform 'type)) + (list-size (plist-get initform 'size))) + (unless (integerp list-size) + (setq list-size (eval list-size `((obj . ,obj) (ctx . ,ctx))))) + (cl-assert (integerp list-size)) + (pcase list-type + (`xcb:char ;as Latin-1 encoded string + (setf (slot-value obj list-name) + (decode-coding-string + (apply #'unibyte-string + (append (substring data offset + (+ offset list-size)) + nil)) + 'iso-latin-1))) + (`xcb:void ;for further unmarshalling + (setf (slot-value obj list-name) + (substring data offset (+ offset list-size)))) + (x + (let ((count 0) + result tmp) + (dotimes (_ list-size) + (setq tmp (xcb:-unmarshal-field obj x data (+ offset count) nil + nil total-length)) + (setq result (nconc result (list (car tmp)))) + (setq count (+ count (cadr tmp)))) + (setf (slot-value obj list-name) result) + (setq list-size count)))) ;to byte length + (list initform list-size))) + (`xcb:-switch + (let ((slots (eieio-class-slots (eieio-object-class obj))) + (expression (plist-get initform 'expression)) + (cases (plist-get initform 'cases)) + (count 0) + condition name-list flag slot-type tmp) + (unless (integerp expression) + (setq expression (eval expression `((obj . ,obj) (ctx . ,ctx))))) + (cl-assert (integerp expression)) + (dolist (i cases) + (setq condition (car i)) + (setq name-list (cdr i)) + (setq flag nil) + (cl-assert (or (integerp condition) (listp condition))) + (if (integerp condition) + (setq flag (/= 0 (logand expression condition))) + (if (eq 'logior (car condition)) + (setq flag (/= 0 (logand expression + (apply #'logior (cdr condition))))) + (setq flag (memq expression condition)))) + (when flag + (dolist (name name-list) + (catch 'break + (dolist (slot slots) ;better way to find the slot type? + (when (eq name (eieio-slot-descriptor-name slot)) + (setq slot-type (cl--slot-descriptor-type slot)) + (throw 'break nil)))) + (unless (eq slot-type 'xcb:-ignore) + (setq tmp (xcb:-unmarshal-field obj slot-type data offset + (eieio-oref-default obj name) + nil total-length)) + (setf (slot-value obj name) (car tmp)) + (setq count (+ count (cadr tmp))) + (setq data (substring data (cadr tmp))))))) + (list initform count))) + ((and x (guard (child-of-class-p x 'xcb:-struct))) + (let* ((struct-obj (make-instance x)) + (tmp (xcb:unmarshal struct-obj (substring data offset) obj + total-length))) + (list struct-obj tmp))) + (x (error "[XCB] Unsupported type for unmarshalling: %s" x)))) + +;;;; Types derived directly from `xcb:-struct' + +(defclass xcb:-request (xcb:-struct) + nil + :documentation "X request type.") + +(defclass xcb:-reply (xcb:-struct) + ((~reply :initform 1 :type xcb:-u1)) + :documentation "X reply type.") + +(defclass xcb:-event (xcb:-struct) + ((~code :type xcb:-u1)) + :documentation "Event type.") +;; Implemented in 'xcb.el' +(cl-defgeneric xcb:-error-or-event-class->number ((obj xcb:connection) class)) +;; +(cl-defmethod xcb:marshal ((obj xcb:-event) connection &optional sequence) + "Return the byte-array representation of event OBJ. + +This method is mainly designed for `xcb:SendEvent', where it's used to +generate synthetic events. The CONNECTION argument is used to retrieve +the event number of extensions. If SEQUENCE is non-nil, it is used as +the sequence number of the synthetic event (if the event uses sequence +number); otherwise, 0 is assumed. + +This method auto-pads short results to 32 bytes." + (let ((event-number + (xcb:-error-or-event-class->number connection + (eieio-object-class obj))) + result) + (when (consp event-number) + (setq event-number (cdr event-number)) + (if (= 1 (length event-number)) + ;; XKB event. + (setf (slot-value obj 'xkbType) (aref event-number 0)) + ;; Generic event. + (setf (slot-value obj 'extensions) (aref event-number 0) + (slot-value obj 'evtype) (aref event-number 1)))) + (when (slot-exists-p obj '~sequence) + (setf (slot-value obj '~sequence) (or sequence 0))) + (setq result (cl-call-next-method obj)) + (when (> 32 (length result)) + (setq result (vconcat result (make-vector (- 32 (length result)) 0)))) + result)) + +(defclass xcb:-generic-event (xcb:-event) + ((~code :initform 35) + (~extension :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (~length :type xcb:CARD32) + (~evtype :type xcb:CARD16)) + :documentation "Generic event type.") + +(defclass xcb:-error (xcb:-struct) + ((~error :initform 0 :type xcb:-u1) + (~code :type xcb:-u1) + (~sequence :type xcb:CARD16)) + :documentation "X error type.") + +(defclass xcb:-union (xcb:-struct) + ((~size :initarg :~size :type xcb:-ignore)) ;Size of the largest member. + :documentation "Union type.") +;; +(cl-defmethod slot-unbound ((_object xcb:-union) _class _slot-name _fn) + nil) +;; +(cl-defmethod xcb:marshal ((obj xcb:-union)) + "Return the byte-array representation of union OBJ. + +This result is converted from the first bounded slot." + (let ((slots (eieio-class-slots (eieio-object-class obj))) + (size (slot-value obj '~size)) + result slot type name tmp) + (while (and (not result) slots (> size (length result))) + (setq slot (pop slots)) + (setq type (cl--slot-descriptor-type slot) + name (eieio-slot-descriptor-name slot)) + (unless (or (not (slot-value obj name)) + (eq type 'xcb:-ignore) + ;; Dealing with `xcb:-list' type + (and (eq type 'xcb:-list) + (not (slot-value obj (plist-get (slot-value obj name) + 'name))))) + (setq tmp (xcb:-marshal-field obj (cl--slot-descriptor-type slot) + (slot-value obj name))) + (when (> (length tmp) (length result)) + (setq result tmp)))) + (when (> size (length result)) + (setq result (vconcat result (make-vector (- size (length result)) 0)))) + result)) +;; +(cl-defmethod xcb:unmarshal ((obj xcb:-union) byte-array &optional ctx + total-length) + "Fill in every field in union OBJ, according to BYTE-ARRAY. + +The optional argument CTX is for ." + (unless total-length + (setq total-length (length byte-array))) + (let ((slots (eieio-class-slots (eieio-object-class obj))) + slot-name tmp type) + (dolist (slot slots) + (setq type (cl--slot-descriptor-type slot)) + (unless (eq type 'xcb:-ignore) + (setq slot-name (eieio-slot-descriptor-name slot) + tmp (xcb:-unmarshal-field obj type byte-array 0 + (eieio-oref-default obj slot-name) + ctx total-length)) + (setf (slot-value obj (eieio-slot-descriptor-name slot)) (car tmp)))) + (slot-value obj '~size))) + + + +(provide 'xcb-types) + +;;; xcb-types.el ends here diff --git a/elpa/xelb-0.18/xcb-xc_misc.el b/elpa/xelb-0.18/xcb-xc_misc.el new file mode 100644 index 0000000..d90af28 --- /dev/null +++ b/elpa/xelb-0.18/xcb-xc_misc.el @@ -0,0 +1,79 @@ +;;; xcb-xc_misc.el --- X11 XCMisc extension -*- lexical-binding: t -*- + +;; Copyright (C) 2015-2019 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This file was generated by 'el_client.el' from 'xc_misc.xml', +;; which you can retrieve from . + +;;; Code: + +(require 'xcb-types) + +(defconst xcb:xc_misc:-extension-xname "XC-MISC") +(defconst xcb:xc_misc:-extension-name "XCMisc") +(defconst xcb:xc_misc:-major-version 1) +(defconst xcb:xc_misc:-minor-version 1) + +(defclass xcb:xc_misc:GetVersion + (xcb:-request) + ((~opcode :initform 0 :type xcb:-u1) + (client-major-version :initarg :client-major-version :type xcb:CARD16) + (client-minor-version :initarg :client-minor-version :type xcb:CARD16))) +(defclass xcb:xc_misc:GetVersion~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (server-major-version :initarg :server-major-version :type xcb:CARD16) + (server-minor-version :initarg :server-minor-version :type xcb:CARD16))) + +(defclass xcb:xc_misc:GetXIDRange + (xcb:-request) + ((~opcode :initform 1 :type xcb:-u1))) +(defclass xcb:xc_misc:GetXIDRange~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (start-id :initarg :start-id :type xcb:CARD32) + (count :initarg :count :type xcb:CARD32))) + +(defclass xcb:xc_misc:GetXIDList + (xcb:-request) + ((~opcode :initform 2 :type xcb:-u1) + (count :initarg :count :type xcb:CARD32))) +(defclass xcb:xc_misc:GetXIDList~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (ids-len :initarg :ids-len :type xcb:CARD32) + (pad~1 :initform 20 :type xcb:-pad) + (ids~ :initform + '(name ids type xcb:CARD32 size + (xcb:-fieldref 'ids-len)) + :type xcb:-list) + (ids :initarg :ids :type xcb:-ignore))) + + + +(provide 'xcb-xc_misc) + +;;; xcb-xc_misc.el ends here diff --git a/elpa/xelb-0.18/xcb-xembed.el b/elpa/xelb-0.18/xcb-xembed.el new file mode 100644 index 0000000..d9f72aa --- /dev/null +++ b/elpa/xelb-0.18/xcb-xembed.el @@ -0,0 +1,184 @@ +;;; xcb-xembed.el --- XEmbed protocol -*- lexical-binding: t -*- + +;; Copyright (C) 2016-2019 Free Software Foundation, Inc. + +;; Author: Chris Feng + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This library implements the XEmbed protocol. + +;; Usage tips: +;; + Do not forget to call `xcb:xembed:init' for _every_ connection using this +;; library. +;; + Use `xcb:xembed:SendEvent' instead of `xcb:SendEvent' to send XEmbed +;; messages defined in this library. + +;; References: +;; + Xembed protocol (https://specifications.freedesktop.org/ +;; xembed-spec/xembed-spec-0.5.html) + +;;; Code: + +(require 'xcb-icccm) + +;; XEmbed atoms +(eval-and-compile + (defconst xcb:xembed:-atoms + '(_XEMBED_INFO _XEMBED) + "XEmbed atoms.") + + (dolist (atom xcb:xembed:-atoms) + (eval `(defvar ,(intern (concat "xcb:Atom:" (symbol-name atom))) nil)))) + +;; XEMBED message opcodes. +(defconst xcb:xembed:opcode:EMBEDDED-NOTIFY 0) +(defconst xcb:xembed:opcode:WINDOW-ACTIVATE 1) +(defconst xcb:xembed:opcode:WINDOW-DEACTIVATE 2) +(defconst xcb:xembed:opcode:REQUEST-FOCUS 3) +(defconst xcb:xembed:opcode:FOCUS-IN 4) +(defconst xcb:xembed:opcode:FOCUS-OUT 5) +(defconst xcb:xembed:opcode:FOCUS-NEXT 6) +(defconst xcb:xembed:opcode:FOCUS-PREV 7) +(defconst xcb:xembed:opcode:MODALITY-ON 10) +(defconst xcb:xembed:opcode:MODALITY-OFF 11) +(defconst xcb:xembed:opcode:REGISTER-ACCELERATOR 12) +(defconst xcb:xembed:opcode:UNREGISTER-ACCELERATOR 13) +(defconst xcb:xembed:opcode:ACTIVATE-ACCELERATOR 14) + +(cl-defmethod xcb:xembed:init ((obj xcb:connection) &optional force) + "Initialize the XEmbed module. + +This method must be called before using any other method in this module." + (when (or force (not xcb:Atom:_XEMBED_INFO)) + (xcb:icccm:intern-atoms obj xcb:xembed:-atoms force))) + +;; Flags for _XEMBED_INFO. +(defconst xcb:xembed:MAPPED 1) + +(defclass xcb:xembed:get-_XEMBED_INFO (xcb:icccm:-GetProperty-explicit) + ((property :initform xcb:Atom:_XEMBED_INFO) + (type :initform xcb:Atom:_XEMBED_INFO))) +(defclass xcb:xembed:get-_XEMBED_INFO~reply + (xcb:icccm:-GetProperty-explicit~reply) + ((version :type xcb:-ignore) + (flags :type xcb:-ignore))) +(defclass xcb:xembed:set-_XEMBED_INFO (xcb:icccm:-ChangeProperty-explicit) + ((property :initform xcb:Atom:_XEMBED_INFO) + (type :initform xcb:Atom:_XEMBED_INFO) + (format :initform 32) + (version :initarg :version :type xcb:-ignore) + (flags :initarg :flags :type xcb:-ignore))) + +(defclass xcb:xembed:SendEvent (xcb:SendEvent) + ((propagate :initform 0) + (event-mask :initform xcb:EventMask:NoEvent)) + :documentation "Send XEmbed message.") + +(defclass xcb:xembed:-ClientMessage + (xcb:icccm:--ClientMessage xcb:ClientMessage) + ((format :initform 32) + (type :initform xcb:Atom:_XEMBED) + (time :initarg :time :type xcb:TIMESTAMP) ;new slot + (opcode :initarg :opcode :type xcb:CARD32) ;new slot + (detail :initarg :detail :initform 0 :type xcb:CARD32)) ;new slot + :documentation "An XEmbed client message.") + +(defclass xcb:xembed:EMBEDDED-NOTIFY (xcb:xembed:-ClientMessage) + ((opcode :initform xcb:xembed:opcode:EMBEDDED-NOTIFY) + (embedder :initarg :embedder :type xcb:WINDOW) + (version :initarg :version :type xcb:CARD32))) + +(defclass xcb:xembed:WINDOW-ACTIVATE (xcb:xembed:-ClientMessage) + ((opcode :initform xcb:xembed:opcode:WINDOW-ACTIVATE) + (pad~0 :initform 8 :type xcb:-pad))) + +(defclass xcb:xembed:WINDOW-DEACTIVATE (xcb:xembed:-ClientMessage) + ((opcode :initform xcb:xembed:opcode:WINDOW-DEACTIVATE) + (pad~0 :initform 8 :type xcb:-pad))) + +(defclass xcb:xembed:REQUEST-FOCUS (xcb:xembed:-ClientMessage) + ((opcode :initform xcb:xembed:opcode:REQUEST-FOCUS) + (pad~0 :initform 8 :type xcb:-pad))) + +;; Details for xcb:xembed:FOCUS-IN. +(defconst xcb:xembed:FOCUS:CURRENT 0) +(defconst xcb:xembed:FOCUS:FIRST 1) +(defconst xcb:xembed:FOCUS:LAST 2) + +;; Directions for focusing. +(defconst xcb:xembed:DIRECTION:DEFAULT 0) +(defconst xcb:xembed:DIRECTION:UP-DOWN 1) +(defconst xcb:xembed:DIRECTION:LEFT-RIGHT 2) + +(defclass xcb:xembed:FOCUS-IN (xcb:xembed:-ClientMessage) + ((opcode :initform xcb:xembed:opcode:FOCUS-IN) + (direction :initarg :direction :initform 0 :type xcb:CARD32) + (pad~0 :initform 4 :type xcb:-pad))) + +(defclass xcb:xembed:FOCUS-OUT (xcb:xembed:-ClientMessage) + ((opcode :initform xcb:xembed:opcode:FOCUS-OUT) + (pad~0 :initform 8 :type xcb:-pad))) + +(defclass xcb:xembed:FOCUS-NEXT (xcb:xembed:-ClientMessage) + ((opcode :initform xcb:xembed:opcode:FOCUS-NEXT) + (direction :initarg :direction :initform 0 :type xcb:CARD32) + (pad~0 :initform 4 :type xcb:-pad))) + +(defclass xcb:xembed:FOCUS-PREV (xcb:xembed:-ClientMessage) + ((opcode :initform xcb:xembed:opcode:FOCUS-PREV) + (direction :initarg :direction :initform 0 :type xcb:CARD32) + (pad~0 :initform 4 :type xcb:-pad))) + +;; Modifiers field for xcb:xembed:REGISTER-ACCELERATOR. +(defconst xcb:xembed:MODIFIER:SHIFT 1) +(defconst xcb:xembed:MODIFIER:CONTROL 2) +(defconst xcb:xembed:MODIFIER:ALT 4) +(defconst xcb:xembed:MODIFIER:SUPER 8) +(defconst xcb:xembed:MODIFIER:HYPER 16) + +(defclass xcb:xembed:REGISTER-ACCELERATOR (xcb:xembed:-ClientMessage) + ((opcode :initform xcb:xembed:opcode:REGISTER-ACCELERATOR) + (keysym :initarg :keysym :type xcb:KEYSYM) + (modifier :initarg :modifier :type xcb:CARD32))) + +(defclass xcb:xembed:UNREGISTER-ACCELERATOR (xcb:xembed:-ClientMessage) + ((opcode :initform xcb:xembed:opcode:UNREGISTER-ACCELERATOR) + (pad~0 :initform 8 :type xcb:-pad))) + +;; Flags for XEMBED-ACTIVATE-ACCELERATOR. +(defconst xcb:xembed:ACCELERATOR:OVERLOADED 1) + +(defclass xcb:xembed:ACTIVATE-ACCELERATOR (xcb:xembed:-ClientMessage) + ((opcode :initform xcb:xembed:opcode:ACTIVATE-ACCELERATOR) + (flags :initarg :flags :type xcb:CARD32) + (pad~0 :initform 4 :type xcb:-pad))) + +(defclass xcb:xembed:MODALITY-ON (xcb:xembed:-ClientMessage) + ((opcode :initform xcb:xembed:opcode:MODALITY-ON) + (pad~0 :initform 8 :type xcb:-pad))) + +(defclass xcb:xembed:MODALITY-OFF (xcb:xembed:-ClientMessage) + ((opcode :initform xcb:xembed:opcode:MODALITY-OFF) + (pad~0 :initform 8 :type xcb:-pad))) + + + +(provide 'xcb-xembed) + +;;; xcb-xembed.el ends here diff --git a/elpa/xelb-0.18/xcb-xevie.el b/elpa/xelb-0.18/xcb-xevie.el new file mode 100644 index 0000000..7fd5a11 --- /dev/null +++ b/elpa/xelb-0.18/xcb-xevie.el @@ -0,0 +1,105 @@ +;;; xcb-xevie.el --- X11 Xevie extension -*- lexical-binding: t -*- + +;; Copyright (C) 2015-2019 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This file was generated by 'el_client.el' from 'xevie.xml', +;; which you can retrieve from . + +;;; Code: + +(require 'xcb-types) + +(defconst xcb:xevie:-extension-xname "XEVIE") +(defconst xcb:xevie:-extension-name "Xevie") +(defconst xcb:xevie:-major-version 1) +(defconst xcb:xevie:-minor-version 0) + +(defclass xcb:xevie:QueryVersion + (xcb:-request) + ((~opcode :initform 0 :type xcb:-u1) + (client-major-version :initarg :client-major-version :type xcb:CARD16) + (client-minor-version :initarg :client-minor-version :type xcb:CARD16))) +(defclass xcb:xevie:QueryVersion~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (server-major-version :initarg :server-major-version :type xcb:CARD16) + (server-minor-version :initarg :server-minor-version :type xcb:CARD16) + (pad~1 :initform 20 :type xcb:-pad))) + +(defclass xcb:xevie:Start + (xcb:-request) + ((~opcode :initform 1 :type xcb:-u1) + (screen :initarg :screen :type xcb:CARD32))) +(defclass xcb:xevie:Start~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 24 :type xcb:-pad))) + +(defclass xcb:xevie:End + (xcb:-request) + ((~opcode :initform 2 :type xcb:-u1) + (cmap :initarg :cmap :type xcb:CARD32))) +(defclass xcb:xevie:End~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 24 :type xcb:-pad))) + +(defconst xcb:xevie:Datatype:Unmodified 0) +(defconst xcb:xevie:Datatype:Modified 1) + +(defclass xcb:xevie:Event + (xcb:-struct) + ((pad~0 :initform 32 :type xcb:-pad))) + +(defclass xcb:xevie:Send + (xcb:-request) + ((~opcode :initform 3 :type xcb:-u1) + (event :initarg :event :type xcb:xevie:Event) + (data-type :initarg :data-type :type xcb:CARD32) + (pad~0 :initform 64 :type xcb:-pad))) +(defclass xcb:xevie:Send~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 24 :type xcb:-pad))) + +(defclass xcb:xevie:SelectInput + (xcb:-request) + ((~opcode :initform 4 :type xcb:-u1) + (event-mask :initarg :event-mask :type xcb:CARD32))) +(defclass xcb:xevie:SelectInput~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 24 :type xcb:-pad))) + + + +(provide 'xcb-xevie) + +;;; xcb-xevie.el ends here diff --git a/elpa/xelb-0.18/xcb-xf86dri.el b/elpa/xelb-0.18/xcb-xf86dri.el new file mode 100644 index 0000000..f018eb1 --- /dev/null +++ b/elpa/xelb-0.18/xcb-xf86dri.el @@ -0,0 +1,213 @@ +;;; xcb-xf86dri.el --- X11 XF86Dri extension -*- lexical-binding: t -*- + +;; Copyright (C) 2015-2019 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This file was generated by 'el_client.el' from 'xf86dri.xml', +;; which you can retrieve from . + +;;; Code: + +(require 'xcb-types) + +(defconst xcb:xf86dri:-extension-xname "XFree86-DRI") +(defconst xcb:xf86dri:-extension-name "XF86Dri") +(defconst xcb:xf86dri:-major-version 4) +(defconst xcb:xf86dri:-minor-version 1) + +(defclass xcb:xf86dri:DrmClipRect + (xcb:-struct) + ((x1 :initarg :x1 :type xcb:INT16) + (y1 :initarg :y1 :type xcb:INT16) + (x2 :initarg :x2 :type xcb:INT16) + (x3 :initarg :x3 :type xcb:INT16))) + +(defclass xcb:xf86dri:QueryVersion + (xcb:-request) + ((~opcode :initform 0 :type xcb:-u1))) +(defclass xcb:xf86dri:QueryVersion~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (dri-major-version :initarg :dri-major-version :type xcb:CARD16) + (dri-minor-version :initarg :dri-minor-version :type xcb:CARD16) + (dri-minor-patch :initarg :dri-minor-patch :type xcb:CARD32))) + +(defclass xcb:xf86dri:QueryDirectRenderingCapable + (xcb:-request) + ((~opcode :initform 1 :type xcb:-u1) + (screen :initarg :screen :type xcb:CARD32))) +(defclass xcb:xf86dri:QueryDirectRenderingCapable~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (is-capable :initarg :is-capable :type xcb:BOOL))) + +(defclass xcb:xf86dri:OpenConnection + (xcb:-request) + ((~opcode :initform 2 :type xcb:-u1) + (screen :initarg :screen :type xcb:CARD32))) +(defclass xcb:xf86dri:OpenConnection~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (sarea-handle-low :initarg :sarea-handle-low :type xcb:CARD32) + (sarea-handle-high :initarg :sarea-handle-high :type xcb:CARD32) + (bus-id-len :initarg :bus-id-len :type xcb:CARD32) + (pad~1 :initform 12 :type xcb:-pad) + (bus-id~ :initform + '(name bus-id type xcb:char size + (xcb:-fieldref 'bus-id-len)) + :type xcb:-list) + (bus-id :initarg :bus-id :type xcb:-ignore))) + +(defclass xcb:xf86dri:CloseConnection + (xcb:-request) + ((~opcode :initform 3 :type xcb:-u1) + (screen :initarg :screen :type xcb:CARD32))) + +(defclass xcb:xf86dri:GetClientDriverName + (xcb:-request) + ((~opcode :initform 4 :type xcb:-u1) + (screen :initarg :screen :type xcb:CARD32))) +(defclass xcb:xf86dri:GetClientDriverName~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (client-driver-major-version :initarg :client-driver-major-version :type xcb:CARD32) + (client-driver-minor-version :initarg :client-driver-minor-version :type xcb:CARD32) + (client-driver-patch-version :initarg :client-driver-patch-version :type xcb:CARD32) + (client-driver-name-len :initarg :client-driver-name-len :type xcb:CARD32) + (pad~1 :initform 8 :type xcb:-pad) + (client-driver-name~ :initform + '(name client-driver-name type xcb:char size + (xcb:-fieldref 'client-driver-name-len)) + :type xcb:-list) + (client-driver-name :initarg :client-driver-name :type xcb:-ignore))) + +(defclass xcb:xf86dri:CreateContext + (xcb:-request) + ((~opcode :initform 5 :type xcb:-u1) + (screen :initarg :screen :type xcb:CARD32) + (visual :initarg :visual :type xcb:CARD32) + (context :initarg :context :type xcb:CARD32))) +(defclass xcb:xf86dri:CreateContext~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (hw-context :initarg :hw-context :type xcb:CARD32))) + +(defclass xcb:xf86dri:DestroyContext + (xcb:-request) + ((~opcode :initform 6 :type xcb:-u1) + (screen :initarg :screen :type xcb:CARD32) + (context :initarg :context :type xcb:CARD32))) + +(defclass xcb:xf86dri:CreateDrawable + (xcb:-request) + ((~opcode :initform 7 :type xcb:-u1) + (screen :initarg :screen :type xcb:CARD32) + (drawable :initarg :drawable :type xcb:CARD32))) +(defclass xcb:xf86dri:CreateDrawable~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (hw-drawable-handle :initarg :hw-drawable-handle :type xcb:CARD32))) + +(defclass xcb:xf86dri:DestroyDrawable + (xcb:-request) + ((~opcode :initform 8 :type xcb:-u1) + (screen :initarg :screen :type xcb:CARD32) + (drawable :initarg :drawable :type xcb:CARD32))) + +(defclass xcb:xf86dri:GetDrawableInfo + (xcb:-request) + ((~opcode :initform 9 :type xcb:-u1) + (screen :initarg :screen :type xcb:CARD32) + (drawable :initarg :drawable :type xcb:CARD32))) +(defclass xcb:xf86dri:GetDrawableInfo~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (drawable-table-index :initarg :drawable-table-index :type xcb:CARD32) + (drawable-table-stamp :initarg :drawable-table-stamp :type xcb:CARD32) + (drawable-origin-X :initarg :drawable-origin-X :type xcb:INT16) + (drawable-origin-Y :initarg :drawable-origin-Y :type xcb:INT16) + (drawable-size-W :initarg :drawable-size-W :type xcb:INT16) + (drawable-size-H :initarg :drawable-size-H :type xcb:INT16) + (num-clip-rects :initarg :num-clip-rects :type xcb:CARD32) + (back-x :initarg :back-x :type xcb:INT16) + (back-y :initarg :back-y :type xcb:INT16) + (num-back-clip-rects :initarg :num-back-clip-rects :type xcb:CARD32) + (clip-rects~ :initform + '(name clip-rects type xcb:xf86dri:DrmClipRect size + (xcb:-fieldref 'num-clip-rects)) + :type xcb:-list) + (clip-rects :initarg :clip-rects :type xcb:-ignore) + (back-clip-rects~ :initform + '(name back-clip-rects type xcb:xf86dri:DrmClipRect size + (xcb:-fieldref 'num-back-clip-rects)) + :type xcb:-list) + (back-clip-rects :initarg :back-clip-rects :type xcb:-ignore))) + +(defclass xcb:xf86dri:GetDeviceInfo + (xcb:-request) + ((~opcode :initform 10 :type xcb:-u1) + (screen :initarg :screen :type xcb:CARD32))) +(defclass xcb:xf86dri:GetDeviceInfo~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (framebuffer-handle-low :initarg :framebuffer-handle-low :type xcb:CARD32) + (framebuffer-handle-high :initarg :framebuffer-handle-high :type xcb:CARD32) + (framebuffer-origin-offset :initarg :framebuffer-origin-offset :type xcb:CARD32) + (framebuffer-size :initarg :framebuffer-size :type xcb:CARD32) + (framebuffer-stride :initarg :framebuffer-stride :type xcb:CARD32) + (device-private-size :initarg :device-private-size :type xcb:CARD32) + (device-private~ :initform + '(name device-private type xcb:CARD32 size + (xcb:-fieldref 'device-private-size)) + :type xcb:-list) + (device-private :initarg :device-private :type xcb:-ignore))) + +(defclass xcb:xf86dri:AuthConnection + (xcb:-request) + ((~opcode :initform 11 :type xcb:-u1) + (screen :initarg :screen :type xcb:CARD32) + (magic :initarg :magic :type xcb:CARD32))) +(defclass xcb:xf86dri:AuthConnection~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (authenticated :initarg :authenticated :type xcb:CARD32))) + + + +(provide 'xcb-xf86dri) + +;;; xcb-xf86dri.el ends here diff --git a/elpa/xelb-0.18/xcb-xf86vidmode.el b/elpa/xelb-0.18/xcb-xf86vidmode.el new file mode 100644 index 0000000..d8af2e0 --- /dev/null +++ b/elpa/xelb-0.18/xcb-xf86vidmode.el @@ -0,0 +1,550 @@ +;;; xcb-xf86vidmode.el --- X11 XF86VidMode extension -*- lexical-binding: t -*- + +;; Copyright (C) 2015-2019 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This file was generated by 'el_client.el' from 'xf86vidmode.xml', +;; which you can retrieve from . + +;;; Code: + +(require 'xcb-types) + +(defconst xcb:xf86vidmode:-extension-xname "XFree86-VidModeExtension") +(defconst xcb:xf86vidmode:-extension-name "XF86VidMode") +(defconst xcb:xf86vidmode:-major-version 2) +(defconst xcb:xf86vidmode:-minor-version 2) + +(xcb:deftypealias 'xcb:xf86vidmode:SYNCRANGE 'xcb:CARD32) + +(xcb:deftypealias 'xcb:xf86vidmode:DOTCLOCK 'xcb:CARD32) + +(defconst xcb:xf86vidmode:ModeFlag:Positive_HSync 1) +(defconst xcb:xf86vidmode:ModeFlag:Negative_HSync 2) +(defconst xcb:xf86vidmode:ModeFlag:Positive_VSync 4) +(defconst xcb:xf86vidmode:ModeFlag:Negative_VSync 8) +(defconst xcb:xf86vidmode:ModeFlag:Interlace 16) +(defconst xcb:xf86vidmode:ModeFlag:Composite_Sync 32) +(defconst xcb:xf86vidmode:ModeFlag:Positive_CSync 64) +(defconst xcb:xf86vidmode:ModeFlag:Negative_CSync 128) +(defconst xcb:xf86vidmode:ModeFlag:HSkew 256) +(defconst xcb:xf86vidmode:ModeFlag:Broadcast 512) +(defconst xcb:xf86vidmode:ModeFlag:Pixmux 1024) +(defconst xcb:xf86vidmode:ModeFlag:Double_Clock 2048) +(defconst xcb:xf86vidmode:ModeFlag:Half_Clock 4096) + +(defconst xcb:xf86vidmode:ClockFlag:Programable 1) + +(defconst xcb:xf86vidmode:Permission:Read 1) +(defconst xcb:xf86vidmode:Permission:Write 2) + +(defclass xcb:xf86vidmode:ModeInfo + (xcb:-struct) + ((dotclock :initarg :dotclock :type xcb:xf86vidmode:DOTCLOCK) + (hdisplay :initarg :hdisplay :type xcb:CARD16) + (hsyncstart :initarg :hsyncstart :type xcb:CARD16) + (hsyncend :initarg :hsyncend :type xcb:CARD16) + (htotal :initarg :htotal :type xcb:CARD16) + (hskew :initarg :hskew :type xcb:CARD32) + (vdisplay :initarg :vdisplay :type xcb:CARD16) + (vsyncstart :initarg :vsyncstart :type xcb:CARD16) + (vsyncend :initarg :vsyncend :type xcb:CARD16) + (vtotal :initarg :vtotal :type xcb:CARD16) + (pad~0 :initform 4 :type xcb:-pad) + (flags :initarg :flags :type xcb:CARD32) + (pad~1 :initform 12 :type xcb:-pad) + (privsize :initarg :privsize :type xcb:CARD32))) + +(defclass xcb:xf86vidmode:QueryVersion + (xcb:-request) + ((~opcode :initform 0 :type xcb:-u1))) +(defclass xcb:xf86vidmode:QueryVersion~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (major-version :initarg :major-version :type xcb:CARD16) + (minor-version :initarg :minor-version :type xcb:CARD16))) + +(defclass xcb:xf86vidmode:GetModeLine + (xcb:-request) + ((~opcode :initform 1 :type xcb:-u1) + (screen :initarg :screen :type xcb:CARD16) + (pad~0 :initform 2 :type xcb:-pad))) +(defclass xcb:xf86vidmode:GetModeLine~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (dotclock :initarg :dotclock :type xcb:xf86vidmode:DOTCLOCK) + (hdisplay :initarg :hdisplay :type xcb:CARD16) + (hsyncstart :initarg :hsyncstart :type xcb:CARD16) + (hsyncend :initarg :hsyncend :type xcb:CARD16) + (htotal :initarg :htotal :type xcb:CARD16) + (hskew :initarg :hskew :type xcb:CARD16) + (vdisplay :initarg :vdisplay :type xcb:CARD16) + (vsyncstart :initarg :vsyncstart :type xcb:CARD16) + (vsyncend :initarg :vsyncend :type xcb:CARD16) + (vtotal :initarg :vtotal :type xcb:CARD16) + (pad~1 :initform 2 :type xcb:-pad) + (flags :initarg :flags :type xcb:CARD32) + (pad~2 :initform 12 :type xcb:-pad) + (privsize :initarg :privsize :type xcb:CARD32) + (private~ :initform + '(name private type xcb:CARD8 size + (xcb:-fieldref 'privsize)) + :type xcb:-list) + (private :initarg :private :type xcb:-ignore))) + +(defclass xcb:xf86vidmode:ModModeLine + (xcb:-request) + ((~opcode :initform 2 :type xcb:-u1) + (screen :initarg :screen :type xcb:CARD32) + (hdisplay :initarg :hdisplay :type xcb:CARD16) + (hsyncstart :initarg :hsyncstart :type xcb:CARD16) + (hsyncend :initarg :hsyncend :type xcb:CARD16) + (htotal :initarg :htotal :type xcb:CARD16) + (hskew :initarg :hskew :type xcb:CARD16) + (vdisplay :initarg :vdisplay :type xcb:CARD16) + (vsyncstart :initarg :vsyncstart :type xcb:CARD16) + (vsyncend :initarg :vsyncend :type xcb:CARD16) + (vtotal :initarg :vtotal :type xcb:CARD16) + (pad~0 :initform 2 :type xcb:-pad) + (flags :initarg :flags :type xcb:CARD32) + (pad~1 :initform 12 :type xcb:-pad) + (privsize :initarg :privsize :type xcb:CARD32) + (private~ :initform + '(name private type xcb:CARD8 size + (xcb:-fieldref 'privsize)) + :type xcb:-list) + (private :initarg :private :type xcb:-ignore))) + +(defclass xcb:xf86vidmode:SwitchMode + (xcb:-request) + ((~opcode :initform 3 :type xcb:-u1) + (screen :initarg :screen :type xcb:CARD16) + (zoom :initarg :zoom :type xcb:CARD16))) + +(defclass xcb:xf86vidmode:GetMonitor + (xcb:-request) + ((~opcode :initform 4 :type xcb:-u1) + (screen :initarg :screen :type xcb:CARD16) + (pad~0 :initform 2 :type xcb:-pad))) +(defclass xcb:xf86vidmode:GetMonitor~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (vendor-length :initarg :vendor-length :type xcb:CARD8) + (model-length :initarg :model-length :type xcb:CARD8) + (num-hsync :initarg :num-hsync :type xcb:CARD8) + (num-vsync :initarg :num-vsync :type xcb:CARD8) + (pad~1 :initform 20 :type xcb:-pad) + (hsync~ :initform + '(name hsync type xcb:xf86vidmode:SYNCRANGE size + (xcb:-fieldref 'num-hsync)) + :type xcb:-list) + (hsync :initarg :hsync :type xcb:-ignore) + (vsync~ :initform + '(name vsync type xcb:xf86vidmode:SYNCRANGE size + (xcb:-fieldref 'num-vsync)) + :type xcb:-list) + (vsync :initarg :vsync :type xcb:-ignore) + (vendor~ :initform + '(name vendor type xcb:char size + (xcb:-fieldref 'vendor-length)) + :type xcb:-list) + (vendor :initarg :vendor :type xcb:-ignore) + (alignment-pad~ :initform + '(name alignment-pad type xcb:void size + (- + (logand + (+ + (xcb:-fieldref 'vendor-length) + 3) + (lognot 3)) + (xcb:-fieldref 'vendor-length))) + :type xcb:-list) + (alignment-pad :initarg :alignment-pad :type xcb:-ignore) + (model~ :initform + '(name model type xcb:char size + (xcb:-fieldref 'model-length)) + :type xcb:-list) + (model :initarg :model :type xcb:-ignore))) + +(defclass xcb:xf86vidmode:LockModeSwitch + (xcb:-request) + ((~opcode :initform 5 :type xcb:-u1) + (screen :initarg :screen :type xcb:CARD16) + (lock :initarg :lock :type xcb:CARD16))) + +(defclass xcb:xf86vidmode:GetAllModeLines + (xcb:-request) + ((~opcode :initform 6 :type xcb:-u1) + (screen :initarg :screen :type xcb:CARD16) + (pad~0 :initform 2 :type xcb:-pad))) +(defclass xcb:xf86vidmode:GetAllModeLines~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (modecount :initarg :modecount :type xcb:CARD32) + (pad~1 :initform 20 :type xcb:-pad) + (modeinfo~ :initform + '(name modeinfo type xcb:xf86vidmode:ModeInfo size + (xcb:-fieldref 'modecount)) + :type xcb:-list) + (modeinfo :initarg :modeinfo :type xcb:-ignore))) + +(defclass xcb:xf86vidmode:AddModeLine + (xcb:-request) + ((~opcode :initform 7 :type xcb:-u1) + (screen :initarg :screen :type xcb:CARD32) + (dotclock :initarg :dotclock :type xcb:xf86vidmode:DOTCLOCK) + (hdisplay :initarg :hdisplay :type xcb:CARD16) + (hsyncstart :initarg :hsyncstart :type xcb:CARD16) + (hsyncend :initarg :hsyncend :type xcb:CARD16) + (htotal :initarg :htotal :type xcb:CARD16) + (hskew :initarg :hskew :type xcb:CARD16) + (vdisplay :initarg :vdisplay :type xcb:CARD16) + (vsyncstart :initarg :vsyncstart :type xcb:CARD16) + (vsyncend :initarg :vsyncend :type xcb:CARD16) + (vtotal :initarg :vtotal :type xcb:CARD16) + (pad~0 :initform 2 :type xcb:-pad) + (flags :initarg :flags :type xcb:CARD32) + (pad~1 :initform 12 :type xcb:-pad) + (privsize :initarg :privsize :type xcb:CARD32) + (after-dotclock :initarg :after-dotclock :type xcb:xf86vidmode:DOTCLOCK) + (after-hdisplay :initarg :after-hdisplay :type xcb:CARD16) + (after-hsyncstart :initarg :after-hsyncstart :type xcb:CARD16) + (after-hsyncend :initarg :after-hsyncend :type xcb:CARD16) + (after-htotal :initarg :after-htotal :type xcb:CARD16) + (after-hskew :initarg :after-hskew :type xcb:CARD16) + (after-vdisplay :initarg :after-vdisplay :type xcb:CARD16) + (after-vsyncstart :initarg :after-vsyncstart :type xcb:CARD16) + (after-vsyncend :initarg :after-vsyncend :type xcb:CARD16) + (after-vtotal :initarg :after-vtotal :type xcb:CARD16) + (pad~2 :initform 2 :type xcb:-pad) + (after-flags :initarg :after-flags :type xcb:CARD32) + (pad~3 :initform 12 :type xcb:-pad) + (private~ :initform + '(name private type xcb:CARD8 size + (xcb:-fieldref 'privsize)) + :type xcb:-list) + (private :initarg :private :type xcb:-ignore))) + +(defclass xcb:xf86vidmode:DeleteModeLine + (xcb:-request) + ((~opcode :initform 8 :type xcb:-u1) + (screen :initarg :screen :type xcb:CARD32) + (dotclock :initarg :dotclock :type xcb:xf86vidmode:DOTCLOCK) + (hdisplay :initarg :hdisplay :type xcb:CARD16) + (hsyncstart :initarg :hsyncstart :type xcb:CARD16) + (hsyncend :initarg :hsyncend :type xcb:CARD16) + (htotal :initarg :htotal :type xcb:CARD16) + (hskew :initarg :hskew :type xcb:CARD16) + (vdisplay :initarg :vdisplay :type xcb:CARD16) + (vsyncstart :initarg :vsyncstart :type xcb:CARD16) + (vsyncend :initarg :vsyncend :type xcb:CARD16) + (vtotal :initarg :vtotal :type xcb:CARD16) + (pad~0 :initform 2 :type xcb:-pad) + (flags :initarg :flags :type xcb:CARD32) + (pad~1 :initform 12 :type xcb:-pad) + (privsize :initarg :privsize :type xcb:CARD32) + (private~ :initform + '(name private type xcb:CARD8 size + (xcb:-fieldref 'privsize)) + :type xcb:-list) + (private :initarg :private :type xcb:-ignore))) + +(defclass xcb:xf86vidmode:ValidateModeLine + (xcb:-request) + ((~opcode :initform 9 :type xcb:-u1) + (screen :initarg :screen :type xcb:CARD32) + (dotclock :initarg :dotclock :type xcb:xf86vidmode:DOTCLOCK) + (hdisplay :initarg :hdisplay :type xcb:CARD16) + (hsyncstart :initarg :hsyncstart :type xcb:CARD16) + (hsyncend :initarg :hsyncend :type xcb:CARD16) + (htotal :initarg :htotal :type xcb:CARD16) + (hskew :initarg :hskew :type xcb:CARD16) + (vdisplay :initarg :vdisplay :type xcb:CARD16) + (vsyncstart :initarg :vsyncstart :type xcb:CARD16) + (vsyncend :initarg :vsyncend :type xcb:CARD16) + (vtotal :initarg :vtotal :type xcb:CARD16) + (pad~0 :initform 2 :type xcb:-pad) + (flags :initarg :flags :type xcb:CARD32) + (pad~1 :initform 12 :type xcb:-pad) + (privsize :initarg :privsize :type xcb:CARD32) + (private~ :initform + '(name private type xcb:CARD8 size + (xcb:-fieldref 'privsize)) + :type xcb:-list) + (private :initarg :private :type xcb:-ignore))) +(defclass xcb:xf86vidmode:ValidateModeLine~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (status :initarg :status :type xcb:CARD32) + (pad~1 :initform 20 :type xcb:-pad))) + +(defclass xcb:xf86vidmode:SwitchToMode + (xcb:-request) + ((~opcode :initform 10 :type xcb:-u1) + (screen :initarg :screen :type xcb:CARD32) + (dotclock :initarg :dotclock :type xcb:xf86vidmode:DOTCLOCK) + (hdisplay :initarg :hdisplay :type xcb:CARD16) + (hsyncstart :initarg :hsyncstart :type xcb:CARD16) + (hsyncend :initarg :hsyncend :type xcb:CARD16) + (htotal :initarg :htotal :type xcb:CARD16) + (hskew :initarg :hskew :type xcb:CARD16) + (vdisplay :initarg :vdisplay :type xcb:CARD16) + (vsyncstart :initarg :vsyncstart :type xcb:CARD16) + (vsyncend :initarg :vsyncend :type xcb:CARD16) + (vtotal :initarg :vtotal :type xcb:CARD16) + (pad~0 :initform 2 :type xcb:-pad) + (flags :initarg :flags :type xcb:CARD32) + (pad~1 :initform 12 :type xcb:-pad) + (privsize :initarg :privsize :type xcb:CARD32) + (private~ :initform + '(name private type xcb:CARD8 size + (xcb:-fieldref 'privsize)) + :type xcb:-list) + (private :initarg :private :type xcb:-ignore))) + +(defclass xcb:xf86vidmode:GetViewPort + (xcb:-request) + ((~opcode :initform 11 :type xcb:-u1) + (screen :initarg :screen :type xcb:CARD16) + (pad~0 :initform 2 :type xcb:-pad))) +(defclass xcb:xf86vidmode:GetViewPort~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (x :initarg :x :type xcb:CARD32) + (y :initarg :y :type xcb:CARD32) + (pad~1 :initform 16 :type xcb:-pad))) + +(defclass xcb:xf86vidmode:SetViewPort + (xcb:-request) + ((~opcode :initform 12 :type xcb:-u1) + (screen :initarg :screen :type xcb:CARD16) + (pad~0 :initform 2 :type xcb:-pad) + (x :initarg :x :type xcb:CARD32) + (y :initarg :y :type xcb:CARD32))) + +(defclass xcb:xf86vidmode:GetDotClocks + (xcb:-request) + ((~opcode :initform 13 :type xcb:-u1) + (screen :initarg :screen :type xcb:CARD16) + (pad~0 :initform 2 :type xcb:-pad))) +(defclass xcb:xf86vidmode:GetDotClocks~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (flags :initarg :flags :type xcb:CARD32) + (clocks :initarg :clocks :type xcb:CARD32) + (maxclocks :initarg :maxclocks :type xcb:CARD32) + (pad~1 :initform 12 :type xcb:-pad) + (clock~ :initform + '(name clock type xcb:CARD32 size + (* + (- 1 + (logand + (xcb:-fieldref 'flags) + 1)) + (xcb:-fieldref 'clocks))) + :type xcb:-list) + (clock :initarg :clock :type xcb:-ignore))) + +(defclass xcb:xf86vidmode:SetClientVersion + (xcb:-request) + ((~opcode :initform 14 :type xcb:-u1) + (major :initarg :major :type xcb:CARD16) + (minor :initarg :minor :type xcb:CARD16))) + +(defclass xcb:xf86vidmode:SetGamma + (xcb:-request) + ((~opcode :initform 15 :type xcb:-u1) + (screen :initarg :screen :type xcb:CARD16) + (pad~0 :initform 2 :type xcb:-pad) + (red :initarg :red :type xcb:CARD32) + (green :initarg :green :type xcb:CARD32) + (blue :initarg :blue :type xcb:CARD32) + (pad~1 :initform 12 :type xcb:-pad))) + +(defclass xcb:xf86vidmode:GetGamma + (xcb:-request) + ((~opcode :initform 16 :type xcb:-u1) + (screen :initarg :screen :type xcb:CARD16) + (pad~0 :initform 26 :type xcb:-pad))) +(defclass xcb:xf86vidmode:GetGamma~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (red :initarg :red :type xcb:CARD32) + (green :initarg :green :type xcb:CARD32) + (blue :initarg :blue :type xcb:CARD32) + (pad~1 :initform 12 :type xcb:-pad))) + +(defclass xcb:xf86vidmode:GetGammaRamp + (xcb:-request) + ((~opcode :initform 17 :type xcb:-u1) + (screen :initarg :screen :type xcb:CARD16) + (size :initarg :size :type xcb:CARD16))) +(defclass xcb:xf86vidmode:GetGammaRamp~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (size :initarg :size :type xcb:CARD16) + (pad~1 :initform 22 :type xcb:-pad) + (red~ :initform + '(name red type xcb:CARD16 size + (logand + (+ + (xcb:-fieldref 'size) + 1) + (lognot 1))) + :type xcb:-list) + (red :initarg :red :type xcb:-ignore) + (green~ :initform + '(name green type xcb:CARD16 size + (logand + (+ + (xcb:-fieldref 'size) + 1) + (lognot 1))) + :type xcb:-list) + (green :initarg :green :type xcb:-ignore) + (blue~ :initform + '(name blue type xcb:CARD16 size + (logand + (+ + (xcb:-fieldref 'size) + 1) + (lognot 1))) + :type xcb:-list) + (blue :initarg :blue :type xcb:-ignore))) + +(defclass xcb:xf86vidmode:SetGammaRamp + (xcb:-request) + ((~opcode :initform 18 :type xcb:-u1) + (screen :initarg :screen :type xcb:CARD16) + (size :initarg :size :type xcb:CARD16) + (red~ :initform + '(name red type xcb:CARD16 size + (logand + (+ + (xcb:-fieldref 'size) + 1) + (lognot 1))) + :type xcb:-list) + (red :initarg :red :type xcb:-ignore) + (green~ :initform + '(name green type xcb:CARD16 size + (logand + (+ + (xcb:-fieldref 'size) + 1) + (lognot 1))) + :type xcb:-list) + (green :initarg :green :type xcb:-ignore) + (blue~ :initform + '(name blue type xcb:CARD16 size + (logand + (+ + (xcb:-fieldref 'size) + 1) + (lognot 1))) + :type xcb:-list) + (blue :initarg :blue :type xcb:-ignore))) + +(defclass xcb:xf86vidmode:GetGammaRampSize + (xcb:-request) + ((~opcode :initform 19 :type xcb:-u1) + (screen :initarg :screen :type xcb:CARD16) + (pad~0 :initform 2 :type xcb:-pad))) +(defclass xcb:xf86vidmode:GetGammaRampSize~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (size :initarg :size :type xcb:CARD16) + (pad~1 :initform 22 :type xcb:-pad))) + +(defclass xcb:xf86vidmode:GetPermissions + (xcb:-request) + ((~opcode :initform 20 :type xcb:-u1) + (screen :initarg :screen :type xcb:CARD16) + (pad~0 :initform 2 :type xcb:-pad))) +(defclass xcb:xf86vidmode:GetPermissions~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (permissions :initarg :permissions :type xcb:CARD32) + (pad~1 :initform 20 :type xcb:-pad))) + +(defclass xcb:xf86vidmode:BadClock + (xcb:-error) + ((~code :initform 0))) + +(defclass xcb:xf86vidmode:BadHTimings + (xcb:-error) + ((~code :initform 1))) + +(defclass xcb:xf86vidmode:BadVTimings + (xcb:-error) + ((~code :initform 2))) + +(defclass xcb:xf86vidmode:ModeUnsuitable + (xcb:-error) + ((~code :initform 3))) + +(defclass xcb:xf86vidmode:ExtensionDisabled + (xcb:-error) + ((~code :initform 4))) + +(defclass xcb:xf86vidmode:ClientNotLocal + (xcb:-error) + ((~code :initform 5))) + +(defclass xcb:xf86vidmode:ZoomLocked + (xcb:-error) + ((~code :initform 6))) + +(defconst xcb:xf86vidmode:error-number-class-alist + '((0 . xcb:xf86vidmode:BadClock) + (1 . xcb:xf86vidmode:BadHTimings) + (2 . xcb:xf86vidmode:BadVTimings) + (3 . xcb:xf86vidmode:ModeUnsuitable) + (4 . xcb:xf86vidmode:ExtensionDisabled) + (5 . xcb:xf86vidmode:ClientNotLocal) + (6 . xcb:xf86vidmode:ZoomLocked)) + "(error-number . error-class) alist.") + + + +(provide 'xcb-xf86vidmode) + +;;; xcb-xf86vidmode.el ends here diff --git a/elpa/xelb-0.18/xcb-xfixes.el b/elpa/xelb-0.18/xcb-xfixes.el new file mode 100644 index 0000000..2835d2a --- /dev/null +++ b/elpa/xelb-0.18/xcb-xfixes.el @@ -0,0 +1,435 @@ +;;; xcb-xfixes.el --- X11 XFixes extension -*- lexical-binding: t -*- + +;; Copyright (C) 2015-2019 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This file was generated by 'el_client.el' from 'xfixes.xml', +;; which you can retrieve from . + +;;; Code: + +(require 'xcb-types) + +(defconst xcb:xfixes:-extension-xname "XFIXES") +(defconst xcb:xfixes:-extension-name "XFixes") +(defconst xcb:xfixes:-major-version 5) +(defconst xcb:xfixes:-minor-version 0) + +(require 'xcb-xproto) + +(require 'xcb-render) + +(require 'xcb-shape) + +(defclass xcb:xfixes:QueryVersion + (xcb:-request) + ((~opcode :initform 0 :type xcb:-u1) + (client-major-version :initarg :client-major-version :type xcb:CARD32) + (client-minor-version :initarg :client-minor-version :type xcb:CARD32))) +(defclass xcb:xfixes:QueryVersion~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (major-version :initarg :major-version :type xcb:CARD32) + (minor-version :initarg :minor-version :type xcb:CARD32) + (pad~1 :initform 16 :type xcb:-pad))) + +(defconst xcb:xfixes:SaveSetMode:Insert 0) +(defconst xcb:xfixes:SaveSetMode:Delete 1) + +(defconst xcb:xfixes:SaveSetTarget:Nearest 0) +(defconst xcb:xfixes:SaveSetTarget:Root 1) + +(defconst xcb:xfixes:SaveSetMapping:Map 0) +(defconst xcb:xfixes:SaveSetMapping:Unmap 1) + +(defclass xcb:xfixes:ChangeSaveSet + (xcb:-request) + ((~opcode :initform 1 :type xcb:-u1) + (mode :initarg :mode :type xcb:BYTE) + (target :initarg :target :type xcb:BYTE) + (map :initarg :map :type xcb:BYTE) + (pad~0 :initform 1 :type xcb:-pad) + (window :initarg :window :type xcb:WINDOW))) + +(defconst xcb:xfixes:SelectionEvent:SetSelectionOwner 0) +(defconst xcb:xfixes:SelectionEvent:SelectionWindowDestroy 1) +(defconst xcb:xfixes:SelectionEvent:SelectionClientClose 2) + +(defconst xcb:xfixes:SelectionEventMask:SetSelectionOwner 1) +(defconst xcb:xfixes:SelectionEventMask:SelectionWindowDestroy 2) +(defconst xcb:xfixes:SelectionEventMask:SelectionClientClose 4) + +(defclass xcb:xfixes:SelectionNotify + (xcb:-event) + ((~code :initform 0) + (subtype :initarg :subtype :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (window :initarg :window :type xcb:WINDOW) + (owner :initarg :owner :type xcb:WINDOW) + (selection :initarg :selection :type xcb:ATOM) + (timestamp :initarg :timestamp :type xcb:TIMESTAMP) + (selection-timestamp :initarg :selection-timestamp :type xcb:TIMESTAMP) + (pad~0 :initform 8 :type xcb:-pad))) + +(defclass xcb:xfixes:SelectSelectionInput + (xcb:-request) + ((~opcode :initform 2 :type xcb:-u1) + (window :initarg :window :type xcb:WINDOW) + (selection :initarg :selection :type xcb:ATOM) + (event-mask :initarg :event-mask :type xcb:CARD32))) + +(defconst xcb:xfixes:CursorNotify:DisplayCursor 0) + +(defconst xcb:xfixes:CursorNotifyMask:DisplayCursor 1) + +(defclass xcb:xfixes:CursorNotify + (xcb:-event) + ((~code :initform 1) + (subtype :initarg :subtype :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (window :initarg :window :type xcb:WINDOW) + (cursor-serial :initarg :cursor-serial :type xcb:CARD32) + (timestamp :initarg :timestamp :type xcb:TIMESTAMP) + (name :initarg :name :type xcb:ATOM) + (pad~0 :initform 12 :type xcb:-pad))) + +(defclass xcb:xfixes:SelectCursorInput + (xcb:-request) + ((~opcode :initform 3 :type xcb:-u1) + (window :initarg :window :type xcb:WINDOW) + (event-mask :initarg :event-mask :type xcb:CARD32))) + +(defclass xcb:xfixes:GetCursorImage + (xcb:-request) + ((~opcode :initform 4 :type xcb:-u1))) +(defclass xcb:xfixes:GetCursorImage~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (x :initarg :x :type xcb:INT16) + (y :initarg :y :type xcb:INT16) + (width :initarg :width :type xcb:CARD16) + (height :initarg :height :type xcb:CARD16) + (xhot :initarg :xhot :type xcb:CARD16) + (yhot :initarg :yhot :type xcb:CARD16) + (cursor-serial :initarg :cursor-serial :type xcb:CARD32) + (pad~1 :initform 8 :type xcb:-pad) + (cursor-image~ :initform + '(name cursor-image type xcb:CARD32 size + (* + (xcb:-fieldref 'width) + (xcb:-fieldref 'height))) + :type xcb:-list) + (cursor-image :initarg :cursor-image :type xcb:-ignore))) + +(xcb:deftypealias 'xcb:xfixes:REGION 'xcb:-u4) + +(defclass xcb:xfixes:BadRegion + (xcb:-error) + ((~code :initform 0))) + +(defconst xcb:xfixes:Region:None 0) + +(defclass xcb:xfixes:CreateRegion + (xcb:-request) + ((~opcode :initform 5 :type xcb:-u1) + (region :initarg :region :type xcb:xfixes:REGION) + (rectangles~ :initform + '(name rectangles type xcb:RECTANGLE size nil) + :type xcb:-list) + (rectangles :initarg :rectangles :type xcb:-ignore))) + +(defclass xcb:xfixes:CreateRegionFromBitmap + (xcb:-request) + ((~opcode :initform 6 :type xcb:-u1) + (region :initarg :region :type xcb:xfixes:REGION) + (bitmap :initarg :bitmap :type xcb:PIXMAP))) + +(defclass xcb:xfixes:CreateRegionFromWindow + (xcb:-request) + ((~opcode :initform 7 :type xcb:-u1) + (region :initarg :region :type xcb:xfixes:REGION) + (window :initarg :window :type xcb:WINDOW) + (kind :initarg :kind :type xcb:shape:KIND) + (pad~0 :initform 3 :type xcb:-pad))) + +(defclass xcb:xfixes:CreateRegionFromGC + (xcb:-request) + ((~opcode :initform 8 :type xcb:-u1) + (region :initarg :region :type xcb:xfixes:REGION) + (gc :initarg :gc :type xcb:GCONTEXT))) + +(defclass xcb:xfixes:CreateRegionFromPicture + (xcb:-request) + ((~opcode :initform 9 :type xcb:-u1) + (region :initarg :region :type xcb:xfixes:REGION) + (picture :initarg :picture :type xcb:render:PICTURE))) + +(defclass xcb:xfixes:DestroyRegion + (xcb:-request) + ((~opcode :initform 10 :type xcb:-u1) + (region :initarg :region :type xcb:xfixes:REGION))) + +(defclass xcb:xfixes:SetRegion + (xcb:-request) + ((~opcode :initform 11 :type xcb:-u1) + (region :initarg :region :type xcb:xfixes:REGION) + (rectangles~ :initform + '(name rectangles type xcb:RECTANGLE size nil) + :type xcb:-list) + (rectangles :initarg :rectangles :type xcb:-ignore))) + +(defclass xcb:xfixes:CopyRegion + (xcb:-request) + ((~opcode :initform 12 :type xcb:-u1) + (source :initarg :source :type xcb:xfixes:REGION) + (destination :initarg :destination :type xcb:xfixes:REGION))) + +(defclass xcb:xfixes:UnionRegion + (xcb:-request) + ((~opcode :initform 13 :type xcb:-u1) + (source1 :initarg :source1 :type xcb:xfixes:REGION) + (source2 :initarg :source2 :type xcb:xfixes:REGION) + (destination :initarg :destination :type xcb:xfixes:REGION))) + +(defclass xcb:xfixes:IntersectRegion + (xcb:-request) + ((~opcode :initform 14 :type xcb:-u1) + (source1 :initarg :source1 :type xcb:xfixes:REGION) + (source2 :initarg :source2 :type xcb:xfixes:REGION) + (destination :initarg :destination :type xcb:xfixes:REGION))) + +(defclass xcb:xfixes:SubtractRegion + (xcb:-request) + ((~opcode :initform 15 :type xcb:-u1) + (source1 :initarg :source1 :type xcb:xfixes:REGION) + (source2 :initarg :source2 :type xcb:xfixes:REGION) + (destination :initarg :destination :type xcb:xfixes:REGION))) + +(defclass xcb:xfixes:InvertRegion + (xcb:-request) + ((~opcode :initform 16 :type xcb:-u1) + (source :initarg :source :type xcb:xfixes:REGION) + (bounds :initarg :bounds :type xcb:RECTANGLE) + (destination :initarg :destination :type xcb:xfixes:REGION))) + +(defclass xcb:xfixes:TranslateRegion + (xcb:-request) + ((~opcode :initform 17 :type xcb:-u1) + (region :initarg :region :type xcb:xfixes:REGION) + (dx :initarg :dx :type xcb:INT16) + (dy :initarg :dy :type xcb:INT16))) + +(defclass xcb:xfixes:RegionExtents + (xcb:-request) + ((~opcode :initform 18 :type xcb:-u1) + (source :initarg :source :type xcb:xfixes:REGION) + (destination :initarg :destination :type xcb:xfixes:REGION))) + +(defclass xcb:xfixes:FetchRegion + (xcb:-request) + ((~opcode :initform 19 :type xcb:-u1) + (region :initarg :region :type xcb:xfixes:REGION))) +(defclass xcb:xfixes:FetchRegion~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (extents :initarg :extents :type xcb:RECTANGLE) + (pad~1 :initform 16 :type xcb:-pad) + (rectangles~ :initform + '(name rectangles type xcb:RECTANGLE size + (/ + (xcb:-fieldref 'length) + 2)) + :type xcb:-list) + (rectangles :initarg :rectangles :type xcb:-ignore))) + +(defclass xcb:xfixes:SetGCClipRegion + (xcb:-request) + ((~opcode :initform 20 :type xcb:-u1) + (gc :initarg :gc :type xcb:GCONTEXT) + (region :initarg :region :type xcb:xfixes:REGION) + (x-origin :initarg :x-origin :type xcb:INT16) + (y-origin :initarg :y-origin :type xcb:INT16))) + +(defclass xcb:xfixes:SetWindowShapeRegion + (xcb:-request) + ((~opcode :initform 21 :type xcb:-u1) + (dest :initarg :dest :type xcb:WINDOW) + (dest-kind :initarg :dest-kind :type xcb:shape:KIND) + (pad~0 :initform 3 :type xcb:-pad) + (x-offset :initarg :x-offset :type xcb:INT16) + (y-offset :initarg :y-offset :type xcb:INT16) + (region :initarg :region :type xcb:xfixes:REGION))) + +(defclass xcb:xfixes:SetPictureClipRegion + (xcb:-request) + ((~opcode :initform 22 :type xcb:-u1) + (picture :initarg :picture :type xcb:render:PICTURE) + (region :initarg :region :type xcb:xfixes:REGION) + (x-origin :initarg :x-origin :type xcb:INT16) + (y-origin :initarg :y-origin :type xcb:INT16))) + +(defclass xcb:xfixes:SetCursorName + (xcb:-request) + ((~opcode :initform 23 :type xcb:-u1) + (cursor :initarg :cursor :type xcb:CURSOR) + (nbytes :initarg :nbytes :type xcb:CARD16) + (pad~0 :initform 2 :type xcb:-pad) + (name~ :initform + '(name name type xcb:char size + (xcb:-fieldref 'nbytes)) + :type xcb:-list) + (name :initarg :name :type xcb:-ignore))) + +(defclass xcb:xfixes:GetCursorName + (xcb:-request) + ((~opcode :initform 24 :type xcb:-u1) + (cursor :initarg :cursor :type xcb:CURSOR))) +(defclass xcb:xfixes:GetCursorName~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (atom :initarg :atom :type xcb:ATOM) + (nbytes :initarg :nbytes :type xcb:CARD16) + (pad~1 :initform 18 :type xcb:-pad) + (name~ :initform + '(name name type xcb:char size + (xcb:-fieldref 'nbytes)) + :type xcb:-list) + (name :initarg :name :type xcb:-ignore))) + +(defclass xcb:xfixes:GetCursorImageAndName + (xcb:-request) + ((~opcode :initform 25 :type xcb:-u1))) +(defclass xcb:xfixes:GetCursorImageAndName~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (x :initarg :x :type xcb:INT16) + (y :initarg :y :type xcb:INT16) + (width :initarg :width :type xcb:CARD16) + (height :initarg :height :type xcb:CARD16) + (xhot :initarg :xhot :type xcb:CARD16) + (yhot :initarg :yhot :type xcb:CARD16) + (cursor-serial :initarg :cursor-serial :type xcb:CARD32) + (cursor-atom :initarg :cursor-atom :type xcb:ATOM) + (nbytes :initarg :nbytes :type xcb:CARD16) + (pad~1 :initform 2 :type xcb:-pad) + (cursor-image~ :initform + '(name cursor-image type xcb:CARD32 size + (* + (xcb:-fieldref 'width) + (xcb:-fieldref 'height))) + :type xcb:-list) + (cursor-image :initarg :cursor-image :type xcb:-ignore) + (name~ :initform + '(name name type xcb:char size + (xcb:-fieldref 'nbytes)) + :type xcb:-list) + (name :initarg :name :type xcb:-ignore))) + +(defclass xcb:xfixes:ChangeCursor + (xcb:-request) + ((~opcode :initform 26 :type xcb:-u1) + (source :initarg :source :type xcb:CURSOR) + (destination :initarg :destination :type xcb:CURSOR))) + +(defclass xcb:xfixes:ChangeCursorByName + (xcb:-request) + ((~opcode :initform 27 :type xcb:-u1) + (src :initarg :src :type xcb:CURSOR) + (nbytes :initarg :nbytes :type xcb:CARD16) + (pad~0 :initform 2 :type xcb:-pad) + (name~ :initform + '(name name type xcb:char size + (xcb:-fieldref 'nbytes)) + :type xcb:-list) + (name :initarg :name :type xcb:-ignore))) + +(defclass xcb:xfixes:ExpandRegion + (xcb:-request) + ((~opcode :initform 28 :type xcb:-u1) + (source :initarg :source :type xcb:xfixes:REGION) + (destination :initarg :destination :type xcb:xfixes:REGION) + (left :initarg :left :type xcb:CARD16) + (right :initarg :right :type xcb:CARD16) + (top :initarg :top :type xcb:CARD16) + (bottom :initarg :bottom :type xcb:CARD16))) + +(defclass xcb:xfixes:HideCursor + (xcb:-request) + ((~opcode :initform 29 :type xcb:-u1) + (window :initarg :window :type xcb:WINDOW))) + +(defclass xcb:xfixes:ShowCursor + (xcb:-request) + ((~opcode :initform 30 :type xcb:-u1) + (window :initarg :window :type xcb:WINDOW))) + +(xcb:deftypealias 'xcb:xfixes:BARRIER 'xcb:-u4) + +(defconst xcb:xfixes:BarrierDirections:PositiveX 1) +(defconst xcb:xfixes:BarrierDirections:PositiveY 2) +(defconst xcb:xfixes:BarrierDirections:NegativeX 4) +(defconst xcb:xfixes:BarrierDirections:NegativeY 8) + +(defclass xcb:xfixes:CreatePointerBarrier + (xcb:-request) + ((~opcode :initform 31 :type xcb:-u1) + (barrier :initarg :barrier :type xcb:xfixes:BARRIER) + (window :initarg :window :type xcb:WINDOW) + (x1 :initarg :x1 :type xcb:CARD16) + (y1 :initarg :y1 :type xcb:CARD16) + (x2 :initarg :x2 :type xcb:CARD16) + (y2 :initarg :y2 :type xcb:CARD16) + (directions :initarg :directions :type xcb:CARD32) + (pad~0 :initform 2 :type xcb:-pad) + (num-devices :initarg :num-devices :type xcb:CARD16) + (devices~ :initform + '(name devices type xcb:CARD16 size + (xcb:-fieldref 'num-devices)) + :type xcb:-list) + (devices :initarg :devices :type xcb:-ignore))) + +(defclass xcb:xfixes:DeletePointerBarrier + (xcb:-request) + ((~opcode :initform 32 :type xcb:-u1) + (barrier :initarg :barrier :type xcb:xfixes:BARRIER))) + +(defconst xcb:xfixes:error-number-class-alist + '((0 . xcb:xfixes:BadRegion)) + "(error-number . error-class) alist.") + +(defconst xcb:xfixes:event-number-class-alist + '((0 . xcb:xfixes:SelectionNotify) + (1 . xcb:xfixes:CursorNotify)) + "(event-number . event-class) alist.") + + + +(provide 'xcb-xfixes) + +;;; xcb-xfixes.el ends here diff --git a/elpa/xelb-0.18/xcb-xim.el b/elpa/xelb-0.18/xcb-xim.el new file mode 100644 index 0000000..8162da3 --- /dev/null +++ b/elpa/xelb-0.18/xcb-xim.el @@ -0,0 +1,1022 @@ +;;; xcb-xim.el --- XIM Protocol -*- lexical-binding: t -*- + +;; Copyright (C) 2015-2019 Free Software Foundation, Inc. + +;; Author: Chris Feng + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This library implements the X Input Method Protocol. + +;; Please note that the byte order of an XIM packet can be different from that +;; of X packets. Moreover, if you are writing an XIM server, the byte order is +;; actually specified by the client. Therefore we provide a different global +;; variable `xim:lsb' to indicate the byte order of classes in this library. +;; You should let-bind it whenever creating new objects. + +;; Todo: +;; + Add extension support. + +;; References: +;; + XIM (http://www.x.org/releases/X11R7.7/doc/libX11/XIM/xim.txt) + +;;; Code: + +(require 'xcb-types) +(require 'xcb-xlib) + +;;;; Protocol number + +(defconst xim:opcode:connect 1) +(defconst xim:opcode:connect-reply 2) +(defconst xim:opcode:disconnect 3) +(defconst xim:opcode:disconnect-reply 4) + +(defconst xim:opcode:auth-required 10) +(defconst xim:opcode:auth-reply 11) +(defconst xim:opcode:auth-next 12) +(defconst xim:opcode:auth-setup 13) +(defconst xim:opcode:auth-ng 14) + +(defconst xim:opcode:error 20) + +(defconst xim:opcode:open 30) +(defconst xim:opcode:open-reply 31) +(defconst xim:opcode:close 32) +(defconst xim:opcode:close-reply 33) +(defconst xim:opcode:register-triggerkeys 34) +(defconst xim:opcode:trigger-notify 35) +(defconst xim:opcode:trigger-notify-reply 36) +(defconst xim:opcode:set-event-mask 37) +(defconst xim:opcode:encoding-negotiation 38) +(defconst xim:opcode:encoding-negotiation-reply 39) +(defconst xim:opcode:query-extension 40) +(defconst xim:opcode:query-extension-reply 41) +(defconst xim:opcode:set-im-values 42) +(defconst xim:opcode:set-im-values-reply 43) +(defconst xim:opcode:get-im-values 44) +(defconst xim:opcode:get-im-values-reply 45) + +(defconst xim:opcode:create-ic 50) +(defconst xim:opcode:create-ic-reply 51) +(defconst xim:opcode:destroy-ic 52) +(defconst xim:opcode:destroy-ic-reply 53) +(defconst xim:opcode:set-ic-values 54) +(defconst xim:opcode:set-ic-values-reply 55) +(defconst xim:opcode:get-ic-values 56) +(defconst xim:opcode:get-ic-values-reply 57) +(defconst xim:opcode:set-ic-focus 58) +(defconst xim:opcode:unset-ic-focus 59) +(defconst xim:opcode:forward-event 60) +(defconst xim:opcode:sync 61) +(defconst xim:opcode:sync-reply 62) +(defconst xim:opcode:commit 63) +(defconst xim:opcode:reset-ic 64) +(defconst xim:opcode:reset-ic-reply 65) + +(defconst xim:opcode:geometry 70) +(defconst xim:opcode:str-conversion 71) +(defconst xim:opcode:str-conversion-reply 72) +(defconst xim:opcode:preedit-start 73) +(defconst xim:opcode:preedit-start-reply 74) +(defconst xim:opcode:preedit-draw 75) +(defconst xim:opcode:preedit-caret 76) +(defconst xim:opcode:preedit-caret-reply 77) +(defconst xim:opcode:preedit-done 78) +(defconst xim:opcode:status-start 79) +(defconst xim:opcode:status-draw 80) +(defconst xim:opcode:status-done 81) +(defconst xim:opcode:preeditstate 82) + +;;;; Basic requests packet format + +(eval-and-compile + (defvar xim:lsb xcb:lsb "Non-nil for LSB first, nil otherwise. + +Consider let-bind it rather than change its global value.")) + +(defclass xim:-struct (xcb:-struct) + ((~lsb :initform (symbol-value 'xim:lsb))) + :documentation "Struct type for XIM.") + +(defclass xim:-request (xim:-struct) + ((~major-opcode :type xcb:CARD8) + (~minor-opcode :initform 0 :type xcb:CARD8) + (~length :initform 0 :type xcb:CARD16)) + :documentation "XIM request type.") + +(cl-defmethod xcb:marshal ((obj xim:-request)) + "Return the byte-array representation of XIM request OBJ." + (let ((result (cl-call-next-method obj))) + (vconcat (substring result 0 2) + (funcall (if (slot-value obj '~lsb) + #'xcb:-pack-u2-lsb + #'xcb:-pack-u2) + (1- (/ (length result) 4))) + (substring result 4)))) + +;;;; Data types + +(xcb:deftypealias 'xim:BITMASK16 'xcb:CARD16) + +(xcb:deftypealias 'xim:BITMASK32 'xcb:CARD32) + +(defsubst xim:PADDING (N) + "Pad N to 4 bytes." + (% (- 4 (% N 4)) 4)) + +(xcb:deftypealias 'xim:LPCE 'xcb:char) + +(defclass xim:STRING (xim:-struct) + ((length :initarg :length :type xcb:-u2) + (string :initarg :string :type xcb:-ignore) + (string~ :initform '(name string type xim:LPCE size (xcb:-fieldref 'length)) + :type xcb:-list) + (pad~0 :initform '(xim:PADDING (+ 2 (xcb:-fieldref 'length))) + :type xcb:-pad))) + +(defclass xim:STR (xim:-struct) + ((length :initarg :length :type xcb:-u1) + (name :initarg :name :type xcb:-ignore) + (name~ :initform '(name name type xcb:char size (xcb:-fieldref 'length)) + :type xcb:-list))) + +(defclass xim:XIMATTR (xim:-struct) + ((id :initarg :id :type xcb:CARD16) + (type :initarg :type :type xcb:CARD16) + (length :initarg :length :type xcb:-u2) + (attribute :initarg :attribute :type xcb:-ignore) + (attribute~ :initform '(name attribute type xcb:char + size (xcb:-fieldref 'length)) + :type xcb:-list) + (pad~0 :initform '(xim:PADDING (+ 2 (xcb:-fieldref 'length))) + :type xcb:-pad))) + +(defclass xim:XICATTR (xim:XIMATTR) + nil) + +(defconst xim:ATTRIBUTE-VALUE-TYPE:separator-of-nestedlist 0) +(defconst xim:ATTRIBUTE-VALUE-TYPE:byte-data 1) +(defconst xim:ATTRIBUTE-VALUE-TYPE:word-data 2) +(defconst xim:ATTRIBUTE-VALUE-TYPE:long-data 3) +(defconst xim:ATTRIBUTE-VALUE-TYPE:char-data 4) +(defconst xim:ATTRIBUTE-VALUE-TYPE:window 5) +(defconst xim:ATTRIBUTE-VALUE-TYPE:xim-styles 10) +(defconst xim:ATTRIBUTE-VALUE-TYPE:x-rectangle 11) +(defconst xim:ATTRIBUTE-VALUE-TYPE:x-point 12) +(defconst xim:ATTRIBUTE-VALUE-TYPE:x-font-set 13) +(defconst xim:ATTRIBUTE-VALUE-TYPE:xim-hot-key-triggers 15) +(defconst xim:ATTRIBUTE-VALUE-TYPE:xim-string-conversion 17) +(defconst xim:ATTRIBUTE-VALUE-TYPE:xim-preedit-state 18) +(defconst xim:ATTRIBUTE-VALUE-TYPE:xim-reset-state 19) +(defconst xim:ATTRIBUTE-VALUE-TYPE:xim-nested-list #x7FFF) + +(defclass xim:XIMStyles (xim:-struct) + ((number :initarg :number :type xcb:-u2) + (pad~0 :initform 2 :type xcb:-pad) + (styles :initarg :styles :type xcb:-ignore) + (styles~ :initform '(name styles type xcb:CARD32 + size (/ (xcb:-fieldref 'number) 4)) + :type xcb:-list))) + +;; Auto set the number slot +(cl-defmethod xcb:marshal ((obj xim:XIMStyles)) + (setf (slot-value obj 'number) (* 4 (length (slot-value obj 'styles)))) + (cl-call-next-method obj)) + +(defclass xim:XFontSet (xim:-struct) + ((length :initarg :length :type xcb:-u2) + (base-font-name :initarg :base-font-name :type xcb:-ignore) + (base-font-name~ :initform '(name base-font-name type xim:LPCE + size (xcb:-fieldref 'length)) + :type xcb:-list) + (pad~0 :initform '(xim:PADDING (+ 2 (xcb:-fieldref 'length))) + :type xcb:-pad))) + +(defclass xim:XIMHotKeyTriggers (xim:-struct) + ((number :type xcb:-u4) + (triggers :type xcb:-ignore) + (triggers~ :initform '(name triggers type xim:XIMTRIGGERKEY + size (xcb:-fieldref 'number)) + :type xcb:-list) + (states :type xcb:-ignore) + (states~ :initform '(name states type xim:XIMHOTKEYSTATE + size (xcb:-fieldref 'number)) + :type xcb:-list))) + +(defclass xim:XIMTRIGGERKEY (xim:-struct) + ((keysym :initarg :keysym :type xcb:CARD32) + (modifier :initarg :modifier :type xcb:CARD32) + (modifier-mask :initarg :modifier-mask :type xcb:CARD32))) + +(defclass xim:ENCODINGINFO (xim:-struct) + ((length :initarg :length :type xcb:-u2) + (encoding-info :initarg :encoding-info :type xcb:-ignore) + (encoding-info~ :initform '(name encoding-info type xcb:char + size (xcb:-fieldref 'length)) + :type xcb:-list) + (pad~0 :initform '(xim:PADDING (+ 2 (xcb:-fieldref 'length))) + :type xcb:-pad))) + +(defclass xim:EXT (xim:-struct) + ((major-opcode :initarg :major-opcode :type xcb:CARD8) + (minor-opcode :initarg :minor-opcode :type xcb:CARD8) + (length :initarg :length :type xcb:-u2) + (name :initarg :name :type xcb:-ignore) + (name~ :initform '(name name type xcb:char size (xcb:-fieldref 'length)) + :type xcb:-list) + (pad~0 :initform '(xim:PADDING (xcb:-fieldref 'length)) :type xcb:-pad))) + +(defclass xim:XIMATTRIBUTE (xim:-struct) + ((id :initarg :id :type xcb:CARD16) + (length :initarg :length :type xcb:-u2) + (value :initarg :value :type xcb:-ignore) + (value~ :initform '(name value type xcb:void size (xcb:-fieldref 'length)) + :type xcb:-list) + (pad~0 :initform '(xim:PADDING (xcb:-fieldref 'length)) :type xcb:-pad))) + +(cl-defmethod xcb:marshal ((obj xim:XIMATTRIBUTE)) + (let ((value (slot-value obj 'value))) + (when (eieio-object-p value) + (setq value (xcb:marshal value)) + (setf (slot-value obj 'length) (length value) + (slot-value obj 'value) value)) + (cl-call-next-method obj))) + +(defclass xim:XICATTRIBUTE (xim:XIMATTRIBUTE) + nil) + +(defclass xim:XIMSTRCONVTEXT (xim:-struct) + ((feedback :initarg :feedback :type xcb:CARD16) + (string-length :initarg :string-length :type xcb:-u2) + (string :initarg :string :type xcb:-ignore) + (string~ :initform '(name string type xcb:char + size (xcb:-fieldref 'string-length)) + :type xcb:-list) + (pad~0 :initform '(xim:PADDING (xcb:-fieldref 'string-length)) + :type xcb:-pad) + (feedbacks-length :initarg :feedbacks-length :type xcb:-u2) + (pad~1 :initform 2 :type xcb:-pad) + (feedbacks :initarg :feedbacks :type xcb:-ignore) + (feedbacks~ :initform '(name feedbacks type xcb:void + size (xcb:-fieldref 'feedbacks-length)) + :type xcb:-list))) + +(cl-defmethod xcb:marshal ((obj xim:XIMSTRCONVTEXT)) + (let ((feedbacks (mapconcat 'xcb:marshal (slot-value obj 'feedbacks) []))) + (setf (slot-value obj 'feedbacks-length) (length feedbacks) + (slot-value obj 'feedbacks) feedbacks) + (cl-call-next-method obj))) + +(cl-defmethod xcb:unmarshal ((obj xim:XIMSTRCONVTEXT) byte-array) + (let ((retval (cl-call-next-method obj byte-array)) + (data (slot-value obj 'feedbacks)) + feedback feedbacks) + (while (< 0 (length data)) + (setq feedback (make-instance 'xim:XIMSTRCONVFEEDBACK) + data (substring data (xcb:unmarshal feedback data)) + feedbacks (nconc feedbacks (list feedback)))) + (setf (slot-value obj 'feedbacks) feedbacks) + retval)) + +(defconst xim:string-conversion:left-edge #x0000001) +(defconst xim:string-conversion:right-edge #x0000002) +(defconst xim:string-conversion:top-edge #x0000004) +(defconst xim:string-conversion:bottom-edge #x0000008) +(defconst xim:string-conversion:convealed #x0000010) +(defconst xim:string-conversion:wrapped #x0000020) + +(xcb:deftypealias 'xim:XIMFEEDBACK 'xcb:CARD32) + +;; FIXME: different from Xlib:XIM* +(defconst xim:reverse #x000001) +(defconst xim:underline #x000002) +(defconst xim:highlight #x000004) +(defconst xim:primary #x000008) +(defconst xim:secondary #x000010) +(defconst xim:tertiary #x000020) +(defconst xim:visible-to-forward #x000040) +(defconst xim:visible-to-backward #x000080) +(defconst xim:visible-center #x000100) + +(xcb:deftypealias 'xim:XIMHOTKEYSTATE 'xcb:CARD32) + +(defconst xim:hot-key-state:on #x0000001) +(defconst xim:hot-key-state:off #x0000002) + +(xcb:deftypealias 'xim:XIMPREEDITSTATE 'xcb:CARD32) + +(defconst xim:preedit:enable #x0000001) +(defconst xim:preedit:disable #x0000002) + +(xcb:deftypealias 'xim:XIMRESETSTATE 'xcb:CARD32) + +(defconst xim:initial-state #x0000001) +(defconst xim:preserve-state #x0000002) + +;;;; Error notification + +(defclass xim:error (xim:-request) + ((~major-opcode :initform xim:opcode:error) + (im-id :initarg :im-id :type xcb:CARD16) + (ic-id :initarg :ic-id :type xcb:CARD16) + (flag :initarg :flag :type xim:BITMASK16) + (error-code :initarg :error-code :type xcb:CARD16) + (length :initarg :length :type xcb:-u2) + (type :initarg :type :type xcb:CARD16) + (detail :initarg :detail :type xcb:-ignore) + (detail~ :initform '(name detail type xcb:char + size (xcb:-fieldref 'length)) :type xcb:-list) + (pad~0 :initform '(xim:PADDING (xcb:-fieldref 'length)) :type xcb:-pad))) + +(defconst xim:error-flag:invalid-both 0) +(defconst xim:error-flag:invalid-im-id 1) +(defconst xim:error-flag:invalid-ic-id 2) + +(defconst xim:error-code:bad-alloc 1) +(defconst xim:error-code:bad-style 2) +(defconst xim:error-code:bad-client-window 3) +(defconst xim:error-code:bad-focus-window 4) +(defconst xim:error-code:bad-area 5) +(defconst xim:error-code:bad-spot-location 6) +(defconst xim:error-code:bad-colormap 7) +(defconst xim:error-code:bad-atom 8) +(defconst xim:error-code:bad-pixel 9) +(defconst xim:error-code:bad-pixmap 10) +(defconst xim:error-code:bad-name 11) +(defconst xim:error-code:bad-cursor 12) +(defconst xim:error-code:bad-protocol 13) +(defconst xim:error-code:bad-foreground 14) +(defconst xim:error-code:bad-background 15) +(defconst xim:error-code:locale-not-supported 16) +(defconst xim:error-code:bad-something 999) + +;;;; Connection establishment + +(defclass xim:connect (xim:-request) + ((~major-opcode :initform xim:opcode:connect) + (byte-order :initarg :byte-order :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (major-version :initarg :major-version :type xcb:CARD16) + (minor-version :initarg :minor-version :type xcb:CARD16) + (number :initarg :number :type xcb:CARD16) + (auth-names :initarg :auth-names :type xcb:-ignore) + (auth-names~ :initform '(name auth-names type xim:STRING + size (xcb:-fieldref 'number)) + :type xcb:-list))) + +(defconst xim:connect-byte-order:msb-first #x42) +(defconst xim:connect-byte-order:lsb-first #x6c) + +(defclass xim:auth-required (xim:-request) + ((~major-opcode :initform xim:opcode:auth-required) + (index :initarg :index :type xcb:CARD8) + (pad~0 :initform 3 :type xcb:-pad) + (length :initarg :length :type xcb:-u2) + (pad~1 :initform 2 :type xcb:-pad) + (data :initarg :data :type xcb:-ignore) + (data~ :initform '(name data type xcb:void size (xcb:-fieldref 'length)) + :type xcb:-list) + (pad~1 :initform '(xim:PADDING (slot-value length)) :type xcb:-pad))) + +(defclass xim:auth-reply (xim:-request) + ((~major-opcode :initform xim:opcode:auth-reply) + (length :initarg :length :type xcb:-u2) + (pad~0 :initform 2 :type xcb:-pad) + (data :initarg :data :type xcb:-ignore) + (data~ :initform '(name data type xcb:void size (xcb:-fieldref 'length)) + :type xcb:-list) + (pad~1 :initform '(xim:PADDING (xcb:-fieldref 'length)) :type xcb:-pad))) + +(defclass xim:auth-next (xim:-request) + ((~major-opcode :initform xim:opcode:auth-next) + (length :initarg :length :type xcb:-u2) + (pad~0 :initform 2 :type xcb:-pad) + (data :initarg :data :type xcb:-ignore) + (data~ :initform '(name data type xcb:void size (xcb:-fieldref 'length)) + :type xcb:-list) + (pad~1 :initform '(xim:PADDING (xcb:-fieldref 'length)) :type xcb:-pad))) + +(defclass xim:auth-setup (xim:-request) + ((~major-opcode :initform xim:opcode:auth-setup) + (number :initarg :number :type xcb:CARD16) + (pad~0 :initform 2 :type xcb:-pad) + (names :initarg :names :type xcb:-ignore) + (names~ :initform '(name names type xim:STRING size (xcb:-fieldref 'number)) + :type xcb:-list))) + +(defclass xim:auth-ng (xim:-request) + ((~major-opcode :initform xim:opcode:auth-ng))) + +(defclass xim:connect-reply (xim:-request) + ((~major-opcode :initform xim:opcode:connect-reply) + ;; Default to version 1.0 + (major-version :initarg :major-version :initform 1 :type xcb:CARD16) + (minor-version :initarg :minor-version :initform 0 :type xcb:CARD16))) + +(defclass xim:disconnect (xim:-request) + ((~major-opcode :initform xim:opcode:disconnect))) + +(defclass xim:disconnect-reply (xim:-request) + ((~major-opcode :initform xim:opcode:disconnect-reply))) + +(defclass xim:open (xim:-request) + ((~major-opcode :initform xim:opcode:open) + (locale-name :initarg :locale-name :type xim:STR) + (pad~0 :initform '(xim:PADDING (1+ (slot-value (xcb:-fieldref 'locale-name) + 'length))) + :type xcb:-pad))) + +(defclass xim:open-reply (xim:-request) + ((~major-opcode :initform xim:opcode:open-reply) + (im-id :initarg :im-id :type xcb:CARD16) + (im-attrs-length :initarg :im-attrs-length :type xcb:-u2) + (im-attrs :initarg :im-attrs :type xcb:-ignore) + (im-attrs~ :initform '(name im-attrs type xcb:void + size (xcb:-fieldref 'im-attrs-length)) + :type xcb:-list) + (ic-attrs-length :initarg :ic-attrs-length :type xcb:-u2) + (pad~0 :initform 2 :type xcb:-pad) + (ic-attrs :initarg :ic-attrs :type xcb:-ignore) + (ic-attrs~ :initform '(name ic-attrs type xcb:void + size (xcb:-fieldref 'ic-attrs-length)) + :type xcb:-list))) + +(cl-defmethod xcb:marshal ((obj xim:open-reply)) + (let ((im-attrs (mapconcat #'xcb:marshal (slot-value obj 'im-attrs) [])) + (ic-attrs (mapconcat #'xcb:marshal (slot-value obj 'ic-attrs) []))) + (setf (slot-value obj 'im-attrs-length) (length im-attrs) + (slot-value obj 'im-attrs) im-attrs + (slot-value obj 'ic-attrs-length) (length ic-attrs) + (slot-value obj 'ic-attrs) ic-attrs) + (cl-call-next-method obj))) + +(cl-defmethod xcb:unmarshal ((obj xim:open-reply) byte-array) + (let ((retval (cl-call-next-method obj byte-array)) + (im-data (slot-value obj 'im-attrs)) + (ic-data (slot-value obj 'ic-attrs)) + im-attr im-attrs ic-attr ic-attrs) + (while (< 0 (length im-data)) + (setq im-attr (make-instance 'xim:XIMATTR) + im-data (substring im-data (xcb:unmarshal im-attr im-data)) + im-attrs (nconc im-attrs (list im-attr)))) + (while (< 0 (length ic-data)) + (setq ic-attr (make-instance 'xim:XICATTR) + ic-data (substring ic-data (xcb:unmarshal ic-attr ic-data)) + ic-attrs (nconc ic-attrs (list ic-attr)))) + (setf (slot-value obj 'im-attrs) im-attrs + (slot-value obj 'ic-attrs) ic-attrs) + retval)) + +(defclass xim:close (xim:-request) + ((~major-opcode :initform xim:opcode:close) + (im-id :initarg :im-id :type xcb:CARD16) + (pad~0 :initform 2 :type xcb:-pad))) + +(defclass xim:close-reply (xim:close) + ((~major-opcode :initform xim:opcode:close-reply))) + +;;;; Event flow control + +(defclass xim:set-event-mask (xim:-request) + ((~major-opcode :initform xim:opcode:set-event-mask) + (im-id :initarg :im-id :type xcb:CARD16) + (ic-id :initarg :ic-id :type xcb:CARD16) + (forward-event-mask :initarg :forward-event-mask :type xcb:-u4) + (synchronous-event-mask :initarg :synchronous-event-mask :type xcb:-u4))) + +(defclass xim:register-triggerkeys (xim:-request) + ((~major-opcode :initform xim:opcode:register-triggerkeys) + (im-id :initarg :im-id :type xcb:CARD16) + (pad~0 :initform 2 :type xcb:-pad) + (on-keys-length :initarg :on-keys-length :type xcb:-u4) + (on-keys :initarg :on-keys :type xcb:-ignore) + (on-keys~ :initform '(name on-keys type xim:XIMTRIGGERKEY + size (/ (xcb:-fieldref 'on-keys-length) 12)) + :type xcb:-list) + (off-keys-length :initarg :off-keys-length :type xcb:-u4) + (off-keys :initarg :off-keys :type xcb:-ignore) + (off-keys~ :initform '(name off-keys type xim:XIMTRIGGERKEY + size (/ (xcb:-fieldref 'off-keys-length) 12)) + :type xcb:-list))) + +(defclass xim:trigger-nofity (xim:-request) + ((~major-opcode :initform xim:opcode:trigger-notify) + (im-id :initarg :im-id :type xcb:CARD16) + (ic-id :initarg :ic-id :type xcb:CARD16) + (flag :initarg :flag :type xcb:CARD32) + (index :initarg :index :type xcb:CARD32) + (client-select-event-mask :initarg :client-select-event-mask + :type xcb:-u4))) + +(defconst xim:trigger-nofity-flag:on-keys 0) +(defconst xim:trigger-nofity-flag:off-keys 1) + +(defclass xim:trigger-nofity-reply (xim:-request) + ((~major-opcode :initform xim:opcode:trigger-notify-reply) + (im-id :initarg :im-id :type xcb:CARD16) + (ic-id :initarg :ic-id :type xcb:CARD16))) + +;;;; Encoding negotiation + +(defclass xim:encoding-negotiation (xim:-request) + ((~major-opcode :initform xim:opcode:encoding-negotiation) + (im-id :initarg :im-id :type xcb:CARD16) + (names-length :initarg :names-length :type xcb:-u2) + (names :initarg :names :type xcb:-ignore) + (names~ :initform '(name names type xcb:void + size (xcb:-fieldref 'names-length)) + :type xcb:-list) + (pad~0 :initform '(xim:PADDING (xcb:-fieldref 'names-length)) + :type xcb:-pad) + (encodings-length :initarg :encoding-length :type xcb:-u2) + (pad~1 :initform 2 :type xcb:-pad) + (encodings :initarg :encodings :type xcb:-ignore) + (encodings~ :initform '(name encodings type xcb:void + size (xcb:-fieldref 'encodings-length)) + :type xcb:-list))) + +(cl-defmethod xcb:marshal ((obj xim:encoding-negotiation)) + (let ((names (mapconcat #'xcb:marshal (slot-value obj 'names) [])) + (encodings (mapconcat #'xcb:marshal (slot-value obj 'encodings) []))) + (setf (slot-value obj 'names-length) (length names) + (slot-value obj 'names) names + (slot-value obj 'encodings-length) (length encodings) + (slot-value obj 'encodings) encodings) + (cl-call-next-method obj))) + +(cl-defmethod xcb:unmarshal ((obj xim:encoding-negotiation) byte-array) + (let ((retval (cl-call-next-method obj byte-array)) + (names-data (slot-value obj 'names)) + (encodings-data (slot-value obj 'encodings)) + name names encoding encodings) + (while (< 0 (length names-data)) + (setq name (make-instance 'xim:STR) + names-data (substring names-data (xcb:unmarshal name names-data)) + names (nconc names (list name)))) + (while (< 0 (length encodings-data)) + (setq encoding (make-instance 'xim:ENCODINGINFO) + encodings-data + (substring encodings-data (xcb:unmarshal encoding encodings-data)) + encodings (nconc encodings (list encoding)))) + (setf (slot-value obj 'names) names + (slot-value obj 'encodings) encodings) + retval)) + +(defclass xim:encoding-negotiation-reply (xim:-request) + ((~major-opcode :initform xim:opcode:encoding-negotiation-reply) + (im-id :initarg :im-id :type xcb:CARD16) + (category :initarg :category :type xcb:CARD16) + (index :initarg :index :type xcb:INT16) + (pad~0 :initform 2 :type xcb:-pad))) + +(defconst xim:encoding-negotiation-reply-category:name 0) +(defconst xim:encoding-negotiation-reply-category:data 1) + +;;;; Query the supported extension protocol list + +(defclass xim:query-extension (xim:-request) + ((~major-opcode :initform xim:opcode:query-extension) + (im-id :initarg :im-id :type xcb:CARD16) + (length :initarg :length :type xcb:-u2) + (extensions :initarg :extensions :type xcb:-ignore) + (extensions~ :initform '(name extensions type xcb:void + size (xcb:-fieldref 'length)) + :type xcb:-list) + (pad~0 :initform '(xim:PADDING (xcb:-fieldref 'length)) :type xcb:-pad))) + +(cl-defmethod xcb:marshal ((obj xim:query-extension)) + (let ((extensions (mapconcat #'xcb:marshal (slot-value obj 'extensions) []))) + (setf (slot-value obj 'length) (length extensions) + (slot-value obj 'extensions) extensions) + (cl-call-next-method obj))) + +(cl-defmethod xcb:unmarshal ((obj xim:query-extension) byte-array) + (let ((retval (cl-call-next-method obj byte-array)) + (data (slot-value obj 'extensions)) + extension extensions) + (while (< 0 (length data)) + (setq extension (make-instance 'xim:STR) + data (substring data (xcb:unmarshal extension data)) + extensions (nconc extensions (list extension)))) + (setf (slot-value obj 'extensions) extensions) + retval)) + +(defclass xim:query-extension-reply (xim:-request) + ((~major-opcode :initform xim:opcode:query-extension-reply) + (im-id :initarg :im-id :type xcb:CARD16) + (length :initarg :length :type xcb:-u2) + (extensions :initarg :extensions :type xcb:-ignore) + (extensions~ :initform '(name extensions type xcb:void + size (xcb:-fieldref 'length)) + :type xcb:-list))) + +(cl-defmethod xcb:marshal ((obj xim:query-extension-reply)) + (let ((extensions (mapconcat 'xcb:marshal (slot-value obj 'extensions) []))) + (setf (slot-value obj 'length) (length extensions) + (slot-value obj 'extensions) extensions) + (cl-call-next-method obj))) + +(cl-defmethod xcb:unmarshal ((obj xim:query-extension-reply) byte-array) + (let ((retval (cl-call-next-method obj byte-array)) + (data (slot-value obj 'extensions)) + extension extensions) + (while (< 0 (length data)) + (setq extension (make-instance 'xim:EXT) + data (substring data (xcb:unmarshal extension data)) + extensions (nconc extensions (list extension)))) + (setf (slot-value obj 'extensions) extensions) + retval)) + +;;;; Setting IM values + +(defclass xim:set-im-values (xim:-request) + ((~major-opcode :initform xim:opcode:set-im-values) + (im-id :initarg :im-id :type xcb:CARD16) + (length :initarg :length :type xcb:-u2) + (im-attributes :initarg :im-attributes :type xcb:-ignore) + (im-attributes~ :initform '(name im-attributes type xcb:void + size (xcb:-fieldref 'length)) + :type xcb:-list))) + +(cl-defmethod xcb:marshal ((obj xim:set-im-values)) + (let ((im-attributes (mapconcat #'xcb:marshal + (slot-value obj 'im-attributes) []))) + (setf (slot-value obj 'length) (length im-attributes) + (slot-value obj 'im-attributes) im-attributes) + (cl-call-next-method obj))) + +(defclass xim:set-im-values-reply (xim:-request) + ((~major-opcode :initform xim:opcode:set-im-values-reply) + (im-id :initarg :im-id :type xcb:CARD16) + (pad~0 :initform 2 :type xcb:-pad))) + +;;;; Getting IM values + +(defclass xim:get-im-values (xim:-request) + ((~major-opcode :initform xim:opcode:get-im-values) + (im-id :initarg :im-id :type xcb:CARD16) + (length :initarg :length :type xcb:-u2) + (im-attributes-id :initarg :im-attributes-id :type xcb:-ignore) + (im-attributes-id~ :initform '(name im-attributes-id type xcb:CARD16 + size (/ (xcb:-fieldref 'length) 2)) + :type xcb:-list))) + +(defclass xim:get-im-values-reply (xim:set-im-values) + ((~major-opcode :initform xim:opcode:get-im-values-reply))) + +;;;; Creating an IC + +(defclass xim:create-ic (xim:-request) + ((~major-opcode :initform xim:opcode:create-ic) + (im-id :initarg :im-id :type xcb:CARD16) + (length :initarg :length :type xcb:-u2) + (ic-attributes :initarg :ic-attributes :type xcb:-ignore) + (ic-attributes~ :initform '(name ic-attributes type xcb:void + size (xcb:-fieldref 'length)) + :type xcb:-list))) + +(cl-defmethod xcb:marshal ((obj xim:create-ic)) + (let ((ic-attributes (mapconcat #'xcb:marshal + (slot-value obj 'ic-attributes) []))) + (setf (slot-value obj 'length) (length ic-attributes) + (slot-value obj 'ic-attributes) ic-attributes) + (cl-call-next-method obj))) + +(cl-defmethod xcb:unmarshal ((obj xim:create-ic) byte-array) + (let ((retval (cl-call-next-method obj byte-array)) + (data (slot-value obj 'ic-attributes)) + ic-attribute ic-attributes) + (while (< 0 (length data)) + (setq ic-attribute (make-instance 'xim:XICATTRIBUTE) + data (substring data (xcb:unmarshal ic-attribute data)) + ic-attributes (nconc ic-attributes (list ic-attribute)))) + (setf (slot-value obj 'ic-attributes) ic-attributes) + retval)) + +(defclass xim:create-ic-reply (xim:-request) + ((~major-opcode :initform xim:opcode:create-ic-reply) + (im-id :initarg :im-id :type xcb:CARD16) + (ic-id :initarg :ic-id :type xcb:CARD16))) + +;;;; Destroy the IC + +(defclass xim:destroy-ic (xim:-request) + ((~major-opcode :initform xim:opcode:destroy-ic) + (im-id :initarg :im-id :type xcb:CARD16) + (ic-id :initarg :ic-id :type xcb:CARD16))) + +(defclass xim:destroy-ic-reply (xim:-request) + ((~major-opcode :initform xim:opcode:destroy-ic-reply) + (im-id :initarg :im-id :type xcb:CARD16) + (ic-id :initarg :ic-id :type xcb:CARD16))) + +;;;; Setting IC values + +(defclass xim:set-ic-values (xim:-request) + ((~major-opcode :initform xim:opcode:set-ic-values) + (im-id :initarg :im-id :type xcb:CARD16) + (ic-id :initarg :ic-id :type xcb:CARD16) + (length :initarg :length :type xcb:-u2) + (pad~0 :initform 2 :type xcb:-pad) + (ic-attributes :initarg :ic-attributes :type xcb:-ignore) + (ic-attributes~ :initform '(name ic-attributes type xcb:void + size (xcb:-fieldref 'length)) + :type xcb:-list))) + +(cl-defmethod xcb:marshal ((obj xim:set-ic-values)) + (let ((ic-attributes (mapconcat 'xcb:marshal + (slot-value obj 'ic-attributes) []))) + (setf (slot-value obj 'length) (length ic-attributes) + (slot-value obj 'ic-attributes) ic-attributes) + (cl-call-next-method obj))) + +(defclass xim:set-ic-values-reply (xim:-request) + ((~major-opcode :initform xim:opcode:set-ic-values-reply) + (im-id :initarg :im-id :type xcb:CARD16) + (ic-id :initarg :ic-id :type xcb:CARD16))) + +;;;; Getting IC values + +(defclass xim:get-ic-values (xim:-request) + ((~major-opcode :initform xim:opcode:get-ic-values) + (im-id :initarg :im-id :type xcb:CARD16) + (ic-id :initarg :ic-id :type xcb:CARD16) + (length :initarg :length :type xcb:-u2) + (ic-attributes-id :initarg :ic-attributes-id :type xcb:-ignore) + (ic-attributes-id~ :initform '(name ic-attributes-id type xcb:CARD16 + size (/ (xcb:-fieldref 'length) 2)) + :type xcb:-list) + (pad~0 :initform '(xim:PADDING (+ 2 (xcb:-fieldref 'length))) + :type xcb:-pad))) + +(defclass xim:get-ic-values-reply (xim:set-ic-values) + ((~major-opcode :initform xim:opcode:get-ic-values-reply))) + +;;;; Setting IC focus + +(defclass xim:set-ic-focus (xim:-request) + ((~major-opcode :initform xim:opcode:set-ic-focus) + (im-id :initarg :im-id :type xcb:CARD16) + (ic-id :initarg :ic-id :type xcb:CARD16))) + +;;;; Unsetting IC focus + +(defclass xim:unset-ic-focus (xim:-request) + ((~major-opcode :initform xim:opcode:unset-ic-focus) + (im-id :initarg :im-id :type xcb:CARD16) + (ic-id :initarg :ic-id :type xcb:CARD16))) + +;;;; Filtering events + +(defclass xim:forward-event (xim:-request) + ((~major-opcode :initform xim:opcode:forward-event) + (im-id :initarg :im-id :type xcb:CARD16) + (ic-id :initarg :ic-id :type xcb:CARD16) + (flag :initarg :flag :type xim:BITMASK16) + (serial-number :initarg :serial-number :type xcb:CARD16) + (event :initarg :event :type xcb:-ignore) + (event~ :initform '(name event type xcb:void size 32) :type xcb:-list))) + +(defconst xim:forward-event-flag:synchronous 1) +(defconst xim:forward-event-flag:request-filtering 2) +(defconst xim:forward-event-flag:request-lookupstring 4) + +;;;; Synchronizing with the IM server + +(defclass xim:sync (xim:-request) + ((~major-opcode :initform xim:opcode:sync) + (im-id :initarg :im-id :type xcb:CARD16) + (ic-id :initarg :ic-id :type xcb:CARD16))) + +(defclass xim:sync-reply (xim:-request) + ((~major-opcode :initform xim:opcode:sync-reply) + (im-id :initarg :im-id :type xcb:CARD16) + (ic-id :initarg :ic-id :type xcb:CARD16))) + +;;;; Sending a committed string + +(defclass xim:commit (xim:-request) + ((~major-opcode :initform xim:opcode:commit) + (im-id :initarg :im-id :type xcb:CARD16) + (ic-id :initarg :ic-id :type xcb:CARD16) + (flag :initarg :flag :type xim:BITMASK16))) + +(defconst xim:commit-flag:synchronous 1) +;; FIXME: different from Xlib:XLookup* +(defconst xim:commit-flag:x-lookup-chars 2) +(defconst xim:commit-flag:x-lookup-key-sym 4) +(defconst xim:commit-flag:x-lookup-both 6) + +(defclass xim:commit-x-lookup-key-sym (xim:commit) + ((flag :initform xim:commit-flag:x-lookup-key-sym) + (pad~0 :initform 2 :type xcb:-pad) + (key-sym :initarg :key-sym :type xcb:KEYSYM))) + +(defclass xim:commit-x-lookup-chars (xim:commit) + ((flag :initform xim:commit-flag:x-lookup-chars) + (length :initarg :length :type xcb:-u2) + (string :initarg :string :type xcb:-ignore) + (string~ :initform '(name string type xcb:BYTE size (xcb:-fieldref 'length)) + :type xcb:-list) + (pad~1 :initform '(xim:PADDING (xcb:-fieldref 'length)) :type xcb:-pad))) + +(defclass xim:commit-x-lookup-both (xim:commit-x-lookup-key-sym + xim:commit-x-lookup-chars) + ((flag :initform xim:commit-flag:x-lookup-both) + (pad~1 :initform '(xim:PADDING (+ 2 (xcb:-fieldref 'length))) + :type xcb:-pad))) + +;;;; Reset IC + +(defclass xim:reset-ic (xim:-request) + ((~major-opcode :initform xim:opcode:reset-ic) + (im-id :initarg :im-id :type xcb:CARD16) + (ic-id :initarg :ic-id :type xcb:CARD16))) + +(defclass xim:reset-ic-reply (xim:-request) + ((~major-opcode :initform xim:opcode:reset-ic-reply) + (im-id :initarg :im-id :type xcb:CARD16) + (ic-id :initarg :ic-id :type xcb:CARD16) + (length :initarg :length :type xcb:-u2) + (string :initarg :string :type xcb:-ignore) + (string~ :initform '(name string type xcb:BYTE size (xcb:-fieldref 'length)) + :type xcb:-list) + (pad~0 :initform '(xim:PADDING (+ 2 (xcb:-fieldref 'length))) + :type xcb:-pad))) + +;;;; Callbacks + +;; Negotiating geometry +(defclass xim:geometry (xim:-request) + ((~major-opcode :initform xim:opcode:geometry) + (im-id :initarg :im-id :type xcb:CARD16) + (ic-id :initarg :ic-id :type xcb:CARD16))) + +;; Converting a string +(defclass xim:str-conversion (xim:-request) + ((~major-opcode :initform xim:opcode:str-conversion) + (im-id :initarg :im-id :type xcb:CARD16) + (ic-id :initarg :ic-id :type xcb:CARD16) + (position :initarg :position :type xcb:CARD16) + (pad~0 :initform 2 :type xcb:-pad) + (direction :initarg :direction :type xcb:CARD32) + (factor :initarg :factor :type xcb:CARD16) + (operation :initarg :operation :type xcb:CARD16) + (length :initarg :length :type xcb:INT16))) + +(defconst xim:caret-direction:forward-char 0) +(defconst xim:caret-direction:backward-char 1) +(defconst xim:caret-direction:forward-word 2) +(defconst xim:caret-direction:backward-word 3) +(defconst xim:caret-direction:caret-up 4) +(defconst xim:caret-direction:caret-down 5) +(defconst xim:caret-direction:next-line 6) +(defconst xim:caret-direction:previous-line 7) +(defconst xim:caret-direction:line-start 8) +(defconst xim:caret-direction:line-end 9) +(defconst xim:caret-direction:absolute-position 10) +(defconst xim:caret-direction:dont-change 11) + +(defconst xim:string-conversion-operation:substitution 1) +(defconst xim:string-conversion-operation:retrieval 2) + +(defclass xim:str-conversion-reply (xim:-request) + ((~major-opcode :initform xim:opcode:str-conversion-reply) + (im-id :initarg :im-id :type xcb:CARD16) + (ic-id :initarg :ic-id :type xcb:CARD16) + (feedback :initarg :feedback :type xcb:CARD32) + (text :initarg :text :type xim:XIMSTRCONVTEXT))) + +;; Preedit callbacks +(defclass xim:preedit-start (xim:-request) + ((~major-opcode :initform xim:opcode:preedit-start) + (im-id :initarg :im-id :type xcb:CARD16) + (ic-id :initarg :ic-id :type xcb:CARD16))) + +(defclass xim:preedit-start-reply (xim:-request) + ((~major-opcode :initform xim:opcode:preedit-start-reply) + (im-id :initarg :im-id :type xcb:CARD16) + (ic-id :initarg :ic-id :type xcb:CARD16) + (return-value :initarg :return-value :type xcb:INT32))) + +(defclass xim:preedit-draw (xim:-request) + ((~major-opcode :initform xim:opcode:preedit-draw) + (im-id :initarg :im-id :type xcb:CARD16) + (ic-id :initarg :ic-id :type xcb:CARD16) + (caret :initarg :caret :type xcb:INT32) + (chg-first :initarg :chg-first :type xcb:INT32) + (chg-length :initarg :chg-length :type xcb:INT32) + (status :initarg :status :type xim:BITMASK32) + (string-length :initarg :string-length :type xcb:-u2) + (string :initarg :string :type xcb:-ignore) + (string~ :initform '(name string type xcb:char + size (xcb:-fieldref 'string-length)) + :type xcb:-list) + (pad~0 :initform '(xim:PADDING (+ 2 (xcb:-fieldref 'string-length))) + :type xcb:-pad) + (feedback-length :initarg :feedback-length :type xcb:-u2) + (pad~1 :initform 2 :type xcb:-pad) + (feedback :initarg :feedback :type xcb:-ignore) + (feedback~ :initform '(name feedback type xim:XIMFEEDBACK + size (/ (xcb:-fieldref 'feedback-length) 4)) + :type xcb:-list))) + +(defconst xim:preedit-draw-status:no-string 1) +(defconst xim:preedit-draw-status:no-feedback 2) + +(defclass xim:preedit-caret (xim:-request) + ((~major-opcode :initform xim:opcode:preedit-caret) + (im-id :initarg :im-id :type xcb:CARD16) + (ic-id :initarg :ic-id :type xcb:CARD16) + (position :initarg :position :type xcb:INT32) + (direction :initarg :direction :type xcb:CARD32) + (style :initarg :style :type xcb:CARD32))) + +(defconst xim:preedit-caret-style:invisible 0) +(defconst xim:preedit-caret-style:primary 1) +(defconst xim:preedit-caret-style:secondary 2) + +(defclass xim:preedit-caret-reply (xim:-request) + ((~major-opcode :initform xim:opcode:preedit-caret-reply) + (im-id :initarg :im-id :type xcb:CARD16) + (ic-id :initarg :ic-id :type xcb:CARD16) + (position :initarg :position :type xcb:CARD32))) + +(defclass xim:preedit-done (xim:-request) + ((~major-opcode :initform xim:opcode:preedit-done) + (im-id :initarg :im-id :type xcb:CARD16) + (ic-id :initarg :ic-id :type xcb:CARD16))) + +;; Preedit state notify +(defclass xim:preeditstate (xim:-request) + ((~major-opcode :initform xim:opcode:preeditstate) + (im-id :initarg :im-id :type xcb:CARD16) + (ic-id :initarg :ic-id :type xcb:CARD16) + (state :initarg :state :type xim:BITMASK32))) + +(defconst xim:preeditstate:unknown 0) +(defconst xim:preeditstate:enable 1) +(defconst xim:preeditstate:disable 2) + +;; Status callbacks +(defclass xim:status-start (xim:-request) + ((~major-opcode :initform xim:opcode:status-start) + (im-id :initarg :im-id :type xcb:CARD16) + (ic-id :initarg :ic-id :type xcb:CARD16))) + +(defclass xim:status-draw (xim:-request) + ((~major-opcode :initform xim:opcode:status-draw) + (im-id :initarg :im-id :type xcb:CARD16) + (ic-id :initarg :ic-id :type xcb:CARD16) + (type :initarg :type :type xcb:CARD32))) + +(defconst xim:status-draw-type:text 0) +(defconst xim:status-draw-type:bitmap 1) + +(defclass xim:status-draw-text (xim:status-draw) + ((type :initarg :type :initform xim:status-draw-type:text) + (status :initarg :status :type xim:BITMASK32) + (string-length :initarg :string-length :type xcb:-u2) + (string :initarg :string :type xcb:-ignore) + (string~ :initform '(name string type xcb:char + size (xcb:-fieldref 'string-lessp)) + :type xcb:-list) + (pad~0 :initform '(xim:PADDING (+ 2 (xcb:-fieldref 'string-length))) + :type xcb:-pad) + (feedback-length :initarg :feedback-length :type xcb:-u2) + (pad~1 :initform 2 :type xcb:-pad) + (feedback :initarg :feedback :type xcb:-ignore) + (feedback~ :initform '(name feedback type xim:XIMFEEDBACK + size (/ (xcb:-fieldref 'feedback-length) 4)) + :type xcb:-list))) + +(defclass xim:status-draw-bitmap (xim:status-draw) + ((type :initarg :type :initform xim:status-draw-type:bitmap) + (pixmap-data :initarg :pixmap-data :type xcb:PIXMAP))) + +(defclass xim:status-done (xim:-request) + ((~major-opcode :initform xim:opcode:status-done) + (im-id :initarg :im-id :type xcb:CARD16) + (ic-id :initarg :ic-id :type xcb:CARD16))) + + + +(provide 'xcb-xim) + +;;; xcb-xim.el ends here diff --git a/elpa/xelb-0.18/xcb-xinerama.el b/elpa/xelb-0.18/xcb-xinerama.el new file mode 100644 index 0000000..b699a3a --- /dev/null +++ b/elpa/xelb-0.18/xcb-xinerama.el @@ -0,0 +1,123 @@ +;;; xcb-xinerama.el --- X11 Xinerama extension -*- lexical-binding: t -*- + +;; Copyright (C) 2015-2019 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This file was generated by 'el_client.el' from 'xinerama.xml', +;; which you can retrieve from . + +;;; Code: + +(require 'xcb-types) + +(defconst xcb:xinerama:-extension-xname "XINERAMA") +(defconst xcb:xinerama:-extension-name "Xinerama") +(defconst xcb:xinerama:-major-version 1) +(defconst xcb:xinerama:-minor-version 1) + +(require 'xcb-xproto) + +(defclass xcb:xinerama:ScreenInfo + (xcb:-struct) + ((x-org :initarg :x-org :type xcb:INT16) + (y-org :initarg :y-org :type xcb:INT16) + (width :initarg :width :type xcb:CARD16) + (height :initarg :height :type xcb:CARD16))) + +(defclass xcb:xinerama:QueryVersion + (xcb:-request) + ((~opcode :initform 0 :type xcb:-u1) + (major :initarg :major :type xcb:CARD8) + (minor :initarg :minor :type xcb:CARD8))) +(defclass xcb:xinerama:QueryVersion~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (major :initarg :major :type xcb:CARD16) + (minor :initarg :minor :type xcb:CARD16))) + +(defclass xcb:xinerama:GetState + (xcb:-request) + ((~opcode :initform 1 :type xcb:-u1) + (window :initarg :window :type xcb:WINDOW))) +(defclass xcb:xinerama:GetState~reply + (xcb:-reply) + ((state :initarg :state :type xcb:BYTE) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (window :initarg :window :type xcb:WINDOW))) + +(defclass xcb:xinerama:GetScreenCount + (xcb:-request) + ((~opcode :initform 2 :type xcb:-u1) + (window :initarg :window :type xcb:WINDOW))) +(defclass xcb:xinerama:GetScreenCount~reply + (xcb:-reply) + ((screen-count :initarg :screen-count :type xcb:BYTE) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (window :initarg :window :type xcb:WINDOW))) + +(defclass xcb:xinerama:GetScreenSize + (xcb:-request) + ((~opcode :initform 3 :type xcb:-u1) + (window :initarg :window :type xcb:WINDOW) + (screen :initarg :screen :type xcb:CARD32))) +(defclass xcb:xinerama:GetScreenSize~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (width :initarg :width :type xcb:CARD32) + (height :initarg :height :type xcb:CARD32) + (window :initarg :window :type xcb:WINDOW) + (screen :initarg :screen :type xcb:CARD32))) + +(defclass xcb:xinerama:IsActive + (xcb:-request) + ((~opcode :initform 4 :type xcb:-u1))) +(defclass xcb:xinerama:IsActive~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (state :initarg :state :type xcb:CARD32))) + +(defclass xcb:xinerama:QueryScreens + (xcb:-request) + ((~opcode :initform 5 :type xcb:-u1))) +(defclass xcb:xinerama:QueryScreens~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (number :initarg :number :type xcb:CARD32) + (pad~1 :initform 20 :type xcb:-pad) + (screen-info~ :initform + '(name screen-info type xcb:xinerama:ScreenInfo size + (xcb:-fieldref 'number)) + :type xcb:-list) + (screen-info :initarg :screen-info :type xcb:-ignore))) + + + +(provide 'xcb-xinerama) + +;;; xcb-xinerama.el ends here diff --git a/elpa/xelb-0.18/xcb-xinput.el b/elpa/xelb-0.18/xcb-xinput.el new file mode 100644 index 0000000..b381c96 --- /dev/null +++ b/elpa/xelb-0.18/xcb-xinput.el @@ -0,0 +1,2883 @@ +;;; xcb-xinput.el --- X11 Input extension -*- lexical-binding: t -*- + +;; Copyright (C) 2015-2019 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This file was generated by 'el_client.el' from 'xinput.xml', +;; which you can retrieve from . + +;;; Code: + +(require 'xcb-types) + +(defconst xcb:xinput:-extension-xname "XInputExtension") +(defconst xcb:xinput:-extension-name "Input") +(defconst xcb:xinput:-major-version 2) +(defconst xcb:xinput:-minor-version 3) + +(require 'xcb-xfixes) + +(require 'xcb-xproto) + +(xcb:deftypealias 'xcb:xinput:EventClass 'xcb:CARD32) + +(xcb:deftypealias 'xcb:xinput:KeyCode 'xcb:CARD8) + +(xcb:deftypealias 'xcb:xinput:DeviceId 'xcb:CARD16) + +(xcb:deftypealias 'xcb:xinput:FP1616 'xcb:INT32) + +(defclass xcb:xinput:FP3232 + (xcb:-struct) + ((integral :initarg :integral :type xcb:INT32) + (frac :initarg :frac :type xcb:CARD32))) + +(defclass xcb:xinput:GetExtensionVersion + (xcb:-request) + ((~opcode :initform 1 :type xcb:-u1) + (name-len :initarg :name-len :type xcb:CARD16) + (pad~0 :initform 2 :type xcb:-pad) + (name~ :initform + '(name name type xcb:char size + (xcb:-fieldref 'name-len)) + :type xcb:-list) + (name :initarg :name :type xcb:-ignore))) +(defclass xcb:xinput:GetExtensionVersion~reply + (xcb:-reply) + ((xi-reply-type :initarg :xi-reply-type :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (server-major :initarg :server-major :type xcb:CARD16) + (server-minor :initarg :server-minor :type xcb:CARD16) + (present :initarg :present :type xcb:BOOL) + (pad~0 :initform 19 :type xcb:-pad))) + +(defconst xcb:xinput:DeviceUse:IsXPointer 0) +(defconst xcb:xinput:DeviceUse:IsXKeyboard 1) +(defconst xcb:xinput:DeviceUse:IsXExtensionDevice 2) +(defconst xcb:xinput:DeviceUse:IsXExtensionKeyboard 3) +(defconst xcb:xinput:DeviceUse:IsXExtensionPointer 4) + +(defconst xcb:xinput:InputClass:Key 0) +(defconst xcb:xinput:InputClass:Button 1) +(defconst xcb:xinput:InputClass:Valuator 2) +(defconst xcb:xinput:InputClass:Feedback 3) +(defconst xcb:xinput:InputClass:Proximity 4) +(defconst xcb:xinput:InputClass:Focus 5) +(defconst xcb:xinput:InputClass:Other 6) + +(defconst xcb:xinput:ValuatorMode:Relative 0) +(defconst xcb:xinput:ValuatorMode:Absolute 1) + +(defclass xcb:xinput:DeviceInfo + (xcb:-struct) + ((device-type :initarg :device-type :type xcb:ATOM) + (device-id :initarg :device-id :type xcb:CARD8) + (num-class-info :initarg :num-class-info :type xcb:CARD8) + (device-use :initarg :device-use :type xcb:CARD8) + (pad~0 :initform 1 :type xcb:-pad))) + +(defclass xcb:xinput:KeyInfo + (xcb:-struct) + ((class-id :initarg :class-id :type xcb:CARD8) + (len :initarg :len :type xcb:CARD8) + (min-keycode :initarg :min-keycode :type xcb:xinput:KeyCode) + (max-keycode :initarg :max-keycode :type xcb:xinput:KeyCode) + (num-keys :initarg :num-keys :type xcb:CARD16) + (pad~0 :initform 2 :type xcb:-pad))) + +(defclass xcb:xinput:ButtonInfo + (xcb:-struct) + ((class-id :initarg :class-id :type xcb:CARD8) + (len :initarg :len :type xcb:CARD8) + (num-buttons :initarg :num-buttons :type xcb:CARD16))) + +(defclass xcb:xinput:AxisInfo + (xcb:-struct) + ((resolution :initarg :resolution :type xcb:CARD32) + (minimum :initarg :minimum :type xcb:INT32) + (maximum :initarg :maximum :type xcb:INT32))) + +(defclass xcb:xinput:ValuatorInfo + (xcb:-struct) + ((class-id :initarg :class-id :type xcb:CARD8) + (len :initarg :len :type xcb:CARD8) + (axes-len :initarg :axes-len :type xcb:CARD8) + (mode :initarg :mode :type xcb:CARD8) + (motion-size :initarg :motion-size :type xcb:CARD32) + (axes~ :initform + '(name axes type xcb:xinput:AxisInfo size + (xcb:-fieldref 'axes-len)) + :type xcb:-list) + (axes :initarg :axes :type xcb:-ignore))) + +(defclass xcb:xinput:InputInfo + (xcb:-struct) + ((class-id :initarg :class-id :type xcb:CARD8) + (len :initarg :len :type xcb:CARD8) + (info :initform + '(expression + (xcb:-fieldref 'class-id) + cases + (((0) + min-keycode max-keycode num-keys pad~0) + ((1) + num-buttons) + ((2) + pad~1 axes-len mode motion-size axes~))) + :type xcb:-switch) + (min-keycode :initarg :min-keycode :type xcb:xinput:KeyCode) + (max-keycode :initarg :max-keycode :type xcb:xinput:KeyCode) + (num-keys :initarg :num-keys :type xcb:CARD16) + (pad~0 :initform 2 :type xcb:-pad) + (num-buttons :initarg :num-buttons :type xcb:CARD16) + (pad~1 :initform + [4 2] + :type xcb:-pad-align) + (axes-len :initarg :axes-len :type xcb:CARD8) + (mode :initarg :mode :type xcb:CARD8) + (motion-size :initarg :motion-size :type xcb:CARD32) + (axes~ :initform + '(name axes type xcb:xinput:AxisInfo size + (xcb:-fieldref 'axes-len)) + :type xcb:-list) + (axes :initarg :axes :type xcb:-ignore))) + +(defclass xcb:xinput:DeviceName + (xcb:-struct) + ((len :initarg :len :type xcb:CARD8) + (string~ :initform + '(name string type xcb:char size + (xcb:-fieldref 'len)) + :type xcb:-list) + (string :initarg :string :type xcb:-ignore))) + +(defclass xcb:xinput:ListInputDevices + (xcb:-request) + ((~opcode :initform 2 :type xcb:-u1))) +(defclass xcb:xinput:ListInputDevices~reply + (xcb:-reply) + ((xi-reply-type :initarg :xi-reply-type :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (devices-len :initarg :devices-len :type xcb:CARD8) + (pad~0 :initform 23 :type xcb:-pad) + (devices~ :initform + '(name devices type xcb:xinput:DeviceInfo size + (xcb:-fieldref 'devices-len)) + :type xcb:-list) + (devices :initarg :devices :type xcb:-ignore) + (infos~ :initform + '(name infos type xcb:xinput:InputInfo size + (apply #'+ + (mapcar + (lambda + (i) + (eval + '(xcb:-fieldref 'num-class-info) + (list + (nconc + '(obj) + i)))) + (slot-value obj 'devices)))) + :type xcb:-list) + (infos :initarg :infos :type xcb:-ignore) + (names~ :initform + '(name names type xcb:STR size + (xcb:-fieldref 'devices-len)) + :type xcb:-list) + (names :initarg :names :type xcb:-ignore) + (pad~1 :initform 4 :type xcb:-pad-align))) + +(xcb:deftypealias 'xcb:xinput:EventTypeBase 'xcb:CARD8) + +(defclass xcb:xinput:InputClassInfo + (xcb:-struct) + ((class-id :initarg :class-id :type xcb:CARD8) + (event-type-base :initarg :event-type-base :type xcb:xinput:EventTypeBase))) + +(defclass xcb:xinput:OpenDevice + (xcb:-request) + ((~opcode :initform 3 :type xcb:-u1) + (device-id :initarg :device-id :type xcb:CARD8) + (pad~0 :initform 3 :type xcb:-pad))) +(defclass xcb:xinput:OpenDevice~reply + (xcb:-reply) + ((xi-reply-type :initarg :xi-reply-type :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (num-classes :initarg :num-classes :type xcb:CARD8) + (pad~0 :initform 23 :type xcb:-pad) + (class-info~ :initform + '(name class-info type xcb:xinput:InputClassInfo size + (xcb:-fieldref 'num-classes)) + :type xcb:-list) + (class-info :initarg :class-info :type xcb:-ignore) + (pad~1 :initform 4 :type xcb:-pad-align))) + +(defclass xcb:xinput:CloseDevice + (xcb:-request) + ((~opcode :initform 4 :type xcb:-u1) + (device-id :initarg :device-id :type xcb:CARD8) + (pad~0 :initform 3 :type xcb:-pad))) + +(defclass xcb:xinput:SetDeviceMode + (xcb:-request) + ((~opcode :initform 5 :type xcb:-u1) + (device-id :initarg :device-id :type xcb:CARD8) + (mode :initarg :mode :type xcb:CARD8) + (pad~0 :initform 2 :type xcb:-pad))) +(defclass xcb:xinput:SetDeviceMode~reply + (xcb:-reply) + ((xi-reply-type :initarg :xi-reply-type :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (status :initarg :status :type xcb:CARD8) + (pad~0 :initform 23 :type xcb:-pad))) + +(defclass xcb:xinput:SelectExtensionEvent + (xcb:-request) + ((~opcode :initform 6 :type xcb:-u1) + (window :initarg :window :type xcb:WINDOW) + (num-classes :initarg :num-classes :type xcb:CARD16) + (pad~0 :initform 2 :type xcb:-pad) + (classes~ :initform + '(name classes type xcb:xinput:EventClass size + (xcb:-fieldref 'num-classes)) + :type xcb:-list) + (classes :initarg :classes :type xcb:-ignore))) + +(defclass xcb:xinput:GetSelectedExtensionEvents + (xcb:-request) + ((~opcode :initform 7 :type xcb:-u1) + (window :initarg :window :type xcb:WINDOW))) +(defclass xcb:xinput:GetSelectedExtensionEvents~reply + (xcb:-reply) + ((xi-reply-type :initarg :xi-reply-type :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (num-this-classes :initarg :num-this-classes :type xcb:CARD16) + (num-all-classes :initarg :num-all-classes :type xcb:CARD16) + (pad~0 :initform 20 :type xcb:-pad) + (this-classes~ :initform + '(name this-classes type xcb:xinput:EventClass size + (xcb:-fieldref 'num-this-classes)) + :type xcb:-list) + (this-classes :initarg :this-classes :type xcb:-ignore) + (all-classes~ :initform + '(name all-classes type xcb:xinput:EventClass size + (xcb:-fieldref 'num-all-classes)) + :type xcb:-list) + (all-classes :initarg :all-classes :type xcb:-ignore))) + +(defconst xcb:xinput:PropagateMode:AddToList 0) +(defconst xcb:xinput:PropagateMode:DeleteFromList 1) + +(defclass xcb:xinput:ChangeDeviceDontPropagateList + (xcb:-request) + ((~opcode :initform 8 :type xcb:-u1) + (window :initarg :window :type xcb:WINDOW) + (num-classes :initarg :num-classes :type xcb:CARD16) + (mode :initarg :mode :type xcb:CARD8) + (pad~0 :initform 1 :type xcb:-pad) + (classes~ :initform + '(name classes type xcb:xinput:EventClass size + (xcb:-fieldref 'num-classes)) + :type xcb:-list) + (classes :initarg :classes :type xcb:-ignore))) + +(defclass xcb:xinput:GetDeviceDontPropagateList + (xcb:-request) + ((~opcode :initform 9 :type xcb:-u1) + (window :initarg :window :type xcb:WINDOW))) +(defclass xcb:xinput:GetDeviceDontPropagateList~reply + (xcb:-reply) + ((xi-reply-type :initarg :xi-reply-type :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (num-classes :initarg :num-classes :type xcb:CARD16) + (pad~0 :initform 22 :type xcb:-pad) + (classes~ :initform + '(name classes type xcb:xinput:EventClass size + (xcb:-fieldref 'num-classes)) + :type xcb:-list) + (classes :initarg :classes :type xcb:-ignore))) + +(defclass xcb:xinput:DeviceTimeCoord + (xcb:-struct) + ((time :initarg :time :type xcb:TIMESTAMP) + (axisvalues~ :initform + '(name axisvalues type xcb:INT32 size + (xcb:-paramref 'num-axes)) + :type xcb:-list) + (axisvalues :initarg :axisvalues :type xcb:-ignore))) + +(defclass xcb:xinput:GetDeviceMotionEvents + (xcb:-request) + ((~opcode :initform 10 :type xcb:-u1) + (start :initarg :start :type xcb:TIMESTAMP) + (stop :initarg :stop :type xcb:TIMESTAMP) + (device-id :initarg :device-id :type xcb:CARD8) + (pad~0 :initform 3 :type xcb:-pad))) +(defclass xcb:xinput:GetDeviceMotionEvents~reply + (xcb:-reply) + ((xi-reply-type :initarg :xi-reply-type :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (num-events :initarg :num-events :type xcb:CARD32) + (num-axes :initarg :num-axes :type xcb:CARD8) + (device-mode :initarg :device-mode :type xcb:CARD8) + (pad~0 :initform 18 :type xcb:-pad) + (events~ :initform + '(name events type xcb:xinput:DeviceTimeCoord size + (xcb:-fieldref 'num-events)) + :type xcb:-list) + (events :initarg :events :type xcb:-ignore))) + +(defclass xcb:xinput:ChangeKeyboardDevice + (xcb:-request) + ((~opcode :initform 11 :type xcb:-u1) + (device-id :initarg :device-id :type xcb:CARD8) + (pad~0 :initform 3 :type xcb:-pad))) +(defclass xcb:xinput:ChangeKeyboardDevice~reply + (xcb:-reply) + ((xi-reply-type :initarg :xi-reply-type :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (status :initarg :status :type xcb:CARD8) + (pad~0 :initform 23 :type xcb:-pad))) + +(defclass xcb:xinput:ChangePointerDevice + (xcb:-request) + ((~opcode :initform 12 :type xcb:-u1) + (x-axis :initarg :x-axis :type xcb:CARD8) + (y-axis :initarg :y-axis :type xcb:CARD8) + (device-id :initarg :device-id :type xcb:CARD8) + (pad~0 :initform 1 :type xcb:-pad))) +(defclass xcb:xinput:ChangePointerDevice~reply + (xcb:-reply) + ((xi-reply-type :initarg :xi-reply-type :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (status :initarg :status :type xcb:CARD8) + (pad~0 :initform 23 :type xcb:-pad))) + +(defclass xcb:xinput:GrabDevice + (xcb:-request) + ((~opcode :initform 13 :type xcb:-u1) + (grab-window :initarg :grab-window :type xcb:WINDOW) + (time :initarg :time :type xcb:TIMESTAMP) + (num-classes :initarg :num-classes :type xcb:CARD16) + (this-device-mode :initarg :this-device-mode :type xcb:CARD8) + (other-device-mode :initarg :other-device-mode :type xcb:CARD8) + (owner-events :initarg :owner-events :type xcb:BOOL) + (device-id :initarg :device-id :type xcb:CARD8) + (pad~0 :initform 2 :type xcb:-pad) + (classes~ :initform + '(name classes type xcb:xinput:EventClass size + (xcb:-fieldref 'num-classes)) + :type xcb:-list) + (classes :initarg :classes :type xcb:-ignore))) +(defclass xcb:xinput:GrabDevice~reply + (xcb:-reply) + ((xi-reply-type :initarg :xi-reply-type :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (status :initarg :status :type xcb:CARD8) + (pad~0 :initform 23 :type xcb:-pad))) + +(defclass xcb:xinput:UngrabDevice + (xcb:-request) + ((~opcode :initform 14 :type xcb:-u1) + (time :initarg :time :type xcb:TIMESTAMP) + (device-id :initarg :device-id :type xcb:CARD8) + (pad~0 :initform 3 :type xcb:-pad))) + +(defconst xcb:xinput:ModifierDevice:UseXKeyboard 255) + +(defclass xcb:xinput:GrabDeviceKey + (xcb:-request) + ((~opcode :initform 15 :type xcb:-u1) + (grab-window :initarg :grab-window :type xcb:WINDOW) + (num-classes :initarg :num-classes :type xcb:CARD16) + (modifiers :initarg :modifiers :type xcb:CARD16) + (modifier-device :initarg :modifier-device :type xcb:CARD8) + (grabbed-device :initarg :grabbed-device :type xcb:CARD8) + (key :initarg :key :type xcb:CARD8) + (this-device-mode :initarg :this-device-mode :type xcb:CARD8) + (other-device-mode :initarg :other-device-mode :type xcb:CARD8) + (owner-events :initarg :owner-events :type xcb:BOOL) + (pad~0 :initform 2 :type xcb:-pad) + (classes~ :initform + '(name classes type xcb:xinput:EventClass size + (xcb:-fieldref 'num-classes)) + :type xcb:-list) + (classes :initarg :classes :type xcb:-ignore))) + +(defclass xcb:xinput:UngrabDeviceKey + (xcb:-request) + ((~opcode :initform 16 :type xcb:-u1) + (grabWindow :initarg :grabWindow :type xcb:WINDOW) + (modifiers :initarg :modifiers :type xcb:CARD16) + (modifier-device :initarg :modifier-device :type xcb:CARD8) + (key :initarg :key :type xcb:CARD8) + (grabbed-device :initarg :grabbed-device :type xcb:CARD8))) + +(defclass xcb:xinput:GrabDeviceButton + (xcb:-request) + ((~opcode :initform 17 :type xcb:-u1) + (grab-window :initarg :grab-window :type xcb:WINDOW) + (grabbed-device :initarg :grabbed-device :type xcb:CARD8) + (modifier-device :initarg :modifier-device :type xcb:CARD8) + (num-classes :initarg :num-classes :type xcb:CARD16) + (modifiers :initarg :modifiers :type xcb:CARD16) + (this-device-mode :initarg :this-device-mode :type xcb:CARD8) + (other-device-mode :initarg :other-device-mode :type xcb:CARD8) + (button :initarg :button :type xcb:CARD8) + (owner-events :initarg :owner-events :type xcb:BOOL) + (pad~0 :initform 2 :type xcb:-pad) + (classes~ :initform + '(name classes type xcb:xinput:EventClass size + (xcb:-fieldref 'num-classes)) + :type xcb:-list) + (classes :initarg :classes :type xcb:-ignore))) + +(defclass xcb:xinput:UngrabDeviceButton + (xcb:-request) + ((~opcode :initform 18 :type xcb:-u1) + (grab-window :initarg :grab-window :type xcb:WINDOW) + (modifiers :initarg :modifiers :type xcb:CARD16) + (modifier-device :initarg :modifier-device :type xcb:CARD8) + (button :initarg :button :type xcb:CARD8) + (grabbed-device :initarg :grabbed-device :type xcb:CARD8) + (pad~0 :initform 3 :type xcb:-pad))) + +(defconst xcb:xinput:DeviceInputMode:AsyncThisDevice 0) +(defconst xcb:xinput:DeviceInputMode:SyncThisDevice 1) +(defconst xcb:xinput:DeviceInputMode:ReplayThisDevice 2) +(defconst xcb:xinput:DeviceInputMode:AsyncOtherDevices 3) +(defconst xcb:xinput:DeviceInputMode:AsyncAll 4) +(defconst xcb:xinput:DeviceInputMode:SyncAll 5) + +(defclass xcb:xinput:AllowDeviceEvents + (xcb:-request) + ((~opcode :initform 19 :type xcb:-u1) + (time :initarg :time :type xcb:TIMESTAMP) + (mode :initarg :mode :type xcb:CARD8) + (device-id :initarg :device-id :type xcb:CARD8) + (pad~0 :initform 2 :type xcb:-pad))) + +(defclass xcb:xinput:GetDeviceFocus + (xcb:-request) + ((~opcode :initform 20 :type xcb:-u1) + (device-id :initarg :device-id :type xcb:CARD8) + (pad~0 :initform 3 :type xcb:-pad))) +(defclass xcb:xinput:GetDeviceFocus~reply + (xcb:-reply) + ((xi-reply-type :initarg :xi-reply-type :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (focus :initarg :focus :type xcb:WINDOW) + (time :initarg :time :type xcb:TIMESTAMP) + (revert-to :initarg :revert-to :type xcb:CARD8) + (pad~0 :initform 15 :type xcb:-pad))) + +(defclass xcb:xinput:SetDeviceFocus + (xcb:-request) + ((~opcode :initform 21 :type xcb:-u1) + (focus :initarg :focus :type xcb:WINDOW) + (time :initarg :time :type xcb:TIMESTAMP) + (revert-to :initarg :revert-to :type xcb:CARD8) + (device-id :initarg :device-id :type xcb:CARD8) + (pad~0 :initform 2 :type xcb:-pad))) + +(defconst xcb:xinput:FeedbackClass:Keyboard 0) +(defconst xcb:xinput:FeedbackClass:Pointer 1) +(defconst xcb:xinput:FeedbackClass:String 2) +(defconst xcb:xinput:FeedbackClass:Integer 3) +(defconst xcb:xinput:FeedbackClass:Led 4) +(defconst xcb:xinput:FeedbackClass:Bell 5) + +(defclass xcb:xinput:KbdFeedbackState + (xcb:-struct) + ((class-id :initarg :class-id :type xcb:CARD8) + (feedback-id :initarg :feedback-id :type xcb:CARD8) + (len :initarg :len :type xcb:CARD16) + (pitch :initarg :pitch :type xcb:CARD16) + (duration :initarg :duration :type xcb:CARD16) + (led-mask :initarg :led-mask :type xcb:CARD32) + (led-values :initarg :led-values :type xcb:CARD32) + (global-auto-repeat :initarg :global-auto-repeat :type xcb:BOOL) + (click :initarg :click :type xcb:CARD8) + (percent :initarg :percent :type xcb:CARD8) + (pad~0 :initform 1 :type xcb:-pad) + (auto-repeats~ :initform + '(name auto-repeats type xcb:CARD8 size 32) + :type xcb:-list) + (auto-repeats :initarg :auto-repeats :type xcb:-ignore))) + +(defclass xcb:xinput:PtrFeedbackState + (xcb:-struct) + ((class-id :initarg :class-id :type xcb:CARD8) + (feedback-id :initarg :feedback-id :type xcb:CARD8) + (len :initarg :len :type xcb:CARD16) + (pad~0 :initform 2 :type xcb:-pad) + (accel-num :initarg :accel-num :type xcb:CARD16) + (accel-denom :initarg :accel-denom :type xcb:CARD16) + (threshold :initarg :threshold :type xcb:CARD16))) + +(defclass xcb:xinput:IntegerFeedbackState + (xcb:-struct) + ((class-id :initarg :class-id :type xcb:CARD8) + (feedback-id :initarg :feedback-id :type xcb:CARD8) + (len :initarg :len :type xcb:CARD16) + (resolution :initarg :resolution :type xcb:CARD32) + (min-value :initarg :min-value :type xcb:INT32) + (max-value :initarg :max-value :type xcb:INT32))) + +(defclass xcb:xinput:StringFeedbackState + (xcb:-struct) + ((class-id :initarg :class-id :type xcb:CARD8) + (feedback-id :initarg :feedback-id :type xcb:CARD8) + (len :initarg :len :type xcb:CARD16) + (max-symbols :initarg :max-symbols :type xcb:CARD16) + (num-keysyms :initarg :num-keysyms :type xcb:CARD16) + (keysyms~ :initform + '(name keysyms type xcb:KEYSYM size + (xcb:-fieldref 'num-keysyms)) + :type xcb:-list) + (keysyms :initarg :keysyms :type xcb:-ignore))) + +(defclass xcb:xinput:BellFeedbackState + (xcb:-struct) + ((class-id :initarg :class-id :type xcb:CARD8) + (feedback-id :initarg :feedback-id :type xcb:CARD8) + (len :initarg :len :type xcb:CARD16) + (percent :initarg :percent :type xcb:CARD8) + (pad~0 :initform 3 :type xcb:-pad) + (pitch :initarg :pitch :type xcb:CARD16) + (duration :initarg :duration :type xcb:CARD16))) + +(defclass xcb:xinput:LedFeedbackState + (xcb:-struct) + ((class-id :initarg :class-id :type xcb:CARD8) + (feedback-id :initarg :feedback-id :type xcb:CARD8) + (len :initarg :len :type xcb:CARD16) + (led-mask :initarg :led-mask :type xcb:CARD32) + (led-values :initarg :led-values :type xcb:CARD32))) + +(defclass xcb:xinput:FeedbackState + (xcb:-struct) + ((class-id :initarg :class-id :type xcb:CARD8) + (feedback-id :initarg :feedback-id :type xcb:CARD8) + (len :initarg :len :type xcb:CARD16) + (data :initform + '(expression + (xcb:-fieldref 'class-id) + cases + (((0) + pitch duration led-mask led-values global-auto-repeat click percent pad~0 auto-repeats~) + ((1) + pad~1 accel-num accel-denom threshold) + ((2) + max-symbols num-keysyms keysyms~) + ((3) + resolution min-value max-value) + ((4) + led-mask* led-values*) + ((5) + percent* pad~2 pitch* duration*))) + :type xcb:-switch) + (pitch :initarg :pitch :type xcb:CARD16) + (duration :initarg :duration :type xcb:CARD16) + (led-mask :initarg :led-mask :type xcb:CARD32) + (led-values :initarg :led-values :type xcb:CARD32) + (global-auto-repeat :initarg :global-auto-repeat :type xcb:BOOL) + (click :initarg :click :type xcb:CARD8) + (percent :initarg :percent :type xcb:CARD8) + (pad~0 :initform 1 :type xcb:-pad) + (auto-repeats~ :initform + '(name auto-repeats type xcb:CARD8 size 32) + :type xcb:-list) + (auto-repeats :initarg :auto-repeats :type xcb:-ignore) + (pad~1 :initform 2 :type xcb:-pad) + (accel-num :initarg :accel-num :type xcb:CARD16) + (accel-denom :initarg :accel-denom :type xcb:CARD16) + (threshold :initarg :threshold :type xcb:CARD16) + (max-symbols :initarg :max-symbols :type xcb:CARD16) + (num-keysyms :initarg :num-keysyms :type xcb:CARD16) + (keysyms~ :initform + '(name keysyms type xcb:KEYSYM size + (xcb:-fieldref 'num-keysyms)) + :type xcb:-list) + (keysyms :initarg :keysyms :type xcb:-ignore) + (resolution :initarg :resolution :type xcb:CARD32) + (min-value :initarg :min-value :type xcb:INT32) + (max-value :initarg :max-value :type xcb:INT32) + (led-mask* :initarg :led-mask* :type xcb:CARD32) + (led-values* :initarg :led-values* :type xcb:CARD32) + (percent* :initarg :percent* :type xcb:CARD8) + (pad~2 :initform 3 :type xcb:-pad) + (pitch* :initarg :pitch* :type xcb:CARD16) + (duration* :initarg :duration* :type xcb:CARD16))) + +(defclass xcb:xinput:GetFeedbackControl + (xcb:-request) + ((~opcode :initform 22 :type xcb:-u1) + (device-id :initarg :device-id :type xcb:CARD8) + (pad~0 :initform 3 :type xcb:-pad))) +(defclass xcb:xinput:GetFeedbackControl~reply + (xcb:-reply) + ((xi-reply-type :initarg :xi-reply-type :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (num-feedbacks :initarg :num-feedbacks :type xcb:CARD16) + (pad~0 :initform 22 :type xcb:-pad) + (feedbacks~ :initform + '(name feedbacks type xcb:xinput:FeedbackState size + (xcb:-fieldref 'num-feedbacks)) + :type xcb:-list) + (feedbacks :initarg :feedbacks :type xcb:-ignore))) + +(defclass xcb:xinput:KbdFeedbackCtl + (xcb:-struct) + ((class-id :initarg :class-id :type xcb:CARD8) + (feedback-id :initarg :feedback-id :type xcb:CARD8) + (len :initarg :len :type xcb:CARD16) + (key :initarg :key :type xcb:xinput:KeyCode) + (auto-repeat-mode :initarg :auto-repeat-mode :type xcb:CARD8) + (key-click-percent :initarg :key-click-percent :type xcb:INT8) + (bell-percent :initarg :bell-percent :type xcb:INT8) + (bell-pitch :initarg :bell-pitch :type xcb:INT16) + (bell-duration :initarg :bell-duration :type xcb:INT16) + (led-mask :initarg :led-mask :type xcb:CARD32) + (led-values :initarg :led-values :type xcb:CARD32))) + +(defclass xcb:xinput:PtrFeedbackCtl + (xcb:-struct) + ((class-id :initarg :class-id :type xcb:CARD8) + (feedback-id :initarg :feedback-id :type xcb:CARD8) + (len :initarg :len :type xcb:CARD16) + (pad~0 :initform 2 :type xcb:-pad) + (num :initarg :num :type xcb:INT16) + (denom :initarg :denom :type xcb:INT16) + (threshold :initarg :threshold :type xcb:INT16))) + +(defclass xcb:xinput:IntegerFeedbackCtl + (xcb:-struct) + ((class-id :initarg :class-id :type xcb:CARD8) + (feedback-id :initarg :feedback-id :type xcb:CARD8) + (len :initarg :len :type xcb:CARD16) + (int-to-display :initarg :int-to-display :type xcb:INT32))) + +(defclass xcb:xinput:StringFeedbackCtl + (xcb:-struct) + ((class-id :initarg :class-id :type xcb:CARD8) + (feedback-id :initarg :feedback-id :type xcb:CARD8) + (len :initarg :len :type xcb:CARD16) + (pad~0 :initform 2 :type xcb:-pad) + (num-keysyms :initarg :num-keysyms :type xcb:CARD16) + (keysyms~ :initform + '(name keysyms type xcb:KEYSYM size + (xcb:-fieldref 'num-keysyms)) + :type xcb:-list) + (keysyms :initarg :keysyms :type xcb:-ignore))) + +(defclass xcb:xinput:BellFeedbackCtl + (xcb:-struct) + ((class-id :initarg :class-id :type xcb:CARD8) + (feedback-id :initarg :feedback-id :type xcb:CARD8) + (len :initarg :len :type xcb:CARD16) + (percent :initarg :percent :type xcb:INT8) + (pad~0 :initform 3 :type xcb:-pad) + (pitch :initarg :pitch :type xcb:INT16) + (duration :initarg :duration :type xcb:INT16))) + +(defclass xcb:xinput:LedFeedbackCtl + (xcb:-struct) + ((class-id :initarg :class-id :type xcb:CARD8) + (feedback-id :initarg :feedback-id :type xcb:CARD8) + (len :initarg :len :type xcb:CARD16) + (led-mask :initarg :led-mask :type xcb:CARD32) + (led-values :initarg :led-values :type xcb:CARD32))) + +(defclass xcb:xinput:FeedbackCtl + (xcb:-struct) + ((class-id :initarg :class-id :type xcb:CARD8) + (feedback-id :initarg :feedback-id :type xcb:CARD8) + (len :initarg :len :type xcb:CARD16) + (data :initform + '(expression + (xcb:-fieldref 'class-id) + cases + (((0) + key auto-repeat-mode key-click-percent bell-percent bell-pitch bell-duration led-mask led-values) + ((1) + pad~0 num denom threshold) + ((2) + pad~1 num-keysyms keysyms~) + ((3) + int-to-display) + ((4) + led-mask* led-values*) + ((5) + percent pad~2 pitch duration))) + :type xcb:-switch) + (key :initarg :key :type xcb:xinput:KeyCode) + (auto-repeat-mode :initarg :auto-repeat-mode :type xcb:CARD8) + (key-click-percent :initarg :key-click-percent :type xcb:INT8) + (bell-percent :initarg :bell-percent :type xcb:INT8) + (bell-pitch :initarg :bell-pitch :type xcb:INT16) + (bell-duration :initarg :bell-duration :type xcb:INT16) + (led-mask :initarg :led-mask :type xcb:CARD32) + (led-values :initarg :led-values :type xcb:CARD32) + (pad~0 :initform 2 :type xcb:-pad) + (num :initarg :num :type xcb:INT16) + (denom :initarg :denom :type xcb:INT16) + (threshold :initarg :threshold :type xcb:INT16) + (pad~1 :initform 2 :type xcb:-pad) + (num-keysyms :initarg :num-keysyms :type xcb:CARD16) + (keysyms~ :initform + '(name keysyms type xcb:KEYSYM size + (xcb:-fieldref 'num-keysyms)) + :type xcb:-list) + (keysyms :initarg :keysyms :type xcb:-ignore) + (int-to-display :initarg :int-to-display :type xcb:INT32) + (led-mask* :initarg :led-mask* :type xcb:CARD32) + (led-values* :initarg :led-values* :type xcb:CARD32) + (percent :initarg :percent :type xcb:INT8) + (pad~2 :initform 3 :type xcb:-pad) + (pitch :initarg :pitch :type xcb:INT16) + (duration :initarg :duration :type xcb:INT16))) + +(defconst xcb:xinput:ChangeFeedbackControlMask:KeyClickPercent 1) +(defconst xcb:xinput:ChangeFeedbackControlMask:Percent 2) +(defconst xcb:xinput:ChangeFeedbackControlMask:Pitch 4) +(defconst xcb:xinput:ChangeFeedbackControlMask:Duration 8) +(defconst xcb:xinput:ChangeFeedbackControlMask:Led 16) +(defconst xcb:xinput:ChangeFeedbackControlMask:LedMode 32) +(defconst xcb:xinput:ChangeFeedbackControlMask:Key 64) +(defconst xcb:xinput:ChangeFeedbackControlMask:AutoRepeatMode 128) +(defconst xcb:xinput:ChangeFeedbackControlMask:String 1) +(defconst xcb:xinput:ChangeFeedbackControlMask:Integer 1) +(defconst xcb:xinput:ChangeFeedbackControlMask:AccelNum 1) +(defconst xcb:xinput:ChangeFeedbackControlMask:AccelDenom 2) +(defconst xcb:xinput:ChangeFeedbackControlMask:Threshold 4) + +(defclass xcb:xinput:ChangeFeedbackControl + (xcb:-request) + ((~opcode :initform 23 :type xcb:-u1) + (mask :initarg :mask :type xcb:CARD32) + (device-id :initarg :device-id :type xcb:CARD8) + (feedback-id :initarg :feedback-id :type xcb:CARD8) + (pad~0 :initform 2 :type xcb:-pad) + (feedback :initarg :feedback :type xcb:xinput:FeedbackCtl))) + +(defclass xcb:xinput:GetDeviceKeyMapping + (xcb:-request) + ((~opcode :initform 24 :type xcb:-u1) + (device-id :initarg :device-id :type xcb:CARD8) + (first-keycode :initarg :first-keycode :type xcb:xinput:KeyCode) + (count :initarg :count :type xcb:CARD8) + (pad~0 :initform 1 :type xcb:-pad))) +(defclass xcb:xinput:GetDeviceKeyMapping~reply + (xcb:-reply) + ((xi-reply-type :initarg :xi-reply-type :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (keysyms-per-keycode :initarg :keysyms-per-keycode :type xcb:CARD8) + (pad~0 :initform 23 :type xcb:-pad) + (keysyms~ :initform + '(name keysyms type xcb:KEYSYM size + (xcb:-fieldref 'length)) + :type xcb:-list) + (keysyms :initarg :keysyms :type xcb:-ignore))) + +(defclass xcb:xinput:ChangeDeviceKeyMapping + (xcb:-request) + ((~opcode :initform 25 :type xcb:-u1) + (device-id :initarg :device-id :type xcb:CARD8) + (first-keycode :initarg :first-keycode :type xcb:xinput:KeyCode) + (keysyms-per-keycode :initarg :keysyms-per-keycode :type xcb:CARD8) + (keycode-count :initarg :keycode-count :type xcb:CARD8) + (keysyms~ :initform + '(name keysyms type xcb:KEYSYM size + (* + (xcb:-fieldref 'keycode-count) + (xcb:-fieldref 'keysyms-per-keycode))) + :type xcb:-list) + (keysyms :initarg :keysyms :type xcb:-ignore))) + +(defclass xcb:xinput:GetDeviceModifierMapping + (xcb:-request) + ((~opcode :initform 26 :type xcb:-u1) + (device-id :initarg :device-id :type xcb:CARD8) + (pad~0 :initform 3 :type xcb:-pad))) +(defclass xcb:xinput:GetDeviceModifierMapping~reply + (xcb:-reply) + ((xi-reply-type :initarg :xi-reply-type :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (keycodes-per-modifier :initarg :keycodes-per-modifier :type xcb:CARD8) + (pad~0 :initform 23 :type xcb:-pad) + (keymaps~ :initform + '(name keymaps type xcb:CARD8 size + (* + (xcb:-fieldref 'keycodes-per-modifier) + 8)) + :type xcb:-list) + (keymaps :initarg :keymaps :type xcb:-ignore))) + +(defclass xcb:xinput:SetDeviceModifierMapping + (xcb:-request) + ((~opcode :initform 27 :type xcb:-u1) + (device-id :initarg :device-id :type xcb:CARD8) + (keycodes-per-modifier :initarg :keycodes-per-modifier :type xcb:CARD8) + (pad~0 :initform 2 :type xcb:-pad) + (keymaps~ :initform + '(name keymaps type xcb:CARD8 size + (* + (xcb:-fieldref 'keycodes-per-modifier) + 8)) + :type xcb:-list) + (keymaps :initarg :keymaps :type xcb:-ignore))) +(defclass xcb:xinput:SetDeviceModifierMapping~reply + (xcb:-reply) + ((xi-reply-type :initarg :xi-reply-type :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (status :initarg :status :type xcb:CARD8) + (pad~0 :initform 23 :type xcb:-pad))) + +(defclass xcb:xinput:GetDeviceButtonMapping + (xcb:-request) + ((~opcode :initform 28 :type xcb:-u1) + (device-id :initarg :device-id :type xcb:CARD8) + (pad~0 :initform 3 :type xcb:-pad))) +(defclass xcb:xinput:GetDeviceButtonMapping~reply + (xcb:-reply) + ((xi-reply-type :initarg :xi-reply-type :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (map-size :initarg :map-size :type xcb:CARD8) + (pad~0 :initform 23 :type xcb:-pad) + (map~ :initform + '(name map type xcb:CARD8 size + (xcb:-fieldref 'map-size)) + :type xcb:-list) + (map :initarg :map :type xcb:-ignore) + (pad~1 :initform 4 :type xcb:-pad-align))) + +(defclass xcb:xinput:SetDeviceButtonMapping + (xcb:-request) + ((~opcode :initform 29 :type xcb:-u1) + (device-id :initarg :device-id :type xcb:CARD8) + (map-size :initarg :map-size :type xcb:CARD8) + (pad~0 :initform 2 :type xcb:-pad) + (map~ :initform + '(name map type xcb:CARD8 size + (xcb:-fieldref 'map-size)) + :type xcb:-list) + (map :initarg :map :type xcb:-ignore))) +(defclass xcb:xinput:SetDeviceButtonMapping~reply + (xcb:-reply) + ((xi-reply-type :initarg :xi-reply-type :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (status :initarg :status :type xcb:CARD8) + (pad~0 :initform 23 :type xcb:-pad))) + +(defclass xcb:xinput:KeyState + (xcb:-struct) + ((class-id :initarg :class-id :type xcb:CARD8) + (len :initarg :len :type xcb:CARD8) + (num-keys :initarg :num-keys :type xcb:CARD8) + (pad~0 :initform 1 :type xcb:-pad) + (keys~ :initform + '(name keys type xcb:CARD8 size 32) + :type xcb:-list) + (keys :initarg :keys :type xcb:-ignore))) + +(defclass xcb:xinput:ButtonState + (xcb:-struct) + ((class-id :initarg :class-id :type xcb:CARD8) + (len :initarg :len :type xcb:CARD8) + (num-buttons :initarg :num-buttons :type xcb:CARD8) + (pad~0 :initform 1 :type xcb:-pad) + (buttons~ :initform + '(name buttons type xcb:CARD8 size 32) + :type xcb:-list) + (buttons :initarg :buttons :type xcb:-ignore))) + +(defconst xcb:xinput:ValuatorStateModeMask:DeviceModeAbsolute 1) +(defconst xcb:xinput:ValuatorStateModeMask:OutOfProximity 2) + +(defclass xcb:xinput:ValuatorState + (xcb:-struct) + ((class-id :initarg :class-id :type xcb:CARD8) + (len :initarg :len :type xcb:CARD8) + (num-valuators :initarg :num-valuators :type xcb:CARD8) + (mode :initarg :mode :type xcb:CARD8) + (valuators~ :initform + '(name valuators type xcb:INT32 size + (xcb:-fieldref 'num-valuators)) + :type xcb:-list) + (valuators :initarg :valuators :type xcb:-ignore))) + +(defclass xcb:xinput:InputState + (xcb:-struct) + ((class-id :initarg :class-id :type xcb:CARD8) + (len :initarg :len :type xcb:CARD8) + (data :initform + '(expression + (xcb:-fieldref 'class-id) + cases + (((0) + pad~0 num-keys pad~1 keys~) + ((1) + num-buttons pad~2 buttons~) + ((2) + pad~3 num-valuators mode valuators~))) + :type xcb:-switch) + (pad~0 :initform + [4 2] + :type xcb:-pad-align) + (num-keys :initarg :num-keys :type xcb:CARD8) + (pad~1 :initform 1 :type xcb:-pad) + (keys~ :initform + '(name keys type xcb:CARD8 size 32) + :type xcb:-list) + (keys :initarg :keys :type xcb:-ignore) + (num-buttons :initarg :num-buttons :type xcb:CARD8) + (pad~2 :initform 1 :type xcb:-pad) + (buttons~ :initform + '(name buttons type xcb:CARD8 size 32) + :type xcb:-list) + (buttons :initarg :buttons :type xcb:-ignore) + (pad~3 :initform + [4 2] + :type xcb:-pad-align) + (num-valuators :initarg :num-valuators :type xcb:CARD8) + (mode :initarg :mode :type xcb:CARD8) + (valuators~ :initform + '(name valuators type xcb:INT32 size + (xcb:-fieldref 'num-valuators)) + :type xcb:-list) + (valuators :initarg :valuators :type xcb:-ignore))) + +(defclass xcb:xinput:QueryDeviceState + (xcb:-request) + ((~opcode :initform 30 :type xcb:-u1) + (device-id :initarg :device-id :type xcb:CARD8) + (pad~0 :initform 3 :type xcb:-pad))) +(defclass xcb:xinput:QueryDeviceState~reply + (xcb:-reply) + ((xi-reply-type :initarg :xi-reply-type :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (num-classes :initarg :num-classes :type xcb:CARD8) + (pad~0 :initform 23 :type xcb:-pad) + (classes~ :initform + '(name classes type xcb:xinput:InputState size + (xcb:-fieldref 'num-classes)) + :type xcb:-list) + (classes :initarg :classes :type xcb:-ignore))) + +(defclass xcb:xinput:DeviceBell + (xcb:-request) + ((~opcode :initform 32 :type xcb:-u1) + (device-id :initarg :device-id :type xcb:CARD8) + (feedback-id :initarg :feedback-id :type xcb:CARD8) + (feedback-class :initarg :feedback-class :type xcb:CARD8) + (percent :initarg :percent :type xcb:INT8))) + +(defclass xcb:xinput:SetDeviceValuators + (xcb:-request) + ((~opcode :initform 33 :type xcb:-u1) + (device-id :initarg :device-id :type xcb:CARD8) + (first-valuator :initarg :first-valuator :type xcb:CARD8) + (num-valuators :initarg :num-valuators :type xcb:CARD8) + (pad~0 :initform 1 :type xcb:-pad) + (valuators~ :initform + '(name valuators type xcb:INT32 size + (xcb:-fieldref 'num-valuators)) + :type xcb:-list) + (valuators :initarg :valuators :type xcb:-ignore))) +(defclass xcb:xinput:SetDeviceValuators~reply + (xcb:-reply) + ((xi-reply-type :initarg :xi-reply-type :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (status :initarg :status :type xcb:CARD8) + (pad~0 :initform 23 :type xcb:-pad))) + +(defconst xcb:xinput:DeviceControl:resolution 1) +(defconst xcb:xinput:DeviceControl:abs_calib 2) +(defconst xcb:xinput:DeviceControl:core 3) +(defconst xcb:xinput:DeviceControl:enable 4) +(defconst xcb:xinput:DeviceControl:abs_area 5) + +(defclass xcb:xinput:DeviceResolutionState + (xcb:-struct) + ((control-id :initarg :control-id :type xcb:CARD16) + (len :initarg :len :type xcb:CARD16) + (num-valuators :initarg :num-valuators :type xcb:CARD32) + (resolution-values~ :initform + '(name resolution-values type xcb:CARD32 size + (xcb:-fieldref 'num-valuators)) + :type xcb:-list) + (resolution-values :initarg :resolution-values :type xcb:-ignore) + (resolution-min~ :initform + '(name resolution-min type xcb:CARD32 size + (xcb:-fieldref 'num-valuators)) + :type xcb:-list) + (resolution-min :initarg :resolution-min :type xcb:-ignore) + (resolution-max~ :initform + '(name resolution-max type xcb:CARD32 size + (xcb:-fieldref 'num-valuators)) + :type xcb:-list) + (resolution-max :initarg :resolution-max :type xcb:-ignore))) + +(defclass xcb:xinput:DeviceAbsCalibState + (xcb:-struct) + ((control-id :initarg :control-id :type xcb:CARD16) + (len :initarg :len :type xcb:CARD16) + (min-x :initarg :min-x :type xcb:INT32) + (max-x :initarg :max-x :type xcb:INT32) + (min-y :initarg :min-y :type xcb:INT32) + (max-y :initarg :max-y :type xcb:INT32) + (flip-x :initarg :flip-x :type xcb:CARD32) + (flip-y :initarg :flip-y :type xcb:CARD32) + (rotation :initarg :rotation :type xcb:CARD32) + (button-threshold :initarg :button-threshold :type xcb:CARD32))) + +(defclass xcb:xinput:DeviceAbsAreaState + (xcb:-struct) + ((control-id :initarg :control-id :type xcb:CARD16) + (len :initarg :len :type xcb:CARD16) + (offset-x :initarg :offset-x :type xcb:CARD32) + (offset-y :initarg :offset-y :type xcb:CARD32) + (width :initarg :width :type xcb:CARD32) + (height :initarg :height :type xcb:CARD32) + (screen :initarg :screen :type xcb:CARD32) + (following :initarg :following :type xcb:CARD32))) + +(defclass xcb:xinput:DeviceCoreState + (xcb:-struct) + ((control-id :initarg :control-id :type xcb:CARD16) + (len :initarg :len :type xcb:CARD16) + (status :initarg :status :type xcb:CARD8) + (iscore :initarg :iscore :type xcb:CARD8) + (pad~0 :initform 2 :type xcb:-pad))) + +(defclass xcb:xinput:DeviceEnableState + (xcb:-struct) + ((control-id :initarg :control-id :type xcb:CARD16) + (len :initarg :len :type xcb:CARD16) + (enable :initarg :enable :type xcb:CARD8) + (pad~0 :initform 3 :type xcb:-pad))) + +(defclass xcb:xinput:DeviceState + (xcb:-struct) + ((control-id :initarg :control-id :type xcb:CARD16) + (len :initarg :len :type xcb:CARD16) + (data :initform + '(expression + (xcb:-fieldref 'control-id) + cases + (((1) + num-valuators resolution-values~ resolution-min~ resolution-max~) + ((2) + min-x max-x min-y max-y flip-x flip-y rotation button-threshold) + ((3) + status iscore pad~0) + ((4) + enable pad~1) + ((5) + offset-x offset-y width height screen following))) + :type xcb:-switch) + (num-valuators :initarg :num-valuators :type xcb:CARD32) + (resolution-values~ :initform + '(name resolution-values type xcb:CARD32 size + (xcb:-fieldref 'num-valuators)) + :type xcb:-list) + (resolution-values :initarg :resolution-values :type xcb:-ignore) + (resolution-min~ :initform + '(name resolution-min type xcb:CARD32 size + (xcb:-fieldref 'num-valuators)) + :type xcb:-list) + (resolution-min :initarg :resolution-min :type xcb:-ignore) + (resolution-max~ :initform + '(name resolution-max type xcb:CARD32 size + (xcb:-fieldref 'num-valuators)) + :type xcb:-list) + (resolution-max :initarg :resolution-max :type xcb:-ignore) + (min-x :initarg :min-x :type xcb:INT32) + (max-x :initarg :max-x :type xcb:INT32) + (min-y :initarg :min-y :type xcb:INT32) + (max-y :initarg :max-y :type xcb:INT32) + (flip-x :initarg :flip-x :type xcb:CARD32) + (flip-y :initarg :flip-y :type xcb:CARD32) + (rotation :initarg :rotation :type xcb:CARD32) + (button-threshold :initarg :button-threshold :type xcb:CARD32) + (status :initarg :status :type xcb:CARD8) + (iscore :initarg :iscore :type xcb:CARD8) + (pad~0 :initform 2 :type xcb:-pad) + (enable :initarg :enable :type xcb:CARD8) + (pad~1 :initform 3 :type xcb:-pad) + (offset-x :initarg :offset-x :type xcb:CARD32) + (offset-y :initarg :offset-y :type xcb:CARD32) + (width :initarg :width :type xcb:CARD32) + (height :initarg :height :type xcb:CARD32) + (screen :initarg :screen :type xcb:CARD32) + (following :initarg :following :type xcb:CARD32))) + +(defclass xcb:xinput:GetDeviceControl + (xcb:-request) + ((~opcode :initform 34 :type xcb:-u1) + (control-id :initarg :control-id :type xcb:CARD16) + (device-id :initarg :device-id :type xcb:CARD8) + (pad~0 :initform 1 :type xcb:-pad))) +(defclass xcb:xinput:GetDeviceControl~reply + (xcb:-reply) + ((xi-reply-type :initarg :xi-reply-type :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (status :initarg :status :type xcb:CARD8) + (pad~0 :initform 23 :type xcb:-pad) + (control :initarg :control :type xcb:xinput:DeviceState))) + +(defclass xcb:xinput:DeviceResolutionCtl + (xcb:-struct) + ((control-id :initarg :control-id :type xcb:CARD16) + (len :initarg :len :type xcb:CARD16) + (first-valuator :initarg :first-valuator :type xcb:CARD8) + (num-valuators :initarg :num-valuators :type xcb:CARD8) + (pad~0 :initform 2 :type xcb:-pad) + (resolution-values~ :initform + '(name resolution-values type xcb:CARD32 size + (xcb:-fieldref 'num-valuators)) + :type xcb:-list) + (resolution-values :initarg :resolution-values :type xcb:-ignore))) + +(defclass xcb:xinput:DeviceAbsCalibCtl + (xcb:-struct) + ((control-id :initarg :control-id :type xcb:CARD16) + (len :initarg :len :type xcb:CARD16) + (min-x :initarg :min-x :type xcb:INT32) + (max-x :initarg :max-x :type xcb:INT32) + (min-y :initarg :min-y :type xcb:INT32) + (max-y :initarg :max-y :type xcb:INT32) + (flip-x :initarg :flip-x :type xcb:CARD32) + (flip-y :initarg :flip-y :type xcb:CARD32) + (rotation :initarg :rotation :type xcb:CARD32) + (button-threshold :initarg :button-threshold :type xcb:CARD32))) + +(defclass xcb:xinput:DeviceAbsAreaCtrl + (xcb:-struct) + ((control-id :initarg :control-id :type xcb:CARD16) + (len :initarg :len :type xcb:CARD16) + (offset-x :initarg :offset-x :type xcb:CARD32) + (offset-y :initarg :offset-y :type xcb:CARD32) + (width :initarg :width :type xcb:INT32) + (height :initarg :height :type xcb:INT32) + (screen :initarg :screen :type xcb:INT32) + (following :initarg :following :type xcb:CARD32))) + +(defclass xcb:xinput:DeviceCoreCtrl + (xcb:-struct) + ((control-id :initarg :control-id :type xcb:CARD16) + (len :initarg :len :type xcb:CARD16) + (status :initarg :status :type xcb:CARD8) + (pad~0 :initform 3 :type xcb:-pad))) + +(defclass xcb:xinput:DeviceEnableCtrl + (xcb:-struct) + ((control-id :initarg :control-id :type xcb:CARD16) + (len :initarg :len :type xcb:CARD16) + (enable :initarg :enable :type xcb:CARD8) + (pad~0 :initform 3 :type xcb:-pad))) + +(defclass xcb:xinput:DeviceCtl + (xcb:-struct) + ((control-id :initarg :control-id :type xcb:CARD16) + (len :initarg :len :type xcb:CARD16) + (data :initform + '(expression + (xcb:-fieldref 'control-id) + cases + (((1) + first-valuator num-valuators pad~0 resolution-values~) + ((2) + min-x max-x min-y max-y flip-x flip-y rotation button-threshold) + ((3) + status pad~1) + ((4) + enable pad~2) + ((5) + offset-x offset-y width height screen following))) + :type xcb:-switch) + (first-valuator :initarg :first-valuator :type xcb:CARD8) + (num-valuators :initarg :num-valuators :type xcb:CARD8) + (pad~0 :initform 2 :type xcb:-pad) + (resolution-values~ :initform + '(name resolution-values type xcb:CARD32 size + (xcb:-fieldref 'num-valuators)) + :type xcb:-list) + (resolution-values :initarg :resolution-values :type xcb:-ignore) + (min-x :initarg :min-x :type xcb:INT32) + (max-x :initarg :max-x :type xcb:INT32) + (min-y :initarg :min-y :type xcb:INT32) + (max-y :initarg :max-y :type xcb:INT32) + (flip-x :initarg :flip-x :type xcb:CARD32) + (flip-y :initarg :flip-y :type xcb:CARD32) + (rotation :initarg :rotation :type xcb:CARD32) + (button-threshold :initarg :button-threshold :type xcb:CARD32) + (status :initarg :status :type xcb:CARD8) + (pad~1 :initform 3 :type xcb:-pad) + (enable :initarg :enable :type xcb:CARD8) + (pad~2 :initform 3 :type xcb:-pad) + (offset-x :initarg :offset-x :type xcb:CARD32) + (offset-y :initarg :offset-y :type xcb:CARD32) + (width :initarg :width :type xcb:INT32) + (height :initarg :height :type xcb:INT32) + (screen :initarg :screen :type xcb:INT32) + (following :initarg :following :type xcb:CARD32))) + +(defclass xcb:xinput:ChangeDeviceControl + (xcb:-request) + ((~opcode :initform 35 :type xcb:-u1) + (control-id :initarg :control-id :type xcb:CARD16) + (device-id :initarg :device-id :type xcb:CARD8) + (pad~0 :initform 1 :type xcb:-pad) + (control :initarg :control :type xcb:xinput:DeviceCtl))) +(defclass xcb:xinput:ChangeDeviceControl~reply + (xcb:-reply) + ((xi-reply-type :initarg :xi-reply-type :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (status :initarg :status :type xcb:CARD8) + (pad~0 :initform 23 :type xcb:-pad))) + +(defclass xcb:xinput:ListDeviceProperties + (xcb:-request) + ((~opcode :initform 36 :type xcb:-u1) + (device-id :initarg :device-id :type xcb:CARD8) + (pad~0 :initform 3 :type xcb:-pad))) +(defclass xcb:xinput:ListDeviceProperties~reply + (xcb:-reply) + ((xi-reply-type :initarg :xi-reply-type :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (num-atoms :initarg :num-atoms :type xcb:CARD16) + (pad~0 :initform 22 :type xcb:-pad) + (atoms~ :initform + '(name atoms type xcb:ATOM size + (xcb:-fieldref 'num-atoms)) + :type xcb:-list) + (atoms :initarg :atoms :type xcb:-ignore))) + +(defconst xcb:xinput:PropertyFormat:8Bits 8) +(defconst xcb:xinput:PropertyFormat:16Bits 16) +(defconst xcb:xinput:PropertyFormat:32Bits 32) + +(defclass xcb:xinput:ChangeDeviceProperty + (xcb:-request) + ((~opcode :initform 37 :type xcb:-u1) + (property :initarg :property :type xcb:ATOM) + (type :initarg :type :type xcb:ATOM) + (device-id :initarg :device-id :type xcb:CARD8) + (format :initarg :format :type xcb:CARD8) + (mode :initarg :mode :type xcb:CARD8) + (pad~0 :initform 1 :type xcb:-pad) + (num-items :initarg :num-items :type xcb:CARD32) + (items :initform + '(expression + (xcb:-fieldref 'format) + cases + (((8) + data8~ pad~1) + ((16) + data16~ pad~2) + ((32) + data32~))) + :type xcb:-switch) + (data8~ :initform + '(name data8 type xcb:CARD8 size + (xcb:-fieldref 'num-items)) + :type xcb:-list) + (data8 :initarg :data8 :type xcb:-ignore) + (pad~1 :initform 4 :type xcb:-pad-align) + (data16~ :initform + '(name data16 type xcb:CARD16 size + (xcb:-fieldref 'num-items)) + :type xcb:-list) + (data16 :initarg :data16 :type xcb:-ignore) + (pad~2 :initform 4 :type xcb:-pad-align) + (data32~ :initform + '(name data32 type xcb:CARD32 size + (xcb:-fieldref 'num-items)) + :type xcb:-list) + (data32 :initarg :data32 :type xcb:-ignore))) + +(defclass xcb:xinput:DeleteDeviceProperty + (xcb:-request) + ((~opcode :initform 38 :type xcb:-u1) + (property :initarg :property :type xcb:ATOM) + (device-id :initarg :device-id :type xcb:CARD8) + (pad~0 :initform 3 :type xcb:-pad))) + +(defclass xcb:xinput:GetDeviceProperty + (xcb:-request) + ((~opcode :initform 39 :type xcb:-u1) + (property :initarg :property :type xcb:ATOM) + (type :initarg :type :type xcb:ATOM) + (offset :initarg :offset :type xcb:CARD32) + (len :initarg :len :type xcb:CARD32) + (device-id :initarg :device-id :type xcb:CARD8) + (delete :initarg :delete :type xcb:BOOL) + (pad~0 :initform 2 :type xcb:-pad))) +(defclass xcb:xinput:GetDeviceProperty~reply + (xcb:-reply) + ((xi-reply-type :initarg :xi-reply-type :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (type :initarg :type :type xcb:ATOM) + (bytes-after :initarg :bytes-after :type xcb:CARD32) + (num-items :initarg :num-items :type xcb:CARD32) + (format :initarg :format :type xcb:CARD8) + (device-id :initarg :device-id :type xcb:CARD8) + (pad~0 :initform 10 :type xcb:-pad) + (items :initform + '(expression + (xcb:-fieldref 'format) + cases + (((8) + data8~ pad~1) + ((16) + data16~ pad~2) + ((32) + data32~))) + :type xcb:-switch) + (data8~ :initform + '(name data8 type xcb:CARD8 size + (xcb:-fieldref 'num-items)) + :type xcb:-list) + (data8 :initarg :data8 :type xcb:-ignore) + (pad~1 :initform 4 :type xcb:-pad-align) + (data16~ :initform + '(name data16 type xcb:CARD16 size + (xcb:-fieldref 'num-items)) + :type xcb:-list) + (data16 :initarg :data16 :type xcb:-ignore) + (pad~2 :initform 4 :type xcb:-pad-align) + (data32~ :initform + '(name data32 type xcb:CARD32 size + (xcb:-fieldref 'num-items)) + :type xcb:-list) + (data32 :initarg :data32 :type xcb:-ignore))) + +(defconst xcb:xinput:Device:All 0) +(defconst xcb:xinput:Device:AllMaster 1) + +(defclass xcb:xinput:GroupInfo + (xcb:-struct) + ((base :initarg :base :type xcb:CARD8) + (latched :initarg :latched :type xcb:CARD8) + (locked :initarg :locked :type xcb:CARD8) + (effective :initarg :effective :type xcb:CARD8))) + +(defclass xcb:xinput:ModifierInfo + (xcb:-struct) + ((base :initarg :base :type xcb:CARD32) + (latched :initarg :latched :type xcb:CARD32) + (locked :initarg :locked :type xcb:CARD32) + (effective :initarg :effective :type xcb:CARD32))) + +(defclass xcb:xinput:XIQueryPointer + (xcb:-request) + ((~opcode :initform 40 :type xcb:-u1) + (window :initarg :window :type xcb:WINDOW) + (deviceid :initarg :deviceid :type xcb:xinput:DeviceId) + (pad~0 :initform 2 :type xcb:-pad))) +(defclass xcb:xinput:XIQueryPointer~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (root :initarg :root :type xcb:WINDOW) + (child :initarg :child :type xcb:WINDOW) + (root-x :initarg :root-x :type xcb:xinput:FP1616) + (root-y :initarg :root-y :type xcb:xinput:FP1616) + (win-x :initarg :win-x :type xcb:xinput:FP1616) + (win-y :initarg :win-y :type xcb:xinput:FP1616) + (same-screen :initarg :same-screen :type xcb:BOOL) + (pad~1 :initform 1 :type xcb:-pad) + (buttons-len :initarg :buttons-len :type xcb:CARD16) + (mods :initarg :mods :type xcb:xinput:ModifierInfo) + (group :initarg :group :type xcb:xinput:GroupInfo) + (buttons~ :initform + '(name buttons type xcb:CARD32 size + (xcb:-fieldref 'buttons-len)) + :type xcb:-list) + (buttons :initarg :buttons :type xcb:-ignore))) + +(defclass xcb:xinput:XIWarpPointer + (xcb:-request) + ((~opcode :initform 41 :type xcb:-u1) + (src-win :initarg :src-win :type xcb:WINDOW) + (dst-win :initarg :dst-win :type xcb:WINDOW) + (src-x :initarg :src-x :type xcb:xinput:FP1616) + (src-y :initarg :src-y :type xcb:xinput:FP1616) + (src-width :initarg :src-width :type xcb:CARD16) + (src-height :initarg :src-height :type xcb:CARD16) + (dst-x :initarg :dst-x :type xcb:xinput:FP1616) + (dst-y :initarg :dst-y :type xcb:xinput:FP1616) + (deviceid :initarg :deviceid :type xcb:xinput:DeviceId) + (pad~0 :initform 2 :type xcb:-pad))) + +(defclass xcb:xinput:XIChangeCursor + (xcb:-request) + ((~opcode :initform 42 :type xcb:-u1) + (window :initarg :window :type xcb:WINDOW) + (cursor :initarg :cursor :type xcb:CURSOR) + (deviceid :initarg :deviceid :type xcb:xinput:DeviceId) + (pad~0 :initform 2 :type xcb:-pad))) + +(defconst xcb:xinput:HierarchyChangeType:AddMaster 1) +(defconst xcb:xinput:HierarchyChangeType:RemoveMaster 2) +(defconst xcb:xinput:HierarchyChangeType:AttachSlave 3) +(defconst xcb:xinput:HierarchyChangeType:DetachSlave 4) + +(defconst xcb:xinput:ChangeMode:Attach 1) +(defconst xcb:xinput:ChangeMode:Float 2) + +(defclass xcb:xinput:AddMaster + (xcb:-struct) + ((type :initarg :type :type xcb:CARD16) + (len :initarg :len :type xcb:CARD16) + (name-len :initarg :name-len :type xcb:CARD16) + (send-core :initarg :send-core :type xcb:BOOL) + (enable :initarg :enable :type xcb:BOOL) + (name~ :initform + '(name name type xcb:char size + (xcb:-fieldref 'name-len)) + :type xcb:-list) + (name :initarg :name :type xcb:-ignore) + (pad~0 :initform 4 :type xcb:-pad-align))) + +(defclass xcb:xinput:RemoveMaster + (xcb:-struct) + ((type :initarg :type :type xcb:CARD16) + (len :initarg :len :type xcb:CARD16) + (deviceid :initarg :deviceid :type xcb:xinput:DeviceId) + (return-mode :initarg :return-mode :type xcb:CARD8) + (pad~0 :initform 1 :type xcb:-pad) + (return-pointer :initarg :return-pointer :type xcb:xinput:DeviceId) + (return-keyboard :initarg :return-keyboard :type xcb:xinput:DeviceId))) + +(defclass xcb:xinput:AttachSlave + (xcb:-struct) + ((type :initarg :type :type xcb:CARD16) + (len :initarg :len :type xcb:CARD16) + (deviceid :initarg :deviceid :type xcb:xinput:DeviceId) + (master :initarg :master :type xcb:xinput:DeviceId))) + +(defclass xcb:xinput:DetachSlave + (xcb:-struct) + ((type :initarg :type :type xcb:CARD16) + (len :initarg :len :type xcb:CARD16) + (deviceid :initarg :deviceid :type xcb:xinput:DeviceId) + (pad~0 :initform 2 :type xcb:-pad))) + +(defclass xcb:xinput:HierarchyChange + (xcb:-struct) + ((type :initarg :type :type xcb:CARD16) + (len :initarg :len :type xcb:CARD16) + (data :initform + '(expression + (xcb:-fieldref 'type) + cases + (((1) + name-len send-core enable name~ pad~0) + ((2) + deviceid return-mode pad~1 return-pointer return-keyboard) + ((3) + deviceid* master) + ((4) + deviceid** pad~2))) + :type xcb:-switch) + (name-len :initarg :name-len :type xcb:CARD16) + (send-core :initarg :send-core :type xcb:BOOL) + (enable :initarg :enable :type xcb:BOOL) + (name~ :initform + '(name name type xcb:char size + (xcb:-fieldref 'name-len)) + :type xcb:-list) + (name :initarg :name :type xcb:-ignore) + (pad~0 :initform 4 :type xcb:-pad-align) + (deviceid :initarg :deviceid :type xcb:xinput:DeviceId) + (return-mode :initarg :return-mode :type xcb:CARD8) + (pad~1 :initform 1 :type xcb:-pad) + (return-pointer :initarg :return-pointer :type xcb:xinput:DeviceId) + (return-keyboard :initarg :return-keyboard :type xcb:xinput:DeviceId) + (deviceid* :initarg :deviceid* :type xcb:xinput:DeviceId) + (master :initarg :master :type xcb:xinput:DeviceId) + (deviceid** :initarg :deviceid** :type xcb:xinput:DeviceId) + (pad~2 :initform 2 :type xcb:-pad))) + +(defclass xcb:xinput:XIChangeHierarchy + (xcb:-request) + ((~opcode :initform 43 :type xcb:-u1) + (num-changes :initarg :num-changes :type xcb:CARD8) + (pad~0 :initform 3 :type xcb:-pad) + (changes~ :initform + '(name changes type xcb:xinput:HierarchyChange size + (xcb:-fieldref 'num-changes)) + :type xcb:-list) + (changes :initarg :changes :type xcb:-ignore))) + +(defclass xcb:xinput:XISetClientPointer + (xcb:-request) + ((~opcode :initform 44 :type xcb:-u1) + (window :initarg :window :type xcb:WINDOW) + (deviceid :initarg :deviceid :type xcb:xinput:DeviceId) + (pad~0 :initform 2 :type xcb:-pad))) + +(defclass xcb:xinput:XIGetClientPointer + (xcb:-request) + ((~opcode :initform 45 :type xcb:-u1) + (window :initarg :window :type xcb:WINDOW))) +(defclass xcb:xinput:XIGetClientPointer~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (set :initarg :set :type xcb:BOOL) + (pad~1 :initform 1 :type xcb:-pad) + (deviceid :initarg :deviceid :type xcb:xinput:DeviceId) + (pad~2 :initform 20 :type xcb:-pad))) + +(defconst xcb:xinput:XIEventMask:DeviceChanged 2) +(defconst xcb:xinput:XIEventMask:KeyPress 4) +(defconst xcb:xinput:XIEventMask:KeyRelease 8) +(defconst xcb:xinput:XIEventMask:ButtonPress 16) +(defconst xcb:xinput:XIEventMask:ButtonRelease 32) +(defconst xcb:xinput:XIEventMask:Motion 64) +(defconst xcb:xinput:XIEventMask:Enter 128) +(defconst xcb:xinput:XIEventMask:Leave 256) +(defconst xcb:xinput:XIEventMask:FocusIn 512) +(defconst xcb:xinput:XIEventMask:FocusOut 1024) +(defconst xcb:xinput:XIEventMask:Hierarchy 2048) +(defconst xcb:xinput:XIEventMask:Property 4096) +(defconst xcb:xinput:XIEventMask:RawKeyPress 8192) +(defconst xcb:xinput:XIEventMask:RawKeyRelease 16384) +(defconst xcb:xinput:XIEventMask:RawButtonPress 32768) +(defconst xcb:xinput:XIEventMask:RawButtonRelease 65536) +(defconst xcb:xinput:XIEventMask:RawMotion 131072) +(defconst xcb:xinput:XIEventMask:TouchBegin 262144) +(defconst xcb:xinput:XIEventMask:TouchUpdate 524288) +(defconst xcb:xinput:XIEventMask:TouchEnd 1048576) +(defconst xcb:xinput:XIEventMask:TouchOwnership 2097152) +(defconst xcb:xinput:XIEventMask:RawTouchBegin 4194304) +(defconst xcb:xinput:XIEventMask:RawTouchUpdate 8388608) +(defconst xcb:xinput:XIEventMask:RawTouchEnd 16777216) +(defconst xcb:xinput:XIEventMask:BarrierHit 33554432) +(defconst xcb:xinput:XIEventMask:BarrierLeave 67108864) + +(defclass xcb:xinput:EventMask + (xcb:-struct) + ((deviceid :initarg :deviceid :type xcb:xinput:DeviceId) + (mask-len :initarg :mask-len :type xcb:CARD16) + (mask~ :initform + '(name mask type xcb:CARD32 size + (xcb:-fieldref 'mask-len)) + :type xcb:-list) + (mask :initarg :mask :type xcb:-ignore))) + +(defclass xcb:xinput:XISelectEvents + (xcb:-request) + ((~opcode :initform 46 :type xcb:-u1) + (window :initarg :window :type xcb:WINDOW) + (num-mask :initarg :num-mask :type xcb:CARD16) + (pad~0 :initform 2 :type xcb:-pad) + (masks~ :initform + '(name masks type xcb:xinput:EventMask size + (xcb:-fieldref 'num-mask)) + :type xcb:-list) + (masks :initarg :masks :type xcb:-ignore))) + +(defclass xcb:xinput:XIQueryVersion + (xcb:-request) + ((~opcode :initform 47 :type xcb:-u1) + (major-version :initarg :major-version :type xcb:CARD16) + (minor-version :initarg :minor-version :type xcb:CARD16))) +(defclass xcb:xinput:XIQueryVersion~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (major-version :initarg :major-version :type xcb:CARD16) + (minor-version :initarg :minor-version :type xcb:CARD16) + (pad~1 :initform 20 :type xcb:-pad))) + +(defconst xcb:xinput:DeviceClassType:Key 0) +(defconst xcb:xinput:DeviceClassType:Button 1) +(defconst xcb:xinput:DeviceClassType:Valuator 2) +(defconst xcb:xinput:DeviceClassType:Scroll 3) +(defconst xcb:xinput:DeviceClassType:Touch 8) + +(defconst xcb:xinput:DeviceType:MasterPointer 1) +(defconst xcb:xinput:DeviceType:MasterKeyboard 2) +(defconst xcb:xinput:DeviceType:SlavePointer 3) +(defconst xcb:xinput:DeviceType:SlaveKeyboard 4) +(defconst xcb:xinput:DeviceType:FloatingSlave 5) + +(defconst xcb:xinput:ScrollFlags:NoEmulation 1) +(defconst xcb:xinput:ScrollFlags:Preferred 2) + +(defconst xcb:xinput:ScrollType:Vertical 1) +(defconst xcb:xinput:ScrollType:Horizontal 2) + +(defconst xcb:xinput:TouchMode:Direct 1) +(defconst xcb:xinput:TouchMode:Dependent 2) + +(defclass xcb:xinput:ButtonClass + (xcb:-struct) + ((type :initarg :type :type xcb:CARD16) + (len :initarg :len :type xcb:CARD16) + (sourceid :initarg :sourceid :type xcb:xinput:DeviceId) + (num-buttons :initarg :num-buttons :type xcb:CARD16) + (state~ :initform + '(name state type xcb:CARD32 size + (/ + (+ + (xcb:-fieldref 'num-buttons) + 31) + 32)) + :type xcb:-list) + (state :initarg :state :type xcb:-ignore) + (labels~ :initform + '(name labels type xcb:ATOM size + (xcb:-fieldref 'num-buttons)) + :type xcb:-list) + (labels :initarg :labels :type xcb:-ignore))) + +(defclass xcb:xinput:KeyClass + (xcb:-struct) + ((type :initarg :type :type xcb:CARD16) + (len :initarg :len :type xcb:CARD16) + (sourceid :initarg :sourceid :type xcb:xinput:DeviceId) + (num-keys :initarg :num-keys :type xcb:CARD16) + (keys~ :initform + '(name keys type xcb:CARD32 size + (xcb:-fieldref 'num-keys)) + :type xcb:-list) + (keys :initarg :keys :type xcb:-ignore))) + +(defclass xcb:xinput:ScrollClass + (xcb:-struct) + ((type :initarg :type :type xcb:CARD16) + (len :initarg :len :type xcb:CARD16) + (sourceid :initarg :sourceid :type xcb:xinput:DeviceId) + (number :initarg :number :type xcb:CARD16) + (scroll-type :initarg :scroll-type :type xcb:CARD16) + (pad~0 :initform 2 :type xcb:-pad) + (flags :initarg :flags :type xcb:CARD32) + (increment :initarg :increment :type xcb:xinput:FP3232))) + +(defclass xcb:xinput:TouchClass + (xcb:-struct) + ((type :initarg :type :type xcb:CARD16) + (len :initarg :len :type xcb:CARD16) + (sourceid :initarg :sourceid :type xcb:xinput:DeviceId) + (mode :initarg :mode :type xcb:CARD8) + (num-touches :initarg :num-touches :type xcb:CARD8))) + +(defclass xcb:xinput:ValuatorClass + (xcb:-struct) + ((type :initarg :type :type xcb:CARD16) + (len :initarg :len :type xcb:CARD16) + (sourceid :initarg :sourceid :type xcb:xinput:DeviceId) + (number :initarg :number :type xcb:CARD16) + (label :initarg :label :type xcb:ATOM) + (min :initarg :min :type xcb:xinput:FP3232) + (max :initarg :max :type xcb:xinput:FP3232) + (value :initarg :value :type xcb:xinput:FP3232) + (resolution :initarg :resolution :type xcb:CARD32) + (mode :initarg :mode :type xcb:CARD8) + (pad~0 :initform 3 :type xcb:-pad))) + +(defclass xcb:xinput:DeviceClass + (xcb:-struct) + ((type :initarg :type :type xcb:CARD16) + (len :initarg :len :type xcb:CARD16) + (sourceid :initarg :sourceid :type xcb:xinput:DeviceId) + (data :initform + '(expression + (xcb:-fieldref 'type) + cases + (((0) + pad~0 num-keys keys~) + ((1) + pad~1 num-buttons state~ labels~) + ((2) + pad~2 number label min max value resolution mode pad~3) + ((3) + pad~4 number* scroll-type pad~5 flags increment) + ((8) + mode* num-touches))) + :type xcb:-switch) + (pad~0 :initform + [4 2] + :type xcb:-pad-align) + (num-keys :initarg :num-keys :type xcb:CARD16) + (keys~ :initform + '(name keys type xcb:CARD32 size + (xcb:-fieldref 'num-keys)) + :type xcb:-list) + (keys :initarg :keys :type xcb:-ignore) + (pad~1 :initform + [4 2] + :type xcb:-pad-align) + (num-buttons :initarg :num-buttons :type xcb:CARD16) + (state~ :initform + '(name state type xcb:CARD32 size + (/ + (+ + (xcb:-fieldref 'num-buttons) + 31) + 32)) + :type xcb:-list) + (state :initarg :state :type xcb:-ignore) + (labels~ :initform + '(name labels type xcb:ATOM size + (xcb:-fieldref 'num-buttons)) + :type xcb:-list) + (labels :initarg :labels :type xcb:-ignore) + (pad~2 :initform + [4 2] + :type xcb:-pad-align) + (number :initarg :number :type xcb:CARD16) + (label :initarg :label :type xcb:ATOM) + (min :initarg :min :type xcb:xinput:FP3232) + (max :initarg :max :type xcb:xinput:FP3232) + (value :initarg :value :type xcb:xinput:FP3232) + (resolution :initarg :resolution :type xcb:CARD32) + (mode :initarg :mode :type xcb:CARD8) + (pad~3 :initform 3 :type xcb:-pad) + (pad~4 :initform + [4 2] + :type xcb:-pad-align) + (number* :initarg :number* :type xcb:CARD16) + (scroll-type :initarg :scroll-type :type xcb:CARD16) + (pad~5 :initform 2 :type xcb:-pad) + (flags :initarg :flags :type xcb:CARD32) + (increment :initarg :increment :type xcb:xinput:FP3232) + (mode* :initarg :mode* :type xcb:CARD8) + (num-touches :initarg :num-touches :type xcb:CARD8))) + +(defclass xcb:xinput:XIDeviceInfo + (xcb:-struct) + ((deviceid :initarg :deviceid :type xcb:xinput:DeviceId) + (type :initarg :type :type xcb:CARD16) + (attachment :initarg :attachment :type xcb:xinput:DeviceId) + (num-classes :initarg :num-classes :type xcb:CARD16) + (name-len :initarg :name-len :type xcb:CARD16) + (enabled :initarg :enabled :type xcb:BOOL) + (pad~0 :initform 1 :type xcb:-pad) + (name~ :initform + '(name name type xcb:char size + (xcb:-fieldref 'name-len)) + :type xcb:-list) + (name :initarg :name :type xcb:-ignore) + (pad~1 :initform 4 :type xcb:-pad-align) + (classes~ :initform + '(name classes type xcb:xinput:DeviceClass size + (xcb:-fieldref 'num-classes)) + :type xcb:-list) + (classes :initarg :classes :type xcb:-ignore))) + +(defclass xcb:xinput:XIQueryDevice + (xcb:-request) + ((~opcode :initform 48 :type xcb:-u1) + (deviceid :initarg :deviceid :type xcb:xinput:DeviceId) + (pad~0 :initform 2 :type xcb:-pad))) +(defclass xcb:xinput:XIQueryDevice~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (num-infos :initarg :num-infos :type xcb:CARD16) + (pad~1 :initform 22 :type xcb:-pad) + (infos~ :initform + '(name infos type xcb:xinput:XIDeviceInfo size + (xcb:-fieldref 'num-infos)) + :type xcb:-list) + (infos :initarg :infos :type xcb:-ignore))) + +(defclass xcb:xinput:XISetFocus + (xcb:-request) + ((~opcode :initform 49 :type xcb:-u1) + (window :initarg :window :type xcb:WINDOW) + (time :initarg :time :type xcb:TIMESTAMP) + (deviceid :initarg :deviceid :type xcb:xinput:DeviceId) + (pad~0 :initform 2 :type xcb:-pad))) + +(defclass xcb:xinput:XIGetFocus + (xcb:-request) + ((~opcode :initform 50 :type xcb:-u1) + (deviceid :initarg :deviceid :type xcb:xinput:DeviceId) + (pad~0 :initform 2 :type xcb:-pad))) +(defclass xcb:xinput:XIGetFocus~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (focus :initarg :focus :type xcb:WINDOW) + (pad~1 :initform 20 :type xcb:-pad))) + +(defconst xcb:xinput:GrabOwner:NoOwner 0) +(defconst xcb:xinput:GrabOwner:Owner 1) + +(defclass xcb:xinput:XIGrabDevice + (xcb:-request) + ((~opcode :initform 51 :type xcb:-u1) + (window :initarg :window :type xcb:WINDOW) + (time :initarg :time :type xcb:TIMESTAMP) + (cursor :initarg :cursor :type xcb:CURSOR) + (deviceid :initarg :deviceid :type xcb:xinput:DeviceId) + (mode :initarg :mode :type xcb:CARD8) + (paired-device-mode :initarg :paired-device-mode :type xcb:CARD8) + (owner-events :initarg :owner-events :type xcb:BOOL) + (pad~0 :initform 1 :type xcb:-pad) + (mask-len :initarg :mask-len :type xcb:CARD16) + (mask~ :initform + '(name mask type xcb:CARD32 size + (xcb:-fieldref 'mask-len)) + :type xcb:-list) + (mask :initarg :mask :type xcb:-ignore))) +(defclass xcb:xinput:XIGrabDevice~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (status :initarg :status :type xcb:CARD8) + (pad~1 :initform 23 :type xcb:-pad))) + +(defclass xcb:xinput:XIUngrabDevice + (xcb:-request) + ((~opcode :initform 52 :type xcb:-u1) + (time :initarg :time :type xcb:TIMESTAMP) + (deviceid :initarg :deviceid :type xcb:xinput:DeviceId) + (pad~0 :initform 2 :type xcb:-pad))) + +(defconst xcb:xinput:EventMode:AsyncDevice 0) +(defconst xcb:xinput:EventMode:SyncDevice 1) +(defconst xcb:xinput:EventMode:ReplayDevice 2) +(defconst xcb:xinput:EventMode:AsyncPairedDevice 3) +(defconst xcb:xinput:EventMode:AsyncPair 4) +(defconst xcb:xinput:EventMode:SyncPair 5) +(defconst xcb:xinput:EventMode:AcceptTouch 6) +(defconst xcb:xinput:EventMode:RejectTouch 7) + +(defclass xcb:xinput:XIAllowEvents + (xcb:-request) + ((~opcode :initform 53 :type xcb:-u1) + (time :initarg :time :type xcb:TIMESTAMP) + (deviceid :initarg :deviceid :type xcb:xinput:DeviceId) + (event-mode :initarg :event-mode :type xcb:CARD8) + (pad~0 :initform 1 :type xcb:-pad) + (touchid :initarg :touchid :type xcb:CARD32) + (grab-window :initarg :grab-window :type xcb:WINDOW))) + +(defconst xcb:xinput:GrabMode22:Sync 0) +(defconst xcb:xinput:GrabMode22:Async 1) +(defconst xcb:xinput:GrabMode22:Touch 2) + +(defconst xcb:xinput:GrabType:Button 0) +(defconst xcb:xinput:GrabType:Keycode 1) +(defconst xcb:xinput:GrabType:Enter 2) +(defconst xcb:xinput:GrabType:FocusIn 3) +(defconst xcb:xinput:GrabType:TouchBegin 4) + +(defclass xcb:xinput:GrabModifierInfo + (xcb:-struct) + ((modifiers :initarg :modifiers :type xcb:CARD32) + (status :initarg :status :type xcb:CARD8) + (pad~0 :initform 3 :type xcb:-pad))) + +(defclass xcb:xinput:XIPassiveGrabDevice + (xcb:-request) + ((~opcode :initform 54 :type xcb:-u1) + (time :initarg :time :type xcb:TIMESTAMP) + (grab-window :initarg :grab-window :type xcb:WINDOW) + (cursor :initarg :cursor :type xcb:CURSOR) + (detail :initarg :detail :type xcb:CARD32) + (deviceid :initarg :deviceid :type xcb:xinput:DeviceId) + (num-modifiers :initarg :num-modifiers :type xcb:CARD16) + (mask-len :initarg :mask-len :type xcb:CARD16) + (grab-type :initarg :grab-type :type xcb:CARD8) + (grab-mode :initarg :grab-mode :type xcb:CARD8) + (paired-device-mode :initarg :paired-device-mode :type xcb:CARD8) + (owner-events :initarg :owner-events :type xcb:BOOL) + (pad~0 :initform 2 :type xcb:-pad) + (mask~ :initform + '(name mask type xcb:CARD32 size + (xcb:-fieldref 'mask-len)) + :type xcb:-list) + (mask :initarg :mask :type xcb:-ignore) + (modifiers~ :initform + '(name modifiers type xcb:CARD32 size + (xcb:-fieldref 'num-modifiers)) + :type xcb:-list) + (modifiers :initarg :modifiers :type xcb:-ignore))) +(defclass xcb:xinput:XIPassiveGrabDevice~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (num-modifiers :initarg :num-modifiers :type xcb:CARD16) + (pad~1 :initform 22 :type xcb:-pad) + (modifiers~ :initform + '(name modifiers type xcb:xinput:GrabModifierInfo size + (xcb:-fieldref 'num-modifiers)) + :type xcb:-list) + (modifiers :initarg :modifiers :type xcb:-ignore))) + +(defclass xcb:xinput:XIPassiveUngrabDevice + (xcb:-request) + ((~opcode :initform 55 :type xcb:-u1) + (grab-window :initarg :grab-window :type xcb:WINDOW) + (detail :initarg :detail :type xcb:CARD32) + (deviceid :initarg :deviceid :type xcb:xinput:DeviceId) + (num-modifiers :initarg :num-modifiers :type xcb:CARD16) + (grab-type :initarg :grab-type :type xcb:CARD8) + (pad~0 :initform 3 :type xcb:-pad) + (modifiers~ :initform + '(name modifiers type xcb:CARD32 size + (xcb:-fieldref 'num-modifiers)) + :type xcb:-list) + (modifiers :initarg :modifiers :type xcb:-ignore))) + +(defclass xcb:xinput:XIListProperties + (xcb:-request) + ((~opcode :initform 56 :type xcb:-u1) + (deviceid :initarg :deviceid :type xcb:xinput:DeviceId) + (pad~0 :initform 2 :type xcb:-pad))) +(defclass xcb:xinput:XIListProperties~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (num-properties :initarg :num-properties :type xcb:CARD16) + (pad~1 :initform 22 :type xcb:-pad) + (properties~ :initform + '(name properties type xcb:ATOM size + (xcb:-fieldref 'num-properties)) + :type xcb:-list) + (properties :initarg :properties :type xcb:-ignore))) + +(defclass xcb:xinput:XIChangeProperty + (xcb:-request) + ((~opcode :initform 57 :type xcb:-u1) + (deviceid :initarg :deviceid :type xcb:xinput:DeviceId) + (mode :initarg :mode :type xcb:CARD8) + (format :initarg :format :type xcb:CARD8) + (property :initarg :property :type xcb:ATOM) + (type :initarg :type :type xcb:ATOM) + (num-items :initarg :num-items :type xcb:CARD32) + (items :initform + '(expression + (xcb:-fieldref 'format) + cases + (((8) + data8~ pad~0) + ((16) + data16~ pad~1) + ((32) + data32~))) + :type xcb:-switch) + (data8~ :initform + '(name data8 type xcb:CARD8 size + (xcb:-fieldref 'num-items)) + :type xcb:-list) + (data8 :initarg :data8 :type xcb:-ignore) + (pad~0 :initform 4 :type xcb:-pad-align) + (data16~ :initform + '(name data16 type xcb:CARD16 size + (xcb:-fieldref 'num-items)) + :type xcb:-list) + (data16 :initarg :data16 :type xcb:-ignore) + (pad~1 :initform 4 :type xcb:-pad-align) + (data32~ :initform + '(name data32 type xcb:CARD32 size + (xcb:-fieldref 'num-items)) + :type xcb:-list) + (data32 :initarg :data32 :type xcb:-ignore))) + +(defclass xcb:xinput:XIDeleteProperty + (xcb:-request) + ((~opcode :initform 58 :type xcb:-u1) + (deviceid :initarg :deviceid :type xcb:xinput:DeviceId) + (pad~0 :initform 2 :type xcb:-pad) + (property :initarg :property :type xcb:ATOM))) + +(defclass xcb:xinput:XIGetProperty + (xcb:-request) + ((~opcode :initform 59 :type xcb:-u1) + (deviceid :initarg :deviceid :type xcb:xinput:DeviceId) + (delete :initarg :delete :type xcb:BOOL) + (pad~0 :initform 1 :type xcb:-pad) + (property :initarg :property :type xcb:ATOM) + (type :initarg :type :type xcb:ATOM) + (offset :initarg :offset :type xcb:CARD32) + (len :initarg :len :type xcb:CARD32))) +(defclass xcb:xinput:XIGetProperty~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (type :initarg :type :type xcb:ATOM) + (bytes-after :initarg :bytes-after :type xcb:CARD32) + (num-items :initarg :num-items :type xcb:CARD32) + (format :initarg :format :type xcb:CARD8) + (pad~1 :initform 11 :type xcb:-pad) + (items :initform + '(expression + (xcb:-fieldref 'format) + cases + (((8) + data8~ pad~2) + ((16) + data16~ pad~3) + ((32) + data32~))) + :type xcb:-switch) + (data8~ :initform + '(name data8 type xcb:CARD8 size + (xcb:-fieldref 'num-items)) + :type xcb:-list) + (data8 :initarg :data8 :type xcb:-ignore) + (pad~2 :initform 4 :type xcb:-pad-align) + (data16~ :initform + '(name data16 type xcb:CARD16 size + (xcb:-fieldref 'num-items)) + :type xcb:-list) + (data16 :initarg :data16 :type xcb:-ignore) + (pad~3 :initform 4 :type xcb:-pad-align) + (data32~ :initform + '(name data32 type xcb:CARD32 size + (xcb:-fieldref 'num-items)) + :type xcb:-list) + (data32 :initarg :data32 :type xcb:-ignore))) + +(defclass xcb:xinput:XIGetSelectedEvents + (xcb:-request) + ((~opcode :initform 60 :type xcb:-u1) + (window :initarg :window :type xcb:WINDOW))) +(defclass xcb:xinput:XIGetSelectedEvents~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (num-masks :initarg :num-masks :type xcb:CARD16) + (pad~1 :initform 22 :type xcb:-pad) + (masks~ :initform + '(name masks type xcb:xinput:EventMask size + (xcb:-fieldref 'num-masks)) + :type xcb:-list) + (masks :initarg :masks :type xcb:-ignore))) + +(defclass xcb:xinput:BarrierReleasePointerInfo + (xcb:-struct) + ((deviceid :initarg :deviceid :type xcb:xinput:DeviceId) + (pad~0 :initform 2 :type xcb:-pad) + (barrier :initarg :barrier :type xcb:xfixes:BARRIER) + (eventid :initarg :eventid :type xcb:CARD32))) + +(defclass xcb:xinput:XIBarrierReleasePointer + (xcb:-request) + ((~opcode :initform 61 :type xcb:-u1) + (num-barriers :initarg :num-barriers :type xcb:CARD32) + (barriers~ :initform + '(name barriers type xcb:xinput:BarrierReleasePointerInfo size + (xcb:-fieldref 'num-barriers)) + :type xcb:-list) + (barriers :initarg :barriers :type xcb:-ignore))) + +(defclass xcb:xinput:DeviceValuator + (xcb:-event) + ((~code :initform 0) + (device-id :initarg :device-id :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (device-state :initarg :device-state :type xcb:CARD16) + (num-valuators :initarg :num-valuators :type xcb:CARD8) + (first-valuator :initarg :first-valuator :type xcb:CARD8) + (valuators~ :initform + '(name valuators type xcb:INT32 size 6) + :type xcb:-list) + (valuators :initarg :valuators :type xcb:-ignore))) + +(defconst xcb:xinput:MoreEventsMask:MoreEvents 128) + +(defclass xcb:xinput:DeviceKeyPress + (xcb:-event) + ((~code :initform 1) + (detail :initarg :detail :type xcb:BYTE) + (~sequence :type xcb:CARD16) + (time :initarg :time :type xcb:TIMESTAMP) + (root :initarg :root :type xcb:WINDOW) + (event :initarg :event :type xcb:WINDOW) + (child :initarg :child :type xcb:WINDOW) + (root-x :initarg :root-x :type xcb:INT16) + (root-y :initarg :root-y :type xcb:INT16) + (event-x :initarg :event-x :type xcb:INT16) + (event-y :initarg :event-y :type xcb:INT16) + (state :initarg :state :type xcb:CARD16) + (same-screen :initarg :same-screen :type xcb:BOOL) + (device-id :initarg :device-id :type xcb:CARD8))) + +(defclass xcb:xinput:DeviceKeyRelease + (xcb:-event xcb:xinput:DeviceKeyPress) + ((~code :initform 2))) + +(defclass xcb:xinput:DeviceButtonPress + (xcb:-event xcb:xinput:DeviceKeyPress) + ((~code :initform 3))) + +(defclass xcb:xinput:DeviceButtonRelease + (xcb:-event xcb:xinput:DeviceKeyPress) + ((~code :initform 4))) + +(defclass xcb:xinput:DeviceMotionNotify + (xcb:-event xcb:xinput:DeviceKeyPress) + ((~code :initform 5))) + +(defclass xcb:xinput:DeviceFocusIn + (xcb:-event) + ((~code :initform 6) + (detail :initarg :detail :type xcb:BYTE) + (~sequence :type xcb:CARD16) + (time :initarg :time :type xcb:TIMESTAMP) + (window :initarg :window :type xcb:WINDOW) + (mode :initarg :mode :type xcb:BYTE) + (device-id :initarg :device-id :type xcb:CARD8) + (pad~0 :initform 18 :type xcb:-pad))) + +(defclass xcb:xinput:DeviceFocusOut + (xcb:-event xcb:xinput:DeviceFocusIn) + ((~code :initform 7))) + +(defclass xcb:xinput:ProximityIn + (xcb:-event xcb:xinput:DeviceKeyPress) + ((~code :initform 8))) + +(defclass xcb:xinput:ProximityOut + (xcb:-event xcb:xinput:DeviceKeyPress) + ((~code :initform 9))) + +(defconst xcb:xinput:ClassesReportedMask:OutOfProximity 128) +(defconst xcb:xinput:ClassesReportedMask:DeviceModeAbsolute 64) +(defconst xcb:xinput:ClassesReportedMask:ReportingValuators 4) +(defconst xcb:xinput:ClassesReportedMask:ReportingButtons 2) +(defconst xcb:xinput:ClassesReportedMask:ReportingKeys 1) + +(defclass xcb:xinput:DeviceStateNotify + (xcb:-event) + ((~code :initform 10) + (device-id :initarg :device-id :type xcb:BYTE) + (~sequence :type xcb:CARD16) + (time :initarg :time :type xcb:TIMESTAMP) + (num-keys :initarg :num-keys :type xcb:CARD8) + (num-buttons :initarg :num-buttons :type xcb:CARD8) + (num-valuators :initarg :num-valuators :type xcb:CARD8) + (classes-reported :initarg :classes-reported :type xcb:CARD8) + (buttons~ :initform + '(name buttons type xcb:CARD8 size 4) + :type xcb:-list) + (buttons :initarg :buttons :type xcb:-ignore) + (keys~ :initform + '(name keys type xcb:CARD8 size 4) + :type xcb:-list) + (keys :initarg :keys :type xcb:-ignore) + (valuators~ :initform + '(name valuators type xcb:CARD32 size 3) + :type xcb:-list) + (valuators :initarg :valuators :type xcb:-ignore))) + +(defclass xcb:xinput:DeviceMappingNotify + (xcb:-event) + ((~code :initform 11) + (device-id :initarg :device-id :type xcb:BYTE) + (~sequence :type xcb:CARD16) + (request :initarg :request :type xcb:CARD8) + (first-keycode :initarg :first-keycode :type xcb:xinput:KeyCode) + (count :initarg :count :type xcb:CARD8) + (pad~0 :initform 1 :type xcb:-pad) + (time :initarg :time :type xcb:TIMESTAMP) + (pad~1 :initform 20 :type xcb:-pad))) + +(defconst xcb:xinput:ChangeDevice:NewPointer 0) +(defconst xcb:xinput:ChangeDevice:NewKeyboard 1) + +(defclass xcb:xinput:ChangeDeviceNotify + (xcb:-event) + ((~code :initform 12) + (device-id :initarg :device-id :type xcb:BYTE) + (~sequence :type xcb:CARD16) + (time :initarg :time :type xcb:TIMESTAMP) + (request :initarg :request :type xcb:CARD8) + (pad~0 :initform 23 :type xcb:-pad))) + +(defclass xcb:xinput:DeviceKeyStateNotify + (xcb:-event) + ((~code :initform 13) + (device-id :initarg :device-id :type xcb:BYTE) + (~sequence :type xcb:CARD16) + (keys~ :initform + '(name keys type xcb:CARD8 size 28) + :type xcb:-list) + (keys :initarg :keys :type xcb:-ignore))) + +(defclass xcb:xinput:DeviceButtonStateNotify + (xcb:-event) + ((~code :initform 14) + (device-id :initarg :device-id :type xcb:BYTE) + (~sequence :type xcb:CARD16) + (buttons~ :initform + '(name buttons type xcb:CARD8 size 28) + :type xcb:-list) + (buttons :initarg :buttons :type xcb:-ignore))) + +(defconst xcb:xinput:DeviceChange:Added 0) +(defconst xcb:xinput:DeviceChange:Removed 1) +(defconst xcb:xinput:DeviceChange:Enabled 2) +(defconst xcb:xinput:DeviceChange:Disabled 3) +(defconst xcb:xinput:DeviceChange:Unrecoverable 4) +(defconst xcb:xinput:DeviceChange:ControlChanged 5) + +(defclass xcb:xinput:DevicePresenceNotify + (xcb:-event) + ((~code :initform 15) + (pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (time :initarg :time :type xcb:TIMESTAMP) + (devchange :initarg :devchange :type xcb:BYTE) + (device-id :initarg :device-id :type xcb:BYTE) + (control :initarg :control :type xcb:CARD16) + (pad~1 :initform 20 :type xcb:-pad))) + +(defclass xcb:xinput:DevicePropertyNotify + (xcb:-event) + ((~code :initform 16) + (state :initarg :state :type xcb:BYTE) + (~sequence :type xcb:CARD16) + (time :initarg :time :type xcb:TIMESTAMP) + (property :initarg :property :type xcb:ATOM) + (pad~0 :initform 19 :type xcb:-pad) + (device-id :initarg :device-id :type xcb:CARD8))) + +(defconst xcb:xinput:ChangeReason:SlaveSwitch 1) +(defconst xcb:xinput:ChangeReason:DeviceChange 2) + +(defclass xcb:xinput:DeviceChanged + (xcb:-generic-event) + ((~evtype :initform 1) + (deviceid :initarg :deviceid :type xcb:xinput:DeviceId) + (time :initarg :time :type xcb:TIMESTAMP) + (num-classes :initarg :num-classes :type xcb:CARD16) + (sourceid :initarg :sourceid :type xcb:xinput:DeviceId) + (reason :initarg :reason :type xcb:CARD8) + (pad~0 :initform 11 :type xcb:-pad) + (classes~ :initform + '(name classes type xcb:xinput:DeviceClass size + (xcb:-fieldref 'num-classes)) + :type xcb:-list) + (classes :initarg :classes :type xcb:-ignore))) + +(defconst xcb:xinput:KeyEventFlags:KeyRepeat 65536) + +(defclass xcb:xinput:KeyPress + (xcb:-generic-event) + ((~evtype :initform 2) + (deviceid :initarg :deviceid :type xcb:xinput:DeviceId) + (time :initarg :time :type xcb:TIMESTAMP) + (detail :initarg :detail :type xcb:CARD32) + (root :initarg :root :type xcb:WINDOW) + (event :initarg :event :type xcb:WINDOW) + (child :initarg :child :type xcb:WINDOW) + (root-x :initarg :root-x :type xcb:xinput:FP1616) + (root-y :initarg :root-y :type xcb:xinput:FP1616) + (event-x :initarg :event-x :type xcb:xinput:FP1616) + (event-y :initarg :event-y :type xcb:xinput:FP1616) + (buttons-len :initarg :buttons-len :type xcb:CARD16) + (valuators-len :initarg :valuators-len :type xcb:CARD16) + (sourceid :initarg :sourceid :type xcb:xinput:DeviceId) + (pad~0 :initform 2 :type xcb:-pad) + (flags :initarg :flags :type xcb:CARD32) + (mods :initarg :mods :type xcb:xinput:ModifierInfo) + (group :initarg :group :type xcb:xinput:GroupInfo) + (button-mask~ :initform + '(name button-mask type xcb:CARD32 size + (xcb:-fieldref 'buttons-len)) + :type xcb:-list) + (button-mask :initarg :button-mask :type xcb:-ignore) + (valuator-mask~ :initform + '(name valuator-mask type xcb:CARD32 size + (xcb:-fieldref 'valuators-len)) + :type xcb:-list) + (valuator-mask :initarg :valuator-mask :type xcb:-ignore) + (axisvalues~ :initform + '(name axisvalues type xcb:xinput:FP3232 size + (apply #'+ + (mapcar + (lambda + (i) + (eval + '(xcb:-popcount obj) + (list + (nconc + '(obj) + i)))) + (slot-value obj 'valuator-mask)))) + :type xcb:-list) + (axisvalues :initarg :axisvalues :type xcb:-ignore))) + +(defclass xcb:xinput:KeyRelease + (xcb:-event xcb:xinput:KeyPress) + ((~evtype :initform 3))) + +(defconst xcb:xinput:PointerEventFlags:PointerEmulated 65536) + +(defclass xcb:xinput:ButtonPress + (xcb:-generic-event) + ((~evtype :initform 4) + (deviceid :initarg :deviceid :type xcb:xinput:DeviceId) + (time :initarg :time :type xcb:TIMESTAMP) + (detail :initarg :detail :type xcb:CARD32) + (root :initarg :root :type xcb:WINDOW) + (event :initarg :event :type xcb:WINDOW) + (child :initarg :child :type xcb:WINDOW) + (root-x :initarg :root-x :type xcb:xinput:FP1616) + (root-y :initarg :root-y :type xcb:xinput:FP1616) + (event-x :initarg :event-x :type xcb:xinput:FP1616) + (event-y :initarg :event-y :type xcb:xinput:FP1616) + (buttons-len :initarg :buttons-len :type xcb:CARD16) + (valuators-len :initarg :valuators-len :type xcb:CARD16) + (sourceid :initarg :sourceid :type xcb:xinput:DeviceId) + (pad~0 :initform 2 :type xcb:-pad) + (flags :initarg :flags :type xcb:CARD32) + (mods :initarg :mods :type xcb:xinput:ModifierInfo) + (group :initarg :group :type xcb:xinput:GroupInfo) + (button-mask~ :initform + '(name button-mask type xcb:CARD32 size + (xcb:-fieldref 'buttons-len)) + :type xcb:-list) + (button-mask :initarg :button-mask :type xcb:-ignore) + (valuator-mask~ :initform + '(name valuator-mask type xcb:CARD32 size + (xcb:-fieldref 'valuators-len)) + :type xcb:-list) + (valuator-mask :initarg :valuator-mask :type xcb:-ignore) + (axisvalues~ :initform + '(name axisvalues type xcb:xinput:FP3232 size + (apply #'+ + (mapcar + (lambda + (i) + (eval + '(xcb:-popcount obj) + (list + (nconc + '(obj) + i)))) + (slot-value obj 'valuator-mask)))) + :type xcb:-list) + (axisvalues :initarg :axisvalues :type xcb:-ignore))) + +(defclass xcb:xinput:ButtonRelease + (xcb:-event xcb:xinput:ButtonPress) + ((~evtype :initform 5))) + +(defclass xcb:xinput:Motion + (xcb:-event xcb:xinput:ButtonPress) + ((~evtype :initform 6))) + +(defconst xcb:xinput:NotifyMode:Normal 0) +(defconst xcb:xinput:NotifyMode:Grab 1) +(defconst xcb:xinput:NotifyMode:Ungrab 2) +(defconst xcb:xinput:NotifyMode:WhileGrabbed 3) +(defconst xcb:xinput:NotifyMode:PassiveGrab 4) +(defconst xcb:xinput:NotifyMode:PassiveUngrab 5) + +(defconst xcb:xinput:NotifyDetail:Ancestor 0) +(defconst xcb:xinput:NotifyDetail:Virtual 1) +(defconst xcb:xinput:NotifyDetail:Inferior 2) +(defconst xcb:xinput:NotifyDetail:Nonlinear 3) +(defconst xcb:xinput:NotifyDetail:NonlinearVirtual 4) +(defconst xcb:xinput:NotifyDetail:Pointer 5) +(defconst xcb:xinput:NotifyDetail:PointerRoot 6) +(defconst xcb:xinput:NotifyDetail:None 7) + +(defclass xcb:xinput:Enter + (xcb:-generic-event) + ((~evtype :initform 7) + (deviceid :initarg :deviceid :type xcb:xinput:DeviceId) + (time :initarg :time :type xcb:TIMESTAMP) + (sourceid :initarg :sourceid :type xcb:xinput:DeviceId) + (mode :initarg :mode :type xcb:CARD8) + (detail :initarg :detail :type xcb:CARD8) + (root :initarg :root :type xcb:WINDOW) + (event :initarg :event :type xcb:WINDOW) + (child :initarg :child :type xcb:WINDOW) + (root-x :initarg :root-x :type xcb:xinput:FP1616) + (root-y :initarg :root-y :type xcb:xinput:FP1616) + (event-x :initarg :event-x :type xcb:xinput:FP1616) + (event-y :initarg :event-y :type xcb:xinput:FP1616) + (same-screen :initarg :same-screen :type xcb:BOOL) + (focus :initarg :focus :type xcb:BOOL) + (buttons-len :initarg :buttons-len :type xcb:CARD16) + (mods :initarg :mods :type xcb:xinput:ModifierInfo) + (group :initarg :group :type xcb:xinput:GroupInfo) + (buttons~ :initform + '(name buttons type xcb:CARD32 size + (xcb:-fieldref 'buttons-len)) + :type xcb:-list) + (buttons :initarg :buttons :type xcb:-ignore))) + +(defclass xcb:xinput:Leave + (xcb:-event xcb:xinput:Enter) + ((~evtype :initform 8))) + +(defclass xcb:xinput:FocusIn + (xcb:-event xcb:xinput:Enter) + ((~evtype :initform 9))) + +(defclass xcb:xinput:FocusOut + (xcb:-event xcb:xinput:Enter) + ((~evtype :initform 10))) + +(defconst xcb:xinput:HierarchyMask:MasterAdded 1) +(defconst xcb:xinput:HierarchyMask:MasterRemoved 2) +(defconst xcb:xinput:HierarchyMask:SlaveAdded 4) +(defconst xcb:xinput:HierarchyMask:SlaveRemoved 8) +(defconst xcb:xinput:HierarchyMask:SlaveAttached 16) +(defconst xcb:xinput:HierarchyMask:SlaveDetached 32) +(defconst xcb:xinput:HierarchyMask:DeviceEnabled 64) +(defconst xcb:xinput:HierarchyMask:DeviceDisabled 128) + +(defclass xcb:xinput:HierarchyInfo + (xcb:-struct) + ((deviceid :initarg :deviceid :type xcb:xinput:DeviceId) + (attachment :initarg :attachment :type xcb:xinput:DeviceId) + (type :initarg :type :type xcb:CARD8) + (enabled :initarg :enabled :type xcb:BOOL) + (pad~0 :initform 2 :type xcb:-pad) + (flags :initarg :flags :type xcb:CARD32))) + +(defclass xcb:xinput:Hierarchy + (xcb:-generic-event) + ((~evtype :initform 11) + (deviceid :initarg :deviceid :type xcb:xinput:DeviceId) + (time :initarg :time :type xcb:TIMESTAMP) + (flags :initarg :flags :type xcb:CARD32) + (num-infos :initarg :num-infos :type xcb:CARD16) + (pad~0 :initform 10 :type xcb:-pad) + (infos~ :initform + '(name infos type xcb:xinput:HierarchyInfo size + (xcb:-fieldref 'num-infos)) + :type xcb:-list) + (infos :initarg :infos :type xcb:-ignore))) + +(defconst xcb:xinput:PropertyFlag:Deleted 0) +(defconst xcb:xinput:PropertyFlag:Created 1) +(defconst xcb:xinput:PropertyFlag:Modified 2) + +(defclass xcb:xinput:Property + (xcb:-generic-event) + ((~evtype :initform 12) + (deviceid :initarg :deviceid :type xcb:xinput:DeviceId) + (time :initarg :time :type xcb:TIMESTAMP) + (property :initarg :property :type xcb:ATOM) + (what :initarg :what :type xcb:CARD8) + (pad~0 :initform 11 :type xcb:-pad))) + +(defclass xcb:xinput:RawKeyPress + (xcb:-generic-event) + ((~evtype :initform 13) + (deviceid :initarg :deviceid :type xcb:xinput:DeviceId) + (time :initarg :time :type xcb:TIMESTAMP) + (detail :initarg :detail :type xcb:CARD32) + (sourceid :initarg :sourceid :type xcb:xinput:DeviceId) + (valuators-len :initarg :valuators-len :type xcb:CARD16) + (flags :initarg :flags :type xcb:CARD32) + (pad~0 :initform 4 :type xcb:-pad) + (valuator-mask~ :initform + '(name valuator-mask type xcb:CARD32 size + (xcb:-fieldref 'valuators-len)) + :type xcb:-list) + (valuator-mask :initarg :valuator-mask :type xcb:-ignore) + (axisvalues~ :initform + '(name axisvalues type xcb:xinput:FP3232 size + (apply #'+ + (mapcar + (lambda + (i) + (eval + '(xcb:-popcount obj) + (list + (nconc + '(obj) + i)))) + (slot-value obj 'valuator-mask)))) + :type xcb:-list) + (axisvalues :initarg :axisvalues :type xcb:-ignore) + (axisvalues-raw~ :initform + '(name axisvalues-raw type xcb:xinput:FP3232 size + (apply #'+ + (mapcar + (lambda + (i) + (eval + '(xcb:-popcount obj) + (list + (nconc + '(obj) + i)))) + (slot-value obj 'valuator-mask)))) + :type xcb:-list) + (axisvalues-raw :initarg :axisvalues-raw :type xcb:-ignore))) + +(defclass xcb:xinput:RawKeyRelease + (xcb:-event xcb:xinput:RawKeyPress) + ((~evtype :initform 14))) + +(defclass xcb:xinput:RawButtonPress + (xcb:-generic-event) + ((~evtype :initform 15) + (deviceid :initarg :deviceid :type xcb:xinput:DeviceId) + (time :initarg :time :type xcb:TIMESTAMP) + (detail :initarg :detail :type xcb:CARD32) + (sourceid :initarg :sourceid :type xcb:xinput:DeviceId) + (valuators-len :initarg :valuators-len :type xcb:CARD16) + (flags :initarg :flags :type xcb:CARD32) + (pad~0 :initform 4 :type xcb:-pad) + (valuator-mask~ :initform + '(name valuator-mask type xcb:CARD32 size + (xcb:-fieldref 'valuators-len)) + :type xcb:-list) + (valuator-mask :initarg :valuator-mask :type xcb:-ignore) + (axisvalues~ :initform + '(name axisvalues type xcb:xinput:FP3232 size + (apply #'+ + (mapcar + (lambda + (i) + (eval + '(xcb:-popcount obj) + (list + (nconc + '(obj) + i)))) + (slot-value obj 'valuator-mask)))) + :type xcb:-list) + (axisvalues :initarg :axisvalues :type xcb:-ignore) + (axisvalues-raw~ :initform + '(name axisvalues-raw type xcb:xinput:FP3232 size + (apply #'+ + (mapcar + (lambda + (i) + (eval + '(xcb:-popcount obj) + (list + (nconc + '(obj) + i)))) + (slot-value obj 'valuator-mask)))) + :type xcb:-list) + (axisvalues-raw :initarg :axisvalues-raw :type xcb:-ignore))) + +(defclass xcb:xinput:RawButtonRelease + (xcb:-event xcb:xinput:RawButtonPress) + ((~evtype :initform 16))) + +(defclass xcb:xinput:RawMotion + (xcb:-event xcb:xinput:RawButtonPress) + ((~evtype :initform 17))) + +(defconst xcb:xinput:TouchEventFlags:TouchPendingEnd 65536) +(defconst xcb:xinput:TouchEventFlags:TouchEmulatingPointer 131072) + +(defclass xcb:xinput:TouchBegin + (xcb:-generic-event) + ((~evtype :initform 18) + (deviceid :initarg :deviceid :type xcb:xinput:DeviceId) + (time :initarg :time :type xcb:TIMESTAMP) + (detail :initarg :detail :type xcb:CARD32) + (root :initarg :root :type xcb:WINDOW) + (event :initarg :event :type xcb:WINDOW) + (child :initarg :child :type xcb:WINDOW) + (root-x :initarg :root-x :type xcb:xinput:FP1616) + (root-y :initarg :root-y :type xcb:xinput:FP1616) + (event-x :initarg :event-x :type xcb:xinput:FP1616) + (event-y :initarg :event-y :type xcb:xinput:FP1616) + (buttons-len :initarg :buttons-len :type xcb:CARD16) + (valuators-len :initarg :valuators-len :type xcb:CARD16) + (sourceid :initarg :sourceid :type xcb:xinput:DeviceId) + (pad~0 :initform 2 :type xcb:-pad) + (flags :initarg :flags :type xcb:CARD32) + (mods :initarg :mods :type xcb:xinput:ModifierInfo) + (group :initarg :group :type xcb:xinput:GroupInfo) + (button-mask~ :initform + '(name button-mask type xcb:CARD32 size + (xcb:-fieldref 'buttons-len)) + :type xcb:-list) + (button-mask :initarg :button-mask :type xcb:-ignore) + (valuator-mask~ :initform + '(name valuator-mask type xcb:CARD32 size + (xcb:-fieldref 'valuators-len)) + :type xcb:-list) + (valuator-mask :initarg :valuator-mask :type xcb:-ignore) + (axisvalues~ :initform + '(name axisvalues type xcb:xinput:FP3232 size + (apply #'+ + (mapcar + (lambda + (i) + (eval + '(xcb:-popcount obj) + (list + (nconc + '(obj) + i)))) + (slot-value obj 'valuator-mask)))) + :type xcb:-list) + (axisvalues :initarg :axisvalues :type xcb:-ignore))) + +(defclass xcb:xinput:TouchUpdate + (xcb:-event xcb:xinput:TouchBegin) + ((~evtype :initform 19))) + +(defclass xcb:xinput:TouchEnd + (xcb:-event xcb:xinput:TouchBegin) + ((~evtype :initform 20))) + +(defconst xcb:xinput:TouchOwnershipFlags:None 0) + +(defclass xcb:xinput:TouchOwnership + (xcb:-generic-event) + ((~evtype :initform 21) + (deviceid :initarg :deviceid :type xcb:xinput:DeviceId) + (time :initarg :time :type xcb:TIMESTAMP) + (touchid :initarg :touchid :type xcb:CARD32) + (root :initarg :root :type xcb:WINDOW) + (event :initarg :event :type xcb:WINDOW) + (child :initarg :child :type xcb:WINDOW) + (sourceid :initarg :sourceid :type xcb:xinput:DeviceId) + (pad~0 :initform 2 :type xcb:-pad) + (flags :initarg :flags :type xcb:CARD32) + (pad~1 :initform 8 :type xcb:-pad))) + +(defclass xcb:xinput:RawTouchBegin + (xcb:-generic-event) + ((~evtype :initform 22) + (deviceid :initarg :deviceid :type xcb:xinput:DeviceId) + (time :initarg :time :type xcb:TIMESTAMP) + (detail :initarg :detail :type xcb:CARD32) + (sourceid :initarg :sourceid :type xcb:xinput:DeviceId) + (valuators-len :initarg :valuators-len :type xcb:CARD16) + (flags :initarg :flags :type xcb:CARD32) + (pad~0 :initform 4 :type xcb:-pad) + (valuator-mask~ :initform + '(name valuator-mask type xcb:CARD32 size + (xcb:-fieldref 'valuators-len)) + :type xcb:-list) + (valuator-mask :initarg :valuator-mask :type xcb:-ignore) + (axisvalues~ :initform + '(name axisvalues type xcb:xinput:FP3232 size + (apply #'+ + (mapcar + (lambda + (i) + (eval + '(xcb:-popcount obj) + (list + (nconc + '(obj) + i)))) + (slot-value obj 'valuator-mask)))) + :type xcb:-list) + (axisvalues :initarg :axisvalues :type xcb:-ignore) + (axisvalues-raw~ :initform + '(name axisvalues-raw type xcb:xinput:FP3232 size + (apply #'+ + (mapcar + (lambda + (i) + (eval + '(xcb:-popcount obj) + (list + (nconc + '(obj) + i)))) + (slot-value obj 'valuator-mask)))) + :type xcb:-list) + (axisvalues-raw :initarg :axisvalues-raw :type xcb:-ignore))) + +(defclass xcb:xinput:RawTouchUpdate + (xcb:-event xcb:xinput:RawTouchBegin) + ((~evtype :initform 23))) + +(defclass xcb:xinput:RawTouchEnd + (xcb:-event xcb:xinput:RawTouchBegin) + ((~evtype :initform 24))) + +(defconst xcb:xinput:BarrierFlags:PointerReleased 1) +(defconst xcb:xinput:BarrierFlags:DeviceIsGrabbed 2) + +(defclass xcb:xinput:BarrierHit + (xcb:-generic-event) + ((~evtype :initform 25) + (deviceid :initarg :deviceid :type xcb:xinput:DeviceId) + (time :initarg :time :type xcb:TIMESTAMP) + (eventid :initarg :eventid :type xcb:CARD32) + (root :initarg :root :type xcb:WINDOW) + (event :initarg :event :type xcb:WINDOW) + (barrier :initarg :barrier :type xcb:xfixes:BARRIER) + (dtime :initarg :dtime :type xcb:CARD32) + (flags :initarg :flags :type xcb:CARD32) + (sourceid :initarg :sourceid :type xcb:xinput:DeviceId) + (pad~0 :initform 2 :type xcb:-pad) + (root-x :initarg :root-x :type xcb:xinput:FP1616) + (root-y :initarg :root-y :type xcb:xinput:FP1616) + (dx :initarg :dx :type xcb:xinput:FP3232) + (dy :initarg :dy :type xcb:xinput:FP3232))) + +(defclass xcb:xinput:BarrierLeave + (xcb:-event xcb:xinput:BarrierHit) + ((~evtype :initform 26))) + +(defclass xcb:xinput:EventForSend + (xcb:-event) + nil) + +(defclass xcb:xinput:SendExtensionEvent + (xcb:-request) + ((~opcode :initform 31 :type xcb:-u1) + (destination :initarg :destination :type xcb:WINDOW) + (device-id :initarg :device-id :type xcb:CARD8) + (propagate :initarg :propagate :type xcb:BOOL) + (num-classes :initarg :num-classes :type xcb:CARD16) + (num-events :initarg :num-events :type xcb:CARD8) + (pad~0 :initform 3 :type xcb:-pad) + (events~ :initform + '(name events type xcb:xinput:EventForSend size + (xcb:-fieldref 'num-events)) + :type xcb:-list) + (events :initarg :events :type xcb:-ignore) + (classes~ :initform + '(name classes type xcb:xinput:EventClass size + (xcb:-fieldref 'num-classes)) + :type xcb:-list) + (classes :initarg :classes :type xcb:-ignore))) + +(defclass xcb:xinput:Device + (xcb:-error) + ((~code :initform 0))) + +(defclass xcb:xinput:Event + (xcb:-error) + ((~code :initform 1))) + +(defclass xcb:xinput:Mode + (xcb:-error) + ((~code :initform 2))) + +(defclass xcb:xinput:DeviceBusy + (xcb:-error) + ((~code :initform 3))) + +(defclass xcb:xinput:Class + (xcb:-error) + ((~code :initform 4))) + +(defconst xcb:xinput:error-number-class-alist + '((0 . xcb:xinput:Device) + (1 . xcb:xinput:Event) + (2 . xcb:xinput:Mode) + (3 . xcb:xinput:DeviceBusy) + (4 . xcb:xinput:Class)) + "(error-number . error-class) alist.") + +(defconst xcb:xinput:event-number-class-alist + '((0 . xcb:xinput:DeviceValuator) + (1 . xcb:xinput:DeviceKeyPress) + (2 . xcb:xinput:DeviceKeyRelease) + (3 . xcb:xinput:DeviceButtonPress) + (4 . xcb:xinput:DeviceButtonRelease) + (5 . xcb:xinput:DeviceMotionNotify) + (6 . xcb:xinput:DeviceFocusIn) + (7 . xcb:xinput:DeviceFocusOut) + (8 . xcb:xinput:ProximityIn) + (9 . xcb:xinput:ProximityOut) + (10 . xcb:xinput:DeviceStateNotify) + (11 . xcb:xinput:DeviceMappingNotify) + (12 . xcb:xinput:ChangeDeviceNotify) + (13 . xcb:xinput:DeviceKeyStateNotify) + (14 . xcb:xinput:DeviceButtonStateNotify) + (15 . xcb:xinput:DevicePresenceNotify) + (16 . xcb:xinput:DevicePropertyNotify)) + "(event-number . event-class) alist.") + +(defconst xcb:xinput:xge-number-class-alist + '((1 . xcb:xinput:DeviceChanged) + (2 . xcb:xinput:KeyPress) + (3 . xcb:xinput:KeyRelease) + (4 . xcb:xinput:ButtonPress) + (5 . xcb:xinput:ButtonRelease) + (6 . xcb:xinput:Motion) + (7 . xcb:xinput:Enter) + (8 . xcb:xinput:Leave) + (9 . xcb:xinput:FocusIn) + (10 . xcb:xinput:FocusOut) + (11 . xcb:xinput:Hierarchy) + (12 . xcb:xinput:Property) + (13 . xcb:xinput:RawKeyPress) + (14 . xcb:xinput:RawKeyRelease) + (15 . xcb:xinput:RawButtonPress) + (16 . xcb:xinput:RawButtonRelease) + (17 . xcb:xinput:RawMotion) + (18 . xcb:xinput:TouchBegin) + (19 . xcb:xinput:TouchUpdate) + (20 . xcb:xinput:TouchEnd) + (21 . xcb:xinput:TouchOwnership) + (22 . xcb:xinput:RawTouchBegin) + (23 . xcb:xinput:RawTouchUpdate) + (24 . xcb:xinput:RawTouchEnd) + (25 . xcb:xinput:BarrierHit) + (26 . xcb:xinput:BarrierLeave)) + "(xge-number . event-class) alist.") + + + +(provide 'xcb-xinput) + +;;; xcb-xinput.el ends here diff --git a/elpa/xelb-0.18/xcb-xkb.el b/elpa/xelb-0.18/xcb-xkb.el new file mode 100644 index 0000000..dce622b --- /dev/null +++ b/elpa/xelb-0.18/xcb-xkb.el @@ -0,0 +1,2327 @@ +;;; xcb-xkb.el --- X11 xkb extension -*- lexical-binding: t -*- + +;; Copyright (C) 2015-2019 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This file was generated by 'el_client.el' from 'xkb.xml', +;; which you can retrieve from . + +;;; Code: + +(require 'xcb-types) + +(defconst xcb:xkb:-extension-xname "XKEYBOARD") +(defconst xcb:xkb:-extension-name "xkb") +(defconst xcb:xkb:-major-version 1) +(defconst xcb:xkb:-minor-version 0) + +(require 'xcb-xproto) + +(defconst xcb:xkb:Const:MaxLegalKeyCode 255) +(defconst xcb:xkb:Const:PerKeyBitArraySize 32) +(defconst xcb:xkb:Const:KeyNameLength 4) + +(defconst xcb:xkb:EventType:NewKeyboardNotify 1) +(defconst xcb:xkb:EventType:MapNotify 2) +(defconst xcb:xkb:EventType:StateNotify 4) +(defconst xcb:xkb:EventType:ControlsNotify 8) +(defconst xcb:xkb:EventType:IndicatorStateNotify 16) +(defconst xcb:xkb:EventType:IndicatorMapNotify 32) +(defconst xcb:xkb:EventType:NamesNotify 64) +(defconst xcb:xkb:EventType:CompatMapNotify 128) +(defconst xcb:xkb:EventType:BellNotify 256) +(defconst xcb:xkb:EventType:ActionMessage 512) +(defconst xcb:xkb:EventType:AccessXNotify 1024) +(defconst xcb:xkb:EventType:ExtensionDeviceNotify 2048) + +(defconst xcb:xkb:NKNDetail:Keycodes 1) +(defconst xcb:xkb:NKNDetail:Geometry 2) +(defconst xcb:xkb:NKNDetail:DeviceID 4) + +(defconst xcb:xkb:AXNDetail:SKPress 1) +(defconst xcb:xkb:AXNDetail:SKAccept 2) +(defconst xcb:xkb:AXNDetail:SKReject 4) +(defconst xcb:xkb:AXNDetail:SKRelease 8) +(defconst xcb:xkb:AXNDetail:BKAccept 16) +(defconst xcb:xkb:AXNDetail:BKReject 32) +(defconst xcb:xkb:AXNDetail:AXKWarning 64) + +(defconst xcb:xkb:MapPart:KeyTypes 1) +(defconst xcb:xkb:MapPart:KeySyms 2) +(defconst xcb:xkb:MapPart:ModifierMap 4) +(defconst xcb:xkb:MapPart:ExplicitComponents 8) +(defconst xcb:xkb:MapPart:KeyActions 16) +(defconst xcb:xkb:MapPart:KeyBehaviors 32) +(defconst xcb:xkb:MapPart:VirtualMods 64) +(defconst xcb:xkb:MapPart:VirtualModMap 128) + +(defconst xcb:xkb:SetMapFlags:ResizeTypes 1) +(defconst xcb:xkb:SetMapFlags:RecomputeActions 2) + +(defconst xcb:xkb:StatePart:ModifierState 1) +(defconst xcb:xkb:StatePart:ModifierBase 2) +(defconst xcb:xkb:StatePart:ModifierLatch 4) +(defconst xcb:xkb:StatePart:ModifierLock 8) +(defconst xcb:xkb:StatePart:GroupState 16) +(defconst xcb:xkb:StatePart:GroupBase 32) +(defconst xcb:xkb:StatePart:GroupLatch 64) +(defconst xcb:xkb:StatePart:GroupLock 128) +(defconst xcb:xkb:StatePart:CompatState 256) +(defconst xcb:xkb:StatePart:GrabMods 512) +(defconst xcb:xkb:StatePart:CompatGrabMods 1024) +(defconst xcb:xkb:StatePart:LookupMods 2048) +(defconst xcb:xkb:StatePart:CompatLookupMods 4096) +(defconst xcb:xkb:StatePart:PointerButtons 8192) + +(defconst xcb:xkb:BoolCtrl:RepeatKeys 1) +(defconst xcb:xkb:BoolCtrl:SlowKeys 2) +(defconst xcb:xkb:BoolCtrl:BounceKeys 4) +(defconst xcb:xkb:BoolCtrl:StickyKeys 8) +(defconst xcb:xkb:BoolCtrl:MouseKeys 16) +(defconst xcb:xkb:BoolCtrl:MouseKeysAccel 32) +(defconst xcb:xkb:BoolCtrl:AccessXKeys 64) +(defconst xcb:xkb:BoolCtrl:AccessXTimeoutMask 128) +(defconst xcb:xkb:BoolCtrl:AccessXFeedbackMask 256) +(defconst xcb:xkb:BoolCtrl:AudibleBellMask 512) +(defconst xcb:xkb:BoolCtrl:Overlay1Mask 1024) +(defconst xcb:xkb:BoolCtrl:Overlay2Mask 2048) +(defconst xcb:xkb:BoolCtrl:IgnoreGroupLockMask 4096) + +(defconst xcb:xkb:Control:GroupsWrap 134217728) +(defconst xcb:xkb:Control:InternalMods 268435456) + +(defconst xcb:xkb:AXOption:SKPressFB 1) +(defconst xcb:xkb:AXOption:SKAcceptFB 2) +(defconst xcb:xkb:AXOption:FeatureFB 4) +(defconst xcb:xkb:AXOption:SlowWarnFB 8) +(defconst xcb:xkb:AXOption:IndicatorFB 16) +(defconst xcb:xkb:AXOption:StickyKeysFB 32) +(defconst xcb:xkb:AXOption:TwoKeys 64) +(defconst xcb:xkb:AXOption:LatchToLock 128) +(defconst xcb:xkb:AXOption:SKReleaseFB 256) +(defconst xcb:xkb:AXOption:SKRejectFB 512) +(defconst xcb:xkb:AXOption:BKRejectFB 1024) +(defconst xcb:xkb:AXOption:DumbBell 2048) + +(xcb:deftypealias 'xcb:xkb:DeviceSpec 'xcb:CARD16) + +(defconst xcb:xkb:LedClassResult:KbdFeedbackClass 0) +(defconst xcb:xkb:LedClassResult:LedFeedbackClass 4) + +(defconst xcb:xkb:LedClass:KbdFeedbackClass 0) +(defconst xcb:xkb:LedClass:LedFeedbackClass 4) +(defconst xcb:xkb:LedClass:DfltXIClass 768) +(defconst xcb:xkb:LedClass:AllXIClasses 1280) + +(xcb:deftypealias 'xcb:xkb:LedClassSpec 'xcb:CARD16) + +(defconst xcb:xkb:BellClassResult:KbdFeedbackClass 0) +(defconst xcb:xkb:BellClassResult:BellFeedbackClass 5) + +(defconst xcb:xkb:BellClass:KbdFeedbackClass 0) +(defconst xcb:xkb:BellClass:BellFeedbackClass 5) +(defconst xcb:xkb:BellClass:DfltXIClass 768) + +(xcb:deftypealias 'xcb:xkb:BellClassSpec 'xcb:CARD16) + +(defconst xcb:xkb:ID:UseCoreKbd 256) +(defconst xcb:xkb:ID:UseCorePtr 512) +(defconst xcb:xkb:ID:DfltXIClass 768) +(defconst xcb:xkb:ID:DfltXIId 1024) +(defconst xcb:xkb:ID:AllXIClass 1280) +(defconst xcb:xkb:ID:AllXIId 1536) +(defconst xcb:xkb:ID:XINone 65280) + +(xcb:deftypealias 'xcb:xkb:IDSpec 'xcb:CARD16) + +(defconst xcb:xkb:Group:1 0) +(defconst xcb:xkb:Group:2 1) +(defconst xcb:xkb:Group:3 2) +(defconst xcb:xkb:Group:4 3) + +(defconst xcb:xkb:Groups:Any 254) +(defconst xcb:xkb:Groups:All 255) + +(defconst xcb:xkb:SetOfGroup:Group1 1) +(defconst xcb:xkb:SetOfGroup:Group2 2) +(defconst xcb:xkb:SetOfGroup:Group3 4) +(defconst xcb:xkb:SetOfGroup:Group4 8) + +(defconst xcb:xkb:SetOfGroups:Any 128) + +(defconst xcb:xkb:GroupsWrap:WrapIntoRange 0) +(defconst xcb:xkb:GroupsWrap:ClampIntoRange 64) +(defconst xcb:xkb:GroupsWrap:RedirectIntoRange 128) + +(defconst xcb:xkb:VModsHigh:15 128) +(defconst xcb:xkb:VModsHigh:14 64) +(defconst xcb:xkb:VModsHigh:13 32) +(defconst xcb:xkb:VModsHigh:12 16) +(defconst xcb:xkb:VModsHigh:11 8) +(defconst xcb:xkb:VModsHigh:10 4) +(defconst xcb:xkb:VModsHigh:9 2) +(defconst xcb:xkb:VModsHigh:8 1) + +(defconst xcb:xkb:VModsLow:7 128) +(defconst xcb:xkb:VModsLow:6 64) +(defconst xcb:xkb:VModsLow:5 32) +(defconst xcb:xkb:VModsLow:4 16) +(defconst xcb:xkb:VModsLow:3 8) +(defconst xcb:xkb:VModsLow:2 4) +(defconst xcb:xkb:VModsLow:1 2) +(defconst xcb:xkb:VModsLow:0 1) + +(defconst xcb:xkb:VMod:15 32768) +(defconst xcb:xkb:VMod:14 16384) +(defconst xcb:xkb:VMod:13 8192) +(defconst xcb:xkb:VMod:12 4096) +(defconst xcb:xkb:VMod:11 2048) +(defconst xcb:xkb:VMod:10 1024) +(defconst xcb:xkb:VMod:9 512) +(defconst xcb:xkb:VMod:8 256) +(defconst xcb:xkb:VMod:7 128) +(defconst xcb:xkb:VMod:6 64) +(defconst xcb:xkb:VMod:5 32) +(defconst xcb:xkb:VMod:4 16) +(defconst xcb:xkb:VMod:3 8) +(defconst xcb:xkb:VMod:2 4) +(defconst xcb:xkb:VMod:1 2) +(defconst xcb:xkb:VMod:0 1) + +(defconst xcb:xkb:Explicit:VModMap 128) +(defconst xcb:xkb:Explicit:Behavior 64) +(defconst xcb:xkb:Explicit:AutoRepeat 32) +(defconst xcb:xkb:Explicit:Interpret 16) +(defconst xcb:xkb:Explicit:KeyType4 8) +(defconst xcb:xkb:Explicit:KeyType3 4) +(defconst xcb:xkb:Explicit:KeyType2 2) +(defconst xcb:xkb:Explicit:KeyType1 1) + +(defconst xcb:xkb:SymInterpretMatch:NoneOf 0) +(defconst xcb:xkb:SymInterpretMatch:AnyOfOrNone 1) +(defconst xcb:xkb:SymInterpretMatch:AnyOf 2) +(defconst xcb:xkb:SymInterpretMatch:AllOf 3) +(defconst xcb:xkb:SymInterpretMatch:Exactly 4) + +(defconst xcb:xkb:SymInterpMatch:LevelOneOnly 128) +(defconst xcb:xkb:SymInterpMatch:OpMask 127) + +(defconst xcb:xkb:IMFlag:NoExplicit 128) +(defconst xcb:xkb:IMFlag:NoAutomatic 64) +(defconst xcb:xkb:IMFlag:LEDDrivesKB 32) + +(defconst xcb:xkb:IMModsWhich:UseCompat 16) +(defconst xcb:xkb:IMModsWhich:UseEffective 8) +(defconst xcb:xkb:IMModsWhich:UseLocked 4) +(defconst xcb:xkb:IMModsWhich:UseLatched 2) +(defconst xcb:xkb:IMModsWhich:UseBase 1) + +(defconst xcb:xkb:IMGroupsWhich:UseCompat 16) +(defconst xcb:xkb:IMGroupsWhich:UseEffective 8) +(defconst xcb:xkb:IMGroupsWhich:UseLocked 4) +(defconst xcb:xkb:IMGroupsWhich:UseLatched 2) +(defconst xcb:xkb:IMGroupsWhich:UseBase 1) + +(defclass xcb:xkb:IndicatorMap + (xcb:-struct) + ((flags :initarg :flags :type xcb:CARD8) + (whichGroups :initarg :whichGroups :type xcb:CARD8) + (groups :initarg :groups :type xcb:CARD8) + (whichMods :initarg :whichMods :type xcb:CARD8) + (mods :initarg :mods :type xcb:CARD8) + (realMods :initarg :realMods :type xcb:CARD8) + (vmods :initarg :vmods :type xcb:CARD16) + (ctrls :initarg :ctrls :type xcb:CARD32))) + +(defconst xcb:xkb:CMDetail:SymInterp 1) +(defconst xcb:xkb:CMDetail:GroupCompat 2) + +(defconst xcb:xkb:NameDetail:Keycodes 1) +(defconst xcb:xkb:NameDetail:Geometry 2) +(defconst xcb:xkb:NameDetail:Symbols 4) +(defconst xcb:xkb:NameDetail:PhysSymbols 8) +(defconst xcb:xkb:NameDetail:Types 16) +(defconst xcb:xkb:NameDetail:Compat 32) +(defconst xcb:xkb:NameDetail:KeyTypeNames 64) +(defconst xcb:xkb:NameDetail:KTLevelNames 128) +(defconst xcb:xkb:NameDetail:IndicatorNames 256) +(defconst xcb:xkb:NameDetail:KeyNames 512) +(defconst xcb:xkb:NameDetail:KeyAliases 1024) +(defconst xcb:xkb:NameDetail:VirtualModNames 2048) +(defconst xcb:xkb:NameDetail:GroupNames 4096) +(defconst xcb:xkb:NameDetail:RGNames 8192) + +(defconst xcb:xkb:GBNDetail:Types 1) +(defconst xcb:xkb:GBNDetail:CompatMap 2) +(defconst xcb:xkb:GBNDetail:ClientSymbols 4) +(defconst xcb:xkb:GBNDetail:ServerSymbols 8) +(defconst xcb:xkb:GBNDetail:IndicatorMaps 16) +(defconst xcb:xkb:GBNDetail:KeyNames 32) +(defconst xcb:xkb:GBNDetail:Geometry 64) +(defconst xcb:xkb:GBNDetail:OtherNames 128) + +(defconst xcb:xkb:XIFeature:Keyboards 1) +(defconst xcb:xkb:XIFeature:ButtonActions 2) +(defconst xcb:xkb:XIFeature:IndicatorNames 4) +(defconst xcb:xkb:XIFeature:IndicatorMaps 8) +(defconst xcb:xkb:XIFeature:IndicatorState 16) + +(defconst xcb:xkb:PerClientFlag:DetectableAutoRepeat 1) +(defconst xcb:xkb:PerClientFlag:GrabsUseXKBState 2) +(defconst xcb:xkb:PerClientFlag:AutoResetControls 4) +(defconst xcb:xkb:PerClientFlag:LookupStateWhenGrabbed 8) +(defconst xcb:xkb:PerClientFlag:SendEventUsesXKBState 16) + +(defclass xcb:xkb:ModDef + (xcb:-struct) + ((mask :initarg :mask :type xcb:CARD8) + (realMods :initarg :realMods :type xcb:CARD8) + (vmods :initarg :vmods :type xcb:CARD16))) + +(defclass xcb:xkb:KeyName + (xcb:-struct) + ((name~ :initform + '(name name type xcb:char size 4) + :type xcb:-list) + (name :initarg :name :type xcb:-ignore))) + +(defclass xcb:xkb:KeyAlias + (xcb:-struct) + ((real~ :initform + '(name real type xcb:char size 4) + :type xcb:-list) + (real :initarg :real :type xcb:-ignore) + (alias~ :initform + '(name alias type xcb:char size 4) + :type xcb:-list) + (alias :initarg :alias :type xcb:-ignore))) + +(defclass xcb:xkb:CountedString16 + (xcb:-struct) + ((length :initarg :length :type xcb:CARD16) + (string~ :initform + '(name string type xcb:char size + (xcb:-fieldref 'length)) + :type xcb:-list) + (string :initarg :string :type xcb:-ignore) + (alignment-pad~ :initform + '(name alignment-pad type xcb:void size + (- + (logand + (+ + (xcb:-fieldref 'length) + 5) + (lognot 3)) + (+ + (xcb:-fieldref 'length) + 2))) + :type xcb:-list) + (alignment-pad :initarg :alignment-pad :type xcb:-ignore))) + +(defclass xcb:xkb:KTMapEntry + (xcb:-struct) + ((active :initarg :active :type xcb:BOOL) + (mods-mask :initarg :mods-mask :type xcb:CARD8) + (level :initarg :level :type xcb:CARD8) + (mods-mods :initarg :mods-mods :type xcb:CARD8) + (mods-vmods :initarg :mods-vmods :type xcb:CARD16) + (pad~0 :initform 2 :type xcb:-pad))) + +(defclass xcb:xkb:KeyType + (xcb:-struct) + ((mods-mask :initarg :mods-mask :type xcb:CARD8) + (mods-mods :initarg :mods-mods :type xcb:CARD8) + (mods-vmods :initarg :mods-vmods :type xcb:CARD16) + (numLevels :initarg :numLevels :type xcb:CARD8) + (nMapEntries :initarg :nMapEntries :type xcb:CARD8) + (hasPreserve :initarg :hasPreserve :type xcb:BOOL) + (pad~0 :initform 1 :type xcb:-pad) + (map~ :initform + '(name map type xcb:xkb:KTMapEntry size + (xcb:-fieldref 'nMapEntries)) + :type xcb:-list) + (map :initarg :map :type xcb:-ignore) + (preserve~ :initform + '(name preserve type xcb:xkb:ModDef size + (* + (xcb:-fieldref 'hasPreserve) + (xcb:-fieldref 'nMapEntries))) + :type xcb:-list) + (preserve :initarg :preserve :type xcb:-ignore))) + +(defclass xcb:xkb:KeySymMap + (xcb:-struct) + ((kt-index~ :initform + '(name kt-index type xcb:CARD8 size 4) + :type xcb:-list) + (kt-index :initarg :kt-index :type xcb:-ignore) + (groupInfo :initarg :groupInfo :type xcb:CARD8) + (width :initarg :width :type xcb:CARD8) + (nSyms :initarg :nSyms :type xcb:CARD16) + (syms~ :initform + '(name syms type xcb:KEYSYM size + (xcb:-fieldref 'nSyms)) + :type xcb:-list) + (syms :initarg :syms :type xcb:-ignore))) + +(defclass xcb:xkb:CommonBehavior + (xcb:-struct) + ((type :initarg :type :type xcb:CARD8) + (data :initarg :data :type xcb:CARD8))) + +(defclass xcb:xkb:DefaultBehavior + (xcb:-struct) + ((type :initarg :type :type xcb:CARD8) + (pad~0 :initform 1 :type xcb:-pad))) + +(xcb:deftypealias 'xcb:xkb:LockBehavior 'xcb:xkb:DefaultBehavior) + +(defclass xcb:xkb:RadioGroupBehavior + (xcb:-struct) + ((type :initarg :type :type xcb:CARD8) + (group :initarg :group :type xcb:CARD8))) + +(defclass xcb:xkb:OverlayBehavior + (xcb:-struct) + ((type :initarg :type :type xcb:CARD8) + (key :initarg :key :type xcb:KEYCODE))) + +(xcb:deftypealias 'xcb:xkb:PermamentLockBehavior 'xcb:xkb:LockBehavior) + +(xcb:deftypealias 'xcb:xkb:PermamentRadioGroupBehavior 'xcb:xkb:RadioGroupBehavior) + +(xcb:deftypealias 'xcb:xkb:PermamentOverlayBehavior 'xcb:xkb:OverlayBehavior) + +(defclass xcb:xkb:Behavior + (xcb:-union) + ((~size :initform 2) + (common :initarg :common :type xcb:xkb:CommonBehavior) + (default :initarg :default :type xcb:xkb:DefaultBehavior) + (lock :initarg :lock :type xcb:xkb:LockBehavior) + (radioGroup :initarg :radioGroup :type xcb:xkb:RadioGroupBehavior) + (overlay1 :initarg :overlay1 :type xcb:xkb:OverlayBehavior) + (overlay2 :initarg :overlay2 :type xcb:xkb:OverlayBehavior) + (permamentLock :initarg :permamentLock :type xcb:xkb:PermamentLockBehavior) + (permamentRadioGroup :initarg :permamentRadioGroup :type xcb:xkb:PermamentRadioGroupBehavior) + (permamentOverlay1 :initarg :permamentOverlay1 :type xcb:xkb:PermamentOverlayBehavior) + (permamentOverlay2 :initarg :permamentOverlay2 :type xcb:xkb:PermamentOverlayBehavior) + (type :initarg :type :type xcb:CARD8))) + +(defconst xcb:xkb:BehaviorType:Default 0) +(defconst xcb:xkb:BehaviorType:Lock 1) +(defconst xcb:xkb:BehaviorType:RadioGroup 2) +(defconst xcb:xkb:BehaviorType:Overlay1 3) +(defconst xcb:xkb:BehaviorType:Overlay2 4) +(defconst xcb:xkb:BehaviorType:PermamentLock 129) +(defconst xcb:xkb:BehaviorType:PermamentRadioGroup 130) +(defconst xcb:xkb:BehaviorType:PermamentOverlay1 131) +(defconst xcb:xkb:BehaviorType:PermamentOverlay2 132) + +(defclass xcb:xkb:SetBehavior + (xcb:-struct) + ((keycode :initarg :keycode :type xcb:KEYCODE) + (behavior :initarg :behavior :type xcb:xkb:Behavior) + (pad~0 :initform 1 :type xcb:-pad))) + +(defclass xcb:xkb:SetExplicit + (xcb:-struct) + ((keycode :initarg :keycode :type xcb:KEYCODE) + (explicit :initarg :explicit :type xcb:CARD8))) + +(defclass xcb:xkb:KeyModMap + (xcb:-struct) + ((keycode :initarg :keycode :type xcb:KEYCODE) + (mods :initarg :mods :type xcb:CARD8))) + +(defclass xcb:xkb:KeyVModMap + (xcb:-struct) + ((keycode :initarg :keycode :type xcb:KEYCODE) + (pad~0 :initform 1 :type xcb:-pad) + (vmods :initarg :vmods :type xcb:CARD16))) + +(defclass xcb:xkb:KTSetMapEntry + (xcb:-struct) + ((level :initarg :level :type xcb:CARD8) + (realMods :initarg :realMods :type xcb:CARD8) + (virtualMods :initarg :virtualMods :type xcb:CARD16))) + +(defclass xcb:xkb:SetKeyType + (xcb:-struct) + ((mask :initarg :mask :type xcb:CARD8) + (realMods :initarg :realMods :type xcb:CARD8) + (virtualMods :initarg :virtualMods :type xcb:CARD16) + (numLevels :initarg :numLevels :type xcb:CARD8) + (nMapEntries :initarg :nMapEntries :type xcb:CARD8) + (preserve :initarg :preserve :type xcb:BOOL) + (pad~0 :initform 1 :type xcb:-pad) + (entries~ :initform + '(name entries type xcb:xkb:KTSetMapEntry size + (xcb:-fieldref 'nMapEntries)) + :type xcb:-list) + (entries :initarg :entries :type xcb:-ignore) + (preserve-entries~ :initform + '(name preserve-entries type xcb:xkb:KTSetMapEntry size + (* + (xcb:-fieldref 'preserve) + (xcb:-fieldref 'nMapEntries))) + :type xcb:-list) + (preserve-entries :initarg :preserve-entries :type xcb:-ignore))) + +(xcb:deftypealias 'xcb:xkb:STRING8 'xcb:char) + +(defclass xcb:xkb:Outline + (xcb:-struct) + ((nPoints :initarg :nPoints :type xcb:CARD8) + (cornerRadius :initarg :cornerRadius :type xcb:CARD8) + (pad~0 :initform 2 :type xcb:-pad) + (points~ :initform + '(name points type xcb:POINT size + (xcb:-fieldref 'nPoints)) + :type xcb:-list) + (points :initarg :points :type xcb:-ignore))) + +(defclass xcb:xkb:Shape + (xcb:-struct) + ((name :initarg :name :type xcb:ATOM) + (nOutlines :initarg :nOutlines :type xcb:CARD8) + (primaryNdx :initarg :primaryNdx :type xcb:CARD8) + (approxNdx :initarg :approxNdx :type xcb:CARD8) + (pad~0 :initform 1 :type xcb:-pad) + (outlines~ :initform + '(name outlines type xcb:xkb:Outline size + (xcb:-fieldref 'nOutlines)) + :type xcb:-list) + (outlines :initarg :outlines :type xcb:-ignore))) + +(defclass xcb:xkb:Key + (xcb:-struct) + ((name~ :initform + '(name name type xcb:xkb:STRING8 size 4) + :type xcb:-list) + (name :initarg :name :type xcb:-ignore) + (gap :initarg :gap :type xcb:INT16) + (shapeNdx :initarg :shapeNdx :type xcb:CARD8) + (colorNdx :initarg :colorNdx :type xcb:CARD8))) + +(defclass xcb:xkb:OverlayKey + (xcb:-struct) + ((over~ :initform + '(name over type xcb:xkb:STRING8 size 4) + :type xcb:-list) + (over :initarg :over :type xcb:-ignore) + (under~ :initform + '(name under type xcb:xkb:STRING8 size 4) + :type xcb:-list) + (under :initarg :under :type xcb:-ignore))) + +(defclass xcb:xkb:OverlayRow + (xcb:-struct) + ((rowUnder :initarg :rowUnder :type xcb:CARD8) + (nKeys :initarg :nKeys :type xcb:CARD8) + (pad~0 :initform 2 :type xcb:-pad) + (keys~ :initform + '(name keys type xcb:xkb:OverlayKey size + (xcb:-fieldref 'nKeys)) + :type xcb:-list) + (keys :initarg :keys :type xcb:-ignore))) + +(defclass xcb:xkb:Overlay + (xcb:-struct) + ((name :initarg :name :type xcb:ATOM) + (nRows :initarg :nRows :type xcb:CARD8) + (pad~0 :initform 3 :type xcb:-pad) + (rows~ :initform + '(name rows type xcb:xkb:OverlayRow size + (xcb:-fieldref 'nRows)) + :type xcb:-list) + (rows :initarg :rows :type xcb:-ignore))) + +(defclass xcb:xkb:Row + (xcb:-struct) + ((top :initarg :top :type xcb:INT16) + (left :initarg :left :type xcb:INT16) + (nKeys :initarg :nKeys :type xcb:CARD8) + (vertical :initarg :vertical :type xcb:BOOL) + (pad~0 :initform 2 :type xcb:-pad) + (keys~ :initform + '(name keys type xcb:xkb:Key size + (xcb:-fieldref 'nKeys)) + :type xcb:-list) + (keys :initarg :keys :type xcb:-ignore))) + +(defconst xcb:xkb:DoodadType:Outline 1) +(defconst xcb:xkb:DoodadType:Solid 2) +(defconst xcb:xkb:DoodadType:Text 3) +(defconst xcb:xkb:DoodadType:Indicator 4) +(defconst xcb:xkb:DoodadType:Logo 5) + +(defclass xcb:xkb:Listing + (xcb:-struct) + ((flags :initarg :flags :type xcb:CARD16) + (length :initarg :length :type xcb:CARD16) + (string~ :initform + '(name string type xcb:xkb:STRING8 size + (xcb:-fieldref 'length)) + :type xcb:-list) + (string :initarg :string :type xcb:-ignore) + (pad~0 :initform 2 :type xcb:-pad-align))) + +(defclass xcb:xkb:DeviceLedInfo + (xcb:-struct) + ((ledClass :initarg :ledClass :type xcb:xkb:LedClassSpec) + (ledID :initarg :ledID :type xcb:xkb:IDSpec) + (namesPresent :initarg :namesPresent :type xcb:CARD32) + (mapsPresent :initarg :mapsPresent :type xcb:CARD32) + (physIndicators :initarg :physIndicators :type xcb:CARD32) + (state :initarg :state :type xcb:CARD32) + (names~ :initform + '(name names type xcb:ATOM size + (xcb:-popcount + (xcb:-fieldref 'namesPresent))) + :type xcb:-list) + (names :initarg :names :type xcb:-ignore) + (maps~ :initform + '(name maps type xcb:xkb:IndicatorMap size + (xcb:-popcount + (xcb:-fieldref 'mapsPresent))) + :type xcb:-list) + (maps :initarg :maps :type xcb:-ignore))) + +(defconst xcb:xkb:Error:BadDevice 255) +(defconst xcb:xkb:Error:BadClass 254) +(defconst xcb:xkb:Error:BadId 253) + +(defclass xcb:xkb:Keyboard + (xcb:-error) + ((~code :initform 0) + (value :initarg :value :type xcb:CARD32) + (minorOpcode :initarg :minorOpcode :type xcb:CARD16) + (majorOpcode :initarg :majorOpcode :type xcb:CARD8) + (pad~0 :initform 21 :type xcb:-pad))) + +(defconst xcb:xkb:SA:ClearLocks 1) +(defconst xcb:xkb:SA:LatchToLock 2) +(defconst xcb:xkb:SA:UseModMapMods 4) +(defconst xcb:xkb:SA:GroupAbsolute 4) + +(defconst xcb:xkb:SAType:NoAction 0) +(defconst xcb:xkb:SAType:SetMods 1) +(defconst xcb:xkb:SAType:LatchMods 2) +(defconst xcb:xkb:SAType:LockMods 3) +(defconst xcb:xkb:SAType:SetGroup 4) +(defconst xcb:xkb:SAType:LatchGroup 5) +(defconst xcb:xkb:SAType:LockGroup 6) +(defconst xcb:xkb:SAType:MovePtr 7) +(defconst xcb:xkb:SAType:PtrBtn 8) +(defconst xcb:xkb:SAType:LockPtrBtn 9) +(defconst xcb:xkb:SAType:SetPtrDflt 10) +(defconst xcb:xkb:SAType:ISOLock 11) +(defconst xcb:xkb:SAType:Terminate 12) +(defconst xcb:xkb:SAType:SwitchScreen 13) +(defconst xcb:xkb:SAType:SetControls 14) +(defconst xcb:xkb:SAType:LockControls 15) +(defconst xcb:xkb:SAType:ActionMessage 16) +(defconst xcb:xkb:SAType:RedirectKey 17) +(defconst xcb:xkb:SAType:DeviceBtn 18) +(defconst xcb:xkb:SAType:LockDeviceBtn 19) +(defconst xcb:xkb:SAType:DeviceValuator 20) + +(defclass xcb:xkb:SANoAction + (xcb:-struct) + ((type :initarg :type :type xcb:CARD8) + (pad~0 :initform 7 :type xcb:-pad))) + +(defclass xcb:xkb:SASetMods + (xcb:-struct) + ((type :initarg :type :type xcb:CARD8) + (flags :initarg :flags :type xcb:CARD8) + (mask :initarg :mask :type xcb:CARD8) + (realMods :initarg :realMods :type xcb:CARD8) + (vmodsHigh :initarg :vmodsHigh :type xcb:CARD8) + (vmodsLow :initarg :vmodsLow :type xcb:CARD8) + (pad~0 :initform 2 :type xcb:-pad))) + +(xcb:deftypealias 'xcb:xkb:SALatchMods 'xcb:xkb:SASetMods) + +(xcb:deftypealias 'xcb:xkb:SALockMods 'xcb:xkb:SASetMods) + +(defclass xcb:xkb:SASetGroup + (xcb:-struct) + ((type :initarg :type :type xcb:CARD8) + (flags :initarg :flags :type xcb:CARD8) + (group :initarg :group :type xcb:INT8) + (pad~0 :initform 5 :type xcb:-pad))) + +(xcb:deftypealias 'xcb:xkb:SALatchGroup 'xcb:xkb:SASetGroup) + +(xcb:deftypealias 'xcb:xkb:SALockGroup 'xcb:xkb:SASetGroup) + +(defconst xcb:xkb:SAMovePtrFlag:NoAcceleration 1) +(defconst xcb:xkb:SAMovePtrFlag:MoveAbsoluteX 2) +(defconst xcb:xkb:SAMovePtrFlag:MoveAbsoluteY 4) + +(defclass xcb:xkb:SAMovePtr + (xcb:-struct) + ((type :initarg :type :type xcb:CARD8) + (flags :initarg :flags :type xcb:CARD8) + (xHigh :initarg :xHigh :type xcb:INT8) + (xLow :initarg :xLow :type xcb:CARD8) + (yHigh :initarg :yHigh :type xcb:INT8) + (yLow :initarg :yLow :type xcb:CARD8) + (pad~0 :initform 2 :type xcb:-pad))) + +(defclass xcb:xkb:SAPtrBtn + (xcb:-struct) + ((type :initarg :type :type xcb:CARD8) + (flags :initarg :flags :type xcb:CARD8) + (count :initarg :count :type xcb:CARD8) + (button :initarg :button :type xcb:CARD8) + (pad~0 :initform 4 :type xcb:-pad))) + +(defclass xcb:xkb:SALockPtrBtn + (xcb:-struct) + ((type :initarg :type :type xcb:CARD8) + (flags :initarg :flags :type xcb:CARD8) + (pad~0 :initform 1 :type xcb:-pad) + (button :initarg :button :type xcb:CARD8) + (pad~1 :initform 4 :type xcb:-pad))) + +(defconst xcb:xkb:SASetPtrDfltFlag:DfltBtnAbsolute 4) +(defconst xcb:xkb:SASetPtrDfltFlag:AffectDfltButton 1) + +(defclass xcb:xkb:SASetPtrDflt + (xcb:-struct) + ((type :initarg :type :type xcb:CARD8) + (flags :initarg :flags :type xcb:CARD8) + (affect :initarg :affect :type xcb:CARD8) + (value :initarg :value :type xcb:INT8) + (pad~0 :initform 4 :type xcb:-pad))) + +(defconst xcb:xkb:SAIsoLockFlag:NoLock 1) +(defconst xcb:xkb:SAIsoLockFlag:NoUnlock 2) +(defconst xcb:xkb:SAIsoLockFlag:UseModMapMods 4) +(defconst xcb:xkb:SAIsoLockFlag:GroupAbsolute 4) +(defconst xcb:xkb:SAIsoLockFlag:ISODfltIsGroup 8) + +(defconst xcb:xkb:SAIsoLockNoAffect:Ctrls 8) +(defconst xcb:xkb:SAIsoLockNoAffect:Ptr 16) +(defconst xcb:xkb:SAIsoLockNoAffect:Group 32) +(defconst xcb:xkb:SAIsoLockNoAffect:Mods 64) + +(defclass xcb:xkb:SAIsoLock + (xcb:-struct) + ((type :initarg :type :type xcb:CARD8) + (flags :initarg :flags :type xcb:CARD8) + (mask :initarg :mask :type xcb:CARD8) + (realMods :initarg :realMods :type xcb:CARD8) + (group :initarg :group :type xcb:INT8) + (affect :initarg :affect :type xcb:CARD8) + (vmodsHigh :initarg :vmodsHigh :type xcb:CARD8) + (vmodsLow :initarg :vmodsLow :type xcb:CARD8))) + +(defclass xcb:xkb:SATerminate + (xcb:-struct) + ((type :initarg :type :type xcb:CARD8) + (pad~0 :initform 7 :type xcb:-pad))) + +(defconst xcb:xkb:SwitchScreenFlag:Application 1) +(defconst xcb:xkb:SwitchScreenFlag:Absolute 4) + +(defclass xcb:xkb:SASwitchScreen + (xcb:-struct) + ((type :initarg :type :type xcb:CARD8) + (flags :initarg :flags :type xcb:CARD8) + (newScreen :initarg :newScreen :type xcb:INT8) + (pad~0 :initform 5 :type xcb:-pad))) + +(defconst xcb:xkb:BoolCtrlsHigh:AccessXFeedback 1) +(defconst xcb:xkb:BoolCtrlsHigh:AudibleBell 2) +(defconst xcb:xkb:BoolCtrlsHigh:Overlay1 4) +(defconst xcb:xkb:BoolCtrlsHigh:Overlay2 8) +(defconst xcb:xkb:BoolCtrlsHigh:IgnoreGroupLock 16) + +(defconst xcb:xkb:BoolCtrlsLow:RepeatKeys 1) +(defconst xcb:xkb:BoolCtrlsLow:SlowKeys 2) +(defconst xcb:xkb:BoolCtrlsLow:BounceKeys 4) +(defconst xcb:xkb:BoolCtrlsLow:StickyKeys 8) +(defconst xcb:xkb:BoolCtrlsLow:MouseKeys 16) +(defconst xcb:xkb:BoolCtrlsLow:MouseKeysAccel 32) +(defconst xcb:xkb:BoolCtrlsLow:AccessXKeys 64) +(defconst xcb:xkb:BoolCtrlsLow:AccessXTimeout 128) + +(defclass xcb:xkb:SASetControls + (xcb:-struct) + ((type :initarg :type :type xcb:CARD8) + (pad~0 :initform 3 :type xcb:-pad) + (boolCtrlsHigh :initarg :boolCtrlsHigh :type xcb:CARD8) + (boolCtrlsLow :initarg :boolCtrlsLow :type xcb:CARD8) + (pad~1 :initform 2 :type xcb:-pad))) + +(xcb:deftypealias 'xcb:xkb:SALockControls 'xcb:xkb:SASetControls) + +(defconst xcb:xkb:ActionMessageFlag:OnPress 1) +(defconst xcb:xkb:ActionMessageFlag:OnRelease 2) +(defconst xcb:xkb:ActionMessageFlag:GenKeyEvent 4) + +(defclass xcb:xkb:SAActionMessage + (xcb:-struct) + ((type :initarg :type :type xcb:CARD8) + (flags :initarg :flags :type xcb:CARD8) + (message~ :initform + '(name message type xcb:CARD8 size 6) + :type xcb:-list) + (message :initarg :message :type xcb:-ignore))) + +(defclass xcb:xkb:SARedirectKey + (xcb:-struct) + ((type :initarg :type :type xcb:CARD8) + (newkey :initarg :newkey :type xcb:KEYCODE) + (mask :initarg :mask :type xcb:CARD8) + (realModifiers :initarg :realModifiers :type xcb:CARD8) + (vmodsMaskHigh :initarg :vmodsMaskHigh :type xcb:CARD8) + (vmodsMaskLow :initarg :vmodsMaskLow :type xcb:CARD8) + (vmodsHigh :initarg :vmodsHigh :type xcb:CARD8) + (vmodsLow :initarg :vmodsLow :type xcb:CARD8))) + +(defclass xcb:xkb:SADeviceBtn + (xcb:-struct) + ((type :initarg :type :type xcb:CARD8) + (flags :initarg :flags :type xcb:CARD8) + (count :initarg :count :type xcb:CARD8) + (button :initarg :button :type xcb:CARD8) + (device :initarg :device :type xcb:CARD8) + (pad~0 :initform 3 :type xcb:-pad))) + +(defconst xcb:xkb:LockDeviceFlags:NoLock 1) +(defconst xcb:xkb:LockDeviceFlags:NoUnlock 2) + +(defclass xcb:xkb:SALockDeviceBtn + (xcb:-struct) + ((type :initarg :type :type xcb:CARD8) + (flags :initarg :flags :type xcb:CARD8) + (pad~0 :initform 1 :type xcb:-pad) + (button :initarg :button :type xcb:CARD8) + (device :initarg :device :type xcb:CARD8) + (pad~1 :initform 3 :type xcb:-pad))) + +(defconst xcb:xkb:SAValWhat:IgnoreVal 0) +(defconst xcb:xkb:SAValWhat:SetValMin 1) +(defconst xcb:xkb:SAValWhat:SetValCenter 2) +(defconst xcb:xkb:SAValWhat:SetValMax 3) +(defconst xcb:xkb:SAValWhat:SetValRelative 4) +(defconst xcb:xkb:SAValWhat:SetValAbsolute 5) + +(defclass xcb:xkb:SADeviceValuator + (xcb:-struct) + ((type :initarg :type :type xcb:CARD8) + (device :initarg :device :type xcb:CARD8) + (val1what :initarg :val1what :type xcb:CARD8) + (val1index :initarg :val1index :type xcb:CARD8) + (val1value :initarg :val1value :type xcb:CARD8) + (val2what :initarg :val2what :type xcb:CARD8) + (val2index :initarg :val2index :type xcb:CARD8) + (val2value :initarg :val2value :type xcb:CARD8))) + +(defclass xcb:xkb:SIAction + (xcb:-struct) + ((type :initarg :type :type xcb:CARD8) + (data~ :initform + '(name data type xcb:CARD8 size 7) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:xkb:SymInterpret + (xcb:-struct) + ((sym :initarg :sym :type xcb:KEYSYM) + (mods :initarg :mods :type xcb:CARD8) + (match :initarg :match :type xcb:CARD8) + (virtualMod :initarg :virtualMod :type xcb:CARD8) + (flags :initarg :flags :type xcb:CARD8) + (action :initarg :action :type xcb:xkb:SIAction))) + +(defclass xcb:xkb:Action + (xcb:-union) + ((~size :initform 8) + (noaction :initarg :noaction :type xcb:xkb:SANoAction) + (setmods :initarg :setmods :type xcb:xkb:SASetMods) + (latchmods :initarg :latchmods :type xcb:xkb:SALatchMods) + (lockmods :initarg :lockmods :type xcb:xkb:SALockMods) + (setgroup :initarg :setgroup :type xcb:xkb:SASetGroup) + (latchgroup :initarg :latchgroup :type xcb:xkb:SALatchGroup) + (lockgroup :initarg :lockgroup :type xcb:xkb:SALockGroup) + (moveptr :initarg :moveptr :type xcb:xkb:SAMovePtr) + (ptrbtn :initarg :ptrbtn :type xcb:xkb:SAPtrBtn) + (lockptrbtn :initarg :lockptrbtn :type xcb:xkb:SALockPtrBtn) + (setptrdflt :initarg :setptrdflt :type xcb:xkb:SASetPtrDflt) + (isolock :initarg :isolock :type xcb:xkb:SAIsoLock) + (terminate :initarg :terminate :type xcb:xkb:SATerminate) + (switchscreen :initarg :switchscreen :type xcb:xkb:SASwitchScreen) + (setcontrols :initarg :setcontrols :type xcb:xkb:SASetControls) + (lockcontrols :initarg :lockcontrols :type xcb:xkb:SALockControls) + (message :initarg :message :type xcb:xkb:SAActionMessage) + (redirect :initarg :redirect :type xcb:xkb:SARedirectKey) + (devbtn :initarg :devbtn :type xcb:xkb:SADeviceBtn) + (lockdevbtn :initarg :lockdevbtn :type xcb:xkb:SALockDeviceBtn) + (devval :initarg :devval :type xcb:xkb:SADeviceValuator) + (type :initarg :type :type xcb:CARD8))) + +(defclass xcb:xkb:UseExtension + (xcb:-request) + ((~opcode :initform 0 :type xcb:-u1) + (wantedMajor :initarg :wantedMajor :type xcb:CARD16) + (wantedMinor :initarg :wantedMinor :type xcb:CARD16))) +(defclass xcb:xkb:UseExtension~reply + (xcb:-reply) + ((supported :initarg :supported :type xcb:BOOL) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (serverMajor :initarg :serverMajor :type xcb:CARD16) + (serverMinor :initarg :serverMinor :type xcb:CARD16) + (pad~0 :initform 20 :type xcb:-pad))) + +(defclass xcb:xkb:SelectEvents + (xcb:-request) + ((~opcode :initform 1 :type xcb:-u1) + (deviceSpec :initarg :deviceSpec :type xcb:xkb:DeviceSpec) + (affectWhich :initarg :affectWhich :type xcb:CARD16) + (clear :initarg :clear :type xcb:CARD16) + (selectAll :initarg :selectAll :type xcb:CARD16) + (affectMap :initarg :affectMap :type xcb:CARD16) + (map :initarg :map :type xcb:CARD16) + (details :initform + '(expression + (logand + (xcb:-fieldref 'affectWhich) + (logand + (lognot + (xcb:-fieldref 'clear)) + (lognot + (xcb:-fieldref 'selectAll)))) + cases + ((1 affectNewKeyboard newKeyboardDetails) + (4 affectState stateDetails) + (8 affectCtrls ctrlDetails) + (16 affectIndicatorState indicatorStateDetails) + (32 affectIndicatorMap indicatorMapDetails) + (64 affectNames namesDetails) + (128 affectCompat compatDetails) + (256 affectBell bellDetails) + (512 affectMsgDetails msgDetails) + (1024 affectAccessX accessXDetails) + (2048 affectExtDev extdevDetails))) + :type xcb:-switch) + (affectNewKeyboard :initarg :affectNewKeyboard :type xcb:CARD16) + (newKeyboardDetails :initarg :newKeyboardDetails :type xcb:CARD16) + (affectState :initarg :affectState :type xcb:CARD16) + (stateDetails :initarg :stateDetails :type xcb:CARD16) + (affectCtrls :initarg :affectCtrls :type xcb:CARD32) + (ctrlDetails :initarg :ctrlDetails :type xcb:CARD32) + (affectIndicatorState :initarg :affectIndicatorState :type xcb:CARD32) + (indicatorStateDetails :initarg :indicatorStateDetails :type xcb:CARD32) + (affectIndicatorMap :initarg :affectIndicatorMap :type xcb:CARD32) + (indicatorMapDetails :initarg :indicatorMapDetails :type xcb:CARD32) + (affectNames :initarg :affectNames :type xcb:CARD16) + (namesDetails :initarg :namesDetails :type xcb:CARD16) + (affectCompat :initarg :affectCompat :type xcb:CARD8) + (compatDetails :initarg :compatDetails :type xcb:CARD8) + (affectBell :initarg :affectBell :type xcb:CARD8) + (bellDetails :initarg :bellDetails :type xcb:CARD8) + (affectMsgDetails :initarg :affectMsgDetails :type xcb:CARD8) + (msgDetails :initarg :msgDetails :type xcb:CARD8) + (affectAccessX :initarg :affectAccessX :type xcb:CARD16) + (accessXDetails :initarg :accessXDetails :type xcb:CARD16) + (affectExtDev :initarg :affectExtDev :type xcb:CARD16) + (extdevDetails :initarg :extdevDetails :type xcb:CARD16))) + +(defclass xcb:xkb:Bell + (xcb:-request) + ((~opcode :initform 3 :type xcb:-u1) + (deviceSpec :initarg :deviceSpec :type xcb:xkb:DeviceSpec) + (bellClass :initarg :bellClass :type xcb:xkb:BellClassSpec) + (bellID :initarg :bellID :type xcb:xkb:IDSpec) + (percent :initarg :percent :type xcb:INT8) + (forceSound :initarg :forceSound :type xcb:BOOL) + (eventOnly :initarg :eventOnly :type xcb:BOOL) + (pad~0 :initform 1 :type xcb:-pad) + (pitch :initarg :pitch :type xcb:INT16) + (duration :initarg :duration :type xcb:INT16) + (pad~1 :initform 2 :type xcb:-pad) + (name :initarg :name :type xcb:ATOM) + (window :initarg :window :type xcb:WINDOW))) + +(defclass xcb:xkb:GetState + (xcb:-request) + ((~opcode :initform 4 :type xcb:-u1) + (deviceSpec :initarg :deviceSpec :type xcb:xkb:DeviceSpec) + (pad~0 :initform 2 :type xcb:-pad))) +(defclass xcb:xkb:GetState~reply + (xcb:-reply) + ((deviceID :initarg :deviceID :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (mods :initarg :mods :type xcb:CARD8) + (baseMods :initarg :baseMods :type xcb:CARD8) + (latchedMods :initarg :latchedMods :type xcb:CARD8) + (lockedMods :initarg :lockedMods :type xcb:CARD8) + (group :initarg :group :type xcb:CARD8) + (lockedGroup :initarg :lockedGroup :type xcb:CARD8) + (baseGroup :initarg :baseGroup :type xcb:INT16) + (latchedGroup :initarg :latchedGroup :type xcb:INT16) + (compatState :initarg :compatState :type xcb:CARD8) + (grabMods :initarg :grabMods :type xcb:CARD8) + (compatGrabMods :initarg :compatGrabMods :type xcb:CARD8) + (lookupMods :initarg :lookupMods :type xcb:CARD8) + (compatLookupMods :initarg :compatLookupMods :type xcb:CARD8) + (pad~0 :initform 1 :type xcb:-pad) + (ptrBtnState :initarg :ptrBtnState :type xcb:CARD16) + (pad~1 :initform 6 :type xcb:-pad))) + +(defclass xcb:xkb:LatchLockState + (xcb:-request) + ((~opcode :initform 5 :type xcb:-u1) + (deviceSpec :initarg :deviceSpec :type xcb:xkb:DeviceSpec) + (affectModLocks :initarg :affectModLocks :type xcb:CARD8) + (modLocks :initarg :modLocks :type xcb:CARD8) + (lockGroup :initarg :lockGroup :type xcb:BOOL) + (groupLock :initarg :groupLock :type xcb:CARD8) + (affectModLatches :initarg :affectModLatches :type xcb:CARD8) + (pad~0 :initform 1 :type xcb:-pad) + (pad~1 :initform 1 :type xcb:-pad) + (latchGroup :initarg :latchGroup :type xcb:BOOL) + (groupLatch :initarg :groupLatch :type xcb:CARD16))) + +(defclass xcb:xkb:GetControls + (xcb:-request) + ((~opcode :initform 6 :type xcb:-u1) + (deviceSpec :initarg :deviceSpec :type xcb:xkb:DeviceSpec) + (pad~0 :initform 2 :type xcb:-pad))) +(defclass xcb:xkb:GetControls~reply + (xcb:-reply) + ((deviceID :initarg :deviceID :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (mouseKeysDfltBtn :initarg :mouseKeysDfltBtn :type xcb:CARD8) + (numGroups :initarg :numGroups :type xcb:CARD8) + (groupsWrap :initarg :groupsWrap :type xcb:CARD8) + (internalModsMask :initarg :internalModsMask :type xcb:CARD8) + (ignoreLockModsMask :initarg :ignoreLockModsMask :type xcb:CARD8) + (internalModsRealMods :initarg :internalModsRealMods :type xcb:CARD8) + (ignoreLockModsRealMods :initarg :ignoreLockModsRealMods :type xcb:CARD8) + (pad~0 :initform 1 :type xcb:-pad) + (internalModsVmods :initarg :internalModsVmods :type xcb:CARD16) + (ignoreLockModsVmods :initarg :ignoreLockModsVmods :type xcb:CARD16) + (repeatDelay :initarg :repeatDelay :type xcb:CARD16) + (repeatInterval :initarg :repeatInterval :type xcb:CARD16) + (slowKeysDelay :initarg :slowKeysDelay :type xcb:CARD16) + (debounceDelay :initarg :debounceDelay :type xcb:CARD16) + (mouseKeysDelay :initarg :mouseKeysDelay :type xcb:CARD16) + (mouseKeysInterval :initarg :mouseKeysInterval :type xcb:CARD16) + (mouseKeysTimeToMax :initarg :mouseKeysTimeToMax :type xcb:CARD16) + (mouseKeysMaxSpeed :initarg :mouseKeysMaxSpeed :type xcb:CARD16) + (mouseKeysCurve :initarg :mouseKeysCurve :type xcb:INT16) + (accessXOption :initarg :accessXOption :type xcb:CARD16) + (accessXTimeout :initarg :accessXTimeout :type xcb:CARD16) + (accessXTimeoutOptionsMask :initarg :accessXTimeoutOptionsMask :type xcb:CARD16) + (accessXTimeoutOptionsValues :initarg :accessXTimeoutOptionsValues :type xcb:CARD16) + (pad~1 :initform 2 :type xcb:-pad) + (accessXTimeoutMask :initarg :accessXTimeoutMask :type xcb:CARD32) + (accessXTimeoutValues :initarg :accessXTimeoutValues :type xcb:CARD32) + (enabledControls :initarg :enabledControls :type xcb:CARD32) + (perKeyRepeat~ :initform + '(name perKeyRepeat type xcb:CARD8 size 32) + :type xcb:-list) + (perKeyRepeat :initarg :perKeyRepeat :type xcb:-ignore))) + +(defclass xcb:xkb:SetControls + (xcb:-request) + ((~opcode :initform 7 :type xcb:-u1) + (deviceSpec :initarg :deviceSpec :type xcb:xkb:DeviceSpec) + (affectInternalRealMods :initarg :affectInternalRealMods :type xcb:CARD8) + (internalRealMods :initarg :internalRealMods :type xcb:CARD8) + (affectIgnoreLockRealMods :initarg :affectIgnoreLockRealMods :type xcb:CARD8) + (ignoreLockRealMods :initarg :ignoreLockRealMods :type xcb:CARD8) + (affectInternalVirtualMods :initarg :affectInternalVirtualMods :type xcb:CARD16) + (internalVirtualMods :initarg :internalVirtualMods :type xcb:CARD16) + (affectIgnoreLockVirtualMods :initarg :affectIgnoreLockVirtualMods :type xcb:CARD16) + (ignoreLockVirtualMods :initarg :ignoreLockVirtualMods :type xcb:CARD16) + (mouseKeysDfltBtn :initarg :mouseKeysDfltBtn :type xcb:CARD8) + (groupsWrap :initarg :groupsWrap :type xcb:CARD8) + (accessXOptions :initarg :accessXOptions :type xcb:CARD16) + (pad~0 :initform 2 :type xcb:-pad) + (affectEnabledControls :initarg :affectEnabledControls :type xcb:CARD32) + (enabledControls :initarg :enabledControls :type xcb:CARD32) + (changeControls :initarg :changeControls :type xcb:CARD32) + (repeatDelay :initarg :repeatDelay :type xcb:CARD16) + (repeatInterval :initarg :repeatInterval :type xcb:CARD16) + (slowKeysDelay :initarg :slowKeysDelay :type xcb:CARD16) + (debounceDelay :initarg :debounceDelay :type xcb:CARD16) + (mouseKeysDelay :initarg :mouseKeysDelay :type xcb:CARD16) + (mouseKeysInterval :initarg :mouseKeysInterval :type xcb:CARD16) + (mouseKeysTimeToMax :initarg :mouseKeysTimeToMax :type xcb:CARD16) + (mouseKeysMaxSpeed :initarg :mouseKeysMaxSpeed :type xcb:CARD16) + (mouseKeysCurve :initarg :mouseKeysCurve :type xcb:INT16) + (accessXTimeout :initarg :accessXTimeout :type xcb:CARD16) + (accessXTimeoutMask :initarg :accessXTimeoutMask :type xcb:CARD32) + (accessXTimeoutValues :initarg :accessXTimeoutValues :type xcb:CARD32) + (accessXTimeoutOptionsMask :initarg :accessXTimeoutOptionsMask :type xcb:CARD16) + (accessXTimeoutOptionsValues :initarg :accessXTimeoutOptionsValues :type xcb:CARD16) + (perKeyRepeat~ :initform + '(name perKeyRepeat type xcb:CARD8 size 32) + :type xcb:-list) + (perKeyRepeat :initarg :perKeyRepeat :type xcb:-ignore))) + +(defclass xcb:xkb:GetMap + (xcb:-request) + ((~opcode :initform 8 :type xcb:-u1) + (deviceSpec :initarg :deviceSpec :type xcb:xkb:DeviceSpec) + (full :initarg :full :type xcb:CARD16) + (partial :initarg :partial :type xcb:CARD16) + (firstType :initarg :firstType :type xcb:CARD8) + (nTypes :initarg :nTypes :type xcb:CARD8) + (firstKeySym :initarg :firstKeySym :type xcb:KEYCODE) + (nKeySyms :initarg :nKeySyms :type xcb:CARD8) + (firstKeyAction :initarg :firstKeyAction :type xcb:KEYCODE) + (nKeyActions :initarg :nKeyActions :type xcb:CARD8) + (firstKeyBehavior :initarg :firstKeyBehavior :type xcb:KEYCODE) + (nKeyBehaviors :initarg :nKeyBehaviors :type xcb:CARD8) + (virtualMods :initarg :virtualMods :type xcb:CARD16) + (firstKeyExplicit :initarg :firstKeyExplicit :type xcb:KEYCODE) + (nKeyExplicit :initarg :nKeyExplicit :type xcb:CARD8) + (firstModMapKey :initarg :firstModMapKey :type xcb:KEYCODE) + (nModMapKeys :initarg :nModMapKeys :type xcb:CARD8) + (firstVModMapKey :initarg :firstVModMapKey :type xcb:KEYCODE) + (nVModMapKeys :initarg :nVModMapKeys :type xcb:CARD8) + (pad~0 :initform 2 :type xcb:-pad))) +(defclass xcb:xkb:GetMap~reply + (xcb:-reply) + ((deviceID :initarg :deviceID :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~0 :initform 2 :type xcb:-pad) + (minKeyCode :initarg :minKeyCode :type xcb:KEYCODE) + (maxKeyCode :initarg :maxKeyCode :type xcb:KEYCODE) + (present :initarg :present :type xcb:CARD16) + (firstType :initarg :firstType :type xcb:CARD8) + (nTypes :initarg :nTypes :type xcb:CARD8) + (totalTypes :initarg :totalTypes :type xcb:CARD8) + (firstKeySym :initarg :firstKeySym :type xcb:KEYCODE) + (totalSyms :initarg :totalSyms :type xcb:CARD16) + (nKeySyms :initarg :nKeySyms :type xcb:CARD8) + (firstKeyAction :initarg :firstKeyAction :type xcb:KEYCODE) + (totalActions :initarg :totalActions :type xcb:CARD16) + (nKeyActions :initarg :nKeyActions :type xcb:CARD8) + (firstKeyBehavior :initarg :firstKeyBehavior :type xcb:KEYCODE) + (nKeyBehaviors :initarg :nKeyBehaviors :type xcb:CARD8) + (totalKeyBehaviors :initarg :totalKeyBehaviors :type xcb:CARD8) + (firstKeyExplicit :initarg :firstKeyExplicit :type xcb:KEYCODE) + (nKeyExplicit :initarg :nKeyExplicit :type xcb:CARD8) + (totalKeyExplicit :initarg :totalKeyExplicit :type xcb:CARD8) + (firstModMapKey :initarg :firstModMapKey :type xcb:KEYCODE) + (nModMapKeys :initarg :nModMapKeys :type xcb:CARD8) + (totalModMapKeys :initarg :totalModMapKeys :type xcb:CARD8) + (firstVModMapKey :initarg :firstVModMapKey :type xcb:KEYCODE) + (nVModMapKeys :initarg :nVModMapKeys :type xcb:CARD8) + (totalVModMapKeys :initarg :totalVModMapKeys :type xcb:CARD8) + (pad~1 :initform 1 :type xcb:-pad) + (virtualMods :initarg :virtualMods :type xcb:CARD16) + (map :initform + '(expression + (xcb:-fieldref 'present) + cases + ((1 types-rtrn~) + (2 syms-rtrn~) + (16 acts-rtrn-count~ pad~2 acts-rtrn-acts~) + (32 behaviors-rtrn~) + (64 vmods-rtrn~ pad~3) + (8 explicit-rtrn~ pad~4) + (4 modmap-rtrn~ pad~5) + (128 vmodmap-rtrn~))) + :type xcb:-switch) + (types-rtrn~ :initform + '(name types-rtrn type xcb:xkb:KeyType size + (xcb:-fieldref 'nTypes)) + :type xcb:-list) + (types-rtrn :initarg :types-rtrn :type xcb:-ignore) + (syms-rtrn~ :initform + '(name syms-rtrn type xcb:xkb:KeySymMap size + (xcb:-fieldref 'nKeySyms)) + :type xcb:-list) + (syms-rtrn :initarg :syms-rtrn :type xcb:-ignore) + (acts-rtrn-count~ :initform + '(name acts-rtrn-count type xcb:CARD8 size + (xcb:-fieldref 'nKeyActions)) + :type xcb:-list) + (acts-rtrn-count :initarg :acts-rtrn-count :type xcb:-ignore) + (pad~2 :initform 4 :type xcb:-pad-align) + (acts-rtrn-acts~ :initform + '(name acts-rtrn-acts type xcb:xkb:Action size + (xcb:-fieldref 'totalActions)) + :type xcb:-list) + (acts-rtrn-acts :initarg :acts-rtrn-acts :type xcb:-ignore) + (behaviors-rtrn~ :initform + '(name behaviors-rtrn type xcb:xkb:SetBehavior size + (xcb:-fieldref 'totalKeyBehaviors)) + :type xcb:-list) + (behaviors-rtrn :initarg :behaviors-rtrn :type xcb:-ignore) + (vmods-rtrn~ :initform + '(name vmods-rtrn type xcb:CARD8 size + (xcb:-popcount + (xcb:-fieldref 'virtualMods))) + :type xcb:-list) + (vmods-rtrn :initarg :vmods-rtrn :type xcb:-ignore) + (pad~3 :initform 4 :type xcb:-pad-align) + (explicit-rtrn~ :initform + '(name explicit-rtrn type xcb:xkb:SetExplicit size + (xcb:-fieldref 'totalKeyExplicit)) + :type xcb:-list) + (explicit-rtrn :initarg :explicit-rtrn :type xcb:-ignore) + (pad~4 :initform 4 :type xcb:-pad-align) + (modmap-rtrn~ :initform + '(name modmap-rtrn type xcb:xkb:KeyModMap size + (xcb:-fieldref 'totalModMapKeys)) + :type xcb:-list) + (modmap-rtrn :initarg :modmap-rtrn :type xcb:-ignore) + (pad~5 :initform 4 :type xcb:-pad-align) + (vmodmap-rtrn~ :initform + '(name vmodmap-rtrn type xcb:xkb:KeyVModMap size + (xcb:-fieldref 'totalVModMapKeys)) + :type xcb:-list) + (vmodmap-rtrn :initarg :vmodmap-rtrn :type xcb:-ignore))) + +(defclass xcb:xkb:SetMap + (xcb:-request) + ((~opcode :initform 9 :type xcb:-u1) + (deviceSpec :initarg :deviceSpec :type xcb:xkb:DeviceSpec) + (present :initarg :present :type xcb:CARD16) + (flags :initarg :flags :type xcb:CARD16) + (minKeyCode :initarg :minKeyCode :type xcb:KEYCODE) + (maxKeyCode :initarg :maxKeyCode :type xcb:KEYCODE) + (firstType :initarg :firstType :type xcb:CARD8) + (nTypes :initarg :nTypes :type xcb:CARD8) + (firstKeySym :initarg :firstKeySym :type xcb:KEYCODE) + (nKeySyms :initarg :nKeySyms :type xcb:CARD8) + (totalSyms :initarg :totalSyms :type xcb:CARD16) + (firstKeyAction :initarg :firstKeyAction :type xcb:KEYCODE) + (nKeyActions :initarg :nKeyActions :type xcb:CARD8) + (totalActions :initarg :totalActions :type xcb:CARD16) + (firstKeyBehavior :initarg :firstKeyBehavior :type xcb:KEYCODE) + (nKeyBehaviors :initarg :nKeyBehaviors :type xcb:CARD8) + (totalKeyBehaviors :initarg :totalKeyBehaviors :type xcb:CARD8) + (firstKeyExplicit :initarg :firstKeyExplicit :type xcb:KEYCODE) + (nKeyExplicit :initarg :nKeyExplicit :type xcb:CARD8) + (totalKeyExplicit :initarg :totalKeyExplicit :type xcb:CARD8) + (firstModMapKey :initarg :firstModMapKey :type xcb:KEYCODE) + (nModMapKeys :initarg :nModMapKeys :type xcb:CARD8) + (totalModMapKeys :initarg :totalModMapKeys :type xcb:CARD8) + (firstVModMapKey :initarg :firstVModMapKey :type xcb:KEYCODE) + (nVModMapKeys :initarg :nVModMapKeys :type xcb:CARD8) + (totalVModMapKeys :initarg :totalVModMapKeys :type xcb:CARD8) + (virtualMods :initarg :virtualMods :type xcb:CARD16) + (values :initform + '(expression + (xcb:-fieldref 'present) + cases + ((1 types~) + (2 syms~) + (16 actionsCount~ pad~0 actions~) + (32 behaviors~) + (64 vmods~ pad~1) + (8 explicit~) + (4 modmap~) + (128 vmodmap~))) + :type xcb:-switch) + (types~ :initform + '(name types type xcb:xkb:SetKeyType size + (xcb:-fieldref 'nTypes)) + :type xcb:-list) + (types :initarg :types :type xcb:-ignore) + (syms~ :initform + '(name syms type xcb:xkb:KeySymMap size + (xcb:-fieldref 'nKeySyms)) + :type xcb:-list) + (syms :initarg :syms :type xcb:-ignore) + (actionsCount~ :initform + '(name actionsCount type xcb:CARD8 size + (xcb:-fieldref 'nKeyActions)) + :type xcb:-list) + (actionsCount :initarg :actionsCount :type xcb:-ignore) + (pad~0 :initform 4 :type xcb:-pad-align) + (actions~ :initform + '(name actions type xcb:xkb:Action size + (xcb:-fieldref 'totalActions)) + :type xcb:-list) + (actions :initarg :actions :type xcb:-ignore) + (behaviors~ :initform + '(name behaviors type xcb:xkb:SetBehavior size + (xcb:-fieldref 'totalKeyBehaviors)) + :type xcb:-list) + (behaviors :initarg :behaviors :type xcb:-ignore) + (vmods~ :initform + '(name vmods type xcb:CARD8 size + (xcb:-popcount + (xcb:-fieldref 'virtualMods))) + :type xcb:-list) + (vmods :initarg :vmods :type xcb:-ignore) + (pad~1 :initform 4 :type xcb:-pad-align) + (explicit~ :initform + '(name explicit type xcb:xkb:SetExplicit size + (xcb:-fieldref 'totalKeyExplicit)) + :type xcb:-list) + (explicit :initarg :explicit :type xcb:-ignore) + (modmap~ :initform + '(name modmap type xcb:xkb:KeyModMap size + (xcb:-fieldref 'totalModMapKeys)) + :type xcb:-list) + (modmap :initarg :modmap :type xcb:-ignore) + (vmodmap~ :initform + '(name vmodmap type xcb:xkb:KeyVModMap size + (xcb:-fieldref 'totalVModMapKeys)) + :type xcb:-list) + (vmodmap :initarg :vmodmap :type xcb:-ignore))) + +(defclass xcb:xkb:GetCompatMap + (xcb:-request) + ((~opcode :initform 10 :type xcb:-u1) + (deviceSpec :initarg :deviceSpec :type xcb:xkb:DeviceSpec) + (groups :initarg :groups :type xcb:CARD8) + (getAllSI :initarg :getAllSI :type xcb:BOOL) + (firstSI :initarg :firstSI :type xcb:CARD16) + (nSI :initarg :nSI :type xcb:CARD16))) +(defclass xcb:xkb:GetCompatMap~reply + (xcb:-reply) + ((deviceID :initarg :deviceID :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (groupsRtrn :initarg :groupsRtrn :type xcb:CARD8) + (pad~0 :initform 1 :type xcb:-pad) + (firstSIRtrn :initarg :firstSIRtrn :type xcb:CARD16) + (nSIRtrn :initarg :nSIRtrn :type xcb:CARD16) + (nTotalSI :initarg :nTotalSI :type xcb:CARD16) + (pad~1 :initform 16 :type xcb:-pad) + (si-rtrn~ :initform + '(name si-rtrn type xcb:xkb:SymInterpret size + (xcb:-fieldref 'nSIRtrn)) + :type xcb:-list) + (si-rtrn :initarg :si-rtrn :type xcb:-ignore) + (group-rtrn~ :initform + '(name group-rtrn type xcb:xkb:ModDef size + (xcb:-popcount + (xcb:-fieldref 'groupsRtrn))) + :type xcb:-list) + (group-rtrn :initarg :group-rtrn :type xcb:-ignore))) + +(defclass xcb:xkb:SetCompatMap + (xcb:-request) + ((~opcode :initform 11 :type xcb:-u1) + (deviceSpec :initarg :deviceSpec :type xcb:xkb:DeviceSpec) + (pad~0 :initform 1 :type xcb:-pad) + (recomputeActions :initarg :recomputeActions :type xcb:BOOL) + (truncateSI :initarg :truncateSI :type xcb:BOOL) + (groups :initarg :groups :type xcb:CARD8) + (firstSI :initarg :firstSI :type xcb:CARD16) + (nSI :initarg :nSI :type xcb:CARD16) + (pad~1 :initform 2 :type xcb:-pad) + (si~ :initform + '(name si type xcb:xkb:SymInterpret size + (xcb:-fieldref 'nSI)) + :type xcb:-list) + (si :initarg :si :type xcb:-ignore) + (groupMaps~ :initform + '(name groupMaps type xcb:xkb:ModDef size + (xcb:-popcount + (xcb:-fieldref 'groups))) + :type xcb:-list) + (groupMaps :initarg :groupMaps :type xcb:-ignore))) + +(defclass xcb:xkb:GetIndicatorState + (xcb:-request) + ((~opcode :initform 12 :type xcb:-u1) + (deviceSpec :initarg :deviceSpec :type xcb:xkb:DeviceSpec) + (pad~0 :initform 2 :type xcb:-pad))) +(defclass xcb:xkb:GetIndicatorState~reply + (xcb:-reply) + ((deviceID :initarg :deviceID :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (state :initarg :state :type xcb:CARD32) + (pad~0 :initform 20 :type xcb:-pad))) + +(defclass xcb:xkb:GetIndicatorMap + (xcb:-request) + ((~opcode :initform 13 :type xcb:-u1) + (deviceSpec :initarg :deviceSpec :type xcb:xkb:DeviceSpec) + (pad~0 :initform 2 :type xcb:-pad) + (which :initarg :which :type xcb:CARD32))) +(defclass xcb:xkb:GetIndicatorMap~reply + (xcb:-reply) + ((deviceID :initarg :deviceID :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (which :initarg :which :type xcb:CARD32) + (realIndicators :initarg :realIndicators :type xcb:CARD32) + (nIndicators :initarg :nIndicators :type xcb:CARD8) + (pad~0 :initform 15 :type xcb:-pad) + (maps~ :initform + '(name maps type xcb:xkb:IndicatorMap size + (xcb:-popcount + (xcb:-fieldref 'which))) + :type xcb:-list) + (maps :initarg :maps :type xcb:-ignore))) + +(defclass xcb:xkb:SetIndicatorMap + (xcb:-request) + ((~opcode :initform 14 :type xcb:-u1) + (deviceSpec :initarg :deviceSpec :type xcb:xkb:DeviceSpec) + (pad~0 :initform 2 :type xcb:-pad) + (which :initarg :which :type xcb:CARD32) + (maps~ :initform + '(name maps type xcb:xkb:IndicatorMap size + (xcb:-popcount + (xcb:-fieldref 'which))) + :type xcb:-list) + (maps :initarg :maps :type xcb:-ignore))) + +(defclass xcb:xkb:GetNamedIndicator + (xcb:-request) + ((~opcode :initform 15 :type xcb:-u1) + (deviceSpec :initarg :deviceSpec :type xcb:xkb:DeviceSpec) + (ledClass :initarg :ledClass :type xcb:xkb:LedClassSpec) + (ledID :initarg :ledID :type xcb:xkb:IDSpec) + (pad~0 :initform 2 :type xcb:-pad) + (indicator :initarg :indicator :type xcb:ATOM))) +(defclass xcb:xkb:GetNamedIndicator~reply + (xcb:-reply) + ((deviceID :initarg :deviceID :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (indicator :initarg :indicator :type xcb:ATOM) + (found :initarg :found :type xcb:BOOL) + (on :initarg :on :type xcb:BOOL) + (realIndicator :initarg :realIndicator :type xcb:BOOL) + (ndx :initarg :ndx :type xcb:CARD8) + (map-flags :initarg :map-flags :type xcb:CARD8) + (map-whichGroups :initarg :map-whichGroups :type xcb:CARD8) + (map-groups :initarg :map-groups :type xcb:CARD8) + (map-whichMods :initarg :map-whichMods :type xcb:CARD8) + (map-mods :initarg :map-mods :type xcb:CARD8) + (map-realMods :initarg :map-realMods :type xcb:CARD8) + (map-vmod :initarg :map-vmod :type xcb:CARD16) + (map-ctrls :initarg :map-ctrls :type xcb:CARD32) + (supported :initarg :supported :type xcb:BOOL) + (pad~0 :initform 3 :type xcb:-pad))) + +(defclass xcb:xkb:SetNamedIndicator + (xcb:-request) + ((~opcode :initform 16 :type xcb:-u1) + (deviceSpec :initarg :deviceSpec :type xcb:xkb:DeviceSpec) + (ledClass :initarg :ledClass :type xcb:xkb:LedClassSpec) + (ledID :initarg :ledID :type xcb:xkb:IDSpec) + (pad~0 :initform 2 :type xcb:-pad) + (indicator :initarg :indicator :type xcb:ATOM) + (setState :initarg :setState :type xcb:BOOL) + (on :initarg :on :type xcb:BOOL) + (setMap :initarg :setMap :type xcb:BOOL) + (createMap :initarg :createMap :type xcb:BOOL) + (pad~1 :initform 1 :type xcb:-pad) + (map-flags :initarg :map-flags :type xcb:CARD8) + (map-whichGroups :initarg :map-whichGroups :type xcb:CARD8) + (map-groups :initarg :map-groups :type xcb:CARD8) + (map-whichMods :initarg :map-whichMods :type xcb:CARD8) + (map-realMods :initarg :map-realMods :type xcb:CARD8) + (map-vmods :initarg :map-vmods :type xcb:CARD16) + (map-ctrls :initarg :map-ctrls :type xcb:CARD32))) + +(defclass xcb:xkb:GetNames + (xcb:-request) + ((~opcode :initform 17 :type xcb:-u1) + (deviceSpec :initarg :deviceSpec :type xcb:xkb:DeviceSpec) + (pad~0 :initform 2 :type xcb:-pad) + (which :initarg :which :type xcb:CARD32))) +(defclass xcb:xkb:GetNames~reply + (xcb:-reply) + ((deviceID :initarg :deviceID :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (which :initarg :which :type xcb:CARD32) + (minKeyCode :initarg :minKeyCode :type xcb:KEYCODE) + (maxKeyCode :initarg :maxKeyCode :type xcb:KEYCODE) + (nTypes :initarg :nTypes :type xcb:CARD8) + (groupNames :initarg :groupNames :type xcb:CARD8) + (virtualMods :initarg :virtualMods :type xcb:CARD16) + (firstKey :initarg :firstKey :type xcb:KEYCODE) + (nKeys :initarg :nKeys :type xcb:CARD8) + (indicators :initarg :indicators :type xcb:CARD32) + (nRadioGroups :initarg :nRadioGroups :type xcb:CARD8) + (nKeyAliases :initarg :nKeyAliases :type xcb:CARD8) + (nKTLevels :initarg :nKTLevels :type xcb:CARD16) + (pad~0 :initform 4 :type xcb:-pad) + (valueList :initform + '(expression + (xcb:-fieldref 'which) + cases + ((1 keycodesName) + (2 geometryName) + (4 symbolsName) + (8 physSymbolsName) + (16 typesName) + (32 compatName) + (64 typeNames~) + (128 nLevelsPerType~ pad~1 ktLevelNames~) + (256 indicatorNames~) + (2048 virtualModNames~) + (4096 groups~) + (512 keyNames~) + (1024 keyAliases~) + (8192 radioGroupNames~))) + :type xcb:-switch) + (keycodesName :initarg :keycodesName :type xcb:ATOM) + (geometryName :initarg :geometryName :type xcb:ATOM) + (symbolsName :initarg :symbolsName :type xcb:ATOM) + (physSymbolsName :initarg :physSymbolsName :type xcb:ATOM) + (typesName :initarg :typesName :type xcb:ATOM) + (compatName :initarg :compatName :type xcb:ATOM) + (typeNames~ :initform + '(name typeNames type xcb:ATOM size + (xcb:-fieldref 'nTypes)) + :type xcb:-list) + (typeNames :initarg :typeNames :type xcb:-ignore) + (nLevelsPerType~ :initform + '(name nLevelsPerType type xcb:CARD8 size + (xcb:-fieldref 'nTypes)) + :type xcb:-list) + (nLevelsPerType :initarg :nLevelsPerType :type xcb:-ignore) + (pad~1 :initform 4 :type xcb:-pad-align) + (ktLevelNames~ :initform + '(name ktLevelNames type xcb:ATOM size + (apply #'+ + (slot-value obj 'nLevelsPerType))) + :type xcb:-list) + (ktLevelNames :initarg :ktLevelNames :type xcb:-ignore) + (indicatorNames~ :initform + '(name indicatorNames type xcb:ATOM size + (xcb:-popcount + (xcb:-fieldref 'indicators))) + :type xcb:-list) + (indicatorNames :initarg :indicatorNames :type xcb:-ignore) + (virtualModNames~ :initform + '(name virtualModNames type xcb:ATOM size + (xcb:-popcount + (xcb:-fieldref 'virtualMods))) + :type xcb:-list) + (virtualModNames :initarg :virtualModNames :type xcb:-ignore) + (groups~ :initform + '(name groups type xcb:ATOM size + (xcb:-popcount + (xcb:-fieldref 'groupNames))) + :type xcb:-list) + (groups :initarg :groups :type xcb:-ignore) + (keyNames~ :initform + '(name keyNames type xcb:xkb:KeyName size + (xcb:-fieldref 'nKeys)) + :type xcb:-list) + (keyNames :initarg :keyNames :type xcb:-ignore) + (keyAliases~ :initform + '(name keyAliases type xcb:xkb:KeyAlias size + (xcb:-fieldref 'nKeyAliases)) + :type xcb:-list) + (keyAliases :initarg :keyAliases :type xcb:-ignore) + (radioGroupNames~ :initform + '(name radioGroupNames type xcb:ATOM size + (xcb:-fieldref 'nRadioGroups)) + :type xcb:-list) + (radioGroupNames :initarg :radioGroupNames :type xcb:-ignore))) + +(defclass xcb:xkb:SetNames + (xcb:-request) + ((~opcode :initform 18 :type xcb:-u1) + (deviceSpec :initarg :deviceSpec :type xcb:xkb:DeviceSpec) + (virtualMods :initarg :virtualMods :type xcb:CARD16) + (which :initarg :which :type xcb:CARD32) + (firstType :initarg :firstType :type xcb:CARD8) + (nTypes :initarg :nTypes :type xcb:CARD8) + (firstKTLevelt :initarg :firstKTLevelt :type xcb:CARD8) + (nKTLevels :initarg :nKTLevels :type xcb:CARD8) + (indicators :initarg :indicators :type xcb:CARD32) + (groupNames :initarg :groupNames :type xcb:CARD8) + (nRadioGroups :initarg :nRadioGroups :type xcb:CARD8) + (firstKey :initarg :firstKey :type xcb:KEYCODE) + (nKeys :initarg :nKeys :type xcb:CARD8) + (nKeyAliases :initarg :nKeyAliases :type xcb:CARD8) + (pad~0 :initform 1 :type xcb:-pad) + (totalKTLevelNames :initarg :totalKTLevelNames :type xcb:CARD16) + (values :initform + '(expression + (xcb:-fieldref 'which) + cases + ((1 keycodesName) + (2 geometryName) + (4 symbolsName) + (8 physSymbolsName) + (16 typesName) + (32 compatName) + (64 typeNames~) + (128 nLevelsPerType~ pad~1 ktLevelNames~) + (256 indicatorNames~) + (2048 virtualModNames~) + (4096 groups~) + (512 keyNames~) + (1024 keyAliases~) + (8192 radioGroupNames~))) + :type xcb:-switch) + (keycodesName :initarg :keycodesName :type xcb:ATOM) + (geometryName :initarg :geometryName :type xcb:ATOM) + (symbolsName :initarg :symbolsName :type xcb:ATOM) + (physSymbolsName :initarg :physSymbolsName :type xcb:ATOM) + (typesName :initarg :typesName :type xcb:ATOM) + (compatName :initarg :compatName :type xcb:ATOM) + (typeNames~ :initform + '(name typeNames type xcb:ATOM size + (xcb:-fieldref 'nTypes)) + :type xcb:-list) + (typeNames :initarg :typeNames :type xcb:-ignore) + (nLevelsPerType~ :initform + '(name nLevelsPerType type xcb:CARD8 size + (xcb:-fieldref 'nTypes)) + :type xcb:-list) + (nLevelsPerType :initarg :nLevelsPerType :type xcb:-ignore) + (pad~1 :initform 4 :type xcb:-pad-align) + (ktLevelNames~ :initform + '(name ktLevelNames type xcb:ATOM size + (apply #'+ + (slot-value obj 'nLevelsPerType))) + :type xcb:-list) + (ktLevelNames :initarg :ktLevelNames :type xcb:-ignore) + (indicatorNames~ :initform + '(name indicatorNames type xcb:ATOM size + (xcb:-popcount + (xcb:-fieldref 'indicators))) + :type xcb:-list) + (indicatorNames :initarg :indicatorNames :type xcb:-ignore) + (virtualModNames~ :initform + '(name virtualModNames type xcb:ATOM size + (xcb:-popcount + (xcb:-fieldref 'virtualMods))) + :type xcb:-list) + (virtualModNames :initarg :virtualModNames :type xcb:-ignore) + (groups~ :initform + '(name groups type xcb:ATOM size + (xcb:-popcount + (xcb:-fieldref 'groupNames))) + :type xcb:-list) + (groups :initarg :groups :type xcb:-ignore) + (keyNames~ :initform + '(name keyNames type xcb:xkb:KeyName size + (xcb:-fieldref 'nKeys)) + :type xcb:-list) + (keyNames :initarg :keyNames :type xcb:-ignore) + (keyAliases~ :initform + '(name keyAliases type xcb:xkb:KeyAlias size + (xcb:-fieldref 'nKeyAliases)) + :type xcb:-list) + (keyAliases :initarg :keyAliases :type xcb:-ignore) + (radioGroupNames~ :initform + '(name radioGroupNames type xcb:ATOM size + (xcb:-fieldref 'nRadioGroups)) + :type xcb:-list) + (radioGroupNames :initarg :radioGroupNames :type xcb:-ignore))) + +(defclass xcb:xkb:PerClientFlags + (xcb:-request) + ((~opcode :initform 21 :type xcb:-u1) + (deviceSpec :initarg :deviceSpec :type xcb:xkb:DeviceSpec) + (pad~0 :initform 2 :type xcb:-pad) + (change :initarg :change :type xcb:CARD32) + (value :initarg :value :type xcb:CARD32) + (ctrlsToChange :initarg :ctrlsToChange :type xcb:CARD32) + (autoCtrls :initarg :autoCtrls :type xcb:CARD32) + (autoCtrlsValues :initarg :autoCtrlsValues :type xcb:CARD32))) +(defclass xcb:xkb:PerClientFlags~reply + (xcb:-reply) + ((deviceID :initarg :deviceID :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (supported :initarg :supported :type xcb:CARD32) + (value :initarg :value :type xcb:CARD32) + (autoCtrls :initarg :autoCtrls :type xcb:CARD32) + (autoCtrlsValues :initarg :autoCtrlsValues :type xcb:CARD32) + (pad~0 :initform 8 :type xcb:-pad))) + +(defclass xcb:xkb:ListComponents + (xcb:-request) + ((~opcode :initform 22 :type xcb:-u1) + (deviceSpec :initarg :deviceSpec :type xcb:xkb:DeviceSpec) + (maxNames :initarg :maxNames :type xcb:CARD16))) +(defclass xcb:xkb:ListComponents~reply + (xcb:-reply) + ((deviceID :initarg :deviceID :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (nKeymaps :initarg :nKeymaps :type xcb:CARD16) + (nKeycodes :initarg :nKeycodes :type xcb:CARD16) + (nTypes :initarg :nTypes :type xcb:CARD16) + (nCompatMaps :initarg :nCompatMaps :type xcb:CARD16) + (nSymbols :initarg :nSymbols :type xcb:CARD16) + (nGeometries :initarg :nGeometries :type xcb:CARD16) + (extra :initarg :extra :type xcb:CARD16) + (pad~0 :initform 10 :type xcb:-pad) + (keymaps~ :initform + '(name keymaps type xcb:xkb:Listing size + (xcb:-fieldref 'nKeymaps)) + :type xcb:-list) + (keymaps :initarg :keymaps :type xcb:-ignore) + (keycodes~ :initform + '(name keycodes type xcb:xkb:Listing size + (xcb:-fieldref 'nKeycodes)) + :type xcb:-list) + (keycodes :initarg :keycodes :type xcb:-ignore) + (types~ :initform + '(name types type xcb:xkb:Listing size + (xcb:-fieldref 'nTypes)) + :type xcb:-list) + (types :initarg :types :type xcb:-ignore) + (compatMaps~ :initform + '(name compatMaps type xcb:xkb:Listing size + (xcb:-fieldref 'nCompatMaps)) + :type xcb:-list) + (compatMaps :initarg :compatMaps :type xcb:-ignore) + (symbols~ :initform + '(name symbols type xcb:xkb:Listing size + (xcb:-fieldref 'nSymbols)) + :type xcb:-list) + (symbols :initarg :symbols :type xcb:-ignore) + (geometries~ :initform + '(name geometries type xcb:xkb:Listing size + (xcb:-fieldref 'nGeometries)) + :type xcb:-list) + (geometries :initarg :geometries :type xcb:-ignore))) + +(defclass xcb:xkb:GetKbdByName + (xcb:-request) + ((~opcode :initform 23 :type xcb:-u1) + (deviceSpec :initarg :deviceSpec :type xcb:xkb:DeviceSpec) + (need :initarg :need :type xcb:CARD16) + (want :initarg :want :type xcb:CARD16) + (load :initarg :load :type xcb:BOOL) + (pad~0 :initform 1 :type xcb:-pad))) +(eval-and-compile + (when + (< emacs-major-version 25) + (fset 'xcb:-defclass + (symbol-function 'defclass)) + (defmacro defclass + (&rest _args)))) +(defclass xcb:xkb:GetKbdByName~reply + (xcb:-reply) + ((deviceID :initarg :deviceID :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (minKeyCode :initarg :minKeyCode :type xcb:KEYCODE) + (maxKeyCode :initarg :maxKeyCode :type xcb:KEYCODE) + (loaded :initarg :loaded :type xcb:BOOL) + (newKeyboard :initarg :newKeyboard :type xcb:BOOL) + (found :initarg :found :type xcb:CARD16) + (reported :initarg :reported :type xcb:CARD16) + (pad~0 :initform 16 :type xcb:-pad) + (replies :initform + '(expression + (xcb:-fieldref 'reported) + cases + ((13 getmap-type typeDeviceID getmap-sequence getmap-length pad~1 typeMinKeyCode typeMaxKeyCode present firstType nTypes totalTypes firstKeySym totalSyms nKeySyms firstKeyAction totalActions nKeyActions firstKeyBehavior nKeyBehaviors totalKeyBehaviors firstKeyExplicit nKeyExplicit totalKeyExplicit firstModMapKey nModMapKeys totalModMapKeys firstVModMapKey nVModMapKeys totalVModMapKeys pad~2 virtualMods map) + (2 compatmap-type compatDeviceID compatmap-sequence compatmap-length groupsRtrn pad~7 firstSIRtrn nSIRtrn nTotalSI pad~8 si-rtrn~ group-rtrn~) + (16 indicatormap-type indicatorDeviceID indicatormap-sequence indicatormap-length which realIndicators nIndicators pad~9 maps~) + (160 keyname-type keyDeviceID keyname-sequence keyname-length which* keyMinKeyCode keyMaxKeyCode nTypes* groupNames virtualMods* firstKey nKeys indicators nRadioGroups nKeyAliases nKTLevels pad~10 valueList) + (64 geometry-type geometryDeviceID geometry-sequence geometry-length name geometryFound pad~12 widthMM heightMM nProperties nColors nShapes nSections nDoodads nKeyAliases* baseColorNdx labelColorNdx labelFont))) + :type xcb:-switch) + (getmap-type :initarg :getmap-type :type xcb:CARD8) + (typeDeviceID :initarg :typeDeviceID :type xcb:CARD8) + (getmap-sequence :initarg :getmap-sequence :type xcb:CARD16) + (getmap-length :initarg :getmap-length :type xcb:CARD32) + (pad~1 :initform 2 :type xcb:-pad) + (typeMinKeyCode :initarg :typeMinKeyCode :type xcb:KEYCODE) + (typeMaxKeyCode :initarg :typeMaxKeyCode :type xcb:KEYCODE) + (present :initarg :present :type xcb:CARD16) + (firstType :initarg :firstType :type xcb:CARD8) + (nTypes :initarg :nTypes :type xcb:CARD8) + (totalTypes :initarg :totalTypes :type xcb:CARD8) + (firstKeySym :initarg :firstKeySym :type xcb:KEYCODE) + (totalSyms :initarg :totalSyms :type xcb:CARD16) + (nKeySyms :initarg :nKeySyms :type xcb:CARD8) + (firstKeyAction :initarg :firstKeyAction :type xcb:KEYCODE) + (totalActions :initarg :totalActions :type xcb:CARD16) + (nKeyActions :initarg :nKeyActions :type xcb:CARD8) + (firstKeyBehavior :initarg :firstKeyBehavior :type xcb:KEYCODE) + (nKeyBehaviors :initarg :nKeyBehaviors :type xcb:CARD8) + (totalKeyBehaviors :initarg :totalKeyBehaviors :type xcb:CARD8) + (firstKeyExplicit :initarg :firstKeyExplicit :type xcb:KEYCODE) + (nKeyExplicit :initarg :nKeyExplicit :type xcb:CARD8) + (totalKeyExplicit :initarg :totalKeyExplicit :type xcb:CARD8) + (firstModMapKey :initarg :firstModMapKey :type xcb:KEYCODE) + (nModMapKeys :initarg :nModMapKeys :type xcb:CARD8) + (totalModMapKeys :initarg :totalModMapKeys :type xcb:CARD8) + (firstVModMapKey :initarg :firstVModMapKey :type xcb:KEYCODE) + (nVModMapKeys :initarg :nVModMapKeys :type xcb:CARD8) + (totalVModMapKeys :initarg :totalVModMapKeys :type xcb:CARD8) + (pad~2 :initform 1 :type xcb:-pad) + (virtualMods :initarg :virtualMods :type xcb:CARD16) + (map :initform + '(expression + (xcb:-fieldref 'present) + cases + ((1 types-rtrn~) + (2 syms-rtrn~) + (16 acts-rtrn-count~ pad~3 acts-rtrn-acts~) + (32 behaviors-rtrn~) + (64 vmods-rtrn~ pad~4) + (8 explicit-rtrn~ pad~5) + (4 modmap-rtrn~ pad~6) + (128 vmodmap-rtrn~))) + :type xcb:-switch) + (types-rtrn~ :initform + '(name types-rtrn type xcb:xkb:KeyType size + (xcb:-fieldref 'nTypes)) + :type xcb:-list) + (types-rtrn :initarg :types-rtrn :type xcb:-ignore) + (syms-rtrn~ :initform + '(name syms-rtrn type xcb:xkb:KeySymMap size + (xcb:-fieldref 'nKeySyms)) + :type xcb:-list) + (syms-rtrn :initarg :syms-rtrn :type xcb:-ignore) + (acts-rtrn-count~ :initform + '(name acts-rtrn-count type xcb:CARD8 size + (xcb:-fieldref 'nKeyActions)) + :type xcb:-list) + (acts-rtrn-count :initarg :acts-rtrn-count :type xcb:-ignore) + (pad~3 :initform 4 :type xcb:-pad-align) + (acts-rtrn-acts~ :initform + '(name acts-rtrn-acts type xcb:xkb:Action size + (xcb:-fieldref 'totalActions)) + :type xcb:-list) + (acts-rtrn-acts :initarg :acts-rtrn-acts :type xcb:-ignore) + (behaviors-rtrn~ :initform + '(name behaviors-rtrn type xcb:xkb:SetBehavior size + (xcb:-fieldref 'totalKeyBehaviors)) + :type xcb:-list) + (behaviors-rtrn :initarg :behaviors-rtrn :type xcb:-ignore) + (vmods-rtrn~ :initform + '(name vmods-rtrn type xcb:CARD8 size + (xcb:-popcount + (xcb:-fieldref 'virtualMods))) + :type xcb:-list) + (vmods-rtrn :initarg :vmods-rtrn :type xcb:-ignore) + (pad~4 :initform 4 :type xcb:-pad-align) + (explicit-rtrn~ :initform + '(name explicit-rtrn type xcb:xkb:SetExplicit size + (xcb:-fieldref 'totalKeyExplicit)) + :type xcb:-list) + (explicit-rtrn :initarg :explicit-rtrn :type xcb:-ignore) + (pad~5 :initform 4 :type xcb:-pad-align) + (modmap-rtrn~ :initform + '(name modmap-rtrn type xcb:xkb:KeyModMap size + (xcb:-fieldref 'totalModMapKeys)) + :type xcb:-list) + (modmap-rtrn :initarg :modmap-rtrn :type xcb:-ignore) + (pad~6 :initform 4 :type xcb:-pad-align) + (vmodmap-rtrn~ :initform + '(name vmodmap-rtrn type xcb:xkb:KeyVModMap size + (xcb:-fieldref 'totalVModMapKeys)) + :type xcb:-list) + (vmodmap-rtrn :initarg :vmodmap-rtrn :type xcb:-ignore) + (compatmap-type :initarg :compatmap-type :type xcb:CARD8) + (compatDeviceID :initarg :compatDeviceID :type xcb:CARD8) + (compatmap-sequence :initarg :compatmap-sequence :type xcb:CARD16) + (compatmap-length :initarg :compatmap-length :type xcb:CARD32) + (groupsRtrn :initarg :groupsRtrn :type xcb:CARD8) + (pad~7 :initform 1 :type xcb:-pad) + (firstSIRtrn :initarg :firstSIRtrn :type xcb:CARD16) + (nSIRtrn :initarg :nSIRtrn :type xcb:CARD16) + (nTotalSI :initarg :nTotalSI :type xcb:CARD16) + (pad~8 :initform 16 :type xcb:-pad) + (si-rtrn~ :initform + '(name si-rtrn type xcb:xkb:SymInterpret size + (xcb:-fieldref 'nSIRtrn)) + :type xcb:-list) + (si-rtrn :initarg :si-rtrn :type xcb:-ignore) + (group-rtrn~ :initform + '(name group-rtrn type xcb:xkb:ModDef size + (xcb:-popcount + (xcb:-fieldref 'groupsRtrn))) + :type xcb:-list) + (group-rtrn :initarg :group-rtrn :type xcb:-ignore) + (indicatormap-type :initarg :indicatormap-type :type xcb:CARD8) + (indicatorDeviceID :initarg :indicatorDeviceID :type xcb:CARD8) + (indicatormap-sequence :initarg :indicatormap-sequence :type xcb:CARD16) + (indicatormap-length :initarg :indicatormap-length :type xcb:CARD32) + (which :initarg :which :type xcb:CARD32) + (realIndicators :initarg :realIndicators :type xcb:CARD32) + (nIndicators :initarg :nIndicators :type xcb:CARD8) + (pad~9 :initform 15 :type xcb:-pad) + (maps~ :initform + '(name maps type xcb:xkb:IndicatorMap size + (xcb:-fieldref 'nIndicators)) + :type xcb:-list) + (maps :initarg :maps :type xcb:-ignore) + (keyname-type :initarg :keyname-type :type xcb:CARD8) + (keyDeviceID :initarg :keyDeviceID :type xcb:CARD8) + (keyname-sequence :initarg :keyname-sequence :type xcb:CARD16) + (keyname-length :initarg :keyname-length :type xcb:CARD32) + (which* :initarg :which* :type xcb:CARD32) + (keyMinKeyCode :initarg :keyMinKeyCode :type xcb:KEYCODE) + (keyMaxKeyCode :initarg :keyMaxKeyCode :type xcb:KEYCODE) + (nTypes* :initarg :nTypes* :type xcb:CARD8) + (groupNames :initarg :groupNames :type xcb:CARD8) + (virtualMods* :initarg :virtualMods* :type xcb:CARD16) + (firstKey :initarg :firstKey :type xcb:KEYCODE) + (nKeys :initarg :nKeys :type xcb:CARD8) + (indicators :initarg :indicators :type xcb:CARD32) + (nRadioGroups :initarg :nRadioGroups :type xcb:CARD8) + (nKeyAliases :initarg :nKeyAliases :type xcb:CARD8) + (nKTLevels :initarg :nKTLevels :type xcb:CARD16) + (pad~10 :initform 4 :type xcb:-pad) + (valueList :initform + '(expression + (xcb:-fieldref 'which) + cases + ((1 keycodesName) + (2 geometryName) + (4 symbolsName) + (8 physSymbolsName) + (16 typesName) + (32 compatName) + (64 typeNames~) + (128 nLevelsPerType~ pad~11 ktLevelNames~) + (256 indicatorNames~) + (2048 virtualModNames~) + (4096 groups~) + (512 keyNames~) + (1024 keyAliases~) + (8192 radioGroupNames~))) + :type xcb:-switch) + (keycodesName :initarg :keycodesName :type xcb:ATOM) + (geometryName :initarg :geometryName :type xcb:ATOM) + (symbolsName :initarg :symbolsName :type xcb:ATOM) + (physSymbolsName :initarg :physSymbolsName :type xcb:ATOM) + (typesName :initarg :typesName :type xcb:ATOM) + (compatName :initarg :compatName :type xcb:ATOM) + (typeNames~ :initform + '(name typeNames type xcb:ATOM size + (xcb:-fieldref 'nTypes)) + :type xcb:-list) + (typeNames :initarg :typeNames :type xcb:-ignore) + (nLevelsPerType~ :initform + '(name nLevelsPerType type xcb:CARD8 size + (xcb:-fieldref 'nTypes)) + :type xcb:-list) + (nLevelsPerType :initarg :nLevelsPerType :type xcb:-ignore) + (pad~11 :initform 4 :type xcb:-pad-align) + (ktLevelNames~ :initform + '(name ktLevelNames type xcb:ATOM size + (apply #'+ + (slot-value obj 'nLevelsPerType))) + :type xcb:-list) + (ktLevelNames :initarg :ktLevelNames :type xcb:-ignore) + (indicatorNames~ :initform + '(name indicatorNames type xcb:ATOM size + (xcb:-popcount + (xcb:-fieldref 'indicators))) + :type xcb:-list) + (indicatorNames :initarg :indicatorNames :type xcb:-ignore) + (virtualModNames~ :initform + '(name virtualModNames type xcb:ATOM size + (xcb:-popcount + (xcb:-fieldref 'virtualMods))) + :type xcb:-list) + (virtualModNames :initarg :virtualModNames :type xcb:-ignore) + (groups~ :initform + '(name groups type xcb:ATOM size + (xcb:-popcount + (xcb:-fieldref 'groupNames))) + :type xcb:-list) + (groups :initarg :groups :type xcb:-ignore) + (keyNames~ :initform + '(name keyNames type xcb:xkb:KeyName size + (xcb:-fieldref 'nKeys)) + :type xcb:-list) + (keyNames :initarg :keyNames :type xcb:-ignore) + (keyAliases~ :initform + '(name keyAliases type xcb:xkb:KeyAlias size + (xcb:-fieldref 'nKeyAliases)) + :type xcb:-list) + (keyAliases :initarg :keyAliases :type xcb:-ignore) + (radioGroupNames~ :initform + '(name radioGroupNames type xcb:ATOM size + (xcb:-fieldref 'nRadioGroups)) + :type xcb:-list) + (radioGroupNames :initarg :radioGroupNames :type xcb:-ignore) + (geometry-type :initarg :geometry-type :type xcb:CARD8) + (geometryDeviceID :initarg :geometryDeviceID :type xcb:CARD8) + (geometry-sequence :initarg :geometry-sequence :type xcb:CARD16) + (geometry-length :initarg :geometry-length :type xcb:CARD32) + (name :initarg :name :type xcb:ATOM) + (geometryFound :initarg :geometryFound :type xcb:BOOL) + (pad~12 :initform 1 :type xcb:-pad) + (widthMM :initarg :widthMM :type xcb:CARD16) + (heightMM :initarg :heightMM :type xcb:CARD16) + (nProperties :initarg :nProperties :type xcb:CARD16) + (nColors :initarg :nColors :type xcb:CARD16) + (nShapes :initarg :nShapes :type xcb:CARD16) + (nSections :initarg :nSections :type xcb:CARD16) + (nDoodads :initarg :nDoodads :type xcb:CARD16) + (nKeyAliases* :initarg :nKeyAliases* :type xcb:CARD16) + (baseColorNdx :initarg :baseColorNdx :type xcb:CARD8) + (labelColorNdx :initarg :labelColorNdx :type xcb:CARD8) + (labelFont :initarg :labelFont :type xcb:xkb:CountedString16))) +(eval-and-compile + (when + (< emacs-major-version 25) + (fset 'defclass + (symbol-function 'xcb:-defclass)))) + +(defclass xcb:xkb:GetDeviceInfo + (xcb:-request) + ((~opcode :initform 24 :type xcb:-u1) + (deviceSpec :initarg :deviceSpec :type xcb:xkb:DeviceSpec) + (wanted :initarg :wanted :type xcb:CARD16) + (allButtons :initarg :allButtons :type xcb:BOOL) + (firstButton :initarg :firstButton :type xcb:CARD8) + (nButtons :initarg :nButtons :type xcb:CARD8) + (pad~0 :initform 1 :type xcb:-pad) + (ledClass :initarg :ledClass :type xcb:xkb:LedClassSpec) + (ledID :initarg :ledID :type xcb:xkb:IDSpec))) +(defclass xcb:xkb:GetDeviceInfo~reply + (xcb:-reply) + ((deviceID :initarg :deviceID :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (present :initarg :present :type xcb:CARD16) + (supported :initarg :supported :type xcb:CARD16) + (unsupported :initarg :unsupported :type xcb:CARD16) + (nDeviceLedFBs :initarg :nDeviceLedFBs :type xcb:CARD16) + (firstBtnWanted :initarg :firstBtnWanted :type xcb:CARD8) + (nBtnsWanted :initarg :nBtnsWanted :type xcb:CARD8) + (firstBtnRtrn :initarg :firstBtnRtrn :type xcb:CARD8) + (nBtnsRtrn :initarg :nBtnsRtrn :type xcb:CARD8) + (totalBtns :initarg :totalBtns :type xcb:CARD8) + (hasOwnState :initarg :hasOwnState :type xcb:BOOL) + (dfltKbdFB :initarg :dfltKbdFB :type xcb:CARD16) + (dfltLedFB :initarg :dfltLedFB :type xcb:CARD16) + (pad~0 :initform 2 :type xcb:-pad) + (devType :initarg :devType :type xcb:ATOM) + (nameLen :initarg :nameLen :type xcb:CARD16) + (name~ :initform + '(name name type xcb:xkb:STRING8 size + (xcb:-fieldref 'nameLen)) + :type xcb:-list) + (name :initarg :name :type xcb:-ignore) + (pad~1 :initform 4 :type xcb:-pad-align) + (btnActions~ :initform + '(name btnActions type xcb:xkb:Action size + (xcb:-fieldref 'nBtnsRtrn)) + :type xcb:-list) + (btnActions :initarg :btnActions :type xcb:-ignore) + (leds~ :initform + '(name leds type xcb:xkb:DeviceLedInfo size + (xcb:-fieldref 'nDeviceLedFBs)) + :type xcb:-list) + (leds :initarg :leds :type xcb:-ignore))) + +(defclass xcb:xkb:SetDeviceInfo + (xcb:-request) + ((~opcode :initform 25 :type xcb:-u1) + (deviceSpec :initarg :deviceSpec :type xcb:xkb:DeviceSpec) + (firstBtn :initarg :firstBtn :type xcb:CARD8) + (nBtns :initarg :nBtns :type xcb:CARD8) + (change :initarg :change :type xcb:CARD16) + (nDeviceLedFBs :initarg :nDeviceLedFBs :type xcb:CARD16) + (btnActions~ :initform + '(name btnActions type xcb:xkb:Action size + (xcb:-fieldref 'nBtns)) + :type xcb:-list) + (btnActions :initarg :btnActions :type xcb:-ignore) + (leds~ :initform + '(name leds type xcb:xkb:DeviceLedInfo size + (xcb:-fieldref 'nDeviceLedFBs)) + :type xcb:-list) + (leds :initarg :leds :type xcb:-ignore))) + +(defclass xcb:xkb:SetDebuggingFlags + (xcb:-request) + ((~opcode :initform 101 :type xcb:-u1) + (msgLength :initarg :msgLength :type xcb:CARD16) + (pad~0 :initform 2 :type xcb:-pad) + (affectFlags :initarg :affectFlags :type xcb:CARD32) + (flags :initarg :flags :type xcb:CARD32) + (affectCtrls :initarg :affectCtrls :type xcb:CARD32) + (ctrls :initarg :ctrls :type xcb:CARD32) + (message~ :initform + '(name message type xcb:xkb:STRING8 size + (xcb:-fieldref 'msgLength)) + :type xcb:-list) + (message :initarg :message :type xcb:-ignore))) +(defclass xcb:xkb:SetDebuggingFlags~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (currentFlags :initarg :currentFlags :type xcb:CARD32) + (currentCtrls :initarg :currentCtrls :type xcb:CARD32) + (supportedFlags :initarg :supportedFlags :type xcb:CARD32) + (supportedCtrls :initarg :supportedCtrls :type xcb:CARD32) + (pad~1 :initform 8 :type xcb:-pad))) + +(defclass xcb:xkb:NewKeyboardNotify + (xcb:-event) + ((~code :initform 0) + (xkbType :initarg :xkbType :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (time :initarg :time :type xcb:TIMESTAMP) + (deviceID :initarg :deviceID :type xcb:CARD8) + (oldDeviceID :initarg :oldDeviceID :type xcb:CARD8) + (minKeyCode :initarg :minKeyCode :type xcb:KEYCODE) + (maxKeyCode :initarg :maxKeyCode :type xcb:KEYCODE) + (oldMinKeyCode :initarg :oldMinKeyCode :type xcb:KEYCODE) + (oldMaxKeyCode :initarg :oldMaxKeyCode :type xcb:KEYCODE) + (requestMajor :initarg :requestMajor :type xcb:CARD8) + (requestMinor :initarg :requestMinor :type xcb:CARD8) + (changed :initarg :changed :type xcb:CARD16) + (pad~0 :initform 14 :type xcb:-pad))) + +(defclass xcb:xkb:MapNotify + (xcb:-event) + ((~code :initform 1) + (xkbType :initarg :xkbType :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (time :initarg :time :type xcb:TIMESTAMP) + (deviceID :initarg :deviceID :type xcb:CARD8) + (ptrBtnActions :initarg :ptrBtnActions :type xcb:CARD8) + (changed :initarg :changed :type xcb:CARD16) + (minKeyCode :initarg :minKeyCode :type xcb:KEYCODE) + (maxKeyCode :initarg :maxKeyCode :type xcb:KEYCODE) + (firstType :initarg :firstType :type xcb:CARD8) + (nTypes :initarg :nTypes :type xcb:CARD8) + (firstKeySym :initarg :firstKeySym :type xcb:KEYCODE) + (nKeySyms :initarg :nKeySyms :type xcb:CARD8) + (firstKeyAct :initarg :firstKeyAct :type xcb:KEYCODE) + (nKeyActs :initarg :nKeyActs :type xcb:CARD8) + (firstKeyBehavior :initarg :firstKeyBehavior :type xcb:KEYCODE) + (nKeyBehavior :initarg :nKeyBehavior :type xcb:CARD8) + (firstKeyExplicit :initarg :firstKeyExplicit :type xcb:KEYCODE) + (nKeyExplicit :initarg :nKeyExplicit :type xcb:CARD8) + (firstModMapKey :initarg :firstModMapKey :type xcb:KEYCODE) + (nModMapKeys :initarg :nModMapKeys :type xcb:CARD8) + (firstVModMapKey :initarg :firstVModMapKey :type xcb:KEYCODE) + (nVModMapKeys :initarg :nVModMapKeys :type xcb:CARD8) + (virtualMods :initarg :virtualMods :type xcb:CARD16) + (pad~0 :initform 2 :type xcb:-pad))) + +(defclass xcb:xkb:StateNotify + (xcb:-event) + ((~code :initform 2) + (xkbType :initarg :xkbType :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (time :initarg :time :type xcb:TIMESTAMP) + (deviceID :initarg :deviceID :type xcb:CARD8) + (mods :initarg :mods :type xcb:CARD8) + (baseMods :initarg :baseMods :type xcb:CARD8) + (latchedMods :initarg :latchedMods :type xcb:CARD8) + (lockedMods :initarg :lockedMods :type xcb:CARD8) + (group :initarg :group :type xcb:CARD8) + (baseGroup :initarg :baseGroup :type xcb:INT16) + (latchedGroup :initarg :latchedGroup :type xcb:INT16) + (lockedGroup :initarg :lockedGroup :type xcb:CARD8) + (compatState :initarg :compatState :type xcb:CARD8) + (grabMods :initarg :grabMods :type xcb:CARD8) + (compatGrabMods :initarg :compatGrabMods :type xcb:CARD8) + (lookupMods :initarg :lookupMods :type xcb:CARD8) + (compatLoockupMods :initarg :compatLoockupMods :type xcb:CARD8) + (ptrBtnState :initarg :ptrBtnState :type xcb:CARD16) + (changed :initarg :changed :type xcb:CARD16) + (keycode :initarg :keycode :type xcb:KEYCODE) + (eventType :initarg :eventType :type xcb:CARD8) + (requestMajor :initarg :requestMajor :type xcb:CARD8) + (requestMinor :initarg :requestMinor :type xcb:CARD8))) + +(defclass xcb:xkb:ControlsNotify + (xcb:-event) + ((~code :initform 3) + (xkbType :initarg :xkbType :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (time :initarg :time :type xcb:TIMESTAMP) + (deviceID :initarg :deviceID :type xcb:CARD8) + (numGroups :initarg :numGroups :type xcb:CARD8) + (pad~0 :initform 2 :type xcb:-pad) + (changedControls :initarg :changedControls :type xcb:CARD32) + (enabledControls :initarg :enabledControls :type xcb:CARD32) + (enabledControlChanges :initarg :enabledControlChanges :type xcb:CARD32) + (keycode :initarg :keycode :type xcb:KEYCODE) + (eventType :initarg :eventType :type xcb:CARD8) + (requestMajor :initarg :requestMajor :type xcb:CARD8) + (requestMinor :initarg :requestMinor :type xcb:CARD8) + (pad~1 :initform 4 :type xcb:-pad))) + +(defclass xcb:xkb:IndicatorStateNotify + (xcb:-event) + ((~code :initform 4) + (xkbType :initarg :xkbType :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (time :initarg :time :type xcb:TIMESTAMP) + (deviceID :initarg :deviceID :type xcb:CARD8) + (pad~0 :initform 3 :type xcb:-pad) + (state :initarg :state :type xcb:CARD32) + (stateChanged :initarg :stateChanged :type xcb:CARD32) + (pad~1 :initform 12 :type xcb:-pad))) + +(defclass xcb:xkb:IndicatorMapNotify + (xcb:-event) + ((~code :initform 5) + (xkbType :initarg :xkbType :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (time :initarg :time :type xcb:TIMESTAMP) + (deviceID :initarg :deviceID :type xcb:CARD8) + (pad~0 :initform 3 :type xcb:-pad) + (state :initarg :state :type xcb:CARD32) + (mapChanged :initarg :mapChanged :type xcb:CARD32) + (pad~1 :initform 12 :type xcb:-pad))) + +(defclass xcb:xkb:NamesNotify + (xcb:-event) + ((~code :initform 6) + (xkbType :initarg :xkbType :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (time :initarg :time :type xcb:TIMESTAMP) + (deviceID :initarg :deviceID :type xcb:CARD8) + (pad~0 :initform 1 :type xcb:-pad) + (changed :initarg :changed :type xcb:CARD16) + (firstType :initarg :firstType :type xcb:CARD8) + (nTypes :initarg :nTypes :type xcb:CARD8) + (firstLevelName :initarg :firstLevelName :type xcb:CARD8) + (nLevelNames :initarg :nLevelNames :type xcb:CARD8) + (pad~1 :initform 1 :type xcb:-pad) + (nRadioGroups :initarg :nRadioGroups :type xcb:CARD8) + (nKeyAliases :initarg :nKeyAliases :type xcb:CARD8) + (changedGroupNames :initarg :changedGroupNames :type xcb:CARD8) + (changedVirtualMods :initarg :changedVirtualMods :type xcb:CARD16) + (firstKey :initarg :firstKey :type xcb:KEYCODE) + (nKeys :initarg :nKeys :type xcb:CARD8) + (changedIndicators :initarg :changedIndicators :type xcb:CARD32) + (pad~2 :initform 4 :type xcb:-pad))) + +(defclass xcb:xkb:CompatMapNotify + (xcb:-event) + ((~code :initform 7) + (xkbType :initarg :xkbType :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (time :initarg :time :type xcb:TIMESTAMP) + (deviceID :initarg :deviceID :type xcb:CARD8) + (changedGroups :initarg :changedGroups :type xcb:CARD8) + (firstSI :initarg :firstSI :type xcb:CARD16) + (nSI :initarg :nSI :type xcb:CARD16) + (nTotalSI :initarg :nTotalSI :type xcb:CARD16) + (pad~0 :initform 16 :type xcb:-pad))) + +(defclass xcb:xkb:BellNotify + (xcb:-event) + ((~code :initform 8) + (xkbType :initarg :xkbType :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (time :initarg :time :type xcb:TIMESTAMP) + (deviceID :initarg :deviceID :type xcb:CARD8) + (bellClass :initarg :bellClass :type xcb:CARD8) + (bellID :initarg :bellID :type xcb:CARD8) + (percent :initarg :percent :type xcb:CARD8) + (pitch :initarg :pitch :type xcb:CARD16) + (duration :initarg :duration :type xcb:CARD16) + (name :initarg :name :type xcb:ATOM) + (window :initarg :window :type xcb:WINDOW) + (eventOnly :initarg :eventOnly :type xcb:BOOL) + (pad~0 :initform 7 :type xcb:-pad))) + +(defclass xcb:xkb:ActionMessage + (xcb:-event) + ((~code :initform 9) + (xkbType :initarg :xkbType :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (time :initarg :time :type xcb:TIMESTAMP) + (deviceID :initarg :deviceID :type xcb:CARD8) + (keycode :initarg :keycode :type xcb:KEYCODE) + (press :initarg :press :type xcb:BOOL) + (keyEventFollows :initarg :keyEventFollows :type xcb:BOOL) + (mods :initarg :mods :type xcb:CARD8) + (group :initarg :group :type xcb:CARD8) + (message~ :initform + '(name message type xcb:xkb:STRING8 size 8) + :type xcb:-list) + (message :initarg :message :type xcb:-ignore) + (pad~0 :initform 10 :type xcb:-pad))) + +(defclass xcb:xkb:AccessXNotify + (xcb:-event) + ((~code :initform 10) + (xkbType :initarg :xkbType :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (time :initarg :time :type xcb:TIMESTAMP) + (deviceID :initarg :deviceID :type xcb:CARD8) + (keycode :initarg :keycode :type xcb:KEYCODE) + (detailt :initarg :detailt :type xcb:CARD16) + (slowKeysDelay :initarg :slowKeysDelay :type xcb:CARD16) + (debounceDelay :initarg :debounceDelay :type xcb:CARD16) + (pad~0 :initform 16 :type xcb:-pad))) + +(defclass xcb:xkb:ExtensionDeviceNotify + (xcb:-event) + ((~code :initform 11) + (xkbType :initarg :xkbType :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (time :initarg :time :type xcb:TIMESTAMP) + (deviceID :initarg :deviceID :type xcb:CARD8) + (pad~0 :initform 1 :type xcb:-pad) + (reason :initarg :reason :type xcb:CARD16) + (ledClass :initarg :ledClass :type xcb:CARD16) + (ledID :initarg :ledID :type xcb:CARD16) + (ledsDefined :initarg :ledsDefined :type xcb:CARD32) + (ledState :initarg :ledState :type xcb:CARD32) + (firstButton :initarg :firstButton :type xcb:CARD8) + (nButtons :initarg :nButtons :type xcb:CARD8) + (supported :initarg :supported :type xcb:CARD16) + (unsupported :initarg :unsupported :type xcb:CARD16) + (pad~1 :initform 2 :type xcb:-pad))) + +(defconst xcb:xkb:error-number-class-alist + '((0 . xcb:xkb:Keyboard)) + "(error-number . error-class) alist.") + +(defconst xcb:xkb:event-number-class-alist + '((0 . xcb:xkb:NewKeyboardNotify) + (1 . xcb:xkb:MapNotify) + (2 . xcb:xkb:StateNotify) + (3 . xcb:xkb:ControlsNotify) + (4 . xcb:xkb:IndicatorStateNotify) + (5 . xcb:xkb:IndicatorMapNotify) + (6 . xcb:xkb:NamesNotify) + (7 . xcb:xkb:CompatMapNotify) + (8 . xcb:xkb:BellNotify) + (9 . xcb:xkb:ActionMessage) + (10 . xcb:xkb:AccessXNotify) + (11 . xcb:xkb:ExtensionDeviceNotify)) + "(event-number . event-class) alist.") + + + +(provide 'xcb-xkb) + +;;; xcb-xkb.el ends here diff --git a/elpa/xelb-0.18/xcb-xlib.el b/elpa/xelb-0.18/xcb-xlib.el new file mode 100644 index 0000000..c7b82bc --- /dev/null +++ b/elpa/xelb-0.18/xcb-xlib.el @@ -0,0 +1,112 @@ +;;; xcb-xlib.el --- Port of Xlib -*- lexical-binding: t -*- + +;; Copyright (C) 2015-2019 Free Software Foundation, Inc. + +;; Author: Chris Feng + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This file currently only contains constants from 'Xlib.h' + +;;; Code: + +(defconst xlib:XNRequiredCharSet "requiredCharSet") +(defconst xlib:XNQueryOrientation "queryOrientation") +(defconst xlib:XNBaseFontName "baseFontName") +(defconst xlib:XNOMAutomatic "omAutomatic") +(defconst xlib:XNMissingCharSet "missingCharSet") +(defconst xlib:XNDefaultString "defaultString") +(defconst xlib:XNOrientation "orientation") +(defconst xlib:XNDirectionalDependentDrawing "directionalDependentDrawing") +(defconst xlib:XNContextualDrawing "contextualDrawing") +(defconst xlib:XNFontInfo "fontInfo") + +(defconst xlib:XNVaNestedList "XNVaNestedList") +(defconst xlib:XNQueryInputStyle "queryInputStyle") +(defconst xlib:XNClientWindow "clientWindow") +(defconst xlib:XNInputStyle "inputStyle") +(defconst xlib:XNFocusWindow "focusWindow") +(defconst xlib:XNResourceName "resourceName") +(defconst xlib:XNResourceClass "resourceClass") +(defconst xlib:XNGeometryCallback "geometryCallback") +(defconst xlib:XNDestroyCallback "destroyCallback") +(defconst xlib:XNFilterEvents "filterEvents") +(defconst xlib:XNPreeditStartCallback "preeditStartCallback") +(defconst xlib:XNPreeditDoneCallback "preeditDoneCallback") +(defconst xlib:XNPreeditDrawCallback "preeditDrawCallback") +(defconst xlib:XNPreeditCaretCallback "preeditCaretCallback") +(defconst xlib:XNPreeditStateNotifyCallback "preeditStateNotifyCallback") +(defconst xlib:XNPreeditAttributes "preeditAttributes") +(defconst xlib:XNStatusStartCallback "statusStartCallback") +(defconst xlib:XNStatusDoneCallback "statusDoneCallback") +(defconst xlib:XNStatusDrawCallback "statusDrawCallback") +(defconst xlib:XNStatusAttributes "statusAttributes") +(defconst xlib:XNArea "area") +(defconst xlib:XNAreaNeeded "areaNeeded") +(defconst xlib:XNSpotLocation "spotLocation") +(defconst xlib:XNColormap "colorMap") +(defconst xlib:XNStdColormap "stdColorMap") +(defconst xlib:XNForeground "foreground") +(defconst xlib:XNBackground "background") +(defconst xlib:XNBackgroundPixmap "backgroundPixmap") +(defconst xlib:XNFontSet "fontSet") +(defconst xlib:XNLineSpace "lineSpace") +(defconst xlib:XNCursor "cursor") +(defconst xlib:XNQueryIMValuesList "queryIMValuesList") +(defconst xlib:XNQueryICValuesList "queryICValuesList") +(defconst xlib:XNVisiblePosition "visiblePosition") +(defconst xlib:XNR6PreeditCallback "r6PreeditCallback") +(defconst xlib:XNStringConversionCallback "stringConversionCallback") +(defconst xlib:XNStringConversion "stringConversion") +(defconst xlib:XNResetState "resetState") +(defconst xlib:XNHotKey "hotKey") +(defconst xlib:XNHotKeyState "hotKeyState") +(defconst xlib:XNPreeditState "preeditState") +(defconst xlib:XNSeparatorofNestedList "separatorofNestedList") + +(defconst xlib:XIMPreeditArea #x0001) +(defconst xlib:XIMPreeditCallbacks #x0002) +(defconst xlib:XIMPreeditPosition #x0004) +(defconst xlib:XIMPreeditNothing #x0008) +(defconst xlib:XIMPreeditNone #x0010) +(defconst xlib:XIMStatusArea #x0100) +(defconst xlib:XIMStatusCallbacks #x0200) +(defconst xlib:XIMStatusNothing #x0400) +(defconst xlib:XIMStatusNone #x0800) + +(defconst xlib:XIMReverse #x001) +(defconst xlib:XIMUnderline #x002) +(defconst xlib:XIMHighlight #x004) +(defconst xlib:XIMPrimary #x010) +(defconst xlib:XIMSecondary #x020) +(defconst xlib:XIMTertiary #x040) +(defconst xlib:XIMVisibleToForward #x080) +(defconst xlib:XIMVisibleToBackword #x100) +(defconst xlib:XIMVisibleToCenter #x200) + +(defconst xlib:XBufferOverflow -1) +(defconst xlib:XLookupNone 1) +(defconst xlib:XLookupChars 2) +(defconst xlib:XLookupKeySym 3) +(defconst xlib:XLookupBoth 4) + + + +(provide 'xcb-xlib) + +;;; xcb-xlib.el ends here diff --git a/elpa/xelb-0.18/xcb-xprint.el b/elpa/xelb-0.18/xcb-xprint.el new file mode 100644 index 0000000..12b4751 --- /dev/null +++ b/elpa/xelb-0.18/xcb-xprint.el @@ -0,0 +1,410 @@ +;;; xcb-xprint.el --- X11 XPrint extension -*- lexical-binding: t -*- + +;; Copyright (C) 2015-2019 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This file was generated by 'el_client.el' from 'xprint.xml', +;; which you can retrieve from . + +;;; Code: + +(require 'xcb-types) + +(defconst xcb:xprint:-extension-xname "XpExtension") +(defconst xcb:xprint:-extension-name "XPrint") +(defconst xcb:xprint:-major-version 1) +(defconst xcb:xprint:-minor-version 0) + +(require 'xcb-xproto) + +(xcb:deftypealias 'xcb:xprint:STRING8 'xcb:char) + +(defclass xcb:xprint:PRINTER + (xcb:-struct) + ((nameLen :initarg :nameLen :type xcb:CARD32) + (name~ :initform + '(name name type xcb:xprint:STRING8 size + (xcb:-fieldref 'nameLen)) + :type xcb:-list) + (name :initarg :name :type xcb:-ignore) + (pad~0 :initform 4 :type xcb:-pad-align) + (descLen :initarg :descLen :type xcb:CARD32) + (description~ :initform + '(name description type xcb:xprint:STRING8 size + (xcb:-fieldref 'descLen)) + :type xcb:-list) + (description :initarg :description :type xcb:-ignore) + (pad~1 :initform 4 :type xcb:-pad-align))) + +(xcb:deftypealias 'xcb:xprint:PCONTEXT 'xcb:-u4) + +(defconst xcb:xprint:GetDoc:Finished 0) +(defconst xcb:xprint:GetDoc:SecondConsumer 1) + +(defconst xcb:xprint:EvMask:NoEventMask 0) +(defconst xcb:xprint:EvMask:PrintMask 1) +(defconst xcb:xprint:EvMask:AttributeMask 2) + +(defconst xcb:xprint:Detail:StartJobNotify 1) +(defconst xcb:xprint:Detail:EndJobNotify 2) +(defconst xcb:xprint:Detail:StartDocNotify 3) +(defconst xcb:xprint:Detail:EndDocNotify 4) +(defconst xcb:xprint:Detail:StartPageNotify 5) +(defconst xcb:xprint:Detail:EndPageNotify 6) + +(defconst xcb:xprint:Attr:JobAttr 1) +(defconst xcb:xprint:Attr:DocAttr 2) +(defconst xcb:xprint:Attr:PageAttr 3) +(defconst xcb:xprint:Attr:PrinterAttr 4) +(defconst xcb:xprint:Attr:ServerAttr 5) +(defconst xcb:xprint:Attr:MediumAttr 6) +(defconst xcb:xprint:Attr:SpoolerAttr 7) + +(defclass xcb:xprint:PrintQueryVersion + (xcb:-request) + ((~opcode :initform 0 :type xcb:-u1))) +(defclass xcb:xprint:PrintQueryVersion~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (major-version :initarg :major-version :type xcb:CARD16) + (minor-version :initarg :minor-version :type xcb:CARD16))) + +(defclass xcb:xprint:PrintGetPrinterList + (xcb:-request) + ((~opcode :initform 1 :type xcb:-u1) + (printerNameLen :initarg :printerNameLen :type xcb:CARD32) + (localeLen :initarg :localeLen :type xcb:CARD32) + (printer-name~ :initform + '(name printer-name type xcb:xprint:STRING8 size + (xcb:-fieldref 'printerNameLen)) + :type xcb:-list) + (printer-name :initarg :printer-name :type xcb:-ignore) + (locale~ :initform + '(name locale type xcb:xprint:STRING8 size + (xcb:-fieldref 'localeLen)) + :type xcb:-list) + (locale :initarg :locale :type xcb:-ignore))) +(defclass xcb:xprint:PrintGetPrinterList~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (listCount :initarg :listCount :type xcb:CARD32) + (pad~1 :initform 20 :type xcb:-pad) + (printers~ :initform + '(name printers type xcb:xprint:PRINTER size + (xcb:-fieldref 'listCount)) + :type xcb:-list) + (printers :initarg :printers :type xcb:-ignore))) + +(defclass xcb:xprint:PrintRehashPrinterList + (xcb:-request) + ((~opcode :initform 20 :type xcb:-u1))) + +(defclass xcb:xprint:CreateContext + (xcb:-request) + ((~opcode :initform 2 :type xcb:-u1) + (context-id :initarg :context-id :type xcb:CARD32) + (printerNameLen :initarg :printerNameLen :type xcb:CARD32) + (localeLen :initarg :localeLen :type xcb:CARD32) + (printerName~ :initform + '(name printerName type xcb:xprint:STRING8 size + (xcb:-fieldref 'printerNameLen)) + :type xcb:-list) + (printerName :initarg :printerName :type xcb:-ignore) + (locale~ :initform + '(name locale type xcb:xprint:STRING8 size + (xcb:-fieldref 'localeLen)) + :type xcb:-list) + (locale :initarg :locale :type xcb:-ignore))) + +(defclass xcb:xprint:PrintSetContext + (xcb:-request) + ((~opcode :initform 3 :type xcb:-u1) + (context :initarg :context :type xcb:CARD32))) + +(defclass xcb:xprint:PrintGetContext + (xcb:-request) + ((~opcode :initform 4 :type xcb:-u1))) +(defclass xcb:xprint:PrintGetContext~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (context :initarg :context :type xcb:CARD32))) + +(defclass xcb:xprint:PrintDestroyContext + (xcb:-request) + ((~opcode :initform 5 :type xcb:-u1) + (context :initarg :context :type xcb:CARD32))) + +(defclass xcb:xprint:PrintGetScreenOfContext + (xcb:-request) + ((~opcode :initform 6 :type xcb:-u1))) +(defclass xcb:xprint:PrintGetScreenOfContext~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (root :initarg :root :type xcb:WINDOW))) + +(defclass xcb:xprint:PrintStartJob + (xcb:-request) + ((~opcode :initform 7 :type xcb:-u1) + (output-mode :initarg :output-mode :type xcb:CARD8))) + +(defclass xcb:xprint:PrintEndJob + (xcb:-request) + ((~opcode :initform 8 :type xcb:-u1) + (cancel :initarg :cancel :type xcb:BOOL))) + +(defclass xcb:xprint:PrintStartDoc + (xcb:-request) + ((~opcode :initform 9 :type xcb:-u1) + (driver-mode :initarg :driver-mode :type xcb:CARD8))) + +(defclass xcb:xprint:PrintEndDoc + (xcb:-request) + ((~opcode :initform 10 :type xcb:-u1) + (cancel :initarg :cancel :type xcb:BOOL))) + +(defclass xcb:xprint:PrintPutDocumentData + (xcb:-request) + ((~opcode :initform 11 :type xcb:-u1) + (drawable :initarg :drawable :type xcb:DRAWABLE) + (len-data :initarg :len-data :type xcb:CARD32) + (len-fmt :initarg :len-fmt :type xcb:CARD16) + (len-options :initarg :len-options :type xcb:CARD16) + (data~ :initform + '(name data type xcb:BYTE size + (xcb:-fieldref 'len-data)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore) + (doc-format~ :initform + '(name doc-format type xcb:xprint:STRING8 size + (xcb:-fieldref 'len-fmt)) + :type xcb:-list) + (doc-format :initarg :doc-format :type xcb:-ignore) + (options~ :initform + '(name options type xcb:xprint:STRING8 size + (xcb:-fieldref 'len-options)) + :type xcb:-list) + (options :initarg :options :type xcb:-ignore))) + +(defclass xcb:xprint:PrintGetDocumentData + (xcb:-request) + ((~opcode :initform 12 :type xcb:-u1) + (context :initarg :context :type xcb:xprint:PCONTEXT) + (max-bytes :initarg :max-bytes :type xcb:CARD32))) +(defclass xcb:xprint:PrintGetDocumentData~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (status-code :initarg :status-code :type xcb:CARD32) + (finished-flag :initarg :finished-flag :type xcb:CARD32) + (dataLen :initarg :dataLen :type xcb:CARD32) + (pad~1 :initform 12 :type xcb:-pad) + (data~ :initform + '(name data type xcb:BYTE size + (xcb:-fieldref 'dataLen)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:xprint:PrintStartPage + (xcb:-request) + ((~opcode :initform 13 :type xcb:-u1) + (window :initarg :window :type xcb:WINDOW))) + +(defclass xcb:xprint:PrintEndPage + (xcb:-request) + ((~opcode :initform 14 :type xcb:-u1) + (cancel :initarg :cancel :type xcb:BOOL) + (pad~0 :initform 3 :type xcb:-pad))) + +(defclass xcb:xprint:PrintSelectInput + (xcb:-request) + ((~opcode :initform 15 :type xcb:-u1) + (context :initarg :context :type xcb:xprint:PCONTEXT) + (event-mask :initarg :event-mask :type xcb:CARD32))) + +(defclass xcb:xprint:PrintInputSelected + (xcb:-request) + ((~opcode :initform 16 :type xcb:-u1) + (context :initarg :context :type xcb:xprint:PCONTEXT))) +(defclass xcb:xprint:PrintInputSelected~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (event-mask :initarg :event-mask :type xcb:CARD32) + (all-events-mask :initarg :all-events-mask :type xcb:CARD32))) + +(defclass xcb:xprint:PrintGetAttributes + (xcb:-request) + ((~opcode :initform 17 :type xcb:-u1) + (context :initarg :context :type xcb:xprint:PCONTEXT) + (pool :initarg :pool :type xcb:CARD8) + (pad~0 :initform 3 :type xcb:-pad))) +(defclass xcb:xprint:PrintGetAttributes~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (stringLen :initarg :stringLen :type xcb:CARD32) + (pad~1 :initform 20 :type xcb:-pad) + (attributes~ :initform + '(name attributes type xcb:xprint:STRING8 size + (xcb:-fieldref 'stringLen)) + :type xcb:-list) + (attributes :initarg :attributes :type xcb:-ignore))) + +(defclass xcb:xprint:PrintGetOneAttributes + (xcb:-request) + ((~opcode :initform 19 :type xcb:-u1) + (context :initarg :context :type xcb:xprint:PCONTEXT) + (nameLen :initarg :nameLen :type xcb:CARD32) + (pool :initarg :pool :type xcb:CARD8) + (pad~0 :initform 3 :type xcb:-pad) + (name~ :initform + '(name name type xcb:xprint:STRING8 size + (xcb:-fieldref 'nameLen)) + :type xcb:-list) + (name :initarg :name :type xcb:-ignore))) +(defclass xcb:xprint:PrintGetOneAttributes~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (valueLen :initarg :valueLen :type xcb:CARD32) + (pad~1 :initform 20 :type xcb:-pad) + (value~ :initform + '(name value type xcb:xprint:STRING8 size + (xcb:-fieldref 'valueLen)) + :type xcb:-list) + (value :initarg :value :type xcb:-ignore))) + +(defclass xcb:xprint:PrintSetAttributes + (xcb:-request) + ((~opcode :initform 18 :type xcb:-u1) + (context :initarg :context :type xcb:xprint:PCONTEXT) + (stringLen :initarg :stringLen :type xcb:CARD32) + (pool :initarg :pool :type xcb:CARD8) + (rule :initarg :rule :type xcb:CARD8) + (pad~0 :initform 2 :type xcb:-pad) + (attributes~ :initform + '(name attributes type xcb:xprint:STRING8 size nil) + :type xcb:-list) + (attributes :initarg :attributes :type xcb:-ignore))) + +(defclass xcb:xprint:PrintGetPageDimensions + (xcb:-request) + ((~opcode :initform 21 :type xcb:-u1) + (context :initarg :context :type xcb:xprint:PCONTEXT))) +(defclass xcb:xprint:PrintGetPageDimensions~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (width :initarg :width :type xcb:CARD16) + (height :initarg :height :type xcb:CARD16) + (offset-x :initarg :offset-x :type xcb:CARD16) + (offset-y :initarg :offset-y :type xcb:CARD16) + (reproducible-width :initarg :reproducible-width :type xcb:CARD16) + (reproducible-height :initarg :reproducible-height :type xcb:CARD16))) + +(defclass xcb:xprint:PrintQueryScreens + (xcb:-request) + ((~opcode :initform 22 :type xcb:-u1))) +(defclass xcb:xprint:PrintQueryScreens~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (listCount :initarg :listCount :type xcb:CARD32) + (pad~1 :initform 20 :type xcb:-pad) + (roots~ :initform + '(name roots type xcb:WINDOW size + (xcb:-fieldref 'listCount)) + :type xcb:-list) + (roots :initarg :roots :type xcb:-ignore))) + +(defclass xcb:xprint:PrintSetImageResolution + (xcb:-request) + ((~opcode :initform 23 :type xcb:-u1) + (context :initarg :context :type xcb:xprint:PCONTEXT) + (image-resolution :initarg :image-resolution :type xcb:CARD16))) +(defclass xcb:xprint:PrintSetImageResolution~reply + (xcb:-reply) + ((status :initarg :status :type xcb:BOOL) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (previous-resolutions :initarg :previous-resolutions :type xcb:CARD16))) + +(defclass xcb:xprint:PrintGetImageResolution + (xcb:-request) + ((~opcode :initform 24 :type xcb:-u1) + (context :initarg :context :type xcb:xprint:PCONTEXT))) +(defclass xcb:xprint:PrintGetImageResolution~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (image-resolution :initarg :image-resolution :type xcb:CARD16))) + +(defclass xcb:xprint:Notify + (xcb:-event) + ((~code :initform 0) + (detail :initarg :detail :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (context :initarg :context :type xcb:xprint:PCONTEXT) + (cancel :initarg :cancel :type xcb:BOOL))) + +(defclass xcb:xprint:AttributNotify + (xcb:-event) + ((~code :initform 1) + (detail :initarg :detail :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (context :initarg :context :type xcb:xprint:PCONTEXT))) + +(defclass xcb:xprint:BadContext + (xcb:-error) + ((~code :initform 0))) + +(defclass xcb:xprint:BadSequence + (xcb:-error) + ((~code :initform 1))) + +(defconst xcb:xprint:error-number-class-alist + '((0 . xcb:xprint:BadContext) + (1 . xcb:xprint:BadSequence)) + "(error-number . error-class) alist.") + +(defconst xcb:xprint:event-number-class-alist + '((0 . xcb:xprint:Notify) + (1 . xcb:xprint:AttributNotify)) + "(event-number . event-class) alist.") + + + +(provide 'xcb-xprint) + +;;; xcb-xprint.el ends here diff --git a/elpa/xelb-0.18/xcb-xproto.el b/elpa/xelb-0.18/xcb-xproto.el new file mode 100644 index 0000000..7729e53 --- /dev/null +++ b/elpa/xelb-0.18/xcb-xproto.el @@ -0,0 +1,3012 @@ +;;; xcb-xproto.el --- X11 core protocol -*- lexical-binding: t -*- + +;; Copyright (C) 2015-2019 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This file was generated by 'el_client.el' from 'xproto.xml', +;; which you can retrieve from . + +;;; Code: + +(require 'xcb-types) + +(defclass xcb:CHAR2B + (xcb:-struct) + ((byte1 :initarg :byte1 :type xcb:CARD8) + (byte2 :initarg :byte2 :type xcb:CARD8))) + +(xcb:deftypealias 'xcb:WINDOW 'xcb:-u4) + +(xcb:deftypealias 'xcb:PIXMAP 'xcb:-u4) + +(xcb:deftypealias 'xcb:CURSOR 'xcb:-u4) + +(xcb:deftypealias 'xcb:FONT 'xcb:-u4) + +(xcb:deftypealias 'xcb:GCONTEXT 'xcb:-u4) + +(xcb:deftypealias 'xcb:COLORMAP 'xcb:-u4) + +(xcb:deftypealias 'xcb:ATOM 'xcb:-u4) + +(xcb:deftypealias 'xcb:DRAWABLE 'xcb:-u4) + +(xcb:deftypealias 'xcb:FONTABLE 'xcb:-u4) + +(xcb:deftypealias 'xcb:BOOL32 'xcb:CARD32) + +(xcb:deftypealias 'xcb:VISUALID 'xcb:CARD32) + +(xcb:deftypealias 'xcb:TIMESTAMP 'xcb:CARD32) + +(xcb:deftypealias 'xcb:KEYSYM 'xcb:CARD32) + +(xcb:deftypealias 'xcb:KEYCODE 'xcb:CARD8) + +(xcb:deftypealias 'xcb:KEYCODE32 'xcb:CARD32) + +(xcb:deftypealias 'xcb:BUTTON 'xcb:CARD8) + +(defclass xcb:POINT + (xcb:-struct) + ((x :initarg :x :type xcb:INT16) + (y :initarg :y :type xcb:INT16))) + +(defclass xcb:RECTANGLE + (xcb:-struct) + ((x :initarg :x :type xcb:INT16) + (y :initarg :y :type xcb:INT16) + (width :initarg :width :type xcb:CARD16) + (height :initarg :height :type xcb:CARD16))) + +(defclass xcb:ARC + (xcb:-struct) + ((x :initarg :x :type xcb:INT16) + (y :initarg :y :type xcb:INT16) + (width :initarg :width :type xcb:CARD16) + (height :initarg :height :type xcb:CARD16) + (angle1 :initarg :angle1 :type xcb:INT16) + (angle2 :initarg :angle2 :type xcb:INT16))) + +(defclass xcb:FORMAT + (xcb:-struct) + ((depth :initarg :depth :type xcb:CARD8) + (bits-per-pixel :initarg :bits-per-pixel :type xcb:CARD8) + (scanline-pad :initarg :scanline-pad :type xcb:CARD8) + (pad~0 :initform 5 :type xcb:-pad))) + +(defconst xcb:VisualClass:StaticGray 0) +(defconst xcb:VisualClass:GrayScale 1) +(defconst xcb:VisualClass:StaticColor 2) +(defconst xcb:VisualClass:PseudoColor 3) +(defconst xcb:VisualClass:TrueColor 4) +(defconst xcb:VisualClass:DirectColor 5) + +(defclass xcb:VISUALTYPE + (xcb:-struct) + ((visual-id :initarg :visual-id :type xcb:VISUALID) + (class :initarg :class :type xcb:CARD8) + (bits-per-rgb-value :initarg :bits-per-rgb-value :type xcb:CARD8) + (colormap-entries :initarg :colormap-entries :type xcb:CARD16) + (red-mask :initarg :red-mask :type xcb:CARD32) + (green-mask :initarg :green-mask :type xcb:CARD32) + (blue-mask :initarg :blue-mask :type xcb:CARD32) + (pad~0 :initform 4 :type xcb:-pad))) + +(defclass xcb:DEPTH + (xcb:-struct) + ((depth :initarg :depth :type xcb:CARD8) + (pad~0 :initform 1 :type xcb:-pad) + (visuals-len :initarg :visuals-len :type xcb:CARD16) + (pad~1 :initform 4 :type xcb:-pad) + (visuals~ :initform + '(name visuals type xcb:VISUALTYPE size + (xcb:-fieldref 'visuals-len)) + :type xcb:-list) + (visuals :initarg :visuals :type xcb:-ignore))) + +(defconst xcb:EventMask:NoEvent 0) +(defconst xcb:EventMask:KeyPress 1) +(defconst xcb:EventMask:KeyRelease 2) +(defconst xcb:EventMask:ButtonPress 4) +(defconst xcb:EventMask:ButtonRelease 8) +(defconst xcb:EventMask:EnterWindow 16) +(defconst xcb:EventMask:LeaveWindow 32) +(defconst xcb:EventMask:PointerMotion 64) +(defconst xcb:EventMask:PointerMotionHint 128) +(defconst xcb:EventMask:Button1Motion 256) +(defconst xcb:EventMask:Button2Motion 512) +(defconst xcb:EventMask:Button3Motion 1024) +(defconst xcb:EventMask:Button4Motion 2048) +(defconst xcb:EventMask:Button5Motion 4096) +(defconst xcb:EventMask:ButtonMotion 8192) +(defconst xcb:EventMask:KeymapState 16384) +(defconst xcb:EventMask:Exposure 32768) +(defconst xcb:EventMask:VisibilityChange 65536) +(defconst xcb:EventMask:StructureNotify 131072) +(defconst xcb:EventMask:ResizeRedirect 262144) +(defconst xcb:EventMask:SubstructureNotify 524288) +(defconst xcb:EventMask:SubstructureRedirect 1048576) +(defconst xcb:EventMask:FocusChange 2097152) +(defconst xcb:EventMask:PropertyChange 4194304) +(defconst xcb:EventMask:ColorMapChange 8388608) +(defconst xcb:EventMask:OwnerGrabButton 16777216) + +(defconst xcb:BackingStore:NotUseful 0) +(defconst xcb:BackingStore:WhenMapped 1) +(defconst xcb:BackingStore:Always 2) + +(defclass xcb:SCREEN + (xcb:-struct) + ((root :initarg :root :type xcb:WINDOW) + (default-colormap :initarg :default-colormap :type xcb:COLORMAP) + (white-pixel :initarg :white-pixel :type xcb:CARD32) + (black-pixel :initarg :black-pixel :type xcb:CARD32) + (current-input-masks :initarg :current-input-masks :type xcb:CARD32) + (width-in-pixels :initarg :width-in-pixels :type xcb:CARD16) + (height-in-pixels :initarg :height-in-pixels :type xcb:CARD16) + (width-in-millimeters :initarg :width-in-millimeters :type xcb:CARD16) + (height-in-millimeters :initarg :height-in-millimeters :type xcb:CARD16) + (min-installed-maps :initarg :min-installed-maps :type xcb:CARD16) + (max-installed-maps :initarg :max-installed-maps :type xcb:CARD16) + (root-visual :initarg :root-visual :type xcb:VISUALID) + (backing-stores :initarg :backing-stores :type xcb:BYTE) + (save-unders :initarg :save-unders :type xcb:BOOL) + (root-depth :initarg :root-depth :type xcb:CARD8) + (allowed-depths-len :initarg :allowed-depths-len :type xcb:CARD8) + (allowed-depths~ :initform + '(name allowed-depths type xcb:DEPTH size + (xcb:-fieldref 'allowed-depths-len)) + :type xcb:-list) + (allowed-depths :initarg :allowed-depths :type xcb:-ignore))) + +(defclass xcb:SetupRequest + (xcb:-struct) + ((byte-order :initarg :byte-order :type xcb:CARD8) + (pad~0 :initform 1 :type xcb:-pad) + (protocol-major-version :initarg :protocol-major-version :type xcb:CARD16) + (protocol-minor-version :initarg :protocol-minor-version :type xcb:CARD16) + (authorization-protocol-name-len :initarg :authorization-protocol-name-len :type xcb:CARD16) + (authorization-protocol-data-len :initarg :authorization-protocol-data-len :type xcb:CARD16) + (pad~1 :initform 2 :type xcb:-pad) + (authorization-protocol-name~ :initform + '(name authorization-protocol-name type xcb:char size + (xcb:-fieldref 'authorization-protocol-name-len)) + :type xcb:-list) + (authorization-protocol-name :initarg :authorization-protocol-name :type xcb:-ignore) + (pad~2 :initform 4 :type xcb:-pad-align) + (authorization-protocol-data~ :initform + '(name authorization-protocol-data type xcb:char size + (xcb:-fieldref 'authorization-protocol-data-len)) + :type xcb:-list) + (authorization-protocol-data :initarg :authorization-protocol-data :type xcb:-ignore) + (pad~3 :initform 4 :type xcb:-pad-align))) + +(defclass xcb:SetupFailed + (xcb:-struct) + ((status :initarg :status :type xcb:CARD8) + (reason-len :initarg :reason-len :type xcb:CARD8) + (protocol-major-version :initarg :protocol-major-version :type xcb:CARD16) + (protocol-minor-version :initarg :protocol-minor-version :type xcb:CARD16) + (length :initarg :length :type xcb:CARD16) + (reason~ :initform + '(name reason type xcb:char size + (xcb:-fieldref 'reason-len)) + :type xcb:-list) + (reason :initarg :reason :type xcb:-ignore))) + +(defclass xcb:SetupAuthenticate + (xcb:-struct) + ((status :initarg :status :type xcb:CARD8) + (pad~0 :initform 5 :type xcb:-pad) + (length :initarg :length :type xcb:CARD16) + (reason~ :initform + '(name reason type xcb:char size + (* + (xcb:-fieldref 'length) + 4)) + :type xcb:-list) + (reason :initarg :reason :type xcb:-ignore))) + +(defconst xcb:ImageOrder:LSBFirst 0) +(defconst xcb:ImageOrder:MSBFirst 1) + +(defclass xcb:Setup + (xcb:-struct) + ((status :initarg :status :type xcb:CARD8) + (pad~0 :initform 1 :type xcb:-pad) + (protocol-major-version :initarg :protocol-major-version :type xcb:CARD16) + (protocol-minor-version :initarg :protocol-minor-version :type xcb:CARD16) + (length :initarg :length :type xcb:CARD16) + (release-number :initarg :release-number :type xcb:CARD32) + (resource-id-base :initarg :resource-id-base :type xcb:CARD32) + (resource-id-mask :initarg :resource-id-mask :type xcb:CARD32) + (motion-buffer-size :initarg :motion-buffer-size :type xcb:CARD32) + (vendor-len :initarg :vendor-len :type xcb:CARD16) + (maximum-request-length :initarg :maximum-request-length :type xcb:CARD16) + (roots-len :initarg :roots-len :type xcb:CARD8) + (pixmap-formats-len :initarg :pixmap-formats-len :type xcb:CARD8) + (image-byte-order :initarg :image-byte-order :type xcb:CARD8) + (bitmap-format-bit-order :initarg :bitmap-format-bit-order :type xcb:CARD8) + (bitmap-format-scanline-unit :initarg :bitmap-format-scanline-unit :type xcb:CARD8) + (bitmap-format-scanline-pad :initarg :bitmap-format-scanline-pad :type xcb:CARD8) + (min-keycode :initarg :min-keycode :type xcb:KEYCODE) + (max-keycode :initarg :max-keycode :type xcb:KEYCODE) + (pad~1 :initform 4 :type xcb:-pad) + (vendor~ :initform + '(name vendor type xcb:char size + (xcb:-fieldref 'vendor-len)) + :type xcb:-list) + (vendor :initarg :vendor :type xcb:-ignore) + (pad~2 :initform 4 :type xcb:-pad-align) + (pixmap-formats~ :initform + '(name pixmap-formats type xcb:FORMAT size + (xcb:-fieldref 'pixmap-formats-len)) + :type xcb:-list) + (pixmap-formats :initarg :pixmap-formats :type xcb:-ignore) + (roots~ :initform + '(name roots type xcb:SCREEN size + (xcb:-fieldref 'roots-len)) + :type xcb:-list) + (roots :initarg :roots :type xcb:-ignore))) + +(defconst xcb:ModMask:Shift 1) +(defconst xcb:ModMask:Lock 2) +(defconst xcb:ModMask:Control 4) +(defconst xcb:ModMask:1 8) +(defconst xcb:ModMask:2 16) +(defconst xcb:ModMask:3 32) +(defconst xcb:ModMask:4 64) +(defconst xcb:ModMask:5 128) +(defconst xcb:ModMask:Any 32768) + +(defconst xcb:KeyButMask:Shift 1) +(defconst xcb:KeyButMask:Lock 2) +(defconst xcb:KeyButMask:Control 4) +(defconst xcb:KeyButMask:Mod1 8) +(defconst xcb:KeyButMask:Mod2 16) +(defconst xcb:KeyButMask:Mod3 32) +(defconst xcb:KeyButMask:Mod4 64) +(defconst xcb:KeyButMask:Mod5 128) +(defconst xcb:KeyButMask:Button1 256) +(defconst xcb:KeyButMask:Button2 512) +(defconst xcb:KeyButMask:Button3 1024) +(defconst xcb:KeyButMask:Button4 2048) +(defconst xcb:KeyButMask:Button5 4096) + +(defconst xcb:Window:None 0) + +(defclass xcb:KeyPress + (xcb:-event) + ((~code :initform 2) + (detail :initarg :detail :type xcb:KEYCODE) + (~sequence :type xcb:CARD16) + (time :initarg :time :type xcb:TIMESTAMP) + (root :initarg :root :type xcb:WINDOW) + (event :initarg :event :type xcb:WINDOW) + (child :initarg :child :type xcb:WINDOW) + (root-x :initarg :root-x :type xcb:INT16) + (root-y :initarg :root-y :type xcb:INT16) + (event-x :initarg :event-x :type xcb:INT16) + (event-y :initarg :event-y :type xcb:INT16) + (state :initarg :state :type xcb:CARD16) + (same-screen :initarg :same-screen :type xcb:BOOL) + (pad~0 :initform 1 :type xcb:-pad))) + +(defclass xcb:KeyRelease + (xcb:-event xcb:KeyPress) + ((~code :initform 3))) + +(defconst xcb:ButtonMask:1 256) +(defconst xcb:ButtonMask:2 512) +(defconst xcb:ButtonMask:3 1024) +(defconst xcb:ButtonMask:4 2048) +(defconst xcb:ButtonMask:5 4096) +(defconst xcb:ButtonMask:Any 32768) + +(defclass xcb:ButtonPress + (xcb:-event) + ((~code :initform 4) + (detail :initarg :detail :type xcb:BUTTON) + (~sequence :type xcb:CARD16) + (time :initarg :time :type xcb:TIMESTAMP) + (root :initarg :root :type xcb:WINDOW) + (event :initarg :event :type xcb:WINDOW) + (child :initarg :child :type xcb:WINDOW) + (root-x :initarg :root-x :type xcb:INT16) + (root-y :initarg :root-y :type xcb:INT16) + (event-x :initarg :event-x :type xcb:INT16) + (event-y :initarg :event-y :type xcb:INT16) + (state :initarg :state :type xcb:CARD16) + (same-screen :initarg :same-screen :type xcb:BOOL) + (pad~0 :initform 1 :type xcb:-pad))) + +(defclass xcb:ButtonRelease + (xcb:-event xcb:ButtonPress) + ((~code :initform 5))) + +(defconst xcb:Motion:Normal 0) +(defconst xcb:Motion:Hint 1) + +(defclass xcb:MotionNotify + (xcb:-event) + ((~code :initform 6) + (detail :initarg :detail :type xcb:BYTE) + (~sequence :type xcb:CARD16) + (time :initarg :time :type xcb:TIMESTAMP) + (root :initarg :root :type xcb:WINDOW) + (event :initarg :event :type xcb:WINDOW) + (child :initarg :child :type xcb:WINDOW) + (root-x :initarg :root-x :type xcb:INT16) + (root-y :initarg :root-y :type xcb:INT16) + (event-x :initarg :event-x :type xcb:INT16) + (event-y :initarg :event-y :type xcb:INT16) + (state :initarg :state :type xcb:CARD16) + (same-screen :initarg :same-screen :type xcb:BOOL) + (pad~0 :initform 1 :type xcb:-pad))) + +(defconst xcb:NotifyDetail:Ancestor 0) +(defconst xcb:NotifyDetail:Virtual 1) +(defconst xcb:NotifyDetail:Inferior 2) +(defconst xcb:NotifyDetail:Nonlinear 3) +(defconst xcb:NotifyDetail:NonlinearVirtual 4) +(defconst xcb:NotifyDetail:Pointer 5) +(defconst xcb:NotifyDetail:PointerRoot 6) +(defconst xcb:NotifyDetail:None 7) + +(defconst xcb:NotifyMode:Normal 0) +(defconst xcb:NotifyMode:Grab 1) +(defconst xcb:NotifyMode:Ungrab 2) +(defconst xcb:NotifyMode:WhileGrabbed 3) + +(defclass xcb:EnterNotify + (xcb:-event) + ((~code :initform 7) + (detail :initarg :detail :type xcb:BYTE) + (~sequence :type xcb:CARD16) + (time :initarg :time :type xcb:TIMESTAMP) + (root :initarg :root :type xcb:WINDOW) + (event :initarg :event :type xcb:WINDOW) + (child :initarg :child :type xcb:WINDOW) + (root-x :initarg :root-x :type xcb:INT16) + (root-y :initarg :root-y :type xcb:INT16) + (event-x :initarg :event-x :type xcb:INT16) + (event-y :initarg :event-y :type xcb:INT16) + (state :initarg :state :type xcb:CARD16) + (mode :initarg :mode :type xcb:BYTE) + (same-screen-focus :initarg :same-screen-focus :type xcb:BYTE))) + +(defclass xcb:LeaveNotify + (xcb:-event xcb:EnterNotify) + ((~code :initform 8))) + +(defclass xcb:FocusIn + (xcb:-event) + ((~code :initform 9) + (detail :initarg :detail :type xcb:BYTE) + (~sequence :type xcb:CARD16) + (event :initarg :event :type xcb:WINDOW) + (mode :initarg :mode :type xcb:BYTE) + (pad~0 :initform 3 :type xcb:-pad))) + +(defclass xcb:FocusOut + (xcb:-event xcb:FocusIn) + ((~code :initform 10))) + +(defclass xcb:KeymapNotify + (xcb:-event) + ((~code :initform 11) + (keys~ :initform + '(name keys type xcb:CARD8 size 31) + :type xcb:-list) + (keys :initarg :keys :type xcb:-ignore))) + +(defclass xcb:Expose + (xcb:-event) + ((~code :initform 12) + (pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (window :initarg :window :type xcb:WINDOW) + (x :initarg :x :type xcb:CARD16) + (y :initarg :y :type xcb:CARD16) + (width :initarg :width :type xcb:CARD16) + (height :initarg :height :type xcb:CARD16) + (count :initarg :count :type xcb:CARD16) + (pad~1 :initform 2 :type xcb:-pad))) + +(defclass xcb:GraphicsExposure + (xcb:-event) + ((~code :initform 13) + (pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (drawable :initarg :drawable :type xcb:DRAWABLE) + (x :initarg :x :type xcb:CARD16) + (y :initarg :y :type xcb:CARD16) + (width :initarg :width :type xcb:CARD16) + (height :initarg :height :type xcb:CARD16) + (minor-opcode :initarg :minor-opcode :type xcb:CARD16) + (count :initarg :count :type xcb:CARD16) + (major-opcode :initarg :major-opcode :type xcb:CARD8) + (pad~1 :initform 3 :type xcb:-pad))) + +(defclass xcb:NoExposure + (xcb:-event) + ((~code :initform 14) + (pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (drawable :initarg :drawable :type xcb:DRAWABLE) + (minor-opcode :initarg :minor-opcode :type xcb:CARD16) + (major-opcode :initarg :major-opcode :type xcb:CARD8) + (pad~1 :initform 1 :type xcb:-pad))) + +(defconst xcb:Visibility:Unobscured 0) +(defconst xcb:Visibility:PartiallyObscured 1) +(defconst xcb:Visibility:FullyObscured 2) + +(defclass xcb:VisibilityNotify + (xcb:-event) + ((~code :initform 15) + (pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (window :initarg :window :type xcb:WINDOW) + (state :initarg :state :type xcb:BYTE) + (pad~1 :initform 3 :type xcb:-pad))) + +(defclass xcb:CreateNotify + (xcb:-event) + ((~code :initform 16) + (pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (parent :initarg :parent :type xcb:WINDOW) + (window :initarg :window :type xcb:WINDOW) + (x :initarg :x :type xcb:INT16) + (y :initarg :y :type xcb:INT16) + (width :initarg :width :type xcb:CARD16) + (height :initarg :height :type xcb:CARD16) + (border-width :initarg :border-width :type xcb:CARD16) + (override-redirect :initarg :override-redirect :type xcb:BOOL) + (pad~1 :initform 1 :type xcb:-pad))) + +(defclass xcb:DestroyNotify + (xcb:-event) + ((~code :initform 17) + (pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (event :initarg :event :type xcb:WINDOW) + (window :initarg :window :type xcb:WINDOW))) + +(defclass xcb:UnmapNotify + (xcb:-event) + ((~code :initform 18) + (pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (event :initarg :event :type xcb:WINDOW) + (window :initarg :window :type xcb:WINDOW) + (from-configure :initarg :from-configure :type xcb:BOOL) + (pad~1 :initform 3 :type xcb:-pad))) + +(defclass xcb:MapNotify + (xcb:-event) + ((~code :initform 19) + (pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (event :initarg :event :type xcb:WINDOW) + (window :initarg :window :type xcb:WINDOW) + (override-redirect :initarg :override-redirect :type xcb:BOOL) + (pad~1 :initform 3 :type xcb:-pad))) + +(defclass xcb:MapRequest + (xcb:-event) + ((~code :initform 20) + (pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (parent :initarg :parent :type xcb:WINDOW) + (window :initarg :window :type xcb:WINDOW))) + +(defclass xcb:ReparentNotify + (xcb:-event) + ((~code :initform 21) + (pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (event :initarg :event :type xcb:WINDOW) + (window :initarg :window :type xcb:WINDOW) + (parent :initarg :parent :type xcb:WINDOW) + (x :initarg :x :type xcb:INT16) + (y :initarg :y :type xcb:INT16) + (override-redirect :initarg :override-redirect :type xcb:BOOL) + (pad~1 :initform 3 :type xcb:-pad))) + +(defclass xcb:ConfigureNotify + (xcb:-event) + ((~code :initform 22) + (pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (event :initarg :event :type xcb:WINDOW) + (window :initarg :window :type xcb:WINDOW) + (above-sibling :initarg :above-sibling :type xcb:WINDOW) + (x :initarg :x :type xcb:INT16) + (y :initarg :y :type xcb:INT16) + (width :initarg :width :type xcb:CARD16) + (height :initarg :height :type xcb:CARD16) + (border-width :initarg :border-width :type xcb:CARD16) + (override-redirect :initarg :override-redirect :type xcb:BOOL) + (pad~1 :initform 1 :type xcb:-pad))) + +(defclass xcb:ConfigureRequest + (xcb:-event) + ((~code :initform 23) + (stack-mode :initarg :stack-mode :type xcb:BYTE) + (~sequence :type xcb:CARD16) + (parent :initarg :parent :type xcb:WINDOW) + (window :initarg :window :type xcb:WINDOW) + (sibling :initarg :sibling :type xcb:WINDOW) + (x :initarg :x :type xcb:INT16) + (y :initarg :y :type xcb:INT16) + (width :initarg :width :type xcb:CARD16) + (height :initarg :height :type xcb:CARD16) + (border-width :initarg :border-width :type xcb:CARD16) + (value-mask :initarg :value-mask :type xcb:CARD16))) + +(defclass xcb:GravityNotify + (xcb:-event) + ((~code :initform 24) + (pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (event :initarg :event :type xcb:WINDOW) + (window :initarg :window :type xcb:WINDOW) + (x :initarg :x :type xcb:INT16) + (y :initarg :y :type xcb:INT16))) + +(defclass xcb:ResizeRequest + (xcb:-event) + ((~code :initform 25) + (pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (window :initarg :window :type xcb:WINDOW) + (width :initarg :width :type xcb:CARD16) + (height :initarg :height :type xcb:CARD16))) + +(defconst xcb:Place:OnTop 0) +(defconst xcb:Place:OnBottom 1) + +(defclass xcb:CirculateNotify + (xcb:-event) + ((~code :initform 26) + (pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (event :initarg :event :type xcb:WINDOW) + (window :initarg :window :type xcb:WINDOW) + (pad~1 :initform 4 :type xcb:-pad) + (place :initarg :place :type xcb:BYTE) + (pad~2 :initform 3 :type xcb:-pad))) + +(defclass xcb:CirculateRequest + (xcb:-event xcb:CirculateNotify) + ((~code :initform 27))) + +(defconst xcb:Property:NewValue 0) +(defconst xcb:Property:Delete 1) + +(defclass xcb:PropertyNotify + (xcb:-event) + ((~code :initform 28) + (pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (window :initarg :window :type xcb:WINDOW) + (atom :initarg :atom :type xcb:ATOM) + (time :initarg :time :type xcb:TIMESTAMP) + (state :initarg :state :type xcb:BYTE) + (pad~1 :initform 3 :type xcb:-pad))) + +(defclass xcb:SelectionClear + (xcb:-event) + ((~code :initform 29) + (pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (time :initarg :time :type xcb:TIMESTAMP) + (owner :initarg :owner :type xcb:WINDOW) + (selection :initarg :selection :type xcb:ATOM))) + +(defconst xcb:Time:CurrentTime 0) + +(defconst xcb:Atom:None 0) +(defconst xcb:Atom:Any 0) +(defconst xcb:Atom:PRIMARY 1) +(defconst xcb:Atom:SECONDARY 2) +(defconst xcb:Atom:ARC 3) +(defconst xcb:Atom:ATOM 4) +(defconst xcb:Atom:BITMAP 5) +(defconst xcb:Atom:CARDINAL 6) +(defconst xcb:Atom:COLORMAP 7) +(defconst xcb:Atom:CURSOR 8) +(defconst xcb:Atom:CUT_BUFFER0 9) +(defconst xcb:Atom:CUT_BUFFER1 10) +(defconst xcb:Atom:CUT_BUFFER2 11) +(defconst xcb:Atom:CUT_BUFFER3 12) +(defconst xcb:Atom:CUT_BUFFER4 13) +(defconst xcb:Atom:CUT_BUFFER5 14) +(defconst xcb:Atom:CUT_BUFFER6 15) +(defconst xcb:Atom:CUT_BUFFER7 16) +(defconst xcb:Atom:DRAWABLE 17) +(defconst xcb:Atom:FONT 18) +(defconst xcb:Atom:INTEGER 19) +(defconst xcb:Atom:PIXMAP 20) +(defconst xcb:Atom:POINT 21) +(defconst xcb:Atom:RECTANGLE 22) +(defconst xcb:Atom:RESOURCE_MANAGER 23) +(defconst xcb:Atom:RGB_COLOR_MAP 24) +(defconst xcb:Atom:RGB_BEST_MAP 25) +(defconst xcb:Atom:RGB_BLUE_MAP 26) +(defconst xcb:Atom:RGB_DEFAULT_MAP 27) +(defconst xcb:Atom:RGB_GRAY_MAP 28) +(defconst xcb:Atom:RGB_GREEN_MAP 29) +(defconst xcb:Atom:RGB_RED_MAP 30) +(defconst xcb:Atom:STRING 31) +(defconst xcb:Atom:VISUALID 32) +(defconst xcb:Atom:WINDOW 33) +(defconst xcb:Atom:WM_COMMAND 34) +(defconst xcb:Atom:WM_HINTS 35) +(defconst xcb:Atom:WM_CLIENT_MACHINE 36) +(defconst xcb:Atom:WM_ICON_NAME 37) +(defconst xcb:Atom:WM_ICON_SIZE 38) +(defconst xcb:Atom:WM_NAME 39) +(defconst xcb:Atom:WM_NORMAL_HINTS 40) +(defconst xcb:Atom:WM_SIZE_HINTS 41) +(defconst xcb:Atom:WM_ZOOM_HINTS 42) +(defconst xcb:Atom:MIN_SPACE 43) +(defconst xcb:Atom:NORM_SPACE 44) +(defconst xcb:Atom:MAX_SPACE 45) +(defconst xcb:Atom:END_SPACE 46) +(defconst xcb:Atom:SUPERSCRIPT_X 47) +(defconst xcb:Atom:SUPERSCRIPT_Y 48) +(defconst xcb:Atom:SUBSCRIPT_X 49) +(defconst xcb:Atom:SUBSCRIPT_Y 50) +(defconst xcb:Atom:UNDERLINE_POSITION 51) +(defconst xcb:Atom:UNDERLINE_THICKNESS 52) +(defconst xcb:Atom:STRIKEOUT_ASCENT 53) +(defconst xcb:Atom:STRIKEOUT_DESCENT 54) +(defconst xcb:Atom:ITALIC_ANGLE 55) +(defconst xcb:Atom:X_HEIGHT 56) +(defconst xcb:Atom:QUAD_WIDTH 57) +(defconst xcb:Atom:WEIGHT 58) +(defconst xcb:Atom:POINT_SIZE 59) +(defconst xcb:Atom:RESOLUTION 60) +(defconst xcb:Atom:COPYRIGHT 61) +(defconst xcb:Atom:NOTICE 62) +(defconst xcb:Atom:FONT_NAME 63) +(defconst xcb:Atom:FAMILY_NAME 64) +(defconst xcb:Atom:FULL_NAME 65) +(defconst xcb:Atom:CAP_HEIGHT 66) +(defconst xcb:Atom:WM_CLASS 67) +(defconst xcb:Atom:WM_TRANSIENT_FOR 68) + +(defclass xcb:SelectionRequest + (xcb:-event) + ((~code :initform 30) + (pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (time :initarg :time :type xcb:TIMESTAMP) + (owner :initarg :owner :type xcb:WINDOW) + (requestor :initarg :requestor :type xcb:WINDOW) + (selection :initarg :selection :type xcb:ATOM) + (target :initarg :target :type xcb:ATOM) + (property :initarg :property :type xcb:ATOM))) + +(defclass xcb:SelectionNotify + (xcb:-event) + ((~code :initform 31) + (pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (time :initarg :time :type xcb:TIMESTAMP) + (requestor :initarg :requestor :type xcb:WINDOW) + (selection :initarg :selection :type xcb:ATOM) + (target :initarg :target :type xcb:ATOM) + (property :initarg :property :type xcb:ATOM))) + +(defconst xcb:ColormapState:Uninstalled 0) +(defconst xcb:ColormapState:Installed 1) + +(defconst xcb:Colormap:None 0) + +(defclass xcb:ColormapNotify + (xcb:-event) + ((~code :initform 32) + (pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (window :initarg :window :type xcb:WINDOW) + (colormap :initarg :colormap :type xcb:COLORMAP) + (new :initarg :new :type xcb:BOOL) + (state :initarg :state :type xcb:BYTE) + (pad~1 :initform 2 :type xcb:-pad))) + +(defclass xcb:ClientMessageData + (xcb:-union) + ((~size :initform 20) + (data8~ :initform + '(name data8 type xcb:CARD8 size 20) + :type xcb:-list) + (data8 :initarg :data8 :type xcb:-ignore) + (data16~ :initform + '(name data16 type xcb:CARD16 size 10) + :type xcb:-list) + (data16 :initarg :data16 :type xcb:-ignore) + (data32~ :initform + '(name data32 type xcb:CARD32 size 5) + :type xcb:-list) + (data32 :initarg :data32 :type xcb:-ignore))) + +(defclass xcb:ClientMessage + (xcb:-event) + ((~code :initform 33) + (format :initarg :format :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (window :initarg :window :type xcb:WINDOW) + (type :initarg :type :type xcb:ATOM) + (data :initarg :data :type xcb:ClientMessageData))) + +(defconst xcb:Mapping:Modifier 0) +(defconst xcb:Mapping:Keyboard 1) +(defconst xcb:Mapping:Pointer 2) + +(defclass xcb:MappingNotify + (xcb:-event) + ((~code :initform 34) + (pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (request :initarg :request :type xcb:BYTE) + (first-keycode :initarg :first-keycode :type xcb:KEYCODE) + (count :initarg :count :type xcb:CARD8) + (pad~1 :initform 1 :type xcb:-pad))) + +(defclass xcb:GeGeneric + (xcb:-generic-event) + ((pad~0 :initform 22 :type xcb:-pad))) + +(defclass xcb:Request + (xcb:-error) + ((~code :initform 1) + (bad-value :initarg :bad-value :type xcb:CARD32) + (minor-opcode :initarg :minor-opcode :type xcb:CARD16) + (major-opcode :initarg :major-opcode :type xcb:CARD8) + (pad~0 :initform 1 :type xcb:-pad))) + +(defclass xcb:Value + (xcb:-error) + ((~code :initform 2) + (bad-value :initarg :bad-value :type xcb:CARD32) + (minor-opcode :initarg :minor-opcode :type xcb:CARD16) + (major-opcode :initarg :major-opcode :type xcb:CARD8) + (pad~0 :initform 1 :type xcb:-pad))) + +(defclass xcb:Window + (xcb:-error xcb:Value) + ((~code :initform 3))) + +(defclass xcb:Pixmap + (xcb:-error xcb:Value) + ((~code :initform 4))) + +(defclass xcb:Atom + (xcb:-error xcb:Value) + ((~code :initform 5))) + +(defclass xcb:Cursor + (xcb:-error xcb:Value) + ((~code :initform 6))) + +(defclass xcb:Font + (xcb:-error xcb:Value) + ((~code :initform 7))) + +(defclass xcb:Match + (xcb:-error xcb:Request) + ((~code :initform 8))) + +(defclass xcb:Drawable + (xcb:-error xcb:Value) + ((~code :initform 9))) + +(defclass xcb:Access + (xcb:-error xcb:Request) + ((~code :initform 10))) + +(defclass xcb:Alloc + (xcb:-error xcb:Request) + ((~code :initform 11))) + +(defclass xcb:Colormap + (xcb:-error xcb:Value) + ((~code :initform 12))) + +(defclass xcb:GContext + (xcb:-error xcb:Value) + ((~code :initform 13))) + +(defclass xcb:IDChoice + (xcb:-error xcb:Value) + ((~code :initform 14))) + +(defclass xcb:Name + (xcb:-error xcb:Request) + ((~code :initform 15))) + +(defclass xcb:Length + (xcb:-error xcb:Request) + ((~code :initform 16))) + +(defclass xcb:Implementation + (xcb:-error xcb:Request) + ((~code :initform 17))) + +(defconst xcb:WindowClass:CopyFromParent 0) +(defconst xcb:WindowClass:InputOutput 1) +(defconst xcb:WindowClass:InputOnly 2) + +(defconst xcb:CW:BackPixmap 1) +(defconst xcb:CW:BackPixel 2) +(defconst xcb:CW:BorderPixmap 4) +(defconst xcb:CW:BorderPixel 8) +(defconst xcb:CW:BitGravity 16) +(defconst xcb:CW:WinGravity 32) +(defconst xcb:CW:BackingStore 64) +(defconst xcb:CW:BackingPlanes 128) +(defconst xcb:CW:BackingPixel 256) +(defconst xcb:CW:OverrideRedirect 512) +(defconst xcb:CW:SaveUnder 1024) +(defconst xcb:CW:EventMask 2048) +(defconst xcb:CW:DontPropagate 4096) +(defconst xcb:CW:Colormap 8192) +(defconst xcb:CW:Cursor 16384) + +(defconst xcb:BackPixmap:None 0) +(defconst xcb:BackPixmap:ParentRelative 1) + +(defconst xcb:Gravity:BitForget 0) +(defconst xcb:Gravity:WinUnmap 0) +(defconst xcb:Gravity:NorthWest 1) +(defconst xcb:Gravity:North 2) +(defconst xcb:Gravity:NorthEast 3) +(defconst xcb:Gravity:West 4) +(defconst xcb:Gravity:Center 5) +(defconst xcb:Gravity:East 6) +(defconst xcb:Gravity:SouthWest 7) +(defconst xcb:Gravity:South 8) +(defconst xcb:Gravity:SouthEast 9) +(defconst xcb:Gravity:Static 10) + +(defclass xcb:CreateWindow + (xcb:-request) + ((~opcode :initform 1 :type xcb:-u1) + (depth :initarg :depth :type xcb:CARD8) + (wid :initarg :wid :type xcb:WINDOW) + (parent :initarg :parent :type xcb:WINDOW) + (x :initarg :x :type xcb:INT16) + (y :initarg :y :type xcb:INT16) + (width :initarg :width :type xcb:CARD16) + (height :initarg :height :type xcb:CARD16) + (border-width :initarg :border-width :type xcb:CARD16) + (class :initarg :class :type xcb:CARD16) + (visual :initarg :visual :type xcb:VISUALID) + (value-mask :initarg :value-mask :type xcb:CARD32) + (value-list :initform + '(expression + (xcb:-fieldref 'value-mask) + cases + ((1 background-pixmap) + (2 background-pixel) + (4 border-pixmap) + (8 border-pixel) + (16 bit-gravity) + (32 win-gravity) + (64 backing-store) + (128 backing-planes) + (256 backing-pixel) + (512 override-redirect) + (1024 save-under) + (2048 event-mask) + (4096 do-not-propogate-mask) + (8192 colormap) + (16384 cursor))) + :type xcb:-switch) + (background-pixmap :initarg :background-pixmap :type xcb:PIXMAP) + (background-pixel :initarg :background-pixel :type xcb:CARD32) + (border-pixmap :initarg :border-pixmap :type xcb:PIXMAP) + (border-pixel :initarg :border-pixel :type xcb:CARD32) + (bit-gravity :initarg :bit-gravity :type xcb:CARD32) + (win-gravity :initarg :win-gravity :type xcb:CARD32) + (backing-store :initarg :backing-store :type xcb:CARD32) + (backing-planes :initarg :backing-planes :type xcb:CARD32) + (backing-pixel :initarg :backing-pixel :type xcb:CARD32) + (override-redirect :initarg :override-redirect :type xcb:BOOL32) + (save-under :initarg :save-under :type xcb:BOOL32) + (event-mask :initarg :event-mask :type xcb:CARD32) + (do-not-propogate-mask :initarg :do-not-propogate-mask :type xcb:CARD32) + (colormap :initarg :colormap :type xcb:COLORMAP) + (cursor :initarg :cursor :type xcb:CURSOR))) + +(defclass xcb:ChangeWindowAttributes + (xcb:-request) + ((~opcode :initform 2 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (window :initarg :window :type xcb:WINDOW) + (value-mask :initarg :value-mask :type xcb:CARD32) + (value-list :initform + '(expression + (xcb:-fieldref 'value-mask) + cases + ((1 background-pixmap) + (2 background-pixel) + (4 border-pixmap) + (8 border-pixel) + (16 bit-gravity) + (32 win-gravity) + (64 backing-store) + (128 backing-planes) + (256 backing-pixel) + (512 override-redirect) + (1024 save-under) + (2048 event-mask) + (4096 do-not-propogate-mask) + (8192 colormap) + (16384 cursor))) + :type xcb:-switch) + (background-pixmap :initarg :background-pixmap :type xcb:PIXMAP) + (background-pixel :initarg :background-pixel :type xcb:CARD32) + (border-pixmap :initarg :border-pixmap :type xcb:PIXMAP) + (border-pixel :initarg :border-pixel :type xcb:CARD32) + (bit-gravity :initarg :bit-gravity :type xcb:CARD32) + (win-gravity :initarg :win-gravity :type xcb:CARD32) + (backing-store :initarg :backing-store :type xcb:CARD32) + (backing-planes :initarg :backing-planes :type xcb:CARD32) + (backing-pixel :initarg :backing-pixel :type xcb:CARD32) + (override-redirect :initarg :override-redirect :type xcb:BOOL32) + (save-under :initarg :save-under :type xcb:BOOL32) + (event-mask :initarg :event-mask :type xcb:CARD32) + (do-not-propogate-mask :initarg :do-not-propogate-mask :type xcb:CARD32) + (colormap :initarg :colormap :type xcb:COLORMAP) + (cursor :initarg :cursor :type xcb:CURSOR))) + +(defconst xcb:MapState:Unmapped 0) +(defconst xcb:MapState:Unviewable 1) +(defconst xcb:MapState:Viewable 2) + +(defclass xcb:GetWindowAttributes + (xcb:-request) + ((~opcode :initform 3 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (window :initarg :window :type xcb:WINDOW))) +(defclass xcb:GetWindowAttributes~reply + (xcb:-reply) + ((backing-store :initarg :backing-store :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (visual :initarg :visual :type xcb:VISUALID) + (class :initarg :class :type xcb:CARD16) + (bit-gravity :initarg :bit-gravity :type xcb:CARD8) + (win-gravity :initarg :win-gravity :type xcb:CARD8) + (backing-planes :initarg :backing-planes :type xcb:CARD32) + (backing-pixel :initarg :backing-pixel :type xcb:CARD32) + (save-under :initarg :save-under :type xcb:BOOL) + (map-is-installed :initarg :map-is-installed :type xcb:BOOL) + (map-state :initarg :map-state :type xcb:CARD8) + (override-redirect :initarg :override-redirect :type xcb:BOOL) + (colormap :initarg :colormap :type xcb:COLORMAP) + (all-event-masks :initarg :all-event-masks :type xcb:CARD32) + (your-event-mask :initarg :your-event-mask :type xcb:CARD32) + (do-not-propagate-mask :initarg :do-not-propagate-mask :type xcb:CARD16) + (pad~0 :initform 2 :type xcb:-pad))) + +(defclass xcb:DestroyWindow + (xcb:-request) + ((~opcode :initform 4 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (window :initarg :window :type xcb:WINDOW))) + +(defclass xcb:DestroySubwindows + (xcb:-request) + ((~opcode :initform 5 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (window :initarg :window :type xcb:WINDOW))) + +(defconst xcb:SetMode:Insert 0) +(defconst xcb:SetMode:Delete 1) + +(defclass xcb:ChangeSaveSet + (xcb:-request) + ((~opcode :initform 6 :type xcb:-u1) + (mode :initarg :mode :type xcb:BYTE) + (window :initarg :window :type xcb:WINDOW))) + +(defclass xcb:ReparentWindow + (xcb:-request) + ((~opcode :initform 7 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (window :initarg :window :type xcb:WINDOW) + (parent :initarg :parent :type xcb:WINDOW) + (x :initarg :x :type xcb:INT16) + (y :initarg :y :type xcb:INT16))) + +(defclass xcb:MapWindow + (xcb:-request) + ((~opcode :initform 8 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (window :initarg :window :type xcb:WINDOW))) + +(defclass xcb:MapSubwindows + (xcb:-request) + ((~opcode :initform 9 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (window :initarg :window :type xcb:WINDOW))) + +(defclass xcb:UnmapWindow + (xcb:-request) + ((~opcode :initform 10 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (window :initarg :window :type xcb:WINDOW))) + +(defclass xcb:UnmapSubwindows + (xcb:-request) + ((~opcode :initform 11 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (window :initarg :window :type xcb:WINDOW))) + +(defconst xcb:ConfigWindow:X 1) +(defconst xcb:ConfigWindow:Y 2) +(defconst xcb:ConfigWindow:Width 4) +(defconst xcb:ConfigWindow:Height 8) +(defconst xcb:ConfigWindow:BorderWidth 16) +(defconst xcb:ConfigWindow:Sibling 32) +(defconst xcb:ConfigWindow:StackMode 64) + +(defconst xcb:StackMode:Above 0) +(defconst xcb:StackMode:Below 1) +(defconst xcb:StackMode:TopIf 2) +(defconst xcb:StackMode:BottomIf 3) +(defconst xcb:StackMode:Opposite 4) + +(defclass xcb:ConfigureWindow + (xcb:-request) + ((~opcode :initform 12 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (window :initarg :window :type xcb:WINDOW) + (value-mask :initarg :value-mask :type xcb:CARD16) + (pad~1 :initform 2 :type xcb:-pad) + (value-list :initform + '(expression + (xcb:-fieldref 'value-mask) + cases + ((1 x) + (2 y) + (4 width) + (8 height) + (16 border-width) + (32 sibling) + (64 stack-mode))) + :type xcb:-switch) + (x :initarg :x :type xcb:INT32) + (y :initarg :y :type xcb:INT32) + (width :initarg :width :type xcb:CARD32) + (height :initarg :height :type xcb:CARD32) + (border-width :initarg :border-width :type xcb:CARD32) + (sibling :initarg :sibling :type xcb:WINDOW) + (stack-mode :initarg :stack-mode :type xcb:CARD32))) + +(defconst xcb:Circulate:RaiseLowest 0) +(defconst xcb:Circulate:LowerHighest 1) + +(defclass xcb:CirculateWindow + (xcb:-request) + ((~opcode :initform 13 :type xcb:-u1) + (direction :initarg :direction :type xcb:CARD8) + (window :initarg :window :type xcb:WINDOW))) + +(defclass xcb:GetGeometry + (xcb:-request) + ((~opcode :initform 14 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (drawable :initarg :drawable :type xcb:DRAWABLE))) +(defclass xcb:GetGeometry~reply + (xcb:-reply) + ((depth :initarg :depth :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (root :initarg :root :type xcb:WINDOW) + (x :initarg :x :type xcb:INT16) + (y :initarg :y :type xcb:INT16) + (width :initarg :width :type xcb:CARD16) + (height :initarg :height :type xcb:CARD16) + (border-width :initarg :border-width :type xcb:CARD16) + (pad~0 :initform 2 :type xcb:-pad))) + +(defclass xcb:QueryTree + (xcb:-request) + ((~opcode :initform 15 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (window :initarg :window :type xcb:WINDOW))) +(defclass xcb:QueryTree~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (root :initarg :root :type xcb:WINDOW) + (parent :initarg :parent :type xcb:WINDOW) + (children-len :initarg :children-len :type xcb:CARD16) + (pad~1 :initform 14 :type xcb:-pad) + (children~ :initform + '(name children type xcb:WINDOW size + (xcb:-fieldref 'children-len)) + :type xcb:-list) + (children :initarg :children :type xcb:-ignore))) + +(defclass xcb:InternAtom + (xcb:-request) + ((~opcode :initform 16 :type xcb:-u1) + (only-if-exists :initarg :only-if-exists :type xcb:BOOL) + (name-len :initarg :name-len :type xcb:CARD16) + (pad~0 :initform 2 :type xcb:-pad) + (name~ :initform + '(name name type xcb:char size + (xcb:-fieldref 'name-len)) + :type xcb:-list) + (name :initarg :name :type xcb:-ignore))) +(defclass xcb:InternAtom~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (atom :initarg :atom :type xcb:ATOM))) + +(defclass xcb:GetAtomName + (xcb:-request) + ((~opcode :initform 17 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (atom :initarg :atom :type xcb:ATOM))) +(defclass xcb:GetAtomName~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (name-len :initarg :name-len :type xcb:CARD16) + (pad~1 :initform 22 :type xcb:-pad) + (name~ :initform + '(name name type xcb:char size + (xcb:-fieldref 'name-len)) + :type xcb:-list) + (name :initarg :name :type xcb:-ignore))) + +(defconst xcb:PropMode:Replace 0) +(defconst xcb:PropMode:Prepend 1) +(defconst xcb:PropMode:Append 2) + +(defclass xcb:ChangeProperty + (xcb:-request) + ((~opcode :initform 18 :type xcb:-u1) + (mode :initarg :mode :type xcb:CARD8) + (window :initarg :window :type xcb:WINDOW) + (property :initarg :property :type xcb:ATOM) + (type :initarg :type :type xcb:ATOM) + (format :initarg :format :type xcb:CARD8) + (pad~0 :initform 3 :type xcb:-pad) + (data-len :initarg :data-len :type xcb:CARD32) + (data~ :initform + '(name data type xcb:void size + (/ + (* + (xcb:-fieldref 'data-len) + (xcb:-fieldref 'format)) + 8)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:DeleteProperty + (xcb:-request) + ((~opcode :initform 19 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (window :initarg :window :type xcb:WINDOW) + (property :initarg :property :type xcb:ATOM))) + +(defconst xcb:GetPropertyType:Any 0) + +(defclass xcb:GetProperty + (xcb:-request) + ((~opcode :initform 20 :type xcb:-u1) + (delete :initarg :delete :type xcb:BOOL) + (window :initarg :window :type xcb:WINDOW) + (property :initarg :property :type xcb:ATOM) + (type :initarg :type :type xcb:ATOM) + (long-offset :initarg :long-offset :type xcb:CARD32) + (long-length :initarg :long-length :type xcb:CARD32))) +(defclass xcb:GetProperty~reply + (xcb:-reply) + ((format :initarg :format :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (type :initarg :type :type xcb:ATOM) + (bytes-after :initarg :bytes-after :type xcb:CARD32) + (value-len :initarg :value-len :type xcb:CARD32) + (pad~0 :initform 12 :type xcb:-pad) + (value~ :initform + '(name value type xcb:void size + (* + (xcb:-fieldref 'value-len) + (/ + (xcb:-fieldref 'format) + 8))) + :type xcb:-list) + (value :initarg :value :type xcb:-ignore))) + +(defclass xcb:ListProperties + (xcb:-request) + ((~opcode :initform 21 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (window :initarg :window :type xcb:WINDOW))) +(defclass xcb:ListProperties~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (atoms-len :initarg :atoms-len :type xcb:CARD16) + (pad~1 :initform 22 :type xcb:-pad) + (atoms~ :initform + '(name atoms type xcb:ATOM size + (xcb:-fieldref 'atoms-len)) + :type xcb:-list) + (atoms :initarg :atoms :type xcb:-ignore))) + +(defclass xcb:SetSelectionOwner + (xcb:-request) + ((~opcode :initform 22 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (owner :initarg :owner :type xcb:WINDOW) + (selection :initarg :selection :type xcb:ATOM) + (time :initarg :time :type xcb:TIMESTAMP))) + +(defclass xcb:GetSelectionOwner + (xcb:-request) + ((~opcode :initform 23 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (selection :initarg :selection :type xcb:ATOM))) +(defclass xcb:GetSelectionOwner~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (owner :initarg :owner :type xcb:WINDOW))) + +(defclass xcb:ConvertSelection + (xcb:-request) + ((~opcode :initform 24 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (requestor :initarg :requestor :type xcb:WINDOW) + (selection :initarg :selection :type xcb:ATOM) + (target :initarg :target :type xcb:ATOM) + (property :initarg :property :type xcb:ATOM) + (time :initarg :time :type xcb:TIMESTAMP))) + +(defconst xcb:SendEventDest:PointerWindow 0) +(defconst xcb:SendEventDest:ItemFocus 1) + +(defclass xcb:SendEvent + (xcb:-request) + ((~opcode :initform 25 :type xcb:-u1) + (propagate :initarg :propagate :type xcb:BOOL) + (destination :initarg :destination :type xcb:WINDOW) + (event-mask :initarg :event-mask :type xcb:CARD32) + (event~ :initform + '(name event type xcb:char size 32) + :type xcb:-list) + (event :initarg :event :type xcb:-ignore))) + +(defconst xcb:GrabMode:Sync 0) +(defconst xcb:GrabMode:Async 1) + +(defconst xcb:GrabStatus:Success 0) +(defconst xcb:GrabStatus:AlreadyGrabbed 1) +(defconst xcb:GrabStatus:InvalidTime 2) +(defconst xcb:GrabStatus:NotViewable 3) +(defconst xcb:GrabStatus:Frozen 4) + +(defconst xcb:Cursor:None 0) + +(defclass xcb:GrabPointer + (xcb:-request) + ((~opcode :initform 26 :type xcb:-u1) + (owner-events :initarg :owner-events :type xcb:BOOL) + (grab-window :initarg :grab-window :type xcb:WINDOW) + (event-mask :initarg :event-mask :type xcb:CARD16) + (pointer-mode :initarg :pointer-mode :type xcb:BYTE) + (keyboard-mode :initarg :keyboard-mode :type xcb:BYTE) + (confine-to :initarg :confine-to :type xcb:WINDOW) + (cursor :initarg :cursor :type xcb:CURSOR) + (time :initarg :time :type xcb:TIMESTAMP))) +(defclass xcb:GrabPointer~reply + (xcb:-reply) + ((status :initarg :status :type xcb:BYTE) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32))) + +(defclass xcb:UngrabPointer + (xcb:-request) + ((~opcode :initform 27 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (time :initarg :time :type xcb:TIMESTAMP))) + +(defconst xcb:ButtonIndex:Any 0) +(defconst xcb:ButtonIndex:1 1) +(defconst xcb:ButtonIndex:2 2) +(defconst xcb:ButtonIndex:3 3) +(defconst xcb:ButtonIndex:4 4) +(defconst xcb:ButtonIndex:5 5) + +(defclass xcb:GrabButton + (xcb:-request) + ((~opcode :initform 28 :type xcb:-u1) + (owner-events :initarg :owner-events :type xcb:BOOL) + (grab-window :initarg :grab-window :type xcb:WINDOW) + (event-mask :initarg :event-mask :type xcb:CARD16) + (pointer-mode :initarg :pointer-mode :type xcb:CARD8) + (keyboard-mode :initarg :keyboard-mode :type xcb:CARD8) + (confine-to :initarg :confine-to :type xcb:WINDOW) + (cursor :initarg :cursor :type xcb:CURSOR) + (button :initarg :button :type xcb:CARD8) + (pad~0 :initform 1 :type xcb:-pad) + (modifiers :initarg :modifiers :type xcb:CARD16))) + +(defclass xcb:UngrabButton + (xcb:-request) + ((~opcode :initform 29 :type xcb:-u1) + (button :initarg :button :type xcb:CARD8) + (grab-window :initarg :grab-window :type xcb:WINDOW) + (modifiers :initarg :modifiers :type xcb:CARD16) + (pad~0 :initform 2 :type xcb:-pad))) + +(defclass xcb:ChangeActivePointerGrab + (xcb:-request) + ((~opcode :initform 30 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (cursor :initarg :cursor :type xcb:CURSOR) + (time :initarg :time :type xcb:TIMESTAMP) + (event-mask :initarg :event-mask :type xcb:CARD16) + (pad~1 :initform 2 :type xcb:-pad))) + +(defclass xcb:GrabKeyboard + (xcb:-request) + ((~opcode :initform 31 :type xcb:-u1) + (owner-events :initarg :owner-events :type xcb:BOOL) + (grab-window :initarg :grab-window :type xcb:WINDOW) + (time :initarg :time :type xcb:TIMESTAMP) + (pointer-mode :initarg :pointer-mode :type xcb:BYTE) + (keyboard-mode :initarg :keyboard-mode :type xcb:BYTE) + (pad~0 :initform 2 :type xcb:-pad))) +(defclass xcb:GrabKeyboard~reply + (xcb:-reply) + ((status :initarg :status :type xcb:BYTE) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32))) + +(defclass xcb:UngrabKeyboard + (xcb:-request) + ((~opcode :initform 32 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (time :initarg :time :type xcb:TIMESTAMP))) + +(defconst xcb:Grab:Any 0) + +(defclass xcb:GrabKey + (xcb:-request) + ((~opcode :initform 33 :type xcb:-u1) + (owner-events :initarg :owner-events :type xcb:BOOL) + (grab-window :initarg :grab-window :type xcb:WINDOW) + (modifiers :initarg :modifiers :type xcb:CARD16) + (key :initarg :key :type xcb:KEYCODE) + (pointer-mode :initarg :pointer-mode :type xcb:CARD8) + (keyboard-mode :initarg :keyboard-mode :type xcb:CARD8) + (pad~0 :initform 3 :type xcb:-pad))) + +(defclass xcb:UngrabKey + (xcb:-request) + ((~opcode :initform 34 :type xcb:-u1) + (key :initarg :key :type xcb:KEYCODE) + (grab-window :initarg :grab-window :type xcb:WINDOW) + (modifiers :initarg :modifiers :type xcb:CARD16) + (pad~0 :initform 2 :type xcb:-pad))) + +(defconst xcb:Allow:AsyncPointer 0) +(defconst xcb:Allow:SyncPointer 1) +(defconst xcb:Allow:ReplayPointer 2) +(defconst xcb:Allow:AsyncKeyboard 3) +(defconst xcb:Allow:SyncKeyboard 4) +(defconst xcb:Allow:ReplayKeyboard 5) +(defconst xcb:Allow:AsyncBoth 6) +(defconst xcb:Allow:SyncBoth 7) + +(defclass xcb:AllowEvents + (xcb:-request) + ((~opcode :initform 35 :type xcb:-u1) + (mode :initarg :mode :type xcb:CARD8) + (time :initarg :time :type xcb:TIMESTAMP))) + +(defclass xcb:GrabServer + (xcb:-request) + ((~opcode :initform 36 :type xcb:-u1))) + +(defclass xcb:UngrabServer + (xcb:-request) + ((~opcode :initform 37 :type xcb:-u1))) + +(defclass xcb:QueryPointer + (xcb:-request) + ((~opcode :initform 38 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (window :initarg :window :type xcb:WINDOW))) +(defclass xcb:QueryPointer~reply + (xcb:-reply) + ((same-screen :initarg :same-screen :type xcb:BOOL) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (root :initarg :root :type xcb:WINDOW) + (child :initarg :child :type xcb:WINDOW) + (root-x :initarg :root-x :type xcb:INT16) + (root-y :initarg :root-y :type xcb:INT16) + (win-x :initarg :win-x :type xcb:INT16) + (win-y :initarg :win-y :type xcb:INT16) + (mask :initarg :mask :type xcb:CARD16) + (pad~0 :initform 2 :type xcb:-pad))) + +(defclass xcb:TIMECOORD + (xcb:-struct) + ((time :initarg :time :type xcb:TIMESTAMP) + (x :initarg :x :type xcb:INT16) + (y :initarg :y :type xcb:INT16))) + +(defclass xcb:GetMotionEvents + (xcb:-request) + ((~opcode :initform 39 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (window :initarg :window :type xcb:WINDOW) + (start :initarg :start :type xcb:TIMESTAMP) + (stop :initarg :stop :type xcb:TIMESTAMP))) +(defclass xcb:GetMotionEvents~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (events-len :initarg :events-len :type xcb:CARD32) + (pad~1 :initform 20 :type xcb:-pad) + (events~ :initform + '(name events type xcb:TIMECOORD size + (xcb:-fieldref 'events-len)) + :type xcb:-list) + (events :initarg :events :type xcb:-ignore))) + +(defclass xcb:TranslateCoordinates + (xcb:-request) + ((~opcode :initform 40 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (src-window :initarg :src-window :type xcb:WINDOW) + (dst-window :initarg :dst-window :type xcb:WINDOW) + (src-x :initarg :src-x :type xcb:INT16) + (src-y :initarg :src-y :type xcb:INT16))) +(defclass xcb:TranslateCoordinates~reply + (xcb:-reply) + ((same-screen :initarg :same-screen :type xcb:BOOL) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (child :initarg :child :type xcb:WINDOW) + (dst-x :initarg :dst-x :type xcb:INT16) + (dst-y :initarg :dst-y :type xcb:INT16))) + +(defclass xcb:WarpPointer + (xcb:-request) + ((~opcode :initform 41 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (src-window :initarg :src-window :type xcb:WINDOW) + (dst-window :initarg :dst-window :type xcb:WINDOW) + (src-x :initarg :src-x :type xcb:INT16) + (src-y :initarg :src-y :type xcb:INT16) + (src-width :initarg :src-width :type xcb:CARD16) + (src-height :initarg :src-height :type xcb:CARD16) + (dst-x :initarg :dst-x :type xcb:INT16) + (dst-y :initarg :dst-y :type xcb:INT16))) + +(defconst xcb:InputFocus:None 0) +(defconst xcb:InputFocus:PointerRoot 1) +(defconst xcb:InputFocus:Parent 2) +(defconst xcb:InputFocus:FollowKeyboard 3) + +(defclass xcb:SetInputFocus + (xcb:-request) + ((~opcode :initform 42 :type xcb:-u1) + (revert-to :initarg :revert-to :type xcb:CARD8) + (focus :initarg :focus :type xcb:WINDOW) + (time :initarg :time :type xcb:TIMESTAMP))) + +(defclass xcb:GetInputFocus + (xcb:-request) + ((~opcode :initform 43 :type xcb:-u1))) +(defclass xcb:GetInputFocus~reply + (xcb:-reply) + ((revert-to :initarg :revert-to :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (focus :initarg :focus :type xcb:WINDOW))) + +(defclass xcb:QueryKeymap + (xcb:-request) + ((~opcode :initform 44 :type xcb:-u1))) +(defclass xcb:QueryKeymap~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (keys~ :initform + '(name keys type xcb:CARD8 size 32) + :type xcb:-list) + (keys :initarg :keys :type xcb:-ignore))) + +(defclass xcb:OpenFont + (xcb:-request) + ((~opcode :initform 45 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (fid :initarg :fid :type xcb:FONT) + (name-len :initarg :name-len :type xcb:CARD16) + (pad~1 :initform 2 :type xcb:-pad) + (name~ :initform + '(name name type xcb:char size + (xcb:-fieldref 'name-len)) + :type xcb:-list) + (name :initarg :name :type xcb:-ignore))) + +(defclass xcb:CloseFont + (xcb:-request) + ((~opcode :initform 46 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (font :initarg :font :type xcb:FONT))) + +(defconst xcb:FontDraw:LeftToRight 0) +(defconst xcb:FontDraw:RightToLeft 1) + +(defclass xcb:FONTPROP + (xcb:-struct) + ((name :initarg :name :type xcb:ATOM) + (value :initarg :value :type xcb:CARD32))) + +(defclass xcb:CHARINFO + (xcb:-struct) + ((left-side-bearing :initarg :left-side-bearing :type xcb:INT16) + (right-side-bearing :initarg :right-side-bearing :type xcb:INT16) + (character-width :initarg :character-width :type xcb:INT16) + (ascent :initarg :ascent :type xcb:INT16) + (descent :initarg :descent :type xcb:INT16) + (attributes :initarg :attributes :type xcb:CARD16))) + +(defclass xcb:QueryFont + (xcb:-request) + ((~opcode :initform 47 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (font :initarg :font :type xcb:FONTABLE))) +(defclass xcb:QueryFont~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (min-bounds :initarg :min-bounds :type xcb:CHARINFO) + (pad~1 :initform 4 :type xcb:-pad) + (max-bounds :initarg :max-bounds :type xcb:CHARINFO) + (pad~2 :initform 4 :type xcb:-pad) + (min-char-or-byte2 :initarg :min-char-or-byte2 :type xcb:CARD16) + (max-char-or-byte2 :initarg :max-char-or-byte2 :type xcb:CARD16) + (default-char :initarg :default-char :type xcb:CARD16) + (properties-len :initarg :properties-len :type xcb:CARD16) + (draw-direction :initarg :draw-direction :type xcb:BYTE) + (min-byte1 :initarg :min-byte1 :type xcb:CARD8) + (max-byte1 :initarg :max-byte1 :type xcb:CARD8) + (all-chars-exist :initarg :all-chars-exist :type xcb:BOOL) + (font-ascent :initarg :font-ascent :type xcb:INT16) + (font-descent :initarg :font-descent :type xcb:INT16) + (char-infos-len :initarg :char-infos-len :type xcb:CARD32) + (properties~ :initform + '(name properties type xcb:FONTPROP size + (xcb:-fieldref 'properties-len)) + :type xcb:-list) + (properties :initarg :properties :type xcb:-ignore) + (char-infos~ :initform + '(name char-infos type xcb:CHARINFO size + (xcb:-fieldref 'char-infos-len)) + :type xcb:-list) + (char-infos :initarg :char-infos :type xcb:-ignore))) + +(defclass xcb:QueryTextExtents + (xcb:-request) + ((~opcode :initform 48 :type xcb:-u1) + (odd-length :type xcb:BOOL) + (font :initarg :font :type xcb:FONTABLE) + (string~ :initform + '(name string type xcb:CHAR2B size nil) + :type xcb:-list) + (string :initarg :string :type xcb:-ignore))) +(cl-defmethod xcb:marshal + ((obj xcb:QueryTextExtents)) + nil + (setf + (slot-value obj 'odd-length) + (logand + (length + (xcb:-fieldref 'string)) + 1)) + (cl-call-next-method obj)) +(defclass xcb:QueryTextExtents~reply + (xcb:-reply) + ((draw-direction :initarg :draw-direction :type xcb:BYTE) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (font-ascent :initarg :font-ascent :type xcb:INT16) + (font-descent :initarg :font-descent :type xcb:INT16) + (overall-ascent :initarg :overall-ascent :type xcb:INT16) + (overall-descent :initarg :overall-descent :type xcb:INT16) + (overall-width :initarg :overall-width :type xcb:INT32) + (overall-left :initarg :overall-left :type xcb:INT32) + (overall-right :initarg :overall-right :type xcb:INT32))) + +(defclass xcb:STR + (xcb:-struct) + ((name-len :initarg :name-len :type xcb:CARD8) + (name~ :initform + '(name name type xcb:char size + (xcb:-fieldref 'name-len)) + :type xcb:-list) + (name :initarg :name :type xcb:-ignore))) + +(defclass xcb:ListFonts + (xcb:-request) + ((~opcode :initform 49 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (max-names :initarg :max-names :type xcb:CARD16) + (pattern-len :initarg :pattern-len :type xcb:CARD16) + (pattern~ :initform + '(name pattern type xcb:char size + (xcb:-fieldref 'pattern-len)) + :type xcb:-list) + (pattern :initarg :pattern :type xcb:-ignore))) +(defclass xcb:ListFonts~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (names-len :initarg :names-len :type xcb:CARD16) + (pad~1 :initform 22 :type xcb:-pad) + (names~ :initform + '(name names type xcb:STR size + (xcb:-fieldref 'names-len)) + :type xcb:-list) + (names :initarg :names :type xcb:-ignore))) + +(defclass xcb:ListFontsWithInfo + (xcb:-request) + ((~opcode :initform 50 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (max-names :initarg :max-names :type xcb:CARD16) + (pattern-len :initarg :pattern-len :type xcb:CARD16) + (pattern~ :initform + '(name pattern type xcb:char size + (xcb:-fieldref 'pattern-len)) + :type xcb:-list) + (pattern :initarg :pattern :type xcb:-ignore))) +(defclass xcb:ListFontsWithInfo~reply + (xcb:-reply) + ((name-len :initarg :name-len :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (min-bounds :initarg :min-bounds :type xcb:CHARINFO) + (pad~0 :initform 4 :type xcb:-pad) + (max-bounds :initarg :max-bounds :type xcb:CHARINFO) + (pad~1 :initform 4 :type xcb:-pad) + (min-char-or-byte2 :initarg :min-char-or-byte2 :type xcb:CARD16) + (max-char-or-byte2 :initarg :max-char-or-byte2 :type xcb:CARD16) + (default-char :initarg :default-char :type xcb:CARD16) + (properties-len :initarg :properties-len :type xcb:CARD16) + (draw-direction :initarg :draw-direction :type xcb:BYTE) + (min-byte1 :initarg :min-byte1 :type xcb:CARD8) + (max-byte1 :initarg :max-byte1 :type xcb:CARD8) + (all-chars-exist :initarg :all-chars-exist :type xcb:BOOL) + (font-ascent :initarg :font-ascent :type xcb:INT16) + (font-descent :initarg :font-descent :type xcb:INT16) + (replies-hint :initarg :replies-hint :type xcb:CARD32) + (properties~ :initform + '(name properties type xcb:FONTPROP size + (xcb:-fieldref 'properties-len)) + :type xcb:-list) + (properties :initarg :properties :type xcb:-ignore) + (name~ :initform + '(name name type xcb:char size + (xcb:-fieldref 'name-len)) + :type xcb:-list) + (name :initarg :name :type xcb:-ignore))) + +(defclass xcb:SetFontPath + (xcb:-request) + ((~opcode :initform 51 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (font-qty :initarg :font-qty :type xcb:CARD16) + (pad~1 :initform 2 :type xcb:-pad) + (font~ :initform + '(name font type xcb:STR size + (xcb:-fieldref 'font-qty)) + :type xcb:-list) + (font :initarg :font :type xcb:-ignore))) + +(defclass xcb:GetFontPath + (xcb:-request) + ((~opcode :initform 52 :type xcb:-u1))) +(defclass xcb:GetFontPath~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (path-len :initarg :path-len :type xcb:CARD16) + (pad~1 :initform 22 :type xcb:-pad) + (path~ :initform + '(name path type xcb:STR size + (xcb:-fieldref 'path-len)) + :type xcb:-list) + (path :initarg :path :type xcb:-ignore))) + +(defclass xcb:CreatePixmap + (xcb:-request) + ((~opcode :initform 53 :type xcb:-u1) + (depth :initarg :depth :type xcb:CARD8) + (pid :initarg :pid :type xcb:PIXMAP) + (drawable :initarg :drawable :type xcb:DRAWABLE) + (width :initarg :width :type xcb:CARD16) + (height :initarg :height :type xcb:CARD16))) + +(defclass xcb:FreePixmap + (xcb:-request) + ((~opcode :initform 54 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (pixmap :initarg :pixmap :type xcb:PIXMAP))) + +(defconst xcb:GC:Function 1) +(defconst xcb:GC:PlaneMask 2) +(defconst xcb:GC:Foreground 4) +(defconst xcb:GC:Background 8) +(defconst xcb:GC:LineWidth 16) +(defconst xcb:GC:LineStyle 32) +(defconst xcb:GC:CapStyle 64) +(defconst xcb:GC:JoinStyle 128) +(defconst xcb:GC:FillStyle 256) +(defconst xcb:GC:FillRule 512) +(defconst xcb:GC:Tile 1024) +(defconst xcb:GC:Stipple 2048) +(defconst xcb:GC:TileStippleOriginX 4096) +(defconst xcb:GC:TileStippleOriginY 8192) +(defconst xcb:GC:Font 16384) +(defconst xcb:GC:SubwindowMode 32768) +(defconst xcb:GC:GraphicsExposures 65536) +(defconst xcb:GC:ClipOriginX 131072) +(defconst xcb:GC:ClipOriginY 262144) +(defconst xcb:GC:ClipMask 524288) +(defconst xcb:GC:DashOffset 1048576) +(defconst xcb:GC:DashList 2097152) +(defconst xcb:GC:ArcMode 4194304) + +(defconst xcb:GX:clear 0) +(defconst xcb:GX:and 1) +(defconst xcb:GX:andReverse 2) +(defconst xcb:GX:copy 3) +(defconst xcb:GX:andInverted 4) +(defconst xcb:GX:noop 5) +(defconst xcb:GX:xor 6) +(defconst xcb:GX:or 7) +(defconst xcb:GX:nor 8) +(defconst xcb:GX:equiv 9) +(defconst xcb:GX:invert 10) +(defconst xcb:GX:orReverse 11) +(defconst xcb:GX:copyInverted 12) +(defconst xcb:GX:orInverted 13) +(defconst xcb:GX:nand 14) +(defconst xcb:GX:set 15) + +(defconst xcb:LineStyle:Solid 0) +(defconst xcb:LineStyle:OnOffDash 1) +(defconst xcb:LineStyle:DoubleDash 2) + +(defconst xcb:CapStyle:NotLast 0) +(defconst xcb:CapStyle:Butt 1) +(defconst xcb:CapStyle:Round 2) +(defconst xcb:CapStyle:Projecting 3) + +(defconst xcb:JoinStyle:Miter 0) +(defconst xcb:JoinStyle:Round 1) +(defconst xcb:JoinStyle:Bevel 2) + +(defconst xcb:FillStyle:Solid 0) +(defconst xcb:FillStyle:Tiled 1) +(defconst xcb:FillStyle:Stippled 2) +(defconst xcb:FillStyle:OpaqueStippled 3) + +(defconst xcb:FillRule:EvenOdd 0) +(defconst xcb:FillRule:Winding 1) + +(defconst xcb:SubwindowMode:ClipByChildren 0) +(defconst xcb:SubwindowMode:IncludeInferiors 1) + +(defconst xcb:ArcMode:Chord 0) +(defconst xcb:ArcMode:PieSlice 1) + +(defclass xcb:CreateGC + (xcb:-request) + ((~opcode :initform 55 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (cid :initarg :cid :type xcb:GCONTEXT) + (drawable :initarg :drawable :type xcb:DRAWABLE) + (value-mask :initarg :value-mask :type xcb:CARD32) + (value-list :initform + '(expression + (xcb:-fieldref 'value-mask) + cases + ((1 function) + (2 plane-mask) + (4 foreground) + (8 background) + (16 line-width) + (32 line-style) + (64 cap-style) + (128 join-style) + (256 fill-style) + (512 fill-rule) + (1024 tile) + (2048 stipple) + (4096 tile-stipple-x-origin) + (8192 tile-stipple-y-origin) + (16384 font) + (32768 subwindow-mode) + (65536 graphics-exposures) + (131072 clip-x-origin) + (262144 clip-y-origin) + (524288 clip-mask) + (1048576 dash-offset) + (2097152 dashes) + (4194304 arc-mode))) + :type xcb:-switch) + (function :initarg :function :type xcb:CARD32) + (plane-mask :initarg :plane-mask :type xcb:CARD32) + (foreground :initarg :foreground :type xcb:CARD32) + (background :initarg :background :type xcb:CARD32) + (line-width :initarg :line-width :type xcb:CARD32) + (line-style :initarg :line-style :type xcb:CARD32) + (cap-style :initarg :cap-style :type xcb:CARD32) + (join-style :initarg :join-style :type xcb:CARD32) + (fill-style :initarg :fill-style :type xcb:CARD32) + (fill-rule :initarg :fill-rule :type xcb:CARD32) + (tile :initarg :tile :type xcb:PIXMAP) + (stipple :initarg :stipple :type xcb:PIXMAP) + (tile-stipple-x-origin :initarg :tile-stipple-x-origin :type xcb:INT32) + (tile-stipple-y-origin :initarg :tile-stipple-y-origin :type xcb:INT32) + (font :initarg :font :type xcb:FONT) + (subwindow-mode :initarg :subwindow-mode :type xcb:CARD32) + (graphics-exposures :initarg :graphics-exposures :type xcb:BOOL32) + (clip-x-origin :initarg :clip-x-origin :type xcb:INT32) + (clip-y-origin :initarg :clip-y-origin :type xcb:INT32) + (clip-mask :initarg :clip-mask :type xcb:PIXMAP) + (dash-offset :initarg :dash-offset :type xcb:CARD32) + (dashes :initarg :dashes :type xcb:CARD32) + (arc-mode :initarg :arc-mode :type xcb:CARD32))) + +(defclass xcb:ChangeGC + (xcb:-request) + ((~opcode :initform 56 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (gc :initarg :gc :type xcb:GCONTEXT) + (value-mask :initarg :value-mask :type xcb:CARD32) + (value-list :initform + '(expression + (xcb:-fieldref 'value-mask) + cases + ((1 function) + (2 plane-mask) + (4 foreground) + (8 background) + (16 line-width) + (32 line-style) + (64 cap-style) + (128 join-style) + (256 fill-style) + (512 fill-rule) + (1024 tile) + (2048 stipple) + (4096 tile-stipple-x-origin) + (8192 tile-stipple-y-origin) + (16384 font) + (32768 subwindow-mode) + (65536 graphics-exposures) + (131072 clip-x-origin) + (262144 clip-y-origin) + (524288 clip-mask) + (1048576 dash-offset) + (2097152 dashes) + (4194304 arc-mode))) + :type xcb:-switch) + (function :initarg :function :type xcb:CARD32) + (plane-mask :initarg :plane-mask :type xcb:CARD32) + (foreground :initarg :foreground :type xcb:CARD32) + (background :initarg :background :type xcb:CARD32) + (line-width :initarg :line-width :type xcb:CARD32) + (line-style :initarg :line-style :type xcb:CARD32) + (cap-style :initarg :cap-style :type xcb:CARD32) + (join-style :initarg :join-style :type xcb:CARD32) + (fill-style :initarg :fill-style :type xcb:CARD32) + (fill-rule :initarg :fill-rule :type xcb:CARD32) + (tile :initarg :tile :type xcb:PIXMAP) + (stipple :initarg :stipple :type xcb:PIXMAP) + (tile-stipple-x-origin :initarg :tile-stipple-x-origin :type xcb:INT32) + (tile-stipple-y-origin :initarg :tile-stipple-y-origin :type xcb:INT32) + (font :initarg :font :type xcb:FONT) + (subwindow-mode :initarg :subwindow-mode :type xcb:CARD32) + (graphics-exposures :initarg :graphics-exposures :type xcb:BOOL32) + (clip-x-origin :initarg :clip-x-origin :type xcb:INT32) + (clip-y-origin :initarg :clip-y-origin :type xcb:INT32) + (clip-mask :initarg :clip-mask :type xcb:PIXMAP) + (dash-offset :initarg :dash-offset :type xcb:CARD32) + (dashes :initarg :dashes :type xcb:CARD32) + (arc-mode :initarg :arc-mode :type xcb:CARD32))) + +(defclass xcb:CopyGC + (xcb:-request) + ((~opcode :initform 57 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (src-gc :initarg :src-gc :type xcb:GCONTEXT) + (dst-gc :initarg :dst-gc :type xcb:GCONTEXT) + (value-mask :initarg :value-mask :type xcb:CARD32))) + +(defclass xcb:SetDashes + (xcb:-request) + ((~opcode :initform 58 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (gc :initarg :gc :type xcb:GCONTEXT) + (dash-offset :initarg :dash-offset :type xcb:CARD16) + (dashes-len :initarg :dashes-len :type xcb:CARD16) + (dashes~ :initform + '(name dashes type xcb:CARD8 size + (xcb:-fieldref 'dashes-len)) + :type xcb:-list) + (dashes :initarg :dashes :type xcb:-ignore))) + +(defconst xcb:ClipOrdering:Unsorted 0) +(defconst xcb:ClipOrdering:YSorted 1) +(defconst xcb:ClipOrdering:YXSorted 2) +(defconst xcb:ClipOrdering:YXBanded 3) + +(defclass xcb:SetClipRectangles + (xcb:-request) + ((~opcode :initform 59 :type xcb:-u1) + (ordering :initarg :ordering :type xcb:BYTE) + (gc :initarg :gc :type xcb:GCONTEXT) + (clip-x-origin :initarg :clip-x-origin :type xcb:INT16) + (clip-y-origin :initarg :clip-y-origin :type xcb:INT16) + (rectangles~ :initform + '(name rectangles type xcb:RECTANGLE size nil) + :type xcb:-list) + (rectangles :initarg :rectangles :type xcb:-ignore))) + +(defclass xcb:FreeGC + (xcb:-request) + ((~opcode :initform 60 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (gc :initarg :gc :type xcb:GCONTEXT))) + +(defclass xcb:ClearArea + (xcb:-request) + ((~opcode :initform 61 :type xcb:-u1) + (exposures :initarg :exposures :type xcb:BOOL) + (window :initarg :window :type xcb:WINDOW) + (x :initarg :x :type xcb:INT16) + (y :initarg :y :type xcb:INT16) + (width :initarg :width :type xcb:CARD16) + (height :initarg :height :type xcb:CARD16))) + +(defclass xcb:CopyArea + (xcb:-request) + ((~opcode :initform 62 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (src-drawable :initarg :src-drawable :type xcb:DRAWABLE) + (dst-drawable :initarg :dst-drawable :type xcb:DRAWABLE) + (gc :initarg :gc :type xcb:GCONTEXT) + (src-x :initarg :src-x :type xcb:INT16) + (src-y :initarg :src-y :type xcb:INT16) + (dst-x :initarg :dst-x :type xcb:INT16) + (dst-y :initarg :dst-y :type xcb:INT16) + (width :initarg :width :type xcb:CARD16) + (height :initarg :height :type xcb:CARD16))) + +(defclass xcb:CopyPlane + (xcb:-request) + ((~opcode :initform 63 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (src-drawable :initarg :src-drawable :type xcb:DRAWABLE) + (dst-drawable :initarg :dst-drawable :type xcb:DRAWABLE) + (gc :initarg :gc :type xcb:GCONTEXT) + (src-x :initarg :src-x :type xcb:INT16) + (src-y :initarg :src-y :type xcb:INT16) + (dst-x :initarg :dst-x :type xcb:INT16) + (dst-y :initarg :dst-y :type xcb:INT16) + (width :initarg :width :type xcb:CARD16) + (height :initarg :height :type xcb:CARD16) + (bit-plane :initarg :bit-plane :type xcb:CARD32))) + +(defconst xcb:CoordMode:Origin 0) +(defconst xcb:CoordMode:Previous 1) + +(defclass xcb:PolyPoint + (xcb:-request) + ((~opcode :initform 64 :type xcb:-u1) + (coordinate-mode :initarg :coordinate-mode :type xcb:BYTE) + (drawable :initarg :drawable :type xcb:DRAWABLE) + (gc :initarg :gc :type xcb:GCONTEXT) + (points~ :initform + '(name points type xcb:POINT size nil) + :type xcb:-list) + (points :initarg :points :type xcb:-ignore))) + +(defclass xcb:PolyLine + (xcb:-request) + ((~opcode :initform 65 :type xcb:-u1) + (coordinate-mode :initarg :coordinate-mode :type xcb:BYTE) + (drawable :initarg :drawable :type xcb:DRAWABLE) + (gc :initarg :gc :type xcb:GCONTEXT) + (points~ :initform + '(name points type xcb:POINT size nil) + :type xcb:-list) + (points :initarg :points :type xcb:-ignore))) + +(defclass xcb:SEGMENT + (xcb:-struct) + ((x1 :initarg :x1 :type xcb:INT16) + (y1 :initarg :y1 :type xcb:INT16) + (x2 :initarg :x2 :type xcb:INT16) + (y2 :initarg :y2 :type xcb:INT16))) + +(defclass xcb:PolySegment + (xcb:-request) + ((~opcode :initform 66 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (drawable :initarg :drawable :type xcb:DRAWABLE) + (gc :initarg :gc :type xcb:GCONTEXT) + (segments~ :initform + '(name segments type xcb:SEGMENT size nil) + :type xcb:-list) + (segments :initarg :segments :type xcb:-ignore))) + +(defclass xcb:PolyRectangle + (xcb:-request) + ((~opcode :initform 67 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (drawable :initarg :drawable :type xcb:DRAWABLE) + (gc :initarg :gc :type xcb:GCONTEXT) + (rectangles~ :initform + '(name rectangles type xcb:RECTANGLE size nil) + :type xcb:-list) + (rectangles :initarg :rectangles :type xcb:-ignore))) + +(defclass xcb:PolyArc + (xcb:-request) + ((~opcode :initform 68 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (drawable :initarg :drawable :type xcb:DRAWABLE) + (gc :initarg :gc :type xcb:GCONTEXT) + (arcs~ :initform + '(name arcs type xcb:ARC size nil) + :type xcb:-list) + (arcs :initarg :arcs :type xcb:-ignore))) + +(defconst xcb:PolyShape:Complex 0) +(defconst xcb:PolyShape:Nonconvex 1) +(defconst xcb:PolyShape:Convex 2) + +(defclass xcb:FillPoly + (xcb:-request) + ((~opcode :initform 69 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (drawable :initarg :drawable :type xcb:DRAWABLE) + (gc :initarg :gc :type xcb:GCONTEXT) + (shape :initarg :shape :type xcb:CARD8) + (coordinate-mode :initarg :coordinate-mode :type xcb:CARD8) + (pad~1 :initform 2 :type xcb:-pad) + (points~ :initform + '(name points type xcb:POINT size nil) + :type xcb:-list) + (points :initarg :points :type xcb:-ignore))) + +(defclass xcb:PolyFillRectangle + (xcb:-request) + ((~opcode :initform 70 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (drawable :initarg :drawable :type xcb:DRAWABLE) + (gc :initarg :gc :type xcb:GCONTEXT) + (rectangles~ :initform + '(name rectangles type xcb:RECTANGLE size nil) + :type xcb:-list) + (rectangles :initarg :rectangles :type xcb:-ignore))) + +(defclass xcb:PolyFillArc + (xcb:-request) + ((~opcode :initform 71 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (drawable :initarg :drawable :type xcb:DRAWABLE) + (gc :initarg :gc :type xcb:GCONTEXT) + (arcs~ :initform + '(name arcs type xcb:ARC size nil) + :type xcb:-list) + (arcs :initarg :arcs :type xcb:-ignore))) + +(defconst xcb:ImageFormat:XYBitmap 0) +(defconst xcb:ImageFormat:XYPixmap 1) +(defconst xcb:ImageFormat:ZPixmap 2) + +(defclass xcb:PutImage + (xcb:-request) + ((~opcode :initform 72 :type xcb:-u1) + (format :initarg :format :type xcb:CARD8) + (drawable :initarg :drawable :type xcb:DRAWABLE) + (gc :initarg :gc :type xcb:GCONTEXT) + (width :initarg :width :type xcb:CARD16) + (height :initarg :height :type xcb:CARD16) + (dst-x :initarg :dst-x :type xcb:INT16) + (dst-y :initarg :dst-y :type xcb:INT16) + (left-pad :initarg :left-pad :type xcb:CARD8) + (depth :initarg :depth :type xcb:CARD8) + (pad~0 :initform 2 :type xcb:-pad) + (data~ :initform + '(name data type xcb:BYTE size nil) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:GetImage + (xcb:-request) + ((~opcode :initform 73 :type xcb:-u1) + (format :initarg :format :type xcb:CARD8) + (drawable :initarg :drawable :type xcb:DRAWABLE) + (x :initarg :x :type xcb:INT16) + (y :initarg :y :type xcb:INT16) + (width :initarg :width :type xcb:CARD16) + (height :initarg :height :type xcb:CARD16) + (plane-mask :initarg :plane-mask :type xcb:CARD32))) +(defclass xcb:GetImage~reply + (xcb:-reply) + ((depth :initarg :depth :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (visual :initarg :visual :type xcb:VISUALID) + (pad~0 :initform 20 :type xcb:-pad) + (data~ :initform + '(name data type xcb:BYTE size + (* + (xcb:-fieldref 'length) + 4)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:PolyText8 + (xcb:-request) + ((~opcode :initform 74 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (drawable :initarg :drawable :type xcb:DRAWABLE) + (gc :initarg :gc :type xcb:GCONTEXT) + (x :initarg :x :type xcb:INT16) + (y :initarg :y :type xcb:INT16) + (items~ :initform + '(name items type xcb:BYTE size nil) + :type xcb:-list) + (items :initarg :items :type xcb:-ignore))) + +(defclass xcb:PolyText16 + (xcb:-request) + ((~opcode :initform 75 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (drawable :initarg :drawable :type xcb:DRAWABLE) + (gc :initarg :gc :type xcb:GCONTEXT) + (x :initarg :x :type xcb:INT16) + (y :initarg :y :type xcb:INT16) + (items~ :initform + '(name items type xcb:BYTE size nil) + :type xcb:-list) + (items :initarg :items :type xcb:-ignore))) + +(defclass xcb:ImageText8 + (xcb:-request) + ((~opcode :initform 76 :type xcb:-u1) + (string-len :initarg :string-len :type xcb:BYTE) + (drawable :initarg :drawable :type xcb:DRAWABLE) + (gc :initarg :gc :type xcb:GCONTEXT) + (x :initarg :x :type xcb:INT16) + (y :initarg :y :type xcb:INT16) + (string~ :initform + '(name string type xcb:char size + (xcb:-fieldref 'string-len)) + :type xcb:-list) + (string :initarg :string :type xcb:-ignore))) + +(defclass xcb:ImageText16 + (xcb:-request) + ((~opcode :initform 77 :type xcb:-u1) + (string-len :initarg :string-len :type xcb:BYTE) + (drawable :initarg :drawable :type xcb:DRAWABLE) + (gc :initarg :gc :type xcb:GCONTEXT) + (x :initarg :x :type xcb:INT16) + (y :initarg :y :type xcb:INT16) + (string~ :initform + '(name string type xcb:CHAR2B size + (xcb:-fieldref 'string-len)) + :type xcb:-list) + (string :initarg :string :type xcb:-ignore))) + +(defconst xcb:ColormapAlloc:None 0) +(defconst xcb:ColormapAlloc:All 1) + +(defclass xcb:CreateColormap + (xcb:-request) + ((~opcode :initform 78 :type xcb:-u1) + (alloc :initarg :alloc :type xcb:BYTE) + (mid :initarg :mid :type xcb:COLORMAP) + (window :initarg :window :type xcb:WINDOW) + (visual :initarg :visual :type xcb:VISUALID))) + +(defclass xcb:FreeColormap + (xcb:-request) + ((~opcode :initform 79 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (cmap :initarg :cmap :type xcb:COLORMAP))) + +(defclass xcb:CopyColormapAndFree + (xcb:-request) + ((~opcode :initform 80 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (mid :initarg :mid :type xcb:COLORMAP) + (src-cmap :initarg :src-cmap :type xcb:COLORMAP))) + +(defclass xcb:InstallColormap + (xcb:-request) + ((~opcode :initform 81 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (cmap :initarg :cmap :type xcb:COLORMAP))) + +(defclass xcb:UninstallColormap + (xcb:-request) + ((~opcode :initform 82 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (cmap :initarg :cmap :type xcb:COLORMAP))) + +(defclass xcb:ListInstalledColormaps + (xcb:-request) + ((~opcode :initform 83 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (window :initarg :window :type xcb:WINDOW))) +(defclass xcb:ListInstalledColormaps~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (cmaps-len :initarg :cmaps-len :type xcb:CARD16) + (pad~1 :initform 22 :type xcb:-pad) + (cmaps~ :initform + '(name cmaps type xcb:COLORMAP size + (xcb:-fieldref 'cmaps-len)) + :type xcb:-list) + (cmaps :initarg :cmaps :type xcb:-ignore))) + +(defclass xcb:AllocColor + (xcb:-request) + ((~opcode :initform 84 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (cmap :initarg :cmap :type xcb:COLORMAP) + (red :initarg :red :type xcb:CARD16) + (green :initarg :green :type xcb:CARD16) + (blue :initarg :blue :type xcb:CARD16) + (pad~1 :initform 2 :type xcb:-pad))) +(defclass xcb:AllocColor~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (red :initarg :red :type xcb:CARD16) + (green :initarg :green :type xcb:CARD16) + (blue :initarg :blue :type xcb:CARD16) + (pad~1 :initform 2 :type xcb:-pad) + (pixel :initarg :pixel :type xcb:CARD32))) + +(defclass xcb:AllocNamedColor + (xcb:-request) + ((~opcode :initform 85 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (cmap :initarg :cmap :type xcb:COLORMAP) + (name-len :initarg :name-len :type xcb:CARD16) + (pad~1 :initform 2 :type xcb:-pad) + (name~ :initform + '(name name type xcb:char size + (xcb:-fieldref 'name-len)) + :type xcb:-list) + (name :initarg :name :type xcb:-ignore))) +(defclass xcb:AllocNamedColor~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pixel :initarg :pixel :type xcb:CARD32) + (exact-red :initarg :exact-red :type xcb:CARD16) + (exact-green :initarg :exact-green :type xcb:CARD16) + (exact-blue :initarg :exact-blue :type xcb:CARD16) + (visual-red :initarg :visual-red :type xcb:CARD16) + (visual-green :initarg :visual-green :type xcb:CARD16) + (visual-blue :initarg :visual-blue :type xcb:CARD16))) + +(defclass xcb:AllocColorCells + (xcb:-request) + ((~opcode :initform 86 :type xcb:-u1) + (contiguous :initarg :contiguous :type xcb:BOOL) + (cmap :initarg :cmap :type xcb:COLORMAP) + (colors :initarg :colors :type xcb:CARD16) + (planes :initarg :planes :type xcb:CARD16))) +(defclass xcb:AllocColorCells~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pixels-len :initarg :pixels-len :type xcb:CARD16) + (masks-len :initarg :masks-len :type xcb:CARD16) + (pad~1 :initform 20 :type xcb:-pad) + (pixels~ :initform + '(name pixels type xcb:CARD32 size + (xcb:-fieldref 'pixels-len)) + :type xcb:-list) + (pixels :initarg :pixels :type xcb:-ignore) + (masks~ :initform + '(name masks type xcb:CARD32 size + (xcb:-fieldref 'masks-len)) + :type xcb:-list) + (masks :initarg :masks :type xcb:-ignore))) + +(defclass xcb:AllocColorPlanes + (xcb:-request) + ((~opcode :initform 87 :type xcb:-u1) + (contiguous :initarg :contiguous :type xcb:BOOL) + (cmap :initarg :cmap :type xcb:COLORMAP) + (colors :initarg :colors :type xcb:CARD16) + (reds :initarg :reds :type xcb:CARD16) + (greens :initarg :greens :type xcb:CARD16) + (blues :initarg :blues :type xcb:CARD16))) +(defclass xcb:AllocColorPlanes~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pixels-len :initarg :pixels-len :type xcb:CARD16) + (pad~1 :initform 2 :type xcb:-pad) + (red-mask :initarg :red-mask :type xcb:CARD32) + (green-mask :initarg :green-mask :type xcb:CARD32) + (blue-mask :initarg :blue-mask :type xcb:CARD32) + (pad~2 :initform 8 :type xcb:-pad) + (pixels~ :initform + '(name pixels type xcb:CARD32 size + (xcb:-fieldref 'pixels-len)) + :type xcb:-list) + (pixels :initarg :pixels :type xcb:-ignore))) + +(defclass xcb:FreeColors + (xcb:-request) + ((~opcode :initform 88 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (cmap :initarg :cmap :type xcb:COLORMAP) + (plane-mask :initarg :plane-mask :type xcb:CARD32) + (pixels~ :initform + '(name pixels type xcb:CARD32 size nil) + :type xcb:-list) + (pixels :initarg :pixels :type xcb:-ignore))) + +(defconst xcb:ColorFlag:Red 1) +(defconst xcb:ColorFlag:Green 2) +(defconst xcb:ColorFlag:Blue 4) + +(defclass xcb:COLORITEM + (xcb:-struct) + ((pixel :initarg :pixel :type xcb:CARD32) + (red :initarg :red :type xcb:CARD16) + (green :initarg :green :type xcb:CARD16) + (blue :initarg :blue :type xcb:CARD16) + (flags :initarg :flags :type xcb:BYTE) + (pad~0 :initform 1 :type xcb:-pad))) + +(defclass xcb:StoreColors + (xcb:-request) + ((~opcode :initform 89 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (cmap :initarg :cmap :type xcb:COLORMAP) + (items~ :initform + '(name items type xcb:COLORITEM size nil) + :type xcb:-list) + (items :initarg :items :type xcb:-ignore))) + +(defclass xcb:StoreNamedColor + (xcb:-request) + ((~opcode :initform 90 :type xcb:-u1) + (flags :initarg :flags :type xcb:CARD8) + (cmap :initarg :cmap :type xcb:COLORMAP) + (pixel :initarg :pixel :type xcb:CARD32) + (name-len :initarg :name-len :type xcb:CARD16) + (pad~0 :initform 2 :type xcb:-pad) + (name~ :initform + '(name name type xcb:char size + (xcb:-fieldref 'name-len)) + :type xcb:-list) + (name :initarg :name :type xcb:-ignore))) + +(defclass xcb:RGB + (xcb:-struct) + ((red :initarg :red :type xcb:CARD16) + (green :initarg :green :type xcb:CARD16) + (blue :initarg :blue :type xcb:CARD16) + (pad~0 :initform 2 :type xcb:-pad))) + +(defclass xcb:QueryColors + (xcb:-request) + ((~opcode :initform 91 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (cmap :initarg :cmap :type xcb:COLORMAP) + (pixels~ :initform + '(name pixels type xcb:CARD32 size nil) + :type xcb:-list) + (pixels :initarg :pixels :type xcb:-ignore))) +(defclass xcb:QueryColors~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (colors-len :initarg :colors-len :type xcb:CARD16) + (pad~1 :initform 22 :type xcb:-pad) + (colors~ :initform + '(name colors type xcb:RGB size + (xcb:-fieldref 'colors-len)) + :type xcb:-list) + (colors :initarg :colors :type xcb:-ignore))) + +(defclass xcb:LookupColor + (xcb:-request) + ((~opcode :initform 92 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (cmap :initarg :cmap :type xcb:COLORMAP) + (name-len :initarg :name-len :type xcb:CARD16) + (pad~1 :initform 2 :type xcb:-pad) + (name~ :initform + '(name name type xcb:char size + (xcb:-fieldref 'name-len)) + :type xcb:-list) + (name :initarg :name :type xcb:-ignore))) +(defclass xcb:LookupColor~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (exact-red :initarg :exact-red :type xcb:CARD16) + (exact-green :initarg :exact-green :type xcb:CARD16) + (exact-blue :initarg :exact-blue :type xcb:CARD16) + (visual-red :initarg :visual-red :type xcb:CARD16) + (visual-green :initarg :visual-green :type xcb:CARD16) + (visual-blue :initarg :visual-blue :type xcb:CARD16))) + +(defconst xcb:Pixmap:None 0) + +(defclass xcb:CreateCursor + (xcb:-request) + ((~opcode :initform 93 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (cid :initarg :cid :type xcb:CURSOR) + (source :initarg :source :type xcb:PIXMAP) + (mask :initarg :mask :type xcb:PIXMAP) + (fore-red :initarg :fore-red :type xcb:CARD16) + (fore-green :initarg :fore-green :type xcb:CARD16) + (fore-blue :initarg :fore-blue :type xcb:CARD16) + (back-red :initarg :back-red :type xcb:CARD16) + (back-green :initarg :back-green :type xcb:CARD16) + (back-blue :initarg :back-blue :type xcb:CARD16) + (x :initarg :x :type xcb:CARD16) + (y :initarg :y :type xcb:CARD16))) + +(defconst xcb:Font:None 0) + +(defclass xcb:CreateGlyphCursor + (xcb:-request) + ((~opcode :initform 94 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (cid :initarg :cid :type xcb:CURSOR) + (source-font :initarg :source-font :type xcb:FONT) + (mask-font :initarg :mask-font :type xcb:FONT) + (source-char :initarg :source-char :type xcb:CARD16) + (mask-char :initarg :mask-char :type xcb:CARD16) + (fore-red :initarg :fore-red :type xcb:CARD16) + (fore-green :initarg :fore-green :type xcb:CARD16) + (fore-blue :initarg :fore-blue :type xcb:CARD16) + (back-red :initarg :back-red :type xcb:CARD16) + (back-green :initarg :back-green :type xcb:CARD16) + (back-blue :initarg :back-blue :type xcb:CARD16))) + +(defclass xcb:FreeCursor + (xcb:-request) + ((~opcode :initform 95 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (cursor :initarg :cursor :type xcb:CURSOR))) + +(defclass xcb:RecolorCursor + (xcb:-request) + ((~opcode :initform 96 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (cursor :initarg :cursor :type xcb:CURSOR) + (fore-red :initarg :fore-red :type xcb:CARD16) + (fore-green :initarg :fore-green :type xcb:CARD16) + (fore-blue :initarg :fore-blue :type xcb:CARD16) + (back-red :initarg :back-red :type xcb:CARD16) + (back-green :initarg :back-green :type xcb:CARD16) + (back-blue :initarg :back-blue :type xcb:CARD16))) + +(defconst xcb:QueryShapeOf:LargestCursor 0) +(defconst xcb:QueryShapeOf:FastestTile 1) +(defconst xcb:QueryShapeOf:FastestStipple 2) + +(defclass xcb:QueryBestSize + (xcb:-request) + ((~opcode :initform 97 :type xcb:-u1) + (class :initarg :class :type xcb:CARD8) + (drawable :initarg :drawable :type xcb:DRAWABLE) + (width :initarg :width :type xcb:CARD16) + (height :initarg :height :type xcb:CARD16))) +(defclass xcb:QueryBestSize~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (width :initarg :width :type xcb:CARD16) + (height :initarg :height :type xcb:CARD16))) + +(defclass xcb:QueryExtension + (xcb:-request) + ((~opcode :initform 98 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (name-len :initarg :name-len :type xcb:CARD16) + (pad~1 :initform 2 :type xcb:-pad) + (name~ :initform + '(name name type xcb:char size + (xcb:-fieldref 'name-len)) + :type xcb:-list) + (name :initarg :name :type xcb:-ignore))) +(defclass xcb:QueryExtension~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (present :initarg :present :type xcb:BOOL) + (major-opcode :initarg :major-opcode :type xcb:CARD8) + (first-event :initarg :first-event :type xcb:CARD8) + (first-error :initarg :first-error :type xcb:CARD8))) + +(defclass xcb:ListExtensions + (xcb:-request) + ((~opcode :initform 99 :type xcb:-u1))) +(defclass xcb:ListExtensions~reply + (xcb:-reply) + ((names-len :initarg :names-len :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~0 :initform 24 :type xcb:-pad) + (names~ :initform + '(name names type xcb:STR size + (xcb:-fieldref 'names-len)) + :type xcb:-list) + (names :initarg :names :type xcb:-ignore))) + +(defclass xcb:ChangeKeyboardMapping + (xcb:-request) + ((~opcode :initform 100 :type xcb:-u1) + (keycode-count :initarg :keycode-count :type xcb:CARD8) + (first-keycode :initarg :first-keycode :type xcb:KEYCODE) + (keysyms-per-keycode :initarg :keysyms-per-keycode :type xcb:CARD8) + (pad~0 :initform 2 :type xcb:-pad) + (keysyms~ :initform + '(name keysyms type xcb:KEYSYM size + (* + (xcb:-fieldref 'keycode-count) + (xcb:-fieldref 'keysyms-per-keycode))) + :type xcb:-list) + (keysyms :initarg :keysyms :type xcb:-ignore))) + +(defclass xcb:GetKeyboardMapping + (xcb:-request) + ((~opcode :initform 101 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (first-keycode :initarg :first-keycode :type xcb:KEYCODE) + (count :initarg :count :type xcb:CARD8))) +(defclass xcb:GetKeyboardMapping~reply + (xcb:-reply) + ((keysyms-per-keycode :initarg :keysyms-per-keycode :type xcb:BYTE) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~0 :initform 24 :type xcb:-pad) + (keysyms~ :initform + '(name keysyms type xcb:KEYSYM size + (xcb:-fieldref 'length)) + :type xcb:-list) + (keysyms :initarg :keysyms :type xcb:-ignore))) + +(defconst xcb:KB:KeyClickPercent 1) +(defconst xcb:KB:BellPercent 2) +(defconst xcb:KB:BellPitch 4) +(defconst xcb:KB:BellDuration 8) +(defconst xcb:KB:Led 16) +(defconst xcb:KB:LedMode 32) +(defconst xcb:KB:Key 64) +(defconst xcb:KB:AutoRepeatMode 128) + +(defconst xcb:LedMode:Off 0) +(defconst xcb:LedMode:On 1) + +(defconst xcb:AutoRepeatMode:Off 0) +(defconst xcb:AutoRepeatMode:On 1) +(defconst xcb:AutoRepeatMode:Default 2) + +(defclass xcb:ChangeKeyboardControl + (xcb:-request) + ((~opcode :initform 102 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (value-mask :initarg :value-mask :type xcb:CARD32) + (value-list :initform + '(expression + (xcb:-fieldref 'value-mask) + cases + ((1 key-click-percent) + (2 bell-percent) + (4 bell-pitch) + (8 bell-duration) + (16 led) + (32 led-mode) + (64 key) + (128 auto-repeat-mode))) + :type xcb:-switch) + (key-click-percent :initarg :key-click-percent :type xcb:INT32) + (bell-percent :initarg :bell-percent :type xcb:INT32) + (bell-pitch :initarg :bell-pitch :type xcb:INT32) + (bell-duration :initarg :bell-duration :type xcb:INT32) + (led :initarg :led :type xcb:CARD32) + (led-mode :initarg :led-mode :type xcb:CARD32) + (key :initarg :key :type xcb:KEYCODE32) + (auto-repeat-mode :initarg :auto-repeat-mode :type xcb:CARD32))) + +(defclass xcb:GetKeyboardControl + (xcb:-request) + ((~opcode :initform 103 :type xcb:-u1))) +(defclass xcb:GetKeyboardControl~reply + (xcb:-reply) + ((global-auto-repeat :initarg :global-auto-repeat :type xcb:BYTE) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (led-mask :initarg :led-mask :type xcb:CARD32) + (key-click-percent :initarg :key-click-percent :type xcb:CARD8) + (bell-percent :initarg :bell-percent :type xcb:CARD8) + (bell-pitch :initarg :bell-pitch :type xcb:CARD16) + (bell-duration :initarg :bell-duration :type xcb:CARD16) + (pad~0 :initform 2 :type xcb:-pad) + (auto-repeats~ :initform + '(name auto-repeats type xcb:CARD8 size 32) + :type xcb:-list) + (auto-repeats :initarg :auto-repeats :type xcb:-ignore))) + +(defclass xcb:Bell + (xcb:-request) + ((~opcode :initform 104 :type xcb:-u1) + (percent :initarg :percent :type xcb:INT8))) + +(defclass xcb:ChangePointerControl + (xcb:-request) + ((~opcode :initform 105 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (acceleration-numerator :initarg :acceleration-numerator :type xcb:INT16) + (acceleration-denominator :initarg :acceleration-denominator :type xcb:INT16) + (threshold :initarg :threshold :type xcb:INT16) + (do-acceleration :initarg :do-acceleration :type xcb:BOOL) + (do-threshold :initarg :do-threshold :type xcb:BOOL))) + +(defclass xcb:GetPointerControl + (xcb:-request) + ((~opcode :initform 106 :type xcb:-u1))) +(defclass xcb:GetPointerControl~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (acceleration-numerator :initarg :acceleration-numerator :type xcb:CARD16) + (acceleration-denominator :initarg :acceleration-denominator :type xcb:CARD16) + (threshold :initarg :threshold :type xcb:CARD16) + (pad~1 :initform 18 :type xcb:-pad))) + +(defconst xcb:Blanking:NotPreferred 0) +(defconst xcb:Blanking:Preferred 1) +(defconst xcb:Blanking:Default 2) + +(defconst xcb:Exposures:NotAllowed 0) +(defconst xcb:Exposures:Allowed 1) +(defconst xcb:Exposures:Default 2) + +(defclass xcb:SetScreenSaver + (xcb:-request) + ((~opcode :initform 107 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (timeout :initarg :timeout :type xcb:INT16) + (interval :initarg :interval :type xcb:INT16) + (prefer-blanking :initarg :prefer-blanking :type xcb:CARD8) + (allow-exposures :initarg :allow-exposures :type xcb:CARD8))) + +(defclass xcb:GetScreenSaver + (xcb:-request) + ((~opcode :initform 108 :type xcb:-u1))) +(defclass xcb:GetScreenSaver~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (timeout :initarg :timeout :type xcb:CARD16) + (interval :initarg :interval :type xcb:CARD16) + (prefer-blanking :initarg :prefer-blanking :type xcb:BYTE) + (allow-exposures :initarg :allow-exposures :type xcb:BYTE) + (pad~1 :initform 18 :type xcb:-pad))) + +(defconst xcb:HostMode:Insert 0) +(defconst xcb:HostMode:Delete 1) + +(defconst xcb:Family:Internet 0) +(defconst xcb:Family:DECnet 1) +(defconst xcb:Family:Chaos 2) +(defconst xcb:Family:ServerInterpreted 5) +(defconst xcb:Family:Internet6 6) + +(defclass xcb:ChangeHosts + (xcb:-request) + ((~opcode :initform 109 :type xcb:-u1) + (mode :initarg :mode :type xcb:CARD8) + (family :initarg :family :type xcb:CARD8) + (pad~0 :initform 1 :type xcb:-pad) + (address-len :initarg :address-len :type xcb:CARD16) + (address~ :initform + '(name address type xcb:BYTE size + (xcb:-fieldref 'address-len)) + :type xcb:-list) + (address :initarg :address :type xcb:-ignore))) + +(defclass xcb:HOST + (xcb:-struct) + ((family :initarg :family :type xcb:CARD8) + (pad~0 :initform 1 :type xcb:-pad) + (address-len :initarg :address-len :type xcb:CARD16) + (address~ :initform + '(name address type xcb:BYTE size + (xcb:-fieldref 'address-len)) + :type xcb:-list) + (address :initarg :address :type xcb:-ignore) + (pad~1 :initform 4 :type xcb:-pad-align))) + +(defclass xcb:ListHosts + (xcb:-request) + ((~opcode :initform 110 :type xcb:-u1))) +(defclass xcb:ListHosts~reply + (xcb:-reply) + ((mode :initarg :mode :type xcb:BYTE) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (hosts-len :initarg :hosts-len :type xcb:CARD16) + (pad~0 :initform 22 :type xcb:-pad) + (hosts~ :initform + '(name hosts type xcb:HOST size + (xcb:-fieldref 'hosts-len)) + :type xcb:-list) + (hosts :initarg :hosts :type xcb:-ignore))) + +(defconst xcb:AccessControl:Disable 0) +(defconst xcb:AccessControl:Enable 1) + +(defclass xcb:SetAccessControl + (xcb:-request) + ((~opcode :initform 111 :type xcb:-u1) + (mode :initarg :mode :type xcb:CARD8))) + +(defconst xcb:CloseDown:DestroyAll 0) +(defconst xcb:CloseDown:RetainPermanent 1) +(defconst xcb:CloseDown:RetainTemporary 2) + +(defclass xcb:SetCloseDownMode + (xcb:-request) + ((~opcode :initform 112 :type xcb:-u1) + (mode :initarg :mode :type xcb:CARD8))) + +(defconst xcb:Kill:AllTemporary 0) + +(defclass xcb:KillClient + (xcb:-request) + ((~opcode :initform 113 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (resource :initarg :resource :type xcb:CARD32))) + +(defclass xcb:RotateProperties + (xcb:-request) + ((~opcode :initform 114 :type xcb:-u1) + (pad~0 :initform 1 :type xcb:-pad) + (window :initarg :window :type xcb:WINDOW) + (atoms-len :initarg :atoms-len :type xcb:CARD16) + (delta :initarg :delta :type xcb:INT16) + (atoms~ :initform + '(name atoms type xcb:ATOM size + (xcb:-fieldref 'atoms-len)) + :type xcb:-list) + (atoms :initarg :atoms :type xcb:-ignore))) + +(defconst xcb:ScreenSaver:Reset 0) +(defconst xcb:ScreenSaver:Active 1) + +(defclass xcb:ForceScreenSaver + (xcb:-request) + ((~opcode :initform 115 :type xcb:-u1) + (mode :initarg :mode :type xcb:CARD8))) + +(defconst xcb:MappingStatus:Success 0) +(defconst xcb:MappingStatus:Busy 1) +(defconst xcb:MappingStatus:Failure 2) + +(defclass xcb:SetPointerMapping + (xcb:-request) + ((~opcode :initform 116 :type xcb:-u1) + (map-len :initarg :map-len :type xcb:CARD8) + (map~ :initform + '(name map type xcb:CARD8 size + (xcb:-fieldref 'map-len)) + :type xcb:-list) + (map :initarg :map :type xcb:-ignore))) +(defclass xcb:SetPointerMapping~reply + (xcb:-reply) + ((status :initarg :status :type xcb:BYTE) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32))) + +(defclass xcb:GetPointerMapping + (xcb:-request) + ((~opcode :initform 117 :type xcb:-u1))) +(defclass xcb:GetPointerMapping~reply + (xcb:-reply) + ((map-len :initarg :map-len :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~0 :initform 24 :type xcb:-pad) + (map~ :initform + '(name map type xcb:CARD8 size + (xcb:-fieldref 'map-len)) + :type xcb:-list) + (map :initarg :map :type xcb:-ignore))) + +(defconst xcb:MapIndex:Shift 0) +(defconst xcb:MapIndex:Lock 1) +(defconst xcb:MapIndex:Control 2) +(defconst xcb:MapIndex:1 3) +(defconst xcb:MapIndex:2 4) +(defconst xcb:MapIndex:3 5) +(defconst xcb:MapIndex:4 6) +(defconst xcb:MapIndex:5 7) + +(defclass xcb:SetModifierMapping + (xcb:-request) + ((~opcode :initform 118 :type xcb:-u1) + (keycodes-per-modifier :initarg :keycodes-per-modifier :type xcb:CARD8) + (keycodes~ :initform + '(name keycodes type xcb:KEYCODE size + (* + (xcb:-fieldref 'keycodes-per-modifier) + 8)) + :type xcb:-list) + (keycodes :initarg :keycodes :type xcb:-ignore))) +(defclass xcb:SetModifierMapping~reply + (xcb:-reply) + ((status :initarg :status :type xcb:BYTE) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32))) + +(defclass xcb:GetModifierMapping + (xcb:-request) + ((~opcode :initform 119 :type xcb:-u1))) +(defclass xcb:GetModifierMapping~reply + (xcb:-reply) + ((keycodes-per-modifier :initarg :keycodes-per-modifier :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~0 :initform 24 :type xcb:-pad) + (keycodes~ :initform + '(name keycodes type xcb:KEYCODE size + (* + (xcb:-fieldref 'keycodes-per-modifier) + 8)) + :type xcb:-list) + (keycodes :initarg :keycodes :type xcb:-ignore))) + +(defclass xcb:NoOperation + (xcb:-request) + ((~opcode :initform 127 :type xcb:-u1))) + +(defconst xcb:error-number-class-alist + '((1 . xcb:Request) + (2 . xcb:Value) + (3 . xcb:Window) + (4 . xcb:Pixmap) + (5 . xcb:Atom) + (6 . xcb:Cursor) + (7 . xcb:Font) + (8 . xcb:Match) + (9 . xcb:Drawable) + (10 . xcb:Access) + (11 . xcb:Alloc) + (12 . xcb:Colormap) + (13 . xcb:GContext) + (14 . xcb:IDChoice) + (15 . xcb:Name) + (16 . xcb:Length) + (17 . xcb:Implementation)) + "(error-number . error-class) alist.") + +(defconst xcb:event-number-class-alist + '((2 . xcb:KeyPress) + (3 . xcb:KeyRelease) + (4 . xcb:ButtonPress) + (5 . xcb:ButtonRelease) + (6 . xcb:MotionNotify) + (7 . xcb:EnterNotify) + (8 . xcb:LeaveNotify) + (9 . xcb:FocusIn) + (10 . xcb:FocusOut) + (11 . xcb:KeymapNotify) + (12 . xcb:Expose) + (13 . xcb:GraphicsExposure) + (14 . xcb:NoExposure) + (15 . xcb:VisibilityNotify) + (16 . xcb:CreateNotify) + (17 . xcb:DestroyNotify) + (18 . xcb:UnmapNotify) + (19 . xcb:MapNotify) + (20 . xcb:MapRequest) + (21 . xcb:ReparentNotify) + (22 . xcb:ConfigureNotify) + (23 . xcb:ConfigureRequest) + (24 . xcb:GravityNotify) + (25 . xcb:ResizeRequest) + (26 . xcb:CirculateNotify) + (27 . xcb:CirculateRequest) + (28 . xcb:PropertyNotify) + (29 . xcb:SelectionClear) + (30 . xcb:SelectionRequest) + (31 . xcb:SelectionNotify) + (32 . xcb:ColormapNotify) + (33 . xcb:ClientMessage) + (34 . xcb:MappingNotify) + (35 . xcb:GeGeneric)) + "(event-number . event-class) alist.") + + + +(provide 'xcb-xproto) + +;;; xcb-xproto.el ends here diff --git a/elpa/xelb-0.18/xcb-xselinux.el b/elpa/xelb-0.18/xcb-xselinux.el new file mode 100644 index 0000000..45fcdb3 --- /dev/null +++ b/elpa/xelb-0.18/xcb-xselinux.el @@ -0,0 +1,392 @@ +;;; xcb-xselinux.el --- X11 SELinux extension -*- lexical-binding: t -*- + +;; Copyright (C) 2015-2019 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This file was generated by 'el_client.el' from 'xselinux.xml', +;; which you can retrieve from . + +;;; Code: + +(require 'xcb-types) + +(defconst xcb:xselinux:-extension-xname "SELinux") +(defconst xcb:xselinux:-extension-name "SELinux") +(defconst xcb:xselinux:-major-version 1) +(defconst xcb:xselinux:-minor-version 0) + +(require 'xcb-xproto) + +(defclass xcb:xselinux:QueryVersion + (xcb:-request) + ((~opcode :initform 0 :type xcb:-u1) + (client-major :initarg :client-major :type xcb:CARD8) + (client-minor :initarg :client-minor :type xcb:CARD8))) +(defclass xcb:xselinux:QueryVersion~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (server-major :initarg :server-major :type xcb:CARD16) + (server-minor :initarg :server-minor :type xcb:CARD16))) + +(defclass xcb:xselinux:SetDeviceCreateContext + (xcb:-request) + ((~opcode :initform 1 :type xcb:-u1) + (context-len :initarg :context-len :type xcb:CARD32) + (context~ :initform + '(name context type xcb:char size + (xcb:-fieldref 'context-len)) + :type xcb:-list) + (context :initarg :context :type xcb:-ignore))) + +(defclass xcb:xselinux:GetDeviceCreateContext + (xcb:-request) + ((~opcode :initform 2 :type xcb:-u1))) +(defclass xcb:xselinux:GetDeviceCreateContext~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (context-len :initarg :context-len :type xcb:CARD32) + (pad~1 :initform 20 :type xcb:-pad) + (context~ :initform + '(name context type xcb:char size + (xcb:-fieldref 'context-len)) + :type xcb:-list) + (context :initarg :context :type xcb:-ignore))) + +(defclass xcb:xselinux:SetDeviceContext + (xcb:-request) + ((~opcode :initform 3 :type xcb:-u1) + (device :initarg :device :type xcb:CARD32) + (context-len :initarg :context-len :type xcb:CARD32) + (context~ :initform + '(name context type xcb:char size + (xcb:-fieldref 'context-len)) + :type xcb:-list) + (context :initarg :context :type xcb:-ignore))) + +(defclass xcb:xselinux:GetDeviceContext + (xcb:-request) + ((~opcode :initform 4 :type xcb:-u1) + (device :initarg :device :type xcb:CARD32))) +(defclass xcb:xselinux:GetDeviceContext~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (context-len :initarg :context-len :type xcb:CARD32) + (pad~1 :initform 20 :type xcb:-pad) + (context~ :initform + '(name context type xcb:char size + (xcb:-fieldref 'context-len)) + :type xcb:-list) + (context :initarg :context :type xcb:-ignore))) + +(defclass xcb:xselinux:SetWindowCreateContext + (xcb:-request) + ((~opcode :initform 5 :type xcb:-u1) + (context-len :initarg :context-len :type xcb:CARD32) + (context~ :initform + '(name context type xcb:char size + (xcb:-fieldref 'context-len)) + :type xcb:-list) + (context :initarg :context :type xcb:-ignore))) + +(defclass xcb:xselinux:GetWindowCreateContext + (xcb:-request) + ((~opcode :initform 6 :type xcb:-u1))) +(defclass xcb:xselinux:GetWindowCreateContext~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (context-len :initarg :context-len :type xcb:CARD32) + (pad~1 :initform 20 :type xcb:-pad) + (context~ :initform + '(name context type xcb:char size + (xcb:-fieldref 'context-len)) + :type xcb:-list) + (context :initarg :context :type xcb:-ignore))) + +(defclass xcb:xselinux:GetWindowContext + (xcb:-request) + ((~opcode :initform 7 :type xcb:-u1) + (window :initarg :window :type xcb:WINDOW))) +(defclass xcb:xselinux:GetWindowContext~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (context-len :initarg :context-len :type xcb:CARD32) + (pad~1 :initform 20 :type xcb:-pad) + (context~ :initform + '(name context type xcb:char size + (xcb:-fieldref 'context-len)) + :type xcb:-list) + (context :initarg :context :type xcb:-ignore))) + +(defclass xcb:xselinux:ListItem + (xcb:-struct) + ((name :initarg :name :type xcb:ATOM) + (object-context-len :initarg :object-context-len :type xcb:CARD32) + (data-context-len :initarg :data-context-len :type xcb:CARD32) + (object-context~ :initform + '(name object-context type xcb:char size + (xcb:-fieldref 'object-context-len)) + :type xcb:-list) + (object-context :initarg :object-context :type xcb:-ignore) + (pad~0 :initform 4 :type xcb:-pad-align) + (data-context~ :initform + '(name data-context type xcb:char size + (xcb:-fieldref 'data-context-len)) + :type xcb:-list) + (data-context :initarg :data-context :type xcb:-ignore) + (pad~1 :initform 4 :type xcb:-pad-align))) + +(defclass xcb:xselinux:SetPropertyCreateContext + (xcb:-request) + ((~opcode :initform 8 :type xcb:-u1) + (context-len :initarg :context-len :type xcb:CARD32) + (context~ :initform + '(name context type xcb:char size + (xcb:-fieldref 'context-len)) + :type xcb:-list) + (context :initarg :context :type xcb:-ignore))) + +(defclass xcb:xselinux:GetPropertyCreateContext + (xcb:-request) + ((~opcode :initform 9 :type xcb:-u1))) +(defclass xcb:xselinux:GetPropertyCreateContext~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (context-len :initarg :context-len :type xcb:CARD32) + (pad~1 :initform 20 :type xcb:-pad) + (context~ :initform + '(name context type xcb:char size + (xcb:-fieldref 'context-len)) + :type xcb:-list) + (context :initarg :context :type xcb:-ignore))) + +(defclass xcb:xselinux:SetPropertyUseContext + (xcb:-request) + ((~opcode :initform 10 :type xcb:-u1) + (context-len :initarg :context-len :type xcb:CARD32) + (context~ :initform + '(name context type xcb:char size + (xcb:-fieldref 'context-len)) + :type xcb:-list) + (context :initarg :context :type xcb:-ignore))) + +(defclass xcb:xselinux:GetPropertyUseContext + (xcb:-request) + ((~opcode :initform 11 :type xcb:-u1))) +(defclass xcb:xselinux:GetPropertyUseContext~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (context-len :initarg :context-len :type xcb:CARD32) + (pad~1 :initform 20 :type xcb:-pad) + (context~ :initform + '(name context type xcb:char size + (xcb:-fieldref 'context-len)) + :type xcb:-list) + (context :initarg :context :type xcb:-ignore))) + +(defclass xcb:xselinux:GetPropertyContext + (xcb:-request) + ((~opcode :initform 12 :type xcb:-u1) + (window :initarg :window :type xcb:WINDOW) + (property :initarg :property :type xcb:ATOM))) +(defclass xcb:xselinux:GetPropertyContext~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (context-len :initarg :context-len :type xcb:CARD32) + (pad~1 :initform 20 :type xcb:-pad) + (context~ :initform + '(name context type xcb:char size + (xcb:-fieldref 'context-len)) + :type xcb:-list) + (context :initarg :context :type xcb:-ignore))) + +(defclass xcb:xselinux:GetPropertyDataContext + (xcb:-request) + ((~opcode :initform 13 :type xcb:-u1) + (window :initarg :window :type xcb:WINDOW) + (property :initarg :property :type xcb:ATOM))) +(defclass xcb:xselinux:GetPropertyDataContext~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (context-len :initarg :context-len :type xcb:CARD32) + (pad~1 :initform 20 :type xcb:-pad) + (context~ :initform + '(name context type xcb:char size + (xcb:-fieldref 'context-len)) + :type xcb:-list) + (context :initarg :context :type xcb:-ignore))) + +(defclass xcb:xselinux:ListProperties + (xcb:-request) + ((~opcode :initform 14 :type xcb:-u1) + (window :initarg :window :type xcb:WINDOW))) +(defclass xcb:xselinux:ListProperties~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (properties-len :initarg :properties-len :type xcb:CARD32) + (pad~1 :initform 20 :type xcb:-pad) + (properties~ :initform + '(name properties type xcb:xselinux:ListItem size + (xcb:-fieldref 'properties-len)) + :type xcb:-list) + (properties :initarg :properties :type xcb:-ignore))) + +(defclass xcb:xselinux:SetSelectionCreateContext + (xcb:-request) + ((~opcode :initform 15 :type xcb:-u1) + (context-len :initarg :context-len :type xcb:CARD32) + (context~ :initform + '(name context type xcb:char size + (xcb:-fieldref 'context-len)) + :type xcb:-list) + (context :initarg :context :type xcb:-ignore))) + +(defclass xcb:xselinux:GetSelectionCreateContext + (xcb:-request) + ((~opcode :initform 16 :type xcb:-u1))) +(defclass xcb:xselinux:GetSelectionCreateContext~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (context-len :initarg :context-len :type xcb:CARD32) + (pad~1 :initform 20 :type xcb:-pad) + (context~ :initform + '(name context type xcb:char size + (xcb:-fieldref 'context-len)) + :type xcb:-list) + (context :initarg :context :type xcb:-ignore))) + +(defclass xcb:xselinux:SetSelectionUseContext + (xcb:-request) + ((~opcode :initform 17 :type xcb:-u1) + (context-len :initarg :context-len :type xcb:CARD32) + (context~ :initform + '(name context type xcb:char size + (xcb:-fieldref 'context-len)) + :type xcb:-list) + (context :initarg :context :type xcb:-ignore))) + +(defclass xcb:xselinux:GetSelectionUseContext + (xcb:-request) + ((~opcode :initform 18 :type xcb:-u1))) +(defclass xcb:xselinux:GetSelectionUseContext~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (context-len :initarg :context-len :type xcb:CARD32) + (pad~1 :initform 20 :type xcb:-pad) + (context~ :initform + '(name context type xcb:char size + (xcb:-fieldref 'context-len)) + :type xcb:-list) + (context :initarg :context :type xcb:-ignore))) + +(defclass xcb:xselinux:GetSelectionContext + (xcb:-request) + ((~opcode :initform 19 :type xcb:-u1) + (selection :initarg :selection :type xcb:ATOM))) +(defclass xcb:xselinux:GetSelectionContext~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (context-len :initarg :context-len :type xcb:CARD32) + (pad~1 :initform 20 :type xcb:-pad) + (context~ :initform + '(name context type xcb:char size + (xcb:-fieldref 'context-len)) + :type xcb:-list) + (context :initarg :context :type xcb:-ignore))) + +(defclass xcb:xselinux:GetSelectionDataContext + (xcb:-request) + ((~opcode :initform 20 :type xcb:-u1) + (selection :initarg :selection :type xcb:ATOM))) +(defclass xcb:xselinux:GetSelectionDataContext~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (context-len :initarg :context-len :type xcb:CARD32) + (pad~1 :initform 20 :type xcb:-pad) + (context~ :initform + '(name context type xcb:char size + (xcb:-fieldref 'context-len)) + :type xcb:-list) + (context :initarg :context :type xcb:-ignore))) + +(defclass xcb:xselinux:ListSelections + (xcb:-request) + ((~opcode :initform 21 :type xcb:-u1))) +(defclass xcb:xselinux:ListSelections~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (selections-len :initarg :selections-len :type xcb:CARD32) + (pad~1 :initform 20 :type xcb:-pad) + (selections~ :initform + '(name selections type xcb:xselinux:ListItem size + (xcb:-fieldref 'selections-len)) + :type xcb:-list) + (selections :initarg :selections :type xcb:-ignore))) + +(defclass xcb:xselinux:GetClientContext + (xcb:-request) + ((~opcode :initform 22 :type xcb:-u1) + (resource :initarg :resource :type xcb:CARD32))) +(defclass xcb:xselinux:GetClientContext~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (context-len :initarg :context-len :type xcb:CARD32) + (pad~1 :initform 20 :type xcb:-pad) + (context~ :initform + '(name context type xcb:char size + (xcb:-fieldref 'context-len)) + :type xcb:-list) + (context :initarg :context :type xcb:-ignore))) + + + +(provide 'xcb-xselinux) + +;;; xcb-xselinux.el ends here diff --git a/elpa/xelb-0.18/xcb-xtest.el b/elpa/xelb-0.18/xcb-xtest.el new file mode 100644 index 0000000..d51b2da --- /dev/null +++ b/elpa/xelb-0.18/xcb-xtest.el @@ -0,0 +1,87 @@ +;;; xcb-xtest.el --- X11 Test extension -*- lexical-binding: t -*- + +;; Copyright (C) 2015-2019 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This file was generated by 'el_client.el' from 'xtest.xml', +;; which you can retrieve from . + +;;; Code: + +(require 'xcb-types) + +(defconst xcb:xtest:-extension-xname "XTEST") +(defconst xcb:xtest:-extension-name "Test") +(defconst xcb:xtest:-major-version 2) +(defconst xcb:xtest:-minor-version 2) + +(require 'xcb-xproto) + +(defclass xcb:xtest:GetVersion + (xcb:-request) + ((~opcode :initform 0 :type xcb:-u1) + (major-version :initarg :major-version :type xcb:CARD8) + (pad~0 :initform 1 :type xcb:-pad) + (minor-version :initarg :minor-version :type xcb:CARD16))) +(defclass xcb:xtest:GetVersion~reply + (xcb:-reply) + ((major-version :initarg :major-version :type xcb:CARD8) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (minor-version :initarg :minor-version :type xcb:CARD16))) + +(defconst xcb:xtest:Cursor:None 0) +(defconst xcb:xtest:Cursor:Current 1) + +(defclass xcb:xtest:CompareCursor + (xcb:-request) + ((~opcode :initform 1 :type xcb:-u1) + (window :initarg :window :type xcb:WINDOW) + (cursor :initarg :cursor :type xcb:CURSOR))) +(defclass xcb:xtest:CompareCursor~reply + (xcb:-reply) + ((same :initarg :same :type xcb:BOOL) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32))) + +(defclass xcb:xtest:FakeInput + (xcb:-request) + ((~opcode :initform 2 :type xcb:-u1) + (type :initarg :type :type xcb:BYTE) + (detail :initarg :detail :type xcb:BYTE) + (pad~0 :initform 2 :type xcb:-pad) + (time :initarg :time :type xcb:CARD32) + (root :initarg :root :type xcb:WINDOW) + (pad~1 :initform 8 :type xcb:-pad) + (rootX :initarg :rootX :type xcb:INT16) + (rootY :initarg :rootY :type xcb:INT16) + (pad~2 :initform 7 :type xcb:-pad) + (deviceid :initarg :deviceid :type xcb:CARD8))) + +(defclass xcb:xtest:GrabControl + (xcb:-request) + ((~opcode :initform 3 :type xcb:-u1) + (impervious :initarg :impervious :type xcb:BOOL) + (pad~0 :initform 3 :type xcb:-pad))) + + + +(provide 'xcb-xtest) + +;;; xcb-xtest.el ends here diff --git a/elpa/xelb-0.18/xcb-xv.el b/elpa/xelb-0.18/xcb-xv.el new file mode 100644 index 0000000..bd8ad4e --- /dev/null +++ b/elpa/xelb-0.18/xcb-xv.el @@ -0,0 +1,523 @@ +;;; xcb-xv.el --- X11 Xv extension -*- lexical-binding: t -*- + +;; Copyright (C) 2015-2019 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This file was generated by 'el_client.el' from 'xv.xml', +;; which you can retrieve from . + +;;; Code: + +(require 'xcb-types) + +(defconst xcb:xv:-extension-xname "XVideo") +(defconst xcb:xv:-extension-name "Xv") +(defconst xcb:xv:-major-version 2) +(defconst xcb:xv:-minor-version 2) + +(require 'xcb-xproto) + +(require 'xcb-shm) + +(xcb:deftypealias 'xcb:xv:PORT 'xcb:-u4) + +(xcb:deftypealias 'xcb:xv:ENCODING 'xcb:-u4) + +(defconst xcb:xv:Type:InputMask 1) +(defconst xcb:xv:Type:OutputMask 2) +(defconst xcb:xv:Type:VideoMask 4) +(defconst xcb:xv:Type:StillMask 8) +(defconst xcb:xv:Type:ImageMask 16) + +(defconst xcb:xv:ImageFormatInfoType:RGB 0) +(defconst xcb:xv:ImageFormatInfoType:YUV 1) + +(defconst xcb:xv:ImageFormatInfoFormat:Packed 0) +(defconst xcb:xv:ImageFormatInfoFormat:Planar 1) + +(defconst xcb:xv:AttributeFlag:Gettable 1) +(defconst xcb:xv:AttributeFlag:Settable 2) + +(defconst xcb:xv:VideoNotifyReason:Started 0) +(defconst xcb:xv:VideoNotifyReason:Stopped 1) +(defconst xcb:xv:VideoNotifyReason:Busy 2) +(defconst xcb:xv:VideoNotifyReason:Preempted 3) +(defconst xcb:xv:VideoNotifyReason:HardError 4) + +(defconst xcb:xv:ScanlineOrder:TopToBottom 0) +(defconst xcb:xv:ScanlineOrder:BottomToTop 1) + +(defconst xcb:xv:GrabPortStatus:Success 0) +(defconst xcb:xv:GrabPortStatus:BadExtension 1) +(defconst xcb:xv:GrabPortStatus:AlreadyGrabbed 2) +(defconst xcb:xv:GrabPortStatus:InvalidTime 3) +(defconst xcb:xv:GrabPortStatus:BadReply 4) +(defconst xcb:xv:GrabPortStatus:BadAlloc 5) + +(defclass xcb:xv:Rational + (xcb:-struct) + ((numerator :initarg :numerator :type xcb:INT32) + (denominator :initarg :denominator :type xcb:INT32))) + +(defclass xcb:xv:Format + (xcb:-struct) + ((visual :initarg :visual :type xcb:VISUALID) + (depth :initarg :depth :type xcb:CARD8) + (pad~0 :initform 3 :type xcb:-pad))) + +(defclass xcb:xv:AdaptorInfo + (xcb:-struct) + ((base-id :initarg :base-id :type xcb:xv:PORT) + (name-size :initarg :name-size :type xcb:CARD16) + (num-ports :initarg :num-ports :type xcb:CARD16) + (num-formats :initarg :num-formats :type xcb:CARD16) + (type :initarg :type :type xcb:CARD8) + (pad~0 :initform 1 :type xcb:-pad) + (name~ :initform + '(name name type xcb:char size + (xcb:-fieldref 'name-size)) + :type xcb:-list) + (name :initarg :name :type xcb:-ignore) + (pad~1 :initform 4 :type xcb:-pad-align) + (formats~ :initform + '(name formats type xcb:xv:Format size + (xcb:-fieldref 'num-formats)) + :type xcb:-list) + (formats :initarg :formats :type xcb:-ignore))) + +(defclass xcb:xv:EncodingInfo + (xcb:-struct) + ((encoding :initarg :encoding :type xcb:xv:ENCODING) + (name-size :initarg :name-size :type xcb:CARD16) + (width :initarg :width :type xcb:CARD16) + (height :initarg :height :type xcb:CARD16) + (pad~0 :initform 2 :type xcb:-pad) + (rate :initarg :rate :type xcb:xv:Rational) + (name~ :initform + '(name name type xcb:char size + (xcb:-fieldref 'name-size)) + :type xcb:-list) + (name :initarg :name :type xcb:-ignore) + (pad~1 :initform 4 :type xcb:-pad-align))) + +(defclass xcb:xv:Image + (xcb:-struct) + ((id :initarg :id :type xcb:CARD32) + (width :initarg :width :type xcb:CARD16) + (height :initarg :height :type xcb:CARD16) + (data-size :initarg :data-size :type xcb:CARD32) + (num-planes :initarg :num-planes :type xcb:CARD32) + (pitches~ :initform + '(name pitches type xcb:CARD32 size + (xcb:-fieldref 'num-planes)) + :type xcb:-list) + (pitches :initarg :pitches :type xcb:-ignore) + (offsets~ :initform + '(name offsets type xcb:CARD32 size + (xcb:-fieldref 'num-planes)) + :type xcb:-list) + (offsets :initarg :offsets :type xcb:-ignore) + (data~ :initform + '(name data type xcb:CARD8 size + (xcb:-fieldref 'data-size)) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:xv:AttributeInfo + (xcb:-struct) + ((flags :initarg :flags :type xcb:CARD32) + (min :initarg :min :type xcb:INT32) + (max :initarg :max :type xcb:INT32) + (size :initarg :size :type xcb:CARD32) + (name~ :initform + '(name name type xcb:char size + (xcb:-fieldref 'size)) + :type xcb:-list) + (name :initarg :name :type xcb:-ignore) + (pad~0 :initform 4 :type xcb:-pad-align))) + +(defclass xcb:xv:ImageFormatInfo + (xcb:-struct) + ((id :initarg :id :type xcb:CARD32) + (type :initarg :type :type xcb:CARD8) + (byte-order :initarg :byte-order :type xcb:CARD8) + (pad~0 :initform 2 :type xcb:-pad) + (guid~ :initform + '(name guid type xcb:CARD8 size 16) + :type xcb:-list) + (guid :initarg :guid :type xcb:-ignore) + (bpp :initarg :bpp :type xcb:CARD8) + (num-planes :initarg :num-planes :type xcb:CARD8) + (pad~1 :initform 2 :type xcb:-pad) + (depth :initarg :depth :type xcb:CARD8) + (pad~2 :initform 3 :type xcb:-pad) + (red-mask :initarg :red-mask :type xcb:CARD32) + (green-mask :initarg :green-mask :type xcb:CARD32) + (blue-mask :initarg :blue-mask :type xcb:CARD32) + (format :initarg :format :type xcb:CARD8) + (pad~3 :initform 3 :type xcb:-pad) + (y-sample-bits :initarg :y-sample-bits :type xcb:CARD32) + (u-sample-bits :initarg :u-sample-bits :type xcb:CARD32) + (v-sample-bits :initarg :v-sample-bits :type xcb:CARD32) + (vhorz-y-period :initarg :vhorz-y-period :type xcb:CARD32) + (vhorz-u-period :initarg :vhorz-u-period :type xcb:CARD32) + (vhorz-v-period :initarg :vhorz-v-period :type xcb:CARD32) + (vvert-y-period :initarg :vvert-y-period :type xcb:CARD32) + (vvert-u-period :initarg :vvert-u-period :type xcb:CARD32) + (vvert-v-period :initarg :vvert-v-period :type xcb:CARD32) + (vcomp-order~ :initform + '(name vcomp-order type xcb:CARD8 size 32) + :type xcb:-list) + (vcomp-order :initarg :vcomp-order :type xcb:-ignore) + (vscanline-order :initarg :vscanline-order :type xcb:CARD8) + (pad~4 :initform 11 :type xcb:-pad))) + +(defclass xcb:xv:BadPort + (xcb:-error) + ((~code :initform 0))) + +(defclass xcb:xv:BadEncoding + (xcb:-error) + ((~code :initform 1))) + +(defclass xcb:xv:BadControl + (xcb:-error) + ((~code :initform 2))) + +(defclass xcb:xv:VideoNotify + (xcb:-event) + ((~code :initform 0) + (reason :initarg :reason :type xcb:BYTE) + (~sequence :type xcb:CARD16) + (time :initarg :time :type xcb:TIMESTAMP) + (drawable :initarg :drawable :type xcb:DRAWABLE) + (port :initarg :port :type xcb:xv:PORT))) + +(defclass xcb:xv:PortNotify + (xcb:-event) + ((~code :initform 1) + (pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (time :initarg :time :type xcb:TIMESTAMP) + (port :initarg :port :type xcb:xv:PORT) + (attribute :initarg :attribute :type xcb:ATOM) + (value :initarg :value :type xcb:INT32))) + +(defclass xcb:xv:QueryExtension + (xcb:-request) + ((~opcode :initform 0 :type xcb:-u1))) +(defclass xcb:xv:QueryExtension~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (major :initarg :major :type xcb:CARD16) + (minor :initarg :minor :type xcb:CARD16))) + +(defclass xcb:xv:QueryAdaptors + (xcb:-request) + ((~opcode :initform 1 :type xcb:-u1) + (window :initarg :window :type xcb:WINDOW))) +(defclass xcb:xv:QueryAdaptors~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (num-adaptors :initarg :num-adaptors :type xcb:CARD16) + (pad~1 :initform 22 :type xcb:-pad) + (info~ :initform + '(name info type xcb:xv:AdaptorInfo size + (xcb:-fieldref 'num-adaptors)) + :type xcb:-list) + (info :initarg :info :type xcb:-ignore))) + +(defclass xcb:xv:QueryEncodings + (xcb:-request) + ((~opcode :initform 2 :type xcb:-u1) + (port :initarg :port :type xcb:xv:PORT))) +(defclass xcb:xv:QueryEncodings~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (num-encodings :initarg :num-encodings :type xcb:CARD16) + (pad~1 :initform 22 :type xcb:-pad) + (info~ :initform + '(name info type xcb:xv:EncodingInfo size + (xcb:-fieldref 'num-encodings)) + :type xcb:-list) + (info :initarg :info :type xcb:-ignore))) + +(defclass xcb:xv:GrabPort + (xcb:-request) + ((~opcode :initform 3 :type xcb:-u1) + (port :initarg :port :type xcb:xv:PORT) + (time :initarg :time :type xcb:TIMESTAMP))) +(defclass xcb:xv:GrabPort~reply + (xcb:-reply) + ((result :initarg :result :type xcb:BYTE) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32))) + +(defclass xcb:xv:UngrabPort + (xcb:-request) + ((~opcode :initform 4 :type xcb:-u1) + (port :initarg :port :type xcb:xv:PORT) + (time :initarg :time :type xcb:TIMESTAMP))) + +(defclass xcb:xv:PutVideo + (xcb:-request) + ((~opcode :initform 5 :type xcb:-u1) + (port :initarg :port :type xcb:xv:PORT) + (drawable :initarg :drawable :type xcb:DRAWABLE) + (gc :initarg :gc :type xcb:GCONTEXT) + (vid-x :initarg :vid-x :type xcb:INT16) + (vid-y :initarg :vid-y :type xcb:INT16) + (vid-w :initarg :vid-w :type xcb:CARD16) + (vid-h :initarg :vid-h :type xcb:CARD16) + (drw-x :initarg :drw-x :type xcb:INT16) + (drw-y :initarg :drw-y :type xcb:INT16) + (drw-w :initarg :drw-w :type xcb:CARD16) + (drw-h :initarg :drw-h :type xcb:CARD16))) + +(defclass xcb:xv:PutStill + (xcb:-request) + ((~opcode :initform 6 :type xcb:-u1) + (port :initarg :port :type xcb:xv:PORT) + (drawable :initarg :drawable :type xcb:DRAWABLE) + (gc :initarg :gc :type xcb:GCONTEXT) + (vid-x :initarg :vid-x :type xcb:INT16) + (vid-y :initarg :vid-y :type xcb:INT16) + (vid-w :initarg :vid-w :type xcb:CARD16) + (vid-h :initarg :vid-h :type xcb:CARD16) + (drw-x :initarg :drw-x :type xcb:INT16) + (drw-y :initarg :drw-y :type xcb:INT16) + (drw-w :initarg :drw-w :type xcb:CARD16) + (drw-h :initarg :drw-h :type xcb:CARD16))) + +(defclass xcb:xv:GetVideo + (xcb:-request) + ((~opcode :initform 7 :type xcb:-u1) + (port :initarg :port :type xcb:xv:PORT) + (drawable :initarg :drawable :type xcb:DRAWABLE) + (gc :initarg :gc :type xcb:GCONTEXT) + (vid-x :initarg :vid-x :type xcb:INT16) + (vid-y :initarg :vid-y :type xcb:INT16) + (vid-w :initarg :vid-w :type xcb:CARD16) + (vid-h :initarg :vid-h :type xcb:CARD16) + (drw-x :initarg :drw-x :type xcb:INT16) + (drw-y :initarg :drw-y :type xcb:INT16) + (drw-w :initarg :drw-w :type xcb:CARD16) + (drw-h :initarg :drw-h :type xcb:CARD16))) + +(defclass xcb:xv:GetStill + (xcb:-request) + ((~opcode :initform 8 :type xcb:-u1) + (port :initarg :port :type xcb:xv:PORT) + (drawable :initarg :drawable :type xcb:DRAWABLE) + (gc :initarg :gc :type xcb:GCONTEXT) + (vid-x :initarg :vid-x :type xcb:INT16) + (vid-y :initarg :vid-y :type xcb:INT16) + (vid-w :initarg :vid-w :type xcb:CARD16) + (vid-h :initarg :vid-h :type xcb:CARD16) + (drw-x :initarg :drw-x :type xcb:INT16) + (drw-y :initarg :drw-y :type xcb:INT16) + (drw-w :initarg :drw-w :type xcb:CARD16) + (drw-h :initarg :drw-h :type xcb:CARD16))) + +(defclass xcb:xv:StopVideo + (xcb:-request) + ((~opcode :initform 9 :type xcb:-u1) + (port :initarg :port :type xcb:xv:PORT) + (drawable :initarg :drawable :type xcb:DRAWABLE))) + +(defclass xcb:xv:SelectVideoNotify + (xcb:-request) + ((~opcode :initform 10 :type xcb:-u1) + (drawable :initarg :drawable :type xcb:DRAWABLE) + (onoff :initarg :onoff :type xcb:BOOL) + (pad~0 :initform 3 :type xcb:-pad))) + +(defclass xcb:xv:SelectPortNotify + (xcb:-request) + ((~opcode :initform 11 :type xcb:-u1) + (port :initarg :port :type xcb:xv:PORT) + (onoff :initarg :onoff :type xcb:BOOL) + (pad~0 :initform 3 :type xcb:-pad))) + +(defclass xcb:xv:QueryBestSize + (xcb:-request) + ((~opcode :initform 12 :type xcb:-u1) + (port :initarg :port :type xcb:xv:PORT) + (vid-w :initarg :vid-w :type xcb:CARD16) + (vid-h :initarg :vid-h :type xcb:CARD16) + (drw-w :initarg :drw-w :type xcb:CARD16) + (drw-h :initarg :drw-h :type xcb:CARD16) + (motion :initarg :motion :type xcb:BOOL) + (pad~0 :initform 3 :type xcb:-pad))) +(defclass xcb:xv:QueryBestSize~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (actual-width :initarg :actual-width :type xcb:CARD16) + (actual-height :initarg :actual-height :type xcb:CARD16))) + +(defclass xcb:xv:SetPortAttribute + (xcb:-request) + ((~opcode :initform 13 :type xcb:-u1) + (port :initarg :port :type xcb:xv:PORT) + (attribute :initarg :attribute :type xcb:ATOM) + (value :initarg :value :type xcb:INT32))) + +(defclass xcb:xv:GetPortAttribute + (xcb:-request) + ((~opcode :initform 14 :type xcb:-u1) + (port :initarg :port :type xcb:xv:PORT) + (attribute :initarg :attribute :type xcb:ATOM))) +(defclass xcb:xv:GetPortAttribute~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (value :initarg :value :type xcb:INT32))) + +(defclass xcb:xv:QueryPortAttributes + (xcb:-request) + ((~opcode :initform 15 :type xcb:-u1) + (port :initarg :port :type xcb:xv:PORT))) +(defclass xcb:xv:QueryPortAttributes~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (num-attributes :initarg :num-attributes :type xcb:CARD32) + (text-size :initarg :text-size :type xcb:CARD32) + (pad~1 :initform 16 :type xcb:-pad) + (attributes~ :initform + '(name attributes type xcb:xv:AttributeInfo size + (xcb:-fieldref 'num-attributes)) + :type xcb:-list) + (attributes :initarg :attributes :type xcb:-ignore))) + +(defclass xcb:xv:ListImageFormats + (xcb:-request) + ((~opcode :initform 16 :type xcb:-u1) + (port :initarg :port :type xcb:xv:PORT))) +(defclass xcb:xv:ListImageFormats~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (num-formats :initarg :num-formats :type xcb:CARD32) + (pad~1 :initform 20 :type xcb:-pad) + (format~ :initform + '(name format type xcb:xv:ImageFormatInfo size + (xcb:-fieldref 'num-formats)) + :type xcb:-list) + (format :initarg :format :type xcb:-ignore))) + +(defclass xcb:xv:QueryImageAttributes + (xcb:-request) + ((~opcode :initform 17 :type xcb:-u1) + (port :initarg :port :type xcb:xv:PORT) + (id :initarg :id :type xcb:CARD32) + (width :initarg :width :type xcb:CARD16) + (height :initarg :height :type xcb:CARD16))) +(defclass xcb:xv:QueryImageAttributes~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (num-planes :initarg :num-planes :type xcb:CARD32) + (data-size :initarg :data-size :type xcb:CARD32) + (width :initarg :width :type xcb:CARD16) + (height :initarg :height :type xcb:CARD16) + (pad~1 :initform 12 :type xcb:-pad) + (pitches~ :initform + '(name pitches type xcb:CARD32 size + (xcb:-fieldref 'num-planes)) + :type xcb:-list) + (pitches :initarg :pitches :type xcb:-ignore) + (offsets~ :initform + '(name offsets type xcb:CARD32 size + (xcb:-fieldref 'num-planes)) + :type xcb:-list) + (offsets :initarg :offsets :type xcb:-ignore))) + +(defclass xcb:xv:PutImage + (xcb:-request) + ((~opcode :initform 18 :type xcb:-u1) + (port :initarg :port :type xcb:xv:PORT) + (drawable :initarg :drawable :type xcb:DRAWABLE) + (gc :initarg :gc :type xcb:GCONTEXT) + (id :initarg :id :type xcb:CARD32) + (src-x :initarg :src-x :type xcb:INT16) + (src-y :initarg :src-y :type xcb:INT16) + (src-w :initarg :src-w :type xcb:CARD16) + (src-h :initarg :src-h :type xcb:CARD16) + (drw-x :initarg :drw-x :type xcb:INT16) + (drw-y :initarg :drw-y :type xcb:INT16) + (drw-w :initarg :drw-w :type xcb:CARD16) + (drw-h :initarg :drw-h :type xcb:CARD16) + (width :initarg :width :type xcb:CARD16) + (height :initarg :height :type xcb:CARD16) + (data~ :initform + '(name data type xcb:CARD8 size nil) + :type xcb:-list) + (data :initarg :data :type xcb:-ignore))) + +(defclass xcb:xv:ShmPutImage + (xcb:-request) + ((~opcode :initform 19 :type xcb:-u1) + (port :initarg :port :type xcb:xv:PORT) + (drawable :initarg :drawable :type xcb:DRAWABLE) + (gc :initarg :gc :type xcb:GCONTEXT) + (shmseg :initarg :shmseg :type xcb:shm:SEG) + (id :initarg :id :type xcb:CARD32) + (offset :initarg :offset :type xcb:CARD32) + (src-x :initarg :src-x :type xcb:INT16) + (src-y :initarg :src-y :type xcb:INT16) + (src-w :initarg :src-w :type xcb:CARD16) + (src-h :initarg :src-h :type xcb:CARD16) + (drw-x :initarg :drw-x :type xcb:INT16) + (drw-y :initarg :drw-y :type xcb:INT16) + (drw-w :initarg :drw-w :type xcb:CARD16) + (drw-h :initarg :drw-h :type xcb:CARD16) + (width :initarg :width :type xcb:CARD16) + (height :initarg :height :type xcb:CARD16) + (send-event :initarg :send-event :type xcb:CARD8) + (pad~0 :initform 3 :type xcb:-pad))) + +(defconst xcb:xv:error-number-class-alist + '((0 . xcb:xv:BadPort) + (1 . xcb:xv:BadEncoding) + (2 . xcb:xv:BadControl)) + "(error-number . error-class) alist.") + +(defconst xcb:xv:event-number-class-alist + '((0 . xcb:xv:VideoNotify) + (1 . xcb:xv:PortNotify)) + "(event-number . event-class) alist.") + + + +(provide 'xcb-xv) + +;;; xcb-xv.el ends here diff --git a/elpa/xelb-0.18/xcb-xvmc.el b/elpa/xelb-0.18/xcb-xvmc.el new file mode 100644 index 0000000..6935576 --- /dev/null +++ b/elpa/xelb-0.18/xcb-xvmc.el @@ -0,0 +1,188 @@ +;;; xcb-xvmc.el --- X11 XvMC extension -*- lexical-binding: t -*- + +;; Copyright (C) 2015-2019 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This file was generated by 'el_client.el' from 'xvmc.xml', +;; which you can retrieve from . + +;;; Code: + +(require 'xcb-types) + +(defconst xcb:xvmc:-extension-xname "XVideo-MotionCompensation") +(defconst xcb:xvmc:-extension-name "XvMC") +(defconst xcb:xvmc:-major-version 1) +(defconst xcb:xvmc:-minor-version 1) + +(require 'xcb-xv) + +(xcb:deftypealias 'xcb:xvmc:CONTEXT 'xcb:-u4) + +(xcb:deftypealias 'xcb:xvmc:SURFACE 'xcb:-u4) + +(xcb:deftypealias 'xcb:xvmc:SUBPICTURE 'xcb:-u4) + +(defclass xcb:xvmc:SurfaceInfo + (xcb:-struct) + ((id :initarg :id :type xcb:xvmc:SURFACE) + (chroma-format :initarg :chroma-format :type xcb:CARD16) + (pad0 :initarg :pad0 :type xcb:CARD16) + (max-width :initarg :max-width :type xcb:CARD16) + (max-height :initarg :max-height :type xcb:CARD16) + (subpicture-max-width :initarg :subpicture-max-width :type xcb:CARD16) + (subpicture-max-height :initarg :subpicture-max-height :type xcb:CARD16) + (mc-type :initarg :mc-type :type xcb:CARD32) + (flags :initarg :flags :type xcb:CARD32))) + +(defclass xcb:xvmc:QueryVersion + (xcb:-request) + ((~opcode :initform 0 :type xcb:-u1))) +(defclass xcb:xvmc:QueryVersion~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (major :initarg :major :type xcb:CARD32) + (minor :initarg :minor :type xcb:CARD32))) + +(defclass xcb:xvmc:ListSurfaceTypes + (xcb:-request) + ((~opcode :initform 1 :type xcb:-u1) + (port-id :initarg :port-id :type xcb:xv:PORT))) +(defclass xcb:xvmc:ListSurfaceTypes~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (num :initarg :num :type xcb:CARD32) + (pad~1 :initform 20 :type xcb:-pad) + (surfaces~ :initform + '(name surfaces type xcb:xvmc:SurfaceInfo size + (xcb:-fieldref 'num)) + :type xcb:-list) + (surfaces :initarg :surfaces :type xcb:-ignore))) + +(defclass xcb:xvmc:CreateContext + (xcb:-request) + ((~opcode :initform 2 :type xcb:-u1) + (context-id :initarg :context-id :type xcb:xvmc:CONTEXT) + (port-id :initarg :port-id :type xcb:xv:PORT) + (surface-id :initarg :surface-id :type xcb:xvmc:SURFACE) + (width :initarg :width :type xcb:CARD16) + (height :initarg :height :type xcb:CARD16) + (flags :initarg :flags :type xcb:CARD32))) +(defclass xcb:xvmc:CreateContext~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (width-actual :initarg :width-actual :type xcb:CARD16) + (height-actual :initarg :height-actual :type xcb:CARD16) + (flags-return :initarg :flags-return :type xcb:CARD32) + (pad~1 :initform 20 :type xcb:-pad) + (priv-data~ :initform + '(name priv-data type xcb:CARD32 size + (xcb:-fieldref 'length)) + :type xcb:-list) + (priv-data :initarg :priv-data :type xcb:-ignore))) + +(defclass xcb:xvmc:DestroyContext + (xcb:-request) + ((~opcode :initform 3 :type xcb:-u1) + (context-id :initarg :context-id :type xcb:xvmc:CONTEXT))) + +(defclass xcb:xvmc:CreateSurface + (xcb:-request) + ((~opcode :initform 4 :type xcb:-u1) + (surface-id :initarg :surface-id :type xcb:xvmc:SURFACE) + (context-id :initarg :context-id :type xcb:xvmc:CONTEXT))) +(defclass xcb:xvmc:CreateSurface~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (pad~1 :initform 24 :type xcb:-pad) + (priv-data~ :initform + '(name priv-data type xcb:CARD32 size + (xcb:-fieldref 'length)) + :type xcb:-list) + (priv-data :initarg :priv-data :type xcb:-ignore))) + +(defclass xcb:xvmc:DestroySurface + (xcb:-request) + ((~opcode :initform 5 :type xcb:-u1) + (surface-id :initarg :surface-id :type xcb:xvmc:SURFACE))) + +(defclass xcb:xvmc:CreateSubpicture + (xcb:-request) + ((~opcode :initform 6 :type xcb:-u1) + (subpicture-id :initarg :subpicture-id :type xcb:xvmc:SUBPICTURE) + (context :initarg :context :type xcb:xvmc:CONTEXT) + (xvimage-id :initarg :xvimage-id :type xcb:CARD32) + (width :initarg :width :type xcb:CARD16) + (height :initarg :height :type xcb:CARD16))) +(defclass xcb:xvmc:CreateSubpicture~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (width-actual :initarg :width-actual :type xcb:CARD16) + (height-actual :initarg :height-actual :type xcb:CARD16) + (num-palette-entries :initarg :num-palette-entries :type xcb:CARD16) + (entry-bytes :initarg :entry-bytes :type xcb:CARD16) + (component-order~ :initform + '(name component-order type xcb:CARD8 size 4) + :type xcb:-list) + (component-order :initarg :component-order :type xcb:-ignore) + (pad~1 :initform 12 :type xcb:-pad) + (priv-data~ :initform + '(name priv-data type xcb:CARD32 size + (xcb:-fieldref 'length)) + :type xcb:-list) + (priv-data :initarg :priv-data :type xcb:-ignore))) + +(defclass xcb:xvmc:DestroySubpicture + (xcb:-request) + ((~opcode :initform 7 :type xcb:-u1) + (subpicture-id :initarg :subpicture-id :type xcb:xvmc:SUBPICTURE))) + +(defclass xcb:xvmc:ListSubpictureTypes + (xcb:-request) + ((~opcode :initform 8 :type xcb:-u1) + (port-id :initarg :port-id :type xcb:xv:PORT) + (surface-id :initarg :surface-id :type xcb:xvmc:SURFACE))) +(defclass xcb:xvmc:ListSubpictureTypes~reply + (xcb:-reply) + ((pad~0 :initform 1 :type xcb:-pad) + (~sequence :type xcb:CARD16) + (length :type xcb:CARD32) + (num :initarg :num :type xcb:CARD32) + (pad~1 :initform 20 :type xcb:-pad) + (types~ :initform + '(name types type xcb:xv:ImageFormatInfo size + (xcb:-fieldref 'num)) + :type xcb:-list) + (types :initarg :types :type xcb:-ignore))) + + + +(provide 'xcb-xvmc) + +;;; xcb-xvmc.el ends here diff --git a/elpa/xelb-0.18/xcb.el b/elpa/xelb-0.18/xcb.el new file mode 100644 index 0000000..128bdf8 --- /dev/null +++ b/elpa/xelb-0.18/xcb.el @@ -0,0 +1,872 @@ +;;; xcb.el --- X protocol Emacs Lisp Binding (XELB) -*- lexical-binding: t -*- + +;; Copyright (C) 2015-2019 Free Software Foundation, Inc. + +;; Author: Chris Feng + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This library mainly provides methods for `xcb:connection', a opaque class +;; encapsulating all information concerning an X connection. The most +;; frequently used methods are: +;; + Open/Close connection +;; - `xcb:connect' +;; - `xcb:disconnect' +;; + Request/Reply/Error (asynchronous) +;; - `xcb:+request' +;; - `xcb:+request-checked' +;; - `xcb:+request-unchecked' +;; - `xcb:+reply' +;; - `xcb:request-check' +;; + Request/Reply/Error (synchronous) +;; - `xcb:+request+reply' +;; - `xcb:+request-checked+request-check' +;; - `xcb:+request-unchecked+reply' +;; + Event handling +;; - `xcb:+event' +;; + Misc. +;; - `xcb:flush' +;; - `xcb:generate-id' +;; Please refer to their documentations for more details. + +;; Todo: +;; + Use XC-MISC extension for `xcb:generate-id' when IDs are used up. + +;; References: +;; + X protocol (http://www.x.org/releases/X11R7.7/doc/xproto/x11protocol.txt) + +;;; Code: + +(eval-when-compile (require 'cl-lib)) +(require 'xcb-xproto) + +(defvar xcb:connection-timeout 3 "Connection timeout.") + +;;;; X connection related + +(defclass xcb:connection (xcb:--struct) + ((process :initarg :process :initform nil) + (connected :initform nil) ;non-nil indicates connected to X server + (display :initarg :display :initform nil) + (auth-info :initarg :auth-info :initform nil) + (socket :initarg :socket :initform nil) + (lock :initform nil) + (setup-data :initform nil) ;X connection setup data + (request-cache :initform []) ;cache for outgoing requests + (message-cache :initform []) ;cache for incoming messages + (event-lock :initform 0) + (event-queue :initform nil) + (error-plist :initform nil) + (reply-plist :initform nil) + (event-plist :initform nil) + (extension-plist :initform nil) + (extension-opcode-plist :initform nil) + (extension-first-error-alist :initform nil) + (extension-first-event-alist :initform nil) + (request-sequence :initform 0) + (last-seen-sequence :initform 0) + (xid :initform 0) ;last used X resource ID + (extra-plist :initform nil)) ;for storing extra data (e.g. by extensions) + :documentation "X connection.") + +(defclass xcb:auth-info (xcb:--struct) + ((name :initarg :name :initform "" :type string) + (data :initarg :data :initform "" :type string)) + :documentation "X connection authentication info.") + +(cl-defmethod xcb:-get-extra-plist ((conn xcb:connection) module prop) + "Get the value of PROP from the extra plist for module MODULE." + (plist-get (plist-get (slot-value conn 'extra-plist) module) prop)) + +(cl-defmethod xcb:-set-extra-plist ((conn xcb:connection) module prop val) + "Set the value of PROP in the extra plist for module MODULE to VAL." + (with-slots (extra-plist) conn + (setf extra-plist + (plist-put extra-plist module + (plist-put (plist-get extra-plist module) prop val))))) + +(defun xcb:connect (&optional display _screen) + "Connect to X server with display DISPLAY." + (declare (advertised-calling-convention (&optional display) "25.1")) + (unless display (setq display (frame-parameter nil 'display))) + (unless display (error "[XELB] No X display available")) + (let ((socket (xcb:display->socket display))) + (if (file-exists-p socket) + (xcb:connect-to-socket socket) + (xcb:connect-to-display-with-auth-info display)))) + +(defun xcb:display->socket (display) + "Convert X11 display DISPLAY to its corresponding socket." + (concat "/tmp/.X11-unix/X" + (replace-regexp-in-string ".*:\\([^\\.]+\\).*" "\\1" display))) + +(defun xcb:connect-to-display-with-auth-info (&optional display auth _screen) + "Connect to X server with display DISPLAY, auth info AUTH." + (declare (advertised-calling-convention (&optional display auth) "25.1")) + (unless display (setq display (frame-parameter nil 'display))) + (unless display (error "[XELB] No X display available")) + (let* ((tmp (xcb:parse-display display)) + (host (cdr (assoc 'host tmp))) + (host (if (string= "" host) 'local host)) + (dpy (cdr (assoc 'display tmp))) + (process (make-network-process :name "XELB" + :host host + :service (+ 6000 dpy))) + (auth-info (if auth auth (xcb:create-auth-info))) + (connection (make-instance 'xcb:connection + :process process + :display display :auth-info auth-info))) + (xcb:-connect connection) + connection)) + +(defun xcb:parse-display (name) + "Parse X Display name NAME." + (let ((host (replace-regexp-in-string "\\(.*\\):.*" "\\1" name)) + (display (replace-regexp-in-string ".*:\\([^\\.]+\\).*" "\\1" name)) + (screen + (replace-regexp-in-string ".*:[^\\.]+\\.?\\(.*\\)" "\\1" name))) + (setq display (string-to-number display)) + (setq screen (if (string= "" screen) 0 (string-to-number screen))) + `((host . ,host) (display . ,display) (screen . ,screen)))) + +(defun xcb:create-auth-info () + "Create the default `auth-info'." + (let ((xauth-output (shell-command-to-string + (concat + "xauth list " + (replace-regexp-in-string "^localhost" "" + (getenv "DISPLAY")) + " 2>/dev/null"))) + (name "MIT-MAGIC-COOKIE-1") ;only support MIT-MAGIC-COOKIE-1 protocol. + (data "")) + (if (string= "" xauth-output) + ;; No xauth entry available. + (setq name "") + (setq xauth-output (split-string xauth-output)) + (if (string= name (car (last xauth-output 2))) + ;; The auth data is a 128-bit hex string. + (setq data (car (last xauth-output)) + data + (concat + (cl-loop for i in (number-sequence 0 30 2) + collect (string-to-number + (substring data + i (+ i 2)) + 16)))) + ;; No xauth entry available. + (setq name ""))) + (make-instance 'xcb:auth-info :name name :data data))) + +(defun xcb:connect-to-socket (&optional socket auth-info) + "Connect to X server with socket SOCKET and authentication info AUTH-INFO." + (unless (or socket (frame-parameter nil 'display)) + (error "[XELB] No X display available")) + (let (display) + (if socket + ;; As there is no general way to deduce the display name from an X11 + ;; socket, we assume a standard SOCKET name and hope for the best. + (setq display + (concat ":" ;local + (replace-regexp-in-string "^.*?\\([0-9.]+\\)$" "\\1" + socket))) + (setq display (frame-parameter nil 'display) + socket (xcb:display->socket display))) + (let* ((process (make-network-process :name "XELB" :remote socket)) + (auth (if auth-info auth-info (xcb:create-auth-info))) + (connection (make-instance 'xcb:connection + :process process :display display + :auth-info auth :socket socket))) + (xcb:-connect connection) + connection))) + +(cl-defmethod xcb:-connect ((obj xcb:connection)) + "Connect to X server." + (let* ((process (slot-value obj 'process)) + (auth-info (slot-value obj 'auth-info)) + (aname (slot-value auth-info 'name)) + (adata (slot-value auth-info 'data))) + (set-process-plist process + (plist-put (process-plist process) 'connection obj)) + (set-process-coding-system process 'binary 'binary) + (set-process-filter process #'xcb:-connection-setup-filter) + (process-send-string ;send setup packet + process + (apply #'unibyte-string + (append ;convert vector to string + (xcb:marshal + (make-instance 'xcb:SetupRequest + :byte-order (if xcb:lsb #x6c #x42) + :protocol-major-version 11 + :protocol-minor-version 0 + :authorization-protocol-name-len (length aname) + :authorization-protocol-data-len (length adata) + :authorization-protocol-name aname + :authorization-protocol-data adata)) + nil))) + ;; Wait for setup data ready + (with-timeout (xcb:connection-timeout (xcb:disconnect obj) + (error "[XELB] Connection timeout")) + (while (not (slot-value obj 'setup-data)) + (accept-process-output process 1 nil 1))))) + +(defconst xcb:-SEQUENCE-SEGMENT-MASK (lognot #xFFFF)) + +(defun xcb:-connection-setup-filter (process message) + "Process filter used during connection setup." + (let* ((connection (plist-get (process-plist process) 'connection)) + (cache (vconcat (slot-value connection 'message-cache) message))) + (setf (slot-value connection 'message-cache) cache) + (unless (or (slot-value connection 'lock) + ;; Shorter than the setup header. + (> 8 (length cache))) + (setf (slot-value connection 'lock) t) + (let ((data-len (+ 8 (* 4 (if xcb:lsb + (xcb:-unpack-u2-lsb cache 6) + (xcb:-unpack-u2 cache 6))))) + obj) + (when (>= (length cache) data-len) + (xcb:-log "Setup response: %s" cache) + (pcase (aref cache 0) + (0 + ;; Connection failed. + (setq obj (make-instance 'xcb:SetupFailed)) + (xcb:unmarshal obj cache) + (setq cache (substring cache data-len)) + (error "[XELB] Connection failed: %s" (slot-value obj 'reason))) + (1 + ;; Connection established. + (setf (slot-value connection 'message-cache) []) + (set-process-filter process #'xcb:-connection-filter) + (setq obj (make-instance 'xcb:Setup)) + (xcb:unmarshal obj cache) + (setq cache (substring cache data-len)) + (setf (slot-value connection 'setup-data) obj) + (setf (slot-value connection 'connected) t)) + (2 + ;; Authentication required. + (setq obj (make-instance 'xcb:SetupAuthenticate)) + (xcb:unmarshal obj cache) + (setq cache (substring cache data-len)) + (error "[XELB] Authentication not supported: %s" + (slot-value obj 'reason))) + (x (error "Unrecognized setup status: %d" x))))) + (setf (slot-value connection 'lock) nil)))) + +(cl-defmethod xcb:-convert-sequence ((obj xcb:connection) sequence16) + "Convert 16-bit sequence number SEQUENCE16 (read from a packet). + +The result would be 29 or 61 bits, depending on the machine." + (with-slots (request-sequence) obj + ;; Assume there are no more than #xFFFF requests sent since the + ;; request corresponding to this packet was made. Because errors + ;; and replies are always read out in the process filter, this + ;; assumption is quite safe. + (let ((sequence (logior (logand request-sequence + xcb:-SEQUENCE-SEGMENT-MASK) + sequence16))) + ;; `xcb:-cache-request' ensures sequence number never wraps. + (when (> sequence request-sequence) + (cl-decf sequence #x10000)) + sequence))) + +(defun xcb:-connection-filter (process message) + "Filter function for an X connection. + +Concurrency is disabled as it breaks the orders of errors, replies and events." + (let* ((connection (plist-get (process-plist process) 'connection)) + ;; Temporarily disable GC here as typically it's about to do + ;; lots of marshaling/unmarshaling. + (gc-cons-threshold most-positive-fixnum) + (cache (vconcat (slot-value connection 'message-cache) message)) + (cache-length (length cache))) + (setf (slot-value connection 'message-cache) cache) + (unless (slot-value connection 'lock) + ;; Start parsing message + (setf (slot-value connection 'lock) t) + ;; Process error/reply/event + (catch 'break + (while (<= 32 (length cache)) + (pcase (aref cache 0) + (0 ;error + (xcb:-log "Error received: %s" (substring cache 0 32)) + (let ((sequence (funcall (if xcb:lsb #'xcb:-unpack-u2-lsb + #'xcb:-unpack-u2) + cache 2)) + (plist (slot-value connection 'error-plist)) + struct) + (setq sequence (xcb:-convert-sequence connection sequence)) + (when (plist-member plist sequence) + (setq struct (plist-get plist sequence)) + (setf (slot-value connection 'error-plist) + (plist-put plist sequence + (push `(,(aref cache 1) . + ,(substring cache 0 32)) + struct)))) + (setq cache (substring cache 32)) + (setf (slot-value connection 'last-seen-sequence) sequence))) + (1 ;reply + (let* ((reply-words (funcall (if xcb:lsb #'xcb:-unpack-u4-lsb + #'xcb:-unpack-u4) + cache 4)) + (reply-length (+ 32 (* 4 reply-words))) + struct sequence plist) + (when (< (length cache) reply-length) ;too short, do next time + (throw 'break nil)) + (xcb:-log "Reply received: %s" (substring cache 0 reply-length)) + (setq sequence (funcall (if xcb:lsb #'xcb:-unpack-u2-lsb + #'xcb:-unpack-u2) + cache 2) + sequence (xcb:-convert-sequence connection sequence)) + (setq plist (slot-value connection 'reply-plist)) + (setq struct (plist-get plist sequence)) + (when struct + (setf (slot-value connection 'reply-plist) + (plist-put plist sequence + (if (symbolp struct) + ;; Single reply or + ;; first reply for multiple replies + (list struct + (substring cache 0 reply-length)) + ;; Multiple replies + `(,(car struct) ,@(cdr struct) + ,(substring cache 0 reply-length)))))) + (setq cache (substring cache reply-length)) + (setf (slot-value connection 'last-seen-sequence) sequence))) + (x ;event + (let (synthetic listener event-length) + (when (/= 0 (logand x #x80)) ;synthetic event + (setq synthetic t + x (logand x #x7f))) ;low 7 bits is the event number + (setq listener + (plist-get (slot-value connection 'event-plist) x)) + (pcase listener + (`xge + (setq event-length (funcall (if xcb:lsb + #'xcb:-unpack-u4-lsb + #'xcb:-unpack-u4) + cache 4) + ;; event-length indicates additional words to the + ;; first 32 bytes. + event-length (+ 32 (* 4 event-length))) + (when (< (length cache) event-length) + ;; Too short. + (throw 'break nil)) + (setq listener + (lax-plist-get (slot-value connection 'event-plist) + (vector (aref cache 1) + (funcall + (if xcb:lsb + #'xcb:-unpack-u2-lsb + #'xcb:-unpack-u2) + cache 8))))) + (`xkb + (setq listener + (lax-plist-get (slot-value connection 'event-plist) + (vector (aref cache 1)))))) + ;; Conventional events are 32 bytes in size. + (unless event-length + (setq event-length 32)) + (when listener + (with-slots (event-queue) connection + (setf event-queue (nconc event-queue + `([,listener + ,(substring cache 0 + event-length) + ,synthetic]))))) + (xcb:-log "Event received: %s" (substring cache 0 event-length)) + (setq cache (substring cache event-length))))))) + (setf (slot-value connection 'lock) nil)) + (unless (slot-value connection 'lock) + (with-slots (message-cache) connection + (let ((current-cache-length (length message-cache))) + (setf message-cache + (substring message-cache (- cache-length (length cache)))) + (when (/= current-cache-length cache-length) + (xcb:-connection-filter process [])))) + (xcb:-process-events connection)))) + +(cl-defmethod xcb:-process-events ((conn xcb:connection)) + "Process cached events." + (with-slots (event-lock event-queue) conn + (unless (< 0 event-lock) + (cl-incf event-lock) + (unwind-protect + (let (event data synthetic) + (while (setq event (pop event-queue)) + (setq data (aref event 1) + synthetic (aref event 2)) + (dolist (listener (aref event 0)) + (unwind-protect + (xcb-debug:backtrace-on-error + (funcall listener data synthetic)))))) + (cl-decf event-lock))))) + +(cl-defmethod xcb:disconnect ((obj xcb:connection)) + "Disconnect from X server." + (when (slot-value obj 'connected) + (xcb:flush obj) + (delete-process (slot-value obj 'process)) + ;; Reset every slot to its default value + (let ((slots (eieio-class-slots 'xcb:connection))) + (dolist (slot slots) + (setf (slot-value obj (eieio-slot-descriptor-name slot)) + (eieio-oref-default obj (eieio-slot-descriptor-name slot))))))) + +;;;; Other routines + +(cl-defmethod xcb:get-setup ((obj xcb:connection)) + "Get the setup info of X connection OBJ." + (slot-value obj 'setup-data)) + +(cl-defmethod xcb:get-socket ((obj xcb:connection)) + "Get the socket of X connection OBJ." + (slot-value obj 'socket)) + +(cl-defmethod xcb:get-maximum-request-length ((obj xcb:connection)) + "Get maximum request length from setup data." + (slot-value (xcb:get-setup obj) 'maximum-request-length)) + +(cl-defmethod xcb:+event ((obj xcb:connection) event listener) + "Attach function LISTENER to event EVENT. + +Note that event listeners attached this way are shared with the super- and sub- +classes of EVENT (since they have the same event number)." + (let* ((event-number (xcb:-error-or-event-class->number obj event)) + (plist (slot-value obj 'event-plist)) + key listeners) + (when (consp event-number) + (setq key (car event-number) + event-number (cdr event-number) + listeners (plist-get plist key)) + ;; Add a placeholder. + (setf (slot-value obj 'event-plist) + (plist-put plist key + (if (child-of-class-p event 'xcb:-generic-event) + 'xge 'xkb)))) + (setq listeners (lax-plist-get plist event-number)) + (setf (slot-value obj 'event-plist) + (lax-plist-put plist event-number (append listeners + (list listener)))))) + +(cl-defmethod xcb:flush ((obj xcb:connection)) + "Flush request data to X server." + (let ((cache (slot-value obj 'request-cache))) + (when (< 0 (length cache)) + (setf (slot-value obj 'request-cache) []) ;should be cleared ASAP + (cl-incf (slot-value obj 'event-lock)) + (unwind-protect + (process-send-string (slot-value obj 'process) + (apply #'unibyte-string (append cache nil))) + (cl-decf (slot-value obj 'event-lock))) + (xcb:-process-events obj)))) + +(cl-defmethod xcb:get-extension-data ((obj xcb:connection) namespace) + "Fetch the extension data from X server (block until data is retrieved)." + (let* ((plist (slot-value obj 'extension-plist)) + (data (plist-get plist namespace))) + (if (eieio-object-p data) + data + (when (not data) ;the request has not been made + (xcb:prefetch-extension-data obj namespace)) + (setq data (xcb:-+reply obj (plist-get (slot-value obj 'extension-plist) + namespace))) + (when (cadr data) ;has error + (error "[XELB] %s" (cadr data))) + (setq data (car data)) + (setf (slot-value obj 'extension-plist) (plist-put plist namespace data)) + ;; Cache major opcode, first event and first error if possible + (with-slots (present major-opcode first-event first-error) data + (when (= 1 present) + (setf (slot-value obj 'extension-opcode-plist) + (plist-put (slot-value obj 'extension-opcode-plist) + namespace major-opcode) + (slot-value obj 'extension-first-event-alist) + (nconc (slot-value obj 'extension-first-event-alist) + `((,namespace . ,first-event))) + (slot-value obj 'extension-first-error-alist) + (nconc (slot-value obj 'extension-first-error-alist) + `((,namespace . ,first-error)))))) + data))) + +(cl-defmethod xcb:prefetch-extension-data ((obj xcb:connection) namespace) + "Prefetch the extension data from X server." + (when (not (plist-get (slot-value obj 'extension-plist) namespace)) + (let* ((extension-xname + (symbol-value (intern-soft (concat (symbol-name namespace) + ":-extension-xname")))) + (sequence + (xcb:-+request obj + (make-instance 'xcb:QueryExtension + :name-len (length extension-xname) + :name extension-xname)))) + (setf (slot-value obj 'extension-plist) + (plist-put (slot-value obj 'extension-plist) namespace sequence)) + (xcb:flush obj)))) + +(cl-defmethod xcb:generate-id ((obj xcb:connection)) + "Generate new X ID." + (let* ((setup (xcb:get-setup obj)) + (base (slot-value setup 'resource-id-base)) + (mask (slot-value setup 'resource-id-mask)) + (increment (logand mask (- mask))) + (xid (+ (slot-value obj 'xid) increment))) + (when (> xid mask) + (error "[XELB] Unable to allocate new X resource ID")) + (setf (slot-value obj 'xid) xid) + (logior base xid))) + +;;;; Request related + +(cl-defmethod xcb:-cache-request ((obj xcb:connection) request) + "Send (or cache) a request and return the sequence number." + (let* ((namespace + (intern (replace-regexp-in-string + ":[^:]+$" "" (symbol-name + (eieio-object-class request))))) + (extension-opcode + (plist-get (slot-value obj 'extension-opcode-plist) namespace)) + (msg (xcb:marshal request)) + (len (+ 2 (length msg))) + (cache (slot-value obj 'request-cache))) + (when extension-opcode + (setq msg (vconcat (vector extension-opcode) msg)) + (setq len (1+ len))) + (when (> 2 (length msg)) ;for short message (e.g. GetInputFocus) + (setq msg (vconcat msg [0])) + (setq len (1+ len))) + (setq msg + (vconcat (substring msg 0 2) + (funcall (if (slot-value request '~lsb) #'xcb:-pack-u2-lsb + #'xcb:-pack-u2) + (ceiling len 4)) + (substring msg 2) + (make-vector (% (- 4 (% len 4)) 4) 0))) ;required sometimes + (when (< (xcb:get-maximum-request-length obj) + (+ (length msg) (length cache))) ;flush on cache full + (xcb:flush obj) + (setq cache [])) + (with-slots (request-cache request-sequence last-seen-sequence) obj + (when (>= request-sequence most-positive-fixnum) + ;; Force wrapping the sequence number. + (xcb:aux:sync obj) + (setf request-sequence 0 + last-seen-sequence 0)) + (setf request-cache (vconcat cache msg) + request-sequence (1+ request-sequence)) + (xcb:-log "Cache request #%d: %s" request-sequence msg) + request-sequence))) + +(cl-defmethod xcb:-+request ((obj xcb:connection) request) + (let ((sequence (xcb:-cache-request obj request)) + (class (eieio-object-class request))) + (when (fboundp (xcb:-request-class->reply-class class)) + ;; This request has a reply + (setf (slot-value obj 'reply-plist) ;require reply + (plist-put (slot-value obj 'reply-plist) sequence class)) + (setf (slot-value obj 'error-plist) ;require error + (plist-put (slot-value obj 'error-plist) sequence nil))) + sequence)) + +(defmacro xcb:+request (obj request) + "Make a request. + +If the request has a reply, then errors will also be available (if any). +Otherwise no error will ever be reported." + (declare (indent 2)) + `(xcb:-+request ,obj ,request)) + +(cl-defmethod xcb:-+request-checked ((obj xcb:connection) request) + (when (fboundp + (xcb:-request-class->reply-class (eieio-object-class request))) + (error "This method shall not be called with request that has a reply")) + (let ((sequence (xcb:-cache-request obj request))) + (setf (slot-value obj 'error-plist) + (plist-put (slot-value obj 'error-plist) sequence nil)) + sequence)) + +(defmacro xcb:+request-checked (obj request) + "Make a request (which have no reply) and check for errors." + (declare (indent 2)) + `(xcb:-+request-checked ,obj ,request)) + +(cl-defmethod xcb:-+request-unchecked ((obj xcb:connection) request) + (unless (fboundp + (xcb:-request-class->reply-class (eieio-object-class request))) + (error "This method shall not be called with request that has no reply")) + (let ((sequence (xcb:-cache-request obj request))) + (setf (slot-value obj 'reply-plist) + (plist-put (slot-value obj 'reply-plist) + sequence (eieio-object-class request))) + sequence)) + +(defmacro xcb:+request-unchecked (obj request) + "Make a request (which have at least a reply) and discard any error." + (declare (indent 2)) + `(xcb:-+request-unchecked ,obj ,request)) + +(cl-defmethod xcb:-+reply ((obj xcb:connection) sequence &optional multiple) + (unless (plist-member (slot-value obj 'reply-plist) sequence) + (error "This method is intended for requests with replies")) + (xcb:flush obj) ;or we may have to wait forever + (if multiple + ;; Multiple replies + (xcb:aux:sync obj) + ;; Single reply + (let ((process (slot-value obj 'process))) + ;; Wait until the request processed + (cl-incf (slot-value obj 'event-lock)) + (unwind-protect + (with-timeout (xcb:connection-timeout + (warn "[XELB] Retrieve reply timeout")) + (while (and (> sequence (slot-value obj 'last-seen-sequence)) + (<= sequence (slot-value obj 'request-sequence))) + (accept-process-output process 1 nil 1))) + (cl-decf (slot-value obj 'event-lock))) + (xcb:-process-events obj))) + (let* ((reply-plist (slot-value obj 'reply-plist)) + (reply-data (plist-get reply-plist sequence)) + (error-plist (slot-value obj 'error-plist)) + (error-data (plist-get error-plist sequence)) + class-name reply replies error errors) + (if (symbolp reply-data) + (setq replies nil) ;no reply + (setq class-name (xcb:-request-class->reply-class (car reply-data))) + (if multiple + ;; Multiple replies + (dolist (i (cdr reply-data)) + (setq reply (make-instance class-name)) + (xcb:unmarshal reply i) + (setq replies (nconc replies (list reply)))) + ;; Single reply + (setq reply-data (cadr reply-data) + replies (make-instance class-name)) + (xcb:unmarshal replies reply-data))) + (setq errors + (mapcar (lambda (i) + (setq error (make-instance + (xcb:-error-number->class obj (car i)))) + (xcb:unmarshal error (cdr i)) + error) + error-data)) + (cl-remf (slot-value obj 'reply-plist) sequence) + (cl-remf (slot-value obj 'error-plist) sequence) + (list replies errors))) + +(defmacro xcb:+reply (obj sequence &optional multiple) + "Return the reply of a request of which the sequence number is SEQUENCE. + +If MULTIPLE is nil, the return value is the only reply, or it returns a list of +all replies. + +WARNING: for requests that have multiple replies, you MUST supply a non-nil +MULTIPLE value, or some replies may be lost!" + (declare (indent 2)) + `(xcb:-+reply ,obj ,sequence ,multiple)) + +(cl-defmethod xcb:-request-check ((obj xcb:connection) sequence) + (when (plist-member (slot-value obj 'reply-plist) sequence) + (error "This method is intended for requests with no reply")) + (xcb:flush obj) ;or we may have to wait forever + (let ((error-plist (slot-value obj 'error-plist)) + error-obj tmp) + (unless (plist-member error-plist sequence) + (error "This method shall be called after `xcb:+request-checked'")) + (when (> sequence (slot-value obj 'last-seen-sequence)) + (xcb:aux:sync obj)) ;wait until the request is processed + (setq error-obj + (mapcar (lambda (i) + (setq tmp (cdr i) + i (make-instance + (xcb:-error-number->class obj (car i)))) + (xcb:unmarshal i tmp) + i) + (plist-get error-plist sequence))) + (cl-remf (slot-value obj 'error-plist) sequence) + error-obj)) + +(defmacro xcb:request-check (obj sequence) + "Return the error of the request of which the sequence number is SEQUENCE. + +The sequence number shall be returned by `xcb:+request-checked'." + (declare (indent 2)) + `(xcb:-request-check ,obj ,sequence)) + +(defmacro xcb:+request+reply (obj request &optional multiple) + "Make a request and return its replies and errors. + +If MULTIPLE is nil, the return value is a list of which the car is the only +reply and the cadr a list of errors. Otherwise, the car of the result is a +list of replies. + +WARNING: for requests that have multiple replies, you MUST supply a non-nil +MULTIPLE value, or some replies may be lost!" + (declare (indent 2)) + `(xcb:-+reply ,obj (xcb:-+request ,obj ,request) ,multiple)) + +(defmacro xcb:+request-checked+request-check (obj request) + "Make a request (which has no reply) and return the errors." + (declare (indent 2)) + `(xcb:-request-check ,obj (xcb:-+request-checked ,obj ,request))) + +(defmacro xcb:+request-unchecked+reply (obj request &optional multiple) + "Make a request (that has at least one reply) and only return the reply. + +If MULTIPLE is nil, the return value is the only reply, or it returns a list of +all replies. + +WARNING: for requests that have multiple replies, you MUST supply a non-nil +MULTIPLE value, or some replies may be lost!" + (declare (indent 2)) + `(car (xcb:-+reply ,obj (xcb:-+request-unchecked ,obj ,request) ,multiple))) + +;;;; Misc. + +(cl-defmethod xcb:aux:sync ((obj xcb:connection)) + "Force sync with X server. + +Sync by sending a GetInputFocus request and waiting until it's processed." + (let ((sequence (xcb:-cache-request obj (make-instance 'xcb:GetInputFocus))) + (process (slot-value obj 'process))) + (xcb:flush obj) + ;; Wait until request processed + (cl-incf (slot-value obj 'event-lock)) + (unwind-protect + (with-timeout (xcb:connection-timeout (warn "[XELB] Sync timeout")) + (while (and (> sequence (slot-value obj 'last-seen-sequence)) + ;; In case the sequence number has been wrapped. + (<= sequence (slot-value obj 'request-sequence))) + (accept-process-output process 1 nil 1))) + (cl-decf (slot-value obj 'event-lock))) + (xcb:-process-events obj) + ;; Discard any reply or error. + (cl-remf (slot-value obj 'reply-plist) sequence) + (cl-remf (slot-value obj 'error-plist) sequence))) + +(cl-defmethod xcb:-error-or-event-class->number ((obj xcb:connection) class) + "Return the error/event number of a error/event class CLASS. + +If CLASS is a generic event, return (XGE-CODE . [EXTENSION EVTYPE]); +Or if it's an XKB event, return (XKB-EVENT-CODE [XKB-CODE])." + (unless (symbolp class) (setq class (eieio-class-name class))) + (let ((prefix (replace-regexp-in-string ":[^:]+$" ":" (symbol-name class))) + first-code alist result parents) + (cond + ((child-of-class-p class 'xcb:-error) + ;; Error. + (if (string= prefix "xcb:") + (setq first-code 0 + alist xcb:error-number-class-alist) + (setq first-code + (cdr (assq (intern (substring prefix 0 -1)) + (slot-value obj + 'extension-first-error-alist))) + alist (symbol-value + (intern-soft (concat prefix + "error-number-class-alist"))))) + (setq result (car (rassq class alist))) + (when result + (setq result (+ first-code result)))) + ((child-of-class-p class 'xcb:-generic-event) + ;; Generic event. + (setq alist (symbol-value + (intern-soft (concat prefix "xge-number-class-alist"))) + result (plist-get (slot-value obj 'extension-opcode-plist) + (intern-soft (substring prefix 0 -1)))) + ;; Ensure the extension has been initialized. + (when result + (setq result `(35 . [,result ,(car (rassq class alist))])))) + ((string= prefix "xcb:xkb:") + ;; XKB event. + (eval-and-compile (require 'xcb-xkb)) + ;; XKB uses a single event code for all events. + (setq result (cdr (assq 'xcb:xkb + (slot-value obj 'extension-first-event-alist)))) + ;; Ensure the XKB extension has been initialized. + (when result + (setq alist xcb:xkb:event-number-class-alist + result `(,result . [,(car (rassq class alist))])))) + (t + ;; Other event. + (if (string= prefix "xcb:") + (setq first-code 0 + alist xcb:event-number-class-alist) + (setq first-code + (cdr (assq (intern (substring prefix 0 -1)) + (slot-value obj 'extension-first-event-alist))) + alist (symbol-value + (intern-soft (concat prefix + "event-number-class-alist"))))) + (setq result (car (rassq class alist))) + (when result + (setq result (+ first-code result))))) + (unless result + ;; Fallback to use the error/event number of one superclass. Thus if the + ;; error/event number of a subclass differs from that of its parent, it + ;; must be explicitly pointed out. + (setq parents (eieio-class-parents class)) + (while (and parents (not result)) + (setq result (xcb:-error-or-event-class->number obj (pop parents))))) + result)) + +(cl-defmethod xcb:-event-number->class ((obj xcb:connection) number) + "Return the event class that has the event number NUMBER. + +Note that when multiple events have the same number, only the top-most +superclass will be returned." + (if (or (< number 64) (> number 127)) + ;; Xproto event + (cdr (assoc number xcb:event-number-class-alist)) + ;; Extension event + (let ((first-event number) + namespace index alist) + (while (and (not namespace) (>= first-event 64)) + (setq namespace + (car (rassoc first-event + (slot-value obj 'extension-first-event-alist))) + first-event (1- first-event))) + (setq index (- number first-event 1)) + (setq alist (intern-soft (concat (symbol-name namespace) + ":event-number-class-alist"))) + (cdr (assoc index (symbol-value alist)))))) + +(cl-defmethod xcb:-error-number->class ((obj xcb:connection) number) + "Return the error class that has the error number NUMBER. + +Note that when multiple errors have the same number, only the top-most +superclass will be returned." + (if (or (< number 128) (> number 255)) + ;; Xproto error + (cdr (assoc number xcb:error-number-class-alist)) + ;; Extension error + (let ((first-error number) + namespace index alist) + (while (and (not namespace) (>= first-error 128)) + (setq namespace + (car (rassoc first-error + (slot-value obj 'extension-first-error-alist))) + first-error (1- first-error))) + (setq index (- number first-error 1)) + (setq alist (intern-soft (concat (symbol-name namespace) + ":error-number-class-alist"))) + (cdr (assoc index (symbol-value alist)))))) + + + +(provide 'xcb) + +;;; xcb.el ends here diff --git a/elpa/xelb-0.18/xelb.el b/elpa/xelb-0.18/xelb.el new file mode 100644 index 0000000..f551e28 --- /dev/null +++ b/elpa/xelb-0.18/xelb.el @@ -0,0 +1,70 @@ +;;; xelb.el --- X protocol Emacs Lisp Binding -*- lexical-binding: t -*- + +;; Copyright (C) 2015-2019 Free Software Foundation, Inc. + +;; Author: Chris Feng +;; Maintainer: Chris Feng +;; Version: 0.18 +;; Package-Requires: ((emacs "24.4") (cl-generic "0.2")) +;; Keywords: unix +;; URL: https://github.com/ch11ng/xelb + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; Overview +;; -------- +;; XELB (X protocol Emacs Lisp Binding) is a pure Elisp implementation of X11 +;; protocol based on the XML description files from XCB project. It features +;; an object-oriented API and permits a certain degree of concurrency. It +;; should enable you to implement some low-level X11 applications. + +;; How it works +;; ------------ +;; As is well known, X11 is a network-transparent protocol. All its messages, +;; including requests, replies, events, errors, etc are transported over +;; network. Considering that Emacs is powerful enough to do network +;; communication, it is also possible to use Emacs to send / receive those X11 +;; messages. Here we fully exploit the asynchronous feature of network +;; connections in Emacs, making XELB concurrent in a sense. + +;; X11 protocol is somewhat complicated, especially when extension protocols +;; are also concerned. Fortunately, XCB project has managed to describe these +;; protocols as XML files, which are language-neutral and can be used to +;; generate language-specific bindings. In XELB, X messages are represented as +;; 'classes', and their 'methodes' are provided to translate them to / from raw +;; byte arrays conveniently. + +;; Usage +;; ----- +;; Interfaces are mainly defined in 'xcb.el'. Please refer to that file on how +;; to use them. Most of other files are either X11 core / extension protocol +;; libraries (e.g. xcb-randr.el) or utility libraries (e.g. xcb-keysyms.el). +;; Please check the corresponding files for more details. + +;;; Code: + +(require 'xcb) + +;; DO NOT load this library; load 'xcb.el' instead. +;; This dummy file is created as a placeholder as it is required by GNU ELPA. + + + +(provide 'xelb) + +;;; xelb.el ends here diff --git a/init.el b/init.el index ec775b0..89469bb 100644 --- a/init.el +++ b/init.el @@ -111,16 +111,12 @@ :init (ivy-rich-mode 1)) -(require 'workgroups2) -;; Change prefix key (before activating WG) -(setq wg-prefix-key (kbd "C-c z")) - - (use-package general) (general-define-key "C-M-j" 'counsel-switch-buffer - "C-M-t" 'counsel-load-theme) + "C-M-t" 'counsel-load-theme + "C-M-A" 'text-scale-adjust) ;; transparency configuration @@ -155,7 +151,10 @@ ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(package-selected-packages - '(evil-magit magit general workgroups2 ERC dashboard doom-themes counsel ivy-rich which-key rainbow-delimiters doom-modeline use-package shrink-path ivy command-log-mode all-the-icons))) + '(exwm org-inline-pdf mu4e evil-magit magit general workgroups2 ERC dashboard doom-themes counsel ivy-rich which-key rainbow-delimiters doom-modeline use-package shrink-path ivy command-log-mode all-the-icons)) + '(send-mail-function 'smtpmail-send-it) + '(smtpmail-smtp-server "disroot.org") + '(smtpmail-smtp-service 25)) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. @@ -171,4 +170,5 @@ ("C-r" . 'counsel-minibuffer-history))) -(workgroups-mode 1) ; put this one at the bottom of .emacs + +