.\" 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 "minput_get_variable" 3m17n "Mon Sep 25 2023" "Version 1.8.4" "The m17n Library" \" -*- nroff -*- .ad l .nh .SH NAME minput_get_variable \- .SH SYNOPSIS \fBMPlist\fP* \fBminput_get_variable\fP (MSymbol \fIlanguage\fP, MSymbol \fIname\fP, MSymbol \fIvariable\fP) .SH DESCRIPTION .PP .nf @brief Get information about input method variable(s). The minput_get_variable() function returns information about variable @b variable of the input method specified by @b language and @b name. An input method variable controls behavior of an input method. There are two kinds of variables, global and local. A global variable has a global definition, and the description and the value may be inherited by a local variable. Each input method defines a local variable which has local value. It may also declare a local variable that inherits definition of a global variable of the same name. If @b language is #Mt and @b name is #Mnil, information about a global variable is returned. Otherwise information about a local variable is returned. If @b variable is #Mnil, information about all variables is returned. The return value is a @e well\-formed plist (@ref m17nPlist) of this format: .fi .fi .PP .nf ((NAME DESCRIPTION STATUS VALUE [VALID\-VALUE ...]) ...) .fi .fi .ft C NAME .ft R is a symbol representing the variable name\&. .PP \fCDESCRIPTION .ft R is an M\-text describing the variable, or .ft B Mnil .ft R if the variable has no description\&. .PP \fCSTATUS .ft R is a symbol representing how the value is decided\&. The value is .ft B Mnil .ft R (the default value), .ft B Mcustomized .ft R (the value is customized by per\-user customization file), or .ft B Mconfigured .ft R (the value is set by the call of .ft B minput_config_variable()\fP)\&. For a local variable only, it may also be .ft B Minherited .ft R (the value is inherited from the corresponding global variable)\&. .PP \fCVALUE .ft R is the initial value of the variable\&. If the key of this element is .ft B Mt\fP, .ft R the variable has no initial value\&. Otherwise, the key is .ft B Minteger\fP, .ft R .ft B Msymbol\fP, .ft R or .ft B Mtext .ft R and the value is of the corresponding type\&. .PP \fCVALID\-VALUEs .ft R (if any) specify which values the variable can have\&. They have the same type (i\&.e\&. having the same key) as .ft C VALUE .ft R except for the case that VALUE is an integer\&. In that case, .ft C VALID\-VALUE .ft R may be a plist of two integers specifying the range of possible values\&. .PP If there no .ft C VALID\-VALUE\fP, .ft R the variable can have any value as long as the type is the same as .ft C VALUE\fP\&. .PP If .ft B variable .ft R is not .ft B Mnil\fP, .ft R the first element of the returned plist contains the information about .ft B variable\fP\&. .PP .SH RETURN VALUE .PP .RS 4 .RE .PP If the requested information was found, a pointer to a non\-empty plist is returned\&. As the plist is kept in the library, the caller must not modify nor free it\&. .PP Otherwise (the specified input method or the specified variable does not exist), .ft C NULL .ft R is returned\&. .br .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 .