Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

minput_get_variable(3m17n) [debian man page]

minput_get_variable(3m17n)					 The m17n Library					minput_get_variable(3m17n)

NAME
minput_get_variable - Get information about input method variable(s). SYNOPSIS
MPlist* minput_get_variable (MSymbol language, MSymbol name, MSymbol variable) DESCRIPTION
Get information about input method variable(s). The minput_get_variable() function returns information about variable variable of the input method specified by language and 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 language is Mt and name is Mnil, information about a global variable is returned. Otherwise information about a local variable is returned. If variable is Mnil, information about all variables is returned. The return value is a well-formed plist (Property List) of this format: ((NAME DESCRIPTION STATUS VALUE [VALID-VALUE ...]) ...) NAME is a symbol representing the variable name. DESCRIPTION is an M-text describing the variable, or Mnil if the variable has no description. STATUS is a symbol representing how the value is decided. The value is Mnil (the default value), Mcustomized (the value is customized by per-user customization file), or Mconfigured (the value is set by the call of minput_config_variable()). For a local variable only, it may also be Minherited (the value is inherited from the corresponding global variable). VALUE is the initial value of the variable. If the key of this element is Mt, the variable has no initial value. Otherwise, the key is Minteger, Msymbol, or Mtext and the value is of the corresponding type. VALID-VALUEs (if any) specify which values the variable can have. They have the same type (i.e. having the same key) as VALUE except for the case that VALUE is an integer. In that case, VALID-VALUE may be a plist of two integers specifying the range of possible values. If there no VALID-VALUE, the variable can have any value as long as the type is the same as VALUE. If variable is not Mnil, the first element of the returned plist contains the information about variable. RETURN VALUE
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. Otherwise (the specified input method or the specified variable does not exist), NULL is returned. COPYRIGHT
Copyright (C) 2001 Information-technology Promotion Agency (IPA) Copyright (C) 2001-2011 National Institute of Advanced Industrial Science and Technology (AIST) Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License <http://www.gnu.org/licenses/fdl.html>. Version 1.6.2 12 Jan 2011 minput_get_variable(3m17n)

Check Out this Related Man Page

minput_config_command(3m17n)					 The m17n Library				      minput_config_command(3m17n)

NAME
minput_config_command - Configure the key sequence of an input method command. SYNOPSIS
int minput_config_command (MSymbol language, MSymbol name, MSymbol command, MPlist * keyseqlist) DESCRIPTION
Configure the key sequence of an input method command. The minput_config_command() function assigns a list of key sequences keyseqlist to the command command of the input method specified by language and name. If keyseqlist is a non-empty plist, it must be a list of key sequences, and each key sequence must be a plist of symbols. If keyseqlist is an empty plist, any configuration and customization of the command are cancelled, and default key sequences become effective. If keyseqlist is NULL, the configuration of the command is canceled, and the original key sequences (what saved in per-user customization file, or the default one) become effective. In the latter two cases, command can be Mnil to make all the commands of the input method the target of the operation. If name is Mnil, this function configures the key assignment of a global command, not that of a specific input method. The configuration takes effect for input methods opened or re-opened later in the current session. In order to make the configuration take effect for the future session, it must be saved in a per-user customization file by the function minput_save_config(). RETURN VALUE
If the operation was successful, this function returns 0, otherwise returns -1. The operation fails in these cases: o keyseqlist is not in a valid form. o command is not available for the input method. o language and name do not specify an existing input method. SEE ALSO
minput_get_commands(), minput_save_config(). Example: /* Add 'C-x u' to the 'start' command of Unicode input method. */ { MSymbol start_command = msymbol ('start'); MSymbol unicode = msymbol ('unicode'); MPlist *cmd, *plist, *key_seq_list, *key_seq; /* At first get the current key-sequence assignment. */ cmd = minput_get_command (Mt, unicode, start_command); if (! cmd) { /* The input method does not have the command 'start'. Here should come some error handling code. */ } /* Now CMD == ((start DESCRIPTION STATUS KEY-SEQUENCE ...) ...). Extract the part (KEY-SEQUENCE ...). */ plist = mplist_next (mplist_next (mplist_next (mplist_value (cmd)))); /* Copy it because we should not modify it directly. */ key_seq_list = mplist_copy (plist); key_seq = mplist(); mplist_add (key_seq, Msymbol, msymbol ('C-x')); mplist_add (key_seq, Msymbol, msymbol ('u')); mplist_add (key_seq_list, Mplist, key_seq); m17n_object_unref (key_seq); minput_config_command (Mt, unicode, start_command, key_seq_list); m17n_object_unref (key_seq_list); } COPYRIGHT
Copyright (C) 2001 Information-technology Promotion Agency (IPA) Copyright (C) 2001-2011 National Institute of Advanced Industrial Science and Technology (AIST) Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License <http://www.gnu.org/licenses/fdl.html>. Version 1.6.2 12 Jan 2011 minput_config_command(3m17n)
Man Page