Tizen 2.1 base
[framework/uifw/xorg/lib/libx11.git] / man / xkb / XkbAddGeomColor.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 XkbAddGeomColor __libmansuffix__ __xorgversion__ "XKB FUNCTIONS"
23 .SH NAME
24 XkbAddGeomColor \-  Add one color name to an existing keyboard geometry 
25 description
26 .SH SYNOPSIS
27 .HP
28 .B XkbColorPtr XkbAddGeomColor
29 .BI "(\^XkbGeometryPtr " "geom" "\^,"
30 .BI "char *" "spec" "\^,"
31 .BI "unsigned int " "pixel" "\^);"
32 .if n .ti +5n
33 .if t .ti +.5i
34 .SH ARGUMENTS
35 .TP
36 .I \- geom
37 geometry to be updated
38 .TP
39 .I \- spec
40 color to be added
41 .TP
42 .I \- pixel
43 color to be added
44 .SH DESCRIPTION
45 .LP
46 Xkb provides functions to add a single new element to the top-level keyboard 
47 geometry. In each case the 
48 .I num_ * 
49 fields of the corresponding structure is incremented by 1. These functions do 
50 not change 
51 .I sz_* 
52 unless there is no more room in the array. Some of these functions fill in the 
53 values of the element's structure from the arguments. For other functions, you 
54 must explicitly write code to fill the structure's elements.
55
56 The top-level geometry description includes a list of 
57 .I geometry properties. 
58 A geometry property associates an arbitrary string with an equally arbitrary 
59 name. Programs that display images of keyboards can use geometry properties as 
60 hints, but they are not interpreted by Xkb. No other geometry structures refer 
61 to geometry properties.
62
63 .I XkbAddGeomColor 
64 adds the specified color 
65 .I name 
66 and 
67 .I pixel 
68 to the specified geometry 
69 .I geom. 
70 The top-level geometry description includes a list of up to MaxColors (32) 
71 .I color names. 
72 A color 
73 .I name 
74 is a string whose interpretation is not specified by Xkb and neither is the
75 .I pixel 
76 value's interpretation. All other geometry data structures refer to colors using 
77 their indices in this global list or pointers to colors in this list.
78 .I XkbAddGeomColor 
79 returns NULL if any of the parameters is empty or if it was not able to allocate 
80 space for the color. To allocate space for an arbitrary number of colors to a 
81 geometry, use the 
82 .I XkbAllocGeomColors 
83 function.
84 .SH STRUCTURES
85 .LP
86 .nf
87
88     typedef struct _XkbColor {
89         unsigned int    pixel;      /\(** color */
90         char *          spec;       /\(** color name */
91     } XkbColorRec,*XkbColorPtr;
92     
93 .fi
94 .SH "SEE ALSO"
95 .BR XkbAllocGeomColors (__libmansuffix__)
96