/* 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
ending by them. On encoding, produce byte sequence according to
@c endian with heading BOM.
- If <code_unit_bits> is 8, the value has no meaning. */
+ If \<code_unit_bits\> is 8, the value has no meaning. */
/***ja
ÀèƬ¤Î BOM (¥Ð¥¤¥È¥ª¡¼¥À¡¼¥Þ¡¼¥¯) ¤Î¼è¤ê°·¤¤¤ò»ØÄꤹ¤ë¡£ÃÍ¤Ï 0,
Specify the endian type. The value must be 0 or 1. 0 means
little endian, and 1 means big endian.
- If <code_unit_bits> is 8, the value has no meaning. */
+ If \<code_unit_bits\> is 8, the value has no meaning. */
/***ja
¥¨¥ó¥Ç¥£¥¢¥ó¤Î¥¿¥¤¥×¤ò»ØÄꤹ¤ë¡£ÃÍ¤Ï 0 ¤« 1 ¤Ç¤¢¤ê¡¢0
¤Ê¤é¤Ð¥ê¥È¥ë¥¨¥ó¥Ç¥£¥¢¥ó¡¢1 ¤Ê¤é¤Ð¥Ó¥Ã¥°¥¨¥ó¥Ç¥£¥¢¥ó¤Ç¤¢¤ë¡£
- <code_unit_bits> ¤¬ 8 ¤Î¾ì¹ç¤Ë¤Ï¡¢¤³¤ÎÃͤϰÕÌ£¤ò»ý¤¿¤Ê¤¤¡£
+ \<code_unit_bits\> ¤¬ 8 ¤Î¾ì¹ç¤Ë¤Ï¡¢¤³¤ÎÃͤϰÕÌ£¤ò»ý¤¿¤Ê¤¤¡£
*/
int endian;
} MCodingInfoUTF;
/*** @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);
/*=*/
@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 <info>
+ function minput_open_im () after all member of $IM but \<info\>
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. */
/***ja
@brief ÆþÎϥ᥽¥Ã¥É¤ò¥ª¡¼¥×¥ó¤¹¤ë.
- ¤³¤Î´Ø¿ô¤Ï¡¢ÆþÎϥ᥽¥Ã¥É $IM ¤ò¥ª¡¼¥×¥ó¤¹¤ë¡£$IM ¤Î <info>
+ ¤³¤Î´Ø¿ô¤Ï¡¢ÆþÎϥ᥽¥Ã¥É $IM ¤ò¥ª¡¼¥×¥ó¤¹¤ë¡£$IM ¤Î \<info\>
°Ê³°¤ÎÁ´¥á¥ó¥Ð¡¼¤¬¥»¥Ã¥È¤µ¤ì¤¿¸å¤Ç¡¢´Ø¿ô minput_open_im ()
¤«¤é¸Æ¤Ð¤ì¤ë¡£$IM ¤ò¥ª¡¼¥×¥ó¤Ç¤¤ì¤Ð 0 ¤ò¡¢¤Ç¤¤Ê¤±¤ì¤Ð -1¤òÊÖ¤¹¡£
¤³¤Î´Ø¿ô¤Ï $IM->info
This function creates the input context $IC. It is called from
the function minput_create_ic () after all members of $IC but
- <info> are set. If creating $IC succeeds, it returns 0.
+ \<info\> 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. */
@brief ÆþÎÏ¥³¥ó¥Æ¥¯¥¹¥È¤òÀ¸À®¤¹¤ë.
¤³¤Î´Ø¿ô¤ÏÆþÎÏ¥³¥ó¥Æ¥¯¥¹¥È $IC ¤òÀ¸À®¤¹¤ë¡£
- $IC ¤Î <info> °Ê³°¤ÎÁ´¥á¥ó¥Ð¡¼¤¬¥»¥Ã¥È¤µ¤ì¤¿¸å¤Ç¡¢´Ø¿ô
+ $IC ¤Î \<info\> °Ê³°¤ÎÁ´¥á¥ó¥Ð¡¼¤¬¥»¥Ã¥È¤µ¤ì¤¿¸å¤Ç¡¢´Ø¿ô
minput_create_ic () ¤«¤é¸Æ¤Ð¤ì¤ë¡£
$IC ¤òÀ¸À®¤Ç¤¤ì¤Ð 0 ¤ò¡¢¤Ç¤¤Ê¤±¤ì¤Ð -1 ¤òÊÖ¤¹¡£
¤³¤Î´Ø¿ô¤Ï $IC->info ¤òÀßÄꤷ¤Æ¡¢Â¾¤Î¥É¥é¥¤¥Ð´Ø¿ô¤«¤é»²¾È¤µ¤ì¤ë¾ðÊó¤òÊÝ»ý¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£ */
It may update $IC->status, $IC->preedit, $IC->cursor_pos,
$IC->ncandidates, $IC->candidates, and $IC->produced if that is
- necessary for the member <callback>.
+ necessary for the member \<callback\>.
The meaning of $ARG depends on the input method river. See the
documentation of @c minput_default_driver and @c
¤¬ÆþÎϥ᥽¥Ã¥É¤ËµÛ¼ý¤µ¤ì¤Æ¥Æ¥¥¹¥È¤¬À¸À®¤µ¤ì¤Ê¤«¤Ã¤¿¾ì¹ç¤Ë¤Ï¡¢
1 ¤òÊÖ¤¹¡£¤½¤¦¤Ç¤Ê¤±¤ì¤Ð 0 ¤òÊÖ¤¹¡£
- ¥á¥ó¥Ð <callback> ¤ËɬÍפǤ¢¤ì¤Ð¡¢$IC->status, $IC->preedit,
+ ¥á¥ó¥Ð \<callback\> ¤ËɬÍפǤ¢¤ì¤Ð¡¢$IC->status, $IC->preedit,
$IC->cursor_pos, $IC->ncandidates, $IC->candidates,
$IC->produced ¤ò¹¹¿·¤Ç¤¤ë¡£
@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;
extern MSymbol Mcustomized;
extern MSymbol Mconfigured;
+/*** @addtogroup m17nInputMethod
+ @{ */
+/*=*/
/***en
@brief Structure of input method.
/***ja minput_open_im () ¤ËÅϤµ¤ì¤ë°ú¿ô¡£ */
void *arg;
- /***en Pointer to extra information that <driver>.open_im ()
+ /***en Pointer to extra information that \<driver\>.open_im ()
setups. */
- /***ja <driver>.open_im () ¤¬ÀßÄꤹ¤ëÄɲþðÊó¤Ø¤Î¥Ý¥¤¥ó¥¿¡£ */
+ /***ja \<driver\>.open_im () ¤¬ÀßÄꤹ¤ëÄɲþðÊó¤Ø¤Î¥Ý¥¤¥ó¥¿¡£ */
void *info;
};
¤Ë¤è¤Ã¤ÆÀßÄꤵ¤ì¤ë¡£ */
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;
/***ja ¥¹¥Ý¥Ã¥È¾å¤Î M-text¡¢¤Þ¤¿¤Ï NULL. */
MText *mt;
- /***en Character position in <mt> at the spot. */
- /***ja <mt> ¤Ë¤ª¤±¤ë¥¹¥Ý¥Ã¥È¤Îʸ»ú°ÌÃÖ. */
+ /***en Character position in \<mt\> at the spot. */
+ /***ja \<mt\> ¤Ë¤ª¤±¤ë¥¹¥Ý¥Ã¥È¤Îʸ»ú°ÌÃÖ. */
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
- <im>->driver.filter (). */
+ \<im\>->driver.filter (). */
/***ja °Ê²¼¤Î¥á¥ó¥Ð¤Î»ÈÍÑË¡¤ÏÆþÎϥ᥽¥Ã¥É¥É¥é¥¤¥Ð¤Ë¤è¤Ã¤Æ°Û¤Ê¤ë¡£
°Ê²¼¤ÎÀâÌÀ¤Ï¡¢ÆâÉôÆþÎϥ᥽¥Ã¥ÉÍѤÎÆþÎϥɥ饤¥Ð¤ËÂФ¹¤ë¤â¤Î¤Ç¤¢¤ë¡£
- ¤³¤ì¤é¤Ï´Ø¿ô <im>->driver.filter () ¤Ë¤è¤Ã¤ÆÀßÄꤵ¤ì¤ë¡£ */
+ ¤³¤ì¤é¤Ï´Ø¿ô \<im\>->driver.filter () ¤Ë¤è¤Ã¤ÆÀßÄꤵ¤ì¤ë¡£ */
- /***en Pointer to extra information that <im>->driver.create_ic ()
+ /***en Pointer to extra information that \<im\>->driver.create_ic ()
setups. It is used to record the internal state of the input
context. */
- /***ja <im>->driver.create_ic () ¤¬ÀßÄꤹ¤ëÄɲþðÊó¤Ø¤Î¥Ý¥¤¥ó¥¿¡£
+ /***ja \<im\>->driver.create_ic () ¤¬ÀßÄꤹ¤ëÄɲþðÊó¤Ø¤Î¥Ý¥¤¥ó¥¿¡£
ÆþÎÏ¥³¥ó¥Æ¥¯¥¹¥È¤ÎÆâÉô¾õÂÖ¤òµÏ¿¤¹¤ë¤¿¤á¤ËÍѤ¤¤é¤ì¤ë¡£ */
void *info;
/***ja ÆþÎÏ¥³¥ó¥Æ¥¯¥¹¥È¤Î¸½ºß¤Î¾õÂÖ¤òɽ¤¹ M-text */
MText *status;
- /***en The function <im>->driver.filter () sets the value to 1 when
- it changes <status>. */
- /***ja ´Ø¿ô <im>->driver.filter () ¤Ï¡¢<status> ¤òÊѤ¨¤¿ºÝ¤Ë¤³¤ÎÃͤò 1
+ /***en The function \<im\>->driver.filter () sets the value to 1 when
+ it changes \<status\>. */
+ /***ja ´Ø¿ô \<im\>->driver.filter () ¤Ï¡¢\<status\> ¤òÊѤ¨¤¿ºÝ¤Ë¤³¤ÎÃͤò 1
¤ËÀßÄꤹ¤ë¡£ */
int status_changed;
/***en M-text containing the current preedit text. The function
- <im>->driver.filter () sets the value. */
+ \<im\>->driver.filter () sets the value. */
/***ja ¸½ºß¤Î preedit ¥Æ¥¥¹¥È¤ò´Þ¤à M-text¡£´Ø¿ô
- <im>->driver.filter () ¤Ë¤è¤Ã¤ÆÀßÄꤵ¤ì¤ë¡£ */
+ \<im\>->driver.filter () ¤Ë¤è¤Ã¤ÆÀßÄꤵ¤ì¤ë¡£ */
MText *preedit;
- /***en The function <im>->driver.filter () sets the value to 1 when
- it changes <preedit>. */
- /***ja ´Ø¿ô <im>->driver.filter () ¤Ï¡¢<preedit> ¤òÊѤ¨¤¿ºÝ¤Ë¤³¤ÎÃͤò
+ /***en The function \<im\>->driver.filter () sets the value to 1 when
+ it changes \<preedit\>. */
+ /***ja ´Ø¿ô \<im\>->driver.filter () ¤Ï¡¢\<preedit\> ¤òÊѤ¨¤¿ºÝ¤Ë¤³¤ÎÃͤò
1 ¤ËÀßÄꤹ¤ë¡£ */
int preedit_changed;
- /***en Cursor position of <preedit>. */
- /***ja <preedit>¤Î¥«¡¼¥½¥ë°ÌÃÖ */
+ /***en Cursor position of \<preedit\>. */
+ /***ja \<preedit\>¤Î¥«¡¼¥½¥ë°ÌÃÖ */
int cursor_pos;
- /***en The function <im>->driver.filter () sets the value to 1 when
- it changes <cursor_pos>. */
- /***ja ´Ø¿ô <im>->driver.filter () ¤Ï¡¢<cursor_pos> ¤òÊѤ¨¤¿ºÝ¤Ë¤³¤ÎÃͤò
+ /***en The function \<im\>->driver.filter () sets the value to 1 when
+ it changes \<cursor_pos\>. */
+ /***ja ´Ø¿ô \<im\>->driver.filter () ¤Ï¡¢\<cursor_pos\> ¤òÊѤ¨¤¿ºÝ¤Ë¤³¤ÎÃͤò
1 ¤ËÀßÄꤹ¤ë¡£ */
int cursor_pos_changed;
*/
int candidate_index;
+ /* @{ */
/***en Start and the end positions of the preedit text where
- <candidate_list> corresponds to. */
- /***ja preedit ¥Æ¥¥¹¥ÈÃæ¤Ç¡¢<candidate_list>¤ËÂбþ¤¹¤ëºÇ½é¤ÈºÇ¸å¤Î°ÌÃÖ¡£
+ \<candidate_list\> corresponds to. */
+ /***ja preedit ¥Æ¥¥¹¥ÈÃæ¤Ç¡¢\<candidate_list\>¤ËÂбþ¤¹¤ëºÇ½é¤ÈºÇ¸å¤Î°ÌÃÖ¡£
*/
int candidate_from, candidate_to;
+ /* @} */
/***en Flag telling whether the current candidate group must be
- shown or not. The function <im>->driver.filter () sets the
+ shown or not. The function \<im\>->driver.filter () sets the
value to 1 when an input method required to show candidates, and
sets the value to 0 otherwise. */
/***ja ¸½ºß¤Î¸õÊ䥰¥ë¡¼¥×¤òɽ¼¨¤¹¤ë¤«¤É¤¦¤«¤ò¼¨¤¹¥Õ¥é¥°¡£
- ´Ø¿ô <im>->driver.filter () ¤Ï¡¢ÆþÎϥ᥽¥Ã¥É¤¬¸õÊä¤Îɽ¼¨¤òÍ׵ᤷ¤¿»þ¤³¤ÎÃͤò
+ ´Ø¿ô \<im\>->driver.filter () ¤Ï¡¢ÆþÎϥ᥽¥Ã¥É¤¬¸õÊä¤Îɽ¼¨¤òÍ׵ᤷ¤¿»þ¤³¤ÎÃͤò
1 ¤Ë¡¢¤½¤ì°Ê³°¤Î»þ 0 ¤ËÀßÄꤹ¤ë¡£ */
int candidate_show;
- /***en The function <im>->driver.filter () sets the value to bitwise
+ /***en The function \<im\>->driver.filter () sets the value to bitwise
OR of @c enum @c MInputCandidatesChanged when it changed any of
- the above members (<candidate_XXX>), and sets the value to 0
+ the above members (\<candidate_XXX\>), and sets the value to 0
otherwise. */
- /***ja ´Ø¿ô <im>->driver.filter () ¤Ï¡¢¾åµ¤Î¥á¥ó¥Ð <candidate_XXX>
+ /***ja ´Ø¿ô \<im\>->driver.filter () ¤Ï¡¢¾åµ¤Î¥á¥ó¥Ð \<candidate_XXX\>
¤Î£±¤Ä¤Ç¤âÊѹ¹¤·¤¿ºÝ¤Ë¤Ï¡¢¤³¤ÎÃͤò @c enum @c
MInputCandidatesChanged ¤Î¥Ó¥Ã¥Èñ°Ì¤Ç¤ÎÏÀÍý OR ¤ËÀßÄꤹ¤ë¡£¤½¤¦
¤Ç¤Ê¤±¤ì¤Ð 0 ¤ËÀßÄꤹ¤ë¡£ */
int candidates_changed;
- /***en Plist that can be freely used by <im>->driver functions.
+ /***en Plist that can be freely used by \<im\>->driver functions.
The driver of internal input method uses it to exchange extra
arguments and result for callback functions. The function
- <im>->driver.create_ic () sets this to an empty plist, and the
- function <im>->driver.destroy_ic () frees it by using
+ \<im\>->driver.create_ic () sets this to an empty plist, and the
+ function \<im\>->driver.destroy_ic () frees it by using
m17n_object_unref (). */
- /***ja <im>->driver ¤Î´Ø¿ô·²¤Ë¤è¤Ã¤Æ¼«Í³¤Ë»ÈÍѤǤ¤ë plist¡£
+ /***ja \<im\>->driver ¤Î´Ø¿ô·²¤Ë¤è¤Ã¤Æ¼«Í³¤Ë»ÈÍѤǤ¤ë plist¡£
ÆâÉôÆþÎϥ᥽¥Ã¥ÉÍѥɥ饤¥Ð¤Ï¤³¤ì¤ò¥³¡¼¥ë¥Ð¥Ã¥¯´Ø¿ô¤È¤Î°ú¿ô¤äÊÖÃÍ
- ¤Î¼õÅϤ·¤Ë»ÈÍѤ¹¤ë¡£´Ø¿ô <im>->driver.create_ic () ¤Ï¤³¤Î plist
- ¤ò¶õ¤ËÀßÄꤹ¤ë¡£´Ø¿ô<im>->driver.destroy_ic () ¤Ï
+ ¤Î¼õÅϤ·¤Ë»ÈÍѤ¹¤ë¡£´Ø¿ô \<im\>->driver.create_ic () ¤Ï¤³¤Î plist
+ ¤ò¶õ¤ËÀßÄꤹ¤ë¡£´Ø¿ô\<im\>->driver.destroy_ic () ¤Ï
m17n_object_unref () ¤òÍѤ¤¤Æ¤³¤Î plist ¤ò²òÊü¤¹¤ë¡£ */
MPlist *plist;
};
/*=*/
+/*** @} */
+/*=*/
extern MInputMethod *minput_open_im (MSymbol language, MSymbol name,
void *arg);
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);
M17N_END_HEADER