|
| 1 | +;;; xcb-xsettings.el --- XSETTINGS protocol -*- lexical-binding: t -*- |
| 2 | + |
| 3 | +;; Copyright (C) 2024 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 <http://www.gnu.org/licenses/>. |
| 19 | + |
| 20 | +;;; Commentary: |
| 21 | + |
| 22 | +;; This file is written by hand. If possible we should auto-generate it |
| 23 | +;; from an XML protocol specification. The XSETTINGS protocol is |
| 24 | +;; specified at: https://specifications.freedesktop.org/xsettings-spec/ |
| 25 | + |
| 26 | +;;; Code: |
| 27 | + |
| 28 | +(require 'xcb-types) |
| 29 | +(require 'xcb-icccm) |
| 30 | + |
| 31 | +(defconst xcb:xsettings:-Type:Integer 0) |
| 32 | +(defconst xcb:xsettings:-Type:String 1) |
| 33 | +(defconst xcb:xsettings:-Type:Color 2) |
| 34 | + |
| 35 | +(defclass xcb:xsettings:-Settings |
| 36 | + (xcb:-struct) |
| 37 | + ((byte-order :initarg :byte-order :type xcb:CARD8) |
| 38 | + (pad~0 :initform 3 :type xcb:-pad) |
| 39 | + (serial :initarg :serial :type xcb:CARD32) |
| 40 | + (settings-len :initarg :settings-len :type xcb:CARD32) |
| 41 | + (settings~ :initform |
| 42 | + '(name settings type xcb:xsettings:-SETTING size |
| 43 | + (xcb:-fieldref 'settings-len)) |
| 44 | + :type xcb:-list) |
| 45 | + (settings :initarg :settings :type xcb:-ignore))) |
| 46 | + |
| 47 | +(defclass xcb:xsettings:-SETTING |
| 48 | + (xcb:-struct) |
| 49 | + ((type :initarg :type :type xcb:CARD8) |
| 50 | + (pad~0 :initform 1 :type xcb:-pad) |
| 51 | + (name-len :initarg :name-len :type xcb:CARD16) |
| 52 | + (name~ :initform |
| 53 | + '(name name type xcb:char size |
| 54 | + (xcb:-fieldref 'name-len)) |
| 55 | + :type xcb:-list) |
| 56 | + (name :initarg :name :type xcb:-ignore) |
| 57 | + (pad~1 :initform 4 :type xcb:-pad-align) |
| 58 | + (last-change-serial :initarg :last-change-serial :type xcb:CARD32))) |
| 59 | + |
| 60 | +(defclass xcb:xsettings:-SETTING_INTEGER |
| 61 | + (xcb:xsettings:-SETTING) |
| 62 | + ((type :initform 'xcb:xsettings:-Type:Integer) |
| 63 | + (value :initarg :value :type xcb:INT32))) |
| 64 | + |
| 65 | +(defclass xcb:xsettings:-SETTING_STRING |
| 66 | + (xcb:xsettings:-SETTING) |
| 67 | + ((type :initform 'xcb:xsettings:-Type:String) |
| 68 | + (value-len :initarg :value-len :type xcb:CARD32) |
| 69 | + (value~ :initform |
| 70 | + '(name value type xcb:char size |
| 71 | + (xcb:-fieldref 'value-len)) |
| 72 | + :type xcb:-list) |
| 73 | + (value :initarg :value :type xcb:-ignore) |
| 74 | + (pad~2 :initform 4 :type xcb:-pad-align))) |
| 75 | + |
| 76 | +(defclass xcb:xsettings:-SETTING_COLOR |
| 77 | + (xcb:xsettings:-SETTING) |
| 78 | + ((type :initform 'xcb:xsettings:-Type:Color) |
| 79 | + (red :initarg :red :type xcb:CARD16) |
| 80 | + (green :initarg :green :type xcb:CARD16) |
| 81 | + (blue :initarg :blue :type xcb:CARD16) |
| 82 | + (alpha :initarg :alpha :initform #xffff :type xcb:CARD16))) |
| 83 | + |
| 84 | +(defclass xcb:xsettings:-ClientMessage |
| 85 | + (xcb:icccm:--ClientMessage xcb:ClientMessage) |
| 86 | + ((format :initform 32) |
| 87 | + (type :initform 'xcb:Atom:MANAGER) |
| 88 | + (time :initarg :time :type xcb:TIMESTAMP) ;new slot |
| 89 | + (selection :initarg :selection :type xcb:ATOM) ;new slot |
| 90 | + (owner :initarg :owner :type xcb:WINDOW)) ;new slot |
| 91 | + :documentation "An XSETTINGS client message.") |
| 92 | + |
| 93 | + |
| 94 | + |
| 95 | +(provide 'xcb-xsettings) |
| 96 | + |
| 97 | +;;; xcb-xsettings.el ends here |
0 commit comments