*** empty log message ***
[m17n/m17n-lib.git] / src / m17n.h
index e624822..a423a58 100644 (file)
@@ -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_
@@ -838,12 +838,26 @@ typedef struct MLocale MLocale;
 
 /*=*/
 
-extern MSymbol Mlanguage;
 extern MSymbol Miso639_1, Miso639_2;
 extern MSymbol Mterritory;
 extern MSymbol Mmodifier;
 extern MSymbol Mcodeset;
 
+extern MPlist *mlanguage_list (void);
+
+extern MSymbol mlanguage_code (MSymbol language, int len);
+
+extern MPlist *mlanguage_name_list (MSymbol language, MSymbol target,
+                                   MSymbol script, MSymbol territory);
+
+extern MText *mlanguage_text (MSymbol language);
+
+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);
@@ -1068,7 +1082,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 +1093,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,12 +1120,19 @@ 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;
 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;
+
 /***en
     @brief Structure of input method.
 
@@ -1325,15 +1348,16 @@ struct MInputContext
   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;
 };
 
@@ -1354,28 +1378,39 @@ extern int minput_filter (MInputContext *ic, MSymbol key, void *arg);
 
 extern int minput_lookup (MInputContext *ic, MSymbol key, void *arg,
                          MText *mt);
-
-extern void minput_set_spot (MInputContext *ic, int x, int y,
-                            int ascent, int descent, int fontsize,
-                            MText *mt, int pos);
-
+extern void minput_set_spot (MInputContext *ic, int x, int y, int ascent,
+                            int descent, int fontsize, MText *mt, int pos);
 extern void minput_toggle (MInputContext *ic);
 
 extern void minput_reset_ic (MInputContext *ic);
 
 extern MText *minput_get_description (MSymbol language, MSymbol name);
 
+extern MPlist *minput_get_title_icon (MSymbol language, MSymbol name);
+
+extern MPlist *minput_get_command (MSymbol language, MSymbol name,
+                                  MSymbol command);
+extern int minput_config_command (MSymbol language, MSymbol name,
+                                 MSymbol command, MPlist *keyseq);
+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);
 
 extern int minput_assign_command_keys (MSymbol language, MSymbol name,
                                       MSymbol command, MPlist *keys);
-
 extern MPlist *minput_get_variables (MSymbol language, MSymbol name);
 
 extern int minput_set_variable (MSymbol language, MSymbol name,
                                MSymbol variable, void *value);
-
-
 /*=*/
 /***     @} */