#  Copyright (c) 1990 The Regents of the University of California.
#  Copyright (c) 1994-1996 Sun Microsystems, Inc.
#  See the file "license.terms" for information on usage and redistribution
#  of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
#

=head1 NAME

Tk_GetRelief, Tk_NameOfRelief - translate between strings and relief values

=for category C Programming

=head1 SYNOPSIS

B<#include E<lt>tk.hE<gt>>

int
B<Tk_GetRelief(>I<interp, name, reliefPtr>B<)>

char *
B<Tk_NameOfRelief(>I<relief>B<)>

=head1 ARGUMENTS

=over 4

=item Tcl_Interp *interp (in)

Interpreter to use for error reporting.

=item char *name (in)

String containing relief name (one of ``flat'', ``groove'',
``raised'', ``ridge'', ``solid'', or ``sunken'').

=item int *reliefPtr (out)

Pointer to location in which to store relief value corresponding to
I<name>.

=item int relief (in)

Relief value (one of TK_RELIEF_FLAT, TK_RELIEF_RAISED, TK_RELIEF_SUNKEN,
TK_RELIEF_GROOVE, TK_RELIEF_SOLID, or TK_RELIEF_RIDGE).

=back

=head1 DESCRIPTION

B<Tk_GetRelief> places in I<*reliefPtr> the relief value
corresponding to I<name>.  This value will be one of
TK_RELIEF_FLAT, TK_RELIEF_RAISED, TK_RELIEF_SUNKEN,
TK_RELIEF_GROOVE, TK_RELIEF_SOLID, or TK_RELIEF_RIDGE.
Under normal circumstances the return value is TCL_OK and
I<interp> is unused.
If I<name> doesn't contain one of the valid relief names
or an abbreviation of one of them, then an error message
is stored in I<interp-E<gt>result>,
TCL_ERROR is returned, and I<*reliefPtr> is unmodified.

B<Tk_NameOfRelief> is the logical inverse of B<Tk_GetRelief>.
Given a relief value it returns the corresponding string (``flat'',
``raised'', ``sunken'', ``groove'', ``solid'', or ``ridge'').
If I<relief> isn't a legal relief value, then ``unknown relief''
is returned.

=head1 KEYWORDS

name, relief, string
