├── .elpaignore ├── .gitignore ├── Makefile ├── README.md ├── el_client.el ├── xcb-bigreq.el ├── xcb-composite.el ├── xcb-cursor.el ├── xcb-damage.el ├── xcb-debug.el ├── xcb-dpms.el ├── xcb-dri2.el ├── xcb-dri3.el ├── xcb-ewmh.el ├── xcb-ge.el ├── xcb-glx.el ├── xcb-icccm.el ├── xcb-keysyms.el ├── xcb-present.el ├── xcb-randr.el ├── xcb-record.el ├── xcb-render.el ├── xcb-renderutil.el ├── xcb-res.el ├── xcb-screensaver.el ├── xcb-shape.el ├── xcb-shm.el ├── xcb-sync.el ├── xcb-systemtray.el ├── xcb-types.el ├── xcb-xc_misc.el ├── xcb-xembed.el ├── xcb-xevie.el ├── xcb-xf86dri.el ├── xcb-xf86vidmode.el ├── xcb-xfixes.el ├── xcb-xim.el ├── xcb-xinerama.el ├── xcb-xinput.el ├── xcb-xkb.el ├── xcb-xlib.el ├── xcb-xprint.el ├── xcb-xproto.el ├── xcb-xselinux.el ├── xcb-xtest.el ├── xcb-xv.el ├── xcb-xvmc.el ├── xcb.el └── xelb.el /.elpaignore: -------------------------------------------------------------------------------- 1 | README.md 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.elc 2 | *-pkg.el 3 | *-autoloads.el 4 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | PROTO_PATH := ../xcb-proto/src 2 | 3 | EMACS_BIN := emacs -Q 4 | 5 | EXTENSIONS := bigreq composite damage dpms dri2 dri3 ge glx present randr \ 6 | record render res screensaver shape shm sync xc_misc xevie xf86dri \ 7 | xf86vidmode xfixes xinerama xinput xkb xprint xselinux xtest xvmc xv 8 | 9 | EXT_LIBS = $(addprefix xcb-,$(addsuffix .el,$(EXTENSIONS))) 10 | LIBS = xcb-xproto.el $(EXT_LIBS) 11 | 12 | all: clean $(LIBS) 13 | 14 | xcb-%.el: $(PROTO_PATH)/%.xml 15 | @echo -n "\n"Generating $@... 16 | @$(EMACS_BIN) --script ./el_client.el $< > $@ 17 | 18 | $(EXT_LIBS): xcb-xproto.el 19 | 20 | xcb-composite.el: xcb-xfixes.el 21 | xcb-damage.el: xcb-xfixes.el 22 | xcb-present.el: xcb-randr.el xcb-xfixes.el xcb-sync.el 23 | xcb-randr.el: xcb-render.el 24 | xcb-xfixes.el: xcb-render.el xcb-shape.el 25 | xcb-xinput.el: xcb-xfixes.el 26 | xcb-xvmc.el: xcb-xv.el 27 | xcb-xv.el: xcb-shm.el 28 | 29 | .PHONY: clean 30 | 31 | clean: 32 | @rm -vf $(LIBS) 33 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # X protocol Emacs Lisp Binding 2 | 3 | XELB (X protocol Emacs Lisp Binding) is a pure Elisp implementation of X11 4 | protocol based on the XML description files from XCB project. 5 | It features an object-oriented API and permits a certain degree of concurrency. 6 | It should enable you to implement some low-level X11 applications. 7 | Please refer to [xelb.el](https://github.com/ch11ng/xelb/blob/master/xelb.el) 8 | for more details. 9 | 10 | **Note to Emacs 24 users**: 11 | If you install XELB from source (rather than GNU ELPA), be sure to install 12 | `cl-generic` package from GNU ELPA first. 13 | -------------------------------------------------------------------------------- /xcb-bigreq.el: -------------------------------------------------------------------------------- 1 | ;;; xcb-bigreq.el --- X11 BigRequests extension -*- lexical-binding: t -*- 2 | 3 | ;; Copyright (C) 2015-2019 Free Software Foundation, Inc. 4 | 5 | ;; This file is part of GNU Emacs. 6 | 7 | ;; GNU Emacs is free software: you can redistribute it and/or modify 8 | ;; it under the terms of the GNU General Public License as published by 9 | ;; the Free Software Foundation, either version 3 of the License, or 10 | ;; (at your option) any later version. 11 | 12 | ;; GNU Emacs is distributed in the hope that it will be useful, 13 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | ;; GNU General Public License for more details. 16 | 17 | ;; You should have received a copy of the GNU General Public License 18 | ;; along with GNU Emacs. If not, see . 19 | 20 | ;;; Commentary: 21 | 22 | ;; This file was generated by 'el_client.el' from 'bigreq.xml', 23 | ;; which you can retrieve from . 24 | 25 | ;;; Code: 26 | 27 | (require 'xcb-types) 28 | 29 | (defconst xcb:bigreq:-extension-xname "BIG-REQUESTS") 30 | (defconst xcb:bigreq:-extension-name "BigRequests") 31 | (defconst xcb:bigreq:-major-version 0) 32 | (defconst xcb:bigreq:-minor-version 0) 33 | 34 | (defclass xcb:bigreq:Enable 35 | (xcb:-request) 36 | ((~opcode :initform 0 :type xcb:-u1))) 37 | (defclass xcb:bigreq:Enable~reply 38 | (xcb:-reply) 39 | ((pad~0 :initform 1 :type xcb:-pad) 40 | (~sequence :type xcb:CARD16) 41 | (length :type xcb:CARD32) 42 | (maximum-request-length :initarg :maximum-request-length :type xcb:CARD32))) 43 | 44 | 45 | 46 | (provide 'xcb-bigreq) 47 | 48 | ;;; xcb-bigreq.el ends here 49 | -------------------------------------------------------------------------------- /xcb-composite.el: -------------------------------------------------------------------------------- 1 | ;;; xcb-composite.el --- X11 Composite extension -*- lexical-binding: t -*- 2 | 3 | ;; Copyright (C) 2015-2019 Free Software Foundation, Inc. 4 | 5 | ;; This file is part of GNU Emacs. 6 | 7 | ;; GNU Emacs is free software: you can redistribute it and/or modify 8 | ;; it under the terms of the GNU General Public License as published by 9 | ;; the Free Software Foundation, either version 3 of the License, or 10 | ;; (at your option) any later version. 11 | 12 | ;; GNU Emacs is distributed in the hope that it will be useful, 13 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | ;; GNU General Public License for more details. 16 | 17 | ;; You should have received a copy of the GNU General Public License 18 | ;; along with GNU Emacs. If not, see . 19 | 20 | ;;; Commentary: 21 | 22 | ;; This file was generated by 'el_client.el' from 'composite.xml', 23 | ;; which you can retrieve from . 24 | 25 | ;;; Code: 26 | 27 | (require 'xcb-types) 28 | 29 | (defconst xcb:composite:-extension-xname "Composite") 30 | (defconst xcb:composite:-extension-name "Composite") 31 | (defconst xcb:composite:-major-version 0) 32 | (defconst xcb:composite:-minor-version 4) 33 | 34 | (require 'xcb-xproto) 35 | 36 | (require 'xcb-xfixes) 37 | 38 | (defconst xcb:composite:Redirect:Automatic 0) 39 | (defconst xcb:composite:Redirect:Manual 1) 40 | 41 | (defclass xcb:composite:QueryVersion 42 | (xcb:-request) 43 | ((~opcode :initform 0 :type xcb:-u1) 44 | (client-major-version :initarg :client-major-version :type xcb:CARD32) 45 | (client-minor-version :initarg :client-minor-version :type xcb:CARD32))) 46 | (defclass xcb:composite:QueryVersion~reply 47 | (xcb:-reply) 48 | ((pad~0 :initform 1 :type xcb:-pad) 49 | (~sequence :type xcb:CARD16) 50 | (length :type xcb:CARD32) 51 | (major-version :initarg :major-version :type xcb:CARD32) 52 | (minor-version :initarg :minor-version :type xcb:CARD32) 53 | (pad~1 :initform 16 :type xcb:-pad))) 54 | 55 | (defclass xcb:composite:RedirectWindow 56 | (xcb:-request) 57 | ((~opcode :initform 1 :type xcb:-u1) 58 | (window :initarg :window :type xcb:WINDOW) 59 | (update :initarg :update :type xcb:CARD8) 60 | (pad~0 :initform 3 :type xcb:-pad))) 61 | 62 | (defclass xcb:composite:RedirectSubwindows 63 | (xcb:-request) 64 | ((~opcode :initform 2 :type xcb:-u1) 65 | (window :initarg :window :type xcb:WINDOW) 66 | (update :initarg :update :type xcb:CARD8) 67 | (pad~0 :initform 3 :type xcb:-pad))) 68 | 69 | (defclass xcb:composite:UnredirectWindow 70 | (xcb:-request) 71 | ((~opcode :initform 3 :type xcb:-u1) 72 | (window :initarg :window :type xcb:WINDOW) 73 | (update :initarg :update :type xcb:CARD8) 74 | (pad~0 :initform 3 :type xcb:-pad))) 75 | 76 | (defclass xcb:composite:UnredirectSubwindows 77 | (xcb:-request) 78 | ((~opcode :initform 4 :type xcb:-u1) 79 | (window :initarg :window :type xcb:WINDOW) 80 | (update :initarg :update :type xcb:CARD8) 81 | (pad~0 :initform 3 :type xcb:-pad))) 82 | 83 | (defclass xcb:composite:CreateRegionFromBorderClip 84 | (xcb:-request) 85 | ((~opcode :initform 5 :type xcb:-u1) 86 | (region :initarg :region :type xcb:xfixes:REGION) 87 | (window :initarg :window :type xcb:WINDOW))) 88 | 89 | (defclass xcb:composite:NameWindowPixmap 90 | (xcb:-request) 91 | ((~opcode :initform 6 :type xcb:-u1) 92 | (window :initarg :window :type xcb:WINDOW) 93 | (pixmap :initarg :pixmap :type xcb:PIXMAP))) 94 | 95 | (defclass xcb:composite:GetOverlayWindow 96 | (xcb:-request) 97 | ((~opcode :initform 7 :type xcb:-u1) 98 | (window :initarg :window :type xcb:WINDOW))) 99 | (defclass xcb:composite:GetOverlayWindow~reply 100 | (xcb:-reply) 101 | ((pad~0 :initform 1 :type xcb:-pad) 102 | (~sequence :type xcb:CARD16) 103 | (length :type xcb:CARD32) 104 | (overlay-win :initarg :overlay-win :type xcb:WINDOW) 105 | (pad~1 :initform 20 :type xcb:-pad))) 106 | 107 | (defclass xcb:composite:ReleaseOverlayWindow 108 | (xcb:-request) 109 | ((~opcode :initform 8 :type xcb:-u1) 110 | (window :initarg :window :type xcb:WINDOW))) 111 | 112 | 113 | 114 | (provide 'xcb-composite) 115 | 116 | ;;; xcb-composite.el ends here 117 | -------------------------------------------------------------------------------- /xcb-damage.el: -------------------------------------------------------------------------------- 1 | ;;; xcb-damage.el --- X11 Damage extension -*- lexical-binding: t -*- 2 | 3 | ;; Copyright (C) 2015-2019 Free Software Foundation, Inc. 4 | 5 | ;; This file is part of GNU Emacs. 6 | 7 | ;; GNU Emacs is free software: you can redistribute it and/or modify 8 | ;; it under the terms of the GNU General Public License as published by 9 | ;; the Free Software Foundation, either version 3 of the License, or 10 | ;; (at your option) any later version. 11 | 12 | ;; GNU Emacs is distributed in the hope that it will be useful, 13 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | ;; GNU General Public License for more details. 16 | 17 | ;; You should have received a copy of the GNU General Public License 18 | ;; along with GNU Emacs. If not, see . 19 | 20 | ;;; Commentary: 21 | 22 | ;; This file was generated by 'el_client.el' from 'damage.xml', 23 | ;; which you can retrieve from . 24 | 25 | ;;; Code: 26 | 27 | (require 'xcb-types) 28 | 29 | (defconst xcb:damage:-extension-xname "DAMAGE") 30 | (defconst xcb:damage:-extension-name "Damage") 31 | (defconst xcb:damage:-major-version 1) 32 | (defconst xcb:damage:-minor-version 1) 33 | 34 | (require 'xcb-xproto) 35 | 36 | (require 'xcb-xfixes) 37 | 38 | (xcb:deftypealias 'xcb:damage:DAMAGE 'xcb:-u4) 39 | 40 | (defconst xcb:damage:ReportLevel:RawRectangles 0) 41 | (defconst xcb:damage:ReportLevel:DeltaRectangles 1) 42 | (defconst xcb:damage:ReportLevel:BoundingBox 2) 43 | (defconst xcb:damage:ReportLevel:NonEmpty 3) 44 | 45 | (defclass xcb:damage:BadDamage 46 | (xcb:-error) 47 | ((~code :initform 0))) 48 | 49 | (defclass xcb:damage:QueryVersion 50 | (xcb:-request) 51 | ((~opcode :initform 0 :type xcb:-u1) 52 | (client-major-version :initarg :client-major-version :type xcb:CARD32) 53 | (client-minor-version :initarg :client-minor-version :type xcb:CARD32))) 54 | (defclass xcb:damage:QueryVersion~reply 55 | (xcb:-reply) 56 | ((pad~0 :initform 1 :type xcb:-pad) 57 | (~sequence :type xcb:CARD16) 58 | (length :type xcb:CARD32) 59 | (major-version :initarg :major-version :type xcb:CARD32) 60 | (minor-version :initarg :minor-version :type xcb:CARD32) 61 | (pad~1 :initform 16 :type xcb:-pad))) 62 | 63 | (defclass xcb:damage:Create 64 | (xcb:-request) 65 | ((~opcode :initform 1 :type xcb:-u1) 66 | (damage :initarg :damage :type xcb:damage:DAMAGE) 67 | (drawable :initarg :drawable :type xcb:DRAWABLE) 68 | (level :initarg :level :type xcb:CARD8) 69 | (pad~0 :initform 3 :type xcb:-pad))) 70 | 71 | (defclass xcb:damage:Destroy 72 | (xcb:-request) 73 | ((~opcode :initform 2 :type xcb:-u1) 74 | (damage :initarg :damage :type xcb:damage:DAMAGE))) 75 | 76 | (defclass xcb:damage:Subtract 77 | (xcb:-request) 78 | ((~opcode :initform 3 :type xcb:-u1) 79 | (damage :initarg :damage :type xcb:damage:DAMAGE) 80 | (repair :initarg :repair :type xcb:xfixes:REGION) 81 | (parts :initarg :parts :type xcb:xfixes:REGION))) 82 | 83 | (defclass xcb:damage:Add 84 | (xcb:-request) 85 | ((~opcode :initform 4 :type xcb:-u1) 86 | (drawable :initarg :drawable :type xcb:DRAWABLE) 87 | (region :initarg :region :type xcb:xfixes:REGION))) 88 | 89 | (defclass xcb:damage:Notify 90 | (xcb:-event) 91 | ((~code :initform 0) 92 | (level :initarg :level :type xcb:CARD8) 93 | (~sequence :type xcb:CARD16) 94 | (drawable :initarg :drawable :type xcb:DRAWABLE) 95 | (damage :initarg :damage :type xcb:damage:DAMAGE) 96 | (timestamp :initarg :timestamp :type xcb:TIMESTAMP) 97 | (area :initarg :area :type xcb:RECTANGLE) 98 | (geometry :initarg :geometry :type xcb:RECTANGLE))) 99 | 100 | (defconst xcb:damage:error-number-class-alist 101 | '((0 . xcb:damage:BadDamage)) 102 | "(error-number . error-class) alist.") 103 | 104 | (defconst xcb:damage:event-number-class-alist 105 | '((0 . xcb:damage:Notify)) 106 | "(event-number . event-class) alist.") 107 | 108 | 109 | 110 | (provide 'xcb-damage) 111 | 112 | ;;; xcb-damage.el ends here 113 | -------------------------------------------------------------------------------- /xcb-debug.el: -------------------------------------------------------------------------------- 1 | ;;; xcb-debug.el --- Debugging helpers for XELB -*- lexical-binding: t -*- 2 | 3 | ;; Copyright (C) 2018-2019 Free Software Foundation, Inc. 4 | 5 | ;; Author: Adrián Medraño Calvo 6 | 7 | ;; This file is part of GNU Emacs. 8 | 9 | ;; GNU Emacs is free software: you can redistribute it and/or modify 10 | ;; it under the terms of the GNU General Public License as published by 11 | ;; the Free Software Foundation, either version 3 of the License, or 12 | ;; (at your option) any later version. 13 | 14 | ;; GNU Emacs is distributed in the hope that it will be useful, 15 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | ;; GNU General Public License for more details. 18 | 19 | ;; You should have received a copy of the GNU General Public License 20 | ;; along with GNU Emacs. If not, see . 21 | 22 | ;;; Commentary: 23 | 24 | ;; This module collects functions that help in debugging XELB. 25 | 26 | ;;; Code: 27 | 28 | (defvar xcb-debug:buffer "*XELB-DEBUG*" "Buffer to write debug messages to.") 29 | 30 | (defvar xcb-debug:backtrace-start-frame 5 31 | "From which frame to start collecting backtraces.") 32 | 33 | (defvar xcb-debug:log-time-function #'xcb-debug:log-uptime 34 | "Function used for generating timestamps in XELB debug logs. 35 | 36 | Here are some predefined candidates: 37 | `xcb-debug:log-uptime': Display the uptime of this Emacs instance. 38 | `xcb-debug:log-time': Display time of day. 39 | `nil': Disable timestamp.") 40 | 41 | (defun xcb-debug:log-uptime () 42 | "Add uptime to XELB debug logs." 43 | (emacs-uptime "[%.2h:%.2m:%.2s] ")) 44 | 45 | (defun xcb-debug:log-time () 46 | "Add time of day to XELB debug logs." 47 | (format-time-string "[%T] ")) 48 | 49 | (defun xcb-debug:-call-stack () 50 | "Return the current call stack frames." 51 | (let (frames frame 52 | ;; No need to acount for our setq, while, let, ... 53 | (index xcb-debug:backtrace-start-frame)) 54 | (while (setq frame (backtrace-frame index)) 55 | (push frame frames) 56 | (cl-incf index)) 57 | (cl-remove-if-not 'car frames))) 58 | 59 | (defmacro xcb-debug:compile-time-function-name () 60 | "Get the name of outermost definition at expansion time." 61 | (let* ((frame (cl-find-if 62 | (lambda (frame) 63 | (ignore-errors 64 | (let ((clause (car (cl-third frame)))) 65 | (or (equal clause 'defalias) 66 | (equal clause 'cl-defmethod))))) 67 | (reverse (xcb-debug:-call-stack)))) 68 | (defn (cl-third frame)) 69 | (deftype (car defn))) 70 | (cl-case deftype 71 | ((defalias) (symbol-name (cl-cadadr defn))) 72 | ((cl-defmethod) (symbol-name (cadr defn))) 73 | (t "")))) 74 | 75 | (defmacro xcb-debug:-with-debug-buffer (&rest forms) 76 | "Evaluate FORMS making sure `xcb-debug:buffer' is correctly updated." 77 | `(with-current-buffer (get-buffer-create xcb-debug:buffer) 78 | (let (windows-eob) 79 | ;; Note windows whose point is at EOB. 80 | (dolist (w (get-buffer-window-list xcb-debug:buffer t 'nomini)) 81 | (when (= (window-point w) (point-max)) 82 | (push w windows-eob))) 83 | (save-excursion 84 | (goto-char (point-max)) 85 | ,@forms) 86 | ;; Restore point. 87 | (dolist (w windows-eob) 88 | (set-window-point w (point-max)))))) 89 | 90 | (defun xcb-debug:message (format-string &rest objects) 91 | "Print a message to `xcb-debug:buffer'. 92 | 93 | The FORMAT-STRING argument follows the speficies how to print each of 94 | the passed OBJECTS. See `format' for details." 95 | (xcb-debug:-with-debug-buffer 96 | (insert (apply #'format format-string objects)))) 97 | 98 | (defmacro xcb-debug:backtrace () 99 | "Print a backtrace to the `xcb-debug:buffer'." 100 | '(xcb-debug:-with-debug-buffer 101 | (let ((standard-output (get-buffer-create xcb-debug:buffer))) 102 | (backtrace)))) 103 | 104 | (defmacro xcb-debug:backtrace-on-error (&rest forms) 105 | "Evaluate FORMS. Printing a backtrace if an error is signaled." 106 | `(let ((debug-on-error t) 107 | (debugger (lambda (&rest _) (xcb-debug:backtrace)))) 108 | ,@forms)) 109 | 110 | (defun xcb-debug:clear () 111 | "Clear the debug buffer." 112 | (interactive) 113 | (xcb-debug:-with-debug-buffer 114 | (erase-buffer))) 115 | 116 | (defun xcb-debug:mark () 117 | "Insert a mark in the debug buffer." 118 | (interactive) 119 | (xcb-debug:-with-debug-buffer 120 | (insert " \n"))) 121 | 122 | 123 | 124 | (provide 'xcb-debug) 125 | 126 | ;;; xcb-debug.el ends here 127 | -------------------------------------------------------------------------------- /xcb-dpms.el: -------------------------------------------------------------------------------- 1 | ;;; xcb-dpms.el --- X11 DPMS extension -*- lexical-binding: t -*- 2 | 3 | ;; Copyright (C) 2015-2019 Free Software Foundation, Inc. 4 | 5 | ;; This file is part of GNU Emacs. 6 | 7 | ;; GNU Emacs is free software: you can redistribute it and/or modify 8 | ;; it under the terms of the GNU General Public License as published by 9 | ;; the Free Software Foundation, either version 3 of the License, or 10 | ;; (at your option) any later version. 11 | 12 | ;; GNU Emacs is distributed in the hope that it will be useful, 13 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | ;; GNU General Public License for more details. 16 | 17 | ;; You should have received a copy of the GNU General Public License 18 | ;; along with GNU Emacs. If not, see . 19 | 20 | ;;; Commentary: 21 | 22 | ;; This file was generated by 'el_client.el' from 'dpms.xml', 23 | ;; which you can retrieve from . 24 | 25 | ;;; Code: 26 | 27 | (require 'xcb-types) 28 | 29 | (defconst xcb:dpms:-extension-xname "DPMS") 30 | (defconst xcb:dpms:-extension-name "DPMS") 31 | (defconst xcb:dpms:-major-version 0) 32 | (defconst xcb:dpms:-minor-version 0) 33 | 34 | (defclass xcb:dpms:GetVersion 35 | (xcb:-request) 36 | ((~opcode :initform 0 :type xcb:-u1) 37 | (client-major-version :initarg :client-major-version :type xcb:CARD16) 38 | (client-minor-version :initarg :client-minor-version :type xcb:CARD16))) 39 | (defclass xcb:dpms:GetVersion~reply 40 | (xcb:-reply) 41 | ((pad~0 :initform 1 :type xcb:-pad) 42 | (~sequence :type xcb:CARD16) 43 | (length :type xcb:CARD32) 44 | (server-major-version :initarg :server-major-version :type xcb:CARD16) 45 | (server-minor-version :initarg :server-minor-version :type xcb:CARD16))) 46 | 47 | (defclass xcb:dpms:Capable 48 | (xcb:-request) 49 | ((~opcode :initform 1 :type xcb:-u1))) 50 | (defclass xcb:dpms:Capable~reply 51 | (xcb:-reply) 52 | ((pad~0 :initform 1 :type xcb:-pad) 53 | (~sequence :type xcb:CARD16) 54 | (length :type xcb:CARD32) 55 | (capable :initarg :capable :type xcb:BOOL) 56 | (pad~1 :initform 23 :type xcb:-pad))) 57 | 58 | (defclass xcb:dpms:GetTimeouts 59 | (xcb:-request) 60 | ((~opcode :initform 2 :type xcb:-u1))) 61 | (defclass xcb:dpms:GetTimeouts~reply 62 | (xcb:-reply) 63 | ((pad~0 :initform 1 :type xcb:-pad) 64 | (~sequence :type xcb:CARD16) 65 | (length :type xcb:CARD32) 66 | (standby-timeout :initarg :standby-timeout :type xcb:CARD16) 67 | (suspend-timeout :initarg :suspend-timeout :type xcb:CARD16) 68 | (off-timeout :initarg :off-timeout :type xcb:CARD16) 69 | (pad~1 :initform 18 :type xcb:-pad))) 70 | 71 | (defclass xcb:dpms:SetTimeouts 72 | (xcb:-request) 73 | ((~opcode :initform 3 :type xcb:-u1) 74 | (standby-timeout :initarg :standby-timeout :type xcb:CARD16) 75 | (suspend-timeout :initarg :suspend-timeout :type xcb:CARD16) 76 | (off-timeout :initarg :off-timeout :type xcb:CARD16))) 77 | 78 | (defclass xcb:dpms:Enable 79 | (xcb:-request) 80 | ((~opcode :initform 4 :type xcb:-u1))) 81 | 82 | (defclass xcb:dpms:Disable 83 | (xcb:-request) 84 | ((~opcode :initform 5 :type xcb:-u1))) 85 | 86 | (defconst xcb:dpms:DPMSMode:On 0) 87 | (defconst xcb:dpms:DPMSMode:Standby 1) 88 | (defconst xcb:dpms:DPMSMode:Suspend 2) 89 | (defconst xcb:dpms:DPMSMode:Off 3) 90 | 91 | (defclass xcb:dpms:ForceLevel 92 | (xcb:-request) 93 | ((~opcode :initform 6 :type xcb:-u1) 94 | (power-level :initarg :power-level :type xcb:CARD16))) 95 | 96 | (defclass xcb:dpms:Info 97 | (xcb:-request) 98 | ((~opcode :initform 7 :type xcb:-u1))) 99 | (defclass xcb:dpms:Info~reply 100 | (xcb:-reply) 101 | ((pad~0 :initform 1 :type xcb:-pad) 102 | (~sequence :type xcb:CARD16) 103 | (length :type xcb:CARD32) 104 | (power-level :initarg :power-level :type xcb:CARD16) 105 | (state :initarg :state :type xcb:BOOL) 106 | (pad~1 :initform 21 :type xcb:-pad))) 107 | 108 | 109 | 110 | (provide 'xcb-dpms) 111 | 112 | ;;; xcb-dpms.el ends here 113 | -------------------------------------------------------------------------------- /xcb-dri2.el: -------------------------------------------------------------------------------- 1 | ;;; xcb-dri2.el --- X11 DRI2 extension -*- lexical-binding: t -*- 2 | 3 | ;; Copyright (C) 2015-2019 Free Software Foundation, Inc. 4 | 5 | ;; This file is part of GNU Emacs. 6 | 7 | ;; GNU Emacs is free software: you can redistribute it and/or modify 8 | ;; it under the terms of the GNU General Public License as published by 9 | ;; the Free Software Foundation, either version 3 of the License, or 10 | ;; (at your option) any later version. 11 | 12 | ;; GNU Emacs is distributed in the hope that it will be useful, 13 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | ;; GNU General Public License for more details. 16 | 17 | ;; You should have received a copy of the GNU General Public License 18 | ;; along with GNU Emacs. If not, see . 19 | 20 | ;;; Commentary: 21 | 22 | ;; This file was generated by 'el_client.el' from 'dri2.xml', 23 | ;; which you can retrieve from . 24 | 25 | ;;; Code: 26 | 27 | (require 'xcb-types) 28 | 29 | (defconst xcb:dri2:-extension-xname "DRI2") 30 | (defconst xcb:dri2:-extension-name "DRI2") 31 | (defconst xcb:dri2:-major-version 1) 32 | (defconst xcb:dri2:-minor-version 4) 33 | 34 | (require 'xcb-xproto) 35 | 36 | (defconst xcb:dri2:Attachment:BufferFrontLeft 0) 37 | (defconst xcb:dri2:Attachment:BufferBackLeft 1) 38 | (defconst xcb:dri2:Attachment:BufferFrontRight 2) 39 | (defconst xcb:dri2:Attachment:BufferBackRight 3) 40 | (defconst xcb:dri2:Attachment:BufferDepth 4) 41 | (defconst xcb:dri2:Attachment:BufferStencil 5) 42 | (defconst xcb:dri2:Attachment:BufferAccum 6) 43 | (defconst xcb:dri2:Attachment:BufferFakeFrontLeft 7) 44 | (defconst xcb:dri2:Attachment:BufferFakeFrontRight 8) 45 | (defconst xcb:dri2:Attachment:BufferDepthStencil 9) 46 | (defconst xcb:dri2:Attachment:BufferHiz 10) 47 | 48 | (defconst xcb:dri2:DriverType:DRI 0) 49 | (defconst xcb:dri2:DriverType:VDPAU 1) 50 | 51 | (defconst xcb:dri2:EventType:ExchangeComplete 1) 52 | (defconst xcb:dri2:EventType:BlitComplete 2) 53 | (defconst xcb:dri2:EventType:FlipComplete 3) 54 | 55 | (defclass xcb:dri2:DRI2Buffer 56 | (xcb:-struct) 57 | ((attachment :initarg :attachment :type xcb:CARD32) 58 | (name :initarg :name :type xcb:CARD32) 59 | (pitch :initarg :pitch :type xcb:CARD32) 60 | (cpp :initarg :cpp :type xcb:CARD32) 61 | (flags :initarg :flags :type xcb:CARD32))) 62 | 63 | (defclass xcb:dri2:AttachFormat 64 | (xcb:-struct) 65 | ((attachment :initarg :attachment :type xcb:CARD32) 66 | (format :initarg :format :type xcb:CARD32))) 67 | 68 | (defclass xcb:dri2:QueryVersion 69 | (xcb:-request) 70 | ((~opcode :initform 0 :type xcb:-u1) 71 | (major-version :initarg :major-version :type xcb:CARD32) 72 | (minor-version :initarg :minor-version :type xcb:CARD32))) 73 | (defclass xcb:dri2:QueryVersion~reply 74 | (xcb:-reply) 75 | ((pad~0 :initform 1 :type xcb:-pad) 76 | (~sequence :type xcb:CARD16) 77 | (length :type xcb:CARD32) 78 | (major-version :initarg :major-version :type xcb:CARD32) 79 | (minor-version :initarg :minor-version :type xcb:CARD32))) 80 | 81 | (defclass xcb:dri2:Connect 82 | (xcb:-request) 83 | ((~opcode :initform 1 :type xcb:-u1) 84 | (window :initarg :window :type xcb:WINDOW) 85 | (driver-type :initarg :driver-type :type xcb:CARD32))) 86 | (defclass xcb:dri2:Connect~reply 87 | (xcb:-reply) 88 | ((pad~0 :initform 1 :type xcb:-pad) 89 | (~sequence :type xcb:CARD16) 90 | (length :type xcb:CARD32) 91 | (driver-name-length :initarg :driver-name-length :type xcb:CARD32) 92 | (device-name-length :initarg :device-name-length :type xcb:CARD32) 93 | (pad~1 :initform 16 :type xcb:-pad) 94 | (driver-name~ :initform 95 | '(name driver-name type xcb:char size 96 | (xcb:-fieldref 'driver-name-length)) 97 | :type xcb:-list) 98 | (driver-name :initarg :driver-name :type xcb:-ignore) 99 | (alignment-pad~ :initform 100 | '(name alignment-pad type xcb:void size 101 | (- 102 | (logand 103 | (+ 104 | (xcb:-fieldref 'driver-name-length) 105 | 3) 106 | (lognot 3)) 107 | (xcb:-fieldref 'driver-name-length))) 108 | :type xcb:-list) 109 | (alignment-pad :initarg :alignment-pad :type xcb:-ignore) 110 | (device-name~ :initform 111 | '(name device-name type xcb:char size 112 | (xcb:-fieldref 'device-name-length)) 113 | :type xcb:-list) 114 | (device-name :initarg :device-name :type xcb:-ignore))) 115 | 116 | (defclass xcb:dri2:Authenticate 117 | (xcb:-request) 118 | ((~opcode :initform 2 :type xcb:-u1) 119 | (window :initarg :window :type xcb:WINDOW) 120 | (magic :initarg :magic :type xcb:CARD32))) 121 | (defclass xcb:dri2:Authenticate~reply 122 | (xcb:-reply) 123 | ((pad~0 :initform 1 :type xcb:-pad) 124 | (~sequence :type xcb:CARD16) 125 | (length :type xcb:CARD32) 126 | (authenticated :initarg :authenticated :type xcb:CARD32))) 127 | 128 | (defclass xcb:dri2:CreateDrawable 129 | (xcb:-request) 130 | ((~opcode :initform 3 :type xcb:-u1) 131 | (drawable :initarg :drawable :type xcb:DRAWABLE))) 132 | 133 | (defclass xcb:dri2:DestroyDrawable 134 | (xcb:-request) 135 | ((~opcode :initform 4 :type xcb:-u1) 136 | (drawable :initarg :drawable :type xcb:DRAWABLE))) 137 | 138 | (defclass xcb:dri2:GetBuffers 139 | (xcb:-request) 140 | ((~opcode :initform 5 :type xcb:-u1) 141 | (drawable :initarg :drawable :type xcb:DRAWABLE) 142 | (count :initarg :count :type xcb:CARD32) 143 | (attachments~ :initform 144 | '(name attachments type xcb:CARD32 size nil) 145 | :type xcb:-list) 146 | (attachments :initarg :attachments :type xcb:-ignore))) 147 | (defclass xcb:dri2:GetBuffers~reply 148 | (xcb:-reply) 149 | ((pad~0 :initform 1 :type xcb:-pad) 150 | (~sequence :type xcb:CARD16) 151 | (length :type xcb:CARD32) 152 | (width :initarg :width :type xcb:CARD32) 153 | (height :initarg :height :type xcb:CARD32) 154 | (count :initarg :count :type xcb:CARD32) 155 | (pad~1 :initform 12 :type xcb:-pad) 156 | (buffers~ :initform 157 | '(name buffers type xcb:dri2:DRI2Buffer size 158 | (xcb:-fieldref 'count)) 159 | :type xcb:-list) 160 | (buffers :initarg :buffers :type xcb:-ignore))) 161 | 162 | (defclass xcb:dri2:CopyRegion 163 | (xcb:-request) 164 | ((~opcode :initform 6 :type xcb:-u1) 165 | (drawable :initarg :drawable :type xcb:DRAWABLE) 166 | (region :initarg :region :type xcb:CARD32) 167 | (dest :initarg :dest :type xcb:CARD32) 168 | (src :initarg :src :type xcb:CARD32))) 169 | (defclass xcb:dri2:CopyRegion~reply 170 | (xcb:-reply) 171 | ((pad~0 :initform 1 :type xcb:-pad) 172 | (~sequence :type xcb:CARD16) 173 | (length :type xcb:CARD32))) 174 | 175 | (defclass xcb:dri2:GetBuffersWithFormat 176 | (xcb:-request) 177 | ((~opcode :initform 7 :type xcb:-u1) 178 | (drawable :initarg :drawable :type xcb:DRAWABLE) 179 | (count :initarg :count :type xcb:CARD32) 180 | (attachments~ :initform 181 | '(name attachments type xcb:dri2:AttachFormat size nil) 182 | :type xcb:-list) 183 | (attachments :initarg :attachments :type xcb:-ignore))) 184 | (defclass xcb:dri2:GetBuffersWithFormat~reply 185 | (xcb:-reply) 186 | ((pad~0 :initform 1 :type xcb:-pad) 187 | (~sequence :type xcb:CARD16) 188 | (length :type xcb:CARD32) 189 | (width :initarg :width :type xcb:CARD32) 190 | (height :initarg :height :type xcb:CARD32) 191 | (count :initarg :count :type xcb:CARD32) 192 | (pad~1 :initform 12 :type xcb:-pad) 193 | (buffers~ :initform 194 | '(name buffers type xcb:dri2:DRI2Buffer size 195 | (xcb:-fieldref 'count)) 196 | :type xcb:-list) 197 | (buffers :initarg :buffers :type xcb:-ignore))) 198 | 199 | (defclass xcb:dri2:SwapBuffers 200 | (xcb:-request) 201 | ((~opcode :initform 8 :type xcb:-u1) 202 | (drawable :initarg :drawable :type xcb:DRAWABLE) 203 | (target-msc-hi :initarg :target-msc-hi :type xcb:CARD32) 204 | (target-msc-lo :initarg :target-msc-lo :type xcb:CARD32) 205 | (divisor-hi :initarg :divisor-hi :type xcb:CARD32) 206 | (divisor-lo :initarg :divisor-lo :type xcb:CARD32) 207 | (remainder-hi :initarg :remainder-hi :type xcb:CARD32) 208 | (remainder-lo :initarg :remainder-lo :type xcb:CARD32))) 209 | (defclass xcb:dri2:SwapBuffers~reply 210 | (xcb:-reply) 211 | ((pad~0 :initform 1 :type xcb:-pad) 212 | (~sequence :type xcb:CARD16) 213 | (length :type xcb:CARD32) 214 | (swap-hi :initarg :swap-hi :type xcb:CARD32) 215 | (swap-lo :initarg :swap-lo :type xcb:CARD32))) 216 | 217 | (defclass xcb:dri2:GetMSC 218 | (xcb:-request) 219 | ((~opcode :initform 9 :type xcb:-u1) 220 | (drawable :initarg :drawable :type xcb:DRAWABLE))) 221 | (defclass xcb:dri2:GetMSC~reply 222 | (xcb:-reply) 223 | ((pad~0 :initform 1 :type xcb:-pad) 224 | (~sequence :type xcb:CARD16) 225 | (length :type xcb:CARD32) 226 | (ust-hi :initarg :ust-hi :type xcb:CARD32) 227 | (ust-lo :initarg :ust-lo :type xcb:CARD32) 228 | (msc-hi :initarg :msc-hi :type xcb:CARD32) 229 | (msc-lo :initarg :msc-lo :type xcb:CARD32) 230 | (sbc-hi :initarg :sbc-hi :type xcb:CARD32) 231 | (sbc-lo :initarg :sbc-lo :type xcb:CARD32))) 232 | 233 | (defclass xcb:dri2:WaitMSC 234 | (xcb:-request) 235 | ((~opcode :initform 10 :type xcb:-u1) 236 | (drawable :initarg :drawable :type xcb:DRAWABLE) 237 | (target-msc-hi :initarg :target-msc-hi :type xcb:CARD32) 238 | (target-msc-lo :initarg :target-msc-lo :type xcb:CARD32) 239 | (divisor-hi :initarg :divisor-hi :type xcb:CARD32) 240 | (divisor-lo :initarg :divisor-lo :type xcb:CARD32) 241 | (remainder-hi :initarg :remainder-hi :type xcb:CARD32) 242 | (remainder-lo :initarg :remainder-lo :type xcb:CARD32))) 243 | (defclass xcb:dri2:WaitMSC~reply 244 | (xcb:-reply) 245 | ((pad~0 :initform 1 :type xcb:-pad) 246 | (~sequence :type xcb:CARD16) 247 | (length :type xcb:CARD32) 248 | (ust-hi :initarg :ust-hi :type xcb:CARD32) 249 | (ust-lo :initarg :ust-lo :type xcb:CARD32) 250 | (msc-hi :initarg :msc-hi :type xcb:CARD32) 251 | (msc-lo :initarg :msc-lo :type xcb:CARD32) 252 | (sbc-hi :initarg :sbc-hi :type xcb:CARD32) 253 | (sbc-lo :initarg :sbc-lo :type xcb:CARD32))) 254 | 255 | (defclass xcb:dri2:WaitSBC 256 | (xcb:-request) 257 | ((~opcode :initform 11 :type xcb:-u1) 258 | (drawable :initarg :drawable :type xcb:DRAWABLE) 259 | (target-sbc-hi :initarg :target-sbc-hi :type xcb:CARD32) 260 | (target-sbc-lo :initarg :target-sbc-lo :type xcb:CARD32))) 261 | (defclass xcb:dri2:WaitSBC~reply 262 | (xcb:-reply) 263 | ((pad~0 :initform 1 :type xcb:-pad) 264 | (~sequence :type xcb:CARD16) 265 | (length :type xcb:CARD32) 266 | (ust-hi :initarg :ust-hi :type xcb:CARD32) 267 | (ust-lo :initarg :ust-lo :type xcb:CARD32) 268 | (msc-hi :initarg :msc-hi :type xcb:CARD32) 269 | (msc-lo :initarg :msc-lo :type xcb:CARD32) 270 | (sbc-hi :initarg :sbc-hi :type xcb:CARD32) 271 | (sbc-lo :initarg :sbc-lo :type xcb:CARD32))) 272 | 273 | (defclass xcb:dri2:SwapInterval 274 | (xcb:-request) 275 | ((~opcode :initform 12 :type xcb:-u1) 276 | (drawable :initarg :drawable :type xcb:DRAWABLE) 277 | (interval :initarg :interval :type xcb:CARD32))) 278 | 279 | (defclass xcb:dri2:GetParam 280 | (xcb:-request) 281 | ((~opcode :initform 13 :type xcb:-u1) 282 | (drawable :initarg :drawable :type xcb:DRAWABLE) 283 | (param :initarg :param :type xcb:CARD32))) 284 | (defclass xcb:dri2:GetParam~reply 285 | (xcb:-reply) 286 | ((is-param-recognized :initarg :is-param-recognized :type xcb:BOOL) 287 | (~sequence :type xcb:CARD16) 288 | (length :type xcb:CARD32) 289 | (value-hi :initarg :value-hi :type xcb:CARD32) 290 | (value-lo :initarg :value-lo :type xcb:CARD32))) 291 | 292 | (defclass xcb:dri2:BufferSwapComplete 293 | (xcb:-event) 294 | ((~code :initform 0) 295 | (pad~0 :initform 1 :type xcb:-pad) 296 | (~sequence :type xcb:CARD16) 297 | (event-type :initarg :event-type :type xcb:CARD16) 298 | (pad~1 :initform 2 :type xcb:-pad) 299 | (drawable :initarg :drawable :type xcb:DRAWABLE) 300 | (ust-hi :initarg :ust-hi :type xcb:CARD32) 301 | (ust-lo :initarg :ust-lo :type xcb:CARD32) 302 | (msc-hi :initarg :msc-hi :type xcb:CARD32) 303 | (msc-lo :initarg :msc-lo :type xcb:CARD32) 304 | (sbc :initarg :sbc :type xcb:CARD32))) 305 | 306 | (defclass xcb:dri2:InvalidateBuffers 307 | (xcb:-event) 308 | ((~code :initform 1) 309 | (pad~0 :initform 1 :type xcb:-pad) 310 | (~sequence :type xcb:CARD16) 311 | (drawable :initarg :drawable :type xcb:DRAWABLE))) 312 | 313 | (defconst xcb:dri2:event-number-class-alist 314 | '((0 . xcb:dri2:BufferSwapComplete) 315 | (1 . xcb:dri2:InvalidateBuffers)) 316 | "(event-number . event-class) alist.") 317 | 318 | 319 | 320 | (provide 'xcb-dri2) 321 | 322 | ;;; xcb-dri2.el ends here 323 | -------------------------------------------------------------------------------- /xcb-dri3.el: -------------------------------------------------------------------------------- 1 | ;;; xcb-dri3.el --- X11 DRI3 extension -*- lexical-binding: t -*- 2 | 3 | ;; Copyright (C) 2015-2019 Free Software Foundation, Inc. 4 | 5 | ;; This file is part of GNU Emacs. 6 | 7 | ;; GNU Emacs is free software: you can redistribute it and/or modify 8 | ;; it under the terms of the GNU General Public License as published by 9 | ;; the Free Software Foundation, either version 3 of the License, or 10 | ;; (at your option) any later version. 11 | 12 | ;; GNU Emacs is distributed in the hope that it will be useful, 13 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | ;; GNU General Public License for more details. 16 | 17 | ;; You should have received a copy of the GNU General Public License 18 | ;; along with GNU Emacs. If not, see . 19 | 20 | ;;; Commentary: 21 | 22 | ;; This file was generated by 'el_client.el' from 'dri3.xml', 23 | ;; which you can retrieve from . 24 | 25 | ;;; Code: 26 | 27 | (require 'xcb-types) 28 | 29 | (defconst xcb:dri3:-extension-xname "DRI3") 30 | (defconst xcb:dri3:-extension-name "DRI3") 31 | (defconst xcb:dri3:-major-version 1) 32 | (defconst xcb:dri3:-minor-version 2) 33 | 34 | (require 'xcb-xproto) 35 | 36 | (defclass xcb:dri3:QueryVersion 37 | (xcb:-request) 38 | ((~opcode :initform 0 :type xcb:-u1) 39 | (major-version :initarg :major-version :type xcb:CARD32) 40 | (minor-version :initarg :minor-version :type xcb:CARD32))) 41 | (defclass xcb:dri3:QueryVersion~reply 42 | (xcb:-reply) 43 | ((pad~0 :initform 1 :type xcb:-pad) 44 | (~sequence :type xcb:CARD16) 45 | (length :type xcb:CARD32) 46 | (major-version :initarg :major-version :type xcb:CARD32) 47 | (minor-version :initarg :minor-version :type xcb:CARD32))) 48 | 49 | (defclass xcb:dri3:Open 50 | (xcb:-request) 51 | ((~opcode :initform 1 :type xcb:-u1) 52 | (drawable :initarg :drawable :type xcb:DRAWABLE) 53 | (provider :initarg :provider :type xcb:CARD32))) 54 | (defclass xcb:dri3:Open~reply 55 | (xcb:-reply) 56 | ((nfd :initarg :nfd :type xcb:CARD8) 57 | (~sequence :type xcb:CARD16) 58 | (length :type xcb:CARD32) 59 | (device-fd :type xcb:fd) 60 | (pad~0 :initform 24 :type xcb:-pad))) 61 | 62 | (defclass xcb:dri3:PixmapFromBuffer 63 | (xcb:-request) 64 | ((~opcode :initform 2 :type xcb:-u1) 65 | (pixmap :initarg :pixmap :type xcb:PIXMAP) 66 | (drawable :initarg :drawable :type xcb:DRAWABLE) 67 | (size :initarg :size :type xcb:CARD32) 68 | (width :initarg :width :type xcb:CARD16) 69 | (height :initarg :height :type xcb:CARD16) 70 | (stride :initarg :stride :type xcb:CARD16) 71 | (depth :initarg :depth :type xcb:CARD8) 72 | (bpp :initarg :bpp :type xcb:CARD8) 73 | (pixmap-fd :type xcb:fd))) 74 | 75 | (defclass xcb:dri3:BufferFromPixmap 76 | (xcb:-request) 77 | ((~opcode :initform 3 :type xcb:-u1) 78 | (pixmap :initarg :pixmap :type xcb:PIXMAP))) 79 | (defclass xcb:dri3:BufferFromPixmap~reply 80 | (xcb:-reply) 81 | ((nfd :initarg :nfd :type xcb:CARD8) 82 | (~sequence :type xcb:CARD16) 83 | (length :type xcb:CARD32) 84 | (size :initarg :size :type xcb:CARD32) 85 | (width :initarg :width :type xcb:CARD16) 86 | (height :initarg :height :type xcb:CARD16) 87 | (stride :initarg :stride :type xcb:CARD16) 88 | (depth :initarg :depth :type xcb:CARD8) 89 | (bpp :initarg :bpp :type xcb:CARD8) 90 | (pixmap-fd :type xcb:fd) 91 | (pad~0 :initform 12 :type xcb:-pad))) 92 | 93 | (defclass xcb:dri3:FenceFromFD 94 | (xcb:-request) 95 | ((~opcode :initform 4 :type xcb:-u1) 96 | (drawable :initarg :drawable :type xcb:DRAWABLE) 97 | (fence :initarg :fence :type xcb:CARD32) 98 | (initially-triggered :initarg :initially-triggered :type xcb:BOOL) 99 | (pad~0 :initform 3 :type xcb:-pad) 100 | (fence-fd :type xcb:fd))) 101 | 102 | (defclass xcb:dri3:FDFromFence 103 | (xcb:-request) 104 | ((~opcode :initform 5 :type xcb:-u1) 105 | (drawable :initarg :drawable :type xcb:DRAWABLE) 106 | (fence :initarg :fence :type xcb:CARD32))) 107 | (defclass xcb:dri3:FDFromFence~reply 108 | (xcb:-reply) 109 | ((nfd :initarg :nfd :type xcb:CARD8) 110 | (~sequence :type xcb:CARD16) 111 | (length :type xcb:CARD32) 112 | (fence-fd :type xcb:fd) 113 | (pad~0 :initform 24 :type xcb:-pad))) 114 | 115 | (defclass xcb:dri3:GetSupportedModifiers 116 | (xcb:-request) 117 | ((~opcode :initform 6 :type xcb:-u1) 118 | (window :initarg :window :type xcb:CARD32) 119 | (depth :initarg :depth :type xcb:CARD8) 120 | (bpp :initarg :bpp :type xcb:CARD8) 121 | (pad~0 :initform 2 :type xcb:-pad))) 122 | (defclass xcb:dri3:GetSupportedModifiers~reply 123 | (xcb:-reply) 124 | ((pad~0 :initform 8 :type xcb:-pad-align) 125 | (~sequence :type xcb:CARD16) 126 | (length :type xcb:CARD32) 127 | (pad~1 :initform 1 :type xcb:-pad) 128 | (num-window-modifiers :initarg :num-window-modifiers :type xcb:CARD32) 129 | (num-screen-modifiers :initarg :num-screen-modifiers :type xcb:CARD32) 130 | (pad~2 :initform 16 :type xcb:-pad) 131 | (window-modifiers~ :initform 132 | '(name window-modifiers type xcb:CARD64 size 133 | (xcb:-fieldref 'num-window-modifiers)) 134 | :type xcb:-list) 135 | (window-modifiers :initarg :window-modifiers :type xcb:-ignore) 136 | (screen-modifiers~ :initform 137 | '(name screen-modifiers type xcb:CARD64 size 138 | (xcb:-fieldref 'num-screen-modifiers)) 139 | :type xcb:-list) 140 | (screen-modifiers :initarg :screen-modifiers :type xcb:-ignore))) 141 | 142 | (defclass xcb:dri3:PixmapFromBuffers 143 | (xcb:-request) 144 | ((~opcode :initform 7 :type xcb:-u1) 145 | (pad~0 :initform 8 :type xcb:-pad-align) 146 | (pixmap :initarg :pixmap :type xcb:PIXMAP) 147 | (window :initarg :window :type xcb:WINDOW) 148 | (num-buffers :initarg :num-buffers :type xcb:CARD8) 149 | (pad~1 :initform 3 :type xcb:-pad) 150 | (width :initarg :width :type xcb:CARD16) 151 | (height :initarg :height :type xcb:CARD16) 152 | (stride0 :initarg :stride0 :type xcb:CARD32) 153 | (offset0 :initarg :offset0 :type xcb:CARD32) 154 | (stride1 :initarg :stride1 :type xcb:CARD32) 155 | (offset1 :initarg :offset1 :type xcb:CARD32) 156 | (stride2 :initarg :stride2 :type xcb:CARD32) 157 | (offset2 :initarg :offset2 :type xcb:CARD32) 158 | (stride3 :initarg :stride3 :type xcb:CARD32) 159 | (offset3 :initarg :offset3 :type xcb:CARD32) 160 | (depth :initarg :depth :type xcb:CARD8) 161 | (bpp :initarg :bpp :type xcb:CARD8) 162 | (pad~2 :initform 2 :type xcb:-pad) 163 | (modifier :initarg :modifier :type xcb:CARD64) 164 | (buffers~ :initform 165 | '(name buffers type xcb:fd size 166 | (xcb:-fieldref 'num-buffers)) 167 | :type xcb:-list) 168 | (buffers :initarg :buffers :type xcb:-ignore))) 169 | 170 | (defclass xcb:dri3:BuffersFromPixmap 171 | (xcb:-request) 172 | ((~opcode :initform 8 :type xcb:-u1) 173 | (pixmap :initarg :pixmap :type xcb:PIXMAP))) 174 | (defclass xcb:dri3:BuffersFromPixmap~reply 175 | (xcb:-reply) 176 | ((pad~0 :initform 8 :type xcb:-pad-align) 177 | (~sequence :type xcb:CARD16) 178 | (length :type xcb:CARD32) 179 | (nfd :initarg :nfd :type xcb:CARD8) 180 | (width :initarg :width :type xcb:CARD16) 181 | (height :initarg :height :type xcb:CARD16) 182 | (pad~1 :initform 4 :type xcb:-pad) 183 | (modifier :initarg :modifier :type xcb:CARD64) 184 | (depth :initarg :depth :type xcb:CARD8) 185 | (bpp :initarg :bpp :type xcb:CARD8) 186 | (pad~2 :initform 6 :type xcb:-pad) 187 | (strides~ :initform 188 | '(name strides type xcb:CARD32 size 189 | (xcb:-fieldref 'nfd)) 190 | :type xcb:-list) 191 | (strides :initarg :strides :type xcb:-ignore) 192 | (offsets~ :initform 193 | '(name offsets type xcb:CARD32 size 194 | (xcb:-fieldref 'nfd)) 195 | :type xcb:-list) 196 | (offsets :initarg :offsets :type xcb:-ignore) 197 | (buffers~ :initform 198 | '(name buffers type xcb:fd size 199 | (xcb:-fieldref 'nfd)) 200 | :type xcb:-list) 201 | (buffers :initarg :buffers :type xcb:-ignore))) 202 | 203 | 204 | 205 | (provide 'xcb-dri3) 206 | 207 | ;;; xcb-dri3.el ends here 208 | -------------------------------------------------------------------------------- /xcb-ge.el: -------------------------------------------------------------------------------- 1 | ;;; xcb-ge.el --- X11 GenericEvent extension -*- lexical-binding: t -*- 2 | 3 | ;; Copyright (C) 2015-2019 Free Software Foundation, Inc. 4 | 5 | ;; This file is part of GNU Emacs. 6 | 7 | ;; GNU Emacs is free software: you can redistribute it and/or modify 8 | ;; it under the terms of the GNU General Public License as published by 9 | ;; the Free Software Foundation, either version 3 of the License, or 10 | ;; (at your option) any later version. 11 | 12 | ;; GNU Emacs is distributed in the hope that it will be useful, 13 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | ;; GNU General Public License for more details. 16 | 17 | ;; You should have received a copy of the GNU General Public License 18 | ;; along with GNU Emacs. If not, see . 19 | 20 | ;;; Commentary: 21 | 22 | ;; This file was generated by 'el_client.el' from 'ge.xml', 23 | ;; which you can retrieve from . 24 | 25 | ;;; Code: 26 | 27 | (require 'xcb-types) 28 | 29 | (defconst xcb:ge:-extension-xname "Generic Event Extension") 30 | (defconst xcb:ge:-extension-name "GenericEvent") 31 | (defconst xcb:ge:-major-version 1) 32 | (defconst xcb:ge:-minor-version 0) 33 | 34 | (defclass xcb:ge:QueryVersion 35 | (xcb:-request) 36 | ((~opcode :initform 0 :type xcb:-u1) 37 | (client-major-version :initarg :client-major-version :type xcb:CARD16) 38 | (client-minor-version :initarg :client-minor-version :type xcb:CARD16))) 39 | (defclass xcb:ge:QueryVersion~reply 40 | (xcb:-reply) 41 | ((pad~0 :initform 1 :type xcb:-pad) 42 | (~sequence :type xcb:CARD16) 43 | (length :type xcb:CARD32) 44 | (major-version :initarg :major-version :type xcb:CARD16) 45 | (minor-version :initarg :minor-version :type xcb:CARD16) 46 | (pad~1 :initform 20 :type xcb:-pad))) 47 | 48 | 49 | 50 | (provide 'xcb-ge) 51 | 52 | ;;; xcb-ge.el ends here 53 | -------------------------------------------------------------------------------- /xcb-present.el: -------------------------------------------------------------------------------- 1 | ;;; xcb-present.el --- X11 Present extension -*- lexical-binding: t -*- 2 | 3 | ;; Copyright (C) 2015-2019 Free Software Foundation, Inc. 4 | 5 | ;; This file is part of GNU Emacs. 6 | 7 | ;; GNU Emacs is free software: you can redistribute it and/or modify 8 | ;; it under the terms of the GNU General Public License as published by 9 | ;; the Free Software Foundation, either version 3 of the License, or 10 | ;; (at your option) any later version. 11 | 12 | ;; GNU Emacs is distributed in the hope that it will be useful, 13 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | ;; GNU General Public License for more details. 16 | 17 | ;; You should have received a copy of the GNU General Public License 18 | ;; along with GNU Emacs. If not, see . 19 | 20 | ;;; Commentary: 21 | 22 | ;; This file was generated by 'el_client.el' from 'present.xml', 23 | ;; which you can retrieve from . 24 | 25 | ;;; Code: 26 | 27 | (require 'xcb-types) 28 | 29 | (defconst xcb:present:-extension-xname "Present") 30 | (defconst xcb:present:-extension-name "Present") 31 | (defconst xcb:present:-major-version 1) 32 | (defconst xcb:present:-minor-version 2) 33 | 34 | (require 'xcb-xproto) 35 | 36 | (require 'xcb-randr) 37 | 38 | (require 'xcb-xfixes) 39 | 40 | (require 'xcb-sync) 41 | 42 | (defconst xcb:present:Event:ConfigureNotify 0) 43 | (defconst xcb:present:Event:CompleteNotify 1) 44 | (defconst xcb:present:Event:IdleNotify 2) 45 | (defconst xcb:present:Event:RedirectNotify 3) 46 | 47 | (defconst xcb:present:EventMask:NoEvent 0) 48 | (defconst xcb:present:EventMask:ConfigureNotify 1) 49 | (defconst xcb:present:EventMask:CompleteNotify 2) 50 | (defconst xcb:present:EventMask:IdleNotify 4) 51 | (defconst xcb:present:EventMask:RedirectNotify 8) 52 | 53 | (defconst xcb:present:Option:None 0) 54 | (defconst xcb:present:Option:Async 1) 55 | (defconst xcb:present:Option:Copy 2) 56 | (defconst xcb:present:Option:UST 4) 57 | (defconst xcb:present:Option:Suboptimal 8) 58 | 59 | (defconst xcb:present:Capability:None 0) 60 | (defconst xcb:present:Capability:Async 1) 61 | (defconst xcb:present:Capability:Fence 2) 62 | (defconst xcb:present:Capability:UST 4) 63 | 64 | (defconst xcb:present:CompleteKind:Pixmap 0) 65 | (defconst xcb:present:CompleteKind:NotifyMSC 1) 66 | 67 | (defconst xcb:present:CompleteMode:Copy 0) 68 | (defconst xcb:present:CompleteMode:Flip 1) 69 | (defconst xcb:present:CompleteMode:Skip 2) 70 | (defconst xcb:present:CompleteMode:SuboptimalCopy 3) 71 | 72 | (defclass xcb:present:Notify 73 | (xcb:-struct) 74 | ((window :initarg :window :type xcb:WINDOW) 75 | (serial :initarg :serial :type xcb:CARD32))) 76 | 77 | (defclass xcb:present:QueryVersion 78 | (xcb:-request) 79 | ((~opcode :initform 0 :type xcb:-u1) 80 | (major-version :initarg :major-version :type xcb:CARD32) 81 | (minor-version :initarg :minor-version :type xcb:CARD32))) 82 | (defclass xcb:present:QueryVersion~reply 83 | (xcb:-reply) 84 | ((pad~0 :initform 1 :type xcb:-pad) 85 | (~sequence :type xcb:CARD16) 86 | (length :type xcb:CARD32) 87 | (major-version :initarg :major-version :type xcb:CARD32) 88 | (minor-version :initarg :minor-version :type xcb:CARD32))) 89 | 90 | (defclass xcb:present:Pixmap 91 | (xcb:-request) 92 | ((~opcode :initform 1 :type xcb:-u1) 93 | (pad~0 :initform 8 :type xcb:-pad-align) 94 | (window :initarg :window :type xcb:WINDOW) 95 | (pixmap :initarg :pixmap :type xcb:PIXMAP) 96 | (serial :initarg :serial :type xcb:CARD32) 97 | (valid :initarg :valid :type xcb:xfixes:REGION) 98 | (update :initarg :update :type xcb:xfixes:REGION) 99 | (x-off :initarg :x-off :type xcb:INT16) 100 | (y-off :initarg :y-off :type xcb:INT16) 101 | (target-crtc :initarg :target-crtc :type xcb:randr:CRTC) 102 | (wait-fence :initarg :wait-fence :type xcb:sync:FENCE) 103 | (idle-fence :initarg :idle-fence :type xcb:sync:FENCE) 104 | (options :initarg :options :type xcb:CARD32) 105 | (pad~1 :initform 4 :type xcb:-pad) 106 | (target-msc :initarg :target-msc :type xcb:CARD64) 107 | (divisor :initarg :divisor :type xcb:CARD64) 108 | (remainder :initarg :remainder :type xcb:CARD64) 109 | (notifies~ :initform 110 | '(name notifies type xcb:present:Notify size nil) 111 | :type xcb:-list) 112 | (notifies :initarg :notifies :type xcb:-ignore))) 113 | 114 | (defclass xcb:present:NotifyMSC 115 | (xcb:-request) 116 | ((~opcode :initform 2 :type xcb:-u1) 117 | (pad~0 :initform 8 :type xcb:-pad-align) 118 | (window :initarg :window :type xcb:WINDOW) 119 | (serial :initarg :serial :type xcb:CARD32) 120 | (pad~1 :initform 4 :type xcb:-pad) 121 | (target-msc :initarg :target-msc :type xcb:CARD64) 122 | (divisor :initarg :divisor :type xcb:CARD64) 123 | (remainder :initarg :remainder :type xcb:CARD64))) 124 | 125 | (xcb:deftypealias 'xcb:present:EVENT 'xcb:-u4) 126 | 127 | (defclass xcb:present:SelectInput 128 | (xcb:-request) 129 | ((~opcode :initform 3 :type xcb:-u1) 130 | (eid :initarg :eid :type xcb:present:EVENT) 131 | (window :initarg :window :type xcb:WINDOW) 132 | (event-mask :initarg :event-mask :type xcb:CARD32))) 133 | 134 | (defclass xcb:present:QueryCapabilities 135 | (xcb:-request) 136 | ((~opcode :initform 4 :type xcb:-u1) 137 | (target :initarg :target :type xcb:CARD32))) 138 | (defclass xcb:present:QueryCapabilities~reply 139 | (xcb:-reply) 140 | ((pad~0 :initform 1 :type xcb:-pad) 141 | (~sequence :type xcb:CARD16) 142 | (length :type xcb:CARD32) 143 | (capabilities :initarg :capabilities :type xcb:CARD32))) 144 | 145 | (defclass xcb:present:Generic 146 | (xcb:-event) 147 | ((~code :initform 0) 148 | (extension :initarg :extension :type xcb:CARD8) 149 | (~sequence :type xcb:CARD16) 150 | (length :initarg :length :type xcb:CARD32) 151 | (evtype :initarg :evtype :type xcb:CARD16) 152 | (pad~0 :initform 2 :type xcb:-pad) 153 | (event :initarg :event :type xcb:present:EVENT))) 154 | 155 | (defclass xcb:present:ConfigureNotify 156 | (xcb:-generic-event) 157 | ((~evtype :initform 0) 158 | (pad~0 :initform 2 :type xcb:-pad) 159 | (event :initarg :event :type xcb:present:EVENT) 160 | (window :initarg :window :type xcb:WINDOW) 161 | (x :initarg :x :type xcb:INT16) 162 | (y :initarg :y :type xcb:INT16) 163 | (width :initarg :width :type xcb:CARD16) 164 | (height :initarg :height :type xcb:CARD16) 165 | (off-x :initarg :off-x :type xcb:INT16) 166 | (off-y :initarg :off-y :type xcb:INT16) 167 | (pixmap-width :initarg :pixmap-width :type xcb:CARD16) 168 | (pixmap-height :initarg :pixmap-height :type xcb:CARD16) 169 | (pixmap-flags :initarg :pixmap-flags :type xcb:CARD32))) 170 | 171 | (defclass xcb:present:CompleteNotify 172 | (xcb:-generic-event) 173 | ((~evtype :initform 1) 174 | (pad~0 :initform 8 :type xcb:-pad-align) 175 | (kind :initarg :kind :type xcb:CARD8) 176 | (mode :initarg :mode :type xcb:CARD8) 177 | (event :initarg :event :type xcb:present:EVENT) 178 | (window :initarg :window :type xcb:WINDOW) 179 | (serial :initarg :serial :type xcb:CARD32) 180 | (ust :initarg :ust :type xcb:CARD64) 181 | (msc :initarg :msc :type xcb:CARD64))) 182 | 183 | (defclass xcb:present:IdleNotify 184 | (xcb:-generic-event) 185 | ((~evtype :initform 2) 186 | (pad~0 :initform 2 :type xcb:-pad) 187 | (event :initarg :event :type xcb:present:EVENT) 188 | (window :initarg :window :type xcb:WINDOW) 189 | (serial :initarg :serial :type xcb:CARD32) 190 | (pixmap :initarg :pixmap :type xcb:PIXMAP) 191 | (idle-fence :initarg :idle-fence :type xcb:sync:FENCE))) 192 | 193 | (defclass xcb:present:RedirectNotify 194 | (xcb:-generic-event) 195 | ((~evtype :initform 3) 196 | (pad~0 :initform 8 :type xcb:-pad-align) 197 | (update-window :initarg :update-window :type xcb:BOOL) 198 | (pad~1 :initform 1 :type xcb:-pad) 199 | (event :initarg :event :type xcb:present:EVENT) 200 | (event-window :initarg :event-window :type xcb:WINDOW) 201 | (window :initarg :window :type xcb:WINDOW) 202 | (pixmap :initarg :pixmap :type xcb:PIXMAP) 203 | (serial :initarg :serial :type xcb:CARD32) 204 | (valid-region :initarg :valid-region :type xcb:xfixes:REGION) 205 | (update-region :initarg :update-region :type xcb:xfixes:REGION) 206 | (valid-rect :initarg :valid-rect :type xcb:RECTANGLE) 207 | (update-rect :initarg :update-rect :type xcb:RECTANGLE) 208 | (x-off :initarg :x-off :type xcb:INT16) 209 | (y-off :initarg :y-off :type xcb:INT16) 210 | (target-crtc :initarg :target-crtc :type xcb:randr:CRTC) 211 | (wait-fence :initarg :wait-fence :type xcb:sync:FENCE) 212 | (idle-fence :initarg :idle-fence :type xcb:sync:FENCE) 213 | (options :initarg :options :type xcb:CARD32) 214 | (pad~2 :initform 4 :type xcb:-pad) 215 | (target-msc :initarg :target-msc :type xcb:CARD64) 216 | (divisor :initarg :divisor :type xcb:CARD64) 217 | (remainder :initarg :remainder :type xcb:CARD64) 218 | (notifies~ :initform 219 | '(name notifies type xcb:present:Notify size nil) 220 | :type xcb:-list) 221 | (notifies :initarg :notifies :type xcb:-ignore))) 222 | 223 | (defconst xcb:present:event-number-class-alist 224 | '((0 . xcb:present:Generic)) 225 | "(event-number . event-class) alist.") 226 | 227 | (defconst xcb:present:xge-number-class-alist 228 | '((0 . xcb:present:ConfigureNotify) 229 | (1 . xcb:present:CompleteNotify) 230 | (2 . xcb:present:IdleNotify) 231 | (3 . xcb:present:RedirectNotify)) 232 | "(xge-number . event-class) alist.") 233 | 234 | 235 | 236 | (provide 'xcb-present) 237 | 238 | ;;; xcb-present.el ends here 239 | -------------------------------------------------------------------------------- /xcb-record.el: -------------------------------------------------------------------------------- 1 | ;;; xcb-record.el --- X11 Record extension -*- lexical-binding: t -*- 2 | 3 | ;; Copyright (C) 2015-2019 Free Software Foundation, Inc. 4 | 5 | ;; This file is part of GNU Emacs. 6 | 7 | ;; GNU Emacs is free software: you can redistribute it and/or modify 8 | ;; it under the terms of the GNU General Public License as published by 9 | ;; the Free Software Foundation, either version 3 of the License, or 10 | ;; (at your option) any later version. 11 | 12 | ;; GNU Emacs is distributed in the hope that it will be useful, 13 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | ;; GNU General Public License for more details. 16 | 17 | ;; You should have received a copy of the GNU General Public License 18 | ;; along with GNU Emacs. If not, see . 19 | 20 | ;;; Commentary: 21 | 22 | ;; This file was generated by 'el_client.el' from 'record.xml', 23 | ;; which you can retrieve from . 24 | 25 | ;;; Code: 26 | 27 | (require 'xcb-types) 28 | 29 | (defconst xcb:record:-extension-xname "RECORD") 30 | (defconst xcb:record:-extension-name "Record") 31 | (defconst xcb:record:-major-version 1) 32 | (defconst xcb:record:-minor-version 13) 33 | 34 | (xcb:deftypealias 'xcb:record:CONTEXT 'xcb:-u4) 35 | 36 | (defclass xcb:record:Range8 37 | (xcb:-struct) 38 | ((first :initarg :first :type xcb:CARD8) 39 | (last :initarg :last :type xcb:CARD8))) 40 | 41 | (defclass xcb:record:Range16 42 | (xcb:-struct) 43 | ((first :initarg :first :type xcb:CARD16) 44 | (last :initarg :last :type xcb:CARD16))) 45 | 46 | (defclass xcb:record:ExtRange 47 | (xcb:-struct) 48 | ((major :initarg :major :type xcb:record:Range8) 49 | (minor :initarg :minor :type xcb:record:Range16))) 50 | 51 | (defclass xcb:record:Range 52 | (xcb:-struct) 53 | ((core-requests :initarg :core-requests :type xcb:record:Range8) 54 | (core-replies :initarg :core-replies :type xcb:record:Range8) 55 | (ext-requests :initarg :ext-requests :type xcb:record:ExtRange) 56 | (ext-replies :initarg :ext-replies :type xcb:record:ExtRange) 57 | (delivered-events :initarg :delivered-events :type xcb:record:Range8) 58 | (device-events :initarg :device-events :type xcb:record:Range8) 59 | (errors :initarg :errors :type xcb:record:Range8) 60 | (client-started :initarg :client-started :type xcb:BOOL) 61 | (client-died :initarg :client-died :type xcb:BOOL))) 62 | 63 | (xcb:deftypealias 'xcb:record:ElementHeader 'xcb:CARD8) 64 | 65 | (defconst xcb:record:HType:FromServerTime 1) 66 | (defconst xcb:record:HType:FromClientTime 2) 67 | (defconst xcb:record:HType:FromClientSequence 4) 68 | 69 | (xcb:deftypealias 'xcb:record:ClientSpec 'xcb:CARD32) 70 | 71 | (defconst xcb:record:CS:CurrentClients 1) 72 | (defconst xcb:record:CS:FutureClients 2) 73 | (defconst xcb:record:CS:AllClients 3) 74 | 75 | (defclass xcb:record:ClientInfo 76 | (xcb:-struct) 77 | ((client-resource :initarg :client-resource :type xcb:record:ClientSpec) 78 | (num-ranges :initarg :num-ranges :type xcb:CARD32) 79 | (ranges~ :initform 80 | '(name ranges type xcb:record:Range size 81 | (xcb:-fieldref 'num-ranges)) 82 | :type xcb:-list) 83 | (ranges :initarg :ranges :type xcb:-ignore))) 84 | 85 | (defclass xcb:record:BadContext 86 | (xcb:-error) 87 | ((~code :initform 0) 88 | (invalid-record :initarg :invalid-record :type xcb:CARD32))) 89 | 90 | (defclass xcb:record:QueryVersion 91 | (xcb:-request) 92 | ((~opcode :initform 0 :type xcb:-u1) 93 | (major-version :initarg :major-version :type xcb:CARD16) 94 | (minor-version :initarg :minor-version :type xcb:CARD16))) 95 | (defclass xcb:record:QueryVersion~reply 96 | (xcb:-reply) 97 | ((pad~0 :initform 1 :type xcb:-pad) 98 | (~sequence :type xcb:CARD16) 99 | (length :type xcb:CARD32) 100 | (major-version :initarg :major-version :type xcb:CARD16) 101 | (minor-version :initarg :minor-version :type xcb:CARD16))) 102 | 103 | (defclass xcb:record:CreateContext 104 | (xcb:-request) 105 | ((~opcode :initform 1 :type xcb:-u1) 106 | (context :initarg :context :type xcb:record:CONTEXT) 107 | (element-header :initarg :element-header :type xcb:record:ElementHeader) 108 | (pad~0 :initform 3 :type xcb:-pad) 109 | (num-client-specs :initarg :num-client-specs :type xcb:CARD32) 110 | (num-ranges :initarg :num-ranges :type xcb:CARD32) 111 | (client-specs~ :initform 112 | '(name client-specs type xcb:record:ClientSpec size 113 | (xcb:-fieldref 'num-client-specs)) 114 | :type xcb:-list) 115 | (client-specs :initarg :client-specs :type xcb:-ignore) 116 | (ranges~ :initform 117 | '(name ranges type xcb:record:Range size 118 | (xcb:-fieldref 'num-ranges)) 119 | :type xcb:-list) 120 | (ranges :initarg :ranges :type xcb:-ignore))) 121 | 122 | (defclass xcb:record:RegisterClients 123 | (xcb:-request) 124 | ((~opcode :initform 2 :type xcb:-u1) 125 | (context :initarg :context :type xcb:record:CONTEXT) 126 | (element-header :initarg :element-header :type xcb:record:ElementHeader) 127 | (pad~0 :initform 3 :type xcb:-pad) 128 | (num-client-specs :initarg :num-client-specs :type xcb:CARD32) 129 | (num-ranges :initarg :num-ranges :type xcb:CARD32) 130 | (client-specs~ :initform 131 | '(name client-specs type xcb:record:ClientSpec size 132 | (xcb:-fieldref 'num-client-specs)) 133 | :type xcb:-list) 134 | (client-specs :initarg :client-specs :type xcb:-ignore) 135 | (ranges~ :initform 136 | '(name ranges type xcb:record:Range size 137 | (xcb:-fieldref 'num-ranges)) 138 | :type xcb:-list) 139 | (ranges :initarg :ranges :type xcb:-ignore))) 140 | 141 | (defclass xcb:record:UnregisterClients 142 | (xcb:-request) 143 | ((~opcode :initform 3 :type xcb:-u1) 144 | (context :initarg :context :type xcb:record:CONTEXT) 145 | (num-client-specs :initarg :num-client-specs :type xcb:CARD32) 146 | (client-specs~ :initform 147 | '(name client-specs type xcb:record:ClientSpec size 148 | (xcb:-fieldref 'num-client-specs)) 149 | :type xcb:-list) 150 | (client-specs :initarg :client-specs :type xcb:-ignore))) 151 | 152 | (defclass xcb:record:GetContext 153 | (xcb:-request) 154 | ((~opcode :initform 4 :type xcb:-u1) 155 | (context :initarg :context :type xcb:record:CONTEXT))) 156 | (defclass xcb:record:GetContext~reply 157 | (xcb:-reply) 158 | ((enabled :initarg :enabled :type xcb:BOOL) 159 | (~sequence :type xcb:CARD16) 160 | (length :type xcb:CARD32) 161 | (element-header :initarg :element-header :type xcb:record:ElementHeader) 162 | (pad~0 :initform 3 :type xcb:-pad) 163 | (num-intercepted-clients :initarg :num-intercepted-clients :type xcb:CARD32) 164 | (pad~1 :initform 16 :type xcb:-pad) 165 | (intercepted-clients~ :initform 166 | '(name intercepted-clients type xcb:record:ClientInfo size 167 | (xcb:-fieldref 'num-intercepted-clients)) 168 | :type xcb:-list) 169 | (intercepted-clients :initarg :intercepted-clients :type xcb:-ignore))) 170 | 171 | (defclass xcb:record:EnableContext 172 | (xcb:-request) 173 | ((~opcode :initform 5 :type xcb:-u1) 174 | (context :initarg :context :type xcb:record:CONTEXT))) 175 | (defclass xcb:record:EnableContext~reply 176 | (xcb:-reply) 177 | ((category :initarg :category :type xcb:CARD8) 178 | (~sequence :type xcb:CARD16) 179 | (length :type xcb:CARD32) 180 | (element-header :initarg :element-header :type xcb:record:ElementHeader) 181 | (client-swapped :initarg :client-swapped :type xcb:BOOL) 182 | (pad~0 :initform 2 :type xcb:-pad) 183 | (xid-base :initarg :xid-base :type xcb:CARD32) 184 | (server-time :initarg :server-time :type xcb:CARD32) 185 | (rec-sequence-num :initarg :rec-sequence-num :type xcb:CARD32) 186 | (pad~1 :initform 8 :type xcb:-pad) 187 | (data~ :initform 188 | '(name data type xcb:BYTE size 189 | (* 190 | (xcb:-fieldref 'length) 191 | 4)) 192 | :type xcb:-list) 193 | (data :initarg :data :type xcb:-ignore))) 194 | 195 | (defclass xcb:record:DisableContext 196 | (xcb:-request) 197 | ((~opcode :initform 6 :type xcb:-u1) 198 | (context :initarg :context :type xcb:record:CONTEXT))) 199 | 200 | (defclass xcb:record:FreeContext 201 | (xcb:-request) 202 | ((~opcode :initform 7 :type xcb:-u1) 203 | (context :initarg :context :type xcb:record:CONTEXT))) 204 | 205 | (defconst xcb:record:error-number-class-alist 206 | '((0 . xcb:record:BadContext)) 207 | "(error-number . error-class) alist.") 208 | 209 | 210 | 211 | (provide 'xcb-record) 212 | 213 | ;;; xcb-record.el ends here 214 | -------------------------------------------------------------------------------- /xcb-renderutil.el: -------------------------------------------------------------------------------- 1 | ;;; xcb-renderutil.el --- Utility functions for -*- lexical-binding: t -*- 2 | ;;; the Render extension 3 | 4 | ;; Copyright (C) 2016-2019 Free Software Foundation, Inc. 5 | 6 | ;; Author: Chris Feng 7 | 8 | ;; This file is part of GNU Emacs. 9 | 10 | ;; GNU Emacs is free software: you can redistribute it and/or modify 11 | ;; it under the terms of the GNU General Public License as published by 12 | ;; the Free Software Foundation, either version 3 of the License, or 13 | ;; (at your option) any later version. 14 | 15 | ;; GNU Emacs is distributed in the hope that it will be useful, 16 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | ;; GNU General Public License for more details. 19 | 20 | ;; You should have received a copy of the GNU General Public License 21 | ;; along with GNU Emacs. If not, see . 22 | 23 | ;;; Commentary: 24 | 25 | ;; This library provides utility functions for the Render extension. 26 | 27 | ;; Todo 28 | ;; + Glyph-related functions are not implemented. 29 | 30 | ;; References: 31 | ;; + xcb/util-renderutil (git://anongit.freedesktop.org/xcb/util-renderutil) 32 | 33 | ;;; Code: 34 | 35 | (require 'xcb) 36 | (require 'xcb-render) 37 | 38 | ;; Protocol version. 39 | (defconst xcb:renderutil:-MAJOR_VERSION 0) 40 | (defconst xcb:renderutil:-MINOR_VERSION 11) 41 | 42 | ;; PICTFORMINFO masks. 43 | (defconst xcb:renderutil:PICT_FORMAT:ID 1) 44 | (defconst xcb:renderutil:PICT_FORMAT:TYPE 2) 45 | (defconst xcb:renderutil:PICT_FORMAT:DEPTH 4) 46 | (defconst xcb:renderutil:PICT_FORMAT:RED 8) 47 | (defconst xcb:renderutil:PICT_FORMAT:RED_MASK 16) 48 | (defconst xcb:renderutil:PICT_FORMAT:GREEN 32) 49 | (defconst xcb:renderutil:PICT_FORMAT:GREEN_MASK 64) 50 | (defconst xcb:renderutil:PICT_FORMAT:BLUE 128) 51 | (defconst xcb:renderutil:PICT_FORMAT:BLUE_MASK 256) 52 | (defconst xcb:renderutil:PICT_FORMAT:ALPHA 512) 53 | (defconst xcb:renderutil:PICT_FORMAT:ALPHA_MASK 1024) 54 | (defconst xcb:renderutil:PICT_FORMAT:COLORMAP 2048) 55 | 56 | ;; Indices of standard PictFormats. 57 | (defconst xcb:renderutil:PICT_STANDARD:ARGB_32 0) 58 | (defconst xcb:renderutil:PICT_STANDARD:RGB_24 1) 59 | (defconst xcb:renderutil:PICT_STANDARD:A_8 2) 60 | (defconst xcb:renderutil:PICT_STANDARD:A_4 3) 61 | (defconst xcb:renderutil:PICT_STANDARD:A_1 4) 62 | 63 | (defconst xcb:renderutil:STANDARD-TEMPLATES 64 | (list 65 | ;; xcb:renderutil:PICT_STANDARD:ARGB_32 66 | (vector (make-instance 'xcb:render:PICTFORMINFO 67 | :id 0 68 | :type xcb:render:PictType:Direct 69 | :depth 32 70 | :direct (make-instance 'xcb:render:DIRECTFORMAT 71 | :red-shift 16 72 | :red-mask #xFF 73 | :green-shift 8 74 | :green-mask #xFF 75 | :blue-shift 0 76 | :blue-mask #xFF 77 | :alpha-shift 24 78 | :alpha-mask #xFF) 79 | :colormap 0) 80 | (logior xcb:renderutil:PICT_FORMAT:TYPE 81 | xcb:renderutil:PICT_FORMAT:DEPTH 82 | xcb:renderutil:PICT_FORMAT:RED 83 | xcb:renderutil:PICT_FORMAT:RED_MASK 84 | xcb:renderutil:PICT_FORMAT:GREEN 85 | xcb:renderutil:PICT_FORMAT:GREEN_MASK 86 | xcb:renderutil:PICT_FORMAT:BLUE 87 | xcb:renderutil:PICT_FORMAT:BLUE_MASK 88 | xcb:renderutil:PICT_FORMAT:ALPHA 89 | xcb:renderutil:PICT_FORMAT:ALPHA_MASK)) 90 | ;; xcb:renderutil:PICT_STANDARD:RGB_24 91 | (vector (make-instance 'xcb:render:PICTFORMINFO 92 | :id 0 93 | :type xcb:render:PictType:Direct 94 | :depth 24 95 | :direct (make-instance 'xcb:render:DIRECTFORMAT 96 | :red-shift 16 97 | :red-mask #xFF 98 | :green-shift 8 99 | :green-mask #xFF 100 | :blue-shift 0 101 | :blue-mask #xFF 102 | :alpha-shift 0 103 | :alpha-mask #x00) 104 | :colormap 0) 105 | (logior xcb:renderutil:PICT_FORMAT:TYPE 106 | xcb:renderutil:PICT_FORMAT:DEPTH 107 | xcb:renderutil:PICT_FORMAT:RED 108 | xcb:renderutil:PICT_FORMAT:RED_MASK 109 | xcb:renderutil:PICT_FORMAT:GREEN 110 | xcb:renderutil:PICT_FORMAT:GREEN_MASK 111 | xcb:renderutil:PICT_FORMAT:BLUE 112 | xcb:renderutil:PICT_FORMAT:BLUE_MASK 113 | xcb:renderutil:PICT_FORMAT:ALPHA_MASK)) 114 | ;; xcb:renderutil:PICT_STANDARD:A_8 115 | (vector (make-instance 'xcb:render:PICTFORMINFO 116 | :id 0 117 | :type xcb:render:PictType:Direct 118 | :depth 8 119 | :direct (make-instance 'xcb:render:DIRECTFORMAT 120 | :red-shift 0 121 | :red-mask #x00 122 | :green-shift 0 123 | :green-mask #x00 124 | :blue-shift 0 125 | :blue-mask #x00 126 | :alpha-shift 0 127 | :alpha-mask #xFF) 128 | :colormap 0) 129 | (logior xcb:renderutil:PICT_FORMAT:TYPE 130 | xcb:renderutil:PICT_FORMAT:DEPTH 131 | xcb:renderutil:PICT_FORMAT:RED_MASK 132 | xcb:renderutil:PICT_FORMAT:GREEN_MASK 133 | xcb:renderutil:PICT_FORMAT:BLUE_MASK 134 | xcb:renderutil:PICT_FORMAT:ALPHA 135 | xcb:renderutil:PICT_FORMAT:ALPHA_MASK)) 136 | ;; xcb:renderutil:PICT_STANDARD:A_4 137 | (vector (make-instance 'xcb:render:PICTFORMINFO 138 | :id 0 139 | :type xcb:render:PictType:Direct 140 | :depth 4 141 | :direct (make-instance 'xcb:render:DIRECTFORMAT 142 | :red-shift 0 143 | :red-mask #x00 144 | :green-shift 0 145 | :green-mask #x00 146 | :blue-shift 0 147 | :blue-mask #x00 148 | :alpha-shift 0 149 | :alpha-mask #x0F) 150 | :colormap 0) 151 | (logior xcb:renderutil:PICT_FORMAT:TYPE 152 | xcb:renderutil:PICT_FORMAT:DEPTH 153 | xcb:renderutil:PICT_FORMAT:RED_MASK 154 | xcb:renderutil:PICT_FORMAT:GREEN_MASK 155 | xcb:renderutil:PICT_FORMAT:BLUE_MASK 156 | xcb:renderutil:PICT_FORMAT:ALPHA 157 | xcb:renderutil:PICT_FORMAT:ALPHA_MASK)) 158 | ;; xcb:renderutil:PICT_STANDARD:A_1 159 | (vector (make-instance 'xcb:render:PICTFORMINFO 160 | :id 0 161 | :type xcb:render:PictType:Direct 162 | :depth 1 163 | :direct (make-instance 'xcb:render:DIRECTFORMAT 164 | :red-shift 0 165 | :red-mask #x00 166 | :green-shift 0 167 | :green-mask #x00 168 | :blue-shift 0 169 | :blue-mask #x00 170 | :alpha-shift 0 171 | :alpha-mask #x01) 172 | :colormap 0) 173 | (logior xcb:renderutil:PICT_FORMAT:TYPE 174 | xcb:renderutil:PICT_FORMAT:DEPTH 175 | xcb:renderutil:PICT_FORMAT:RED_MASK 176 | xcb:renderutil:PICT_FORMAT:GREEN_MASK 177 | xcb:renderutil:PICT_FORMAT:BLUE_MASK 178 | xcb:renderutil:PICT_FORMAT:ALPHA 179 | xcb:renderutil:PICT_FORMAT:ALPHA_MASK))) 180 | "Standard PictFormats.") 181 | 182 | (cl-defmethod xcb:renderutil:-get-cache ((obj xcb:connection)) 183 | "Return the cache and initialize the extension when first called." 184 | (let ((result (plist-get (slot-value obj 'extra-plist) 'renderutil)) 185 | required-depths) 186 | (unless (or result 187 | (= 0 (slot-value 188 | (xcb:get-extension-data obj 'xcb:render) 189 | 'present))) 190 | (setq result 191 | (vector (xcb:+request-unchecked+reply obj 192 | (make-instance 'xcb:render:QueryVersion 193 | :client-major-version 194 | xcb:renderutil:-MAJOR_VERSION 195 | :client-minor-version 196 | xcb:renderutil:-MINOR_VERSION)) 197 | (xcb:+request-unchecked+reply obj 198 | (make-instance 'xcb:render:QueryPictFormats)))) 199 | (setq required-depths '(1 4 8 24 32)) 200 | (catch 'break 201 | (dolist (s (slot-value (aref result 1) 'screens)) 202 | (dolist (d (slot-value s 'depths)) 203 | (setq required-depths 204 | (delq (slot-value d 'depth) required-depths)) 205 | (unless required-depths 206 | (throw 'break nil))))) 207 | (if required-depths 208 | (setq result nil) 209 | (setf (slot-value obj 'extra-plist) 210 | (plist-put (slot-value obj 'extra-plist) 'renderutil result)))) 211 | result)) 212 | 213 | (defun xcb:renderutil:find-visual-format (formats visual) 214 | "Search FORMATS for a format matching visual VISUAL." 215 | (catch 'return 216 | (dolist (s (slot-value formats 'screens)) 217 | (dolist (d (slot-value s 'depths)) 218 | (dolist (v (slot-value d 'visuals)) 219 | (when (= (slot-value v 'visual) visual) 220 | (throw 'return (slot-value v 'format)))))))) 221 | 222 | (defun xcb:renderutil:find-format (formats mask template count) 223 | "Search FORMATS for a format matching mask MASK and template TEMPLATE. 224 | 225 | Return COUNT-th match." 226 | (catch 'return 227 | (unless formats 228 | (throw 'return nil)) 229 | (dolist (f (slot-value formats 'formats)) 230 | (when (and (if (/= 0 (logand mask xcb:renderutil:PICT_FORMAT:ID)) 231 | (eq (slot-value template 'id) (slot-value f 'id)) 232 | t) 233 | (if (/= 0 (logand mask xcb:renderutil:PICT_FORMAT:TYPE)) 234 | (eq (slot-value template 'type) (slot-value f 'type)) 235 | t) 236 | (if (/= 0 (logand mask xcb:renderutil:PICT_FORMAT:DEPTH)) 237 | (eq (slot-value template 'depth) (slot-value f 'depth)) 238 | t) 239 | (if (/= 0 (logand mask xcb:renderutil:PICT_FORMAT:RED)) 240 | (eq (slot-value (slot-value template 'direct) 'red-shift) 241 | (slot-value (slot-value f 'direct) 'red-shift)) 242 | t) 243 | (if (/= 0 (logand mask xcb:renderutil:PICT_FORMAT:RED_MASK)) 244 | (eq (slot-value (slot-value template 'direct) 'red-mask) 245 | (slot-value (slot-value f 'direct) 'red-mask)) 246 | t) 247 | (if (/= 0 (logand mask xcb:renderutil:PICT_FORMAT:GREEN)) 248 | (eq (slot-value (slot-value template 'direct) 'red-shift) 249 | (slot-value (slot-value f 'direct) 'red-shift)) 250 | t) 251 | (if (/= 0 (logand mask xcb:renderutil:PICT_FORMAT:GREEN_MASK)) 252 | (eq (slot-value (slot-value template 'direct) 'red-mask) 253 | (slot-value (slot-value f 'direct) 'red-mask)) 254 | t) 255 | (if (/= 0 (logand mask xcb:renderutil:PICT_FORMAT:BLUE)) 256 | (eq (slot-value (slot-value template 'direct) 'red-shift) 257 | (slot-value (slot-value f 'direct) 'red-shift)) 258 | t) 259 | (if (/= 0 (logand mask xcb:renderutil:PICT_FORMAT:BLUE_MASK)) 260 | (eq (slot-value (slot-value template 'direct) 'red-mask) 261 | (slot-value (slot-value f 'direct) 'red-mask)) 262 | t) 263 | (if (/= 0 (logand mask xcb:renderutil:PICT_FORMAT:COLORMAP)) 264 | (eq (slot-value template 'colormap) 265 | (slot-value f 'colormap)) 266 | t)) 267 | (when (= count 0) 268 | (throw 'return (slot-value f 'id)) 269 | (cl-decf count)))))) 270 | 271 | (defun xcb:renderutil:find-standard (formats format) 272 | "Search FORMATS for a standard format matching format ID FORMAT." 273 | (when (and (<= 0 format (1- (length xcb:renderutil:STANDARD-TEMPLATES)))) 274 | (let ((standard-format (elt xcb:renderutil:STANDARD-TEMPLATES format))) 275 | (xcb:renderutil:find-format formats 276 | (aref standard-format 1) 277 | (aref standard-format 0) 278 | 0)))) 279 | 280 | (cl-defmethod xcb:renderutil:query-version ((obj xcb:connection)) 281 | "Return the version of Render extension." 282 | (let ((cache (xcb:renderutil:-get-cache obj))) 283 | (when cache 284 | (aref cache 0)))) 285 | 286 | (cl-defmethod xcb:renderutil:query-formats ((obj xcb:connection)) 287 | "Return supported formats of this X server." 288 | (let ((cache (xcb:renderutil:-get-cache obj))) 289 | (when cache 290 | (aref cache 1)))) 291 | 292 | 293 | 294 | (provide 'xcb-renderutil) 295 | 296 | ;;; xcb-renderutil.el ends here 297 | -------------------------------------------------------------------------------- /xcb-res.el: -------------------------------------------------------------------------------- 1 | ;;; xcb-res.el --- X11 Res extension -*- lexical-binding: t -*- 2 | 3 | ;; Copyright (C) 2015-2019 Free Software Foundation, Inc. 4 | 5 | ;; This file is part of GNU Emacs. 6 | 7 | ;; GNU Emacs is free software: you can redistribute it and/or modify 8 | ;; it under the terms of the GNU General Public License as published by 9 | ;; the Free Software Foundation, either version 3 of the License, or 10 | ;; (at your option) any later version. 11 | 12 | ;; GNU Emacs is distributed in the hope that it will be useful, 13 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | ;; GNU General Public License for more details. 16 | 17 | ;; You should have received a copy of the GNU General Public License 18 | ;; along with GNU Emacs. If not, see . 19 | 20 | ;;; Commentary: 21 | 22 | ;; This file was generated by 'el_client.el' from 'res.xml', 23 | ;; which you can retrieve from . 24 | 25 | ;;; Code: 26 | 27 | (require 'xcb-types) 28 | 29 | (defconst xcb:res:-extension-xname "X-Resource") 30 | (defconst xcb:res:-extension-name "Res") 31 | (defconst xcb:res:-major-version 1) 32 | (defconst xcb:res:-minor-version 2) 33 | 34 | (require 'xcb-xproto) 35 | 36 | (defclass xcb:res:Client 37 | (xcb:-struct) 38 | ((resource-base :initarg :resource-base :type xcb:CARD32) 39 | (resource-mask :initarg :resource-mask :type xcb:CARD32))) 40 | 41 | (defclass xcb:res:Type 42 | (xcb:-struct) 43 | ((resource-type :initarg :resource-type :type xcb:ATOM) 44 | (count :initarg :count :type xcb:CARD32))) 45 | 46 | (defconst xcb:res:ClientIdMask:ClientXID 1) 47 | (defconst xcb:res:ClientIdMask:LocalClientPID 2) 48 | 49 | (defclass xcb:res:ClientIdSpec 50 | (xcb:-struct) 51 | ((client :initarg :client :type xcb:CARD32) 52 | (mask :initarg :mask :type xcb:CARD32))) 53 | 54 | (defclass xcb:res:ClientIdValue 55 | (xcb:-struct) 56 | ((spec :initarg :spec :type xcb:res:ClientIdSpec) 57 | (length :initarg :length :type xcb:CARD32) 58 | (value~ :initform 59 | '(name value type xcb:CARD32 size 60 | (/ 61 | (xcb:-fieldref 'length) 62 | 4)) 63 | :type xcb:-list) 64 | (value :initarg :value :type xcb:-ignore))) 65 | 66 | (defclass xcb:res:ResourceIdSpec 67 | (xcb:-struct) 68 | ((resource :initarg :resource :type xcb:CARD32) 69 | (type :initarg :type :type xcb:CARD32))) 70 | 71 | (defclass xcb:res:ResourceSizeSpec 72 | (xcb:-struct) 73 | ((spec :initarg :spec :type xcb:res:ResourceIdSpec) 74 | (bytes :initarg :bytes :type xcb:CARD32) 75 | (ref-count :initarg :ref-count :type xcb:CARD32) 76 | (use-count :initarg :use-count :type xcb:CARD32))) 77 | 78 | (defclass xcb:res:ResourceSizeValue 79 | (xcb:-struct) 80 | ((size :initarg :size :type xcb:res:ResourceSizeSpec) 81 | (num-cross-references :initarg :num-cross-references :type xcb:CARD32) 82 | (cross-references~ :initform 83 | '(name cross-references type xcb:res:ResourceSizeSpec size 84 | (xcb:-fieldref 'num-cross-references)) 85 | :type xcb:-list) 86 | (cross-references :initarg :cross-references :type xcb:-ignore))) 87 | 88 | (defclass xcb:res:QueryVersion 89 | (xcb:-request) 90 | ((~opcode :initform 0 :type xcb:-u1) 91 | (client-major :initarg :client-major :type xcb:CARD8) 92 | (client-minor :initarg :client-minor :type xcb:CARD8))) 93 | (defclass xcb:res:QueryVersion~reply 94 | (xcb:-reply) 95 | ((pad~0 :initform 1 :type xcb:-pad) 96 | (~sequence :type xcb:CARD16) 97 | (length :type xcb:CARD32) 98 | (server-major :initarg :server-major :type xcb:CARD16) 99 | (server-minor :initarg :server-minor :type xcb:CARD16))) 100 | 101 | (defclass xcb:res:QueryClients 102 | (xcb:-request) 103 | ((~opcode :initform 1 :type xcb:-u1))) 104 | (defclass xcb:res:QueryClients~reply 105 | (xcb:-reply) 106 | ((pad~0 :initform 1 :type xcb:-pad) 107 | (~sequence :type xcb:CARD16) 108 | (length :type xcb:CARD32) 109 | (num-clients :initarg :num-clients :type xcb:CARD32) 110 | (pad~1 :initform 20 :type xcb:-pad) 111 | (clients~ :initform 112 | '(name clients type xcb:res:Client size 113 | (xcb:-fieldref 'num-clients)) 114 | :type xcb:-list) 115 | (clients :initarg :clients :type xcb:-ignore))) 116 | 117 | (defclass xcb:res:QueryClientResources 118 | (xcb:-request) 119 | ((~opcode :initform 2 :type xcb:-u1) 120 | (xid :initarg :xid :type xcb:CARD32))) 121 | (defclass xcb:res:QueryClientResources~reply 122 | (xcb:-reply) 123 | ((pad~0 :initform 1 :type xcb:-pad) 124 | (~sequence :type xcb:CARD16) 125 | (length :type xcb:CARD32) 126 | (num-types :initarg :num-types :type xcb:CARD32) 127 | (pad~1 :initform 20 :type xcb:-pad) 128 | (types~ :initform 129 | '(name types type xcb:res:Type size 130 | (xcb:-fieldref 'num-types)) 131 | :type xcb:-list) 132 | (types :initarg :types :type xcb:-ignore))) 133 | 134 | (defclass xcb:res:QueryClientPixmapBytes 135 | (xcb:-request) 136 | ((~opcode :initform 3 :type xcb:-u1) 137 | (xid :initarg :xid :type xcb:CARD32))) 138 | (defclass xcb:res:QueryClientPixmapBytes~reply 139 | (xcb:-reply) 140 | ((pad~0 :initform 1 :type xcb:-pad) 141 | (~sequence :type xcb:CARD16) 142 | (length :type xcb:CARD32) 143 | (bytes :initarg :bytes :type xcb:CARD32) 144 | (bytes-overflow :initarg :bytes-overflow :type xcb:CARD32))) 145 | 146 | (defclass xcb:res:QueryClientIds 147 | (xcb:-request) 148 | ((~opcode :initform 4 :type xcb:-u1) 149 | (num-specs :initarg :num-specs :type xcb:CARD32) 150 | (specs~ :initform 151 | '(name specs type xcb:res:ClientIdSpec size 152 | (xcb:-fieldref 'num-specs)) 153 | :type xcb:-list) 154 | (specs :initarg :specs :type xcb:-ignore))) 155 | (defclass xcb:res:QueryClientIds~reply 156 | (xcb:-reply) 157 | ((pad~0 :initform 1 :type xcb:-pad) 158 | (~sequence :type xcb:CARD16) 159 | (length :type xcb:CARD32) 160 | (num-ids :initarg :num-ids :type xcb:CARD32) 161 | (pad~1 :initform 20 :type xcb:-pad) 162 | (ids~ :initform 163 | '(name ids type xcb:res:ClientIdValue size 164 | (xcb:-fieldref 'num-ids)) 165 | :type xcb:-list) 166 | (ids :initarg :ids :type xcb:-ignore))) 167 | 168 | (defclass xcb:res:QueryResourceBytes 169 | (xcb:-request) 170 | ((~opcode :initform 5 :type xcb:-u1) 171 | (client :initarg :client :type xcb:CARD32) 172 | (num-specs :initarg :num-specs :type xcb:CARD32) 173 | (specs~ :initform 174 | '(name specs type xcb:res:ResourceIdSpec size 175 | (xcb:-fieldref 'num-specs)) 176 | :type xcb:-list) 177 | (specs :initarg :specs :type xcb:-ignore))) 178 | (defclass xcb:res:QueryResourceBytes~reply 179 | (xcb:-reply) 180 | ((pad~0 :initform 1 :type xcb:-pad) 181 | (~sequence :type xcb:CARD16) 182 | (length :type xcb:CARD32) 183 | (num-sizes :initarg :num-sizes :type xcb:CARD32) 184 | (pad~1 :initform 20 :type xcb:-pad) 185 | (sizes~ :initform 186 | '(name sizes type xcb:res:ResourceSizeValue size 187 | (xcb:-fieldref 'num-sizes)) 188 | :type xcb:-list) 189 | (sizes :initarg :sizes :type xcb:-ignore))) 190 | 191 | 192 | 193 | (provide 'xcb-res) 194 | 195 | ;;; xcb-res.el ends here 196 | -------------------------------------------------------------------------------- /xcb-screensaver.el: -------------------------------------------------------------------------------- 1 | ;;; xcb-screensaver.el --- X11 ScreenSaver extension -*- lexical-binding: t -*- 2 | 3 | ;; Copyright (C) 2015-2019 Free Software Foundation, Inc. 4 | 5 | ;; This file is part of GNU Emacs. 6 | 7 | ;; GNU Emacs is free software: you can redistribute it and/or modify 8 | ;; it under the terms of the GNU General Public License as published by 9 | ;; the Free Software Foundation, either version 3 of the License, or 10 | ;; (at your option) any later version. 11 | 12 | ;; GNU Emacs is distributed in the hope that it will be useful, 13 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | ;; GNU General Public License for more details. 16 | 17 | ;; You should have received a copy of the GNU General Public License 18 | ;; along with GNU Emacs. If not, see . 19 | 20 | ;;; Commentary: 21 | 22 | ;; This file was generated by 'el_client.el' from 'screensaver.xml', 23 | ;; which you can retrieve from . 24 | 25 | ;;; Code: 26 | 27 | (require 'xcb-types) 28 | 29 | (defconst xcb:screensaver:-extension-xname "MIT-SCREEN-SAVER") 30 | (defconst xcb:screensaver:-extension-name "ScreenSaver") 31 | (defconst xcb:screensaver:-major-version 1) 32 | (defconst xcb:screensaver:-minor-version 1) 33 | 34 | (require 'xcb-xproto) 35 | 36 | (defconst xcb:screensaver:Kind:Blanked 0) 37 | (defconst xcb:screensaver:Kind:Internal 1) 38 | (defconst xcb:screensaver:Kind:External 2) 39 | 40 | (defconst xcb:screensaver:Event:NotifyMask 1) 41 | (defconst xcb:screensaver:Event:CycleMask 2) 42 | 43 | (defconst xcb:screensaver:State:Off 0) 44 | (defconst xcb:screensaver:State:On 1) 45 | (defconst xcb:screensaver:State:Cycle 2) 46 | (defconst xcb:screensaver:State:Disabled 3) 47 | 48 | (defclass xcb:screensaver:QueryVersion 49 | (xcb:-request) 50 | ((~opcode :initform 0 :type xcb:-u1) 51 | (client-major-version :initarg :client-major-version :type xcb:CARD8) 52 | (client-minor-version :initarg :client-minor-version :type xcb:CARD8) 53 | (pad~0 :initform 2 :type xcb:-pad))) 54 | (defclass xcb:screensaver:QueryVersion~reply 55 | (xcb:-reply) 56 | ((pad~0 :initform 1 :type xcb:-pad) 57 | (~sequence :type xcb:CARD16) 58 | (length :type xcb:CARD32) 59 | (server-major-version :initarg :server-major-version :type xcb:CARD16) 60 | (server-minor-version :initarg :server-minor-version :type xcb:CARD16) 61 | (pad~1 :initform 20 :type xcb:-pad))) 62 | 63 | (defclass xcb:screensaver:QueryInfo 64 | (xcb:-request) 65 | ((~opcode :initform 1 :type xcb:-u1) 66 | (drawable :initarg :drawable :type xcb:DRAWABLE))) 67 | (defclass xcb:screensaver:QueryInfo~reply 68 | (xcb:-reply) 69 | ((state :initarg :state :type xcb:CARD8) 70 | (~sequence :type xcb:CARD16) 71 | (length :type xcb:CARD32) 72 | (saver-window :initarg :saver-window :type xcb:WINDOW) 73 | (ms-until-server :initarg :ms-until-server :type xcb:CARD32) 74 | (ms-since-user-input :initarg :ms-since-user-input :type xcb:CARD32) 75 | (event-mask :initarg :event-mask :type xcb:CARD32) 76 | (kind :initarg :kind :type xcb:BYTE) 77 | (pad~0 :initform 7 :type xcb:-pad))) 78 | 79 | (defclass xcb:screensaver:SelectInput 80 | (xcb:-request) 81 | ((~opcode :initform 2 :type xcb:-u1) 82 | (drawable :initarg :drawable :type xcb:DRAWABLE) 83 | (event-mask :initarg :event-mask :type xcb:CARD32))) 84 | 85 | (defclass xcb:screensaver:SetAttributes 86 | (xcb:-request) 87 | ((~opcode :initform 3 :type xcb:-u1) 88 | (drawable :initarg :drawable :type xcb:DRAWABLE) 89 | (x :initarg :x :type xcb:INT16) 90 | (y :initarg :y :type xcb:INT16) 91 | (width :initarg :width :type xcb:CARD16) 92 | (height :initarg :height :type xcb:CARD16) 93 | (border-width :initarg :border-width :type xcb:CARD16) 94 | (class :initarg :class :type xcb:BYTE) 95 | (depth :initarg :depth :type xcb:CARD8) 96 | (visual :initarg :visual :type xcb:VISUALID) 97 | (value-mask :initarg :value-mask :type xcb:CARD32) 98 | (value-list :initform 99 | '(expression 100 | (xcb:-fieldref 'value-mask) 101 | cases 102 | ((1 background-pixmap) 103 | (2 background-pixel) 104 | (4 border-pixmap) 105 | (8 border-pixel) 106 | (16 bit-gravity) 107 | (32 win-gravity) 108 | (64 backing-store) 109 | (128 backing-planes) 110 | (256 backing-pixel) 111 | (512 override-redirect) 112 | (1024 save-under) 113 | (2048 event-mask) 114 | (4096 do-not-propogate-mask) 115 | (8192 colormap) 116 | (16384 cursor))) 117 | :type xcb:-switch) 118 | (background-pixmap :initarg :background-pixmap :type xcb:PIXMAP) 119 | (background-pixel :initarg :background-pixel :type xcb:CARD32) 120 | (border-pixmap :initarg :border-pixmap :type xcb:PIXMAP) 121 | (border-pixel :initarg :border-pixel :type xcb:CARD32) 122 | (bit-gravity :initarg :bit-gravity :type xcb:CARD32) 123 | (win-gravity :initarg :win-gravity :type xcb:CARD32) 124 | (backing-store :initarg :backing-store :type xcb:CARD32) 125 | (backing-planes :initarg :backing-planes :type xcb:CARD32) 126 | (backing-pixel :initarg :backing-pixel :type xcb:CARD32) 127 | (override-redirect :initarg :override-redirect :type xcb:BOOL32) 128 | (save-under :initarg :save-under :type xcb:BOOL32) 129 | (event-mask :initarg :event-mask :type xcb:CARD32) 130 | (do-not-propogate-mask :initarg :do-not-propogate-mask :type xcb:CARD32) 131 | (colormap :initarg :colormap :type xcb:COLORMAP) 132 | (cursor :initarg :cursor :type xcb:CURSOR))) 133 | 134 | (defclass xcb:screensaver:UnsetAttributes 135 | (xcb:-request) 136 | ((~opcode :initform 4 :type xcb:-u1) 137 | (drawable :initarg :drawable :type xcb:DRAWABLE))) 138 | 139 | (defclass xcb:screensaver:Suspend 140 | (xcb:-request) 141 | ((~opcode :initform 5 :type xcb:-u1) 142 | (suspend :initarg :suspend :type xcb:CARD32))) 143 | 144 | (defclass xcb:screensaver:Notify 145 | (xcb:-event) 146 | ((~code :initform 0) 147 | (state :initarg :state :type xcb:BYTE) 148 | (~sequence :type xcb:CARD16) 149 | (time :initarg :time :type xcb:TIMESTAMP) 150 | (root :initarg :root :type xcb:WINDOW) 151 | (window :initarg :window :type xcb:WINDOW) 152 | (kind :initarg :kind :type xcb:BYTE) 153 | (forced :initarg :forced :type xcb:BOOL) 154 | (pad~0 :initform 14 :type xcb:-pad))) 155 | 156 | (defconst xcb:screensaver:event-number-class-alist 157 | '((0 . xcb:screensaver:Notify)) 158 | "(event-number . event-class) alist.") 159 | 160 | 161 | 162 | (provide 'xcb-screensaver) 163 | 164 | ;;; xcb-screensaver.el ends here 165 | -------------------------------------------------------------------------------- /xcb-shape.el: -------------------------------------------------------------------------------- 1 | ;;; xcb-shape.el --- X11 Shape extension -*- lexical-binding: t -*- 2 | 3 | ;; Copyright (C) 2015-2019 Free Software Foundation, Inc. 4 | 5 | ;; This file is part of GNU Emacs. 6 | 7 | ;; GNU Emacs is free software: you can redistribute it and/or modify 8 | ;; it under the terms of the GNU General Public License as published by 9 | ;; the Free Software Foundation, either version 3 of the License, or 10 | ;; (at your option) any later version. 11 | 12 | ;; GNU Emacs is distributed in the hope that it will be useful, 13 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | ;; GNU General Public License for more details. 16 | 17 | ;; You should have received a copy of the GNU General Public License 18 | ;; along with GNU Emacs. If not, see . 19 | 20 | ;;; Commentary: 21 | 22 | ;; This file was generated by 'el_client.el' from 'shape.xml', 23 | ;; which you can retrieve from . 24 | 25 | ;;; Code: 26 | 27 | (require 'xcb-types) 28 | 29 | (defconst xcb:shape:-extension-xname "SHAPE") 30 | (defconst xcb:shape:-extension-name "Shape") 31 | (defconst xcb:shape:-major-version 1) 32 | (defconst xcb:shape:-minor-version 1) 33 | 34 | (require 'xcb-xproto) 35 | 36 | (xcb:deftypealias 'xcb:shape:OP 'xcb:CARD8) 37 | 38 | (xcb:deftypealias 'xcb:shape:KIND 'xcb:CARD8) 39 | 40 | (defconst xcb:shape:SO:Set 0) 41 | (defconst xcb:shape:SO:Union 1) 42 | (defconst xcb:shape:SO:Intersect 2) 43 | (defconst xcb:shape:SO:Subtract 3) 44 | (defconst xcb:shape:SO:Invert 4) 45 | 46 | (defconst xcb:shape:SK:Bounding 0) 47 | (defconst xcb:shape:SK:Clip 1) 48 | (defconst xcb:shape:SK:Input 2) 49 | 50 | (defclass xcb:shape:Notify 51 | (xcb:-event) 52 | ((~code :initform 0) 53 | (shape-kind :initarg :shape-kind :type xcb:shape:KIND) 54 | (~sequence :type xcb:CARD16) 55 | (affected-window :initarg :affected-window :type xcb:WINDOW) 56 | (extents-x :initarg :extents-x :type xcb:INT16) 57 | (extents-y :initarg :extents-y :type xcb:INT16) 58 | (extents-width :initarg :extents-width :type xcb:CARD16) 59 | (extents-height :initarg :extents-height :type xcb:CARD16) 60 | (server-time :initarg :server-time :type xcb:TIMESTAMP) 61 | (shaped :initarg :shaped :type xcb:BOOL) 62 | (pad~0 :initform 11 :type xcb:-pad))) 63 | 64 | (defclass xcb:shape:QueryVersion 65 | (xcb:-request) 66 | ((~opcode :initform 0 :type xcb:-u1))) 67 | (defclass xcb:shape:QueryVersion~reply 68 | (xcb:-reply) 69 | ((pad~0 :initform 1 :type xcb:-pad) 70 | (~sequence :type xcb:CARD16) 71 | (length :type xcb:CARD32) 72 | (major-version :initarg :major-version :type xcb:CARD16) 73 | (minor-version :initarg :minor-version :type xcb:CARD16))) 74 | 75 | (defclass xcb:shape:Rectangles 76 | (xcb:-request) 77 | ((~opcode :initform 1 :type xcb:-u1) 78 | (operation :initarg :operation :type xcb:shape:OP) 79 | (destination-kind :initarg :destination-kind :type xcb:shape:KIND) 80 | (ordering :initarg :ordering :type xcb:BYTE) 81 | (pad~0 :initform 1 :type xcb:-pad) 82 | (destination-window :initarg :destination-window :type xcb:WINDOW) 83 | (x-offset :initarg :x-offset :type xcb:INT16) 84 | (y-offset :initarg :y-offset :type xcb:INT16) 85 | (rectangles~ :initform 86 | '(name rectangles type xcb:RECTANGLE size nil) 87 | :type xcb:-list) 88 | (rectangles :initarg :rectangles :type xcb:-ignore))) 89 | 90 | (defclass xcb:shape:Mask 91 | (xcb:-request) 92 | ((~opcode :initform 2 :type xcb:-u1) 93 | (operation :initarg :operation :type xcb:shape:OP) 94 | (destination-kind :initarg :destination-kind :type xcb:shape:KIND) 95 | (pad~0 :initform 2 :type xcb:-pad) 96 | (destination-window :initarg :destination-window :type xcb:WINDOW) 97 | (x-offset :initarg :x-offset :type xcb:INT16) 98 | (y-offset :initarg :y-offset :type xcb:INT16) 99 | (source-bitmap :initarg :source-bitmap :type xcb:PIXMAP))) 100 | 101 | (defclass xcb:shape:Combine 102 | (xcb:-request) 103 | ((~opcode :initform 3 :type xcb:-u1) 104 | (operation :initarg :operation :type xcb:shape:OP) 105 | (destination-kind :initarg :destination-kind :type xcb:shape:KIND) 106 | (source-kind :initarg :source-kind :type xcb:shape:KIND) 107 | (pad~0 :initform 1 :type xcb:-pad) 108 | (destination-window :initarg :destination-window :type xcb:WINDOW) 109 | (x-offset :initarg :x-offset :type xcb:INT16) 110 | (y-offset :initarg :y-offset :type xcb:INT16) 111 | (source-window :initarg :source-window :type xcb:WINDOW))) 112 | 113 | (defclass xcb:shape:Offset 114 | (xcb:-request) 115 | ((~opcode :initform 4 :type xcb:-u1) 116 | (destination-kind :initarg :destination-kind :type xcb:shape:KIND) 117 | (pad~0 :initform 3 :type xcb:-pad) 118 | (destination-window :initarg :destination-window :type xcb:WINDOW) 119 | (x-offset :initarg :x-offset :type xcb:INT16) 120 | (y-offset :initarg :y-offset :type xcb:INT16))) 121 | 122 | (defclass xcb:shape:QueryExtents 123 | (xcb:-request) 124 | ((~opcode :initform 5 :type xcb:-u1) 125 | (destination-window :initarg :destination-window :type xcb:WINDOW))) 126 | (defclass xcb:shape:QueryExtents~reply 127 | (xcb:-reply) 128 | ((pad~0 :initform 1 :type xcb:-pad) 129 | (~sequence :type xcb:CARD16) 130 | (length :type xcb:CARD32) 131 | (bounding-shaped :initarg :bounding-shaped :type xcb:BOOL) 132 | (clip-shaped :initarg :clip-shaped :type xcb:BOOL) 133 | (pad~1 :initform 2 :type xcb:-pad) 134 | (bounding-shape-extents-x :initarg :bounding-shape-extents-x :type xcb:INT16) 135 | (bounding-shape-extents-y :initarg :bounding-shape-extents-y :type xcb:INT16) 136 | (bounding-shape-extents-width :initarg :bounding-shape-extents-width :type xcb:CARD16) 137 | (bounding-shape-extents-height :initarg :bounding-shape-extents-height :type xcb:CARD16) 138 | (clip-shape-extents-x :initarg :clip-shape-extents-x :type xcb:INT16) 139 | (clip-shape-extents-y :initarg :clip-shape-extents-y :type xcb:INT16) 140 | (clip-shape-extents-width :initarg :clip-shape-extents-width :type xcb:CARD16) 141 | (clip-shape-extents-height :initarg :clip-shape-extents-height :type xcb:CARD16))) 142 | 143 | (defclass xcb:shape:SelectInput 144 | (xcb:-request) 145 | ((~opcode :initform 6 :type xcb:-u1) 146 | (destination-window :initarg :destination-window :type xcb:WINDOW) 147 | (enable :initarg :enable :type xcb:BOOL) 148 | (pad~0 :initform 3 :type xcb:-pad))) 149 | 150 | (defclass xcb:shape:InputSelected 151 | (xcb:-request) 152 | ((~opcode :initform 7 :type xcb:-u1) 153 | (destination-window :initarg :destination-window :type xcb:WINDOW))) 154 | (defclass xcb:shape:InputSelected~reply 155 | (xcb:-reply) 156 | ((enabled :initarg :enabled :type xcb:BOOL) 157 | (~sequence :type xcb:CARD16) 158 | (length :type xcb:CARD32))) 159 | 160 | (defclass xcb:shape:GetRectangles 161 | (xcb:-request) 162 | ((~opcode :initform 8 :type xcb:-u1) 163 | (window :initarg :window :type xcb:WINDOW) 164 | (source-kind :initarg :source-kind :type xcb:shape:KIND) 165 | (pad~0 :initform 3 :type xcb:-pad))) 166 | (defclass xcb:shape:GetRectangles~reply 167 | (xcb:-reply) 168 | ((ordering :initarg :ordering :type xcb:BYTE) 169 | (~sequence :type xcb:CARD16) 170 | (length :type xcb:CARD32) 171 | (rectangles-len :initarg :rectangles-len :type xcb:CARD32) 172 | (pad~0 :initform 20 :type xcb:-pad) 173 | (rectangles~ :initform 174 | '(name rectangles type xcb:RECTANGLE size 175 | (xcb:-fieldref 'rectangles-len)) 176 | :type xcb:-list) 177 | (rectangles :initarg :rectangles :type xcb:-ignore))) 178 | 179 | (defconst xcb:shape:event-number-class-alist 180 | '((0 . xcb:shape:Notify)) 181 | "(event-number . event-class) alist.") 182 | 183 | 184 | 185 | (provide 'xcb-shape) 186 | 187 | ;;; xcb-shape.el ends here 188 | -------------------------------------------------------------------------------- /xcb-shm.el: -------------------------------------------------------------------------------- 1 | ;;; xcb-shm.el --- X11 Shm extension -*- lexical-binding: t -*- 2 | 3 | ;; Copyright (C) 2015-2019 Free Software Foundation, Inc. 4 | 5 | ;; This file is part of GNU Emacs. 6 | 7 | ;; GNU Emacs is free software: you can redistribute it and/or modify 8 | ;; it under the terms of the GNU General Public License as published by 9 | ;; the Free Software Foundation, either version 3 of the License, or 10 | ;; (at your option) any later version. 11 | 12 | ;; GNU Emacs is distributed in the hope that it will be useful, 13 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | ;; GNU General Public License for more details. 16 | 17 | ;; You should have received a copy of the GNU General Public License 18 | ;; along with GNU Emacs. If not, see . 19 | 20 | ;;; Commentary: 21 | 22 | ;; This file was generated by 'el_client.el' from 'shm.xml', 23 | ;; which you can retrieve from . 24 | 25 | ;;; Code: 26 | 27 | (require 'xcb-types) 28 | 29 | (defconst xcb:shm:-extension-xname "MIT-SHM") 30 | (defconst xcb:shm:-extension-name "Shm") 31 | (defconst xcb:shm:-major-version 1) 32 | (defconst xcb:shm:-minor-version 2) 33 | 34 | (require 'xcb-xproto) 35 | 36 | (xcb:deftypealias 'xcb:shm:SEG 'xcb:-u4) 37 | 38 | (defclass xcb:shm:Completion 39 | (xcb:-event) 40 | ((~code :initform 0) 41 | (pad~0 :initform 1 :type xcb:-pad) 42 | (~sequence :type xcb:CARD16) 43 | (drawable :initarg :drawable :type xcb:DRAWABLE) 44 | (minor-event :initarg :minor-event :type xcb:CARD16) 45 | (major-event :initarg :major-event :type xcb:BYTE) 46 | (pad~1 :initform 1 :type xcb:-pad) 47 | (shmseg :initarg :shmseg :type xcb:shm:SEG) 48 | (offset :initarg :offset :type xcb:CARD32))) 49 | 50 | (defclass xcb:shm:BadSeg 51 | (xcb:-error xcb:Value) 52 | ((~code :initform 0))) 53 | 54 | (defclass xcb:shm:QueryVersion 55 | (xcb:-request) 56 | ((~opcode :initform 0 :type xcb:-u1))) 57 | (defclass xcb:shm:QueryVersion~reply 58 | (xcb:-reply) 59 | ((shared-pixmaps :initarg :shared-pixmaps :type xcb:BOOL) 60 | (~sequence :type xcb:CARD16) 61 | (length :type xcb:CARD32) 62 | (major-version :initarg :major-version :type xcb:CARD16) 63 | (minor-version :initarg :minor-version :type xcb:CARD16) 64 | (uid :initarg :uid :type xcb:CARD16) 65 | (gid :initarg :gid :type xcb:CARD16) 66 | (pixmap-format :initarg :pixmap-format :type xcb:CARD8) 67 | (pad~0 :initform 15 :type xcb:-pad))) 68 | 69 | (defclass xcb:shm:Attach 70 | (xcb:-request) 71 | ((~opcode :initform 1 :type xcb:-u1) 72 | (shmseg :initarg :shmseg :type xcb:shm:SEG) 73 | (shmid :initarg :shmid :type xcb:CARD32) 74 | (read-only :initarg :read-only :type xcb:BOOL) 75 | (pad~0 :initform 3 :type xcb:-pad))) 76 | 77 | (defclass xcb:shm:Detach 78 | (xcb:-request) 79 | ((~opcode :initform 2 :type xcb:-u1) 80 | (shmseg :initarg :shmseg :type xcb:shm:SEG))) 81 | 82 | (defclass xcb:shm:PutImage 83 | (xcb:-request) 84 | ((~opcode :initform 3 :type xcb:-u1) 85 | (drawable :initarg :drawable :type xcb:DRAWABLE) 86 | (gc :initarg :gc :type xcb:GCONTEXT) 87 | (total-width :initarg :total-width :type xcb:CARD16) 88 | (total-height :initarg :total-height :type xcb:CARD16) 89 | (src-x :initarg :src-x :type xcb:CARD16) 90 | (src-y :initarg :src-y :type xcb:CARD16) 91 | (src-width :initarg :src-width :type xcb:CARD16) 92 | (src-height :initarg :src-height :type xcb:CARD16) 93 | (dst-x :initarg :dst-x :type xcb:INT16) 94 | (dst-y :initarg :dst-y :type xcb:INT16) 95 | (depth :initarg :depth :type xcb:CARD8) 96 | (format :initarg :format :type xcb:CARD8) 97 | (send-event :initarg :send-event :type xcb:BOOL) 98 | (pad~0 :initform 1 :type xcb:-pad) 99 | (shmseg :initarg :shmseg :type xcb:shm:SEG) 100 | (offset :initarg :offset :type xcb:CARD32))) 101 | 102 | (defclass xcb:shm:GetImage 103 | (xcb:-request) 104 | ((~opcode :initform 4 :type xcb:-u1) 105 | (drawable :initarg :drawable :type xcb:DRAWABLE) 106 | (x :initarg :x :type xcb:INT16) 107 | (y :initarg :y :type xcb:INT16) 108 | (width :initarg :width :type xcb:CARD16) 109 | (height :initarg :height :type xcb:CARD16) 110 | (plane-mask :initarg :plane-mask :type xcb:CARD32) 111 | (format :initarg :format :type xcb:CARD8) 112 | (pad~0 :initform 3 :type xcb:-pad) 113 | (shmseg :initarg :shmseg :type xcb:shm:SEG) 114 | (offset :initarg :offset :type xcb:CARD32))) 115 | (defclass xcb:shm:GetImage~reply 116 | (xcb:-reply) 117 | ((depth :initarg :depth :type xcb:CARD8) 118 | (~sequence :type xcb:CARD16) 119 | (length :type xcb:CARD32) 120 | (visual :initarg :visual :type xcb:VISUALID) 121 | (size :initarg :size :type xcb:CARD32))) 122 | 123 | (defclass xcb:shm:CreatePixmap 124 | (xcb:-request) 125 | ((~opcode :initform 5 :type xcb:-u1) 126 | (pid :initarg :pid :type xcb:PIXMAP) 127 | (drawable :initarg :drawable :type xcb:DRAWABLE) 128 | (width :initarg :width :type xcb:CARD16) 129 | (height :initarg :height :type xcb:CARD16) 130 | (depth :initarg :depth :type xcb:CARD8) 131 | (pad~0 :initform 3 :type xcb:-pad) 132 | (shmseg :initarg :shmseg :type xcb:shm:SEG) 133 | (offset :initarg :offset :type xcb:CARD32))) 134 | 135 | (defclass xcb:shm:AttachFd 136 | (xcb:-request) 137 | ((~opcode :initform 6 :type xcb:-u1) 138 | (shmseg :initarg :shmseg :type xcb:shm:SEG) 139 | (shm-fd :type xcb:fd) 140 | (read-only :initarg :read-only :type xcb:BOOL) 141 | (pad~0 :initform 3 :type xcb:-pad))) 142 | 143 | (defclass xcb:shm:CreateSegment 144 | (xcb:-request) 145 | ((~opcode :initform 7 :type xcb:-u1) 146 | (shmseg :initarg :shmseg :type xcb:shm:SEG) 147 | (size :initarg :size :type xcb:CARD32) 148 | (read-only :initarg :read-only :type xcb:BOOL) 149 | (pad~0 :initform 3 :type xcb:-pad))) 150 | (defclass xcb:shm:CreateSegment~reply 151 | (xcb:-reply) 152 | ((nfd :initarg :nfd :type xcb:CARD8) 153 | (~sequence :type xcb:CARD16) 154 | (length :type xcb:CARD32) 155 | (shm-fd :type xcb:fd) 156 | (pad~0 :initform 24 :type xcb:-pad))) 157 | 158 | (defconst xcb:shm:error-number-class-alist 159 | '((0 . xcb:shm:BadSeg)) 160 | "(error-number . error-class) alist.") 161 | 162 | (defconst xcb:shm:event-number-class-alist 163 | '((0 . xcb:shm:Completion)) 164 | "(event-number . event-class) alist.") 165 | 166 | 167 | 168 | (provide 'xcb-shm) 169 | 170 | ;;; xcb-shm.el ends here 171 | -------------------------------------------------------------------------------- /xcb-sync.el: -------------------------------------------------------------------------------- 1 | ;;; xcb-sync.el --- X11 Sync extension -*- lexical-binding: t -*- 2 | 3 | ;; Copyright (C) 2015-2019 Free Software Foundation, Inc. 4 | 5 | ;; This file is part of GNU Emacs. 6 | 7 | ;; GNU Emacs is free software: you can redistribute it and/or modify 8 | ;; it under the terms of the GNU General Public License as published by 9 | ;; the Free Software Foundation, either version 3 of the License, or 10 | ;; (at your option) any later version. 11 | 12 | ;; GNU Emacs is distributed in the hope that it will be useful, 13 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | ;; GNU General Public License for more details. 16 | 17 | ;; You should have received a copy of the GNU General Public License 18 | ;; along with GNU Emacs. If not, see . 19 | 20 | ;;; Commentary: 21 | 22 | ;; This file was generated by 'el_client.el' from 'sync.xml', 23 | ;; which you can retrieve from . 24 | 25 | ;;; Code: 26 | 27 | (require 'xcb-types) 28 | 29 | (defconst xcb:sync:-extension-xname "SYNC") 30 | (defconst xcb:sync:-extension-name "Sync") 31 | (defconst xcb:sync:-major-version 3) 32 | (defconst xcb:sync:-minor-version 1) 33 | 34 | (require 'xcb-xproto) 35 | 36 | (xcb:deftypealias 'xcb:sync:ALARM 'xcb:-u4) 37 | 38 | (defconst xcb:sync:ALARMSTATE:Active 0) 39 | (defconst xcb:sync:ALARMSTATE:Inactive 1) 40 | (defconst xcb:sync:ALARMSTATE:Destroyed 2) 41 | 42 | (xcb:deftypealias 'xcb:sync:COUNTER 'xcb:-u4) 43 | 44 | (xcb:deftypealias 'xcb:sync:FENCE 'xcb:-u4) 45 | 46 | (defconst xcb:sync:TESTTYPE:PositiveTransition 0) 47 | (defconst xcb:sync:TESTTYPE:NegativeTransition 1) 48 | (defconst xcb:sync:TESTTYPE:PositiveComparison 2) 49 | (defconst xcb:sync:TESTTYPE:NegativeComparison 3) 50 | 51 | (defconst xcb:sync:VALUETYPE:Absolute 0) 52 | (defconst xcb:sync:VALUETYPE:Relative 1) 53 | 54 | (defconst xcb:sync:CA:Counter 1) 55 | (defconst xcb:sync:CA:ValueType 2) 56 | (defconst xcb:sync:CA:Value 4) 57 | (defconst xcb:sync:CA:TestType 8) 58 | (defconst xcb:sync:CA:Delta 16) 59 | (defconst xcb:sync:CA:Events 32) 60 | 61 | (defclass xcb:sync:INT64 62 | (xcb:-struct) 63 | ((hi :initarg :hi :type xcb:INT32) 64 | (lo :initarg :lo :type xcb:CARD32))) 65 | 66 | (defclass xcb:sync:SYSTEMCOUNTER 67 | (xcb:-struct) 68 | ((counter :initarg :counter :type xcb:sync:COUNTER) 69 | (resolution :initarg :resolution :type xcb:sync:INT64) 70 | (name-len :initarg :name-len :type xcb:CARD16) 71 | (name~ :initform 72 | '(name name type xcb:char size 73 | (xcb:-fieldref 'name-len)) 74 | :type xcb:-list) 75 | (name :initarg :name :type xcb:-ignore) 76 | (pad~0 :initform 4 :type xcb:-pad-align))) 77 | 78 | (defclass xcb:sync:TRIGGER 79 | (xcb:-struct) 80 | ((counter :initarg :counter :type xcb:sync:COUNTER) 81 | (wait-type :initarg :wait-type :type xcb:CARD32) 82 | (wait-value :initarg :wait-value :type xcb:sync:INT64) 83 | (test-type :initarg :test-type :type xcb:CARD32))) 84 | 85 | (defclass xcb:sync:WAITCONDITION 86 | (xcb:-struct) 87 | ((trigger :initarg :trigger :type xcb:sync:TRIGGER) 88 | (event-threshold :initarg :event-threshold :type xcb:sync:INT64))) 89 | 90 | (defclass xcb:sync:Counter 91 | (xcb:-error) 92 | ((~code :initform 0) 93 | (bad-counter :initarg :bad-counter :type xcb:CARD32) 94 | (minor-opcode :initarg :minor-opcode :type xcb:CARD16) 95 | (major-opcode :initarg :major-opcode :type xcb:CARD8))) 96 | 97 | (defclass xcb:sync:Alarm 98 | (xcb:-error) 99 | ((~code :initform 1) 100 | (bad-alarm :initarg :bad-alarm :type xcb:CARD32) 101 | (minor-opcode :initarg :minor-opcode :type xcb:CARD16) 102 | (major-opcode :initarg :major-opcode :type xcb:CARD8))) 103 | 104 | (defclass xcb:sync:Initialize 105 | (xcb:-request) 106 | ((~opcode :initform 0 :type xcb:-u1) 107 | (desired-major-version :initarg :desired-major-version :type xcb:CARD8) 108 | (desired-minor-version :initarg :desired-minor-version :type xcb:CARD8))) 109 | (defclass xcb:sync:Initialize~reply 110 | (xcb:-reply) 111 | ((pad~0 :initform 1 :type xcb:-pad) 112 | (~sequence :type xcb:CARD16) 113 | (length :type xcb:CARD32) 114 | (major-version :initarg :major-version :type xcb:CARD8) 115 | (minor-version :initarg :minor-version :type xcb:CARD8) 116 | (pad~1 :initform 22 :type xcb:-pad))) 117 | 118 | (defclass xcb:sync:ListSystemCounters 119 | (xcb:-request) 120 | ((~opcode :initform 1 :type xcb:-u1))) 121 | (defclass xcb:sync:ListSystemCounters~reply 122 | (xcb:-reply) 123 | ((pad~0 :initform 1 :type xcb:-pad) 124 | (~sequence :type xcb:CARD16) 125 | (length :type xcb:CARD32) 126 | (counters-len :initarg :counters-len :type xcb:CARD32) 127 | (pad~1 :initform 20 :type xcb:-pad) 128 | (counters~ :initform 129 | '(name counters type xcb:sync:SYSTEMCOUNTER size 130 | (xcb:-fieldref 'counters-len)) 131 | :type xcb:-list) 132 | (counters :initarg :counters :type xcb:-ignore))) 133 | 134 | (defclass xcb:sync:CreateCounter 135 | (xcb:-request) 136 | ((~opcode :initform 2 :type xcb:-u1) 137 | (id :initarg :id :type xcb:sync:COUNTER) 138 | (initial-value :initarg :initial-value :type xcb:sync:INT64))) 139 | 140 | (defclass xcb:sync:DestroyCounter 141 | (xcb:-request) 142 | ((~opcode :initform 6 :type xcb:-u1) 143 | (counter :initarg :counter :type xcb:sync:COUNTER))) 144 | 145 | (defclass xcb:sync:QueryCounter 146 | (xcb:-request) 147 | ((~opcode :initform 5 :type xcb:-u1) 148 | (counter :initarg :counter :type xcb:sync:COUNTER))) 149 | (defclass xcb:sync:QueryCounter~reply 150 | (xcb:-reply) 151 | ((pad~0 :initform 1 :type xcb:-pad) 152 | (~sequence :type xcb:CARD16) 153 | (length :type xcb:CARD32) 154 | (counter-value :initarg :counter-value :type xcb:sync:INT64))) 155 | 156 | (defclass xcb:sync:Await 157 | (xcb:-request) 158 | ((~opcode :initform 7 :type xcb:-u1) 159 | (wait-list~ :initform 160 | '(name wait-list type xcb:sync:WAITCONDITION size nil) 161 | :type xcb:-list) 162 | (wait-list :initarg :wait-list :type xcb:-ignore))) 163 | 164 | (defclass xcb:sync:ChangeCounter 165 | (xcb:-request) 166 | ((~opcode :initform 4 :type xcb:-u1) 167 | (counter :initarg :counter :type xcb:sync:COUNTER) 168 | (amount :initarg :amount :type xcb:sync:INT64))) 169 | 170 | (defclass xcb:sync:SetCounter 171 | (xcb:-request) 172 | ((~opcode :initform 3 :type xcb:-u1) 173 | (counter :initarg :counter :type xcb:sync:COUNTER) 174 | (value :initarg :value :type xcb:sync:INT64))) 175 | 176 | (defclass xcb:sync:CreateAlarm 177 | (xcb:-request) 178 | ((~opcode :initform 8 :type xcb:-u1) 179 | (id :initarg :id :type xcb:sync:ALARM) 180 | (value-mask :initarg :value-mask :type xcb:CARD32) 181 | (value-list :initform 182 | '(expression 183 | (xcb:-fieldref 'value-mask) 184 | cases 185 | ((1 counter) 186 | (2 valueType) 187 | (4 value) 188 | (8 testType) 189 | (16 delta) 190 | (32 events))) 191 | :type xcb:-switch) 192 | (counter :initarg :counter :type xcb:sync:COUNTER) 193 | (valueType :initarg :valueType :type xcb:CARD32) 194 | (value :initarg :value :type xcb:sync:INT64) 195 | (testType :initarg :testType :type xcb:CARD32) 196 | (delta :initarg :delta :type xcb:sync:INT64) 197 | (events :initarg :events :type xcb:CARD32))) 198 | 199 | (defclass xcb:sync:ChangeAlarm 200 | (xcb:-request) 201 | ((~opcode :initform 9 :type xcb:-u1) 202 | (id :initarg :id :type xcb:sync:ALARM) 203 | (value-mask :initarg :value-mask :type xcb:CARD32) 204 | (value-list :initform 205 | '(expression 206 | (xcb:-fieldref 'value-mask) 207 | cases 208 | ((1 counter) 209 | (2 valueType) 210 | (4 value) 211 | (8 testType) 212 | (16 delta) 213 | (32 events))) 214 | :type xcb:-switch) 215 | (counter :initarg :counter :type xcb:sync:COUNTER) 216 | (valueType :initarg :valueType :type xcb:CARD32) 217 | (value :initarg :value :type xcb:sync:INT64) 218 | (testType :initarg :testType :type xcb:CARD32) 219 | (delta :initarg :delta :type xcb:sync:INT64) 220 | (events :initarg :events :type xcb:CARD32))) 221 | 222 | (defclass xcb:sync:DestroyAlarm 223 | (xcb:-request) 224 | ((~opcode :initform 11 :type xcb:-u1) 225 | (alarm :initarg :alarm :type xcb:sync:ALARM))) 226 | 227 | (defclass xcb:sync:QueryAlarm 228 | (xcb:-request) 229 | ((~opcode :initform 10 :type xcb:-u1) 230 | (alarm :initarg :alarm :type xcb:sync:ALARM))) 231 | (defclass xcb:sync:QueryAlarm~reply 232 | (xcb:-reply) 233 | ((pad~0 :initform 1 :type xcb:-pad) 234 | (~sequence :type xcb:CARD16) 235 | (length :type xcb:CARD32) 236 | (trigger :initarg :trigger :type xcb:sync:TRIGGER) 237 | (delta :initarg :delta :type xcb:sync:INT64) 238 | (events :initarg :events :type xcb:BOOL) 239 | (state :initarg :state :type xcb:CARD8) 240 | (pad~1 :initform 2 :type xcb:-pad))) 241 | 242 | (defclass xcb:sync:SetPriority 243 | (xcb:-request) 244 | ((~opcode :initform 12 :type xcb:-u1) 245 | (id :initarg :id :type xcb:CARD32) 246 | (priority :initarg :priority :type xcb:INT32))) 247 | 248 | (defclass xcb:sync:GetPriority 249 | (xcb:-request) 250 | ((~opcode :initform 13 :type xcb:-u1) 251 | (id :initarg :id :type xcb:CARD32))) 252 | (defclass xcb:sync:GetPriority~reply 253 | (xcb:-reply) 254 | ((pad~0 :initform 1 :type xcb:-pad) 255 | (~sequence :type xcb:CARD16) 256 | (length :type xcb:CARD32) 257 | (priority :initarg :priority :type xcb:INT32))) 258 | 259 | (defclass xcb:sync:CreateFence 260 | (xcb:-request) 261 | ((~opcode :initform 14 :type xcb:-u1) 262 | (drawable :initarg :drawable :type xcb:DRAWABLE) 263 | (fence :initarg :fence :type xcb:sync:FENCE) 264 | (initially-triggered :initarg :initially-triggered :type xcb:BOOL))) 265 | 266 | (defclass xcb:sync:TriggerFence 267 | (xcb:-request) 268 | ((~opcode :initform 15 :type xcb:-u1) 269 | (fence :initarg :fence :type xcb:sync:FENCE))) 270 | 271 | (defclass xcb:sync:ResetFence 272 | (xcb:-request) 273 | ((~opcode :initform 16 :type xcb:-u1) 274 | (fence :initarg :fence :type xcb:sync:FENCE))) 275 | 276 | (defclass xcb:sync:DestroyFence 277 | (xcb:-request) 278 | ((~opcode :initform 17 :type xcb:-u1) 279 | (fence :initarg :fence :type xcb:sync:FENCE))) 280 | 281 | (defclass xcb:sync:QueryFence 282 | (xcb:-request) 283 | ((~opcode :initform 18 :type xcb:-u1) 284 | (fence :initarg :fence :type xcb:sync:FENCE))) 285 | (defclass xcb:sync:QueryFence~reply 286 | (xcb:-reply) 287 | ((pad~0 :initform 1 :type xcb:-pad) 288 | (~sequence :type xcb:CARD16) 289 | (length :type xcb:CARD32) 290 | (triggered :initarg :triggered :type xcb:BOOL) 291 | (pad~1 :initform 23 :type xcb:-pad))) 292 | 293 | (defclass xcb:sync:AwaitFence 294 | (xcb:-request) 295 | ((~opcode :initform 19 :type xcb:-u1) 296 | (fence-list~ :initform 297 | '(name fence-list type xcb:sync:FENCE size nil) 298 | :type xcb:-list) 299 | (fence-list :initarg :fence-list :type xcb:-ignore))) 300 | 301 | (defclass xcb:sync:CounterNotify 302 | (xcb:-event) 303 | ((~code :initform 0) 304 | (kind :initarg :kind :type xcb:CARD8) 305 | (~sequence :type xcb:CARD16) 306 | (counter :initarg :counter :type xcb:sync:COUNTER) 307 | (wait-value :initarg :wait-value :type xcb:sync:INT64) 308 | (counter-value :initarg :counter-value :type xcb:sync:INT64) 309 | (timestamp :initarg :timestamp :type xcb:TIMESTAMP) 310 | (count :initarg :count :type xcb:CARD16) 311 | (destroyed :initarg :destroyed :type xcb:BOOL) 312 | (pad~0 :initform 1 :type xcb:-pad))) 313 | 314 | (defclass xcb:sync:AlarmNotify 315 | (xcb:-event) 316 | ((~code :initform 1) 317 | (kind :initarg :kind :type xcb:CARD8) 318 | (~sequence :type xcb:CARD16) 319 | (alarm :initarg :alarm :type xcb:sync:ALARM) 320 | (counter-value :initarg :counter-value :type xcb:sync:INT64) 321 | (alarm-value :initarg :alarm-value :type xcb:sync:INT64) 322 | (timestamp :initarg :timestamp :type xcb:TIMESTAMP) 323 | (state :initarg :state :type xcb:CARD8) 324 | (pad~0 :initform 3 :type xcb:-pad))) 325 | 326 | (defconst xcb:sync:error-number-class-alist 327 | '((0 . xcb:sync:Counter) 328 | (1 . xcb:sync:Alarm)) 329 | "(error-number . error-class) alist.") 330 | 331 | (defconst xcb:sync:event-number-class-alist 332 | '((0 . xcb:sync:CounterNotify) 333 | (1 . xcb:sync:AlarmNotify)) 334 | "(event-number . event-class) alist.") 335 | 336 | 337 | 338 | (provide 'xcb-sync) 339 | 340 | ;;; xcb-sync.el ends here 341 | -------------------------------------------------------------------------------- /xcb-systemtray.el: -------------------------------------------------------------------------------- 1 | ;;; xcb-systemtray.el --- System tray protocol -*- lexical-binding: t -*- 2 | 3 | ;; Copyright (C) 2016-2019 Free Software Foundation, Inc. 4 | 5 | ;; Author: Chris Feng 6 | 7 | ;; This file is part of GNU Emacs. 8 | 9 | ;; GNU Emacs is free software: you can redistribute it and/or modify 10 | ;; it under the terms of the GNU General Public License as published by 11 | ;; the Free Software Foundation, either version 3 of the License, or 12 | ;; (at your option) any later version. 13 | 14 | ;; GNU Emacs is distributed in the hope that it will be useful, 15 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | ;; GNU General Public License for more details. 18 | 19 | ;; You should have received a copy of the GNU General Public License 20 | ;; along with GNU Emacs. If not, see . 21 | 22 | ;;; Commentary: 23 | 24 | ;; This library implements the system tray protocol. 25 | 26 | ;; Usage tips: 27 | ;; + Do not forget to call `xcb:systemtray:init' for _every_ connection using 28 | ;; this library. 29 | ;; + Use `xcb:systemtray:SendEvent' instead of `xcb:SendEvent' to send opcode 30 | ;; messages defined in this library. 31 | ;; + Initializing this library auto loads and initializes 'xcb-ewmh'. 32 | 33 | ;; References: 34 | ;; + System Tray Protocol (https://specifications.freedesktop.org/ 35 | ;; systemtray-spec/systemtray-spec-0.3.html) 36 | 37 | ;;; Code: 38 | 39 | (require 'xcb-ewmh) 40 | 41 | ;; System tray atoms. 42 | (eval-and-compile 43 | (defconst xcb:systemtray:-atoms ;_NET_SYSTEM_TRAY_Sn are left out. 44 | '(_NET_SYSTEM_TRAY_OPCODE 45 | _NET_SYSTEM_TRAY_ORIENTATION 46 | _NET_SYSTEM_TRAY_VISUAL 47 | _NET_SYSTEM_TRAY_MESSAGE_DATA) 48 | "Atoms involved in the system tray protocol.") 49 | 50 | (dolist (atom xcb:systemtray:-atoms) 51 | (eval `(defvar ,(intern (concat "xcb:Atom:" (symbol-name atom))) nil)))) 52 | 53 | ;; Opcodes. 54 | (defconst xcb:systemtray:opcode:REQUEST-DOCK 0) 55 | (defconst xcb:systemtray:opcode:BEGIN-MESSAGE 1) 56 | (defconst xcb:systemtray:opcode:CANCEL-MESSAGE 2) 57 | 58 | (cl-defmethod xcb:systemtray:init ((obj xcb:connection) &optional force) 59 | "Initialize the system tray module. 60 | 61 | This method must be called before using any other method in this module." 62 | (when (or force (not xcb:Atom:_NET_SYSTEM_TRAY_OPCODE)) 63 | (xcb:ewmh:init obj) ;required. 64 | (let ((atoms xcb:systemtray:-atoms)) 65 | (dotimes (i (x-display-screens)) 66 | (push (intern (format "_NET_SYSTEM_TRAY_S%d" i)) atoms)) 67 | (xcb:icccm:intern-atoms obj atoms force)))) 68 | 69 | (defclass xcb:systemtray:SendEvent (xcb:SendEvent) 70 | ((propagate :initform 0) 71 | (event-mask :initform xcb:EventMask:NoEvent)) 72 | :documentation "Send system tray opcode message.") 73 | 74 | (defclass xcb:systemtray:-ClientMessage 75 | (xcb:icccm:--ClientMessage xcb:ClientMessage) 76 | ((format :initform 32) 77 | (type :initform xcb:Atom:_NET_SYSTEM_TRAY_OPCODE) 78 | (time :initarg :time :type xcb:TIMESTAMP) ;new slot 79 | (opcode :initarg :opcode :type xcb:CARD32)) ;new slot 80 | :documentation "An system tray opcode message.") 81 | 82 | (defclass xcb:systemtray:REQUEST-DOCK (xcb:systemtray:-ClientMessage) 83 | ((opcode :initform xcb:systemtray:opcode:REQUEST-DOCK) 84 | (id :initarg :id :type xcb:CARD32) 85 | (pad~0 :initform 8 :type xcb:-pad)) 86 | :documentation "Dock a tray icon.") 87 | 88 | (defclass xcb:systemtray:BEGIN-MESSAGE (xcb:systemtray:-ClientMessage) 89 | ((opcode :initform xcb:systemtray:opcode:BEGIN-MESSAGE) 90 | (timeout :initarg :timeout :type xcb:TIMESTAMP) 91 | (length :initarg :length :type xcb:CARD32) 92 | (id :initarg :id :type xcb:CARD32)) 93 | :documentation "Begin balloon message.") 94 | 95 | (defclass xcb:systemtray:MESSAGE-DATA 96 | (xcb:icccm:--ClientMessage xcb:ClientMessage) 97 | ((format :initform 8) 98 | (type :initform xcb:Atom:_NET_SYSTEM_TRAY_MESSAGE_DATA) 99 | (data~ :initform '(name data type xcb:CARD8 size 20) :type xcb:-list) 100 | (data :initarg :data :type xcb:-ignore))) 101 | 102 | (defclass xcb:systemtray:CANCEL-MESSAGE (xcb:systemtray:-ClientMessage) 103 | ((opcode :initform xcb:systemtray:opcode:CANCEL-MESSAGE) 104 | (id :initarg :id :type xcb:CARD32) 105 | (pad~0 :initform 8 :type xcb:-pad)) 106 | :documentation "Cancel balloon message.") 107 | 108 | ;; Value of _NET_SYSTEM_TRAY_ORIENTATION. 109 | (defconst xcb:systemtray:ORIENTATION:HORZ 0) 110 | (defconst xcb:systemtray:ORIENTATION:VERT 1) 111 | 112 | (defclass xcb:xembed:get-_NET_SYSTEM_TRAY_ORIENTATION 113 | (xcb:icccm:-GetProperty-single) 114 | ((property :initform xcb:Atom:_NET_SYSTEM_TRAY_ORIENTATION) 115 | (type :initform xcb:Atom:CARDINAL))) 116 | (defclass xcb:xembed:get-_NET_SYSTEM_TRAY_ORIENTATION~reply 117 | (xcb:icccm:-GetProperty-single~reply) 118 | nil) 119 | (defclass xcb:xembed:set-_NET_SYSTEM_TRAY_ORIENTATION 120 | (xcb:icccm:-ChangeProperty-single) 121 | ((property :initform xcb:Atom:_NET_SYSTEM_TRAY_ORIENTATION) 122 | (type :initform xcb:Atom:CARDINAL) 123 | (format :initform 32))) 124 | 125 | (defclass xcb:xembed:get-_NET_SYSTEM_TRAY_VISUAL 126 | (xcb:icccm:-GetProperty-single) 127 | ((property :initform xcb:Atom:_NET_SYSTEM_TRAY_VISUAL) 128 | (type :initform xcb:Atom:VISUALID))) 129 | (defclass xcb:xembed:get-_NET_SYSTEM_TRAY_VISUAL~reply 130 | (xcb:icccm:-GetProperty-single~reply) 131 | nil) 132 | (defclass xcb:xembed:set-_NET_SYSTEM_TRAY_VISUAL 133 | (xcb:icccm:-ChangeProperty-single) 134 | ((property :initform xcb:Atom:_NET_SYSTEM_TRAY_VISUAL) 135 | (type :initform xcb:Atom:VISUALID) 136 | (format :initform 32))) 137 | 138 | 139 | 140 | (provide 'xcb-systemtray) 141 | 142 | ;;; xcb-systemtray.el ends here 143 | -------------------------------------------------------------------------------- /xcb-xc_misc.el: -------------------------------------------------------------------------------- 1 | ;;; xcb-xc_misc.el --- X11 XCMisc extension -*- lexical-binding: t -*- 2 | 3 | ;; Copyright (C) 2015-2019 Free Software Foundation, Inc. 4 | 5 | ;; This file is part of GNU Emacs. 6 | 7 | ;; GNU Emacs is free software: you can redistribute it and/or modify 8 | ;; it under the terms of the GNU General Public License as published by 9 | ;; the Free Software Foundation, either version 3 of the License, or 10 | ;; (at your option) any later version. 11 | 12 | ;; GNU Emacs is distributed in the hope that it will be useful, 13 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | ;; GNU General Public License for more details. 16 | 17 | ;; You should have received a copy of the GNU General Public License 18 | ;; along with GNU Emacs. If not, see . 19 | 20 | ;;; Commentary: 21 | 22 | ;; This file was generated by 'el_client.el' from 'xc_misc.xml', 23 | ;; which you can retrieve from . 24 | 25 | ;;; Code: 26 | 27 | (require 'xcb-types) 28 | 29 | (defconst xcb:xc_misc:-extension-xname "XC-MISC") 30 | (defconst xcb:xc_misc:-extension-name "XCMisc") 31 | (defconst xcb:xc_misc:-major-version 1) 32 | (defconst xcb:xc_misc:-minor-version 1) 33 | 34 | (defclass xcb:xc_misc:GetVersion 35 | (xcb:-request) 36 | ((~opcode :initform 0 :type xcb:-u1) 37 | (client-major-version :initarg :client-major-version :type xcb:CARD16) 38 | (client-minor-version :initarg :client-minor-version :type xcb:CARD16))) 39 | (defclass xcb:xc_misc:GetVersion~reply 40 | (xcb:-reply) 41 | ((pad~0 :initform 1 :type xcb:-pad) 42 | (~sequence :type xcb:CARD16) 43 | (length :type xcb:CARD32) 44 | (server-major-version :initarg :server-major-version :type xcb:CARD16) 45 | (server-minor-version :initarg :server-minor-version :type xcb:CARD16))) 46 | 47 | (defclass xcb:xc_misc:GetXIDRange 48 | (xcb:-request) 49 | ((~opcode :initform 1 :type xcb:-u1))) 50 | (defclass xcb:xc_misc:GetXIDRange~reply 51 | (xcb:-reply) 52 | ((pad~0 :initform 1 :type xcb:-pad) 53 | (~sequence :type xcb:CARD16) 54 | (length :type xcb:CARD32) 55 | (start-id :initarg :start-id :type xcb:CARD32) 56 | (count :initarg :count :type xcb:CARD32))) 57 | 58 | (defclass xcb:xc_misc:GetXIDList 59 | (xcb:-request) 60 | ((~opcode :initform 2 :type xcb:-u1) 61 | (count :initarg :count :type xcb:CARD32))) 62 | (defclass xcb:xc_misc:GetXIDList~reply 63 | (xcb:-reply) 64 | ((pad~0 :initform 1 :type xcb:-pad) 65 | (~sequence :type xcb:CARD16) 66 | (length :type xcb:CARD32) 67 | (ids-len :initarg :ids-len :type xcb:CARD32) 68 | (pad~1 :initform 20 :type xcb:-pad) 69 | (ids~ :initform 70 | '(name ids type xcb:CARD32 size 71 | (xcb:-fieldref 'ids-len)) 72 | :type xcb:-list) 73 | (ids :initarg :ids :type xcb:-ignore))) 74 | 75 | 76 | 77 | (provide 'xcb-xc_misc) 78 | 79 | ;;; xcb-xc_misc.el ends here 80 | -------------------------------------------------------------------------------- /xcb-xembed.el: -------------------------------------------------------------------------------- 1 | ;;; xcb-xembed.el --- XEmbed protocol -*- lexical-binding: t -*- 2 | 3 | ;; Copyright (C) 2016-2019 Free Software Foundation, Inc. 4 | 5 | ;; Author: Chris Feng 6 | 7 | ;; This file is part of GNU Emacs. 8 | 9 | ;; GNU Emacs is free software: you can redistribute it and/or modify 10 | ;; it under the terms of the GNU General Public License as published by 11 | ;; the Free Software Foundation, either version 3 of the License, or 12 | ;; (at your option) any later version. 13 | 14 | ;; GNU Emacs is distributed in the hope that it will be useful, 15 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | ;; GNU General Public License for more details. 18 | 19 | ;; You should have received a copy of the GNU General Public License 20 | ;; along with GNU Emacs. If not, see . 21 | 22 | ;;; Commentary: 23 | 24 | ;; This library implements the XEmbed protocol. 25 | 26 | ;; Usage tips: 27 | ;; + Do not forget to call `xcb:xembed:init' for _every_ connection using this 28 | ;; library. 29 | ;; + Use `xcb:xembed:SendEvent' instead of `xcb:SendEvent' to send XEmbed 30 | ;; messages defined in this library. 31 | 32 | ;; References: 33 | ;; + Xembed protocol (https://specifications.freedesktop.org/ 34 | ;; xembed-spec/xembed-spec-0.5.html) 35 | 36 | ;;; Code: 37 | 38 | (require 'xcb-icccm) 39 | 40 | ;; XEmbed atoms 41 | (eval-and-compile 42 | (defconst xcb:xembed:-atoms 43 | '(_XEMBED_INFO _XEMBED) 44 | "XEmbed atoms.") 45 | 46 | (dolist (atom xcb:xembed:-atoms) 47 | (eval `(defvar ,(intern (concat "xcb:Atom:" (symbol-name atom))) nil)))) 48 | 49 | ;; XEMBED message opcodes. 50 | (defconst xcb:xembed:opcode:EMBEDDED-NOTIFY 0) 51 | (defconst xcb:xembed:opcode:WINDOW-ACTIVATE 1) 52 | (defconst xcb:xembed:opcode:WINDOW-DEACTIVATE 2) 53 | (defconst xcb:xembed:opcode:REQUEST-FOCUS 3) 54 | (defconst xcb:xembed:opcode:FOCUS-IN 4) 55 | (defconst xcb:xembed:opcode:FOCUS-OUT 5) 56 | (defconst xcb:xembed:opcode:FOCUS-NEXT 6) 57 | (defconst xcb:xembed:opcode:FOCUS-PREV 7) 58 | (defconst xcb:xembed:opcode:MODALITY-ON 10) 59 | (defconst xcb:xembed:opcode:MODALITY-OFF 11) 60 | (defconst xcb:xembed:opcode:REGISTER-ACCELERATOR 12) 61 | (defconst xcb:xembed:opcode:UNREGISTER-ACCELERATOR 13) 62 | (defconst xcb:xembed:opcode:ACTIVATE-ACCELERATOR 14) 63 | 64 | (cl-defmethod xcb:xembed:init ((obj xcb:connection) &optional force) 65 | "Initialize the XEmbed module. 66 | 67 | This method must be called before using any other method in this module." 68 | (when (or force (not xcb:Atom:_XEMBED_INFO)) 69 | (xcb:icccm:intern-atoms obj xcb:xembed:-atoms force))) 70 | 71 | ;; Flags for _XEMBED_INFO. 72 | (defconst xcb:xembed:MAPPED 1) 73 | 74 | (defclass xcb:xembed:get-_XEMBED_INFO (xcb:icccm:-GetProperty-explicit) 75 | ((property :initform xcb:Atom:_XEMBED_INFO) 76 | (type :initform xcb:Atom:_XEMBED_INFO))) 77 | (defclass xcb:xembed:get-_XEMBED_INFO~reply 78 | (xcb:icccm:-GetProperty-explicit~reply) 79 | ((version :type xcb:-ignore) 80 | (flags :type xcb:-ignore))) 81 | (defclass xcb:xembed:set-_XEMBED_INFO (xcb:icccm:-ChangeProperty-explicit) 82 | ((property :initform xcb:Atom:_XEMBED_INFO) 83 | (type :initform xcb:Atom:_XEMBED_INFO) 84 | (format :initform 32) 85 | (version :initarg :version :type xcb:-ignore) 86 | (flags :initarg :flags :type xcb:-ignore))) 87 | 88 | (defclass xcb:xembed:SendEvent (xcb:SendEvent) 89 | ((propagate :initform 0) 90 | (event-mask :initform xcb:EventMask:NoEvent)) 91 | :documentation "Send XEmbed message.") 92 | 93 | (defclass xcb:xembed:-ClientMessage 94 | (xcb:icccm:--ClientMessage xcb:ClientMessage) 95 | ((format :initform 32) 96 | (type :initform xcb:Atom:_XEMBED) 97 | (time :initarg :time :type xcb:TIMESTAMP) ;new slot 98 | (opcode :initarg :opcode :type xcb:CARD32) ;new slot 99 | (detail :initarg :detail :initform 0 :type xcb:CARD32)) ;new slot 100 | :documentation "An XEmbed client message.") 101 | 102 | (defclass xcb:xembed:EMBEDDED-NOTIFY (xcb:xembed:-ClientMessage) 103 | ((opcode :initform xcb:xembed:opcode:EMBEDDED-NOTIFY) 104 | (embedder :initarg :embedder :type xcb:WINDOW) 105 | (version :initarg :version :type xcb:CARD32))) 106 | 107 | (defclass xcb:xembed:WINDOW-ACTIVATE (xcb:xembed:-ClientMessage) 108 | ((opcode :initform xcb:xembed:opcode:WINDOW-ACTIVATE) 109 | (pad~0 :initform 8 :type xcb:-pad))) 110 | 111 | (defclass xcb:xembed:WINDOW-DEACTIVATE (xcb:xembed:-ClientMessage) 112 | ((opcode :initform xcb:xembed:opcode:WINDOW-DEACTIVATE) 113 | (pad~0 :initform 8 :type xcb:-pad))) 114 | 115 | (defclass xcb:xembed:REQUEST-FOCUS (xcb:xembed:-ClientMessage) 116 | ((opcode :initform xcb:xembed:opcode:REQUEST-FOCUS) 117 | (pad~0 :initform 8 :type xcb:-pad))) 118 | 119 | ;; Details for xcb:xembed:FOCUS-IN. 120 | (defconst xcb:xembed:FOCUS:CURRENT 0) 121 | (defconst xcb:xembed:FOCUS:FIRST 1) 122 | (defconst xcb:xembed:FOCUS:LAST 2) 123 | 124 | ;; Directions for focusing. 125 | (defconst xcb:xembed:DIRECTION:DEFAULT 0) 126 | (defconst xcb:xembed:DIRECTION:UP-DOWN 1) 127 | (defconst xcb:xembed:DIRECTION:LEFT-RIGHT 2) 128 | 129 | (defclass xcb:xembed:FOCUS-IN (xcb:xembed:-ClientMessage) 130 | ((opcode :initform xcb:xembed:opcode:FOCUS-IN) 131 | (direction :initarg :direction :initform 0 :type xcb:CARD32) 132 | (pad~0 :initform 4 :type xcb:-pad))) 133 | 134 | (defclass xcb:xembed:FOCUS-OUT (xcb:xembed:-ClientMessage) 135 | ((opcode :initform xcb:xembed:opcode:FOCUS-OUT) 136 | (pad~0 :initform 8 :type xcb:-pad))) 137 | 138 | (defclass xcb:xembed:FOCUS-NEXT (xcb:xembed:-ClientMessage) 139 | ((opcode :initform xcb:xembed:opcode:FOCUS-NEXT) 140 | (direction :initarg :direction :initform 0 :type xcb:CARD32) 141 | (pad~0 :initform 4 :type xcb:-pad))) 142 | 143 | (defclass xcb:xembed:FOCUS-PREV (xcb:xembed:-ClientMessage) 144 | ((opcode :initform xcb:xembed:opcode:FOCUS-PREV) 145 | (direction :initarg :direction :initform 0 :type xcb:CARD32) 146 | (pad~0 :initform 4 :type xcb:-pad))) 147 | 148 | ;; Modifiers field for xcb:xembed:REGISTER-ACCELERATOR. 149 | (defconst xcb:xembed:MODIFIER:SHIFT 1) 150 | (defconst xcb:xembed:MODIFIER:CONTROL 2) 151 | (defconst xcb:xembed:MODIFIER:ALT 4) 152 | (defconst xcb:xembed:MODIFIER:SUPER 8) 153 | (defconst xcb:xembed:MODIFIER:HYPER 16) 154 | 155 | (defclass xcb:xembed:REGISTER-ACCELERATOR (xcb:xembed:-ClientMessage) 156 | ((opcode :initform xcb:xembed:opcode:REGISTER-ACCELERATOR) 157 | (keysym :initarg :keysym :type xcb:KEYSYM) 158 | (modifier :initarg :modifier :type xcb:CARD32))) 159 | 160 | (defclass xcb:xembed:UNREGISTER-ACCELERATOR (xcb:xembed:-ClientMessage) 161 | ((opcode :initform xcb:xembed:opcode:UNREGISTER-ACCELERATOR) 162 | (pad~0 :initform 8 :type xcb:-pad))) 163 | 164 | ;; Flags for XEMBED-ACTIVATE-ACCELERATOR. 165 | (defconst xcb:xembed:ACCELERATOR:OVERLOADED 1) 166 | 167 | (defclass xcb:xembed:ACTIVATE-ACCELERATOR (xcb:xembed:-ClientMessage) 168 | ((opcode :initform xcb:xembed:opcode:ACTIVATE-ACCELERATOR) 169 | (flags :initarg :flags :type xcb:CARD32) 170 | (pad~0 :initform 4 :type xcb:-pad))) 171 | 172 | (defclass xcb:xembed:MODALITY-ON (xcb:xembed:-ClientMessage) 173 | ((opcode :initform xcb:xembed:opcode:MODALITY-ON) 174 | (pad~0 :initform 8 :type xcb:-pad))) 175 | 176 | (defclass xcb:xembed:MODALITY-OFF (xcb:xembed:-ClientMessage) 177 | ((opcode :initform xcb:xembed:opcode:MODALITY-OFF) 178 | (pad~0 :initform 8 :type xcb:-pad))) 179 | 180 | 181 | 182 | (provide 'xcb-xembed) 183 | 184 | ;;; xcb-xembed.el ends here 185 | -------------------------------------------------------------------------------- /xcb-xevie.el: -------------------------------------------------------------------------------- 1 | ;;; xcb-xevie.el --- X11 Xevie extension -*- lexical-binding: t -*- 2 | 3 | ;; Copyright (C) 2015-2019 Free Software Foundation, Inc. 4 | 5 | ;; This file is part of GNU Emacs. 6 | 7 | ;; GNU Emacs is free software: you can redistribute it and/or modify 8 | ;; it under the terms of the GNU General Public License as published by 9 | ;; the Free Software Foundation, either version 3 of the License, or 10 | ;; (at your option) any later version. 11 | 12 | ;; GNU Emacs is distributed in the hope that it will be useful, 13 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | ;; GNU General Public License for more details. 16 | 17 | ;; You should have received a copy of the GNU General Public License 18 | ;; along with GNU Emacs. If not, see . 19 | 20 | ;;; Commentary: 21 | 22 | ;; This file was generated by 'el_client.el' from 'xevie.xml', 23 | ;; which you can retrieve from . 24 | 25 | ;;; Code: 26 | 27 | (require 'xcb-types) 28 | 29 | (defconst xcb:xevie:-extension-xname "XEVIE") 30 | (defconst xcb:xevie:-extension-name "Xevie") 31 | (defconst xcb:xevie:-major-version 1) 32 | (defconst xcb:xevie:-minor-version 0) 33 | 34 | (defclass xcb:xevie:QueryVersion 35 | (xcb:-request) 36 | ((~opcode :initform 0 :type xcb:-u1) 37 | (client-major-version :initarg :client-major-version :type xcb:CARD16) 38 | (client-minor-version :initarg :client-minor-version :type xcb:CARD16))) 39 | (defclass xcb:xevie:QueryVersion~reply 40 | (xcb:-reply) 41 | ((pad~0 :initform 1 :type xcb:-pad) 42 | (~sequence :type xcb:CARD16) 43 | (length :type xcb:CARD32) 44 | (server-major-version :initarg :server-major-version :type xcb:CARD16) 45 | (server-minor-version :initarg :server-minor-version :type xcb:CARD16) 46 | (pad~1 :initform 20 :type xcb:-pad))) 47 | 48 | (defclass xcb:xevie:Start 49 | (xcb:-request) 50 | ((~opcode :initform 1 :type xcb:-u1) 51 | (screen :initarg :screen :type xcb:CARD32))) 52 | (defclass xcb:xevie:Start~reply 53 | (xcb:-reply) 54 | ((pad~0 :initform 1 :type xcb:-pad) 55 | (~sequence :type xcb:CARD16) 56 | (length :type xcb:CARD32) 57 | (pad~1 :initform 24 :type xcb:-pad))) 58 | 59 | (defclass xcb:xevie:End 60 | (xcb:-request) 61 | ((~opcode :initform 2 :type xcb:-u1) 62 | (cmap :initarg :cmap :type xcb:CARD32))) 63 | (defclass xcb:xevie:End~reply 64 | (xcb:-reply) 65 | ((pad~0 :initform 1 :type xcb:-pad) 66 | (~sequence :type xcb:CARD16) 67 | (length :type xcb:CARD32) 68 | (pad~1 :initform 24 :type xcb:-pad))) 69 | 70 | (defconst xcb:xevie:Datatype:Unmodified 0) 71 | (defconst xcb:xevie:Datatype:Modified 1) 72 | 73 | (defclass xcb:xevie:Event 74 | (xcb:-struct) 75 | ((pad~0 :initform 32 :type xcb:-pad))) 76 | 77 | (defclass xcb:xevie:Send 78 | (xcb:-request) 79 | ((~opcode :initform 3 :type xcb:-u1) 80 | (event :initarg :event :type xcb:xevie:Event) 81 | (data-type :initarg :data-type :type xcb:CARD32) 82 | (pad~0 :initform 64 :type xcb:-pad))) 83 | (defclass xcb:xevie:Send~reply 84 | (xcb:-reply) 85 | ((pad~0 :initform 1 :type xcb:-pad) 86 | (~sequence :type xcb:CARD16) 87 | (length :type xcb:CARD32) 88 | (pad~1 :initform 24 :type xcb:-pad))) 89 | 90 | (defclass xcb:xevie:SelectInput 91 | (xcb:-request) 92 | ((~opcode :initform 4 :type xcb:-u1) 93 | (event-mask :initarg :event-mask :type xcb:CARD32))) 94 | (defclass xcb:xevie:SelectInput~reply 95 | (xcb:-reply) 96 | ((pad~0 :initform 1 :type xcb:-pad) 97 | (~sequence :type xcb:CARD16) 98 | (length :type xcb:CARD32) 99 | (pad~1 :initform 24 :type xcb:-pad))) 100 | 101 | 102 | 103 | (provide 'xcb-xevie) 104 | 105 | ;;; xcb-xevie.el ends here 106 | -------------------------------------------------------------------------------- /xcb-xf86dri.el: -------------------------------------------------------------------------------- 1 | ;;; xcb-xf86dri.el --- X11 XF86Dri extension -*- lexical-binding: t -*- 2 | 3 | ;; Copyright (C) 2015-2019 Free Software Foundation, Inc. 4 | 5 | ;; This file is part of GNU Emacs. 6 | 7 | ;; GNU Emacs is free software: you can redistribute it and/or modify 8 | ;; it under the terms of the GNU General Public License as published by 9 | ;; the Free Software Foundation, either version 3 of the License, or 10 | ;; (at your option) any later version. 11 | 12 | ;; GNU Emacs is distributed in the hope that it will be useful, 13 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | ;; GNU General Public License for more details. 16 | 17 | ;; You should have received a copy of the GNU General Public License 18 | ;; along with GNU Emacs. If not, see . 19 | 20 | ;;; Commentary: 21 | 22 | ;; This file was generated by 'el_client.el' from 'xf86dri.xml', 23 | ;; which you can retrieve from . 24 | 25 | ;;; Code: 26 | 27 | (require 'xcb-types) 28 | 29 | (defconst xcb:xf86dri:-extension-xname "XFree86-DRI") 30 | (defconst xcb:xf86dri:-extension-name "XF86Dri") 31 | (defconst xcb:xf86dri:-major-version 4) 32 | (defconst xcb:xf86dri:-minor-version 1) 33 | 34 | (defclass xcb:xf86dri:DrmClipRect 35 | (xcb:-struct) 36 | ((x1 :initarg :x1 :type xcb:INT16) 37 | (y1 :initarg :y1 :type xcb:INT16) 38 | (x2 :initarg :x2 :type xcb:INT16) 39 | (x3 :initarg :x3 :type xcb:INT16))) 40 | 41 | (defclass xcb:xf86dri:QueryVersion 42 | (xcb:-request) 43 | ((~opcode :initform 0 :type xcb:-u1))) 44 | (defclass xcb:xf86dri:QueryVersion~reply 45 | (xcb:-reply) 46 | ((pad~0 :initform 1 :type xcb:-pad) 47 | (~sequence :type xcb:CARD16) 48 | (length :type xcb:CARD32) 49 | (dri-major-version :initarg :dri-major-version :type xcb:CARD16) 50 | (dri-minor-version :initarg :dri-minor-version :type xcb:CARD16) 51 | (dri-minor-patch :initarg :dri-minor-patch :type xcb:CARD32))) 52 | 53 | (defclass xcb:xf86dri:QueryDirectRenderingCapable 54 | (xcb:-request) 55 | ((~opcode :initform 1 :type xcb:-u1) 56 | (screen :initarg :screen :type xcb:CARD32))) 57 | (defclass xcb:xf86dri:QueryDirectRenderingCapable~reply 58 | (xcb:-reply) 59 | ((pad~0 :initform 1 :type xcb:-pad) 60 | (~sequence :type xcb:CARD16) 61 | (length :type xcb:CARD32) 62 | (is-capable :initarg :is-capable :type xcb:BOOL))) 63 | 64 | (defclass xcb:xf86dri:OpenConnection 65 | (xcb:-request) 66 | ((~opcode :initform 2 :type xcb:-u1) 67 | (screen :initarg :screen :type xcb:CARD32))) 68 | (defclass xcb:xf86dri:OpenConnection~reply 69 | (xcb:-reply) 70 | ((pad~0 :initform 1 :type xcb:-pad) 71 | (~sequence :type xcb:CARD16) 72 | (length :type xcb:CARD32) 73 | (sarea-handle-low :initarg :sarea-handle-low :type xcb:CARD32) 74 | (sarea-handle-high :initarg :sarea-handle-high :type xcb:CARD32) 75 | (bus-id-len :initarg :bus-id-len :type xcb:CARD32) 76 | (pad~1 :initform 12 :type xcb:-pad) 77 | (bus-id~ :initform 78 | '(name bus-id type xcb:char size 79 | (xcb:-fieldref 'bus-id-len)) 80 | :type xcb:-list) 81 | (bus-id :initarg :bus-id :type xcb:-ignore))) 82 | 83 | (defclass xcb:xf86dri:CloseConnection 84 | (xcb:-request) 85 | ((~opcode :initform 3 :type xcb:-u1) 86 | (screen :initarg :screen :type xcb:CARD32))) 87 | 88 | (defclass xcb:xf86dri:GetClientDriverName 89 | (xcb:-request) 90 | ((~opcode :initform 4 :type xcb:-u1) 91 | (screen :initarg :screen :type xcb:CARD32))) 92 | (defclass xcb:xf86dri:GetClientDriverName~reply 93 | (xcb:-reply) 94 | ((pad~0 :initform 1 :type xcb:-pad) 95 | (~sequence :type xcb:CARD16) 96 | (length :type xcb:CARD32) 97 | (client-driver-major-version :initarg :client-driver-major-version :type xcb:CARD32) 98 | (client-driver-minor-version :initarg :client-driver-minor-version :type xcb:CARD32) 99 | (client-driver-patch-version :initarg :client-driver-patch-version :type xcb:CARD32) 100 | (client-driver-name-len :initarg :client-driver-name-len :type xcb:CARD32) 101 | (pad~1 :initform 8 :type xcb:-pad) 102 | (client-driver-name~ :initform 103 | '(name client-driver-name type xcb:char size 104 | (xcb:-fieldref 'client-driver-name-len)) 105 | :type xcb:-list) 106 | (client-driver-name :initarg :client-driver-name :type xcb:-ignore))) 107 | 108 | (defclass xcb:xf86dri:CreateContext 109 | (xcb:-request) 110 | ((~opcode :initform 5 :type xcb:-u1) 111 | (screen :initarg :screen :type xcb:CARD32) 112 | (visual :initarg :visual :type xcb:CARD32) 113 | (context :initarg :context :type xcb:CARD32))) 114 | (defclass xcb:xf86dri:CreateContext~reply 115 | (xcb:-reply) 116 | ((pad~0 :initform 1 :type xcb:-pad) 117 | (~sequence :type xcb:CARD16) 118 | (length :type xcb:CARD32) 119 | (hw-context :initarg :hw-context :type xcb:CARD32))) 120 | 121 | (defclass xcb:xf86dri:DestroyContext 122 | (xcb:-request) 123 | ((~opcode :initform 6 :type xcb:-u1) 124 | (screen :initarg :screen :type xcb:CARD32) 125 | (context :initarg :context :type xcb:CARD32))) 126 | 127 | (defclass xcb:xf86dri:CreateDrawable 128 | (xcb:-request) 129 | ((~opcode :initform 7 :type xcb:-u1) 130 | (screen :initarg :screen :type xcb:CARD32) 131 | (drawable :initarg :drawable :type xcb:CARD32))) 132 | (defclass xcb:xf86dri:CreateDrawable~reply 133 | (xcb:-reply) 134 | ((pad~0 :initform 1 :type xcb:-pad) 135 | (~sequence :type xcb:CARD16) 136 | (length :type xcb:CARD32) 137 | (hw-drawable-handle :initarg :hw-drawable-handle :type xcb:CARD32))) 138 | 139 | (defclass xcb:xf86dri:DestroyDrawable 140 | (xcb:-request) 141 | ((~opcode :initform 8 :type xcb:-u1) 142 | (screen :initarg :screen :type xcb:CARD32) 143 | (drawable :initarg :drawable :type xcb:CARD32))) 144 | 145 | (defclass xcb:xf86dri:GetDrawableInfo 146 | (xcb:-request) 147 | ((~opcode :initform 9 :type xcb:-u1) 148 | (screen :initarg :screen :type xcb:CARD32) 149 | (drawable :initarg :drawable :type xcb:CARD32))) 150 | (defclass xcb:xf86dri:GetDrawableInfo~reply 151 | (xcb:-reply) 152 | ((pad~0 :initform 1 :type xcb:-pad) 153 | (~sequence :type xcb:CARD16) 154 | (length :type xcb:CARD32) 155 | (drawable-table-index :initarg :drawable-table-index :type xcb:CARD32) 156 | (drawable-table-stamp :initarg :drawable-table-stamp :type xcb:CARD32) 157 | (drawable-origin-X :initarg :drawable-origin-X :type xcb:INT16) 158 | (drawable-origin-Y :initarg :drawable-origin-Y :type xcb:INT16) 159 | (drawable-size-W :initarg :drawable-size-W :type xcb:INT16) 160 | (drawable-size-H :initarg :drawable-size-H :type xcb:INT16) 161 | (num-clip-rects :initarg :num-clip-rects :type xcb:CARD32) 162 | (back-x :initarg :back-x :type xcb:INT16) 163 | (back-y :initarg :back-y :type xcb:INT16) 164 | (num-back-clip-rects :initarg :num-back-clip-rects :type xcb:CARD32) 165 | (clip-rects~ :initform 166 | '(name clip-rects type xcb:xf86dri:DrmClipRect size 167 | (xcb:-fieldref 'num-clip-rects)) 168 | :type xcb:-list) 169 | (clip-rects :initarg :clip-rects :type xcb:-ignore) 170 | (back-clip-rects~ :initform 171 | '(name back-clip-rects type xcb:xf86dri:DrmClipRect size 172 | (xcb:-fieldref 'num-back-clip-rects)) 173 | :type xcb:-list) 174 | (back-clip-rects :initarg :back-clip-rects :type xcb:-ignore))) 175 | 176 | (defclass xcb:xf86dri:GetDeviceInfo 177 | (xcb:-request) 178 | ((~opcode :initform 10 :type xcb:-u1) 179 | (screen :initarg :screen :type xcb:CARD32))) 180 | (defclass xcb:xf86dri:GetDeviceInfo~reply 181 | (xcb:-reply) 182 | ((pad~0 :initform 1 :type xcb:-pad) 183 | (~sequence :type xcb:CARD16) 184 | (length :type xcb:CARD32) 185 | (framebuffer-handle-low :initarg :framebuffer-handle-low :type xcb:CARD32) 186 | (framebuffer-handle-high :initarg :framebuffer-handle-high :type xcb:CARD32) 187 | (framebuffer-origin-offset :initarg :framebuffer-origin-offset :type xcb:CARD32) 188 | (framebuffer-size :initarg :framebuffer-size :type xcb:CARD32) 189 | (framebuffer-stride :initarg :framebuffer-stride :type xcb:CARD32) 190 | (device-private-size :initarg :device-private-size :type xcb:CARD32) 191 | (device-private~ :initform 192 | '(name device-private type xcb:CARD32 size 193 | (xcb:-fieldref 'device-private-size)) 194 | :type xcb:-list) 195 | (device-private :initarg :device-private :type xcb:-ignore))) 196 | 197 | (defclass xcb:xf86dri:AuthConnection 198 | (xcb:-request) 199 | ((~opcode :initform 11 :type xcb:-u1) 200 | (screen :initarg :screen :type xcb:CARD32) 201 | (magic :initarg :magic :type xcb:CARD32))) 202 | (defclass xcb:xf86dri:AuthConnection~reply 203 | (xcb:-reply) 204 | ((pad~0 :initform 1 :type xcb:-pad) 205 | (~sequence :type xcb:CARD16) 206 | (length :type xcb:CARD32) 207 | (authenticated :initarg :authenticated :type xcb:CARD32))) 208 | 209 | 210 | 211 | (provide 'xcb-xf86dri) 212 | 213 | ;;; xcb-xf86dri.el ends here 214 | -------------------------------------------------------------------------------- /xcb-xfixes.el: -------------------------------------------------------------------------------- 1 | ;;; xcb-xfixes.el --- X11 XFixes extension -*- lexical-binding: t -*- 2 | 3 | ;; Copyright (C) 2015-2019 Free Software Foundation, Inc. 4 | 5 | ;; This file is part of GNU Emacs. 6 | 7 | ;; GNU Emacs is free software: you can redistribute it and/or modify 8 | ;; it under the terms of the GNU General Public License as published by 9 | ;; the Free Software Foundation, either version 3 of the License, or 10 | ;; (at your option) any later version. 11 | 12 | ;; GNU Emacs is distributed in the hope that it will be useful, 13 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | ;; GNU General Public License for more details. 16 | 17 | ;; You should have received a copy of the GNU General Public License 18 | ;; along with GNU Emacs. If not, see . 19 | 20 | ;;; Commentary: 21 | 22 | ;; This file was generated by 'el_client.el' from 'xfixes.xml', 23 | ;; which you can retrieve from . 24 | 25 | ;;; Code: 26 | 27 | (require 'xcb-types) 28 | 29 | (defconst xcb:xfixes:-extension-xname "XFIXES") 30 | (defconst xcb:xfixes:-extension-name "XFixes") 31 | (defconst xcb:xfixes:-major-version 5) 32 | (defconst xcb:xfixes:-minor-version 0) 33 | 34 | (require 'xcb-xproto) 35 | 36 | (require 'xcb-render) 37 | 38 | (require 'xcb-shape) 39 | 40 | (defclass xcb:xfixes:QueryVersion 41 | (xcb:-request) 42 | ((~opcode :initform 0 :type xcb:-u1) 43 | (client-major-version :initarg :client-major-version :type xcb:CARD32) 44 | (client-minor-version :initarg :client-minor-version :type xcb:CARD32))) 45 | (defclass xcb:xfixes:QueryVersion~reply 46 | (xcb:-reply) 47 | ((pad~0 :initform 1 :type xcb:-pad) 48 | (~sequence :type xcb:CARD16) 49 | (length :type xcb:CARD32) 50 | (major-version :initarg :major-version :type xcb:CARD32) 51 | (minor-version :initarg :minor-version :type xcb:CARD32) 52 | (pad~1 :initform 16 :type xcb:-pad))) 53 | 54 | (defconst xcb:xfixes:SaveSetMode:Insert 0) 55 | (defconst xcb:xfixes:SaveSetMode:Delete 1) 56 | 57 | (defconst xcb:xfixes:SaveSetTarget:Nearest 0) 58 | (defconst xcb:xfixes:SaveSetTarget:Root 1) 59 | 60 | (defconst xcb:xfixes:SaveSetMapping:Map 0) 61 | (defconst xcb:xfixes:SaveSetMapping:Unmap 1) 62 | 63 | (defclass xcb:xfixes:ChangeSaveSet 64 | (xcb:-request) 65 | ((~opcode :initform 1 :type xcb:-u1) 66 | (mode :initarg :mode :type xcb:BYTE) 67 | (target :initarg :target :type xcb:BYTE) 68 | (map :initarg :map :type xcb:BYTE) 69 | (pad~0 :initform 1 :type xcb:-pad) 70 | (window :initarg :window :type xcb:WINDOW))) 71 | 72 | (defconst xcb:xfixes:SelectionEvent:SetSelectionOwner 0) 73 | (defconst xcb:xfixes:SelectionEvent:SelectionWindowDestroy 1) 74 | (defconst xcb:xfixes:SelectionEvent:SelectionClientClose 2) 75 | 76 | (defconst xcb:xfixes:SelectionEventMask:SetSelectionOwner 1) 77 | (defconst xcb:xfixes:SelectionEventMask:SelectionWindowDestroy 2) 78 | (defconst xcb:xfixes:SelectionEventMask:SelectionClientClose 4) 79 | 80 | (defclass xcb:xfixes:SelectionNotify 81 | (xcb:-event) 82 | ((~code :initform 0) 83 | (subtype :initarg :subtype :type xcb:CARD8) 84 | (~sequence :type xcb:CARD16) 85 | (window :initarg :window :type xcb:WINDOW) 86 | (owner :initarg :owner :type xcb:WINDOW) 87 | (selection :initarg :selection :type xcb:ATOM) 88 | (timestamp :initarg :timestamp :type xcb:TIMESTAMP) 89 | (selection-timestamp :initarg :selection-timestamp :type xcb:TIMESTAMP) 90 | (pad~0 :initform 8 :type xcb:-pad))) 91 | 92 | (defclass xcb:xfixes:SelectSelectionInput 93 | (xcb:-request) 94 | ((~opcode :initform 2 :type xcb:-u1) 95 | (window :initarg :window :type xcb:WINDOW) 96 | (selection :initarg :selection :type xcb:ATOM) 97 | (event-mask :initarg :event-mask :type xcb:CARD32))) 98 | 99 | (defconst xcb:xfixes:CursorNotify:DisplayCursor 0) 100 | 101 | (defconst xcb:xfixes:CursorNotifyMask:DisplayCursor 1) 102 | 103 | (defclass xcb:xfixes:CursorNotify 104 | (xcb:-event) 105 | ((~code :initform 1) 106 | (subtype :initarg :subtype :type xcb:CARD8) 107 | (~sequence :type xcb:CARD16) 108 | (window :initarg :window :type xcb:WINDOW) 109 | (cursor-serial :initarg :cursor-serial :type xcb:CARD32) 110 | (timestamp :initarg :timestamp :type xcb:TIMESTAMP) 111 | (name :initarg :name :type xcb:ATOM) 112 | (pad~0 :initform 12 :type xcb:-pad))) 113 | 114 | (defclass xcb:xfixes:SelectCursorInput 115 | (xcb:-request) 116 | ((~opcode :initform 3 :type xcb:-u1) 117 | (window :initarg :window :type xcb:WINDOW) 118 | (event-mask :initarg :event-mask :type xcb:CARD32))) 119 | 120 | (defclass xcb:xfixes:GetCursorImage 121 | (xcb:-request) 122 | ((~opcode :initform 4 :type xcb:-u1))) 123 | (defclass xcb:xfixes:GetCursorImage~reply 124 | (xcb:-reply) 125 | ((pad~0 :initform 1 :type xcb:-pad) 126 | (~sequence :type xcb:CARD16) 127 | (length :type xcb:CARD32) 128 | (x :initarg :x :type xcb:INT16) 129 | (y :initarg :y :type xcb:INT16) 130 | (width :initarg :width :type xcb:CARD16) 131 | (height :initarg :height :type xcb:CARD16) 132 | (xhot :initarg :xhot :type xcb:CARD16) 133 | (yhot :initarg :yhot :type xcb:CARD16) 134 | (cursor-serial :initarg :cursor-serial :type xcb:CARD32) 135 | (pad~1 :initform 8 :type xcb:-pad) 136 | (cursor-image~ :initform 137 | '(name cursor-image type xcb:CARD32 size 138 | (* 139 | (xcb:-fieldref 'width) 140 | (xcb:-fieldref 'height))) 141 | :type xcb:-list) 142 | (cursor-image :initarg :cursor-image :type xcb:-ignore))) 143 | 144 | (xcb:deftypealias 'xcb:xfixes:REGION 'xcb:-u4) 145 | 146 | (defclass xcb:xfixes:BadRegion 147 | (xcb:-error) 148 | ((~code :initform 0))) 149 | 150 | (defconst xcb:xfixes:Region:None 0) 151 | 152 | (defclass xcb:xfixes:CreateRegion 153 | (xcb:-request) 154 | ((~opcode :initform 5 :type xcb:-u1) 155 | (region :initarg :region :type xcb:xfixes:REGION) 156 | (rectangles~ :initform 157 | '(name rectangles type xcb:RECTANGLE size nil) 158 | :type xcb:-list) 159 | (rectangles :initarg :rectangles :type xcb:-ignore))) 160 | 161 | (defclass xcb:xfixes:CreateRegionFromBitmap 162 | (xcb:-request) 163 | ((~opcode :initform 6 :type xcb:-u1) 164 | (region :initarg :region :type xcb:xfixes:REGION) 165 | (bitmap :initarg :bitmap :type xcb:PIXMAP))) 166 | 167 | (defclass xcb:xfixes:CreateRegionFromWindow 168 | (xcb:-request) 169 | ((~opcode :initform 7 :type xcb:-u1) 170 | (region :initarg :region :type xcb:xfixes:REGION) 171 | (window :initarg :window :type xcb:WINDOW) 172 | (kind :initarg :kind :type xcb:shape:KIND) 173 | (pad~0 :initform 3 :type xcb:-pad))) 174 | 175 | (defclass xcb:xfixes:CreateRegionFromGC 176 | (xcb:-request) 177 | ((~opcode :initform 8 :type xcb:-u1) 178 | (region :initarg :region :type xcb:xfixes:REGION) 179 | (gc :initarg :gc :type xcb:GCONTEXT))) 180 | 181 | (defclass xcb:xfixes:CreateRegionFromPicture 182 | (xcb:-request) 183 | ((~opcode :initform 9 :type xcb:-u1) 184 | (region :initarg :region :type xcb:xfixes:REGION) 185 | (picture :initarg :picture :type xcb:render:PICTURE))) 186 | 187 | (defclass xcb:xfixes:DestroyRegion 188 | (xcb:-request) 189 | ((~opcode :initform 10 :type xcb:-u1) 190 | (region :initarg :region :type xcb:xfixes:REGION))) 191 | 192 | (defclass xcb:xfixes:SetRegion 193 | (xcb:-request) 194 | ((~opcode :initform 11 :type xcb:-u1) 195 | (region :initarg :region :type xcb:xfixes:REGION) 196 | (rectangles~ :initform 197 | '(name rectangles type xcb:RECTANGLE size nil) 198 | :type xcb:-list) 199 | (rectangles :initarg :rectangles :type xcb:-ignore))) 200 | 201 | (defclass xcb:xfixes:CopyRegion 202 | (xcb:-request) 203 | ((~opcode :initform 12 :type xcb:-u1) 204 | (source :initarg :source :type xcb:xfixes:REGION) 205 | (destination :initarg :destination :type xcb:xfixes:REGION))) 206 | 207 | (defclass xcb:xfixes:UnionRegion 208 | (xcb:-request) 209 | ((~opcode :initform 13 :type xcb:-u1) 210 | (source1 :initarg :source1 :type xcb:xfixes:REGION) 211 | (source2 :initarg :source2 :type xcb:xfixes:REGION) 212 | (destination :initarg :destination :type xcb:xfixes:REGION))) 213 | 214 | (defclass xcb:xfixes:IntersectRegion 215 | (xcb:-request) 216 | ((~opcode :initform 14 :type xcb:-u1) 217 | (source1 :initarg :source1 :type xcb:xfixes:REGION) 218 | (source2 :initarg :source2 :type xcb:xfixes:REGION) 219 | (destination :initarg :destination :type xcb:xfixes:REGION))) 220 | 221 | (defclass xcb:xfixes:SubtractRegion 222 | (xcb:-request) 223 | ((~opcode :initform 15 :type xcb:-u1) 224 | (source1 :initarg :source1 :type xcb:xfixes:REGION) 225 | (source2 :initarg :source2 :type xcb:xfixes:REGION) 226 | (destination :initarg :destination :type xcb:xfixes:REGION))) 227 | 228 | (defclass xcb:xfixes:InvertRegion 229 | (xcb:-request) 230 | ((~opcode :initform 16 :type xcb:-u1) 231 | (source :initarg :source :type xcb:xfixes:REGION) 232 | (bounds :initarg :bounds :type xcb:RECTANGLE) 233 | (destination :initarg :destination :type xcb:xfixes:REGION))) 234 | 235 | (defclass xcb:xfixes:TranslateRegion 236 | (xcb:-request) 237 | ((~opcode :initform 17 :type xcb:-u1) 238 | (region :initarg :region :type xcb:xfixes:REGION) 239 | (dx :initarg :dx :type xcb:INT16) 240 | (dy :initarg :dy :type xcb:INT16))) 241 | 242 | (defclass xcb:xfixes:RegionExtents 243 | (xcb:-request) 244 | ((~opcode :initform 18 :type xcb:-u1) 245 | (source :initarg :source :type xcb:xfixes:REGION) 246 | (destination :initarg :destination :type xcb:xfixes:REGION))) 247 | 248 | (defclass xcb:xfixes:FetchRegion 249 | (xcb:-request) 250 | ((~opcode :initform 19 :type xcb:-u1) 251 | (region :initarg :region :type xcb:xfixes:REGION))) 252 | (defclass xcb:xfixes:FetchRegion~reply 253 | (xcb:-reply) 254 | ((pad~0 :initform 1 :type xcb:-pad) 255 | (~sequence :type xcb:CARD16) 256 | (length :type xcb:CARD32) 257 | (extents :initarg :extents :type xcb:RECTANGLE) 258 | (pad~1 :initform 16 :type xcb:-pad) 259 | (rectangles~ :initform 260 | '(name rectangles type xcb:RECTANGLE size 261 | (/ 262 | (xcb:-fieldref 'length) 263 | 2)) 264 | :type xcb:-list) 265 | (rectangles :initarg :rectangles :type xcb:-ignore))) 266 | 267 | (defclass xcb:xfixes:SetGCClipRegion 268 | (xcb:-request) 269 | ((~opcode :initform 20 :type xcb:-u1) 270 | (gc :initarg :gc :type xcb:GCONTEXT) 271 | (region :initarg :region :type xcb:xfixes:REGION) 272 | (x-origin :initarg :x-origin :type xcb:INT16) 273 | (y-origin :initarg :y-origin :type xcb:INT16))) 274 | 275 | (defclass xcb:xfixes:SetWindowShapeRegion 276 | (xcb:-request) 277 | ((~opcode :initform 21 :type xcb:-u1) 278 | (dest :initarg :dest :type xcb:WINDOW) 279 | (dest-kind :initarg :dest-kind :type xcb:shape:KIND) 280 | (pad~0 :initform 3 :type xcb:-pad) 281 | (x-offset :initarg :x-offset :type xcb:INT16) 282 | (y-offset :initarg :y-offset :type xcb:INT16) 283 | (region :initarg :region :type xcb:xfixes:REGION))) 284 | 285 | (defclass xcb:xfixes:SetPictureClipRegion 286 | (xcb:-request) 287 | ((~opcode :initform 22 :type xcb:-u1) 288 | (picture :initarg :picture :type xcb:render:PICTURE) 289 | (region :initarg :region :type xcb:xfixes:REGION) 290 | (x-origin :initarg :x-origin :type xcb:INT16) 291 | (y-origin :initarg :y-origin :type xcb:INT16))) 292 | 293 | (defclass xcb:xfixes:SetCursorName 294 | (xcb:-request) 295 | ((~opcode :initform 23 :type xcb:-u1) 296 | (cursor :initarg :cursor :type xcb:CURSOR) 297 | (nbytes :initarg :nbytes :type xcb:CARD16) 298 | (pad~0 :initform 2 :type xcb:-pad) 299 | (name~ :initform 300 | '(name name type xcb:char size 301 | (xcb:-fieldref 'nbytes)) 302 | :type xcb:-list) 303 | (name :initarg :name :type xcb:-ignore))) 304 | 305 | (defclass xcb:xfixes:GetCursorName 306 | (xcb:-request) 307 | ((~opcode :initform 24 :type xcb:-u1) 308 | (cursor :initarg :cursor :type xcb:CURSOR))) 309 | (defclass xcb:xfixes:GetCursorName~reply 310 | (xcb:-reply) 311 | ((pad~0 :initform 1 :type xcb:-pad) 312 | (~sequence :type xcb:CARD16) 313 | (length :type xcb:CARD32) 314 | (atom :initarg :atom :type xcb:ATOM) 315 | (nbytes :initarg :nbytes :type xcb:CARD16) 316 | (pad~1 :initform 18 :type xcb:-pad) 317 | (name~ :initform 318 | '(name name type xcb:char size 319 | (xcb:-fieldref 'nbytes)) 320 | :type xcb:-list) 321 | (name :initarg :name :type xcb:-ignore))) 322 | 323 | (defclass xcb:xfixes:GetCursorImageAndName 324 | (xcb:-request) 325 | ((~opcode :initform 25 :type xcb:-u1))) 326 | (defclass xcb:xfixes:GetCursorImageAndName~reply 327 | (xcb:-reply) 328 | ((pad~0 :initform 1 :type xcb:-pad) 329 | (~sequence :type xcb:CARD16) 330 | (length :type xcb:CARD32) 331 | (x :initarg :x :type xcb:INT16) 332 | (y :initarg :y :type xcb:INT16) 333 | (width :initarg :width :type xcb:CARD16) 334 | (height :initarg :height :type xcb:CARD16) 335 | (xhot :initarg :xhot :type xcb:CARD16) 336 | (yhot :initarg :yhot :type xcb:CARD16) 337 | (cursor-serial :initarg :cursor-serial :type xcb:CARD32) 338 | (cursor-atom :initarg :cursor-atom :type xcb:ATOM) 339 | (nbytes :initarg :nbytes :type xcb:CARD16) 340 | (pad~1 :initform 2 :type xcb:-pad) 341 | (cursor-image~ :initform 342 | '(name cursor-image type xcb:CARD32 size 343 | (* 344 | (xcb:-fieldref 'width) 345 | (xcb:-fieldref 'height))) 346 | :type xcb:-list) 347 | (cursor-image :initarg :cursor-image :type xcb:-ignore) 348 | (name~ :initform 349 | '(name name type xcb:char size 350 | (xcb:-fieldref 'nbytes)) 351 | :type xcb:-list) 352 | (name :initarg :name :type xcb:-ignore))) 353 | 354 | (defclass xcb:xfixes:ChangeCursor 355 | (xcb:-request) 356 | ((~opcode :initform 26 :type xcb:-u1) 357 | (source :initarg :source :type xcb:CURSOR) 358 | (destination :initarg :destination :type xcb:CURSOR))) 359 | 360 | (defclass xcb:xfixes:ChangeCursorByName 361 | (xcb:-request) 362 | ((~opcode :initform 27 :type xcb:-u1) 363 | (src :initarg :src :type xcb:CURSOR) 364 | (nbytes :initarg :nbytes :type xcb:CARD16) 365 | (pad~0 :initform 2 :type xcb:-pad) 366 | (name~ :initform 367 | '(name name type xcb:char size 368 | (xcb:-fieldref 'nbytes)) 369 | :type xcb:-list) 370 | (name :initarg :name :type xcb:-ignore))) 371 | 372 | (defclass xcb:xfixes:ExpandRegion 373 | (xcb:-request) 374 | ((~opcode :initform 28 :type xcb:-u1) 375 | (source :initarg :source :type xcb:xfixes:REGION) 376 | (destination :initarg :destination :type xcb:xfixes:REGION) 377 | (left :initarg :left :type xcb:CARD16) 378 | (right :initarg :right :type xcb:CARD16) 379 | (top :initarg :top :type xcb:CARD16) 380 | (bottom :initarg :bottom :type xcb:CARD16))) 381 | 382 | (defclass xcb:xfixes:HideCursor 383 | (xcb:-request) 384 | ((~opcode :initform 29 :type xcb:-u1) 385 | (window :initarg :window :type xcb:WINDOW))) 386 | 387 | (defclass xcb:xfixes:ShowCursor 388 | (xcb:-request) 389 | ((~opcode :initform 30 :type xcb:-u1) 390 | (window :initarg :window :type xcb:WINDOW))) 391 | 392 | (xcb:deftypealias 'xcb:xfixes:BARRIER 'xcb:-u4) 393 | 394 | (defconst xcb:xfixes:BarrierDirections:PositiveX 1) 395 | (defconst xcb:xfixes:BarrierDirections:PositiveY 2) 396 | (defconst xcb:xfixes:BarrierDirections:NegativeX 4) 397 | (defconst xcb:xfixes:BarrierDirections:NegativeY 8) 398 | 399 | (defclass xcb:xfixes:CreatePointerBarrier 400 | (xcb:-request) 401 | ((~opcode :initform 31 :type xcb:-u1) 402 | (barrier :initarg :barrier :type xcb:xfixes:BARRIER) 403 | (window :initarg :window :type xcb:WINDOW) 404 | (x1 :initarg :x1 :type xcb:CARD16) 405 | (y1 :initarg :y1 :type xcb:CARD16) 406 | (x2 :initarg :x2 :type xcb:CARD16) 407 | (y2 :initarg :y2 :type xcb:CARD16) 408 | (directions :initarg :directions :type xcb:CARD32) 409 | (pad~0 :initform 2 :type xcb:-pad) 410 | (num-devices :initarg :num-devices :type xcb:CARD16) 411 | (devices~ :initform 412 | '(name devices type xcb:CARD16 size 413 | (xcb:-fieldref 'num-devices)) 414 | :type xcb:-list) 415 | (devices :initarg :devices :type xcb:-ignore))) 416 | 417 | (defclass xcb:xfixes:DeletePointerBarrier 418 | (xcb:-request) 419 | ((~opcode :initform 32 :type xcb:-u1) 420 | (barrier :initarg :barrier :type xcb:xfixes:BARRIER))) 421 | 422 | (defconst xcb:xfixes:error-number-class-alist 423 | '((0 . xcb:xfixes:BadRegion)) 424 | "(error-number . error-class) alist.") 425 | 426 | (defconst xcb:xfixes:event-number-class-alist 427 | '((0 . xcb:xfixes:SelectionNotify) 428 | (1 . xcb:xfixes:CursorNotify)) 429 | "(event-number . event-class) alist.") 430 | 431 | 432 | 433 | (provide 'xcb-xfixes) 434 | 435 | ;;; xcb-xfixes.el ends here 436 | -------------------------------------------------------------------------------- /xcb-xinerama.el: -------------------------------------------------------------------------------- 1 | ;;; xcb-xinerama.el --- X11 Xinerama extension -*- lexical-binding: t -*- 2 | 3 | ;; Copyright (C) 2015-2019 Free Software Foundation, Inc. 4 | 5 | ;; This file is part of GNU Emacs. 6 | 7 | ;; GNU Emacs is free software: you can redistribute it and/or modify 8 | ;; it under the terms of the GNU General Public License as published by 9 | ;; the Free Software Foundation, either version 3 of the License, or 10 | ;; (at your option) any later version. 11 | 12 | ;; GNU Emacs is distributed in the hope that it will be useful, 13 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | ;; GNU General Public License for more details. 16 | 17 | ;; You should have received a copy of the GNU General Public License 18 | ;; along with GNU Emacs. If not, see . 19 | 20 | ;;; Commentary: 21 | 22 | ;; This file was generated by 'el_client.el' from 'xinerama.xml', 23 | ;; which you can retrieve from . 24 | 25 | ;;; Code: 26 | 27 | (require 'xcb-types) 28 | 29 | (defconst xcb:xinerama:-extension-xname "XINERAMA") 30 | (defconst xcb:xinerama:-extension-name "Xinerama") 31 | (defconst xcb:xinerama:-major-version 1) 32 | (defconst xcb:xinerama:-minor-version 1) 33 | 34 | (require 'xcb-xproto) 35 | 36 | (defclass xcb:xinerama:ScreenInfo 37 | (xcb:-struct) 38 | ((x-org :initarg :x-org :type xcb:INT16) 39 | (y-org :initarg :y-org :type xcb:INT16) 40 | (width :initarg :width :type xcb:CARD16) 41 | (height :initarg :height :type xcb:CARD16))) 42 | 43 | (defclass xcb:xinerama:QueryVersion 44 | (xcb:-request) 45 | ((~opcode :initform 0 :type xcb:-u1) 46 | (major :initarg :major :type xcb:CARD8) 47 | (minor :initarg :minor :type xcb:CARD8))) 48 | (defclass xcb:xinerama:QueryVersion~reply 49 | (xcb:-reply) 50 | ((pad~0 :initform 1 :type xcb:-pad) 51 | (~sequence :type xcb:CARD16) 52 | (length :type xcb:CARD32) 53 | (major :initarg :major :type xcb:CARD16) 54 | (minor :initarg :minor :type xcb:CARD16))) 55 | 56 | (defclass xcb:xinerama:GetState 57 | (xcb:-request) 58 | ((~opcode :initform 1 :type xcb:-u1) 59 | (window :initarg :window :type xcb:WINDOW))) 60 | (defclass xcb:xinerama:GetState~reply 61 | (xcb:-reply) 62 | ((state :initarg :state :type xcb:BYTE) 63 | (~sequence :type xcb:CARD16) 64 | (length :type xcb:CARD32) 65 | (window :initarg :window :type xcb:WINDOW))) 66 | 67 | (defclass xcb:xinerama:GetScreenCount 68 | (xcb:-request) 69 | ((~opcode :initform 2 :type xcb:-u1) 70 | (window :initarg :window :type xcb:WINDOW))) 71 | (defclass xcb:xinerama:GetScreenCount~reply 72 | (xcb:-reply) 73 | ((screen-count :initarg :screen-count :type xcb:BYTE) 74 | (~sequence :type xcb:CARD16) 75 | (length :type xcb:CARD32) 76 | (window :initarg :window :type xcb:WINDOW))) 77 | 78 | (defclass xcb:xinerama:GetScreenSize 79 | (xcb:-request) 80 | ((~opcode :initform 3 :type xcb:-u1) 81 | (window :initarg :window :type xcb:WINDOW) 82 | (screen :initarg :screen :type xcb:CARD32))) 83 | (defclass xcb:xinerama:GetScreenSize~reply 84 | (xcb:-reply) 85 | ((pad~0 :initform 1 :type xcb:-pad) 86 | (~sequence :type xcb:CARD16) 87 | (length :type xcb:CARD32) 88 | (width :initarg :width :type xcb:CARD32) 89 | (height :initarg :height :type xcb:CARD32) 90 | (window :initarg :window :type xcb:WINDOW) 91 | (screen :initarg :screen :type xcb:CARD32))) 92 | 93 | (defclass xcb:xinerama:IsActive 94 | (xcb:-request) 95 | ((~opcode :initform 4 :type xcb:-u1))) 96 | (defclass xcb:xinerama:IsActive~reply 97 | (xcb:-reply) 98 | ((pad~0 :initform 1 :type xcb:-pad) 99 | (~sequence :type xcb:CARD16) 100 | (length :type xcb:CARD32) 101 | (state :initarg :state :type xcb:CARD32))) 102 | 103 | (defclass xcb:xinerama:QueryScreens 104 | (xcb:-request) 105 | ((~opcode :initform 5 :type xcb:-u1))) 106 | (defclass xcb:xinerama:QueryScreens~reply 107 | (xcb:-reply) 108 | ((pad~0 :initform 1 :type xcb:-pad) 109 | (~sequence :type xcb:CARD16) 110 | (length :type xcb:CARD32) 111 | (number :initarg :number :type xcb:CARD32) 112 | (pad~1 :initform 20 :type xcb:-pad) 113 | (screen-info~ :initform 114 | '(name screen-info type xcb:xinerama:ScreenInfo size 115 | (xcb:-fieldref 'number)) 116 | :type xcb:-list) 117 | (screen-info :initarg :screen-info :type xcb:-ignore))) 118 | 119 | 120 | 121 | (provide 'xcb-xinerama) 122 | 123 | ;;; xcb-xinerama.el ends here 124 | -------------------------------------------------------------------------------- /xcb-xlib.el: -------------------------------------------------------------------------------- 1 | ;;; xcb-xlib.el --- Port of Xlib -*- lexical-binding: t -*- 2 | 3 | ;; Copyright (C) 2015-2019 Free Software Foundation, Inc. 4 | 5 | ;; Author: Chris Feng 6 | 7 | ;; This file is part of GNU Emacs. 8 | 9 | ;; GNU Emacs is free software: you can redistribute it and/or modify 10 | ;; it under the terms of the GNU General Public License as published by 11 | ;; the Free Software Foundation, either version 3 of the License, or 12 | ;; (at your option) any later version. 13 | 14 | ;; GNU Emacs is distributed in the hope that it will be useful, 15 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | ;; GNU General Public License for more details. 18 | 19 | ;; You should have received a copy of the GNU General Public License 20 | ;; along with GNU Emacs. If not, see . 21 | 22 | ;;; Commentary: 23 | 24 | ;; This file currently only contains constants from 'Xlib.h' 25 | 26 | ;;; Code: 27 | 28 | (defconst xlib:XNRequiredCharSet "requiredCharSet") 29 | (defconst xlib:XNQueryOrientation "queryOrientation") 30 | (defconst xlib:XNBaseFontName "baseFontName") 31 | (defconst xlib:XNOMAutomatic "omAutomatic") 32 | (defconst xlib:XNMissingCharSet "missingCharSet") 33 | (defconst xlib:XNDefaultString "defaultString") 34 | (defconst xlib:XNOrientation "orientation") 35 | (defconst xlib:XNDirectionalDependentDrawing "directionalDependentDrawing") 36 | (defconst xlib:XNContextualDrawing "contextualDrawing") 37 | (defconst xlib:XNFontInfo "fontInfo") 38 | 39 | (defconst xlib:XNVaNestedList "XNVaNestedList") 40 | (defconst xlib:XNQueryInputStyle "queryInputStyle") 41 | (defconst xlib:XNClientWindow "clientWindow") 42 | (defconst xlib:XNInputStyle "inputStyle") 43 | (defconst xlib:XNFocusWindow "focusWindow") 44 | (defconst xlib:XNResourceName "resourceName") 45 | (defconst xlib:XNResourceClass "resourceClass") 46 | (defconst xlib:XNGeometryCallback "geometryCallback") 47 | (defconst xlib:XNDestroyCallback "destroyCallback") 48 | (defconst xlib:XNFilterEvents "filterEvents") 49 | (defconst xlib:XNPreeditStartCallback "preeditStartCallback") 50 | (defconst xlib:XNPreeditDoneCallback "preeditDoneCallback") 51 | (defconst xlib:XNPreeditDrawCallback "preeditDrawCallback") 52 | (defconst xlib:XNPreeditCaretCallback "preeditCaretCallback") 53 | (defconst xlib:XNPreeditStateNotifyCallback "preeditStateNotifyCallback") 54 | (defconst xlib:XNPreeditAttributes "preeditAttributes") 55 | (defconst xlib:XNStatusStartCallback "statusStartCallback") 56 | (defconst xlib:XNStatusDoneCallback "statusDoneCallback") 57 | (defconst xlib:XNStatusDrawCallback "statusDrawCallback") 58 | (defconst xlib:XNStatusAttributes "statusAttributes") 59 | (defconst xlib:XNArea "area") 60 | (defconst xlib:XNAreaNeeded "areaNeeded") 61 | (defconst xlib:XNSpotLocation "spotLocation") 62 | (defconst xlib:XNColormap "colorMap") 63 | (defconst xlib:XNStdColormap "stdColorMap") 64 | (defconst xlib:XNForeground "foreground") 65 | (defconst xlib:XNBackground "background") 66 | (defconst xlib:XNBackgroundPixmap "backgroundPixmap") 67 | (defconst xlib:XNFontSet "fontSet") 68 | (defconst xlib:XNLineSpace "lineSpace") 69 | (defconst xlib:XNCursor "cursor") 70 | (defconst xlib:XNQueryIMValuesList "queryIMValuesList") 71 | (defconst xlib:XNQueryICValuesList "queryICValuesList") 72 | (defconst xlib:XNVisiblePosition "visiblePosition") 73 | (defconst xlib:XNR6PreeditCallback "r6PreeditCallback") 74 | (defconst xlib:XNStringConversionCallback "stringConversionCallback") 75 | (defconst xlib:XNStringConversion "stringConversion") 76 | (defconst xlib:XNResetState "resetState") 77 | (defconst xlib:XNHotKey "hotKey") 78 | (defconst xlib:XNHotKeyState "hotKeyState") 79 | (defconst xlib:XNPreeditState "preeditState") 80 | (defconst xlib:XNSeparatorofNestedList "separatorofNestedList") 81 | 82 | (defconst xlib:XIMPreeditArea #x0001) 83 | (defconst xlib:XIMPreeditCallbacks #x0002) 84 | (defconst xlib:XIMPreeditPosition #x0004) 85 | (defconst xlib:XIMPreeditNothing #x0008) 86 | (defconst xlib:XIMPreeditNone #x0010) 87 | (defconst xlib:XIMStatusArea #x0100) 88 | (defconst xlib:XIMStatusCallbacks #x0200) 89 | (defconst xlib:XIMStatusNothing #x0400) 90 | (defconst xlib:XIMStatusNone #x0800) 91 | 92 | (defconst xlib:XIMReverse #x001) 93 | (defconst xlib:XIMUnderline #x002) 94 | (defconst xlib:XIMHighlight #x004) 95 | (defconst xlib:XIMPrimary #x010) 96 | (defconst xlib:XIMSecondary #x020) 97 | (defconst xlib:XIMTertiary #x040) 98 | (defconst xlib:XIMVisibleToForward #x080) 99 | (defconst xlib:XIMVisibleToBackword #x100) 100 | (defconst xlib:XIMVisibleToCenter #x200) 101 | 102 | (defconst xlib:XBufferOverflow -1) 103 | (defconst xlib:XLookupNone 1) 104 | (defconst xlib:XLookupChars 2) 105 | (defconst xlib:XLookupKeySym 3) 106 | (defconst xlib:XLookupBoth 4) 107 | 108 | 109 | 110 | (provide 'xcb-xlib) 111 | 112 | ;;; xcb-xlib.el ends here 113 | -------------------------------------------------------------------------------- /xcb-xprint.el: -------------------------------------------------------------------------------- 1 | ;;; xcb-xprint.el --- X11 XPrint extension -*- lexical-binding: t -*- 2 | 3 | ;; Copyright (C) 2015-2019 Free Software Foundation, Inc. 4 | 5 | ;; This file is part of GNU Emacs. 6 | 7 | ;; GNU Emacs is free software: you can redistribute it and/or modify 8 | ;; it under the terms of the GNU General Public License as published by 9 | ;; the Free Software Foundation, either version 3 of the License, or 10 | ;; (at your option) any later version. 11 | 12 | ;; GNU Emacs is distributed in the hope that it will be useful, 13 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | ;; GNU General Public License for more details. 16 | 17 | ;; You should have received a copy of the GNU General Public License 18 | ;; along with GNU Emacs. If not, see . 19 | 20 | ;;; Commentary: 21 | 22 | ;; This file was generated by 'el_client.el' from 'xprint.xml', 23 | ;; which you can retrieve from . 24 | 25 | ;;; Code: 26 | 27 | (require 'xcb-types) 28 | 29 | (defconst xcb:xprint:-extension-xname "XpExtension") 30 | (defconst xcb:xprint:-extension-name "XPrint") 31 | (defconst xcb:xprint:-major-version 1) 32 | (defconst xcb:xprint:-minor-version 0) 33 | 34 | (require 'xcb-xproto) 35 | 36 | (xcb:deftypealias 'xcb:xprint:STRING8 'xcb:char) 37 | 38 | (defclass xcb:xprint:PRINTER 39 | (xcb:-struct) 40 | ((nameLen :initarg :nameLen :type xcb:CARD32) 41 | (name~ :initform 42 | '(name name type xcb:xprint:STRING8 size 43 | (xcb:-fieldref 'nameLen)) 44 | :type xcb:-list) 45 | (name :initarg :name :type xcb:-ignore) 46 | (pad~0 :initform 4 :type xcb:-pad-align) 47 | (descLen :initarg :descLen :type xcb:CARD32) 48 | (description~ :initform 49 | '(name description type xcb:xprint:STRING8 size 50 | (xcb:-fieldref 'descLen)) 51 | :type xcb:-list) 52 | (description :initarg :description :type xcb:-ignore) 53 | (pad~1 :initform 4 :type xcb:-pad-align))) 54 | 55 | (xcb:deftypealias 'xcb:xprint:PCONTEXT 'xcb:-u4) 56 | 57 | (defconst xcb:xprint:GetDoc:Finished 0) 58 | (defconst xcb:xprint:GetDoc:SecondConsumer 1) 59 | 60 | (defconst xcb:xprint:EvMask:NoEventMask 0) 61 | (defconst xcb:xprint:EvMask:PrintMask 1) 62 | (defconst xcb:xprint:EvMask:AttributeMask 2) 63 | 64 | (defconst xcb:xprint:Detail:StartJobNotify 1) 65 | (defconst xcb:xprint:Detail:EndJobNotify 2) 66 | (defconst xcb:xprint:Detail:StartDocNotify 3) 67 | (defconst xcb:xprint:Detail:EndDocNotify 4) 68 | (defconst xcb:xprint:Detail:StartPageNotify 5) 69 | (defconst xcb:xprint:Detail:EndPageNotify 6) 70 | 71 | (defconst xcb:xprint:Attr:JobAttr 1) 72 | (defconst xcb:xprint:Attr:DocAttr 2) 73 | (defconst xcb:xprint:Attr:PageAttr 3) 74 | (defconst xcb:xprint:Attr:PrinterAttr 4) 75 | (defconst xcb:xprint:Attr:ServerAttr 5) 76 | (defconst xcb:xprint:Attr:MediumAttr 6) 77 | (defconst xcb:xprint:Attr:SpoolerAttr 7) 78 | 79 | (defclass xcb:xprint:PrintQueryVersion 80 | (xcb:-request) 81 | ((~opcode :initform 0 :type xcb:-u1))) 82 | (defclass xcb:xprint:PrintQueryVersion~reply 83 | (xcb:-reply) 84 | ((pad~0 :initform 1 :type xcb:-pad) 85 | (~sequence :type xcb:CARD16) 86 | (length :type xcb:CARD32) 87 | (major-version :initarg :major-version :type xcb:CARD16) 88 | (minor-version :initarg :minor-version :type xcb:CARD16))) 89 | 90 | (defclass xcb:xprint:PrintGetPrinterList 91 | (xcb:-request) 92 | ((~opcode :initform 1 :type xcb:-u1) 93 | (printerNameLen :initarg :printerNameLen :type xcb:CARD32) 94 | (localeLen :initarg :localeLen :type xcb:CARD32) 95 | (printer-name~ :initform 96 | '(name printer-name type xcb:xprint:STRING8 size 97 | (xcb:-fieldref 'printerNameLen)) 98 | :type xcb:-list) 99 | (printer-name :initarg :printer-name :type xcb:-ignore) 100 | (locale~ :initform 101 | '(name locale type xcb:xprint:STRING8 size 102 | (xcb:-fieldref 'localeLen)) 103 | :type xcb:-list) 104 | (locale :initarg :locale :type xcb:-ignore))) 105 | (defclass xcb:xprint:PrintGetPrinterList~reply 106 | (xcb:-reply) 107 | ((pad~0 :initform 1 :type xcb:-pad) 108 | (~sequence :type xcb:CARD16) 109 | (length :type xcb:CARD32) 110 | (listCount :initarg :listCount :type xcb:CARD32) 111 | (pad~1 :initform 20 :type xcb:-pad) 112 | (printers~ :initform 113 | '(name printers type xcb:xprint:PRINTER size 114 | (xcb:-fieldref 'listCount)) 115 | :type xcb:-list) 116 | (printers :initarg :printers :type xcb:-ignore))) 117 | 118 | (defclass xcb:xprint:PrintRehashPrinterList 119 | (xcb:-request) 120 | ((~opcode :initform 20 :type xcb:-u1))) 121 | 122 | (defclass xcb:xprint:CreateContext 123 | (xcb:-request) 124 | ((~opcode :initform 2 :type xcb:-u1) 125 | (context-id :initarg :context-id :type xcb:CARD32) 126 | (printerNameLen :initarg :printerNameLen :type xcb:CARD32) 127 | (localeLen :initarg :localeLen :type xcb:CARD32) 128 | (printerName~ :initform 129 | '(name printerName type xcb:xprint:STRING8 size 130 | (xcb:-fieldref 'printerNameLen)) 131 | :type xcb:-list) 132 | (printerName :initarg :printerName :type xcb:-ignore) 133 | (locale~ :initform 134 | '(name locale type xcb:xprint:STRING8 size 135 | (xcb:-fieldref 'localeLen)) 136 | :type xcb:-list) 137 | (locale :initarg :locale :type xcb:-ignore))) 138 | 139 | (defclass xcb:xprint:PrintSetContext 140 | (xcb:-request) 141 | ((~opcode :initform 3 :type xcb:-u1) 142 | (context :initarg :context :type xcb:CARD32))) 143 | 144 | (defclass xcb:xprint:PrintGetContext 145 | (xcb:-request) 146 | ((~opcode :initform 4 :type xcb:-u1))) 147 | (defclass xcb:xprint:PrintGetContext~reply 148 | (xcb:-reply) 149 | ((pad~0 :initform 1 :type xcb:-pad) 150 | (~sequence :type xcb:CARD16) 151 | (length :type xcb:CARD32) 152 | (context :initarg :context :type xcb:CARD32))) 153 | 154 | (defclass xcb:xprint:PrintDestroyContext 155 | (xcb:-request) 156 | ((~opcode :initform 5 :type xcb:-u1) 157 | (context :initarg :context :type xcb:CARD32))) 158 | 159 | (defclass xcb:xprint:PrintGetScreenOfContext 160 | (xcb:-request) 161 | ((~opcode :initform 6 :type xcb:-u1))) 162 | (defclass xcb:xprint:PrintGetScreenOfContext~reply 163 | (xcb:-reply) 164 | ((pad~0 :initform 1 :type xcb:-pad) 165 | (~sequence :type xcb:CARD16) 166 | (length :type xcb:CARD32) 167 | (root :initarg :root :type xcb:WINDOW))) 168 | 169 | (defclass xcb:xprint:PrintStartJob 170 | (xcb:-request) 171 | ((~opcode :initform 7 :type xcb:-u1) 172 | (output-mode :initarg :output-mode :type xcb:CARD8))) 173 | 174 | (defclass xcb:xprint:PrintEndJob 175 | (xcb:-request) 176 | ((~opcode :initform 8 :type xcb:-u1) 177 | (cancel :initarg :cancel :type xcb:BOOL))) 178 | 179 | (defclass xcb:xprint:PrintStartDoc 180 | (xcb:-request) 181 | ((~opcode :initform 9 :type xcb:-u1) 182 | (driver-mode :initarg :driver-mode :type xcb:CARD8))) 183 | 184 | (defclass xcb:xprint:PrintEndDoc 185 | (xcb:-request) 186 | ((~opcode :initform 10 :type xcb:-u1) 187 | (cancel :initarg :cancel :type xcb:BOOL))) 188 | 189 | (defclass xcb:xprint:PrintPutDocumentData 190 | (xcb:-request) 191 | ((~opcode :initform 11 :type xcb:-u1) 192 | (drawable :initarg :drawable :type xcb:DRAWABLE) 193 | (len-data :initarg :len-data :type xcb:CARD32) 194 | (len-fmt :initarg :len-fmt :type xcb:CARD16) 195 | (len-options :initarg :len-options :type xcb:CARD16) 196 | (data~ :initform 197 | '(name data type xcb:BYTE size 198 | (xcb:-fieldref 'len-data)) 199 | :type xcb:-list) 200 | (data :initarg :data :type xcb:-ignore) 201 | (doc-format~ :initform 202 | '(name doc-format type xcb:xprint:STRING8 size 203 | (xcb:-fieldref 'len-fmt)) 204 | :type xcb:-list) 205 | (doc-format :initarg :doc-format :type xcb:-ignore) 206 | (options~ :initform 207 | '(name options type xcb:xprint:STRING8 size 208 | (xcb:-fieldref 'len-options)) 209 | :type xcb:-list) 210 | (options :initarg :options :type xcb:-ignore))) 211 | 212 | (defclass xcb:xprint:PrintGetDocumentData 213 | (xcb:-request) 214 | ((~opcode :initform 12 :type xcb:-u1) 215 | (context :initarg :context :type xcb:xprint:PCONTEXT) 216 | (max-bytes :initarg :max-bytes :type xcb:CARD32))) 217 | (defclass xcb:xprint:PrintGetDocumentData~reply 218 | (xcb:-reply) 219 | ((pad~0 :initform 1 :type xcb:-pad) 220 | (~sequence :type xcb:CARD16) 221 | (length :type xcb:CARD32) 222 | (status-code :initarg :status-code :type xcb:CARD32) 223 | (finished-flag :initarg :finished-flag :type xcb:CARD32) 224 | (dataLen :initarg :dataLen :type xcb:CARD32) 225 | (pad~1 :initform 12 :type xcb:-pad) 226 | (data~ :initform 227 | '(name data type xcb:BYTE size 228 | (xcb:-fieldref 'dataLen)) 229 | :type xcb:-list) 230 | (data :initarg :data :type xcb:-ignore))) 231 | 232 | (defclass xcb:xprint:PrintStartPage 233 | (xcb:-request) 234 | ((~opcode :initform 13 :type xcb:-u1) 235 | (window :initarg :window :type xcb:WINDOW))) 236 | 237 | (defclass xcb:xprint:PrintEndPage 238 | (xcb:-request) 239 | ((~opcode :initform 14 :type xcb:-u1) 240 | (cancel :initarg :cancel :type xcb:BOOL) 241 | (pad~0 :initform 3 :type xcb:-pad))) 242 | 243 | (defclass xcb:xprint:PrintSelectInput 244 | (xcb:-request) 245 | ((~opcode :initform 15 :type xcb:-u1) 246 | (context :initarg :context :type xcb:xprint:PCONTEXT) 247 | (event-mask :initarg :event-mask :type xcb:CARD32))) 248 | 249 | (defclass xcb:xprint:PrintInputSelected 250 | (xcb:-request) 251 | ((~opcode :initform 16 :type xcb:-u1) 252 | (context :initarg :context :type xcb:xprint:PCONTEXT))) 253 | (defclass xcb:xprint:PrintInputSelected~reply 254 | (xcb:-reply) 255 | ((pad~0 :initform 1 :type xcb:-pad) 256 | (~sequence :type xcb:CARD16) 257 | (length :type xcb:CARD32) 258 | (event-mask :initarg :event-mask :type xcb:CARD32) 259 | (all-events-mask :initarg :all-events-mask :type xcb:CARD32))) 260 | 261 | (defclass xcb:xprint:PrintGetAttributes 262 | (xcb:-request) 263 | ((~opcode :initform 17 :type xcb:-u1) 264 | (context :initarg :context :type xcb:xprint:PCONTEXT) 265 | (pool :initarg :pool :type xcb:CARD8) 266 | (pad~0 :initform 3 :type xcb:-pad))) 267 | (defclass xcb:xprint:PrintGetAttributes~reply 268 | (xcb:-reply) 269 | ((pad~0 :initform 1 :type xcb:-pad) 270 | (~sequence :type xcb:CARD16) 271 | (length :type xcb:CARD32) 272 | (stringLen :initarg :stringLen :type xcb:CARD32) 273 | (pad~1 :initform 20 :type xcb:-pad) 274 | (attributes~ :initform 275 | '(name attributes type xcb:xprint:STRING8 size 276 | (xcb:-fieldref 'stringLen)) 277 | :type xcb:-list) 278 | (attributes :initarg :attributes :type xcb:-ignore))) 279 | 280 | (defclass xcb:xprint:PrintGetOneAttributes 281 | (xcb:-request) 282 | ((~opcode :initform 19 :type xcb:-u1) 283 | (context :initarg :context :type xcb:xprint:PCONTEXT) 284 | (nameLen :initarg :nameLen :type xcb:CARD32) 285 | (pool :initarg :pool :type xcb:CARD8) 286 | (pad~0 :initform 3 :type xcb:-pad) 287 | (name~ :initform 288 | '(name name type xcb:xprint:STRING8 size 289 | (xcb:-fieldref 'nameLen)) 290 | :type xcb:-list) 291 | (name :initarg :name :type xcb:-ignore))) 292 | (defclass xcb:xprint:PrintGetOneAttributes~reply 293 | (xcb:-reply) 294 | ((pad~0 :initform 1 :type xcb:-pad) 295 | (~sequence :type xcb:CARD16) 296 | (length :type xcb:CARD32) 297 | (valueLen :initarg :valueLen :type xcb:CARD32) 298 | (pad~1 :initform 20 :type xcb:-pad) 299 | (value~ :initform 300 | '(name value type xcb:xprint:STRING8 size 301 | (xcb:-fieldref 'valueLen)) 302 | :type xcb:-list) 303 | (value :initarg :value :type xcb:-ignore))) 304 | 305 | (defclass xcb:xprint:PrintSetAttributes 306 | (xcb:-request) 307 | ((~opcode :initform 18 :type xcb:-u1) 308 | (context :initarg :context :type xcb:xprint:PCONTEXT) 309 | (stringLen :initarg :stringLen :type xcb:CARD32) 310 | (pool :initarg :pool :type xcb:CARD8) 311 | (rule :initarg :rule :type xcb:CARD8) 312 | (pad~0 :initform 2 :type xcb:-pad) 313 | (attributes~ :initform 314 | '(name attributes type xcb:xprint:STRING8 size nil) 315 | :type xcb:-list) 316 | (attributes :initarg :attributes :type xcb:-ignore))) 317 | 318 | (defclass xcb:xprint:PrintGetPageDimensions 319 | (xcb:-request) 320 | ((~opcode :initform 21 :type xcb:-u1) 321 | (context :initarg :context :type xcb:xprint:PCONTEXT))) 322 | (defclass xcb:xprint:PrintGetPageDimensions~reply 323 | (xcb:-reply) 324 | ((pad~0 :initform 1 :type xcb:-pad) 325 | (~sequence :type xcb:CARD16) 326 | (length :type xcb:CARD32) 327 | (width :initarg :width :type xcb:CARD16) 328 | (height :initarg :height :type xcb:CARD16) 329 | (offset-x :initarg :offset-x :type xcb:CARD16) 330 | (offset-y :initarg :offset-y :type xcb:CARD16) 331 | (reproducible-width :initarg :reproducible-width :type xcb:CARD16) 332 | (reproducible-height :initarg :reproducible-height :type xcb:CARD16))) 333 | 334 | (defclass xcb:xprint:PrintQueryScreens 335 | (xcb:-request) 336 | ((~opcode :initform 22 :type xcb:-u1))) 337 | (defclass xcb:xprint:PrintQueryScreens~reply 338 | (xcb:-reply) 339 | ((pad~0 :initform 1 :type xcb:-pad) 340 | (~sequence :type xcb:CARD16) 341 | (length :type xcb:CARD32) 342 | (listCount :initarg :listCount :type xcb:CARD32) 343 | (pad~1 :initform 20 :type xcb:-pad) 344 | (roots~ :initform 345 | '(name roots type xcb:WINDOW size 346 | (xcb:-fieldref 'listCount)) 347 | :type xcb:-list) 348 | (roots :initarg :roots :type xcb:-ignore))) 349 | 350 | (defclass xcb:xprint:PrintSetImageResolution 351 | (xcb:-request) 352 | ((~opcode :initform 23 :type xcb:-u1) 353 | (context :initarg :context :type xcb:xprint:PCONTEXT) 354 | (image-resolution :initarg :image-resolution :type xcb:CARD16))) 355 | (defclass xcb:xprint:PrintSetImageResolution~reply 356 | (xcb:-reply) 357 | ((status :initarg :status :type xcb:BOOL) 358 | (~sequence :type xcb:CARD16) 359 | (length :type xcb:CARD32) 360 | (previous-resolutions :initarg :previous-resolutions :type xcb:CARD16))) 361 | 362 | (defclass xcb:xprint:PrintGetImageResolution 363 | (xcb:-request) 364 | ((~opcode :initform 24 :type xcb:-u1) 365 | (context :initarg :context :type xcb:xprint:PCONTEXT))) 366 | (defclass xcb:xprint:PrintGetImageResolution~reply 367 | (xcb:-reply) 368 | ((pad~0 :initform 1 :type xcb:-pad) 369 | (~sequence :type xcb:CARD16) 370 | (length :type xcb:CARD32) 371 | (image-resolution :initarg :image-resolution :type xcb:CARD16))) 372 | 373 | (defclass xcb:xprint:Notify 374 | (xcb:-event) 375 | ((~code :initform 0) 376 | (detail :initarg :detail :type xcb:CARD8) 377 | (~sequence :type xcb:CARD16) 378 | (context :initarg :context :type xcb:xprint:PCONTEXT) 379 | (cancel :initarg :cancel :type xcb:BOOL))) 380 | 381 | (defclass xcb:xprint:AttributNotify 382 | (xcb:-event) 383 | ((~code :initform 1) 384 | (detail :initarg :detail :type xcb:CARD8) 385 | (~sequence :type xcb:CARD16) 386 | (context :initarg :context :type xcb:xprint:PCONTEXT))) 387 | 388 | (defclass xcb:xprint:BadContext 389 | (xcb:-error) 390 | ((~code :initform 0))) 391 | 392 | (defclass xcb:xprint:BadSequence 393 | (xcb:-error) 394 | ((~code :initform 1))) 395 | 396 | (defconst xcb:xprint:error-number-class-alist 397 | '((0 . xcb:xprint:BadContext) 398 | (1 . xcb:xprint:BadSequence)) 399 | "(error-number . error-class) alist.") 400 | 401 | (defconst xcb:xprint:event-number-class-alist 402 | '((0 . xcb:xprint:Notify) 403 | (1 . xcb:xprint:AttributNotify)) 404 | "(event-number . event-class) alist.") 405 | 406 | 407 | 408 | (provide 'xcb-xprint) 409 | 410 | ;;; xcb-xprint.el ends here 411 | -------------------------------------------------------------------------------- /xcb-xselinux.el: -------------------------------------------------------------------------------- 1 | ;;; xcb-xselinux.el --- X11 SELinux extension -*- lexical-binding: t -*- 2 | 3 | ;; Copyright (C) 2015-2019 Free Software Foundation, Inc. 4 | 5 | ;; This file is part of GNU Emacs. 6 | 7 | ;; GNU Emacs is free software: you can redistribute it and/or modify 8 | ;; it under the terms of the GNU General Public License as published by 9 | ;; the Free Software Foundation, either version 3 of the License, or 10 | ;; (at your option) any later version. 11 | 12 | ;; GNU Emacs is distributed in the hope that it will be useful, 13 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | ;; GNU General Public License for more details. 16 | 17 | ;; You should have received a copy of the GNU General Public License 18 | ;; along with GNU Emacs. If not, see . 19 | 20 | ;;; Commentary: 21 | 22 | ;; This file was generated by 'el_client.el' from 'xselinux.xml', 23 | ;; which you can retrieve from . 24 | 25 | ;;; Code: 26 | 27 | (require 'xcb-types) 28 | 29 | (defconst xcb:xselinux:-extension-xname "SELinux") 30 | (defconst xcb:xselinux:-extension-name "SELinux") 31 | (defconst xcb:xselinux:-major-version 1) 32 | (defconst xcb:xselinux:-minor-version 0) 33 | 34 | (require 'xcb-xproto) 35 | 36 | (defclass xcb:xselinux:QueryVersion 37 | (xcb:-request) 38 | ((~opcode :initform 0 :type xcb:-u1) 39 | (client-major :initarg :client-major :type xcb:CARD8) 40 | (client-minor :initarg :client-minor :type xcb:CARD8))) 41 | (defclass xcb:xselinux:QueryVersion~reply 42 | (xcb:-reply) 43 | ((pad~0 :initform 1 :type xcb:-pad) 44 | (~sequence :type xcb:CARD16) 45 | (length :type xcb:CARD32) 46 | (server-major :initarg :server-major :type xcb:CARD16) 47 | (server-minor :initarg :server-minor :type xcb:CARD16))) 48 | 49 | (defclass xcb:xselinux:SetDeviceCreateContext 50 | (xcb:-request) 51 | ((~opcode :initform 1 :type xcb:-u1) 52 | (context-len :initarg :context-len :type xcb:CARD32) 53 | (context~ :initform 54 | '(name context type xcb:char size 55 | (xcb:-fieldref 'context-len)) 56 | :type xcb:-list) 57 | (context :initarg :context :type xcb:-ignore))) 58 | 59 | (defclass xcb:xselinux:GetDeviceCreateContext 60 | (xcb:-request) 61 | ((~opcode :initform 2 :type xcb:-u1))) 62 | (defclass xcb:xselinux:GetDeviceCreateContext~reply 63 | (xcb:-reply) 64 | ((pad~0 :initform 1 :type xcb:-pad) 65 | (~sequence :type xcb:CARD16) 66 | (length :type xcb:CARD32) 67 | (context-len :initarg :context-len :type xcb:CARD32) 68 | (pad~1 :initform 20 :type xcb:-pad) 69 | (context~ :initform 70 | '(name context type xcb:char size 71 | (xcb:-fieldref 'context-len)) 72 | :type xcb:-list) 73 | (context :initarg :context :type xcb:-ignore))) 74 | 75 | (defclass xcb:xselinux:SetDeviceContext 76 | (xcb:-request) 77 | ((~opcode :initform 3 :type xcb:-u1) 78 | (device :initarg :device :type xcb:CARD32) 79 | (context-len :initarg :context-len :type xcb:CARD32) 80 | (context~ :initform 81 | '(name context type xcb:char size 82 | (xcb:-fieldref 'context-len)) 83 | :type xcb:-list) 84 | (context :initarg :context :type xcb:-ignore))) 85 | 86 | (defclass xcb:xselinux:GetDeviceContext 87 | (xcb:-request) 88 | ((~opcode :initform 4 :type xcb:-u1) 89 | (device :initarg :device :type xcb:CARD32))) 90 | (defclass xcb:xselinux:GetDeviceContext~reply 91 | (xcb:-reply) 92 | ((pad~0 :initform 1 :type xcb:-pad) 93 | (~sequence :type xcb:CARD16) 94 | (length :type xcb:CARD32) 95 | (context-len :initarg :context-len :type xcb:CARD32) 96 | (pad~1 :initform 20 :type xcb:-pad) 97 | (context~ :initform 98 | '(name context type xcb:char size 99 | (xcb:-fieldref 'context-len)) 100 | :type xcb:-list) 101 | (context :initarg :context :type xcb:-ignore))) 102 | 103 | (defclass xcb:xselinux:SetWindowCreateContext 104 | (xcb:-request) 105 | ((~opcode :initform 5 :type xcb:-u1) 106 | (context-len :initarg :context-len :type xcb:CARD32) 107 | (context~ :initform 108 | '(name context type xcb:char size 109 | (xcb:-fieldref 'context-len)) 110 | :type xcb:-list) 111 | (context :initarg :context :type xcb:-ignore))) 112 | 113 | (defclass xcb:xselinux:GetWindowCreateContext 114 | (xcb:-request) 115 | ((~opcode :initform 6 :type xcb:-u1))) 116 | (defclass xcb:xselinux:GetWindowCreateContext~reply 117 | (xcb:-reply) 118 | ((pad~0 :initform 1 :type xcb:-pad) 119 | (~sequence :type xcb:CARD16) 120 | (length :type xcb:CARD32) 121 | (context-len :initarg :context-len :type xcb:CARD32) 122 | (pad~1 :initform 20 :type xcb:-pad) 123 | (context~ :initform 124 | '(name context type xcb:char size 125 | (xcb:-fieldref 'context-len)) 126 | :type xcb:-list) 127 | (context :initarg :context :type xcb:-ignore))) 128 | 129 | (defclass xcb:xselinux:GetWindowContext 130 | (xcb:-request) 131 | ((~opcode :initform 7 :type xcb:-u1) 132 | (window :initarg :window :type xcb:WINDOW))) 133 | (defclass xcb:xselinux:GetWindowContext~reply 134 | (xcb:-reply) 135 | ((pad~0 :initform 1 :type xcb:-pad) 136 | (~sequence :type xcb:CARD16) 137 | (length :type xcb:CARD32) 138 | (context-len :initarg :context-len :type xcb:CARD32) 139 | (pad~1 :initform 20 :type xcb:-pad) 140 | (context~ :initform 141 | '(name context type xcb:char size 142 | (xcb:-fieldref 'context-len)) 143 | :type xcb:-list) 144 | (context :initarg :context :type xcb:-ignore))) 145 | 146 | (defclass xcb:xselinux:ListItem 147 | (xcb:-struct) 148 | ((name :initarg :name :type xcb:ATOM) 149 | (object-context-len :initarg :object-context-len :type xcb:CARD32) 150 | (data-context-len :initarg :data-context-len :type xcb:CARD32) 151 | (object-context~ :initform 152 | '(name object-context type xcb:char size 153 | (xcb:-fieldref 'object-context-len)) 154 | :type xcb:-list) 155 | (object-context :initarg :object-context :type xcb:-ignore) 156 | (pad~0 :initform 4 :type xcb:-pad-align) 157 | (data-context~ :initform 158 | '(name data-context type xcb:char size 159 | (xcb:-fieldref 'data-context-len)) 160 | :type xcb:-list) 161 | (data-context :initarg :data-context :type xcb:-ignore) 162 | (pad~1 :initform 4 :type xcb:-pad-align))) 163 | 164 | (defclass xcb:xselinux:SetPropertyCreateContext 165 | (xcb:-request) 166 | ((~opcode :initform 8 :type xcb:-u1) 167 | (context-len :initarg :context-len :type xcb:CARD32) 168 | (context~ :initform 169 | '(name context type xcb:char size 170 | (xcb:-fieldref 'context-len)) 171 | :type xcb:-list) 172 | (context :initarg :context :type xcb:-ignore))) 173 | 174 | (defclass xcb:xselinux:GetPropertyCreateContext 175 | (xcb:-request) 176 | ((~opcode :initform 9 :type xcb:-u1))) 177 | (defclass xcb:xselinux:GetPropertyCreateContext~reply 178 | (xcb:-reply) 179 | ((pad~0 :initform 1 :type xcb:-pad) 180 | (~sequence :type xcb:CARD16) 181 | (length :type xcb:CARD32) 182 | (context-len :initarg :context-len :type xcb:CARD32) 183 | (pad~1 :initform 20 :type xcb:-pad) 184 | (context~ :initform 185 | '(name context type xcb:char size 186 | (xcb:-fieldref 'context-len)) 187 | :type xcb:-list) 188 | (context :initarg :context :type xcb:-ignore))) 189 | 190 | (defclass xcb:xselinux:SetPropertyUseContext 191 | (xcb:-request) 192 | ((~opcode :initform 10 :type xcb:-u1) 193 | (context-len :initarg :context-len :type xcb:CARD32) 194 | (context~ :initform 195 | '(name context type xcb:char size 196 | (xcb:-fieldref 'context-len)) 197 | :type xcb:-list) 198 | (context :initarg :context :type xcb:-ignore))) 199 | 200 | (defclass xcb:xselinux:GetPropertyUseContext 201 | (xcb:-request) 202 | ((~opcode :initform 11 :type xcb:-u1))) 203 | (defclass xcb:xselinux:GetPropertyUseContext~reply 204 | (xcb:-reply) 205 | ((pad~0 :initform 1 :type xcb:-pad) 206 | (~sequence :type xcb:CARD16) 207 | (length :type xcb:CARD32) 208 | (context-len :initarg :context-len :type xcb:CARD32) 209 | (pad~1 :initform 20 :type xcb:-pad) 210 | (context~ :initform 211 | '(name context type xcb:char size 212 | (xcb:-fieldref 'context-len)) 213 | :type xcb:-list) 214 | (context :initarg :context :type xcb:-ignore))) 215 | 216 | (defclass xcb:xselinux:GetPropertyContext 217 | (xcb:-request) 218 | ((~opcode :initform 12 :type xcb:-u1) 219 | (window :initarg :window :type xcb:WINDOW) 220 | (property :initarg :property :type xcb:ATOM))) 221 | (defclass xcb:xselinux:GetPropertyContext~reply 222 | (xcb:-reply) 223 | ((pad~0 :initform 1 :type xcb:-pad) 224 | (~sequence :type xcb:CARD16) 225 | (length :type xcb:CARD32) 226 | (context-len :initarg :context-len :type xcb:CARD32) 227 | (pad~1 :initform 20 :type xcb:-pad) 228 | (context~ :initform 229 | '(name context type xcb:char size 230 | (xcb:-fieldref 'context-len)) 231 | :type xcb:-list) 232 | (context :initarg :context :type xcb:-ignore))) 233 | 234 | (defclass xcb:xselinux:GetPropertyDataContext 235 | (xcb:-request) 236 | ((~opcode :initform 13 :type xcb:-u1) 237 | (window :initarg :window :type xcb:WINDOW) 238 | (property :initarg :property :type xcb:ATOM))) 239 | (defclass xcb:xselinux:GetPropertyDataContext~reply 240 | (xcb:-reply) 241 | ((pad~0 :initform 1 :type xcb:-pad) 242 | (~sequence :type xcb:CARD16) 243 | (length :type xcb:CARD32) 244 | (context-len :initarg :context-len :type xcb:CARD32) 245 | (pad~1 :initform 20 :type xcb:-pad) 246 | (context~ :initform 247 | '(name context type xcb:char size 248 | (xcb:-fieldref 'context-len)) 249 | :type xcb:-list) 250 | (context :initarg :context :type xcb:-ignore))) 251 | 252 | (defclass xcb:xselinux:ListProperties 253 | (xcb:-request) 254 | ((~opcode :initform 14 :type xcb:-u1) 255 | (window :initarg :window :type xcb:WINDOW))) 256 | (defclass xcb:xselinux:ListProperties~reply 257 | (xcb:-reply) 258 | ((pad~0 :initform 1 :type xcb:-pad) 259 | (~sequence :type xcb:CARD16) 260 | (length :type xcb:CARD32) 261 | (properties-len :initarg :properties-len :type xcb:CARD32) 262 | (pad~1 :initform 20 :type xcb:-pad) 263 | (properties~ :initform 264 | '(name properties type xcb:xselinux:ListItem size 265 | (xcb:-fieldref 'properties-len)) 266 | :type xcb:-list) 267 | (properties :initarg :properties :type xcb:-ignore))) 268 | 269 | (defclass xcb:xselinux:SetSelectionCreateContext 270 | (xcb:-request) 271 | ((~opcode :initform 15 :type xcb:-u1) 272 | (context-len :initarg :context-len :type xcb:CARD32) 273 | (context~ :initform 274 | '(name context type xcb:char size 275 | (xcb:-fieldref 'context-len)) 276 | :type xcb:-list) 277 | (context :initarg :context :type xcb:-ignore))) 278 | 279 | (defclass xcb:xselinux:GetSelectionCreateContext 280 | (xcb:-request) 281 | ((~opcode :initform 16 :type xcb:-u1))) 282 | (defclass xcb:xselinux:GetSelectionCreateContext~reply 283 | (xcb:-reply) 284 | ((pad~0 :initform 1 :type xcb:-pad) 285 | (~sequence :type xcb:CARD16) 286 | (length :type xcb:CARD32) 287 | (context-len :initarg :context-len :type xcb:CARD32) 288 | (pad~1 :initform 20 :type xcb:-pad) 289 | (context~ :initform 290 | '(name context type xcb:char size 291 | (xcb:-fieldref 'context-len)) 292 | :type xcb:-list) 293 | (context :initarg :context :type xcb:-ignore))) 294 | 295 | (defclass xcb:xselinux:SetSelectionUseContext 296 | (xcb:-request) 297 | ((~opcode :initform 17 :type xcb:-u1) 298 | (context-len :initarg :context-len :type xcb:CARD32) 299 | (context~ :initform 300 | '(name context type xcb:char size 301 | (xcb:-fieldref 'context-len)) 302 | :type xcb:-list) 303 | (context :initarg :context :type xcb:-ignore))) 304 | 305 | (defclass xcb:xselinux:GetSelectionUseContext 306 | (xcb:-request) 307 | ((~opcode :initform 18 :type xcb:-u1))) 308 | (defclass xcb:xselinux:GetSelectionUseContext~reply 309 | (xcb:-reply) 310 | ((pad~0 :initform 1 :type xcb:-pad) 311 | (~sequence :type xcb:CARD16) 312 | (length :type xcb:CARD32) 313 | (context-len :initarg :context-len :type xcb:CARD32) 314 | (pad~1 :initform 20 :type xcb:-pad) 315 | (context~ :initform 316 | '(name context type xcb:char size 317 | (xcb:-fieldref 'context-len)) 318 | :type xcb:-list) 319 | (context :initarg :context :type xcb:-ignore))) 320 | 321 | (defclass xcb:xselinux:GetSelectionContext 322 | (xcb:-request) 323 | ((~opcode :initform 19 :type xcb:-u1) 324 | (selection :initarg :selection :type xcb:ATOM))) 325 | (defclass xcb:xselinux:GetSelectionContext~reply 326 | (xcb:-reply) 327 | ((pad~0 :initform 1 :type xcb:-pad) 328 | (~sequence :type xcb:CARD16) 329 | (length :type xcb:CARD32) 330 | (context-len :initarg :context-len :type xcb:CARD32) 331 | (pad~1 :initform 20 :type xcb:-pad) 332 | (context~ :initform 333 | '(name context type xcb:char size 334 | (xcb:-fieldref 'context-len)) 335 | :type xcb:-list) 336 | (context :initarg :context :type xcb:-ignore))) 337 | 338 | (defclass xcb:xselinux:GetSelectionDataContext 339 | (xcb:-request) 340 | ((~opcode :initform 20 :type xcb:-u1) 341 | (selection :initarg :selection :type xcb:ATOM))) 342 | (defclass xcb:xselinux:GetSelectionDataContext~reply 343 | (xcb:-reply) 344 | ((pad~0 :initform 1 :type xcb:-pad) 345 | (~sequence :type xcb:CARD16) 346 | (length :type xcb:CARD32) 347 | (context-len :initarg :context-len :type xcb:CARD32) 348 | (pad~1 :initform 20 :type xcb:-pad) 349 | (context~ :initform 350 | '(name context type xcb:char size 351 | (xcb:-fieldref 'context-len)) 352 | :type xcb:-list) 353 | (context :initarg :context :type xcb:-ignore))) 354 | 355 | (defclass xcb:xselinux:ListSelections 356 | (xcb:-request) 357 | ((~opcode :initform 21 :type xcb:-u1))) 358 | (defclass xcb:xselinux:ListSelections~reply 359 | (xcb:-reply) 360 | ((pad~0 :initform 1 :type xcb:-pad) 361 | (~sequence :type xcb:CARD16) 362 | (length :type xcb:CARD32) 363 | (selections-len :initarg :selections-len :type xcb:CARD32) 364 | (pad~1 :initform 20 :type xcb:-pad) 365 | (selections~ :initform 366 | '(name selections type xcb:xselinux:ListItem size 367 | (xcb:-fieldref 'selections-len)) 368 | :type xcb:-list) 369 | (selections :initarg :selections :type xcb:-ignore))) 370 | 371 | (defclass xcb:xselinux:GetClientContext 372 | (xcb:-request) 373 | ((~opcode :initform 22 :type xcb:-u1) 374 | (resource :initarg :resource :type xcb:CARD32))) 375 | (defclass xcb:xselinux:GetClientContext~reply 376 | (xcb:-reply) 377 | ((pad~0 :initform 1 :type xcb:-pad) 378 | (~sequence :type xcb:CARD16) 379 | (length :type xcb:CARD32) 380 | (context-len :initarg :context-len :type xcb:CARD32) 381 | (pad~1 :initform 20 :type xcb:-pad) 382 | (context~ :initform 383 | '(name context type xcb:char size 384 | (xcb:-fieldref 'context-len)) 385 | :type xcb:-list) 386 | (context :initarg :context :type xcb:-ignore))) 387 | 388 | 389 | 390 | (provide 'xcb-xselinux) 391 | 392 | ;;; xcb-xselinux.el ends here 393 | -------------------------------------------------------------------------------- /xcb-xtest.el: -------------------------------------------------------------------------------- 1 | ;;; xcb-xtest.el --- X11 Test extension -*- lexical-binding: t -*- 2 | 3 | ;; Copyright (C) 2015-2019 Free Software Foundation, Inc. 4 | 5 | ;; This file is part of GNU Emacs. 6 | 7 | ;; GNU Emacs is free software: you can redistribute it and/or modify 8 | ;; it under the terms of the GNU General Public License as published by 9 | ;; the Free Software Foundation, either version 3 of the License, or 10 | ;; (at your option) any later version. 11 | 12 | ;; GNU Emacs is distributed in the hope that it will be useful, 13 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | ;; GNU General Public License for more details. 16 | 17 | ;; You should have received a copy of the GNU General Public License 18 | ;; along with GNU Emacs. If not, see . 19 | 20 | ;;; Commentary: 21 | 22 | ;; This file was generated by 'el_client.el' from 'xtest.xml', 23 | ;; which you can retrieve from . 24 | 25 | ;;; Code: 26 | 27 | (require 'xcb-types) 28 | 29 | (defconst xcb:xtest:-extension-xname "XTEST") 30 | (defconst xcb:xtest:-extension-name "Test") 31 | (defconst xcb:xtest:-major-version 2) 32 | (defconst xcb:xtest:-minor-version 2) 33 | 34 | (require 'xcb-xproto) 35 | 36 | (defclass xcb:xtest:GetVersion 37 | (xcb:-request) 38 | ((~opcode :initform 0 :type xcb:-u1) 39 | (major-version :initarg :major-version :type xcb:CARD8) 40 | (pad~0 :initform 1 :type xcb:-pad) 41 | (minor-version :initarg :minor-version :type xcb:CARD16))) 42 | (defclass xcb:xtest:GetVersion~reply 43 | (xcb:-reply) 44 | ((major-version :initarg :major-version :type xcb:CARD8) 45 | (~sequence :type xcb:CARD16) 46 | (length :type xcb:CARD32) 47 | (minor-version :initarg :minor-version :type xcb:CARD16))) 48 | 49 | (defconst xcb:xtest:Cursor:None 0) 50 | (defconst xcb:xtest:Cursor:Current 1) 51 | 52 | (defclass xcb:xtest:CompareCursor 53 | (xcb:-request) 54 | ((~opcode :initform 1 :type xcb:-u1) 55 | (window :initarg :window :type xcb:WINDOW) 56 | (cursor :initarg :cursor :type xcb:CURSOR))) 57 | (defclass xcb:xtest:CompareCursor~reply 58 | (xcb:-reply) 59 | ((same :initarg :same :type xcb:BOOL) 60 | (~sequence :type xcb:CARD16) 61 | (length :type xcb:CARD32))) 62 | 63 | (defclass xcb:xtest:FakeInput 64 | (xcb:-request) 65 | ((~opcode :initform 2 :type xcb:-u1) 66 | (type :initarg :type :type xcb:BYTE) 67 | (detail :initarg :detail :type xcb:BYTE) 68 | (pad~0 :initform 2 :type xcb:-pad) 69 | (time :initarg :time :type xcb:CARD32) 70 | (root :initarg :root :type xcb:WINDOW) 71 | (pad~1 :initform 8 :type xcb:-pad) 72 | (rootX :initarg :rootX :type xcb:INT16) 73 | (rootY :initarg :rootY :type xcb:INT16) 74 | (pad~2 :initform 7 :type xcb:-pad) 75 | (deviceid :initarg :deviceid :type xcb:CARD8))) 76 | 77 | (defclass xcb:xtest:GrabControl 78 | (xcb:-request) 79 | ((~opcode :initform 3 :type xcb:-u1) 80 | (impervious :initarg :impervious :type xcb:BOOL) 81 | (pad~0 :initform 3 :type xcb:-pad))) 82 | 83 | 84 | 85 | (provide 'xcb-xtest) 86 | 87 | ;;; xcb-xtest.el ends here 88 | -------------------------------------------------------------------------------- /xcb-xvmc.el: -------------------------------------------------------------------------------- 1 | ;;; xcb-xvmc.el --- X11 XvMC extension -*- lexical-binding: t -*- 2 | 3 | ;; Copyright (C) 2015-2019 Free Software Foundation, Inc. 4 | 5 | ;; This file is part of GNU Emacs. 6 | 7 | ;; GNU Emacs is free software: you can redistribute it and/or modify 8 | ;; it under the terms of the GNU General Public License as published by 9 | ;; the Free Software Foundation, either version 3 of the License, or 10 | ;; (at your option) any later version. 11 | 12 | ;; GNU Emacs is distributed in the hope that it will be useful, 13 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | ;; GNU General Public License for more details. 16 | 17 | ;; You should have received a copy of the GNU General Public License 18 | ;; along with GNU Emacs. If not, see . 19 | 20 | ;;; Commentary: 21 | 22 | ;; This file was generated by 'el_client.el' from 'xvmc.xml', 23 | ;; which you can retrieve from . 24 | 25 | ;;; Code: 26 | 27 | (require 'xcb-types) 28 | 29 | (defconst xcb:xvmc:-extension-xname "XVideo-MotionCompensation") 30 | (defconst xcb:xvmc:-extension-name "XvMC") 31 | (defconst xcb:xvmc:-major-version 1) 32 | (defconst xcb:xvmc:-minor-version 1) 33 | 34 | (require 'xcb-xv) 35 | 36 | (xcb:deftypealias 'xcb:xvmc:CONTEXT 'xcb:-u4) 37 | 38 | (xcb:deftypealias 'xcb:xvmc:SURFACE 'xcb:-u4) 39 | 40 | (xcb:deftypealias 'xcb:xvmc:SUBPICTURE 'xcb:-u4) 41 | 42 | (defclass xcb:xvmc:SurfaceInfo 43 | (xcb:-struct) 44 | ((id :initarg :id :type xcb:xvmc:SURFACE) 45 | (chroma-format :initarg :chroma-format :type xcb:CARD16) 46 | (pad0 :initarg :pad0 :type xcb:CARD16) 47 | (max-width :initarg :max-width :type xcb:CARD16) 48 | (max-height :initarg :max-height :type xcb:CARD16) 49 | (subpicture-max-width :initarg :subpicture-max-width :type xcb:CARD16) 50 | (subpicture-max-height :initarg :subpicture-max-height :type xcb:CARD16) 51 | (mc-type :initarg :mc-type :type xcb:CARD32) 52 | (flags :initarg :flags :type xcb:CARD32))) 53 | 54 | (defclass xcb:xvmc:QueryVersion 55 | (xcb:-request) 56 | ((~opcode :initform 0 :type xcb:-u1))) 57 | (defclass xcb:xvmc:QueryVersion~reply 58 | (xcb:-reply) 59 | ((pad~0 :initform 1 :type xcb:-pad) 60 | (~sequence :type xcb:CARD16) 61 | (length :type xcb:CARD32) 62 | (major :initarg :major :type xcb:CARD32) 63 | (minor :initarg :minor :type xcb:CARD32))) 64 | 65 | (defclass xcb:xvmc:ListSurfaceTypes 66 | (xcb:-request) 67 | ((~opcode :initform 1 :type xcb:-u1) 68 | (port-id :initarg :port-id :type xcb:xv:PORT))) 69 | (defclass xcb:xvmc:ListSurfaceTypes~reply 70 | (xcb:-reply) 71 | ((pad~0 :initform 1 :type xcb:-pad) 72 | (~sequence :type xcb:CARD16) 73 | (length :type xcb:CARD32) 74 | (num :initarg :num :type xcb:CARD32) 75 | (pad~1 :initform 20 :type xcb:-pad) 76 | (surfaces~ :initform 77 | '(name surfaces type xcb:xvmc:SurfaceInfo size 78 | (xcb:-fieldref 'num)) 79 | :type xcb:-list) 80 | (surfaces :initarg :surfaces :type xcb:-ignore))) 81 | 82 | (defclass xcb:xvmc:CreateContext 83 | (xcb:-request) 84 | ((~opcode :initform 2 :type xcb:-u1) 85 | (context-id :initarg :context-id :type xcb:xvmc:CONTEXT) 86 | (port-id :initarg :port-id :type xcb:xv:PORT) 87 | (surface-id :initarg :surface-id :type xcb:xvmc:SURFACE) 88 | (width :initarg :width :type xcb:CARD16) 89 | (height :initarg :height :type xcb:CARD16) 90 | (flags :initarg :flags :type xcb:CARD32))) 91 | (defclass xcb:xvmc:CreateContext~reply 92 | (xcb:-reply) 93 | ((pad~0 :initform 1 :type xcb:-pad) 94 | (~sequence :type xcb:CARD16) 95 | (length :type xcb:CARD32) 96 | (width-actual :initarg :width-actual :type xcb:CARD16) 97 | (height-actual :initarg :height-actual :type xcb:CARD16) 98 | (flags-return :initarg :flags-return :type xcb:CARD32) 99 | (pad~1 :initform 20 :type xcb:-pad) 100 | (priv-data~ :initform 101 | '(name priv-data type xcb:CARD32 size 102 | (xcb:-fieldref 'length)) 103 | :type xcb:-list) 104 | (priv-data :initarg :priv-data :type xcb:-ignore))) 105 | 106 | (defclass xcb:xvmc:DestroyContext 107 | (xcb:-request) 108 | ((~opcode :initform 3 :type xcb:-u1) 109 | (context-id :initarg :context-id :type xcb:xvmc:CONTEXT))) 110 | 111 | (defclass xcb:xvmc:CreateSurface 112 | (xcb:-request) 113 | ((~opcode :initform 4 :type xcb:-u1) 114 | (surface-id :initarg :surface-id :type xcb:xvmc:SURFACE) 115 | (context-id :initarg :context-id :type xcb:xvmc:CONTEXT))) 116 | (defclass xcb:xvmc:CreateSurface~reply 117 | (xcb:-reply) 118 | ((pad~0 :initform 1 :type xcb:-pad) 119 | (~sequence :type xcb:CARD16) 120 | (length :type xcb:CARD32) 121 | (pad~1 :initform 24 :type xcb:-pad) 122 | (priv-data~ :initform 123 | '(name priv-data type xcb:CARD32 size 124 | (xcb:-fieldref 'length)) 125 | :type xcb:-list) 126 | (priv-data :initarg :priv-data :type xcb:-ignore))) 127 | 128 | (defclass xcb:xvmc:DestroySurface 129 | (xcb:-request) 130 | ((~opcode :initform 5 :type xcb:-u1) 131 | (surface-id :initarg :surface-id :type xcb:xvmc:SURFACE))) 132 | 133 | (defclass xcb:xvmc:CreateSubpicture 134 | (xcb:-request) 135 | ((~opcode :initform 6 :type xcb:-u1) 136 | (subpicture-id :initarg :subpicture-id :type xcb:xvmc:SUBPICTURE) 137 | (context :initarg :context :type xcb:xvmc:CONTEXT) 138 | (xvimage-id :initarg :xvimage-id :type xcb:CARD32) 139 | (width :initarg :width :type xcb:CARD16) 140 | (height :initarg :height :type xcb:CARD16))) 141 | (defclass xcb:xvmc:CreateSubpicture~reply 142 | (xcb:-reply) 143 | ((pad~0 :initform 1 :type xcb:-pad) 144 | (~sequence :type xcb:CARD16) 145 | (length :type xcb:CARD32) 146 | (width-actual :initarg :width-actual :type xcb:CARD16) 147 | (height-actual :initarg :height-actual :type xcb:CARD16) 148 | (num-palette-entries :initarg :num-palette-entries :type xcb:CARD16) 149 | (entry-bytes :initarg :entry-bytes :type xcb:CARD16) 150 | (component-order~ :initform 151 | '(name component-order type xcb:CARD8 size 4) 152 | :type xcb:-list) 153 | (component-order :initarg :component-order :type xcb:-ignore) 154 | (pad~1 :initform 12 :type xcb:-pad) 155 | (priv-data~ :initform 156 | '(name priv-data type xcb:CARD32 size 157 | (xcb:-fieldref 'length)) 158 | :type xcb:-list) 159 | (priv-data :initarg :priv-data :type xcb:-ignore))) 160 | 161 | (defclass xcb:xvmc:DestroySubpicture 162 | (xcb:-request) 163 | ((~opcode :initform 7 :type xcb:-u1) 164 | (subpicture-id :initarg :subpicture-id :type xcb:xvmc:SUBPICTURE))) 165 | 166 | (defclass xcb:xvmc:ListSubpictureTypes 167 | (xcb:-request) 168 | ((~opcode :initform 8 :type xcb:-u1) 169 | (port-id :initarg :port-id :type xcb:xv:PORT) 170 | (surface-id :initarg :surface-id :type xcb:xvmc:SURFACE))) 171 | (defclass xcb:xvmc:ListSubpictureTypes~reply 172 | (xcb:-reply) 173 | ((pad~0 :initform 1 :type xcb:-pad) 174 | (~sequence :type xcb:CARD16) 175 | (length :type xcb:CARD32) 176 | (num :initarg :num :type xcb:CARD32) 177 | (pad~1 :initform 20 :type xcb:-pad) 178 | (types~ :initform 179 | '(name types type xcb:xv:ImageFormatInfo size 180 | (xcb:-fieldref 'num)) 181 | :type xcb:-list) 182 | (types :initarg :types :type xcb:-ignore))) 183 | 184 | 185 | 186 | (provide 'xcb-xvmc) 187 | 188 | ;;; xcb-xvmc.el ends here 189 | -------------------------------------------------------------------------------- /xelb.el: -------------------------------------------------------------------------------- 1 | ;;; xelb.el --- X protocol Emacs Lisp Binding -*- lexical-binding: t -*- 2 | 3 | ;; Copyright (C) 2015-2019 Free Software Foundation, Inc. 4 | 5 | ;; Author: Chris Feng 6 | ;; Maintainer: Chris Feng 7 | ;; Version: 0.18 8 | ;; Package-Requires: ((emacs "24.4") (cl-generic "0.2")) 9 | ;; Keywords: unix 10 | ;; URL: https://github.com/ch11ng/xelb 11 | 12 | ;; This file is part of GNU Emacs. 13 | 14 | ;; GNU Emacs is free software: you can redistribute it and/or modify 15 | ;; it under the terms of the GNU General Public License as published by 16 | ;; the Free Software Foundation, either version 3 of the License, or 17 | ;; (at your option) any later version. 18 | 19 | ;; GNU Emacs is distributed in the hope that it will be useful, 20 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 | ;; GNU General Public License for more details. 23 | 24 | ;; You should have received a copy of the GNU General Public License 25 | ;; along with GNU Emacs. If not, see . 26 | 27 | ;;; Commentary: 28 | 29 | ;; Overview 30 | ;; -------- 31 | ;; XELB (X protocol Emacs Lisp Binding) is a pure Elisp implementation of X11 32 | ;; protocol based on the XML description files from XCB project. It features 33 | ;; an object-oriented API and permits a certain degree of concurrency. It 34 | ;; should enable you to implement some low-level X11 applications. 35 | 36 | ;; How it works 37 | ;; ------------ 38 | ;; As is well known, X11 is a network-transparent protocol. All its messages, 39 | ;; including requests, replies, events, errors, etc are transported over 40 | ;; network. Considering that Emacs is powerful enough to do network 41 | ;; communication, it is also possible to use Emacs to send / receive those X11 42 | ;; messages. Here we fully exploit the asynchronous feature of network 43 | ;; connections in Emacs, making XELB concurrent in a sense. 44 | 45 | ;; X11 protocol is somewhat complicated, especially when extension protocols 46 | ;; are also concerned. Fortunately, XCB project has managed to describe these 47 | ;; protocols as XML files, which are language-neutral and can be used to 48 | ;; generate language-specific bindings. In XELB, X messages are represented as 49 | ;; 'classes', and their 'methodes' are provided to translate them to / from raw 50 | ;; byte arrays conveniently. 51 | 52 | ;; Usage 53 | ;; ----- 54 | ;; Interfaces are mainly defined in 'xcb.el'. Please refer to that file on how 55 | ;; to use them. Most of other files are either X11 core / extension protocol 56 | ;; libraries (e.g. xcb-randr.el) or utility libraries (e.g. xcb-keysyms.el). 57 | ;; Please check the corresponding files for more details. 58 | 59 | ;;; Code: 60 | 61 | (require 'xcb) 62 | 63 | ;; DO NOT load this library; load 'xcb.el' instead. 64 | ;; This dummy file is created as a placeholder as it is required by GNU ELPA. 65 | 66 | 67 | 68 | (provide 'xelb) 69 | 70 | ;;; xelb.el ends here 71 | --------------------------------------------------------------------------------