Tizen 2.1 base
[framework/uifw/xorg/lib/libx11.git] / man / xkb / XkbAddGeomShape.man
1 .\" Copyright 1999 Oracle and/or its affiliates. All rights reserved.
2 .\"
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:
9 .\"
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
12 .\" Software.
13 .\"
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.
21 .\"
22 .TH XkbAddGeomShape __libmansuffix__ __xorgversion__ "XKB FUNCTIONS"
23 .SH NAME
24 XkbAddGeomShape \- Add a shape to a keyboard geometry
25 .SH SYNOPSIS
26 .HP
27 .B XkbShapePtr XkbAddGeomShape
28 .BI "(\^XkbGeometryPtr " "geom" "\^,"
29 .BI "Atom " "name" "\^,"
30 .BI "int " "sz_outlines" "\^);"
31 .if n .ti +5n
32 .if t .ti +.5i
33 .SH ARGUMENTS
34 .TP
35 .I \- geom
36 geometry to be updated
37 .TP
38 .I \- name
39 name of the new shape
40 .TP
41 .I \- sz_outlines
42 number of outlines to be reserved
43 .SH DESCRIPTION
44 .LP
45 Xkb provides functions to add a single new element to the top-level keyboard geometry. In each case the 
46 .I num_ * 
47 fields of the corresponding structure is incremented by 1. These functions do not change 
48 .I sz_* 
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.
51
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 
56 geometry properties.
57
58 A geometry contains an arbitrary number of shapes, each of which is made up of an arbitrary number of outlines.
59 .I XkbAddGeomShape 
60 adds a shape to a geometry 
61 .I geom 
62 by allocating space for 
63 .I sz_outlines 
64 outlines for it and giving it the name specified by 
65 .I name. 
66 If a shape with name 
67 .I name 
68 already exists in the geometry, a pointer to the existing shape is returned. 
69 .I XkbAddGeomShape 
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.
73 .SH STRUCTURES
74 .LP
75 .nf
76
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;
86     
87 .fi
88 .SH "SEE ALSO"
89 .BR XkbAllocGeomShapes (__libmansuffix__)