1 .\" Copyright 1999 Oracle and/or its affiliates. All rights reserved.
3 .\" Permission is hereby granted, free of charge, to any person obtaining a
4 .\" copy of this software and associated documentation files (the "Software"),
5 .\" to deal in the Software without restriction, including without limitation
6 .\" the rights to use, copy, modify, merge, publish, distribute, sublicense,
7 .\" and/or sell copies of the Software, and to permit persons to whom the
8 .\" Software is furnished to do so, subject to the following conditions:
10 .\" The above copyright notice and this permission notice (including the next
11 .\" paragraph) shall be included in all copies or substantial portions of the
14 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 .\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 .\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 .\" THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 .\" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 .\" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 .\" DEALINGS IN THE SOFTWARE.
22 .TH XkbAddGeomShape __libmansuffix__ __xorgversion__ "XKB FUNCTIONS"
24 XkbAddGeomShape \- Add a shape to a keyboard geometry
27 .B XkbShapePtr XkbAddGeomShape
28 .BI "(\^XkbGeometryPtr " "geom" "\^,"
29 .BI "Atom " "name" "\^,"
30 .BI "int " "sz_outlines" "\^);"
36 geometry to be updated
42 number of outlines to be reserved
45 Xkb provides functions to add a single new element to the top-level keyboard geometry. In each case the
47 fields of the corresponding structure is incremented by 1. These functions do not change
49 unless there is no more room in the array. Some of these functions fill in the values of the element's structure from the
50 arguments. For other functions, you must explicitly write code to fill the structure's elements.
52 The top-level geometry description includes a list of
53 .I geometry properties.
54 A geometry property associates an arbitrary string with an equally arbitrary name. Programs that display images of
55 keyboards can use geometry properties as hints, but they are not interpreted by Xkb. No other geometry structures refer to
58 A geometry contains an arbitrary number of shapes, each of which is made up of an arbitrary number of outlines.
60 adds a shape to a geometry
62 by allocating space for
64 outlines for it and giving it the name specified by
68 already exists in the geometry, a pointer to the existing shape is returned.
70 returns NULL if any of the parameters is empty or if it was not able to allocate space. To allocate space for an arbitrary
71 number of geometry shapes, use
72 .I XkbAllocGeomShapes.
77 typedef struct _XkbShape {
78 Atom name; /\(** shape's name */
79 unsigned short num_outlines; /\(** number of outlines for the shape */
80 unsigned short sz_outlines; /\(** size of the outlines array */
81 XkbOutlinePtr outlines; /\(** array of outlines for the shape */
82 XkbOutlinePtr approx; /\(** pointer into the array to the approximating outline */
83 XkbOutlinePtr primary; /\(** pointer into the array to the primary outline */
84 XkbBoundsRec bounds; /\(** bounding box for the shape; encompasses all outlines */
85 } XkbShapeRec, *XkbShapePtr;
89 .BR XkbAllocGeomShapes (__libmansuffix__)