X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fm17n.h;h=37b8301421989f465102bcf354c7db69ace1b013;hb=051688596a161b1da8f44a3b80ff2aa9a16cf83d;hp=178feccbd37d0e8d3191e3a98a40e2b0597b071d;hpb=55bd0686c24745b2aeddf7877aa12e98ebb8cec8;p=m17n%2Fm17n-lib.git diff --git a/src/m17n.h b/src/m17n.h index 178fecc..37b8301 100644 --- a/src/m17n.h +++ b/src/m17n.h @@ -1068,7 +1068,8 @@ typedef struct MInputDriver #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_set_spot, #Minput_toggle, #Minput_reset, + #Minput_get_surrounding_text, #Minput_delete_surrounding_text. Values are functions of type #MInputCallbackFunc. */ /***ja @brief ¥³¡¼¥ë¥Ð¥Ã¥¯´Ø¿ô¤Î¥ê¥¹¥È. @@ -1078,7 +1079,8 @@ typedef struct MInputDriver #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_set_spot, #Minput_toggle, #Minput_reset, + #Minput_get_surrounding_text, #Minput_delete_surrounding_text¡£ ÃͤÏ#MInputCallbackFunc ·¿¤Î´Ø¿ô¡£ */ MPlist *callback_list; @@ -1104,6 +1106,8 @@ extern MSymbol Minput_candidates_done; extern MSymbol Minput_set_spot; extern MSymbol Minput_toggle; extern MSymbol Minput_reset; +extern MSymbol Minput_get_surrounding_text; +extern MSymbol Minput_delete_surrounding_text; /** Symbols for special input key event. */ extern MSymbol Minput_focus_move; @@ -1152,6 +1156,23 @@ struct MInputMethod /*=*/ /***en + @brief Bit-masks to specify how candidates of input method is changed. */ + +/***ja + @brief ÆþÎϥ᥽¥Ã¥É¤ÎÆþÎϸõÊ䤬¤É¤¦Êѹ¹¤µ¤ì¤¿¤«¤ò¼¨¤¹¥Ó¥Ã¥È¥Þ¥¹¥¯. */ + +enum MInputCandidatesChanged + { + MINPUT_CANDIDATES_LIST_CHANGED = 1, + MINPUT_CANDIDATES_INDEX_CHANGED = 2, + MINPUT_CANDIDATES_SHOW_CHANGED = 4, + MINPUT_CANDIDATES_CHANGED_MAX + }; + + +/*=*/ + +/***en @brief Structure of input context. The type @c MInputContext is the structure of input context @@ -1297,23 +1318,27 @@ struct MInputContext 1 ¤Ë¡¢¤½¤ì°Ê³°¤Î»þ 0 ¤ËÀßÄꤹ¤ë¡£ */ int candidate_show; - /***en The function ->driver.filter () sets the value to 1 when - it changed any of the above members (), and sets - the value to 0 otherwise. */ - /***ja ´Ø¿ô ->driver.filter () ¤Ï¡¢¾åµ­¤Î¥á¥ó¥Ð - ¤Î£±¤Ä¤Ç¤âÊѹ¹¤·¤¿ºÝ¤Ë¤Ï¡¢¤³¤ÎÃͤò 1 ¤ËÀßÄꤹ¤ë¡£¤½¤¦¤Ç¤Ê¤±¤ì¤Ð 0 ¤ËÀßÄꤹ¤ë¡£ */ + /***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 + otherwise. */ + /***ja ´Ø¿ô ->driver.filter () ¤Ï¡¢¾åµ­¤Î¥á¥ó¥Ð + ¤Î£±¤Ä¤Ç¤âÊѹ¹¤·¤¿ºÝ¤Ë¤Ï¡¢¤³¤ÎÃͤò @c enum @c + MInputCandidatesChanged ¤Î¥Ó¥Ã¥Èñ°Ì¤Ç¤ÎÏÀÍý OR ¤ËÀßÄꤹ¤ë¡£¤½¤¦ + ¤Ç¤Ê¤±¤ì¤Ð 0 ¤ËÀßÄꤹ¤ë¡£ */ int candidates_changed; /***en Plist that can be freely used by ->driver functions. - The driver of internal input method never use it. The function + 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 m17n_object_unref (). */ /***ja ->driver ¤Î´Ø¿ô·²¤Ë¤è¤Ã¤Æ¼«Í³¤Ë»ÈÍѤǤ­¤ë plist¡£ - ÆâÉôÆþÎϥ᥽¥Ã¥ÉÍѥɥ饤¥Ð¤Ï¤³¤ì¤ò»ÈÍѤ·¤Ê¤¤¡£´Ø¿ô - ->driver.create_ic () ¤Ï¤³¤Î plist ¤ò¶õ¤ËÀßÄꤹ¤ë¡£´Ø¿ô - ->driver.destroy_ic () ¤Ï m17n_object_unref () ¤òÍѤ¤¤Æ¤³¤Î - plist ¤ò²òÊü¤¹¤ë¡£ */ + ÆâÉôÆþÎϥ᥽¥Ã¥ÉÍѥɥ饤¥Ð¤Ï¤³¤ì¤ò¥³¡¼¥ë¥Ð¥Ã¥¯´Ø¿ô¤È¤Î°ú¿ô¤äÊÖÃÍ + ¤Î¼õÅϤ·¤Ë»ÈÍѤ¹¤ë¡£´Ø¿ô ->driver.create_ic () ¤Ï¤³¤Î plist + ¤ò¶õ¤ËÀßÄꤹ¤ë¡£´Ø¿ô->driver.destroy_ic () ¤Ï + m17n_object_unref () ¤òÍѤ¤¤Æ¤³¤Î plist ¤ò²òÊü¤¹¤ë¡£ */ MPlist *plist; }; @@ -1343,10 +1368,10 @@ extern void minput_toggle (MInputContext *ic); extern void minput_reset_ic (MInputContext *ic); -extern MSymbol Mdetail_text; - extern MText *minput_get_description (MSymbol language, MSymbol name); +extern MPlist *minput_get_title_icon (MSymbol language, MSymbol name); + extern MPlist *minput_get_commands (MSymbol language, MSymbol name); extern int minput_assign_command_keys (MSymbol language, MSymbol name,