X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fm17n.h;h=1d3a855cd18aa01baf0027f26ae2983062fd20eb;hb=6d7c6038302bc463b075089c23bf709a4d5f815e;hp=b1da0e8839b9bb7a9adcb676acfdc341b6bc6f86;hpb=29174c4f141cb4c2d70b807322af3f39cb0abc23;p=m17n%2Fm17n-lib.git diff --git a/src/m17n.h b/src/m17n.h index b1da0e8..1d3a855 100644 --- a/src/m17n.h +++ b/src/m17n.h @@ -1,5 +1,5 @@ /* m17n.h -- header file for the SHELL API of the m17n library. - Copyright (C) 2003, 2004 + Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 National Institute of Advanced Industrial Science and Technology (AIST) Registration Number H15PRO112 @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the m17n library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 02111-1307, USA. */ #ifndef _M17N_H_ @@ -31,23 +31,39 @@ #include #endif -#ifdef __cplusplus -extern "C" -{ -#endif +M17N_BEGIN_HEADER #if !defined (FOR_DOXYGEN) || defined (DOXYGEN_INTERNAL_MODULE) extern void m17n_init (void); #undef M17N_INIT +#ifdef _M17N_FLT_H_ +#define M17N_INIT() \ + do { \ + m17n_init (); \ + m17n_init_flt (); \ + } while (0) +#else /* not _M17N_FLT_H_ */ #define M17N_INIT() m17n_init () +#endif /* not _M17N_FLT_H_ */ extern void m17n_fini (void); #undef M17N_FINI +#ifdef _M17N_FLT_H_ +#define M17N_FINI() \ + do { \ + m17n_fini_flt (); \ + m17n_fini (); \ + } while (0) +#else /* not _M17N_FLT_H_ */ #define M17N_FINI() m17n_fini () +#endif /* not _M17N_FLT_H_ */ + #endif -/***en @defgroup m17nShell SHELL API */ -/***ja @defgroup m17nShell ¥·¥§¥ë API */ +/***en @defgroup m17nShell SHELL API + @brief API provided by libm17n.so */ +/***ja @defgroup m17nShell ¥·¥§¥ë API + @brief libm17n.so ¤¬Ä󶡤¹¤ë API */ /*=*/ /* @@ -55,51 +71,6 @@ extern void m17n_fini (void); */ /*=*/ -/*** @ingroup m17nShell */ -/***en @defgroup m17nDatabase Database */ -/***ja @defgroup m17nDatabase ¥Ç¡¼¥¿¥Ù¡¼¥¹ */ -/*=*/ - -/* Directory of an application specific databases. */ -extern char *mdatabase_dir; -/*=*/ -/*** - @ingroup m17nDatabase */ -/***en - @brief Type of database. - - The type #MDatabase is for a database object. Its internal - structure is concealed from an application program. */ -/***ja - @brief ¥Ç¡¼¥¿¥Ù¡¼¥¹¤Î·¿Àë¸À. - - #MDatabase ·¿¤Ï¥Ç¡¼¥¿¥Ù¡¼¥¹¥ª¥Ö¥¸¥§¥¯¥ÈÍѤι½Â¤ÂΤǤ¢¤ë¡£ - ÆâÉô¹½Â¤¤Ï¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¥×¥í¥°¥é¥à¤«¤é¤Ï¸«¤¨¤Ê¤¤¡£ - */ - -typedef struct MDatabase MDatabase; - -/*=*/ - -/* Look for a data. */ -extern MDatabase *mdatabase_find (MSymbol tag1, MSymbol tag2, - MSymbol tag3, MSymbol tag4); - -extern MPlist *mdatabase_list (MSymbol tag0, MSymbol tag1, - MSymbol tag2, MSymbol tag3); - -/* Load a data. */ -void *mdatabase_load (MDatabase *mdb); - -/* Get tags of a data. */ -extern MSymbol *mdatabase_tag (MDatabase *mdb); - -/* Define a data. */ -extern MDatabase *mdatabase_define (MSymbol tag1, MSymbol tag2, - MSymbol tag3, MSymbol tag4, - void *(*loader) (MSymbol *, void *), - void *extra_info); - /*=*/ /* (S2) Charset staffs */ /*=*/ @@ -145,8 +116,6 @@ extern MSymbol Msubset; extern MSymbol Msuperset; /* etc. */ -extern MSymbol Mcharset; - extern MSymbol mchar_define_charset (const char *name, MPlist *plist); extern MSymbol mchar_resolve_charset (MSymbol symbol); @@ -431,14 +400,12 @@ enum MCodingType The dimension of each charset defines the length of bytes to represent a single character of the charset, and a byte sequence directly represents the code-point of a character. - The m17n library provides the default decoding and encoding routines of this type. */ /***ja ¤³¤Î¥¿¥¤¥×¤Î¥³¡¼¥É·Ï¤Ïʸ»ú¥»¥Ã¥È¤òľÀÜ¥µ¥Ý¡¼¥È¤¹¤ë¡£ ³Æʸ»ú¥»¥Ã¥È¤Î¼¡¸µ¤È¤Ï¡¢¤½¤Îʸ»ú¥»¥Ã¥È¤Ç°ìʸ»ú¤òɽ¸½¤¹¤ë¤¿¤á¤ËɬÍפʥХ¤¥È¿ô¤Ç¤¢¤ê¡¢¥Ð¥¤¥ÈÎó¤Ïʸ»ú¤Î¥³¡¼¥É¥Ý¥¤¥ó¥È¤òľÀÜɽ¤¹¡£ - m17n ¥é¥¤¥Ö¥é¥ê¤Ï¤³¤Î¥¿¥¤¥×ÍѤΥǥե©¥ë¥È¤Î¥¨¥ó¥³¡¼¥É¡¿¥Ç¥³¡¼¥É¥ë¡¼¥Æ¥£¥ó¤òÄ󶡤¹¤ë¡£ */ MCODING_TYPE_CHARSET, @@ -446,13 +413,11 @@ enum MCodingType /***en A coding system of this type supports byte sequences of a UTF (UTF-8, UTF-16, UTF-32) like structure. - The m17n library provides the default decoding and encoding routines of this type. */ /***ja ¤³¤Î¥¿¥¤¥×¤Î¥³¡¼¥É·Ï¤Ï¡¢UTF ·Ï (UTF-8, UTF-16, UTF-32) ¤Î¥Ð¥¤¥ÈÎó¤ò¥µ¥Ý¡¼¥È¤¹¤ë¡£ - m17n ¥é¥¤¥Ö¥é¥ê¤Ï¤³¤Î¥¿¥¤¥×ÍѤΥǥե©¥ë¥È¤Î¥¨¥ó¥³¡¼¥É¡¿¥Ç¥³¡¼¥É¥ë¡¼¥Æ¥£¥ó¤òÄ󶡤¹¤ë¡£ */ MCODING_TYPE_UTF, @@ -461,14 +426,12 @@ enum MCodingType A coding system of this type supports byte sequences of an ISO-2022 like structure. The details of each structure are specified by @c MCodingInfoISO2022 . - The m17n library provides decoding and encoding routines of this type. */ /***ja ¤³¤Î¥¿¥¤¥×¤Î¥³¡¼¥É·Ï¤Ï¡¢ISO-2022 ·Ï¤Î¥Ð¥¤¥ÈÎó¤ò¥µ¥Ý¡¼¥È¤¹¤ë¡£ ³Æ¥³¡¼¥É·Ï¤Î¹½Â¤¤Î¾ÜºÙ¤Ï @c MCodingInfoISO2022 ¤Ç»ØÄꤵ¤ì¤ë¡£ - m17n ¥é¥¤¥Ö¥é¥ê¤Ï¤³¤Î¥¿¥¤¥×ÍѤΥǥե©¥ë¥È¤Î¥¨¥ó¥³¡¼¥É¡¿¥Ç¥³¡¼¥É¥ë¡¼¥Æ¥£¥ó¤òÄ󶡤¹¤ë¡£ */ MCODING_TYPE_ISO_2022, @@ -476,14 +439,12 @@ enum MCodingType /***en A coding system of this type is for byte sequences of miscellaneous structures. - The m17n library does not provide decoding and encoding routines of this type. They must be provided by the application program. */ /***ja ¤³¤Î¥¿¥¤¥×¤Î¥³¡¼¥É·Ï¤Ï¡¢¤½¤Î¾¤Î¹½Â¤¤Î¥Ð¥¤¥ÈÎó¤Î¤¿¤á¤Î¤â¤Î¤Ç¤¢¤ë¡£ - m17n ¥é¥¤¥Ö¥é¥ê¤Ï¤³¤Î¥¿¥¤¥×ÍѤΥ¨¥ó¥³¡¼¥É¡¿¥Ç¥³¡¼¥É¥ë¡¼¥Æ¥£¥ó¤òÄ󶡤·¤Ê¤¤¤Î¤Ç¡¢¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¥×¥í¥°¥é¥à¦¤Ç½àÈ÷¤¹¤ëɬÍפ¬¤¢¤ë¡£ */ MCODING_TYPE_MISC @@ -718,7 +679,7 @@ typedef struct ending by them. On encoding, produce byte sequence according to @c endian with heading BOM. - If is 8, the value has no meaning. */ + If \ is 8, the value has no meaning. */ /***ja ÀèƬ¤Î BOM (¥Ð¥¤¥È¥ª¡¼¥À¡¼¥Þ¡¼¥¯) ¤Î¼è¤ê°·¤¤¤ò»ØÄꤹ¤ë¡£ÃÍ¤Ï 0, @@ -741,12 +702,12 @@ typedef struct Specify the endian type. The value must be 0 or 1. 0 means little endian, and 1 means big endian. - If is 8, the value has no meaning. */ + If \ is 8, the value has no meaning. */ /***ja ¥¨¥ó¥Ç¥£¥¢¥ó¤Î¥¿¥¤¥×¤ò»ØÄꤹ¤ë¡£ÃÍ¤Ï 0 ¤« 1 ¤Ç¤¢¤ê¡¢0 ¤Ê¤é¤Ð¥ê¥È¥ë¥¨¥ó¥Ç¥£¥¢¥ó¡¢1 ¤Ê¤é¤Ð¥Ó¥Ã¥°¥¨¥ó¥Ç¥£¥¢¥ó¤Ç¤¢¤ë¡£ - ¤¬ 8 ¤Î¾ì¹ç¤Ë¤Ï¡¢¤³¤ÎÃͤϰÕÌ£¤ò»ý¤¿¤Ê¤¤¡£ + \ ¤¬ 8 ¤Î¾ì¹ç¤Ë¤Ï¡¢¤³¤ÎÃͤϰÕÌ£¤ò»ý¤¿¤Ê¤¤¡£ */ int endian; } MCodingInfoUTF; @@ -847,7 +808,8 @@ extern MPlist *mlanguage_list (void); extern MSymbol mlanguage_code (MSymbol language, int len); -extern MSymbol mlanguage_name (MSymbol language); +extern MPlist *mlanguage_name_list (MSymbol language, MSymbol target, + MSymbol script, MSymbol territory); extern MText *mlanguage_text (MSymbol language); @@ -855,6 +817,8 @@ extern MPlist *mscript_list (void); extern MPlist *mscript_language_list (MSymbol script); +extern MSymbol mlanguage_name (MSymbol language); + extern MLocale *mlocale_set (int category, const char *locale); extern MSymbol mlocale_get_prop (MLocale *locale, MSymbol key); @@ -889,22 +853,28 @@ extern MText *mtext_toupper (MText *mt); /*** @addtogroup m17nInputMethod @{ */ - +/*=*/ /* Struct forward declaration. */ +/*** + @brief See struct MInputMethod */ typedef struct MInputMethod MInputMethod; +/*=*/ +/*** + @brief See struct MInputContext */ typedef struct MInputContext MInputContext; +/*=*/ /***en @brief Type of input method callback functions. This is the type of callback functions called from input method - drivers. #IC is a pointer to an input context, #COMMAND is a name + drivers. $IC is a pointer to an input context, $COMMAND is a name of callback for which the function is called. */ /***ja @brief ÆþÎϥ᥽¥Ã¥É¥³¡¼¥ë¥Ð¥Ã¥¯´Ø¿ô¤Î·¿Àë¸À. - ÆþÎϥ᥽¥Ã¥É¤«¤é¸Æ¤Ð¤ì¤ë¥³¡¼¥ë¥Ð¥Ã¥¯´Ø¿ô¤Î·¿¤Ç¤¢¤ë¡£#IC - ¤ÏÆþÎÏ¥³¥ó¥Æ¥¯¥¹¥È¤Ø¤Î¥Ý¥¤¥ó¥¿¡¢#COMMAND ¤Ï´Ø¿ô¤¬¸Æ¤Ð¤ì¤ë¥³¡¼¥ë¥Ð¥Ã¥¯¤Î̾Á°¤Ç¤¢¤ë¡£ */ + ÆþÎϥ᥽¥Ã¥É¤«¤é¸Æ¤Ð¤ì¤ë¥³¡¼¥ë¥Ð¥Ã¥¯´Ø¿ô¤Î·¿¤Ç¤¢¤ë¡£$IC + ¤ÏÆþÎÏ¥³¥ó¥Æ¥¯¥¹¥È¤Ø¤Î¥Ý¥¤¥ó¥¿¡¢$COMMAND ¤Ï´Ø¿ô¤¬¸Æ¤Ð¤ì¤ë¥³¡¼¥ë¥Ð¥Ã¥¯¤Î̾Á°¤Ç¤¢¤ë¡£ */ typedef void (*MInputCallbackFunc) (MInputContext *ic, MSymbol command); /*=*/ @@ -926,7 +896,7 @@ typedef struct MInputDriver @brief Open an input method. This function opens the input method $IM. It is called from the - function minput_open_im () after all member of $IM but + function minput_open_im () after all member of $IM but \ set. If opening $IM succeeds, it returns 0. Otherwise, it returns -1. The function can setup $IM->info to keep various information that is referred by the other driver functions. */ @@ -934,7 +904,7 @@ typedef struct MInputDriver /***ja @brief ÆþÎϥ᥽¥Ã¥É¤ò¥ª¡¼¥×¥ó¤¹¤ë. - ¤³¤Î´Ø¿ô¤Ï¡¢ÆþÎϥ᥽¥Ã¥É $IM ¤ò¥ª¡¼¥×¥ó¤¹¤ë¡£$IM ¤Î + ¤³¤Î´Ø¿ô¤Ï¡¢ÆþÎϥ᥽¥Ã¥É $IM ¤ò¥ª¡¼¥×¥ó¤¹¤ë¡£$IM ¤Î \ °Ê³°¤ÎÁ´¥á¥ó¥Ð¡¼¤¬¥»¥Ã¥È¤µ¤ì¤¿¸å¤Ç¡¢´Ø¿ô minput_open_im () ¤«¤é¸Æ¤Ð¤ì¤ë¡£$IM ¤ò¥ª¡¼¥×¥ó¤Ç¤­¤ì¤Ð 0 ¤ò¡¢¤Ç¤­¤Ê¤±¤ì¤Ð -1¤òÊÖ¤¹¡£ ¤³¤Î´Ø¿ô¤Ï $IM->info @@ -969,7 +939,7 @@ typedef struct MInputDriver This function creates the input context $IC. It is called from the function minput_create_ic () after all members of $IC but - are set. If creating $IC succeeds, it returns 0. + \ are set. If creating $IC succeeds, it returns 0. Otherwise, it returns -1. The function can setup $IC->info to keep various information that is referred by the other driver functions. */ @@ -978,7 +948,7 @@ typedef struct MInputDriver @brief ÆþÎÏ¥³¥ó¥Æ¥¯¥¹¥È¤òÀ¸À®¤¹¤ë. ¤³¤Î´Ø¿ô¤ÏÆþÎÏ¥³¥ó¥Æ¥¯¥¹¥È $IC ¤òÀ¸À®¤¹¤ë¡£ - $IC ¤Î °Ê³°¤ÎÁ´¥á¥ó¥Ð¡¼¤¬¥»¥Ã¥È¤µ¤ì¤¿¸å¤Ç¡¢´Ø¿ô + $IC ¤Î \ °Ê³°¤ÎÁ´¥á¥ó¥Ð¡¼¤¬¥»¥Ã¥È¤µ¤ì¤¿¸å¤Ç¡¢´Ø¿ô minput_create_ic () ¤«¤é¸Æ¤Ð¤ì¤ë¡£ $IC ¤òÀ¸À®¤Ç¤­¤ì¤Ð 0 ¤ò¡¢¤Ç¤­¤Ê¤±¤ì¤Ð -1 ¤òÊÖ¤¹¡£ ¤³¤Î´Ø¿ô¤Ï $IC->info ¤òÀßÄꤷ¤Æ¡¢Â¾¤Î¥É¥é¥¤¥Ð´Ø¿ô¤«¤é»²¾È¤µ¤ì¤ë¾ðÊó¤òÊÝ»ý¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£ */ @@ -1018,7 +988,7 @@ typedef struct MInputDriver It may update $IC->status, $IC->preedit, $IC->cursor_pos, $IC->ncandidates, $IC->candidates, and $IC->produced if that is - necessary for the member . + necessary for the member \. The meaning of $ARG depends on the input method river. See the documentation of @c minput_default_driver and @c @@ -1034,7 +1004,7 @@ typedef struct MInputDriver ¤¬ÆþÎϥ᥽¥Ã¥É¤ËµÛ¼ý¤µ¤ì¤Æ¥Æ¥­¥¹¥È¤¬À¸À®¤µ¤ì¤Ê¤«¤Ã¤¿¾ì¹ç¤Ë¤Ï¡¢ 1 ¤òÊÖ¤¹¡£¤½¤¦¤Ç¤Ê¤±¤ì¤Ð 0 ¤òÊÖ¤¹¡£ - ¥á¥ó¥Ð ¤ËɬÍפǤ¢¤ì¤Ð¡¢$IC->status, $IC->preedit, + ¥á¥ó¥Ð \ ¤ËɬÍפǤ¢¤ì¤Ð¡¢$IC->status, $IC->preedit, $IC->cursor_pos, $IC->ncandidates, $IC->candidates, $IC->produced ¤ò¹¹¿·¤Ç¤­¤ë¡£ @@ -1075,31 +1045,34 @@ typedef struct MInputDriver @brief List of callback functions. List of callback functions. Keys are one of - #Minput_preedit_start, #Minput_preedit_draw, - #Minput_preedit_done, #Minput_status_start, #Minput_status_draw, - #Minput_status_done, #Minput_candidates_start, - #Minput_candidates_draw, #Minput_candidates_done, - #Minput_set_spot, #Minput_toggle, #Minput_reset, - #Minput_get_surrounding_text, #Minput_delete_surrounding_text. + @b Minput_preedit_start, @b Minput_preedit_draw, + @b Minput_preedit_done, @b Minput_status_start, @b Minput_status_draw, + @b Minput_status_done, @b Minput_candidates_start, + @b Minput_candidates_draw, @b Minput_candidates_done, + @b Minput_set_spot, @b Minput_toggle, @b Minput_reset, + @b Minput_get_surrounding_text, @b Minput_delete_surrounding_text. Values are functions of type #MInputCallbackFunc. */ /***ja @brief ¥³¡¼¥ë¥Ð¥Ã¥¯´Ø¿ô¤Î¥ê¥¹¥È. ¥³¡¼¥ë¥Ð¥Ã¥¯´Ø¿ô¤Î¥ê¥¹¥È¡£¥­¡¼¤Ï¼¡¤Î¤¤¤º¤ì¤«¡£ - #Minput_preedit_start, #Minput_preedit_draw, - #Minput_preedit_done, #Minput_status_start, #Minput_status_draw, - #Minput_status_done, #Minput_candidates_start, - #Minput_candidates_draw, #Minput_candidates_done, - #Minput_set_spot, #Minput_toggle, #Minput_reset, - #Minput_get_surrounding_text, #Minput_delete_surrounding_text¡£ + @b Minput_preedit_start, @b Minput_preedit_draw, + @b Minput_preedit_done, @b Minput_status_start, @b Minput_status_draw, + @b Minput_status_done, @b Minput_candidates_start, + @b Minput_candidates_draw, @b Minput_candidates_done, + @b Minput_set_spot, @b Minput_toggle, @b Minput_reset, + @b Minput_get_surrounding_text, @b Minput_delete_surrounding_text¡£ ÃͤÏ#MInputCallbackFunc ·¿¤Î´Ø¿ô¡£ */ MPlist *callback_list; } MInputDriver; /*=*/ +/*** @} */ +/*=*/ extern MInputDriver minput_default_driver; +extern MSymbol Minput_method; extern MSymbol Minput_driver; extern MInputDriver *minput_driver; @@ -1125,6 +1098,14 @@ extern MSymbol Minput_focus_move; extern MSymbol Minput_focus_in; extern MSymbol Minput_focus_out; +/** Symbols describing input method command/variable. */ +extern MSymbol Minherited; +extern MSymbol Mcustomized; +extern MSymbol Mconfigured; + +/*** @addtogroup m17nInputMethod + @{ */ +/*=*/ /***en @brief Structure of input method. @@ -1158,9 +1139,9 @@ struct MInputMethod /***ja minput_open_im () ¤ËÅϤµ¤ì¤ë°ú¿ô¡£ */ void *arg; - /***en Pointer to extra information that .open_im () + /***en Pointer to extra information that \.open_im () setups. */ - /***ja .open_im () ¤¬ÀßÄꤹ¤ëÄɲþðÊó¤Ø¤Î¥Ý¥¤¥ó¥¿¡£ */ + /***ja \.open_im () ¤¬ÀßÄꤹ¤ëÄɲþðÊó¤Ø¤Î¥Ý¥¤¥ó¥¿¡£ */ void *info; }; @@ -1208,7 +1189,7 @@ struct MInputContext ¤Ë¤è¤Ã¤ÆÀßÄꤵ¤ì¤ë¡£ */ MText *produced; - /***en Argument given to the function minput_create_im (). */ + /***en Argument given to the function minput_create_ic (). */ /***ja ´Ø¿ô minput_create_ic () ¤ËÅϤµ¤ì¤ë°ú¿ô¡£ */ void *arg; @@ -1239,23 +1220,23 @@ struct MInputContext /***ja ¥¹¥Ý¥Ã¥È¾å¤Î M-text¡¢¤Þ¤¿¤Ï NULL. */ MText *mt; - /***en Character position in at the spot. */ - /***ja ¤Ë¤ª¤±¤ë¥¹¥Ý¥Ã¥È¤Îʸ»ú°ÌÃÖ. */ + /***en Character position in \ at the spot. */ + /***ja \ ¤Ë¤ª¤±¤ë¥¹¥Ý¥Ã¥È¤Îʸ»ú°ÌÃÖ. */ int pos; } spot; /***en The usage of the following members depends on the input method driver. The descriptions below are for the driver of an internal input method. They are set by the function - ->driver.filter (). */ + \->driver.filter (). */ /***ja °Ê²¼¤Î¥á¥ó¥Ð¤Î»ÈÍÑË¡¤ÏÆþÎϥ᥽¥Ã¥É¥É¥é¥¤¥Ð¤Ë¤è¤Ã¤Æ°Û¤Ê¤ë¡£ °Ê²¼¤ÎÀâÌÀ¤Ï¡¢ÆâÉôÆþÎϥ᥽¥Ã¥ÉÍѤÎÆþÎϥɥ饤¥Ð¤ËÂФ¹¤ë¤â¤Î¤Ç¤¢¤ë¡£ - ¤³¤ì¤é¤Ï´Ø¿ô ->driver.filter () ¤Ë¤è¤Ã¤ÆÀßÄꤵ¤ì¤ë¡£ */ + ¤³¤ì¤é¤Ï´Ø¿ô \->driver.filter () ¤Ë¤è¤Ã¤ÆÀßÄꤵ¤ì¤ë¡£ */ - /***en Pointer to extra information that ->driver.create_ic () + /***en Pointer to extra information that \->driver.create_ic () setups. It is used to record the internal state of the input context. */ - /***ja ->driver.create_ic () ¤¬ÀßÄꤹ¤ëÄɲþðÊó¤Ø¤Î¥Ý¥¤¥ó¥¿¡£ + /***ja \->driver.create_ic () ¤¬ÀßÄꤹ¤ëÄɲþðÊó¤Ø¤Î¥Ý¥¤¥ó¥¿¡£ ÆþÎÏ¥³¥ó¥Æ¥¯¥¹¥È¤ÎÆâÉô¾õÂÖ¤òµ­Ï¿¤¹¤ë¤¿¤á¤ËÍѤ¤¤é¤ì¤ë¡£ */ void *info; @@ -1264,31 +1245,31 @@ struct MInputContext /***ja ÆþÎÏ¥³¥ó¥Æ¥¯¥¹¥È¤Î¸½ºß¤Î¾õÂÖ¤òɽ¤¹ M-text */ MText *status; - /***en The function ->driver.filter () sets the value to 1 when - it changes . */ - /***ja ´Ø¿ô ->driver.filter () ¤Ï¡¢ ¤òÊѤ¨¤¿ºÝ¤Ë¤³¤ÎÃͤò 1 + /***en The function \->driver.filter () sets the value to 1 when + it changes \. */ + /***ja ´Ø¿ô \->driver.filter () ¤Ï¡¢\ ¤òÊѤ¨¤¿ºÝ¤Ë¤³¤ÎÃͤò 1 ¤ËÀßÄꤹ¤ë¡£ */ int status_changed; /***en M-text containing the current preedit text. The function - ->driver.filter () sets the value. */ + \->driver.filter () sets the value. */ /***ja ¸½ºß¤Î preedit ¥Æ¥­¥¹¥È¤ò´Þ¤à M-text¡£´Ø¿ô - ->driver.filter () ¤Ë¤è¤Ã¤ÆÀßÄꤵ¤ì¤ë¡£ */ + \->driver.filter () ¤Ë¤è¤Ã¤ÆÀßÄꤵ¤ì¤ë¡£ */ MText *preedit; - /***en The function ->driver.filter () sets the value to 1 when - it changes . */ - /***ja ´Ø¿ô ->driver.filter () ¤Ï¡¢ ¤òÊѤ¨¤¿ºÝ¤Ë¤³¤ÎÃͤò + /***en The function \->driver.filter () sets the value to 1 when + it changes \. */ + /***ja ´Ø¿ô \->driver.filter () ¤Ï¡¢\ ¤òÊѤ¨¤¿ºÝ¤Ë¤³¤ÎÃͤò 1 ¤ËÀßÄꤹ¤ë¡£ */ int preedit_changed; - /***en Cursor position of . */ - /***ja ¤Î¥«¡¼¥½¥ë°ÌÃÖ */ + /***en Cursor position of \. */ + /***ja \¤Î¥«¡¼¥½¥ë°ÌÃÖ */ int cursor_pos; - /***en The function ->driver.filter () sets the value to 1 when - it changes . */ - /***ja ´Ø¿ô ->driver.filter () ¤Ï¡¢ ¤òÊѤ¨¤¿ºÝ¤Ë¤³¤ÎÃͤò + /***en The function \->driver.filter () sets the value to 1 when + it changes \. */ + /***ja ´Ø¿ô \->driver.filter () ¤Ï¡¢\ ¤òÊѤ¨¤¿ºÝ¤Ë¤³¤ÎÃͤò 1 ¤ËÀßÄꤹ¤ë¡£ */ int cursor_pos_changed; @@ -1314,46 +1295,50 @@ struct MInputContext */ int candidate_index; + /* @{ */ /***en Start and the end positions of the preedit text where - corresponds to. */ - /***ja preedit ¥Æ¥­¥¹¥ÈÃæ¤Ç¡¢¤ËÂбþ¤¹¤ëºÇ½é¤ÈºÇ¸å¤Î°ÌÃÖ¡£ + \ corresponds to. */ + /***ja preedit ¥Æ¥­¥¹¥ÈÃæ¤Ç¡¢\¤ËÂбþ¤¹¤ëºÇ½é¤ÈºÇ¸å¤Î°ÌÃÖ¡£ */ int candidate_from, candidate_to; + /* @} */ /***en Flag telling whether the current candidate group must be - shown or not. The function ->driver.filter () sets the + shown or not. The function \->driver.filter () sets the value to 1 when an input method required to show candidates, and sets the value to 0 otherwise. */ /***ja ¸½ºß¤Î¸õÊ䥰¥ë¡¼¥×¤òɽ¼¨¤¹¤ë¤«¤É¤¦¤«¤ò¼¨¤¹¥Õ¥é¥°¡£ - ´Ø¿ô ->driver.filter () ¤Ï¡¢ÆþÎϥ᥽¥Ã¥É¤¬¸õÊä¤Îɽ¼¨¤òÍ׵ᤷ¤¿»þ¤³¤ÎÃͤò + ´Ø¿ô \->driver.filter () ¤Ï¡¢ÆþÎϥ᥽¥Ã¥É¤¬¸õÊä¤Îɽ¼¨¤òÍ׵ᤷ¤¿»þ¤³¤ÎÃͤò 1 ¤Ë¡¢¤½¤ì°Ê³°¤Î»þ 0 ¤ËÀßÄꤹ¤ë¡£ */ int candidate_show; - /***en The function ->driver.filter () sets the value to bitwise + /***en The function \->driver.filter () sets the value to bitwise OR of @c enum @c MInputCandidatesChanged when it changed any of - the above members (), and sets the value to 0 + the above members (\), and sets the value to 0 otherwise. */ - /***ja ´Ø¿ô ->driver.filter () ¤Ï¡¢¾åµ­¤Î¥á¥ó¥Ð + /***ja ´Ø¿ô \->driver.filter () ¤Ï¡¢¾åµ­¤Î¥á¥ó¥Ð \ ¤Î£±¤Ä¤Ç¤âÊѹ¹¤·¤¿ºÝ¤Ë¤Ï¡¢¤³¤ÎÃͤò @c enum @c MInputCandidatesChanged ¤Î¥Ó¥Ã¥Èñ°Ì¤Ç¤ÎÏÀÍý OR ¤ËÀßÄꤹ¤ë¡£¤½¤¦ ¤Ç¤Ê¤±¤ì¤Ð 0 ¤ËÀßÄꤹ¤ë¡£ */ int candidates_changed; - /***en Plist that can be freely used by ->driver functions. + /***en Plist that can be freely used by \->driver functions. The driver of internal input method uses it to exchange extra arguments and result for callback functions. The function - ->driver.create_ic () sets this to an empty plist, and the - function ->driver.destroy_ic () frees it by using + \->driver.create_ic () sets this to an empty plist, and the + function \->driver.destroy_ic () frees it by using m17n_object_unref (). */ - /***ja ->driver ¤Î´Ø¿ô·²¤Ë¤è¤Ã¤Æ¼«Í³¤Ë»ÈÍѤǤ­¤ë plist¡£ + /***ja \->driver ¤Î´Ø¿ô·²¤Ë¤è¤Ã¤Æ¼«Í³¤Ë»ÈÍѤǤ­¤ë plist¡£ ÆâÉôÆþÎϥ᥽¥Ã¥ÉÍѥɥ饤¥Ð¤Ï¤³¤ì¤ò¥³¡¼¥ë¥Ð¥Ã¥¯´Ø¿ô¤È¤Î°ú¿ô¤äÊÖÃÍ - ¤Î¼õÅϤ·¤Ë»ÈÍѤ¹¤ë¡£´Ø¿ô ->driver.create_ic () ¤Ï¤³¤Î plist - ¤ò¶õ¤ËÀßÄꤹ¤ë¡£´Ø¿ô->driver.destroy_ic () ¤Ï + ¤Î¼õÅϤ·¤Ë»ÈÍѤ¹¤ë¡£´Ø¿ô \->driver.create_ic () ¤Ï¤³¤Î plist + ¤ò¶õ¤ËÀßÄꤹ¤ë¡£´Ø¿ô\->driver.destroy_ic () ¤Ï m17n_object_unref () ¤òÍѤ¤¤Æ¤³¤Î plist ¤ò²òÊü¤¹¤ë¡£ */ MPlist *plist; }; /*=*/ +/*** @} */ +/*=*/ extern MInputMethod *minput_open_im (MSymbol language, MSymbol name, void *arg); @@ -1388,8 +1373,12 @@ extern MPlist *minput_get_variable (MSymbol language, MSymbol name, MSymbol variable); extern int minput_config_variable (MSymbol language, MSymbol name, MSymbol variable, MPlist *value); +extern char *minput_config_file (void); + extern int minput_save_config (void); +extern int minput_callback (MInputContext *ic, MSymbol command); + /* obsolete functions */ extern MPlist *minput_get_commands (MSymbol language, MSymbol name); @@ -1399,15 +1388,12 @@ extern MPlist *minput_get_variables (MSymbol language, MSymbol name); extern int minput_set_variable (MSymbol language, MSymbol name, MSymbol variable, void *value); -/*=*/ -/*** @} */ -extern MInputMethod *mdebug_dump_im (MInputMethod *im, int indent); +extern MPlist *minput_list (MSymbol lang); +extern MInputMethod *mdebug_dump_im (MInputMethod *im, int indent); -#ifdef __cplusplus -} -#endif +M17N_END_HEADER #endif /* _M17N_H_ */