Blame doc/man/man3/XmRepTypeRegister.3

Packit b099d7
'\" t
Packit b099d7
...\" RepTypRe.sgm /main/8 1996/09/08 20:58:50 rws $
Packit b099d7
.de P!
Packit b099d7
.fl
Packit b099d7
\!!1 setgray
Packit b099d7
.fl
Packit b099d7
\\&.\"
Packit b099d7
.fl
Packit b099d7
\!!0 setgray
Packit b099d7
.fl			\" force out current output buffer
Packit b099d7
\!!save /psv exch def currentpoint translate 0 0 moveto
Packit b099d7
\!!/showpage{}def
Packit b099d7
.fl			\" prolog
Packit b099d7
.sy sed -e 's/^/!/' \\$1\" bring in postscript file
Packit b099d7
\!!psv restore
Packit b099d7
.
Packit b099d7
.de pF
Packit b099d7
.ie     ?\\*(f1?? .ds f1 \\n(.f
Packit b099d7
.el .ie ?\\*(f2?? .ds f2 \\n(.f
Packit b099d7
.el .ie ?\\*(f3?? .ds f3 \\n(.f
Packit b099d7
.el .ie ?\\*(f4?? .ds f4 \\n(.f
Packit b099d7
.el .tm ? font overflow
Packit b099d7
.ft \\$1
Packit b099d7
..
Packit b099d7
.de fP
Packit b099d7
.ie     !?\\*(f4?? \{\
Packit b099d7
.	ft \\*(f4
Packit b099d7
.	ds f4\"
Packit b099d7
'	br \}
Packit b099d7
.el .ie !?\\*(f3?? \{\
Packit b099d7
.	ft \\*(f3
Packit b099d7
.	ds f3\"
Packit b099d7
'	br \}
Packit b099d7
.el .ie !?\\*(f2?? \{\
Packit b099d7
.	ft \\*(f2
Packit b099d7
.	ds f2\"
Packit b099d7
'	br \}
Packit b099d7
.el .ie !?\\*(f1?? \{\
Packit b099d7
.	ft \\*(f1
Packit b099d7
.	ds f1\"
Packit b099d7
'	br \}
Packit b099d7
.el .tm ? font underflow
Packit b099d7
..
Packit b099d7
.ds f1\"
Packit b099d7
.ds f2\"
Packit b099d7
.ds f3\"
Packit b099d7
.ds f4\"
Packit b099d7
.ta 8n 16n 24n 32n 40n 48n 56n 64n 72n 
Packit b099d7
.TH "XmRepTypeRegister" "library call"
Packit b099d7
.SH "NAME"
Packit b099d7
\fBXmRepTypeRegister\fP \(em A representation type manager function
Packit b099d7
that registers a representation type resource
Packit b099d7
.iX "XmRepTypeRegister"
Packit b099d7
.iX "representation type manager functions" "XmRepTypeRegister"
Packit b099d7
.SH "SYNOPSIS"
Packit b099d7
.PP
Packit b099d7
.nf
Packit b099d7
#include <Xm/RepType\&.h>
Packit b099d7
\fBXmRepTypeId \fBXmRepTypeRegister\fP\fR(
Packit b099d7
\fBString \fBrep_type\fR\fR,
Packit b099d7
\fBString *\fBvalue_names\fR\fR,
Packit b099d7
\fBunsigned char *\fBvalues\fR\fR,
Packit b099d7
\fBunsigned char \fBnum_values\fR\fR);
Packit b099d7
.fi
Packit b099d7
.SH "DESCRIPTION"
Packit b099d7
.PP
Packit b099d7
\fBXmRepTypeRegister\fP registers a representation
Packit b099d7
type resource with the representation type manager\&. All
Packit b099d7
features of the representation type management facility become
Packit b099d7
available for the specified representation type\&. The function
Packit b099d7
installs a forward type converter to convert string values to
Packit b099d7
numerical representation type values\&.
Packit b099d7
.PP
Packit b099d7
When the \fIvalues\fP argument is NULL, consecutive numerical
Packit b099d7
values are assumed\&. The order of the strings in the \fIvalue_names\fP
Packit b099d7
array determines the numerical values for the resource\&. For example,
Packit b099d7
the first value name is 0 (zero); the second value name is 1; and so on\&.
Packit b099d7
.PP
Packit b099d7
If it is non-NULL, the \fIvalues\fP argument can be used to assign values
Packit b099d7
to representation types that have nonconsecutive values or have
Packit b099d7
duplicate names for the same value\&. Representation types registered
Packit b099d7
in this manner will consume additional storage and will be slightly
Packit b099d7
slower than representation types with consecutive values\&.
Packit b099d7
.PP
Packit b099d7
A representation type can only be registered once; if the
Packit b099d7
same representation type name is registered more than once, the
Packit b099d7
behavior is undefined\&.
Packit b099d7
.PP
Packit b099d7
The function \fBXmRepTypeAddReverse\fP installs a reverse converter
Packit b099d7
for a registered representation type\&. The reverse converter takes
Packit b099d7
a representation type numerical value and returns the corresponding
Packit b099d7
string value\&. If the list of numerical values for a representation
Packit b099d7
type contains duplicate values, the reverse converter uses the first
Packit b099d7
name in the \fIvalue_names\fP list that matches the specified numeric
Packit b099d7
value\&. For example, if a \fIvalue_names\fP array has \fIcancel\fP,
Packit b099d7
\fIproceed\fP, and \fIabort\fP, and the corresponding \fIvalues\fP array
Packit b099d7
contains 0, 1, and 0, the reverse converter will return \fIcancel\fP
Packit b099d7
instead of \fIabort\fP for an input value of 0\&.
Packit b099d7
.IP "\fIrep_type\fP" 10
Packit b099d7
Specifies the representation type name\&.
Packit b099d7
.IP "\fIvalue_names\fP" 10
Packit b099d7
Specifies a pointer to an array of value names associated with the
Packit b099d7
representation type\&. A value name is specified in lowercase characters
Packit b099d7
without an \fBXm\fP prefix\&. Words within a name are separated with
Packit b099d7
underscores\&.
Packit b099d7
.IP "\fIvalues\fP" 10
Packit b099d7
Specifies a pointer to an array of values associated with the
Packit b099d7
representation type\&. A value in this array is associated with
Packit b099d7
the value name in the corresponding position of the \fIvalue_names\fP
Packit b099d7
array\&.
Packit b099d7
.IP "\fInum_values\fP" 10
Packit b099d7
Specifies the number of entries in the \fIvalue_names\fP and
Packit b099d7
\fIvalues\fP arrays\&.
Packit b099d7
.SH "RETURN"
Packit b099d7
.PP
Packit b099d7
Returns the identification number for the specified representation
Packit b099d7
type\&.
Packit b099d7
.SH "RELATED"
Packit b099d7
.PP
Packit b099d7
\fBXmRepTypeAddReverse\fP(3),
Packit b099d7
\fBXmRepTypeGetId\fP(3),
Packit b099d7
\fBXmRepTypeGetNameList\fP(3),
Packit b099d7
\fBXmRepTypeGetRecord\fP(3),
Packit b099d7
\fBXmRepTypeGetRegistered\fP(3), and
Packit b099d7
\fBXmRepTypeValidValue\fP(3)\&.
Packit b099d7
...\" created by instant / docbook-to-man, Sun 22 Dec 1996, 20:29