minput_list3m17n
Usage
MPlist* minput_list (MSymbol language)
Overview
@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);
}