[PATCH 3/6] xkb: Add XKM file format description.

Fernando Carrijo fcarrijo at yahoo.com.br
Thu Jan 14 18:47:06 PST 2010


Hi Peter,

Peter Hutterer <peter.hutterer at who-t.net> wrote:

> +1. Introduction
> +
> +The XKM file format is the exchange format for XKB keyboard descriptions
> +between the server and xkbcomp. Usually, the server forks off xkbcomp,
> +xkbcomp compiles the XKM format from the given parameters.
> +The resulting XKM file is put into a directory readable by the server and
> +then parsed.
> +
> +The XKM format is little more than a binary dump of various XKB-specific
> +structures and hence tied to the ABI of the server.
> +
> +                              ❧❧❧❧❧❧❧❧❧❧❧
> +
> +1.1 About this file format description
> +
> +This description was produced by analyzing the XKM parsing code. Parts fo

s/fo/of/

> +2. Notations used in this document
> +
> +Notation for structures:
> +
> +┌───
> +  Name of struct
> +	name of field:		type or fixed value of field
> +	name of field:		type or fixed value of field
> +└───
> +
> +Data types are identicial to those used in the X Protocol specification

s/identicial/identical/

> +3. XKM Format
> +
> +The XKM format is a binary format with structs usually being padded to a
> +multiple of 4 bytes. No provisions for endianess are provided, the parser is
> +left to guess the endianess of the XKM file.
> +
> +                              ❧❧❧❧❧❧❧❧❧❧❧
> +3.1 Common data types
> +
> +┌───
> +  XKMCountedString
> +	count:			CARD16
> +	string:			count * CHAR
> +	pad:			pad(count + 2)
> +└───
> +
> +XKMCountedString is used for user-readable identifiers. Prime example are
> +the level names and the section names ("complete", "evdev(inet)", etc.)
> +
> +┌───
> +  XKMGroupBits:		CARD8
> +	group1			0x1
> +	group2			0x2
> +	group3			0x4
> +	group4			0x8
> +└───
> +
> +                              ❧❧❧❧❧❧❧❧❧❧❧
> +
> +3.1 Header and Table of Contents

s/3.1/3.2/



More information about the xorg-devel mailing list