.\" Copyright (C) 2001 Information-technology Promotion Agency (IPA) .\" Copyright (C) 2001-2011 .\" National Institute of Advanced Industrial Science and Technology (AIST) .\" This file is part of the m17n library documentation. .\" Permission is granted to copy, distribute and/or modify this document .\" under the terms of the GNU Free Documentation License, Version 1.2 or .\" any later version published by the Free Software Foundation; with no .\" Invariant Section, no Front-Cover Texts, .\" and no Back-Cover Texts. A copy of the license is included in the .\" appendix entitled "GNU Free Documentation License". .TH "m17nSymbol" 3m17n "Mon Sep 25 2023" "Version 1.8.4" "The m17n Library" \" -*- nroff -*- .ad l .nh .SH NAME m17nSymbol_\-_Sy \- \- Symbol objects and API for them\&. .SH SYNOPSIS .br .PP .SS "Functions" .in +1c .ti -1c .RI "MSymbol \fBmsymbol\fP (const char *name)" .br .RI "Get a symbol\&. " .ti -1c .RI "MSymbol \fBmsymbol_as_managing_key\fP (const char *name)" .br .RI "Create a managing key\&. " .ti -1c .RI "int \fBmsymbol_is_managing_key\fP (MSymbol symbol)" .br .RI "Check if a symbol is a managing key\&. " .ti -1c .RI "MSymbol \fBmsymbol_exist\fP (const char *name)" .br .ti -1c .RI "char * \fBmsymbol_name\fP (MSymbol symbol)" .br .ti -1c .RI "int \fBmsymbol_put\fP (MSymbol symbol, MSymbol key, void *val)" .br .RI "Set the value of a symbol property\&. " .ti -1c .RI "void * \fBmsymbol_get\fP (MSymbol symbol, MSymbol key)" .br .RI "Get the value of a symbol property\&. " .ti -1c .RI "int \fBmsymbol_put_func\fP (MSymbol symbol, MSymbol key, \fBM17NFunc\fP func)" .br .RI "Set the value (function pointer) of a symbol property\&. " .ti -1c .RI "\fBM17NFunc\fP \fBmsymbol_get_func\fP (MSymbol symbol, MSymbol key)" .br .RI "Get the value (function pointer) of a symbol property\&. " .in -1c .SS "Variables" .in +1c .ti -1c .RI "MSymbol \fBMnil\fP" .br .RI "Symbol whose name is 'nil'\&. " .ti -1c .RI "MSymbol \fBMt\fP" .br .RI "Symbol whose name is 't'\&. " .ti -1c .RI "MSymbol \fBMstring\fP" .br .RI "Symbol whose name is 'string'\&. " .ti -1c .RI "MSymbol \fBMsymbol\fP" .br .RI "Symbol whose name is 'symbol'\&. " .in -1c .SH "Detailed Description" .PP Symbol objects and API for them\&. The m17n library uses objects called \fIsymbols\fP as unambiguous identifiers\&. Symbols are similar to atoms in the X library, but a symbol can have zero or more \fIsymbol\fP \fIproperties\fP\&. A symbol property consists of a \fIkey\fP and a \fIvalue\fP, where key is also a symbol and value is anything that can be cast to \fC(void *)\fP\&. .br 'The symbol property that belongs to the symbol S and whose key is K' may be shortened to 'K property of S'\&. .PP Symbols are used mainly in the following three ways\&. .PP .PD 0 .IP "\(bu" 2 As keys of symbol properties and other properties\&. .PP .PD 0 .IP "\(bu" 2 To represent various objects, e\&.g\&. charsets, coding systems, fontsets\&. .PP .PD 0 .IP "\(bu" 2 As arguments of the m17n library functions to control their behavior\&. .PP There is a special kind of symbol, a \fImanaging\fP \fIkey\fP\&. The value of a property whose key is a managing key must be a \fImanaged\fP \fIobject\fP\&. See \fBManaged Object\fP for the detail\&. .SH "Variable Documentation" .PP .SS "MSymbol Mnil" .PP Symbol whose name is 'nil'\&. The symbol \fBMnil\fP has the name \fC'nil'\fP and, in general, represents \fIfalse\fP or \fIno\fP\&. When coerced to 'int', its value is zero\&. \fBMnil\fP can't have any symbol property\&. .br .SS "MSymbol Mt" .PP Symbol whose name is 't'\&. The symbol \fBMt\fP has the name \fC't'\fP and, in general, represents \fItrue\fP or \fIyes\fP\&. .br .SS "MSymbol Mstring" .PP Symbol whose name is 'string'\&. The symbol \fBMstring\fP has the name \fC'string'\fP and is used as an argument of the functions \fBmchar_define_property()\fP, etc\&. .br .SS "MSymbol Msymbol" .PP Symbol whose name is 'symbol'\&. The symbol \fBMsymbol\fP has the name \fC'symbol'\fP and is used as an argument of the functions \fBmchar_define_property()\fP, etc\&. .br .SH "Author" .PP Generated automatically by Doxygen for The m17n Library from the source code\&. .SH COPYRIGHT Copyright (C) 2001 Information\-technology Promotion Agency (IPA) .br Copyright (C) 2001\-2011 National Institute of Advanced Industrial Science and Technology (AIST) .br Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License .