minput_list(3m17n)
π NAME π
minput_list β bestie, it's giving "list me the input methods" energy, and that's literally the whole vibe β¨
πΈ SYNOPSIS πΈ
MPlist* minput_list (MSymbol language)
π¦ DESCRIPTION π¦
@brief ok so the whole point: list available input methods. π
The minput_list() function hands you back a list of all the input methods that are currently available and whose language is language. And if language is #Mnil? Then bestie, it's all of them β every single input method gets listed. No filter, no cap. π
@par Return value:
The returned value is a plist, and it looks exactly like this:
((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's got some problem β like, for example, a syntax error in the MIM file, an external module that isn't available, or an including input method that isn't available. π« So SANE is basically the vibe check for each input method, and sometimes it does not pass.
β¨ 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>.
π and that's the whole page, bestie β every option, every symbol, every #Mnil accounted for. we ate and left zero crumbs. π
Version 1.8.4 β Mon Sep 25 2023 β mwah, m17n library, you icon, you absolute legend π«Άβ¨
π¦ where this page comes from
- debian trixie: m17n-docs 1.8.4-1
- ubuntu noble: m17n-docs 1.8.4-1
- ubuntu questing: m17n-docs 1.8.4-1
- ubuntu resolute: m17n-docs 1.8.4-1build1
- ubuntu stonking: m17n-docs 1.8.4-1build1
- Copyright (C) 2001 Information-technology Promotion Agency (IPA)
- Copyright (C) 2001-2011 National Institute of Advanced Industrial Science and Technology (AIST)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms