.\" Copyright (C) 2001 Information-technology Promotion Agency (IPA) .\" Copyright (C) 2001-2011 .\" National Institute of Advanced Industrial Science and Technology (AIST) .\" This file is part of the m17n library documentation. .\" Permission is granted to copy, distribute and/or modify this document .\" under the terms of the GNU Free Documentation License, Version 1.2 or .\" any later version published by the Free Software Foundation; with no .\" Invariant Section, no Front-Cover Texts, .\" and no Back-Cover Texts. A copy of the license is included in the .\" appendix entitled "GNU Free Documentation License". .TH "minput_list" 3m17n "Mon Sep 25 2023" "Version 1.8.4" "The m17n Library" \" -*- nroff -*- .ad l .nh .SH NAME minput_list \- .SH SYNOPSIS \fBMPlist\fP* \fBminput_list\fP (MSymbol \fIlanguage\fP) .SH DESCRIPTION .PP .nf @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). .fi .fi .PP .SH Example: .PP .RS 4 .PP .nf #include #include #include 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 %s\n", msymbol_name (lang), msymbol_name (name), sane == Mt ? "ok" : "no"); } m17n_object_unref (imlist); M17N_FINI(); exit (0); } .fi .fi .RE .PP .SH COPYRIGHT Copyright (C) 2001 Information\-technology Promotion Agency (IPA) .br Copyright (C) 2001\-2011 National Institute of Advanced Industrial Science and Technology (AIST) .br Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License .