Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

minput_config_command(3m17n) [debian 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)

Check Out this Related Man Page

Property List(3m17n)						 The m17n Library					      Property List(3m17n)

NAME
Property_List - Property List objects and API for them. Typedefs typedef struct MPlist MPlist Type of property list objects. Functions MPlist * mplist_deserialize (MText *mt) Generate a property list by deserializing an M-text. MPlist * mplist (void) Create a property list object. MPlist * mplist_copy (MPlist *plist) Copy a property list. MPlist * mplist_put (MPlist *plist, MSymbol key, void *val) Set the value of a property in a property list. void * mplist_get (MPlist *plist, MSymbol key) Get the value of a property in a property list. MPlist * mplist_put_func (MPlist *plist, MSymbol key, M17NFunc func) Set the value (function pointer) of a property in a property list. M17NFunc mplist_get_func (MPlist *plist, MSymbol key) Get the value (function pointer) of a property in a property list. MPlist * mplist_add (MPlist *plist, MSymbol key, void *val) Add a property at the end of a property list. MPlist * mplist_push (MPlist *plist, MSymbol key, void *val) Add a property at the beginning of a property list. void * mplist_pop (MPlist *plist) Remove a property at the beginning of a property list. MPlist * mplist_find_by_key (MPlist *plist, MSymbol key) Find a property of a specific key in a property list. MPlist * mplist_find_by_value (MPlist *plist, void *val) Find a property of a specific value in a property list. MPlist * mplist_next (MPlist *plist) Return the next sublist of a property list. MPlist * mplist_set (MPlist *plist, MSymbol key, void *val) Set the first property in a property list. int mplist_length (MPlist *plist) Return the length of a property list. MSymbol mplist_key (MPlist *plist) Return the key of the first property in a property list. void * mplist_value (MPlist *plist) Return the value of the first property in a property list. Variables MSymbol Minteger Symbol whose name is 'integer'. MSymbol Mplist Symbol whose name is 'plist'. MSymbol Mtext Symbol whose name is 'mtext'. Detailed Description Property List objects and API for them. A property list (or plist for short) is a list of zero or more properties. A property consists of a key and a value, where key is a symbol and value is anything that can be cast to (void *). If the key of a property is a managing key, its value is a managed object. A property list itself is a managed objects. If each key of a plist is one of Msymbol, Mtext, Minteger, and Mplist, the plist is called as well-formed and represented by the following notation in the documentation. PLIST ::= '(' ELEMENT * ')' ELEMENT ::= INTEGER | SYMBOL | M-TEXT | PLIST M-TEXT ::= '"' text data ... '"' For instance, if a plist has four elements; integer -20, symbol of name 'sym', M-text of contents 'abc', and plist of integer 10 and symbol of name 'another-symbol', it is represented as this: (-20 sym 'abc' (10 another-symbol)) Typedef Documentation typedef struct MPlist MPlist Type of property list objects. The type MPlist is for a property list object. Its internal structure is concealed from application programs. Variable Documentation MSymbol Minteger Symbol whose name is 'integer'. The symbol Minteger has the name 'integer'. The value of a property whose key is Minteger must be an integer. MSymbol Mplist Symbol whose name is 'plist'. The symbol Mplist has the name 'plist'. It is a managing key. A value of a property whose key is Mplist must be a plist. MSymbol Mtext Symbol whose name is 'mtext'. The symbol Mtext has the name 'mtext'. It is a managing key. A value of a property whose key is Mtext must be an M-text. Author Generated automatically by Doxygen for The m17n Library from the source code. 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 Property List(3m17n)
Man Page