X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;ds=inline;f=src%2Fm17n.h;h=d66c3ff04ce876e16c4323f3282e323c037b8b8c;hb=6803bafaacdfe59594e815c460a1e1e19672b607;hp=e624822403f3e6233dba8e99d1f15554ffdc6343;hpb=623ac44eaf715968ec673c0bcb42c2120b7d2c58;p=m17n%2Fm17n-lib.git diff --git a/src/m17n.h b/src/m17n.h index e624822..d66c3ff 100644 --- a/src/m17n.h +++ b/src/m17n.h @@ -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,23 @@ 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 MSymbol mlanguage_name (MSymbol language); + +extern MText *mlanguage_text (MSymbol language); + +extern MPlist *mscript_list (void); + +extern MPlist *mscript_language_list (MSymbol script); + extern MLocale *mlocale_set (int category, const char *locale); extern MSymbol mlocale_get_prop (MLocale *locale, MSymbol key); @@ -1068,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. Values are functions of type #MInputCallbackFunc. */ /***ja @brief ¥³¡¼¥ë¥Ð¥Ã¥¯´Ø¿ô¤Î¥ê¥¹¥È. @@ -1078,7 +1090,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 +1117,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 +1345,16 @@ struct MInputContext 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; }; @@ -1354,28 +1375,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); - - /*=*/ /*** @} */