plucky (3) minput_list.3m17n.gz

NAME
minput_list -
SYNOPSIS
MPlist* minput_list (MSymbol language)
DESCRIPTION
@brief List available input methods. The minput_list() function returns a list of currently available input methods whose language is @b language. If @b language is #Mnil, all input methods are listed. @par Return value: The returned value is a plist of this form: ((LANGUAGE-NAME INPUT-METHOD-NAME SANE) ...) The third element SANE of each input method is #Mt if it can be successfully used, or #Mnil if it has some problem (e.g. syntax error of MIM file, unavailable external module, unavailable including input method).
Example:
#include <stdio.h> #include <string.h> #include <m17n.h> int main (int argc, char **argv) { MPlist *imlist, *pl; M17N_INIT(); imlist = minput_list ((argc > 1) ? msymbol (argv[1]) : Mnil); for (pl = imlist; mplist_key (pl) != Mnil; pl = mplist_next (pl)) { MPlist *p = mplist_value (pl); MSymbol lang, name, sane; lang = mplist_value (p); p = mplist_next (p); name = mplist_value (p); p = mplist_next (p); sane = mplist_value (p); printf ("%s %s %s0, msymbol_name (lang), msymbol_name (name), sane == Mt ? "ok" : "no"); } m17n_object_unref (imlist); M17N_FINI(); exit (0); }
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>.