added stuff

This commit is contained in:
9ahmed 2021-04-15 18:46:01 +05:00
parent 8f64fc420b
commit dc8d6aa9bc
89 changed files with 39283 additions and 51 deletions

View File

@ -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

View File

@ -1 +1 @@
Good signature from 066DAFCB81E42C40 GNU ELPA Signing Agent (2019) <elpasign@elpa.gnu.org> (trust undefined) created at 2021-04-13T02:05:02+0500 using RSA
Good signature from 066DAFCB81E42C40 GNU ELPA Signing Agent (2019) <elpasign@elpa.gnu.org> (trust undefined) created at 2021-04-15T14:05:02+0500 using RSA

View File

@ -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 <msk AT nullpointer DOT dk>")) (:maintainer "Morten Slot Kristensen <msk AT nullpointer DOT dk>") (: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), <k1lowxb [at] gmail [dot] com> <k1low [at] 101000lab [dot] org>")) (:maintainer "k1LoW (Kenichirou Oyama), <k1lowxb [at] gmail [dot] com> <k1low [at] 101000lab [dot] org>") (: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 <https://github.com/bdarcus>")) (:maintainer "Bruce D'Arcus <https://github.com/bdarcus>") (: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 <fxbois AT Google Mail Service>")) (: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 <sergei.nosov [at] gmail.com>")) (:maintainer "Sergei Nosov <sergei.nosov [at] gmail.com>") (: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 <yuhei.maeda_at_gmail.com>")) (: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 <Keitaro dot Miyazaki at gmail dot com>")) (:maintainer "K-talo Miyazaki <Keitaro dot Miyazaki at gmail dot com>") (: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 <bugs * nschum de>")) (:maintainer "Nikolaj Schumacher <bugs * nschum de>") (: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 <chenbin DOT sh AT gmail DOT com>")) (:maintainer "Chen Bin <chenbin DOT sh AT gmail DOT com>") (: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 <l.david.andersson(at)sverige.nu>")) (:maintainer "David Andersson <l.david.andersson(at)sverige.nu>") (: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 <tarao.gnn at gmail.com>")) (:maintainer "INA Lintaro <tarao.gnn at gmail.com>") (: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 <https://github.com/ryrun>")) (:maintainer "Ryrun <https://github.com/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 <athomps at sandia.gov>")) (:maintainer "Rohit Goswami <r95g10 at gmail.com>") (: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 <buzzwordninja not_this_bit@googlemail.com>")) (:maintainer nil . "Johan Lindstrom <buzzwordninja not_this_bit@googlemail.com>") (: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 <k952i4j14x17_at_gmail.com>")) (: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 <frederic.bour(_)lakaban.net>")) (:maintainer "Frédéric Bour <frederic.bour(_)lakaban.net>") (: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 <simon.castellan(_)iuwt.fr>") ("Frédéric Bour <frederic.bour(_)lakaban.net>") ("Thomas Refis <thomas.refis(_)gmail.com>")) (:maintainer "Simon Castellan <simon.castellan(_)iuwt.fr>") (: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 <simon.castellan(_)iuwt.fr>") ("Frédéric Bour <frederic.bour(_)lakaban.net>") ("Thomas Refis <thomas.refis(_)gmail.com>")) (:maintainer "Simon Castellan <simon.castellan(_)iuwt.fr>") (: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 <frederic.bour(_)lakaban.net>")) (:maintainer "Frédéric Bour <frederic.bour(_)lakaban.net>") (: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 <simon.castellan(_)iuwt.fr>") ("Frédéric Bour <frederic.bour(_)lakaban.net>") ("Thomas Refis <thomas.refis(_)gmail.com>")) (:maintainer "Simon Castellan <simon.castellan(_)iuwt.fr>") (: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 <simon.castellan(_)iuwt.fr>") ("Frédéric Bour <frederic.bour(_)lakaban.net>") ("Thomas Refis <thomas.refis(_)gmail.com>")) (:maintainer "Simon Castellan <simon.castellan(_)iuwt.fr>") (: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 <simon.castellan(_)iuwt.fr>") ("Frédéric Bour <frederic.bour(_)lakaban.net>") ("Thomas Refis <thomas.refis(_)gmail.com>")) (:maintainer "Simon Castellan <simon.castellan(_)iuwt.fr>") (: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 <simon.castellan(_)iuwt.fr>") ("Frédéric Bour <frederic.bour(_)lakaban.net>") ("Thomas Refis <thomas.refis(_)gmail.com>")) (:maintainer "Simon Castellan <simon.castellan(_)iuwt.fr>") (: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 <yuhei.maeda_at_gmail.com>")) (: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 <http://github/UndeadKernel>")) (: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 <github.com/ikirill>")) (:maintainer "Kirill Ignatiev <github.com/ikirill>") (: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 <alex@gnu.org>, 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 <tarao.gnn at gmail.com>")) (:maintainer "INA Lintaro <tarao.gnn at gmail.com>") (: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 <tarao.gnn at gmail.com>")) (:maintainer "INA Lintaro <tarao.gnn at gmail.com>") (: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 <tarao.gnn at gmail.com>")) (:maintainer "INA Lintaro <tarao.gnn at gmail.com>") (: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 . "<lompik@ArchOrion>")) (:maintainer nil . "<lompik@ArchOrion>") (: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"))])

1
elpa/exwm-0.24.signed Normal file
View File

@ -0,0 +1 @@
Good signature from 066DAFCB81E42C40 GNU ELPA Signing Agent (2019) <elpasign@elpa.gnu.org> (trust undefined) created at 2020-05-25T02:05:01+0500 using RSA

View File

@ -0,0 +1 @@
README.md

4448
elpa/exwm-0.24/ChangeLog Normal file

File diff suppressed because it is too large Load Diff

View File

@ -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

50
elpa/exwm-0.24/exwm-cm.el Normal file
View File

@ -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 <chris.w.feng@gmail.com>
;; 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 <http://www.gnu.org/licenses/>.
;;; 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

BIN
elpa/exwm-0.24/exwm-cm.elc Normal file

Binary file not shown.

View File

@ -0,0 +1,131 @@
;;; exwm-config.el --- Predefined configurations -*- lexical-binding: t -*-
;; Copyright (C) 2015-2020 Free Software Foundation, Inc.
;; Author: Chris Feng <chris.w.feng@gmail.com>
;; 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 <http://www.gnu.org/licenses/>.
;;; 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

Binary file not shown.

375
elpa/exwm-0.24/exwm-core.el Normal file
View File

@ -0,0 +1,375 @@
;;; exwm-core.el --- Core definitions -*- lexical-binding: t -*-
;; Copyright (C) 2015-2020 Free Software Foundation, Inc.
;; Author: Chris Feng <chris.w.feng@gmail.com>
;; 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 <http://www.gnu.org/licenses/>.
;;; 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 (<X window ID> . <Emacs buffer>).")
(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

Binary file not shown.

View File

@ -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 <chris.w.feng@gmail.com>
;; 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 <http://www.gnu.org/licenses/>.
;;; 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

Binary file not shown.

1221
elpa/exwm-0.24/exwm-input.el Normal file

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -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 <chris.w.feng@gmail.com>
;; 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 <http://www.gnu.org/licenses/>.
;;; 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

Binary file not shown.

View File

@ -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 <chris.w.feng@gmail.com>
;; 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 <http://www.gnu.org/licenses/>.
;;; 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 <Xm/MwmUtil.h> 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 <Xm/MwmUtil.h> 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

Binary file not shown.

View File

@ -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")

View File

@ -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 <chris.w.feng@gmail.com>
;; 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 <http://www.gnu.org/licenses/>.
;;; 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

Binary file not shown.

View File

@ -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 <chris.w.feng@gmail.com>
;; 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 <http://www.gnu.org/licenses/>.
;;; 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

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

800
elpa/exwm-0.24/exwm-xim.el Normal file
View File

@ -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 <chris.w.feng@gmail.com>
;; 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 <http://www.gnu.org/licenses/>.
;;; 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

BIN
elpa/exwm-0.24/exwm-xim.elc Normal file

Binary file not shown.

1019
elpa/exwm-0.24/exwm.el Normal file

File diff suppressed because it is too large Load Diff

BIN
elpa/exwm-0.24/exwm.elc Normal file

Binary file not shown.

20
elpa/exwm-0.24/xinitrc Normal file
View File

@ -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

View File

@ -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

View File

@ -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")

View File

@ -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

Binary file not shown.

1
elpa/xelb-0.18.signed Normal file
View File

@ -0,0 +1 @@
Good signature from 066DAFCB81E42C40 GNU ELPA Signing Agent (2019) <elpasign@elpa.gnu.org> (trust undefined) created at 2019-09-21T22:56:47+0500 using RSA

View File

@ -0,0 +1 @@
README.md

3
elpa/xelb-0.18/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
*.elc
*-pkg.el
*-autoloads.el

1212
elpa/xelb-0.18/ChangeLog Normal file

File diff suppressed because it is too large Load Diff

32
elpa/xelb-0.18/Makefile Normal file
View File

@ -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)

12
elpa/xelb-0.18/README.md Normal file
View File

@ -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.

742
elpa/xelb-0.18/el_client.el Normal file
View File

@ -0,0 +1,742 @@
;;; el_client.el --- XELB Code Generator -*- lexical-binding: t -*-
;; Copyright (C) 2015-2019 Free Software Foundation, Inc.
;; Author: Chris Feng <chris.w.feng@gmail.com>
;; 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 <http://www.gnu.org/licenses/>.
;;; 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 <valueparam> should be dropped, for
;; - they would generate incompatible codes, and
;; - they are probably already dropped upstream.
;; + All documentations (within <doc> 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 "<pad> 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 <list>'s fitting for padding will include
an `xelb-auto-padding' attribute."
(let ((subnodes (cddr node)))
(when mark-auto-padding
;; Remove all <comment>'s and <doc>'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 <pad>."
(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 <http://www.gnu.org/licenses/>.
;;; Commentary:
;; This file was generated by 'el_client.el' from '%s',
;; which you can retrieve from <git://anongit.freedesktop.org/xcb/proto>.
;;; 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 <doc>, 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 <import>."
(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 <struct>."
(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 <union>."
(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 <xidtype>."
(let ((name (intern (concat xelb-prefix (xelb-node-attr node 'name)))))
`((xcb:deftypealias ',name 'xcb:-u4))))
(defun xelb-parse-enum (node)
"Parse <enum>."
(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 <doc>
(mapcar (lambda (i)
(when (eq (xelb-node-name i) 'item)
;; Only handle <item> 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 <typedef>."
(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 <request>.
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 <reply>
(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 <event>."
(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 <error>."
(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 <eventcopy>."
(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 <errorcopy>."
(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 <eventstruct>."
(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 <pad>."
(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 <pad> field")))))
(defun xelb-parse-required_start_align (node)
"Parse <required_start_align>."
(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 <field>."
(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 <fd>."
(let ((name (intern (xelb-node-attr-escape node 'name))))
`((,name :type xcb:fd))))
(defun xelb-parse-list (node)
"Parse <list>."
(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 <exprfield>."
(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 <bitcase> and <case> is whether the `condition'
;; is a list
;; The name attribute of <bitcase> and <case> seems not useful here.
(defun xelb-parse-switch (node)
"Parse <switch>."
(let ((name (intern (xelb-node-attr-escape node 'name)))
(expression (xelb-parse-expression (car (xelb-node-subnodes node))))
;; <case> and <bitcase> 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 <op>."
(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 <fieldref>."
(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 <paramref>."
`(xcb:-paramref ',(intern (xelb-escape-name (xelb-node-subnode node)))))
(defun xelb-parse-value (node)
"Parse <value>."
(string-to-number
(replace-regexp-in-string "^0x" "#x" (xelb-node-subnode node))))
(defun xelb-parse-bit (node)
"Parse <bit>."
(let ((bit (string-to-number (xelb-node-subnode node))))
(cl-assert (<= 0 bit 31))
(lsh 1 bit)))
(defun xelb-parse-enumref (node)
"Parse <enumref>."
(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 <unop>."
(cl-assert (string= "~" (xelb-node-attr node 'op)))
`(lognot ,(xelb-parse-expression (xelb-node-subnode node))))
(defun xelb-parse-sumof (node)
"Parse <sumof>."
(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 <popcount>."
(let ((expression (xelb-parse-expression (xelb-node-subnode node))))
`(xcb:-popcount ,expression)))
(defun xelb-parse-listelement-ref (_node)
"Parse <listelement-ref>."
'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 <protocol.xml> [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

View File

@ -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 <http://www.gnu.org/licenses/>.
;;; Commentary:
;; This file was generated by 'el_client.el' from 'bigreq.xml',
;; which you can retrieve from <git://anongit.freedesktop.org/xcb/proto>.
;;; 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

View File

@ -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 <http://www.gnu.org/licenses/>.
;;; Commentary:
;; This file was generated by 'el_client.el' from 'composite.xml',
;; which you can retrieve from <git://anongit.freedesktop.org/xcb/proto>.
;;; 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

View File

@ -0,0 +1,432 @@
;;; xcb-cursor.el --- Port of Xcursor -*- lexical-binding: t -*-
;; Copyright (C) 2015-2019 Free Software Foundation, Inc.
;; Author: Chris Feng <chris.w.feng@gmail.com>
;; 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 <http://www.gnu.org/licenses/>.
;;; 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

View File

@ -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 <http://www.gnu.org/licenses/>.
;;; Commentary:
;; This file was generated by 'el_client.el' from 'damage.xml',
;; which you can retrieve from <git://anongit.freedesktop.org/xcb/proto>.
;;; 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

126
elpa/xelb-0.18/xcb-debug.el Normal file
View File

@ -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 <adrian@medranocalvo.com>
;; 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 <http://www.gnu.org/licenses/>.
;;; 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 "<unknown function>"))))
(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

112
elpa/xelb-0.18/xcb-dpms.el Normal file
View File

@ -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 <http://www.gnu.org/licenses/>.
;;; Commentary:
;; This file was generated by 'el_client.el' from 'dpms.xml',
;; which you can retrieve from <git://anongit.freedesktop.org/xcb/proto>.
;;; 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

322
elpa/xelb-0.18/xcb-dri2.el Normal file
View File

@ -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 <http://www.gnu.org/licenses/>.
;;; Commentary:
;; This file was generated by 'el_client.el' from 'dri2.xml',
;; which you can retrieve from <git://anongit.freedesktop.org/xcb/proto>.
;;; 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

207
elpa/xelb-0.18/xcb-dri3.el Normal file
View File

@ -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 <http://www.gnu.org/licenses/>.
;;; Commentary:
;; This file was generated by 'el_client.el' from 'dri3.xml',
;; which you can retrieve from <git://anongit.freedesktop.org/xcb/proto>.
;;; 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

752
elpa/xelb-0.18/xcb-ewmh.el Normal file
View File

@ -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 <chris.w.feng@gmail.com>
;; 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 <http://www.gnu.org/licenses/>.
;;; 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

52
elpa/xelb-0.18/xcb-ge.el Normal file
View File

@ -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 <http://www.gnu.org/licenses/>.
;;; Commentary:
;; This file was generated by 'el_client.el' from 'ge.xml',
;; which you can retrieve from <git://anongit.freedesktop.org/xcb/proto>.
;;; 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

1859
elpa/xelb-0.18/xcb-glx.el Normal file

File diff suppressed because it is too large Load Diff

554
elpa/xelb-0.18/xcb-icccm.el Normal file
View File

@ -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 <chris.w.feng@gmail.com>
;; 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 <http://www.gnu.org/licenses/>.
;;; 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

View File

@ -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 <chris.w.feng@gmail.com>
;; 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 <http://www.gnu.org/licenses/>.
;;; 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 <XKBstr.h>.
;; 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 <XKBstr.h>.
(`xcb:xkb:GroupsWrap:RedirectIntoRange
(setq group (logand #xFF (lsh group-info -4))) ;See <XKBstr.h>.
;; 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

View File

@ -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 <http://www.gnu.org/licenses/>.
;;; Commentary:
;; This file was generated by 'el_client.el' from 'present.xml',
;; which you can retrieve from <git://anongit.freedesktop.org/xcb/proto>.
;;; 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

1121
elpa/xelb-0.18/xcb-randr.el Normal file

File diff suppressed because it is too large Load Diff

View File

@ -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 <http://www.gnu.org/licenses/>.
;;; Commentary:
;; This file was generated by 'el_client.el' from 'record.xml',
;; which you can retrieve from <git://anongit.freedesktop.org/xcb/proto>.
;;; 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

View File

@ -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 <http://www.gnu.org/licenses/>.
;;; Commentary:
;; This file was generated by 'el_client.el' from 'render.xml',
;; which you can retrieve from <git://anongit.freedesktop.org/xcb/proto>.
;;; 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

View File

@ -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 <chris.w.feng@gmail.com>
;; 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 <http://www.gnu.org/licenses/>.
;;; 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

195
elpa/xelb-0.18/xcb-res.el Normal file
View File

@ -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 <http://www.gnu.org/licenses/>.
;;; Commentary:
;; This file was generated by 'el_client.el' from 'res.xml',
;; which you can retrieve from <git://anongit.freedesktop.org/xcb/proto>.
;;; 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

View File

@ -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 <http://www.gnu.org/licenses/>.
;;; Commentary:
;; This file was generated by 'el_client.el' from 'screensaver.xml',
;; which you can retrieve from <git://anongit.freedesktop.org/xcb/proto>.
;;; 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

187
elpa/xelb-0.18/xcb-shape.el Normal file
View File

@ -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 <http://www.gnu.org/licenses/>.
;;; Commentary:
;; This file was generated by 'el_client.el' from 'shape.xml',
;; which you can retrieve from <git://anongit.freedesktop.org/xcb/proto>.
;;; 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

170
elpa/xelb-0.18/xcb-shm.el Normal file
View File

@ -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 <http://www.gnu.org/licenses/>.
;;; Commentary:
;; This file was generated by 'el_client.el' from 'shm.xml',
;; which you can retrieve from <git://anongit.freedesktop.org/xcb/proto>.
;;; 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

340
elpa/xelb-0.18/xcb-sync.el Normal file
View File

@ -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 <http://www.gnu.org/licenses/>.
;;; Commentary:
;; This file was generated by 'el_client.el' from 'sync.xml',
;; which you can retrieve from <git://anongit.freedesktop.org/xcb/proto>.
;;; 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

View File

@ -0,0 +1,142 @@
;;; xcb-systemtray.el --- System tray protocol -*- lexical-binding: t -*-
;; Copyright (C) 2016-2019 Free Software Foundation, Inc.
;; Author: Chris Feng <chris.w.feng@gmail.com>
;; 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 <http://www.gnu.org/licenses/>.
;;; 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

851
elpa/xelb-0.18/xcb-types.el Normal file
View File

@ -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 <chris.w.feng@gmail.com>
;; 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 <http://www.gnu.org/licenses/>.
;;; 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.
;; + <paramref> 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 <fieldref> field."
`(slot-value obj ,field))
(defmacro xcb:-paramref (field)
"Evaluate a <paramref> 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)
;; <pad>
(cl-deftype xcb:-pad () t)
;; <pad> with align attribute
(cl-deftype xcb:-pad-align () t)
;; <fd>
(xcb:deftypealias 'xcb:fd 'xcb:-i4)
;; <list>
(cl-deftype xcb:-list () t)
;; <switch>
(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 <paramref>."
(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 <paramref>.
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 <paramref>."
(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

View File

@ -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 <http://www.gnu.org/licenses/>.
;;; Commentary:
;; This file was generated by 'el_client.el' from 'xc_misc.xml',
;; which you can retrieve from <git://anongit.freedesktop.org/xcb/proto>.
;;; 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

View File

@ -0,0 +1,184 @@
;;; xcb-xembed.el --- XEmbed protocol -*- lexical-binding: t -*-
;; Copyright (C) 2016-2019 Free Software Foundation, Inc.
;; Author: Chris Feng <chris.w.feng@gmail.com>
;; 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 <http://www.gnu.org/licenses/>.
;;; 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

105
elpa/xelb-0.18/xcb-xevie.el Normal file
View File

@ -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 <http://www.gnu.org/licenses/>.
;;; Commentary:
;; This file was generated by 'el_client.el' from 'xevie.xml',
;; which you can retrieve from <git://anongit.freedesktop.org/xcb/proto>.
;;; 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

View File

@ -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 <http://www.gnu.org/licenses/>.
;;; Commentary:
;; This file was generated by 'el_client.el' from 'xf86dri.xml',
;; which you can retrieve from <git://anongit.freedesktop.org/xcb/proto>.
;;; 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

View File

@ -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 <http://www.gnu.org/licenses/>.
;;; Commentary:
;; This file was generated by 'el_client.el' from 'xf86vidmode.xml',
;; which you can retrieve from <git://anongit.freedesktop.org/xcb/proto>.
;;; 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

View File

@ -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 <http://www.gnu.org/licenses/>.
;;; Commentary:
;; This file was generated by 'el_client.el' from 'xfixes.xml',
;; which you can retrieve from <git://anongit.freedesktop.org/xcb/proto>.
;;; 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

1022
elpa/xelb-0.18/xcb-xim.el Normal file

File diff suppressed because it is too large Load Diff

View File

@ -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 <http://www.gnu.org/licenses/>.
;;; Commentary:
;; This file was generated by 'el_client.el' from 'xinerama.xml',
;; which you can retrieve from <git://anongit.freedesktop.org/xcb/proto>.
;;; 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

2883
elpa/xelb-0.18/xcb-xinput.el Normal file

File diff suppressed because it is too large Load Diff

2327
elpa/xelb-0.18/xcb-xkb.el Normal file

File diff suppressed because it is too large Load Diff

112
elpa/xelb-0.18/xcb-xlib.el Normal file
View File

@ -0,0 +1,112 @@
;;; xcb-xlib.el --- Port of Xlib -*- lexical-binding: t -*-
;; Copyright (C) 2015-2019 Free Software Foundation, Inc.
;; Author: Chris Feng <chris.w.feng@gmail.com>
;; 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 <http://www.gnu.org/licenses/>.
;;; 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

View File

@ -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 <http://www.gnu.org/licenses/>.
;;; Commentary:
;; This file was generated by 'el_client.el' from 'xprint.xml',
;; which you can retrieve from <git://anongit.freedesktop.org/xcb/proto>.
;;; 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

3012
elpa/xelb-0.18/xcb-xproto.el Normal file

File diff suppressed because it is too large Load Diff

View File

@ -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 <http://www.gnu.org/licenses/>.
;;; Commentary:
;; This file was generated by 'el_client.el' from 'xselinux.xml',
;; which you can retrieve from <git://anongit.freedesktop.org/xcb/proto>.
;;; 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

View File

@ -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 <http://www.gnu.org/licenses/>.
;;; Commentary:
;; This file was generated by 'el_client.el' from 'xtest.xml',
;; which you can retrieve from <git://anongit.freedesktop.org/xcb/proto>.
;;; 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

523
elpa/xelb-0.18/xcb-xv.el Normal file
View File

@ -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 <http://www.gnu.org/licenses/>.
;;; Commentary:
;; This file was generated by 'el_client.el' from 'xv.xml',
;; which you can retrieve from <git://anongit.freedesktop.org/xcb/proto>.
;;; 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

188
elpa/xelb-0.18/xcb-xvmc.el Normal file
View File

@ -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 <http://www.gnu.org/licenses/>.
;;; Commentary:
;; This file was generated by 'el_client.el' from 'xvmc.xml',
;; which you can retrieve from <git://anongit.freedesktop.org/xcb/proto>.
;;; 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

872
elpa/xelb-0.18/xcb.el Normal file
View File

@ -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 <chris.w.feng@gmail.com>
;; 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 <http://www.gnu.org/licenses/>.
;;; 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

70
elpa/xelb-0.18/xelb.el Normal file
View File

@ -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 <chris.w.feng@gmail.com>
;; Maintainer: Chris Feng <chris.w.feng@gmail.com>
;; 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 <http://www.gnu.org/licenses/>.
;;; 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

16
init.el
View File

@ -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