X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fm17n.h;h=d66c3ff04ce876e16c4323f3282e323c037b8b8c;hb=6803bafaacdfe59594e815c460a1e1e19672b607;hp=c0e6c8fa6928dbbacf774b5239c45a4248e5a98c;hpb=1359a5c46aaaa266d1d6a0f30f2478a18e439b5c;p=m17n%2Fm17n-lib.git diff --git a/src/m17n.h b/src/m17n.h index c0e6c8f..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_ @@ -36,6 +36,7 @@ extern "C" { #endif +#if !defined (FOR_DOXYGEN) || defined (DOXYGEN_INTERNAL_MODULE) extern void m17n_init (void); #undef M17N_INIT #define M17N_INIT() m17n_init () @@ -43,30 +44,39 @@ extern void m17n_init (void); extern void m17n_fini (void); #undef M17N_FINI #define M17N_FINI() m17n_fini () +#endif /***en @defgroup m17nShell SHELL API */ -/***ja @defgroup m17nShell SHELL API */ +/***ja @defgroup m17nShell ¥·¥§¥ë API */ /*=*/ /* * (11) Functions related to the m17n database */ +/*=*/ /*** @ingroup m17nShell */ /***en @defgroup m17nDatabase Database */ -/***ja @defgroup m17nDatabase ¸À¸ì¾ðÊó¥Ç¡¼¥¿¥Ù¡¼¥¹ */ +/***ja @defgroup m17nDatabase ¥Ç¡¼¥¿¥Ù¡¼¥¹ */ /*=*/ + /* Directory of an application specific databases. */ extern char *mdatabase_dir; - +/*=*/ /*** @ingroup m17nDatabase */ /***en @brief Type of database. The type #MDatabase is for a database object. Its internal - structure is concealed from application programs. */ -/***ja ¥Ç¡¼¥¿¥Ù¡¼¥¹¤Î·¿Àë¸À */ + structure is concealed from an application program. */ +/***ja + @brief ¥Ç¡¼¥¿¥Ù¡¼¥¹¤Î·¿Àë¸À. + + #MDatabase ·¿¤Ï¥Ç¡¼¥¿¥Ù¡¼¥¹¥ª¥Ö¥¸¥§¥¯¥ÈÍѤι½Â¤ÂΤǤ¢¤ë¡£ + ÆâÉô¹½Â¤¤Ï¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¥×¥í¥°¥é¥à¤«¤é¤Ï¸«¤¨¤Ê¤¤¡£ + */ + typedef struct MDatabase MDatabase; /*=*/ @@ -92,12 +102,16 @@ extern MDatabase *mdatabase_define (MSymbol tag1, MSymbol tag2, /*=*/ /* (S2) Charset staffs */ +/*=*/ /*** @ingroup m17nShell */ /***en @defgroup m17nCharset Charset */ /***ja @defgroup m17nCharset ʸ»ú¥»¥Ã¥È */ /*=*/ + +#if !defined (FOR_DOXYGEN) || defined (DOXYGEN_INTERNAL_MODULE) #define MCHAR_INVALID_CODE 0xFFFFFFFF +#endif /* Predefined charsets */ extern MSymbol Mcharset_ascii; @@ -133,7 +147,7 @@ extern MSymbol Msuperset; /* etc. */ extern MSymbol Mcharset; -extern MSymbol mchar_define_charset (char *name, MPlist *plist); +extern MSymbol mchar_define_charset (const char *name, MPlist *plist); extern MSymbol mchar_resolve_charset (MSymbol symbol); @@ -150,7 +164,7 @@ extern int mchar_map_charset (MSymbol charset_name, /*=*/ /* (S3) code conversion */ - +/*=*/ /*** @ingroup m17nShell */ /***en @defgroup m17nConv Code Conversion */ /***ja @defgroup m17nConv ¥³¡¼¥ÉÊÑ´¹ */ @@ -211,33 +225,31 @@ extern MSymbol Mmaybe; One of these values is set in @c MConverter-\>result. */ /***ja - @brief ¥³¡¼¥ÉÊÑ´¹¤Î·ë²Ì¤ò¼¨¤¹¥³¡¼¥É + @brief ¥³¡¼¥ÉÊÑ´¹¤Î·ë²Ì¤ò¼¨¤¹¥³¡¼¥É. ¤³¤ì¤é¤ÎÃͤΤ¦¤Á°ì¤Ä¤¬ @c MConverter-\>result ¤ËÀßÄꤵ¤ì¤ë¡£ */ enum MConversionResult { /***en Code conversion is successful. */ - /***ja ¥³¡¼¥ÉÊÑ´¹¤ÏÀ®¸ù¡£ */ + /***ja ¥³¡¼¥ÉÊÑ´¹¤ÏÀ®¸ù. */ MCONVERSION_RESULT_SUCCESS, /***en On decoding, the source contains an invalid byte. */ - /***ja ¥Ç¥³¡¼¥É¤ÎºÝ¡¢¥½¡¼¥¹¤ËÉÔÀµ¤Ê¥Ð¥¤¥È¤¬´Þ¤Þ¤ì¤ë¡£ */ + /***ja ¥Ç¥³¡¼¥É»þ¡¢¥½¡¼¥¹¤ËÉÔÀµ¤Ê¥Ð¥¤¥È¤¬´Þ¤Þ¤ì¤Æ¤¤¤ë. */ MCONVERSION_RESULT_INVALID_BYTE, /***en On encoding, the source contains a character that cannot be encoded by the specified coding system. */ - - /***ja ¥¨¥ó¥³¡¼¥É¤ÎºÝ¡¢¥½¡¼¥¹¤Ë»ØÄê¤Î¥³¡¼¥É·Ï¤Ç - ¥¨¥ó¥³¡¼¥É¤Ç¤­¤Ê¤¤Ê¸»ú¤¬´Þ¤Þ¤ì¤ë¡£ */ + /***ja ¥¨¥ó¥³¡¼¥É»þ¡¢»ØÄê¤Î¥³¡¼¥É·Ï¤Ç¥¨¥ó¥³¡¼¥É¤Ç¤­¤Ê¤¤Ê¸»ú¤¬¥½¡¼¥¹¤Ë´Þ¤Þ¤ì¤Æ¤¤¤ë. */ MCONVERSION_RESULT_INVALID_CHAR, /***en On decoding, the source ends with an incomplete byte sequence. */ - /***ja ¥Ç¥³¡¼¥É¤ÎºÝ¡¢¥½¡¼¥¹¤¬ÉÔ´°Á´¤Ê¥Ð¥¤¥ÈÎó¤Ç½ª¤ï¤ë¡£*/ + /***ja ¥Ç¥³¡¼¥É»þ¡¢ÉÔ´°Á´¤Ê¥Ð¥¤¥ÈÎó¤Ç¥½¡¼¥¹¤¬½ª¤ï¤Ã¤Æ¤¤¤ë¡£*/ MCONVERSION_RESULT_INSUFFICIENT_SRC, /***en On encoding, the destination is too short to store the result. */ - /***ja ¥¨¥ó¥³¡¼¥É¤ÎºÝ¡¢·ë²Ì¤ò³ÊǼ¤¹¤ëÎΰ褬û¤«¤¹¤®¤ë¡£ */ + /***ja ¥¨¥ó¥³¡¼¥É»þ¡¢·ë²Ì¤ò³ÊǼ¤¹¤ëÎΰ褬û¤«¤¹¤®¤ë¡£ */ MCONVERSION_RESULT_INSUFFICIENT_DST, /***en An I/O error occurred in the conversion. */ @@ -250,10 +262,13 @@ enum MConversionResult /***en @brief Structure to be used in code conversion. - The first three members are to control the conversion. */ + Structure to be used in code conversion. The first three members + are to control the conversion. */ /***ja - @brief ¥³¡¼¥ÉÊÑ´¹¤ËÍѤ¤¤é¤ì¤ë¹½Â¤ÂÎ + @brief ¥³¡¼¥ÉÊÑ´¹¤ËÍѤ¤¤é¤ì¤ë¹½Â¤ÂÎ. + + ¥³¡¼¥ÉÊÑ´¹¤ËÍѤ¤¤é¤ì¤ë¹½Â¤ÂΡ£ºÇ½é¤Î£³¤Ä¤Î¥á¥ó¥Ð¤ÏÊÑ´¹¤òÀ©¸æ¤¹¤ë¡£ @latexonly \IPAlabel{MConverter} @endlatexonly */ @@ -276,20 +291,19 @@ typedef struct with "" (if the character is a Unicode character) or with "" (otherwise). */ - /***ja - ¸·Ì©¤ÊÊÑ´¹¤¬É¬ÍפǤʤ¤¾ì¹ç¤Ë¤³¤Î¥Õ¥é¥°¥Ó¥Ã¥È¤ò¤¿¤Æ¤ë¡£¥Ç¥Õ¥© - ¥ë¥È¤Ç¤Ï¡¢ÊÑ´¹¤Ï¸·Ì©¤Ç¤¢¤ë¡£ + /***ja + ¸·Ì©¤ÊÊÑ´¹¤¬É¬ÍפǤʤ¤¾ì¹ç¤ËÃͤò 0 °Ê³°¤Ë¤¹¤ë¡£ + ¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢ÊÑ´¹¤Ï¸·Ì©¤Ç¤¢¤ë¡£ - ÊÑ´¹¤¬¸·Ì©¤È¤Ï¡¢¥Ç¥³¡¼¥É¤ÎºÝ¤Ë¤ÏºÇ½é¤ÎÉÔÀµ¤Ê¥Ð¥¤¥È¤Ç¥³¥ó¥Ð¡¼¥¿ - ¤¬»ß¤Þ¤ë¤³¤È¡¢¥¨¥ó¥³¡¼¥É¤ÎºÝ¤Ë¤ÏÊÑ´¹¤µ¤ì¤ë¥³¡¼¥É·Ï¤Ç¥µ¥Ý¡¼¥È¤µ - ¤ì¤Ê¤¤ºÇ½é¤Îʸ»ú¤Ç¥³¥ó¥Ð¡¼¥¿¤¬»ß¤Þ¤ë¤³¤È¤ò»Ø¤¹¡£¤³¤ì¤é¤Î¾ì¹ç¡¢ - @c MConverter-\>result ¤Ï¤½¤ì¤¾¤ì@c + ÊÑ´¹¤¬¸·Ì©¤È¤Ï¡¢¥Ç¥³¡¼¥É¤ÎºÝ¤Ë¤ÏºÇ½é¤ÎÉÔÀµ¤Ê¥Ð¥¤¥È¤Ç¥³¥ó¥Ð¡¼¥¿¤¬»ß¤Þ¤ë¤³¤È¡¢ + ¥¨¥ó¥³¡¼¥É¤ÎºÝ¤Ë¤ÏÊÑ´¹¤µ¤ì¤ë¥³¡¼¥É·Ï¤Ç¥µ¥Ý¡¼¥È¤µ¤ì¤Ê¤¤ºÇ½é¤Îʸ»ú¤Ç¥³¥ó¥Ð¡¼¥¿¤¬»ß¤Þ¤ë¤³¤È¤ò»Ø¤¹¡£ + ¤³¤ì¤é¤Î¾ì¹ç¡¢@c MConverter-\>result ¤Ï¤½¤ì¤¾¤ì @c MCONVERSION_RESULT_INVALID_BYTE ¤«@c MCONVERSION_RESULT_INVALID_CHAR ¤È¤Ê¤ë¡£ - ÊÑ´¹¤¬¸·Ì©¤Ç¤Ê¤¤¾ì¹ç¤Ë¤Ï¡¢¥Ç¥³¡¼¥É¤ÎºÝ¤ÎÉÔÀµ¤Ê¥Ð¥¤¥È¤Ï¤½¤Î¥Ð¥¤ - ¥È¤Î¤Þ¤Þ»Ä¤ë¡£¤Þ¤¿¥¨¥ó¥³¡¼¥É¤ÎºÝ¤Ë¤Ï¡¢ÉÔÀµ¤Êʸ»ú¤Ï¥³¡¼¥É·Ï¤´¤È - ¤ËÄê¤á¤é¤ì¤¿¥Ç¥Õ¥©¥ë¥È¤Îʸ»ú¤ÈÃÖ¤­´¹¤¨¤é¤ì¤ë¡£ */ + ÊÑ´¹¤¬¸·Ì©¤Ç¤Ê¤¤¾ì¹ç¤Ë¤Ï¡¢¥Ç¥³¡¼¥É¤ÎºÝ¤ÎÉÔÀµ¤Ê¥Ð¥¤¥È¤Ï¤½¤Î¥Ð¥¤¥È¤Î¤Þ¤Þ»Ä¤ë¡£ + ¤Þ¤¿¥¨¥ó¥³¡¼¥É¤ÎºÝ¤Ë¤Ï¡¢ÉÔÀµ¤Êʸ»ú¤¬ Unicode ʸ»ú¤Î¾ì¹ç¤Ë¤Ï "" + ¤Ë¡¢¤½¤¦¤Ç¤Ê¤¤¾ì¹ç¤Ë¤Ï "" ¤ËÃÖ¤­´¹¤¨¤é¤ì¤ë¡£ */ int lenient; @@ -319,33 +333,48 @@ typedef struct If the value is zero, the conversion never produce such a byte sequence at the end. */ - /***ja - ʸ»ú¥³¡¼¥ÉÎó¤Î½ªÃ¼Éôʬ¤ò¥¨¥ó¥³¡¼¥É¤¹¤ëºÝ¤Ë¤Ï¡¢¤³¤Î¥Õ¥é¥°¤òΩ¤Æ - ¤ë¡£¤³¤Î¾ì¹ç½ÐÎÏ¥³¡¼¥É¥Ý¥¤¥ó¥ÈÎó¤Î¥³¥ó¥Æ¥¯¥¹¥È¤ò¸µ¤ËÌ᤹¤¿¤á¤Î - ¿ô¥Ð¥¤¥È¤¬ÉÕ²ÃŪ¤ËÀ¸À®¤µ¤ì¤ë¤³¤È¤¬¤¢¤ë¡£ +/***ja + + ¥Ð¥¤¥ÈÎó¤Î½ªÃ¼¤Î¥Ö¥í¥Ã¥¯¤ò¥Ç¥³¡¼¥É¤¹¤ëºÝ¡¢¤Þ¤¿¤Ïʸ»úÎó¤Î½ªÃ¼¤Î¥Ö¥í¥Ã¥¯¤ò¥¨¥ó¥³¡¼¥É¤¹¤ëºÝ¤Ï¡¢Ãͤò + 0 °Ê³°¤Ë¤¹¤ë¡£¤³¤ÎÃͤϰʲ¼¤Î¤è¤¦¤ËÊÑ´¹¤Ë±Æ¶Á¤¹¤ë¡£ + + ¥Ç¥³¡¼¥Ç¥£¥ó¥°¤ÎºÝ¤ËºÇ¸å¤Î¿ô¥Ð¥¤¥È¤¬Àµ¤·¤¤¥Ð¥¤¥È¥·¡¼¥¯¥¨¥ó¥¹¤ò·ÁÀ®¤¹¤ë¤Ë¤Ïû¤¹¤®¤ë¾ì¹ç¡§ + + Ãͤ¬ 0 ¤Ç¤Ê¤±¤ì¤Ð¡¢ÊÑ´¹¤Ï¤½¤Î¥·¡¼¥¯¥¨¥ó¥¹¤ÎºÇ½é¤Î¥Ð¥¤¥È¤Ë¤ª¤¤¤Æ¡¢¥¨¥é¡¼ + (MCONVERSION_RESULT_INVALID_BYTE) ¤Ç½ª¤ë¡£ + + Ãͤ¬ 0 ¤Ê¤é¤Ð¡¢ÊÑ´¹¤ÏÀ®¸ù¤·¤Æ½ª¤ë¡£ + ÌäÂê¤Î¿ô¥Ð¥¤¥È¤Ï¥­¥ã¥ê¡¼¥ª¡¼¥Ð¤È¤·¤Æ¥³¥ó¥Ð¡¼¥¿¤ËÊÝ»ý¤µ¤ì¡¢ÊÑ´¹¤Î³¤­¤ò¹Ô¤¦ºÝ¤ËÊÑ´¹¤¹¤ë¥Ð¥¤¥ÈÎó¤ÎÁ°¤ËÉÕ¤±¤é¤ì¤ë¡£ + + ¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°¤ÎºÝ¤Ë¥³¡¼¥É·Ï¤¬Ê¸Ì®°Í¸¤Î¾ì¹ç¡¢ + + Ãͤ¬ 0 ¤Ç¤Ê¤±¤ì¤Ð¡¢¥³¥ó¥Æ¥­¥¹¥È¤òºÇ½é¤ËÌ᤹¤¿¤á¤Î¥Ð¥¤¥ÈÎ󤬥½¡¼¥¹¤Îʸ»ú¤È¤«¤«¤ï¤ê¤Ê¤¯ÊÑ´¹¤Î·ë²ÌÀ¸À®¤µ¤ì¤ë¤³¤È¤¬¤¢¤ë¡£ - ¤³¤Î¥Õ¥é¥°¤Ï¥Ç¥Õ¥©¥ë¥È¤Ç¤ÏΩ¤Ã¤Æ¤ª¤é¤º¡¢¥³¥ó¥Ð¡¼¥¿¤Ï³¤±¤Æ¾¤Î - ʸ»ú¤ò¥¨¥ó¥³¡¼¥É¤¹¤ë¤â¤Î¤È²¾Äꤷ¤Æ¤¤¤ë¡£ + Ãͤ¬ 0 ¤Ê¤é¤Ð¡¢¤½¤Î¤è¤¦¤Ê¥Ð¥¤¥ÈÎó¤ÏÀ¸À®¤µ¤ì¤Ê¤¤¡£ - ¤³¤Î¥Õ¥é¥°¤Ï¥Ç¥³¡¼¥É¤Ë¤Ï´Ø·¸¤·¤Ê¤¤¡£ */ + */ int last_block; /***en If the value is nonzero, it specifies at most how many characters to convert. */ + /***ja + 0 ¤Ç¤Ê¤±¤ì¤Ð¡¢ÊÑ´¹¤µ¤ì¤ëºÇÂç¤Îʸ»ú¿ô¤ò»ØÄꤹ¤ë¡£ + */ unsigned at_most; /***en The following three members are to report the result of the conversion. */ + /***ja + °Ê²¼¤Î£³¤Ä¤Î¥á¥ó¥Ð¤ÏÊÑ´¹¤Î·ë²Ì¤òɽ¤¹¤¿¤á¤Î¤â¤Î¤Ç¤¢¤ë¡£ */ /***en Number of characters most recently decoded or encoded. */ - /***ja - ºÇ¸å¤Ë¥Ç¥³¡¼¥É/¥¨¥ó¥³¡¼¥É¤µ¤ì¤¿Ê¸»ú¿ô */ + ºÇ¶á¤Ë¥Ç¥³¡¼¥É/¥¨¥ó¥³¡¼¥É¤µ¤ì¤¿Ê¸»ú¿ô¡£ */ int nchars; @@ -353,7 +382,7 @@ typedef struct Number of bytes recently decoded or encoded. */ /***ja - ºÇ¸å¤Ë¥Ç¥³¡¼¥É/¥¨¥ó¥³¡¼¥É¤µ¤ì¤¿¥Ð¥¤¥È¿ô */ + ºÇ¶á¤Ë¥Ç¥³¡¼¥É/¥¨¥ó¥³¡¼¥É¤µ¤ì¤¿¥Ð¥¤¥È¿ô¡£ */ int nbytes; @@ -361,7 +390,7 @@ typedef struct Result code of the conversion. */ /***ja - ¥³¡¼¥ÉÊÑ´¹¤Î·ë²Ì¤ò¼¨¤¹¥³¡¼¥É */ + ¥³¡¼¥ÉÊÑ´¹¤Î·ë²Ì¤ò¼¨¤¹¥³¡¼¥É¡£ */ enum MConversionResult result; @@ -372,10 +401,8 @@ typedef struct and at least 256 bytes of memory space can be used. */ /***ja - ¥³¡¼¥ÉÊÑ´¹¤Î¾õ¶·¤Ë´Ø¤¹¤ë¾ðÊó¡£ÆâÍƤϥ³¡¼¥É·Ï¤Î¥¿¥¤¥×¤Ë¤è¤Ã¤Æ°Û¤Ê - ¤ë¡£@c status ¤Ï¤É¤Î¤è¤¦¤Ê·¿¤Ø¤Î¥­¥ã¥¹¥È¤ËÂФ·¤Æ¤â°ÂÁ´¤Ê¤è¤¦¤Ë¥á - ¥â¥ê¥¢¥é¥¤¥ó¤µ¤ì¤Æ¤ª¤ê¡¢¤Þ¤¿ºÇÄã256¥Ð¥¤¥È¤Î¥á¥â¥êÎΰ褬»È¤¨¤ë¤è - ¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤ë¡£ */ + ¥³¡¼¥ÉÊÑ´¹¤Î¾õ¶·¤Ë´Ø¤¹¤ë¼ï¡¹¤Î¾ðÊó¡£ÆâÍƤϥ³¡¼¥É·Ï¤Î¥¿¥¤¥×¤Ë¤è¤Ã¤Æ°Û¤Ê¤ë¡£ + @c status ¤Ï¤É¤Î¤è¤¦¤Ê·¿¤Ø¤Î¥­¥ã¥¹¥È¤ËÂФ·¤Æ¤â°ÂÁ´¤Ê¤è¤¦¤Ë¥á¥â¥ê¥¢¥é¥¤¥ó¤µ¤ì¤Æ¤ª¤ê¡¢¤Þ¤¿ºÇÄã256¥Ð¥¤¥È¤Î¥á¥â¥êÎΰ褬»È¤¨¤ë¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤ë¡£ */ union { void *ptr; @@ -386,13 +413,16 @@ typedef struct /***en This member is for internally use only. An application program should never touch it. */ + /***ja ¤³¤Î¥á¥ó¥Ð¤ÏÆâÉôŪ¤Ë»ÈÍѤµ¤ì¡¢¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¥×¥í¥°¥é¥à¤Ï¿¨¤ì¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£ */ void *internal_info; } MConverter; /*=*/ /*** @ingroup m17nConv */ -/***en @brief Types of coding system */ -/***ja @brief ¥³¡¼¥É·Ï¤Î¥¿¥¤¥× */ +/***en + @brief Types of coding system. */ +/***ja + @brief ¥³¡¼¥É·Ï¤Î¥¿¥¤¥×. */ enum MCodingType { @@ -406,12 +436,10 @@ enum MCodingType routines of this type. */ /***ja - ¤³¤Î¥¿¥¤¥×¤Î¥³¡¼¥É·Ï¤Ïʸ»ú¥»¥Ã¥È¤òľÀÜ¥µ¥Ý¡¼¥È¤¹¤ë¡£³Æʸ»ú¥»¥Ã - ¥È¤Î¼¡¸µ¤È¤Ï¡¢¤½¤Îʸ»ú¥»¥Ã¥È¤Ç°ìʸ»ú¤òɽ¸½¤¹¤ë¤¿¤á¤ËɬÍפʥХ¤ - ¥È¿ô¤Ç¤¢¤ê¡¢¥Ð¥¤¥ÈÎó¤Ïʸ»ú¤Î¥³¡¼¥É¥Ý¥¤¥ó¥È¤òľÀÜɽ¤ï¤¹¡£ + ¤³¤Î¥¿¥¤¥×¤Î¥³¡¼¥É·Ï¤Ïʸ»ú¥»¥Ã¥È¤òľÀÜ¥µ¥Ý¡¼¥È¤¹¤ë¡£ + ³Æʸ»ú¥»¥Ã¥È¤Î¼¡¸µ¤È¤Ï¡¢¤½¤Îʸ»ú¥»¥Ã¥È¤Ç°ìʸ»ú¤òɽ¸½¤¹¤ë¤¿¤á¤ËɬÍפʥХ¤¥È¿ô¤Ç¤¢¤ê¡¢¥Ð¥¤¥ÈÎó¤Ïʸ»ú¤Î¥³¡¼¥É¥Ý¥¤¥ó¥È¤òľÀÜɽ¤¹¡£ - m17n ¥é¥¤¥Ö¥é¥ê¤Ï¤³¤Î¥¿¥¤¥×ÍѤΥǥե©¥ë¥È¤Î¥¨¥ó¥³¡¼¥É¡¿¥Ç¥³¡¼ - ¥É¥ë¡¼¥Æ¥£¥ó¤òÄ󶡤¹¤ë¡£ */ + m17n ¥é¥¤¥Ö¥é¥ê¤Ï¤³¤Î¥¿¥¤¥×ÍѤΥǥե©¥ë¥È¤Î¥¨¥ó¥³¡¼¥É¡¿¥Ç¥³¡¼¥É¥ë¡¼¥Æ¥£¥ó¤òÄ󶡤¹¤ë¡£ */ MCODING_TYPE_CHARSET, @@ -423,11 +451,9 @@ enum MCodingType routines of this type. */ /***ja - ¤³¤Î¥¿¥¤¥×¤Î¥³¡¼¥É·Ï¤Ï¡¢UTF ·Ï (UTF-8, UTF-16, UTF-32) ¤Î¥Ð¥¤ - ¥ÈÎó¤ò¥µ¥Ý¡¼¥È¤¹¤ë¡£ + ¤³¤Î¥¿¥¤¥×¤Î¥³¡¼¥É·Ï¤Ï¡¢UTF ·Ï (UTF-8, UTF-16, UTF-32) ¤Î¥Ð¥¤¥ÈÎó¤ò¥µ¥Ý¡¼¥È¤¹¤ë¡£ - m17n ¥é¥¤¥Ö¥é¥ê¤Ï¤³¤Î¥¿¥¤¥×ÍѤΥǥե©¥ë¥È¤Î¥¨¥ó¥³¡¼¥É¡¿¥Ç¥³¡¼ - ¥É¥ë¡¼¥Æ¥£¥ó¤òÄ󶡤¹¤ë¡£ */ + m17n ¥é¥¤¥Ö¥é¥ê¤Ï¤³¤Î¥¿¥¤¥×ÍѤΥǥե©¥ë¥È¤Î¥¨¥ó¥³¡¼¥É¡¿¥Ç¥³¡¼¥É¥ë¡¼¥Æ¥£¥ó¤òÄ󶡤¹¤ë¡£ */ MCODING_TYPE_UTF, @@ -439,13 +465,11 @@ enum MCodingType The m17n library provides decoding and encoding routines of this type. */ - /***ja - ¤³¤Î¥¿¥¤¥×¤Î¥³¡¼¥É·Ï¤Ï¡¢ISO-2022 ·Ï¤Î¥Ð¥¤¥ÈÎó¤ò¥µ¥Ý¡¼¥È¤¹¤ë¡£ - ¤³¤ì¤é¤Î¥³¡¼¥É·Ï¤Î¹½Â¤¤Î¾ÜºÙ¤Ï @c MCodingInfoISO2022 ¤Ç»ØÄꤵ - ¤ì¤ë¡£ + /***ja + ¤³¤Î¥¿¥¤¥×¤Î¥³¡¼¥É·Ï¤Ï¡¢ISO-2022 ·Ï¤Î¥Ð¥¤¥ÈÎó¤ò¥µ¥Ý¡¼¥È¤¹¤ë¡£ + ³Æ¥³¡¼¥É·Ï¤Î¹½Â¤¤Î¾ÜºÙ¤Ï @c MCodingInfoISO2022 ¤Ç»ØÄꤵ¤ì¤ë¡£ - m17n ¥é¥¤¥Ö¥é¥ê¤Ï¤³¤Î¥¿¥¤¥×ÍѤΥǥե©¥ë¥È¤Î¥¨¥ó¥³¡¼¥É¡¿¥Ç¥³¡¼ - ¥É¥ë¡¼¥Æ¥£¥ó¤òÄ󶡤¹¤ë¡£ */ + m17n ¥é¥¤¥Ö¥é¥ê¤Ï¤³¤Î¥¿¥¤¥×ÍѤΥǥե©¥ë¥È¤Î¥¨¥ó¥³¡¼¥É¡¿¥Ç¥³¡¼¥É¥ë¡¼¥Æ¥£¥ó¤òÄ󶡤¹¤ë¡£ */ MCODING_TYPE_ISO_2022, @@ -458,23 +482,19 @@ enum MCodingType application program. */ /***ja - ¤³¤Î¥¿¥¤¥×¤Î¥³¡¼¥É·Ï¤Ï¡¢¤½¤Î¾¤Î¹½Â¤¤Î¥Ð¥¤¥ÈÎó¤Î¤¿¤á¤Î¤â¤Î¤Ç¤¢ - ¤ë¡£ + ¤³¤Î¥¿¥¤¥×¤Î¥³¡¼¥É·Ï¤Ï¡¢¤½¤Î¾¤Î¹½Â¤¤Î¥Ð¥¤¥ÈÎó¤Î¤¿¤á¤Î¤â¤Î¤Ç¤¢¤ë¡£ - m17n ¥é¥¤¥Ö¥é¥ê¤Ï¤³¤Î¥¿¥¤¥×ÍѤΥ¨¥ó¥³¡¼¥É¡¿¥Ç¥³¡¼¥É¥ë¡¼¥Æ¥£¥ó - ¤òÄ󶡤·¤Ê¤¤¤Î¤Ç¡¢¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¥×¥í¥°¥é¥à¦¤Ç¤½¤ì¤é¤ò½àÈ÷¤¹ - ¤ëɬÍפ¬¤¢¤ë¡£ */ + m17n ¥é¥¤¥Ö¥é¥ê¤Ï¤³¤Î¥¿¥¤¥×ÍѤΥ¨¥ó¥³¡¼¥É¡¿¥Ç¥³¡¼¥É¥ë¡¼¥Æ¥£¥ó¤òÄ󶡤·¤Ê¤¤¤Î¤Ç¡¢¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¥×¥í¥°¥é¥à¦¤Ç½àÈ÷¤¹¤ëɬÍפ¬¤¢¤ë¡£ */ MCODING_TYPE_MISC }; /*=*/ /*** @ingroup m17nConv */ -/***en @brief Bit-masks to specify the detail of coding system whose type is - MCODING_TYPE_ISO_2022. */ - -/***ja @brief MCODING_TYPE_ISO_2022 ¥¿¥¤¥×¤Î¥³¡¼¥É·Ï¤Î¾ÜºÙ¤òɽ¤ï¤¹¥Ó¥Ã¥È¥Þ¥¹ - ¥¯ */ +/***en + @brief Bit-masks to specify the detail of coding system whose type is MCODING_TYPE_ISO_2022. */ +/***ja + @brief MCODING_TYPE_ISO_2022 ¥¿¥¤¥×¤Î¥³¡¼¥É·Ï¤Î¾ÜºÙ¤òɽ¤ï¤¹¥Ó¥Ã¥È¥Þ¥¹¥¯. */ enum MCodingFlagISO2022 { @@ -501,27 +521,27 @@ enum MCodingFlagISO2022 /***en Use the non-standard 4 bytes format for designation sequence - for charsets JISX0208.1978, GB2312, and JISX0208.1983. */ + for charsets JISX0208-1978, GB2312, and JISX0208-1983. */ /***ja - JISX0208.1978, GB2312, JISX0208.1983 ¤Îʸ»ú½¸¹ç¤ËÂФ¹¤ë»Ø¼¨¥·¡¼ - ¥¯¥¨¥ó¥¹¤È¤·¤Æ¡¢Èóɸ½à¤Î4¥Ð¥¤¥È·Á¼°¤òÍѤ¤¤ë¡£ */ + JISX0208-1978, GB2312, JISX0208-1983 + ¤Îʸ»ú½¸¹ç¤ËÂФ¹¤ë»Ø¼¨¥·¡¼¥¯¥¨¥ó¥¹¤È¤·¤Æ¡¢Èóɸ½à¤Î4¥Ð¥¤¥È·Á¼°¤òÍѤ¤¤ë¡£ */ MCODING_ISO_LONG_FORM = 0x8, /***en On encoding, unless explicitly specified, designate charsets to G0. */ - /***ja - ¥¨¥ó¥³¡¼¥É¤ÎºÝ¡¢Æä˻ØÄꤵ¤ì¤Ê¤¤¸Â¤ê¡¢Ê¸»ú½¸¹ç¤ò G0 ¤Ë - »Ø¼¨¤¹¤ë¡£*/ + /***ja + ¥¨¥ó¥³¡¼¥É¤ÎºÝ¡¢Æä˻ØÄꤵ¤ì¤Ê¤¤¸Â¤ê¡¢Ê¸»ú½¸¹ç¤ò G0 + ¤Ë»Ø¼¨¤¹¤ë¡£*/ MCODING_ISO_DESIGNATION_G0 = 0x10, /***en On encoding, unless explicitly specified, designate charsets except for ASCII to G1. */ /***ja - ¥¨¥ó¥³¡¼¥É¤ÎºÝ¡¢Æä˻ØÄꤵ¤ì¤Ê¤¤¸Â¤ê¡¢ASCII °Ê³°¤Îʸ»ú½¸¹ç¤ò G1 - ¤Ë»Ø¼¨¤¹¤ë¡£*/ + ¥¨¥ó¥³¡¼¥É¤ÎºÝ¡¢Æä˻ØÄꤵ¤ì¤Ê¤¤¸Â¤ê¡¢ASCII °Ê³°¤Îʸ»ú½¸¹ç¤ò + G1 ¤Ë»Ø¼¨¤¹¤ë¡£*/ MCODING_ISO_DESIGNATION_G1 = 0x20, /***en @@ -538,8 +558,8 @@ enum MCodingFlagISO2022 ESC % G ... ESC % @@ . On decoding, handle those escape sequences. */ /***ja - ¥¨¥ó¥³¡¼¥É¤ÎºÝ¡¢ISO-2022 ¤Ë¹çÃפ·¤Ê¤¤Ê¸»ú½¸¹ç¤ò ESC % / ... ¤Ç¥¨ - ¥ó¥³¡¼¥É¤¹¤ë¡£¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤Ê¤¤ Unicode ʸ»ú¤Ï ESC % G ... + ¥¨¥ó¥³¡¼¥É¤ÎºÝ¡¢ISO-2022 ¤Ë¹çÃפ·¤Ê¤¤Ê¸»ú½¸¹ç¤ò ESC % / ... + ¤Ç¥¨¥ó¥³¡¼¥É¤¹¤ë¡£¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤Ê¤¤ Unicode ʸ»ú¤Ï ESC % G ... ESC % @@ ¤Ç¥¨¥ó¥³¡¼¥É¤¹¤ë¡£ ¥Ç¥³¡¼¥É¤ÎºÝ¡¢¤³¤ì¤é¤Î¥¨¥¹¥±¡¼¥×¡¦¥·¡¼¥±¥ó¥¹¤ò²ò¼á¤¹¤ë¡£ */ MCODING_ISO_DESIGNATION_CTEXT_EXT = 0x80, @@ -553,13 +573,13 @@ enum MCodingFlagISO2022 /***en Use single shift (SS2 (0x8E or ESC N), SS3 (0x8F or ESC O)). */ /***ja - ¥·¥ó¥°¥ë¥·¥Õ¥È (SS2 or ESC N) ¤ò»È¤¦¡£ */ + ¥·¥ó¥°¥ë¥·¥Õ¥È (SS2 (0x8E or ESC N), SS3 (0x8F or ESC O)) ¤ò»È¤¦¡£ */ MCODING_ISO_SINGLE_SHIFT = 0x200, /***en Use 7-bit single shift 2 (SS2 (0x19)). */ /***ja - ¥·¥ó¥°¥ë¥·¥Õ¥È (0x19) ¤ò»È¤¦¡£ */ + 7¥Ó¥Ã¥È¥·¥ó¥°¥ë¥·¥Õ¥È 2 (SS2 (0x19)) ¤ò»È¤¦¡£ */ MCODING_ISO_SINGLE_SHIFT_7 = 0x400, /***en @@ -572,21 +592,21 @@ enum MCodingFlagISO2022 Use ISO-6429 escape sequences to indicate direction. Not yet implemented. */ /***ja - ISO-6429 ¤Î¥¨¥¹¥±¡¼¥×¥·¡¼¥¯¥¨¥ó¥¹¤ÇÊý¸þ¤ò»Ø¼¨¤¹¤ë¡£ */ + ISO-6429 ¤Î¥¨¥¹¥±¡¼¥×¥·¡¼¥¯¥¨¥ó¥¹¤ÇÊý¸þ¤ò»Ø¼¨¤¹¤ë¡£Ì¤¼ÂÁõ¡£ */ MCODING_ISO_ISO6429 = 0x1000, /***en On encoding, if a charset has revision number, produce escape sequences to specify the number. */ /***ja - ¥¨¥ó¥³¡¼¥É¤ÎºÝ¡¢Ê¸»ú¥»¥Ã¥È¤Ë revision number ¤¬¤¢¤ì¤Ð¤½ - ¤ì¤òɽ¤ï¤¹¥¨¥¹¥±¡¼¥×¥·¡¼¥¯¥¨¥ó¥¹¤òÀ¸À®¤¹¤ë¡£ */ + ¥¨¥ó¥³¡¼¥É¤ÎºÝ¡¢Ê¸»ú¥»¥Ã¥È¤Ë revision number + ¤¬¤¢¤ì¤Ð¤½¤ì¤òɽ¤ï¤¹¥¨¥¹¥±¡¼¥×¥·¡¼¥¯¥¨¥ó¥¹¤òÀ¸À®¤¹¤ë¡£ */ MCODING_ISO_REVISION_NUMBER = 0x2000, /***en Support all ISO-2022 charsets. */ /***ja - ISO-2022 ¤ÎÁ´Ê¸»ú½¸¹ç¤ò¥µ¥Ý¡¼¥È¤¹¤ë */ + ISO-2022 ¤ÎÁ´Ê¸»ú½¸¹ç¤ò¥µ¥Ý¡¼¥È¤¹¤ë¡£ */ MCODING_ISO_FULL_SUPPORT = 0x3000, MCODING_ISO_FLAG_MAX @@ -595,14 +615,15 @@ enum MCodingFlagISO2022 /*** @ingroup m17nConv */ /***en - @brief Structure for a coding system of type MCODING_TYPE_ISO_2022. + @brief Structure for a coding system of type #MCODING_TYPE_ISO_2022. Structure for extra information about a coding system of type MCODING_TYPE_ISO_2022. */ -/***ja - @brief MCODING_TYPE_ISO_2022 ¥¿¥¤¥×¤Î¥³¡¼¥É·Ï¤ÇɬÍ× - ¤ÊÉղþðÊóÍѹ½Â¤ÂÎ +/***ja + @brief #MCODING_TYPE_ISO_2022 ¥¿¥¤¥×¤Î¥³¡¼¥É·Ï¤ÇɬÍפÊÉղþðÊóÍѹ½Â¤ÂÎ. + + MCODING_TYPE_ISO_2022 ¥¿¥¤¥×¤Î¥³¡¼¥É·Ï¤ÇɬÍפÊÉղþðÊóÍѤòÊÝ»ý¤¹¤ë¤¿¤á¤Î¹½Â¤ÂΡ£ @latexonly \IPAlabel{MCodingInfoISO2022} @endlatexonly */ @@ -614,9 +635,9 @@ typedef struct means no code extension element is invoked to that plane. */ /***ja - ³Æ¿Þ·Áʸ»úÎΰè (Graphic Left ¤È Graphic Right) ¤Ë¸Æ¤Ó½Ð¤µ¤ì¤Æ¤¤ - ¤ë¡¢ISO2022 Éä¹ç³ÈÄ¥Í×ÁǤÎÈÖ¹æ¤Î¥Æ¡¼¥Ö¥ë¡£-1 ¤Ï¤½¤ÎÎΰè¤Ë¤É¤ÎÉä - ¹ç³ÈÄ¥Í×ÁǤâ¸Æ¤Ó½Ð¤µ¤ì¤Æ¤¤¤Ê¤¤¤³¤È¤ò¼¨¤¹¡£ */ + ³Æ¿Þ·Áʸ»úÎΰè (Graphic Left ¤È Graphic Right) ¤Ë¸Æ¤Ó½Ð¤µ¤ì¤Æ¤¤¤ë¡¢ + ISO2022 Éä¹ç³ÈÄ¥Í×ÁǤÎÈÖ¹æ¤Î¥Æ¡¼¥Ö¥ë¡£-1 + ¤Ï¤½¤ÎÎΰè¤Ë¤É¤ÎÉä¹ç³ÈÄ¥Í×ÁǤâ¸Æ¤Ó½Ð¤µ¤ì¤Æ¤¤¤Ê¤¤¤³¤È¤ò¼¨¤¹¡£ */ int initial_invocation[2]; @@ -635,17 +656,17 @@ typedef struct register. */ /***ja + Éä¹ç³ÈÄ¥Í×ÁǤΥơ¼¥Ö¥ë¡£NÈÖÌܤÎÍ×ÁǤϡ¢$CHARSET_NAMES ¤Î N + ÈÖÌܤÎʸ»ú¥»¥Ã¥È¤ËÂбþ¤¹¤ë¡£$CHARSET_NAMES ¤Ï´Ø¿ô + mconv_define_coding () ¤Î°ú¿ô¤È¤Ê¤ë¡£ - Éä¹ç³ÈÄ¥Í×ÁǤΥơ¼¥Ö¥ë¡£NÈÖÌܤÎÍ×ÁǤϡ¢$CHARSET_NAMES ¤Î N ÈÖÌÜ - ¤Îʸ»ú¥»¥Ã¥È¤ËÂбþ¤¹¤ë¡£$CHARSET_NAMES ¤Ï´Ø¿ô - mconv_define_coding () ¤Î°ú¿ô¤È¤·¤Æ»È¤ï¤ì¤ë¡£ - - Ãͤ¬ 0..3 ¤À¤Ã¤¿¤é¡¢Âбþ¤¹¤ëʸ»ú¥»¥Ã¥È¤ò G0..G3 ¤Î¤½¤ì¤¾¤ì¤Ë»Ø¼¨ - ¤¹¤ë¤³¤È¤ò°ÕÌ£¤¹¤ë¡£¤µ¤é¤Ë¡¢½é´ü¾õÂ֤Ǥ¹¤Ç¤Ë G0..G3 ¤Ë»Ø¼¨¤µ¤ì¤Æ - ¤¤¤ë¡£ + Ãͤ¬ 0..3 ¤À¤Ã¤¿¤é¡¢Âбþ¤¹¤ëʸ»ú¥»¥Ã¥È¤ò G0..G3 + ¤Î¤½¤ì¤¾¤ì¤Ë»Ø¼¨¤¹¤ë¤³¤È¡¢¤Þ¤¿½é´ü¾õÂ֤Ǥ¹¤Ç¤Ë G0..G3 + ¤Ë»Ø¼¨¤µ¤ì¤Æ¤¤¤ë¤³¤È¤ò°ÕÌ£¤¹¤ë¡£ - Ãͤ¬ -4..-1 ¤À¤Ã¤¿¤é¡¢Âбþ¤¹¤ëʸ»ú¥»¥Ã¥È¤ò G0..G3 ¤Î¤½¤ì¤¾¤ì¤Ë»Ø - ¼¨¤¹¤ë¤¬¡¢½é´ü¾õÂ֤ǤϤɤ³¤Ë¤â»Ø¼¨¤µ¤ì¤Æ¤¤¤Ê¤¤¤³¤È¤ò°ÕÌ£¤¹¤ë¡£ */ + Ãͤ¬ -4..-1 ¤À¤Ã¤¿¤é¡¢Âбþ¤¹¤ëʸ»ú¥»¥Ã¥È¤ò G0..G3 + ¤Î¤½¤ì¤¾¤ì¤Ë»Ø¼¨¤¹¤ë¤³¤È¡¢¤·¤«¤·½é´ü¾õÂ֤ǤϤɤ³¤Ë¤â»Ø¼¨¤µ¤ì¤Æ¤¤¤Ê¤¤¤³¤È¤ò°ÕÌ£¤¹¤ë¡£ + */ char designations[32]; @@ -662,11 +683,11 @@ typedef struct /*** @ingroup m17nConv */ /***en - @brief Structure for extra information about a coding system of - type #MCODING_TYPE_UTF. */ + @brief Structure for extra information about a coding system of type #MCODING_TYPE_UTF. + */ /***ja - @brief MCODING_TYPE_UTF ¥¿¥¤¥×¤Î¥³¡¼¥É·Ï¤ÇɬÍפÊÉղþðÊóÍѤι½Â¤ÂÎ + @brief #MCODING_TYPE_UTF ¥¿¥¤¥×¤Î¥³¡¼¥É·Ï¤ÇɬÍפÊÉղþðÊóÍѤι½Â¤ÂÎ. @latexonly \IPApage{MCodingInfoUTF} @endlatexonly @@ -676,6 +697,8 @@ typedef struct { /***en Specify bits of a code unit. The value must be 8, 16, or 32. */ + /***ja + ¥³¡¼¥ÉĹ¡Ê¥Ó¥Ã¥È¿ô¡Ë¤Î»ØÄê¡£ÃÍ¤Ï 8, 16, 32 ¤Î¤¤¤º¤ì¤«¡£ */ int code_unit_bits; /***en @@ -701,18 +724,17 @@ typedef struct ÀèƬ¤Î BOM (¥Ð¥¤¥È¥ª¡¼¥À¡¼¥Þ¡¼¥¯) ¤Î¼è¤ê°·¤¤¤ò»ØÄꤹ¤ë¡£ÃÍ¤Ï 0, 1, 2 ¤Î¤¤¤º¤ì¤«¤Ç¤¢¤ê¡¢¤½¤ì¤¾¤ì¤Î°ÕÌ£¤Ï°Ê²¼¤Î¤è¤¦¤Ë¤Ê¤ë¡£ - 0: ¥Ç¥³¡¼¥É¤ÎºÝ¤ËºÇ½é¤Î2¥Ð¥¤¥È¤òÄ´¤Ù¤ë¡£¤â¤·¤½¤ì¤¬ BOM ¤Ç¤¢¤ì¤Ð¡¢ - ¥¨¥ó¥Ç¥£¥¢¥ó¤ò¤½¤ì¤ÇȽÄꤹ¤ë¡£¤â¤·ºÇ½é¤Î2¥Ð¥¤¥È¤¬ BOM ¤Ç¤Ê¤±¤ì¤Ð¡¢ - ¥á¥ó¥Ð @c endian ¤Ë½¾¤Ã¤Æ¥¨¥ó¥Ç¥£¥¢¥ó¤ò·èÄꤹ¤ë¡£¥¨¥ó¥³¡¼¥É¤ÎºÝ - ¤Ë¤Ï @c endian ¤Ë½¾¤Ã¤¿¥Ð¥¤¥ÈÎó¤ò BOM ÉÕ¤ÇÀ¸À®¤¹¤ë¡£ + 0: ¥Ç¥³¡¼¥É¤ÎºÝ¤ËºÇ½é¤Î 2 ¥Ð¥¤¥È¤òÄ´¤Ù¤ë¡£¤â¤·¤½¤ì¤¬ BOM + ¤Ç¤¢¤ì¤Ð¡¢¥¨¥ó¥Ç¥£¥¢¥ó¤ò¤½¤ì¤ÇȽÄꤹ¤ë¡£¤½¤¦¤Ç¤Ê¤±¤ì¤Ð¡¢¥á¥ó¥Ð @c + endian ¤Ë½¾¤Ã¤Æ¥¨¥ó¥Ç¥£¥¢¥ó¤ò·èÄꤹ¤ë¡£¥¨¥ó¥³¡¼¥É¤ÎºÝ¤Ë¤Ï @c + endian ¤Ë½¾¤Ã¤¿¥Ð¥¤¥ÈÎó¤òÀèƬ¤Ë BOM ÉÕ¤ÇÀ¸À®¤¹¤ë¡£ - 1: ¥Ç¥³¡¼¥É¤ÎºÝ¡¢ºÇ½é¤Î2¥Ð¥¤¥È¤ò BOM ¤È¤·¤Æ°·¤ï¤Ê¤¤¡£¥¨¥ó - ¥Ç¥£¥¢¥ó¤Ï @c endian ¤ÇȽÄꤹ¤ë¡£¥¨¥ó¥³¡¼¥É¤ÎºÝ¤Ë¤Ï¡¢BOM - ¤ò½ÐÎϤ»¤º¡¢@c endian ¤Ë±þ¤¸¤¿¥Ð¥¤¥ÈÎó¤òÀ¸À®¤¹¤ë¡£ + 1: ¥Ç¥³¡¼¥É¤ÎºÝ¡¢ºÇ½é¤Î 2 ¥Ð¥¤¥È¤ò BOM ¤È¤·¤Æ°·¤ï¤º¡¢¥¨¥ó¥Ç¥£¥¢¥ó¤Ï + @c endian ¤ÇȽÄꤹ¤ë¡£¥¨¥ó¥³¡¼¥É¤ÎºÝ¤Ë¤Ï¡¢BOM ¤ò½ÐÎϤ»¤º¡¢ + @c endian ¤Ë±þ¤¸¤¿¥Ð¥¤¥ÈÎó¤òÀ¸À®¤¹¤ë¡£ - 2: ¥Ç¥³¡¼¥É¤ÎºÝ¤ËºÇ½é¤Î2¥Ð¥¤¥È¤ò BOM¤È¤·¤Æ°·¤¤¡¢¤½¤ì¤Ë½¾¤Ã - ¤Æ¥¨¥ó¥Ç¥£¥¢¥ó¤òȽÄꤹ¤ë¡£¥¨¥ó¥³¡¼¥É¤ÎºÝ¤Ë¤Ï @c endian ¤Ë - ±þ¤¸¤¿¥Ð¥¤¥ÈÎó¤ò BOM ÉÕ¤­¤ÇÀ¸À®¤¹¤ë¡£ */ + 2: ¥Ç¥³¡¼¥É¤ÎºÝ¤ËºÇ½é¤Î2¥Ð¥¤¥È¤ò BOM¤È¤·¤Æ°·¤¤¡¢¤½¤ì¤Ë½¾¤Ã¤Æ¥¨¥ó¥Ç¥£¥¢¥ó¤òȽÄꤹ¤ë¡£ + ¥¨¥ó¥³¡¼¥É¤ÎºÝ¤Ë¤Ï @c endian ¤Ë±þ¤¸¤¿¥Ð¥¤¥ÈÎó¤òÀèƬ¤Ë BOM ÉÕ¤­¤ÇÀ¸À®¤¹¤ë¡£ */ int bom; /***en @@ -721,15 +743,18 @@ typedef struct If is 8, the value has no meaning. */ /***ja - ¥¨¥ó¥Ç¥£¥¢¥ó¤Î¥¿¥¤¥×¤ò»ØÄꤹ¤ë¡£ÃÍ¤Ï 0 ¤« 1 ¤Ç¤¢¤ê¡¢0 ¤Ê¤é¤Ð¥ê¥È - ¥ë¥¨¥ó¥Ç¥£¥¢¥ó¡¢1 ¤Ê¤é¤Ð¥Ó¥Ã¥°¥¨¥ó¥Ç¥£¥¢¥ó¤Ç¤¢¤ë¡£*/ + ¥¨¥ó¥Ç¥£¥¢¥ó¤Î¥¿¥¤¥×¤ò»ØÄꤹ¤ë¡£ÃÍ¤Ï 0 ¤« 1 ¤Ç¤¢¤ê¡¢0 + ¤Ê¤é¤Ð¥ê¥È¥ë¥¨¥ó¥Ç¥£¥¢¥ó¡¢1 ¤Ê¤é¤Ð¥Ó¥Ã¥°¥¨¥ó¥Ç¥£¥¢¥ó¤Ç¤¢¤ë¡£ + + ¤¬ 8 ¤Î¾ì¹ç¤Ë¤Ï¡¢¤³¤ÎÃͤϰÕÌ£¤ò»ý¤¿¤Ê¤¤¡£ + */ int endian; } MCodingInfoUTF; /*=*/ -extern MSymbol mconv_define_coding (char *name, MPlist *plist, +extern MSymbol mconv_define_coding (const char *name, MPlist *plist, int (*resetter) (MConverter *), - int (*decoder) (unsigned char *, int, + int (*decoder) (const unsigned char *, int, MText *, MConverter *), int (*encoder) (MText *, int, int, unsigned char *, int, @@ -740,7 +765,8 @@ extern MSymbol mconv_resolve_coding (MSymbol symbol); extern int mconv_list_codings (MSymbol **symbols); -extern MConverter *mconv_buffer_converter (MSymbol coding, unsigned char *buf, +extern MConverter *mconv_buffer_converter (MSymbol coding, + const unsigned char *buf, int n); extern MConverter *mconv_stream_converter (MSymbol coding, FILE *fp); @@ -750,13 +776,13 @@ extern int mconv_reset_converter (MConverter *converter); extern void mconv_free_converter (MConverter *converter); extern MConverter *mconv_rebind_buffer (MConverter *converter, - unsigned char *buf, int n); + const unsigned char *buf, int n); extern MConverter *mconv_rebind_stream (MConverter *converter, FILE *fp); extern MText *mconv_decode (MConverter *converter, MText *mt); -MText *mconv_decode_buffer (MSymbol name, unsigned char *buf, int n); +MText *mconv_decode_buffer (MSymbol name, const unsigned char *buf, int n); MText *mconv_decode_stream (MSymbol name, FILE *fp); @@ -779,14 +805,15 @@ extern int mconv_putc (MConverter *converter, int c); extern MText *mconv_gets (MConverter *converter, MText *mt); /* (S4) Locale related functions corresponding to libc functions */ - +/*=*/ /*** @ingroup m17nShell */ /***en @defgroup m17nLocale Locale */ /***ja @defgroup m17nLocale ¥í¥±¡¼¥ë */ /*=*/ +/*** @ingroup m17nLocale */ /***en - @brief @c struct @c MLocale + @brief @c struct @c MLocale. The structure @c MLocale is used to hold information about name, language, territory, modifier, codeset, and the corresponding @@ -796,14 +823,12 @@ extern MText *mconv_gets (MConverter *converter, MText *mt); internal structure is concealed from application programs. */ /***ja - @brief @c MLocale ¹½Â¤ÂÎ + @brief @c MLocale ¹½Â¤ÂÎ. - @c MLocale ¹½Â¤ÂΤϡ¢¥í¥±¡¼¥ë¤Î̾Á°¡¢¸À¸ì¡¢ÃÏ°è¡¢¥â¥Ç¥£¥Õ¥¡¥¤¥¢¡¢ - ¥³¡¼¥É¥»¥Ã¥È¡¢¤ª¤è¤ÓÂбþ¤¹¤ë¥³¡¼¥É·Ï¤Ë´Ø¤¹¤ë¾ðÊó¤òÊÝ»ý¤¹¤ë¤¿¤á¤ËÍÑ - ¤¤¤é¤ì¤ë¡£ + @c MLocale ¹½Â¤ÂΤϡ¢¥í¥±¡¼¥ë¤Î̾Á°¡¢¸À¸ì¡¢ÃÏ°è¡¢¥â¥Ç¥£¥Õ¥¡¥¤¥¢¡¢¥³¡¼¥É¥»¥Ã¥È¡¢¤ª¤è¤ÓÂбþ¤¹¤ë¥³¡¼¥É·Ï¤Ë´Ø¤¹¤ë¾ðÊó¤òÊÝ»ý¤¹¤ë¤¿¤á¤ËÍѤ¤¤é¤ì¤ë¡£ - ¤³¤Î¹½Â¤ÂΤÎÆâÍƤϼÂÁõ¤Ë°Í¸¤¹¤ë¡£ ÆâÉô¹½Â¤¤Ï¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¥×¥í - ¥°¥é¥à¤«¤é¤Ï¸«¤¨¤Ê¤¤¡£ */ + ¤³¤Î¹½Â¤ÂΤÎÆâÍƤϼÂÁõ¤Ë°Í¸¤¹¤ë¡£ + ÆâÉô¹½Â¤¤Ï¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¥×¥í¥°¥é¥à¤«¤é¤Ï¸«¤¨¤Ê¤¤¡£ */ /*** @seealso @@ -813,11 +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); @@ -844,24 +881,30 @@ extern MText *mtext_toupper (MText *mt); /* * (10) Input method */ - +/*=*/ /*** @ingroup m17nShell */ /***en @defgroup m17nInputMethod Input Method (basic) */ -/***ja @defgroup m17nInputMethod ÆþÎϥ᥽¥Ã¥É (´ðËÜ) */ +/***ja @defgroup m17nInputMethod ÆþÎϥ᥽¥Ã¥É (´ðËÜÉôʬ) */ /*=*/ +/*** @addtogroup m17nInputMethod + @{ */ + /* Struct forward declaration. */ typedef struct MInputMethod MInputMethod; typedef struct MInputContext MInputContext; -/*** @ingroup m17nInputMethod */ - /***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 of callback for which the function is called. */ +/***ja + @brief ÆþÎϥ᥽¥Ã¥É¥³¡¼¥ë¥Ð¥Ã¥¯´Ø¿ô¤Î·¿Àë¸À. + + ÆþÎϥ᥽¥Ã¥É¤«¤é¸Æ¤Ð¤ì¤ë¥³¡¼¥ë¥Ð¥Ã¥¯´Ø¿ô¤Î·¿¤Ç¤¢¤ë¡£#IC + ¤ÏÆþÎÏ¥³¥ó¥Æ¥¯¥¹¥È¤Ø¤Î¥Ý¥¤¥ó¥¿¡¢#COMMAND ¤Ï´Ø¿ô¤¬¸Æ¤Ð¤ì¤ë¥³¡¼¥ë¥Ð¥Ã¥¯¤Î̾Á°¤Ç¤¢¤ë¡£ */ typedef void (*MInputCallbackFunc) (MInputContext *ic, MSymbol command); /*=*/ @@ -869,34 +912,33 @@ typedef void (*MInputCallbackFunc) (MInputContext *ic, MSymbol command); /***en @brief Structure of input method driver. - The type @c MInputDriver is the structure of an input driver that + The type @c MInputDriver is the structure of an input method driver that contains several functions to handle an input method. */ /***ja - @brief ÆþÎϥɥ饤¥Ð + @brief ÆþÎϥɥ饤¥ÐÍѹ½Â¤ÂÎ. - @c MInputDriver ·¿¤Ï¡¢ÆþÎϥ᥽¥Ã¥É¤ò¼è¤ê°·¤¦´Ø¿ô¤ò´Þ¤àÆþÎϥɥ饤¥Ð - ¤Î¹½Â¤ÂΤǤ¢¤ë¡£ */ + @c MInputDriver ¤Ï¡¢ÆþÎϥ᥽¥Ã¥É¤ò¼è¤ê°·¤¦´Ø¿ô¤ò´Þ¤àÆþÎϥ᥽¥Ã¥É¥É¥é¥¤¥Ð¤Î¹½Â¤ÂΤη¿¤Ç¤¢¤ë¡£ */ typedef struct MInputDriver { /***en @brief Open an input method. - This function opens the input method $IC. It is called from the + This function opens the input method $IM. It is called from the function minput_open_im () after all member of $IM but set. If opening $IM succeeds, it returns 0. Otherwise, it returns -1. The function can setup $IM->info to keep various information that is referred by the other driver functions. */ /***ja - @brief ÆþÎϥ᥽¥Ã¥É¤ò¥ª¡¼¥×¥ó¤¹¤ë + @brief ÆþÎϥ᥽¥Ã¥É¤ò¥ª¡¼¥×¥ó¤¹¤ë. - ¤³¤Î´Ø¿ô¤Ï¡¢ÆþÎϥ᥽¥Ã¥É$IM¤ò¥ª¡¼¥×¥ó¤¹¤ë¡£$IM ¤Î°Ê³°¤ÎÁ´ - ¥á¥ó¥Ð¡¼¤¬¥»¥Ã¥È¤µ¤ì¤¿¸å¤Ç¡¢´Ø¿ô minput_open_im () ¤«¤é¸Æ¤Ð¤ì¤ë¡£ - $IM ¤ò¥ª¡¼¥×¥ó¤Ç¤­¤ì¤Ð 0 ¤ò¡¢¤Ç¤­¤Ê¤±¤ì¤Ð -1¤òÊÖ¤¹¡£¤³¤Î´Ø¿ô¤Ï - $IM->info ¤òÀßÄꤷ¤Æ¡¢Â¾¤Î¥É¥é¥¤¥Ð´Ø¿ô¤«¤é»²¾È¤µ¤ì¤ë¾ðÊó¤òÊÝ»ý¤¹ - ¤ë¤³¤È¤¬¤Ç¤­¤ë¡£ + ¤³¤Î´Ø¿ô¤Ï¡¢ÆþÎϥ᥽¥Ã¥É $IM ¤ò¥ª¡¼¥×¥ó¤¹¤ë¡£$IM ¤Î + °Ê³°¤ÎÁ´¥á¥ó¥Ð¡¼¤¬¥»¥Ã¥È¤µ¤ì¤¿¸å¤Ç¡¢´Ø¿ô minput_open_im () + ¤«¤é¸Æ¤Ð¤ì¤ë¡£$IM ¤ò¥ª¡¼¥×¥ó¤Ç¤­¤ì¤Ð 0 ¤ò¡¢¤Ç¤­¤Ê¤±¤ì¤Ð -1¤òÊÖ¤¹¡£ + ¤³¤Î´Ø¿ô¤Ï $IM->info + ¤òÀßÄꤷ¤Æ¡¢Â¾¤Î¥É¥é¥¤¥Ð´Ø¿ô¤«¤é»²¾È¤µ¤ì¤ë¾ðÊó¤òÊÝ»ý¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£ */ int (*open_im) (MInputMethod *im); @@ -911,12 +953,14 @@ typedef struct MInputDriver touched. */ /***ja - @brief ÆþÎϥ᥽¥Ã¥É¤ò¥¯¥í¡¼¥º¤¹¤ë + @brief ÆþÎϥ᥽¥Ã¥É¤ò¥¯¥í¡¼¥º¤¹¤ë. - ¤³¤Î´Ø¿ô¤Ï´Ø¿ô minput_close_im () ¤«¤é¸Æ¤Ð¤ì¡¢ÆþÎϥ᥽¥Ã¥É¤ò¥¯¥í¡¼ - ¥º¤¹¤ë¡£¡£ÆþÎϥ᥽¥Ã¥É¤Î¥¯¥í¡¼¥º¤¬¤¹¤Ù¤Æ½ªÎ»¤·¤¿»þÅÀ¤Ç¡¢ - $IM->info ¤Ë³ä¤êÅö¤Æ¤é¤ì¤Æ¤¤¤ë¥á¥â¥ê¤ò(¤¢¤ì¤Ð)³«Êü¤¹¤ë¡£¤¿¤À¤·¡¢ - $IM ¤Î¾¤Î¥á¥ó¥Ð¤Ë±Æ¶Á¤òÍ¿¤¨¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£ */ + ¤³¤Î´Ø¿ô¤Ï¡¢ÆþÎϥ᥽¥Ã¥É $IM ¤ò¥¯¥í¡¼¥º¤¹¤ë¡£´Ø¿ô + minput_close_im () ¤«¤é¸Æ¤Ð¤ì¤ë¡£ + ÆþÎϥ᥽¥Ã¥É¤Î¥¯¥í¡¼¥º¤¬¤¹¤Ù¤Æ½ªÎ»¤·¤¿»þÅÀ¤Ç¡¢¤³¤Î´Ø¿ô¤Ï$IM->info + ¤Ë³ä¤êÅö¤Æ¤é¤ì¤Æ¤¤¤ë¥á¥â¥ê¤ò(¤¢¤ì¤Ð)¤¹¤Ù¤Æ³«Êü¤¹¤ë¡£ + ¤¿¤À¤·¡¢$IM ¤Î¾¤Î¥á¥ó¥Ð¤Ë±Æ¶Á¤òÍ¿¤¨¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£ + */ void (*close_im) (MInputMethod *im); @@ -931,13 +975,13 @@ typedef struct MInputDriver functions. */ /***ja - @brief ÆþÎÏ¥³¥ó¥Æ¥¯¥¹¥È¤òÀ¸À®¤¹¤ë + @brief ÆþÎÏ¥³¥ó¥Æ¥¯¥¹¥È¤òÀ¸À®¤¹¤ë. - ÆþÎÏ¥³¥ó¥Æ¥¯¥¹¥È $IC ¤òÀ¸À®¤¹¤ë´Ø¿ô¡£¤³¤Î´Ø¿ô¤Ï¡¢$IC ¤Î - °Ê³°¤ÎÁ´¥á¥ó¥Ð¡¼¤¬¥»¥Ã¥È¤µ¤ì¤¿¸å¤Ç¡¢´Ø¿ô minput_create_ic () ¤« - ¤é¸Æ¤Ð¤ì¤ë¡£$IC ¤òÀ¸À®¤Ç¤­¤ì¤Ð 0 ¤ò¡¢¤Ç¤­¤Ê¤±¤ì¤Ð -1 ¤òÊÖ¤¹¡£¤³ - ¤Î´Ø¿ô¤Ï $IC->info ¤òÀßÄꤷ¤Æ¡¢Â¾¤Î¥É¥é¥¤¥Ð´Ø¿ô¤«¤é»²¾È¤µ¤ì¤ë¾ð - Êó¤òÊÝ»ý¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£ */ + ¤³¤Î´Ø¿ô¤ÏÆþÎÏ¥³¥ó¥Æ¥¯¥¹¥È $IC ¤òÀ¸À®¤¹¤ë¡£ + $IC ¤Î °Ê³°¤ÎÁ´¥á¥ó¥Ð¡¼¤¬¥»¥Ã¥È¤µ¤ì¤¿¸å¤Ç¡¢´Ø¿ô + minput_create_ic () ¤«¤é¸Æ¤Ð¤ì¤ë¡£ + $IC ¤òÀ¸À®¤Ç¤­¤ì¤Ð 0 ¤ò¡¢¤Ç¤­¤Ê¤±¤ì¤Ð -1 ¤òÊÖ¤¹¡£ + ¤³¤Î´Ø¿ô¤Ï $IC->info ¤òÀßÄꤷ¤Æ¡¢Â¾¤Î¥É¥é¥¤¥Ð´Ø¿ô¤«¤é»²¾È¤µ¤ì¤ë¾ðÊó¤òÊÝ»ý¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£ */ int (*create_ic) (MInputContext *ic); @@ -952,12 +996,12 @@ typedef struct MInputDriver should not be touched. */ /***ja - @brief ÆþÎÏ¥³¥ó¥Æ¥¯¥¹¥È¤òÇ˲õ¤¹¤ë + @brief ÆþÎÏ¥³¥ó¥Æ¥¯¥¹¥È¤òÇ˲õ¤¹¤ë. - ´Ø¿ô minput_destroy_ic () ¤«¤é¸Æ¤Ð¤ì¡¢ÆþÎÏ¥³¥ó¥Æ¥¯¥¹¥È $IC ¤òÇË - ²õ¤¹¤ë¡£ÆþÎÏ¥³¥ó¥Æ¥¯¥¹¥È¤ÎÇ˲õ¤¬¤¹¤Ù¤Æ½ªÎ»¤·¤¿»þÅÀ¤Ç¡¢$IC->info - ¤Ë³ä¤êÅö¤Æ¤é¤ì¤Æ¤¤¤ë¥á¥â¥ê¤ò(¤¢¤ì¤Ð)³«Êü¤¹¤ë¡£¤¿¤À¤·¡¢$IC ¤Î¾¤Î - ¥á¥ó¥Ð¤Ë±Æ¶Á¤òÍ¿¤¨¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£ */ + ´Ø¿ô minput_destroy_ic () ¤«¤é¸Æ¤Ð¤ì¡¢ÆþÎÏ¥³¥ó¥Æ¥¯¥¹¥È $IC + ¤òÇ˲õ¤¹¤ë¡£ÆþÎÏ¥³¥ó¥Æ¥¯¥¹¥È¤ÎÇ˲õ¤¬¤¹¤Ù¤Æ½ªÎ»¤·¤¿»þÅÀ¤Ç¡¢$IC->info + ¤Ë³ä¤êÅö¤Æ¤é¤ì¤Æ¤¤¤ë¥á¥â¥ê¤ò(¤¢¤ì¤Ð)¤¹¤Ù¤Æ³«Êü¤¹¤ë¡£¤¿¤À¤·¡¢$IC + ¤Î¾¤Î¥á¥ó¥Ð¤Ë±Æ¶Á¤òÍ¿¤¨¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£ */ void (*destroy_ic) (MInputContext *ic); @@ -976,32 +1020,32 @@ typedef struct MInputDriver $IC->ncandidates, $IC->candidates, and $IC->produced if that is necessary for the member . - The meaning of $ARG depends on the input driver. See the + The meaning of $ARG depends on the input method river. See the documentation of @c minput_default_driver and @c minput_gui_driver for instance. */ /***ja - @brief ÆþÎÏ¥¤¥Ù¥ó¥È¤¢¤ë¤¤¤ÏÆþÎÏ¥­¡¼¤ò¥Õ¥£¥ë¥¿¤¹¤ë + @brief ÆþÎÏ¥­¡¼¤ò¥Õ¥£¥ë¥¿¤¹¤ë. ´Ø¿ô minput_filter () ¤«¤é¸Æ¤Ð¤ì¡¢ÆþÎÏ¥­¡¼¤ò¥Õ¥£¥ë¥¿¤¹¤ë¡£°ú¿ô $KEY, $ARG ¤Ï´Ø¿ô minput_filter () ¤Î¤â¤Î¤ÈƱ¤¸¡£ - ¤³¤Î´Ø¿ô¤Ï $KEY ¤ò½èÍý¤·¡¢$IC ¤ÎÆâÉô¾õÂÖ¤ò¥¢¥Ã¥×¥Ç¡¼¥È¤¹¤ë¡£ - $KEY ¤¬ÆþÎϥ᥽¥Ã¥É¤ËµÛ¼ý¤µ¤ì¤Æ¥Æ¥­¥¹¥È¤¬À¸À®¤µ¤ì¤Ê¤«¤Ã¤¿¾ì¹ç¤Ë - ¤Ï¡¢ 1 ¤òÊÖ¤¹¡£¤½¤¦¤Ç¤Ê¤±¤ì¤Ð 0 ¤òÊÖ¤¹¡£ + ¤³¤Î´Ø¿ô¤Ï $KEY ¤ò½èÍý¤·¡¢$IC ¤ÎÆâÉô¾õÂÖ¤ò¹¹¿·¤¹¤ë¡£ $KEY + ¤¬ÆþÎϥ᥽¥Ã¥É¤ËµÛ¼ý¤µ¤ì¤Æ¥Æ¥­¥¹¥È¤¬À¸À®¤µ¤ì¤Ê¤«¤Ã¤¿¾ì¹ç¤Ë¤Ï¡¢ + 1 ¤òÊÖ¤¹¡£¤½¤¦¤Ç¤Ê¤±¤ì¤Ð 0 ¤òÊÖ¤¹¡£ ¥á¥ó¥Ð ¤ËɬÍפǤ¢¤ì¤Ð¡¢$IC->status, $IC->preedit, $IC->cursor_pos, $IC->ncandidates, $IC->candidates, - $IC->produced ¤ò¥¢¥Ã¥×¥Ç¡¼¥È¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£ + $IC->produced ¤ò¹¹¿·¤Ç¤­¤ë¡£ - $ARG ¤Î°ÕÌ£¤ÏÆþÎϥɥ饤¥Ð¤Ë°Í¸¤¹¤ë¡£Îã¤Ï @c - minput_default_driver ¤Þ¤¿¤Ï @c minput_gui_driver ¤Î¥É¥­¥å¥á¥ó¥È - ¤ò»²¾È¤Î¤³¤È¡£ */ + $ARG ¤Î°ÕÌ£¤ÏÆþÎϥ᥽¥Ã¥É¥É¥é¥¤¥Ð¤Ë°Í¸¤¹¤ë¡£Îã¤Ï @c + minput_default_driver ¤Þ¤¿¤Ï @c minput_gui_driver + ¤ÎÀâÌÀ¤ò»²¾È¤Î¤³¤È¡£ */ int (*filter) (MInputContext *ic, MSymbol key, void *arg); /***en - @brief Lookup a produced text in an input context + @brief Lookup a produced text in an input context. It is called from the function minput_lookup () and looks up a produced text in the input context $IC. This function @@ -1009,21 +1053,21 @@ typedef struct MInputDriver M-text $MT. If $KEY was correctly handled by the input method of $IC, it returns 0. Otherwise, it returns 1. - The meaning of $ARG depends on the input driver. See the + The meaning of $ARG depends on the input method driver. See the documentation of @c minput_default_driver and @c minput_gui_driver for instance. */ /***ja - @brief ÆþÎÏ¥³¥ó¥Æ¥¯¥¹¥È¤ÇÀ¸À®¤µ¤ì¤ë¥Æ¥­¥¹¥È¤Î³ÍÆÀ + @brief ÆþÎÏ¥³¥ó¥Æ¥¯¥¹¥È¤ÇÀ¸À®¤µ¤ì¤ë¥Æ¥­¥¹¥È¤Î³ÍÆÀ. - ´Ø¿ô minput_lookup () ¤«¤é¸Æ¤Ð¤ì¡¢ÆþÎÏ¥³¥ó¥Æ¥¯¥¹¥È $IC ¤ÇÀ¸À®¤µ - ¤ì¤ë¥Æ¥­¥¹¥È¤ò¸¡º÷¤¹¤ë¡£ÆþÎÏ¥­¡¼ $KEY ¤Ë¤è¤Ã¤ÆÀ¸À®¤µ¤ì¤ë¥Æ¥­¥¹¥È - ¤¬¤¢¤ì¤Ð¡¢$IC->produced ¤ËÀßÄꤹ¤ë¡£ $KEY ¤¬ÆþÎϥ᥽¥Ã¥É $IC ¤Ë - ¤è¤Ã¤ÆÀµ¤·¤¯½èÍý¤µ¤ì¤ì¤Ð 0 ¤òÊÖ¤¹¡£¤½¤¦¤Ç¤Ê¤±¤ì¤Ð 1 ¤òÊÖ¤¹¡£ + ´Ø¿ô minput_lookup () ¤«¤é¸Æ¤Ð¤ì¡¢ÆþÎÏ¥³¥ó¥Æ¥¯¥¹¥È $IC + ¤ÇÀ¸À®¤µ¤ì¤ë¥Æ¥­¥¹¥È¤ò¸¡º÷¤¹¤ë¡£ÆþÎÏ¥­¡¼ $KEY + ¤Ë¤è¤Ã¤ÆÀ¸À®¤µ¤ì¤ë¥Æ¥­¥¹¥È¤¬¤¢¤ì¤Ð¡¢M-text $MT ¤ËÄɲ乤롣 $KEY + ¤¬ÆþÎϥ᥽¥Ã¥É $IC ¤Ë¤è¤Ã¤ÆÀµ¤·¤¯½èÍý¤µ¤ì¤ì¤Ð 0 ¤òÊÖ¤¹¡£¤½¤¦¤Ç¤Ê¤±¤ì¤Ð 1 ¤òÊÖ¤¹¡£ - $ARG ¤Î°ÕÌ£¤ÏÆþÎϥɥ饤¥Ð¤Ë°Í¸¤¹¤ë¡£Îã¤Ï @c - minput_default_driver ¤Þ¤¿¤Ï @c minput_gui_driver ¤Î¥É¥­¥å¥á¥ó¥È - ¤ò»²¾È¤Î¤³¤È¡£ */ + $ARG ¤Î°ÕÌ£¤ÏÆþÎϥ᥽¥Ã¥É¥É¥é¥¤¥Ð¤Ë°Í¸¤¹¤ë¡£Îã¤Ï @c + minput_default_driver ¤Þ¤¿¤Ï @c minput_gui_driver ¤ÎÀâÌÀ¤ò»²¾È¤Î + ¤³¤È¡£ */ int (*lookup) (MInputContext *ic, MSymbol key, void *arg, MText *mt); @@ -1035,8 +1079,20 @@ 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, and #Minput_toggle. Values are functions of - type #MInputCallbackFunc. */ + #Minput_set_spot, #Minput_toggle, #Minput_reset, + #Minput_get_surrounding_text, #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¡£ + ÃͤÏ#MInputCallbackFunc ·¿¤Î´Ø¿ô¡£ */ MPlist *callback_list; } MInputDriver; @@ -1060,6 +1116,19 @@ extern MSymbol Minput_candidates_draw; 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. @@ -1067,60 +1136,75 @@ extern MSymbol Minput_toggle; The type @c MInputMethod is the structure of input method objects. */ /***ja - @brief ÆþÎϥ᥽¥Ã¥ÉÍѹ½Â¤ÂÎ + @brief ÆþÎϥ᥽¥Ã¥É¤Î¹½Â¤ÂÎ. - @c MInputMethod ·¿¤Ï¡¢ÆþÎϥ᥽¥Ã¥É¥ª¥Ö¥¸¥§¥¯¥ÈÍѤι½Â¤ÂΤǤ¢¤ë¡£ */ + @c MInputMethod ¤Ï¡¢ÆþÎϥ᥽¥Ã¥É¥ª¥Ö¥¸¥§¥¯¥ÈÍѤι½Â¤ÂΤη¿¤Ç¤¢¤ë¡£ */ struct MInputMethod { /***en Which language this input method is for. The value is @c Mnil if the input method is foreign. */ - /***ja ¤É¤Î¸À¸ìÍѤÎÆþÎϥ᥽¥Ã¥É¤«¡£ÆþÎϥ᥽¥Ã¥É¤¬³°Éô¤Î¤â¤Î¤Ç¤¢¤ë¾ì - ¹ç¤Ë¤ÏÃͤȤ·¤Æ @c ¤ò»ý¤Ä¡£ */ + /***ja ¤É¤Î¸À¸ìÍѤÎÆþÎϥ᥽¥Ã¥É¤«¡£ + ÆþÎϥ᥽¥Ã¥É¤¬³°Éô¤Î¤â¤Î¤Ç¤¢¤ë¾ì¹ç¤ÎÃÍ¤Ï @c Mnil ¡£ */ MSymbol language; /***en Name of the input method. If the input method is foreign, it must has a property of key @c Minput_driver and the value must be a - pointer to a proper input driver. */ + pointer to a proper input method driver. */ /***ja ÆþÎϥ᥽¥Ã¥É¤Î̾Á°¡£³°Éô¥á¥½¥Ã¥É¤Ç¤¢¤ë¾ì¹ç¤Ë¤Ï¡¢@c - Minput_driver ¤ò¥­¡¼¤È¤¹¤ë¥×¥í¥Ñ¥Æ¥£¤ò»ý¤Á¡¢¤½¤ÎÃͤÏŬÀÚ¤ÊÆþÎ촃 - ¥é¥¤¥Ð¤Ø¤Î¥Ý¥¤¥ó¥¿¤Ç¤Ê¤¯¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£*/ + Minput_driver ¤ò¥­¡¼¤È¤¹¤ë¥×¥í¥Ñ¥Æ¥£¤ò»ý¤Á¡¢¤½¤ÎÃͤÏŬÀÚ¤ÊÆþÎϥ᥽¥Ã¥É¥É¥é¥¤¥Ð¤Ø¤Î¥Ý¥¤¥ó¥¿¤Ç¤Ê¤¯¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£*/ MSymbol name; - /***en Input driver of the input method. */ - /***ja ¤½¤ÎÆþÎϥ᥽¥Ã¥ÉÍѤÎÆþÎϥɥ饤¥Ð */ + /***en Input method driver of the input method. */ + /***ja ¤½¤ÎÆþÎϥ᥽¥Ã¥ÉÍѤÎÆþÎϥ᥽¥Ã¥É¥É¥é¥¤¥Ð¡£ */ MInputDriver driver; /***en The argument given to minput_open_im (). */ - /***ja minput_open_im () ¤ËÍ¿¤¨¤é¤ì¤ë°ú¿ô */ + /***ja minput_open_im () ¤ËÅϤµ¤ì¤ë°ú¿ô¡£ */ void *arg; /***en Pointer to extra information that .open_im () setups. */ - /***ja .open_im () ¤¬ÀßÄꤹ¤ëÄɲþðÊó¤Ø¤Î¥Ý¥¤¥ó¥¿ */ + /***ja .open_im () ¤¬ÀßÄꤹ¤ëÄɲþðÊó¤Ø¤Î¥Ý¥¤¥ó¥¿¡£ */ void *info; }; /*=*/ /***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 objects. */ /***ja - @brief ÆþÎÏ¥³¥ó¥Æ¥¯¥¹¥ÈÍѹ½Â¤ÂÎ + @brief ÆþÎÏ¥³¥ó¥Æ¥¯¥¹¥ÈÍѹ½Â¤ÂÎ. - @c MInputContext ·¿¤Ï¡¢ÆþÎÏ¥³¥ó¥Æ¥¯¥¹¥È¥ª¥Ö¥¸¥§¥¯¥ÈÍѤι½Â¤ÂΤǤ¢ - ¤ë¡£ */ + @c MInputContext ¤Ï¡¢ÆþÎÏ¥³¥ó¥Æ¥¯¥¹¥È¥ª¥Ö¥¸¥§¥¯¥ÈÍѤι½Â¤ÂΤη¿¤Ç¤¢¤ë¡£ */ struct MInputContext { /***en Backward pointer to the input method. It is set up be the function minput_create_ic (). */ - /***ja ÆþÎϥ᥽¥Ã¥É¤Ø¤ÎµÕ¥Ý¥¤¥ó¥¿¡£´Ø¿ô minput_create_ic () ¤Ë¤è¤Ã¤Æ - ÀßÄꤵ¤ì¤ë¡£ */ + /***ja ÆþÎϥ᥽¥Ã¥É¤Ø¤ÎµÕ¥Ý¥¤¥ó¥¿¡£´Ø¿ô minput_create_ic () + ¤Ë¤è¤Ã¤ÆÀßÄꤵ¤ì¤ë¡£ */ MInputMethod *im; /***en M-text produced by the input method. It is set up by the @@ -1130,87 +1214,147 @@ struct MInputContext MText *produced; /***en Argument given to the function minput_create_im (). */ - /***ja ´Ø¿ô minput_create_ic () ¤ËÅϤµ¤ì¤ë°ú¿ô */ + /***ja ´Ø¿ô minput_create_ic () ¤ËÅϤµ¤ì¤ë°ú¿ô¡£ */ void *arg; /***en Flag telling whether the input context is currently active or inactive. The value is set to 1 (active) when the input context - is created. It can be toggled by the function minput_toggle - (). */ - /***ja ÆþÎÏ¥³¥ó¥Æ¥¯¥¹¥È¤¬¥¢¥¯¥Æ¥£¥Ö¤«¤É¤¦¤«¤ò¼¨¤¹¥Õ¥é¥°¡£ÆþÎÏ¥³¥ó¥Æ - ¥¯¥¹¥È¤¬À¸À®¤µ¤ì¤¿»þÅÀ¤Ç¤ÏÃÍ¤Ï 1 ¡Ê¥¢¥¯¥Æ¥£¥Ö¡Ë¤Ç¤¢¤ê¡¢´Ø¿ô - minput_toggle () ¤Ë¤è¤Ã¤Æ¥È¥°¥ë¤Ç¤­¤ë¡£ */ + is created. It is toggled by the function minput_toggle (). */ + /***ja ÆþÎÏ¥³¥ó¥Æ¥¯¥¹¥È¤¬¥¢¥¯¥Æ¥£¥Ö¤«¤É¤¦¤«¤ò¼¨¤¹¥Õ¥é¥°¡£ + ÆþÎÏ¥³¥ó¥Æ¥¯¥¹¥È¤¬À¸À®¤µ¤ì¤¿»þÅÀ¤Ç¤ÏÃÍ¤Ï 1 ¡Ê¥¢¥¯¥Æ¥£¥Ö¡Ë¤Ç¤¢¤ê¡¢´Ø¿ô + minput_toggle () ¤Ë¤è¤Ã¤Æ¥È¥°¥ë¤µ¤ì¤ë¡£ */ int active; - /***en Spot location and size of the input context. */ - /***ja ÆþÎÏ¥³¥ó¥Æ¥¯¥¹¥È¤Î¥¹¥Ý¥Ã¥È¤Î°ÌÃÖ¤ÈÂ礭¤µ */ + /***ja ÆþÎÏ¥³¥ó¥Æ¥¯¥¹¥È¤Î¥¹¥Ý¥Ã¥È¤Î°ÌÃÖ¤ÈÂ礭¤µ. */ struct { /***en X and Y coordinate of the spot. */ - /***ja ¥¹¥Ý¥Ã¥È¤Î X, Y ºÂɸ */ + /***ja ¥¹¥Ý¥Ã¥È¤Î X, Y ºÂɸ. */ int x, y; + /***en Ascent and descent pixels of the line of the spot. */ - /***ja ¥¹¥Ý¥Ã¥È¤Î¥¢¥»¥ó¥È¤È¥Ç¥£¥»¥ó¥È¤Î¥Ô¥¯¥»¥ë¿ô */ + /***ja ¥¹¥Ý¥Ã¥È¤Î¥¢¥»¥ó¥È¤È¥Ç¥£¥»¥ó¥È¤Î¥Ô¥¯¥»¥ë¿ô. */ int ascent, descent; /***en Font size for preedit text in 1/10 point. */ + /***ja preedit ¥Æ¥­¥¹¥ÈÍѤΥե©¥ó¥È¥µ¥¤¥º (1/10 ¥Ý¥¤¥ó¥Èñ°Ì). */ int fontsize; /***en M-text at the spot, or NULL. */ + /***ja ¥¹¥Ý¥Ã¥È¾å¤Î M-text¡¢¤Þ¤¿¤Ï NULL. */ MText *mt; + /***en Character position in at the spot. */ + /***ja ¤Ë¤ª¤±¤ë¥¹¥Ý¥Ã¥È¤Îʸ»ú°ÌÃÖ. */ int pos; } spot; /***en The usage of the following members depends on the input - driver. The descriptions below are for the input driver of an + method driver. The descriptions below are for the driver of an internal input method. They are set by the function ->driver.filter (). */ - /***ja °Ê²¼¤Î¥á¥ó¥Ð¤Î»ÈÍÑË¡¤ÏÆþÎϥɥ饤¥Ð¤Ë¤è¤Ã¤Æ°Û¤Ê¤ë¡£°Ê²¼¤ÎÀâÌÀ - ¤Ï¡¢ÆâÉôÆþÎϥ᥽¥Ã¥ÉÍѤÎÆþÎϥɥ饤¥Ð¤ËÂФ¹¤ë¤â¤Î¤Ç¤¢¤ë¡£ */ + /***ja °Ê²¼¤Î¥á¥ó¥Ð¤Î»ÈÍÑË¡¤ÏÆþÎϥ᥽¥Ã¥É¥É¥é¥¤¥Ð¤Ë¤è¤Ã¤Æ°Û¤Ê¤ë¡£ + °Ê²¼¤ÎÀâÌÀ¤Ï¡¢ÆâÉôÆþÎϥ᥽¥Ã¥ÉÍѤÎÆþÎϥɥ饤¥Ð¤ËÂФ¹¤ë¤â¤Î¤Ç¤¢¤ë¡£ + ¤³¤ì¤é¤Ï´Ø¿ô ->driver.filter () ¤Ë¤è¤Ã¤ÆÀßÄꤵ¤ì¤ë¡£ */ /***en Pointer to extra information that ->driver.create_ic () setups. It is used to record the internal state of the input context. */ - /***ja ->driver.create_ic () ¤¬ÀßÄꤹ¤ëÄɲþðÊó¤Ø¤Î¥Ý¥¤¥ó¥¿¡£Æþ - ÎÏ¥³¥ó¥Æ¥¯¥¹¥È¤ÎÆâÉô¾õÂÖ¤òµ­Ï¿¤¹¤ë¤¿¤á¤ËÍѤ¤¤é¤ì¤ë¡£ */ + /***ja ->driver.create_ic () ¤¬ÀßÄꤹ¤ëÄɲþðÊó¤Ø¤Î¥Ý¥¤¥ó¥¿¡£ + ÆþÎÏ¥³¥ó¥Æ¥¯¥¹¥È¤ÎÆâÉô¾õÂÖ¤òµ­Ï¿¤¹¤ë¤¿¤á¤ËÍѤ¤¤é¤ì¤ë¡£ */ void *info; /***en M-text describing the current status of the input context. */ - /***ja ÆþÎÏ¥³¥ó¥Æ¥¯¥¹¥È¤Î¸½ºß¤Î¾õ¶·¤òɽ¤¹ M-text */ + /***ja ÆþÎÏ¥³¥ó¥Æ¥¯¥¹¥È¤Î¸½ºß¤Î¾õÂÖ¤òɽ¤¹ M-text */ MText *status; /***en The function ->driver.filter () sets the value to 1 when it changes . */ + /***ja ´Ø¿ô ->driver.filter () ¤Ï¡¢ ¤òÊѤ¨¤¿ºÝ¤Ë¤³¤ÎÃͤò 1 + ¤ËÀßÄꤹ¤ë¡£ */ int status_changed; /***en M-text containing the current preedit text. The function ->driver.filter () sets the value. */ - /***ja ¸½ºß¤Î preedit ¥Æ¥­¥¹¥È¤ò´Þ¤à M-text */ + /***ja ¸½ºß¤Î preedit ¥Æ¥­¥¹¥È¤ò´Þ¤à M-text¡£´Ø¿ô + ->driver.filter () ¤Ë¤è¤Ã¤ÆÀßÄꤵ¤ì¤ë¡£ */ MText *preedit; /***en The function ->driver.filter () sets the value to 1 when it changes . */ + /***ja ´Ø¿ô ->driver.filter () ¤Ï¡¢ ¤òÊѤ¨¤¿ºÝ¤Ë¤³¤ÎÃͤò + 1 ¤ËÀßÄꤹ¤ë¡£ */ int preedit_changed; /***en Cursor position of . */ /***ja ¤Î¥«¡¼¥½¥ë°ÌÃÖ */ int cursor_pos; + /***en The function ->driver.filter () sets the value to 1 when + it changes . */ + /***ja ´Ø¿ô ->driver.filter () ¤Ï¡¢ ¤òÊѤ¨¤¿ºÝ¤Ë¤³¤ÎÃͤò + 1 ¤ËÀßÄꤹ¤ë¡£ */ int cursor_pos_changed; - /***en Array of the current candidate texts. */ - /***ja ¸½ºß¤Î¥Æ¥­¥¹¥È¸õÊä¤Î¥°¥ë¡¼¥×¤Î¥ê¥¹¥È */ + /***en Plist of the current candidate groups. Each element is an + M-text or a plist. If an element is an M-text (i.e. the key is Mtext), + candidates in that group are characters in the M-text. If it is + a plist (i.e. the key is Mplist), each element is an M-text, and + candidates in that group are those M-texts. */ + /***ja ¸½ºß¤Î¸õÊ䥰¥ë¡¼¥×¤Î Plist ¡£³ÆÍ×ÁÇ¤Ï M-text ¤« plist ¤Ç¤¢¤ë¡£ + Í×ÁǤ¬ M-text ¤Î¾ì¹ç¡Ê¥­¡¼¤¬ Mtext ¤Ç¤¢¤ë¾ì¹ç¡Ë¤Ë¤Ï¡¢¤½¤Î¥°¥ë¡¼¥×¤Î¸õÊä¤Ï¤½¤Î + M-text Ãæ¤Î³Æʸ»ú¤Ç¤¢¤ë¡£ Í×ÁǤ¬ plist ¤Î¾ì¹ç¡Ê¥­¡¼¤¬ Mplist + ¤Ç¤¢¤ë¾ì¹ç¡Ë¤Ë¤Ï¡¢¤½¤Î¥ê¥¹¥È¤Î³ÆÍ×ÁÇ¤Ï M-text ¤Ç¤¢¤ê¡¢¤½¤ì¤é¤¬¤½¤Î¥°¥ë¡¼¥×¤Î¸õÊä¤È¤Ê¤ë¡£ */ MPlist *candidate_list; + + /***en Index number of the currently selected candidate in all the + candidates. The index of the first candidate is 0. If the + number is 8, and the first candidate group contains 7 + candidates, the currently selected candidate is the second element of the + second candidate group. */ + /***ja ¸½ºßÁªÂò¤µ¤ì¤Æ¤¤¤ë¸õÊ䤬Á´¸õÊäÃæ¤Ç²¿ÈÖÌܤ«¤ò¤ò¼¨¤¹¥¤¥ó¥Ç¥Ã¥¯¥¹¡£ + ºÇ½é¤Î¸õÊä¤Î¥¤¥ó¥Ç¥Ã¥¯¥¹¤Ï 0¡£ºÇ½é¤Î¸õÊ䥰¥ë¡¼¥×¤Ë¼·¤Ä¤Î¸õÊ䤬´Þ¤Þ¤ì¤Æ¤ª¤ê¡¢¤³¤ÎÃͤ¬ + 8 ¤Ê¤é¤Ð¡¢¸½ºß¤Î¸õÊä¤ÏÆóÈÖÌܤθõÊ䥰¥ë¡¼¥×¤ÎÆóÈÖÌܤÎÍ×ÁǤȤ¤¤¦¤³¤È¤Ë¤Ê¤ë¡£ + */ int candidate_index; + + /***en Start and the end positions of the preedit text where + corresponds to. */ + /***ja preedit ¥Æ¥­¥¹¥ÈÃæ¤Ç¡¢¤ËÂбþ¤¹¤ëºÇ½é¤ÈºÇ¸å¤Î°ÌÃÖ¡£ + */ int candidate_from, candidate_to; + + /***en Flag telling whether the current candidate group must be + shown or not. The function ->driver.filter () sets the + value to 1 when an input method required to show candidates, and + sets the value to 0 otherwise. */ + /***ja ¸½ºß¤Î¸õÊ䥰¥ë¡¼¥×¤òɽ¼¨¤¹¤ë¤«¤É¤¦¤«¤ò¼¨¤¹¥Õ¥é¥°¡£ + ´Ø¿ô ->driver.filter () ¤Ï¡¢ÆþÎϥ᥽¥Ã¥É¤¬¸õÊä¤Îɽ¼¨¤òÍ׵ᤷ¤¿»þ¤³¤ÎÃͤò + 1 ¤Ë¡¢¤½¤ì°Ê³°¤Î»þ 0 ¤ËÀßÄꤹ¤ë¡£ */ int candidate_show; - /***en The function ->driver.filter () sets the value to 1 when - it changes one of the above members. */ + /***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 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 ¤ò²òÊü¤¹¤ë¡£ */ MPlist *plist; }; @@ -1231,19 +1375,45 @@ 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_toggle (MInputContext *ic); -extern void minput_set_spot (MInputContext *ic, int x, int y, - int ascent, int descent, int fontsize, - MText *mt, int pos); +extern void minput_reset_ic (MInputContext *ic); -extern void minput_toggle (MInputContext *ic); +extern MText *minput_get_description (MSymbol language, MSymbol name); + +extern MPlist *minput_get_title_icon (MSymbol language, MSymbol name); -extern MSymbol minput_char_to_key (int c); +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); /*=*/ +/*** @} */ extern MInputMethod *mdebug_dump_im (MInputMethod *im, int indent); + #ifdef __cplusplus } #endif