8888 loader: rename STAND to _STANDALONE
[unleashed.git] / usr / src / man / man3tsol / labelclipping.3tsol
blob2dd0508a35b196678dc9486d67408eea3231d227
1 '\" te
2 .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH LABELCLIPPING 3TSOL "Jul 20, 2007"
7 .SH NAME
8 labelclipping, Xbsltos, Xbcleartos \- translate a binary label and clip to the
9 specified width
10 .SH SYNOPSIS
11 .LP
12 .nf
13 \fBcc\fR [\fIflag\fR...] \fIfile\fR... \fB-ltsol\fR \fB-lDtTsol\fR [\fIlibrary\fR...]
14 .fi
16 .LP
17 .nf
18 #include <Dt/label_clipping.h>
20 \fBXmString\fR \fBXbsltos\fR(\fBDisplay *\fR\fIdisplay\fR, \fBconst m_label_t *\fR\fIsenslabel\fR,
21      \fBDimension\fR \fIwidth\fR, \fBconst XmFontList\fR \fIfontlist\fR, \fBconst int\fR \fIflags\fR);
22 .fi
24 .LP
25 .nf
26 \fBXmString\fR \fBXbcleartos\fR(\fBDisplay *\fR\fIdisplay\fR, \fBconst m_label_t *\fR\fIclearance\fR,
27      \fBDimension\fR \fIwidth\fR, \fBconst XmFontList\fR \fIfontlist\fR, \fBconst int\fR \fIflags\fR);
28 .fi
30 .SH DESCRIPTION
31 .sp
32 .LP
33 The calling process must have \fBPRIV_SYS_TRANS_LABEL\fR in its set of
34 effective privileges to translate labels or clearances that dominate the
35 current process' sensitivity label.
36 .sp
37 .ne 2
38 .na
39 \fB\fIdisplay\fR\fR
40 .ad
41 .RS 13n
42 The structure controlling the connection to an X Window System display.
43 .RE
45 .sp
46 .ne 2
47 .na
48 \fB\fIsenslabel\fR\fR
49 .ad
50 .RS 13n
51 The sensitivity label to be translated.
52 .RE
54 .sp
55 .ne 2
56 .na
57 \fB\fIclearance\fR\fR
58 .ad
59 .RS 13n
60 The clearance to be translated.
61 .RE
63 .sp
64 .ne 2
65 .na
66 \fB\fIwidth\fR\fR
67 .ad
68 .RS 13n
69 The width of the translated label or clearance in pixels. If the specified
70 width is shorter than the full label, the label is clipped and the presence of
71 clipped letters is indicated by an arrow. In this example, letters have been
72 clipped to the right of: TS<-. See the \fBsbltos\fR(3TSOL) manual page for more
73 information on the clipped indicator. If the specified width is equal to the
74 display width (\fIdisplay\fR), the label is not truncated, but word-wrapped
75 using a width of half the display width.
76 .RE
78 .sp
79 .ne 2
80 .na
81 \fB\fIfontlist\fR\fR
82 .ad
83 .RS 13n
84 A list of fonts and character sets where each font is associated with a
85 character set.
86 .RE
88 .sp
89 .ne 2
90 .na
91 \fB\fIflags\fR\fR
92 .ad
93 .RS 13n
94 The value of flags indicates which words in the \fBlabel_encodings\fR(4) file
95 are used for the translation. See the \fBbltos\fR(3TSOL) manual page for a
96 description of the flag values: \fBLONG_WORDS\fR, \fBSHORT_WORDS\fR,
97 \fBLONG_CLASSIFICATION\fR, \fBSHORT_CLASSIFICATION\fR, \fBALL_ENTRIES,\fR
98 \fBACCESS_RELATED,\fR \fBVIEW_EXTERNAL\fR, \fBVIEW_INTERNAL\fR,
99 \fBNO_CLASSIFICATION\fR. \fBBRACKETED\fR is an additional flag that can be used
100 with \fBXbsltos()\fR only. It encloses the sensitivity label in square brackets
101 as follows: [C].
104 .SH RETURN VALUES
107 These functions return a compound string that represents the character-coded
108 form of the sensitivity label or clearance that is translated. The compound
109 string uses the language and fonts specified in \fIfontlist\fR and is clipped
110 to \fIwidth\fR. These functions return \fINULL\fR if the label or clearance is
111 not a valid, required type as defined in the \fBlabel_encodings\fR(4) file, or
112 not dominated by the process' sensitivity label and the
113 \fBPRIV_SYS_TRANS_LABEL\fR privilege is not asserted.
114 .SH FILES
116 .ne 2
118 \fB\fB/usr/dt/include/Dt/label_clipping.h\fR\fR
120 .sp .6
121 .RS 4n
122 Header file for label clipping functions
126 .ne 2
128 \fB\fB/etc/security/tsol/label_encodings\fR\fR
130 .sp .6
131 .RS 4n
132 The label encodings file contains the classification names, words, constraints,
133 and values for the defined labels of this system.
136 .SH EXAMPLES
138 \fBExample 1 \fRTranslate and Clip a Clearance.
141 This example translates a clearance to text using the long words specified in
142 the \fBlabel_encodings\fR(4) file, a font list, and clips the translated
143 clearance to a width of 72 pixels.
146 .in +2
148 xmstr = Xbcleartos(XtDisplay(topLevel),
149 &clearance, 72, fontlist, LONG_WORDS
151 .in -2
153 .SH ATTRIBUTES
156 See \fBattributes\fR(5) for descriptions of the following attributes:
161 box;
162 c | c
163 l | l .
164 ATTRIBUTE TYPE  ATTRIBUTE VALUE
166 Interface Stability     Obsolete
168 MT-Level        MT-Safe
173 The labelclipping functions, \fBXbsltos()\fR and \fBXbcleartos()\fR, are
174 obsolete. Use the \fBlabel_to_str\fR(3TSOL) function instead.
175 .SH SEE ALSO
178 \fBbltos\fR(3TSOL),  \fBlabel_to_str\fR(3TSOL),  \fBlibtsol\fR(3LIB),
179 \fBlabel_encodings\fR(4), \fBattributes\fR(5)
182 See \fBXmStringDraw\fR(3) and \fBFontList\fR(3) for information on the creation
183 and structure of a font list.
184 .SH NOTES
187 The functionality described on this manual page is available only if the system
188 is configured with Trusted Extensions.