*** empty log message ***
[m17n/m17n-lib.git] / src / m17n.h
index c1ec286..49c475d 100644 (file)
@@ -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 <im>->driver.filter () sets the value to 1 when
-      it changed any of the above members (<candidate_XXX>), and sets
-      the value to 0 otherwise.  */
-  /***ja ´Ø¿ô <im>->driver.filter () ¤Ï¡¢¾åµ­¤Î¥á¥ó¥Ð <candidate_XXX> 
-      ¤Î£±¤Ä¤Ç¤âÊѹ¹¤·¤¿ºÝ¤Ë¤Ï¡¢¤³¤ÎÃͤò 1 ¤ËÀßÄꤹ¤ë¡£¤½¤¦¤Ç¤Ê¤±¤ì¤Ð 0 ¤ËÀßÄꤹ¤ë¡£ */
+  /***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
+      otherwise.  */
+  /***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.
-      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
       <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¡£
-      ÆâÉôÆþÎϥ᥽¥Ã¥ÉÍѥɥ饤¥Ð¤Ï¤³¤ì¤ò»ÈÍѤ·¤Ê¤¤¡£´Ø¿ô 
-      <im>->driver.create_ic () ¤Ï¤³¤Î plist ¤ò¶õ¤ËÀßÄꤹ¤ë¡£´Ø¿ô
-      <im>->driver.destroy_ic () ¤Ï m17n_object_unref () ¤òÍѤ¤¤Æ¤³¤Î 
-      plist ¤ò²òÊü¤¹¤ë¡£  */
+      ÆâÉôÆþÎϥ᥽¥Ã¥ÉÍѥɥ饤¥Ð¤Ï¤³¤ì¤ò¥³¡¼¥ë¥Ð¥Ã¥¯´Ø¿ô¤È¤Î°ú¿ô¤äÊÖÃÍ
+      ¤Î¼õÅϤ·¤Ë»ÈÍѤ¹¤ë¡£´Ø¿ô <im>->driver.create_ic () ¤Ï¤³¤Î plist
+      ¤ò¶õ¤ËÀßÄꤹ¤ë¡£´Ø¿ô<im>->driver.destroy_ic () ¤Ï
+      m17n_object_unref () ¤òÍѤ¤¤Æ¤³¤Î plist ¤ò²òÊü¤¹¤ë¡£  */
   MPlist *plist;
 };