(minput_list): Extern it.
[m17n/m17n-lib.git] / src / m17n.h
index 0ab915a..1d3a855 100644 (file)
@@ -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
 
@@ -853,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);
 /*=*/
@@ -1039,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;
@@ -1094,6 +1103,9 @@ extern MSymbol Minherited;
 extern MSymbol Mcustomized;
 extern MSymbol Mconfigured;
 
+/*** @addtogroup m17nInputMethod 
+     @{ */
+/*=*/
 /***en
     @brief Structure of input method.
 
@@ -1177,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;
 
@@ -1216,15 +1228,15 @@ struct MInputContext
   /***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;
 
@@ -1233,21 +1245,21 @@ struct MInputContext
   /***ja ÆþÎÏ¥³¥ó¥Æ¥¯¥¹¥È¤Î¸½ºß¤Î¾õÂÖ¤òɽ¤¹ M-text  */
   MText *status;
 
-  /***en The function <im>->driver.filter () sets the value to 1 when
+  /***en The function \<im\>->driver.filter () sets the value to 1 when
       it changes \<status\>.  */
-  /***ja ´Ø¿ô <im>->driver.filter () ¤Ï¡¢\<status\> ¤òÊѤ¨¤¿ºÝ¤Ë¤³¤ÎÃͤò 1 
+  /***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
+  /***en The function \<im\>->driver.filter () sets the value to 1 when
       it changes \<preedit\>.  */
-  /***ja ´Ø¿ô <im>->driver.filter () ¤Ï¡¢\<preedit\> ¤òÊѤ¨¤¿ºÝ¤Ë¤³¤ÎÃͤò 
+  /***ja ´Ø¿ô \<im\>->driver.filter () ¤Ï¡¢\<preedit\> ¤òÊѤ¨¤¿ºÝ¤Ë¤³¤ÎÃͤò 
       1 ¤ËÀßÄꤹ¤ë¡£  */
   int preedit_changed;
 
@@ -1255,9 +1267,9 @@ struct MInputContext
   /***ja \<preedit\>¤Î¥«¡¼¥½¥ë°ÌÃÖ  */
   int cursor_pos;
 
-  /***en The function <im>->driver.filter () sets the value to 1 when
+  /***en The function \<im\>->driver.filter () sets the value to 1 when
       it changes \<cursor_pos\>.  */
-  /***ja ´Ø¿ô <im>->driver.filter () ¤Ï¡¢\<cursor_pos\> ¤òÊѤ¨¤¿ºÝ¤Ë¤³¤ÎÃͤò 
+  /***ja ´Ø¿ô \<im\>->driver.filter () ¤Ï¡¢\<cursor_pos\> ¤òÊѤ¨¤¿ºÝ¤Ë¤³¤ÎÃͤò 
       1 ¤ËÀßÄꤹ¤ë¡£  */
   int cursor_pos_changed;
 
@@ -1283,46 +1295,50 @@ struct MInputContext
       */
   int candidate_index;
 
+  /* @{ */
   /***en Start and the end positions of the preedit text where
        \<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
       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);
@@ -1372,11 +1388,10 @@ 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);
 
 M17N_END_HEADER