OSDN Git Service

* cgen-asm.in: Update copyright year.
[pf3gnuchains/pf3gnuchains3x.git] / tk / doc / GetRelief.3
1 '\"
2 '\" Copyright (c) 1990 The Regents of the University of California.
3 '\" Copyright (c) 1994-1998 Sun Microsystems, Inc.
4 '\"
5 '\" See the file "license.terms" for information on usage and redistribution
6 '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
7 '\" 
8 '\" RCS: @(#) $Id$
9 '\" 
10 .so man.macros
11 .TH Tk_GetReliefFromObj 3 8.1 Tk "Tk Library Procedures"
12 .BS
13 .SH NAME
14 Tk_GetReliefFromObj, Tk_GetRelief, Tk_NameOfRelief \- translate between strings and relief values
15 .SH SYNOPSIS
16 .nf
17 \fB#include <tk.h>\fR
18 .sp
19 .VS 8.1
20 int
21 \fBTk_GetReliefFromObj(\fIinterp, objPtr, reliefPtr\fB)\fR
22 .VE
23 .sp
24 int
25 \fBTk_GetRelief(\fIinterp, name, reliefPtr\fB)\fR
26 .sp
27 CONST char *
28 \fBTk_NameOfRelief(\fIrelief\fB)\fR
29 .SH ARGUMENTS
30 .AS "Tcl_Interp" *reliefPtr
31 .AP Tcl_Interp *interp in
32 Interpreter to use for error reporting.
33 .VS 8.1 br
34 .AP Tcl_Obj *objPtr in/out
35 String value contains name of relief (one of \fBflat\fR, \fBgroove\fR,
36 \fBraised\fR, \fBridge\fR, \fBsolid\fR, or \fBsunken\fR);
37 internal rep will be modified to cache corresponding relief value.
38 .AP char *string in
39 Same as \fIobjPtr\fR except description of relief is passed as
40 a string.
41 .VE
42 .AP int *reliefPtr out
43 Pointer to location in which to store relief value corresponding to
44 \fIobjPtr\fR or \fIname\fR.
45 .AP "CONST char" *name
46 Name of the relief.
47 .AP int relief in
48 Relief value (one of TK_RELIEF_FLAT, TK_RELIEF_RAISED, TK_RELIEF_SUNKEN,
49 TK_RELIEF_GROOVE, TK_RELIEF_SOLID, or TK_RELIEF_RIDGE).
50 .BE
51
52 .SH DESCRIPTION
53 .PP
54 .VS 8.1
55 \fBTk_GetReliefFromObj\fR places in \fI*reliefPtr\fR the relief value
56 corresponding to the value of \fIobjPtr\fR.  This value will be one of
57 TK_RELIEF_FLAT, TK_RELIEF_RAISED, TK_RELIEF_SUNKEN,
58 TK_RELIEF_GROOVE, TK_RELIEF_SOLID, or TK_RELIEF_RIDGE.
59 Under normal circumstances the return value is TCL_OK and
60 \fIinterp\fR is unused.
61 If \fIobjPtr\fR doesn't contain one of the valid relief names
62 or an abbreviation of one of them, then TCL_ERROR is returned,
63 \fI*reliefPtr\fR is unmodified, and an error message
64 is stored in \fIinterp\fR's result if \fIinterp\fR isn't NULL.
65 \fBTk_GetReliefFromObj\fR caches information about the return
66 value in \fIobjPtr\fR, which speeds up future calls to
67 \fBTk_GetReliefFromObj\fR with the same \fIobjPtr\fR.
68 .PP
69 \fBTk_GetRelief\fR is identical to \fBTk_GetReliefFromObj\fR except
70 that the description of the relief is specified with a string instead
71 of an object.  This prevents \fBTk_GetRelief\fR from caching the
72 return value, so \fBTk_GetRelief\fR is less efficient than
73 \fBTk_GetReliefFromObj\fR.
74 .VE
75 .PP
76 \fBTk_NameOfRelief\fR is the logical inverse of \fBTk_GetRelief\fR.
77 Given a relief value it returns the corresponding string (\fBflat\fR,
78 \fBraised\fR, \fBsunken\fR, \fBgroove\fR, \fBsolid\fR, or \fBridge\fR).
79 If \fIrelief\fR isn't a legal relief value, then ``unknown relief''
80 is returned.
81
82 .SH KEYWORDS
83 name, relief, string