Rechercher une page de manuel
jrKanjiControl
Langue: ja
Version: 4 April 1991 (openSuse - 09/10/07)
Section: 3 (Bibliothèques de fonctions)
Sommaire
̾Á°
UILib intro - ¥æ¡¼¥¶¥¤¥ó¥¿¥Õ¥§¡¼¥¹¥é¥¤¥Ö¥é¥ê¥¤¥ó¥È¥íÀâÌÀ
¥æ¡¼¥¶¥¤¥ó¥¿¥Õ¥§¡¼¥¹¥é¥¤¥Ö¥é¥ê¤Ï¡¤£±Ê¸»ú¤ÎÆþÎÏ¡¤£±¥¡¼¤ÎÆþÎϤËÂбþ¤·¤Æ¡¤ ̤³ÎÄêʸ»úÎ󡤳ÎÄêʸ»úÎó¡¤ÃíÌÜʸÀá°ÌÃÖ¡¤¥¹¥Æ¡¼¥¿¥¹É½¼¨¤Î¤¿¤á¤Îʸ»úÎó¡¤ ¸õÊä°ìÍ÷¤Î¤¿¤á¤Îʸ»úÎó¤Ê¤É¤òÊÖ´Ô¤¹¤ë¥é¥¤¥Ö¥é¥ê¤Ç¤¹¡¥¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¥× ¥í¥°¥é¥à¤Ï¡¤ÊÖ´Ô¤µ¤ì¤¿¾ðÊó¤Ë¤è¤Ã¤Æɽ¼¨¤ò¹Ô¤¤¤Þ¤¹¡¥¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¥×¥í ¥°¥é¥à¤Ï¡¤¥¡¼ÆþÎϰʳ°¤Î¥È¥ê¥¬¡¼¤Ë¤è¤Ã¤Æ(Î㤨¤Ð¥Þ¥¦¥¹¤Ë¤è¤ëÁªÂò¤Ê¤É)¥â¡¼ ¥É¤ÎÁ«°Ü¤òÀ©¸æ¤¹¤ë¤³¤È¤â¤Ç¤¤Þ¤¹¡¥
¥æ¡¼¥¶¥¤¥ó¥¿¥Õ¥§¡¼¥¹¥é¥¤¥Ö¥é¥ê¤Ç¤Ï¡¤TTY¥Ù¡¼¥¹ ¤ÇjrKanjiString¤ª¤è¤ÓjrKanjiControl¡¤£Ø¥¦¥£¥ó¥É¥¦¥Ù¡¼¥¹¤Ç XLookupKanjiString¤ª¤è¤ÓXKanjiControl¤òÄ󶡤·¤Þ¤¹¡¥ ¥æ¡¼¥¶¥¤¥ó¥¿¥Õ¥§¡¼¥¹¥é¥¤¥Ö¥é¥ê¤ò»ÈÍѤ¹¤ë¾ì¹ç¤Ë¤Ï°Ê²¼¤Î¥Õ¥¡¥¤¥ë¤¬É¬Í×¤Ë ¤Ê¤ê¤Þ¤¹¡¥
- ¡¦
- TTY¥Ù¡¼¥¹
-
- ´Ø¿ô
- jrKanjiString, jrKanjiControl
- ¥Ø¥Ã¥À¥Õ¥¡¥¤¥ë
- canna/jrkanji.h
- ¥é¥¤¥Ö¥é¥ê
- libcanna.a, libcanna.so
-
- ¡¦
- X¥¦¥£¥ó¥É¥¦¥Ù¡¼¥¹
-
- ´Ø¿ô
- XLookupKanjiString, XKanjiControl
- ¥Ø¥Ã¥À¥Õ¥¡¥¤¥ë
- canna/kanji.h
- ¥é¥¤¥Ö¥é¥ê
- libXn.a, libXn.so, libcanna.a, libcanna.so
-
³µÍ×
- jrKanjiString
- TTY¤«¤é¤ÎÆþÎÏ¡¤£Ø¤Ç¤ÎÆþÎÏ¡¤´ðËÜ¥¦¥£¥ó¥É¥¦¤Ç¤ÎÆþÎϤʤɰìÈÌŪ¤Ê¥¡¼¥Ü¡¼ ¥ÉÆþÎϤËÂФ·¤Æ´Á»úʸ»úÎó¤Ø¤ÎÊÑ´¹¤ò¹Ô¤¤¤Þ¤¹¡¥
- jrKanjiControl
- jrKanjiString¤Ç¤ÎÀ©¸æ¤ò»ØÄꤵ¤ì¤¿¥Ñ¥é¥á¥¿¤Ë¤è¤ê¹Ô¤¤¤Þ¤¹¡¥
- XLookupKanjiString
- £Ø¥¦¥£¥ó¥É¥¦¥·¥¹¥Æ¥à¤Ë¤ª¤¤¤Æ¡¤¥¡¼¥Ü¡¼¥ÉÆþÎÏ(¥¡¼¥¤¥Ù¥ó¥È)¤Î´Á»úʸ»úÎó ¤Ø¤ÎÊÑ´¹¤ò¹Ô¤¤¤Þ¤¹¡¥
- XKanjiControl
- XLookupKanjiString¤Ç¤ÎÀ©¸æ¤ò»ØÄꤵ¤ì¤¿¥Ñ¥é¥á¥¿¤Ë¤è¤ê¹Ô¤¤¤Þ¤¹¡¥
̾Á°
jrKanjiString - °ìÈÌŪ̾¥¡¼¥Ü¡¼¥ÉÆþÎϤËÂФ·¤Æ¤Î¤«¤Ê´Á»úÊÑ´¹·Á¼°
#include <canna/jrkanji.h> int jrKanjiString(context_id, ch, buffer_return, bytes_buffer, kanji_status_return) int context_id; int ch; char *buffer_return; int bytes_buffer; jrKanjiStatus *kanji_status_return;
ÀâÌÀ
jrKanjiString¤ÏTTY¤«¤é¤ÎÆþÎÏ¡¤£Ø¤Ç¤ÎÆþÎÏ¡¤´ðËÜ¥¦¥£¥ó¥É¥¦¤Ç¤ÎÆþÎϤʤɡ¤ °ìÈÌŪ¤Ê¥¡¼¥Ü¡¼¥ÉÆþÎϤËÂФ·¤Æ´Á»úʸ»úÎó¤Ø¤ÎÊÑ´¹¤ò¹Ô¤¦´Ø¿ô¤Ç¤¹¡¥
jrKanjiString¤Ï¡¤¥¢¥¹¥¡¼¥³¡¼¥É¤Çɽ¤µ¤ì¤ë¥¡¼ÆþÎϤòÆüËܸìʸ»úÎó¤ËÂбþ ¤µ¤»¤ë´Ê°×¥ë¡¼¥Á¥ó¤Ç¡¤ÆþÎϤµ¤ì¤¿¥¡¼¤òɽ¤¹¥³¡¼¥É¤òch¤Ë¤ÆÍ¿¤¨¤ë¤³ ¤È¤Ë¤è¤ê¡¤É½¼¨¤¹¤Ù¤Ê¸»úÎó¤òÊÖ¤·¤Þ¤¹¡¥jrKanjiString¤ÎÆâÉô¤Ë¤ª¤¤¤Æ¥í¡¼ ¥Þ»ú¤«¤ÊÊÑ´¹¡¤¤«¤Ê´Á»úÊÑ´¹¤¬¹Ô¤ï¤ì¤Þ¤¹¡¥
¥Õ¥¡¥ó¥¯¥·¥ç¥ó¥¡¼¤ä¡¤¥«¡¼¥½¥ë¥¡¼¤Ê¤É¤Î¥¡¼¤Ë¤Ä¤¤¤Æ¤Ï¡¤¤½¤ì¤é¤Î¥¡¼¤Î ȯÀ¸¤¹¤ë¥¨¥¹¥±¡¼¥×¥·¡¼¥±¥ó¥¹¤Î Âå¤ï¤ê¤Ë¥Õ¥¡¥ó¥¯¥·¥ç¥ó¥¡¼¤Î¹à¤Ç¼¨¤¹ÆÃÊ̤Π¥³¡¼¥É¤òjrKanjiString¤ËÍ¿¤¨¤Æ²¼¤µ¤¤¡¥
context_id¤ÇÍ¿¤¨¤ë¥³¥ó¥Æ¥¯¥¹¥È¼±Ê̻Ҥϡ¤¼ÂºÝ¤Ë¤Ï¤½¤Î¤Þ¤Þ¤ÎÃͤ¬ÍÑ ¤¤¤é¤ì¤ë¤ï¤±¤Ç¤Ï¤Ê¤¯¡¤context_id¤ÇÍ¿¤¨¤é¤ì¤ë¥³¥ó¥Æ¥¯¥¹¥È¼±Ê̻Ҥò ¥¡¼¤È¤·¤¿¥³¥ó¥Æ¥¯¥¹¥È¤¬ºîÀ®¤µ¤ì¡¤ÍѤ¤¤é¤ì¤ë¤³¤È¤Ë¤Ê¤ê¤Þ¤¹¡¥¤·¤¿¤¬¤Ã¤Æ ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¥×¥í¥°¥é¥Þ¤ÏjrKanjiString¤ËÍ¿¤¨¤ë¥³¥ó¥Æ¥¯¥¹¥È¼±ÊÌ»Ò¤Ë ¤Ä¤¤¤Æ¤Ï¡¤Å¬Åö¤ÊÃͤòÍ¿¤¨¤ì¤ÐÎɤ¯¡¤ÆþÎϥݡ¼¥È¤Î¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤ò Í¿¤¨¤ë¤Î¤¬Å¬Åö¤È¹Í¤¨¤é¤ì¤Þ¤¹¡¥¤¿¤À¤·¡¤0¤òÍ¿¤¨¤¿»þ¤ÏÆÃÊ̤ǡ¤¥·¥¹¥Æ¥à¤Ë ¥Ç¥Õ¥©¥ë¥È¤Ç½àÈ÷¤µ¤ì¤Æ¤¤¤ë¥³¥ó¥Æ¥¯¥¹¥È¤¬ÍѤ¤¤é¤ì¤Þ¤¹¡¥¥³¥ó¥Æ¥¯¥¹¥È¤ËÆà Ê̤ÎÇÛθ¤ò¹Ô¤ï¤Ê¤¤¾ì¹ç¤Ë¤Ï0¤ò»ØÄꤹ¤ë¤Î¤¬Å¬Åö¤Ç¤¹¡¥
ÆþÎϤËÂбþ¤·¤Æ¡¤¥í¡¼¥Þ»ú¤«¤ÊÊÑ´¹¡¤¤«¤Ê´Á»úÊÑ´¹¤ÎÃæ´Ö·ë²Ì¤òɽ¼¨¤¹¤ëɬÍ× ¤¬¤¢¤ê¤Þ¤¹¤¬¡¤É½¼¨¤¹¤Ù¤Ãæ´Ö·ë²Ì¤Ïkanji_status_return¤ò²ð¤·¤Æ¡¤ ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤ËÊÖ¤µ¤ì¤Þ¤¹¡¥
¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ïkanji_status_return¤ËÊÖ¤µ¤ì¤ë¾ðÊó¤Ë¤·¤¿¤¬¤Ã¤Æ Ãæ´Ö·ë²Ì¤òɽ¼¨¤·¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ ¤»¤ó¡¥kanji_status_return¤ÏjrKanjiStatus·¿¤Î¹½Â¤ÂΤǤ¹¡¥
jrKanjiStatus¹½Â¤ÂΤϰʲ¼¤Î¤è¤¦¤ËÄêµÁ¤µ¤ì¤Þ¤¹¡¥
typedef struct { unsigned char *echoStr; /* ¥í¡¼¥«¥ë¥¨¥³¡¼¤Î¤¿¤á¤Îʸ»úÎó */ int length; /* ¥í¡¼¥«¥ë¥¨¥³¡¼Ê¸»úÎó¤ÎŤµ */ int revPos; /* ¥í¡¼¥«¥ë¥¨¥³¡¼Ê¸»úÎó¤Î¤¦¤Áȿžɽ¼¨Éôʬ¤Ø¤Î¥ª¥Õ¥»¥Ã¥È */ int revLen; /* ¥í¡¼¥«¥ë¥¨¥³¡¼Ê¸»úÎó¤Î¤¦¤Áȿžɽ¼¨Éôʬ¤ÎŤµ */ unsigned long info; /* ¤½¤Î¾¤Î¾ðÊó */ unsigned char *mode; /* ¥â¡¼¥É¾ðÊó */ struct { unsigned char *line; /* ¸õÊä°ìÍ÷¤Îʸ»úÎó */ int length; /* ¸õÊä°ìÍ÷ʸ»úÎó¤ÎŤµ */ int revPos; /* ¸õÊä°ìÍ÷ʸ»úÎó¤Î¤¦¤Áȿžɽ¼¨Éôʬ¤Ø¤Î¥ª¥Õ¥»¥Ã¥È */ int revLen; /* ¸õÊä°ìÍ÷ʸ»úÎó¤Î¤¦¤Áȿžɽ¼¨Éôʬ¤ÎŤµ */ } gline; /* ¸õÊä°ìÍ÷¤Ë´Ø¤¹¤ë¾ðÊó */ } jrKanjiStatus;
¤«¤Ê´Á»úÊÑ´¹¤òÍѤ¤¤¿ÆüËܸìÆþÎÏ»þ¤Ë¤ÏÊÑ´¹¤ÎÂоݤȤʤëÆɤߤʤɤò¥í¡¼¥«¥ë ¥¨¥³¡¼¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡¥jrKanjiString¤Ï¥í¡¼¥«¥ë¥¨¥³¡¼¤Ê¤Éɽ¼¨¤Ë´Ø¤¹ ¤ë¤³¤È¤Ï²¿¤â¹Ô¤ï¤º¡¤Âå¤ï¤ê¤Ë¥í¡¼¥«¥ë¥¨¥³¡¼¤¹¤ë¤Ù¤ ʸ»úÎó¤òjrKanjiStatus¹½Â¤ÂΤòÍѤ¤¤Æ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¦¤ËÊÖ¤·¤Þ¤¹¡¥
ÊÑ´¹¤¬³ÎÄꤹ¤ë¤Þ¤Ç¤Ï¡¤¥í¡¼¥Þ»ú¤«¤ÊÊÑ´¹¤µ¤ì¤Æ¤¤¤ëʸ»ú¤ä¡¤ÊÑ´¹¸õÊäʸ»ú¤Ê ¤É¡¤¥í¡¼¥«¥ë¥¨¥³¡¼¤¹¤Ù¤(EUC)ʸ»úÎó¤¬echoStr¥á¥ó¥Ð¤Ë¤è¤êÊÖ¤µ¤ì¤Þ ¤¹¡¥¤³¤Î¤È¤¡¤¥í¡¼¥«¥ë¥¨¥³¡¼Ê¸»úÎó¤ÎŤµ¡¤¥ê¥Ð¡¼¥¹É½¼¨¤Î ³«»Ï°ÌÃÖ¤ÈŤµ(¥Ð¥¤¥Èñ°Ì)¤¬¡¤ ¤½¤ì¤¾¤ì¡¤length¥á¥ó¥Ð¡¤revPos¡¤revLen¥á¥ó¥Ð¤Ë¤ÆÊÖ¤µ¤ì¤Þ¤¹¡¥¥í¡¼ ¥«¥ë¥¨¥³¡¼¤¹¤Ù¤Ê¸»úÎó¤Î¤¿¤á¤Î¥Ð¥Ã¥Õ¥¡¤ÏjrKanjiString¤Ë¤è¤Ã¤Æ¼«Æ°Åª¤Ë ³ÎÊݤµ¤ì¤Þ¤¹¤¬¡¤¤½¤ÎÎΰè¤ÏÆɤߤȤê¤Î¤ß¤ËÍѤ¤¤é¤ì¤ë¤Ù¤¤Ç¤¢¤ê¡¤¤½¤ÎÎÎ°è ¤Ëʸ»úÎó¤ò½ñ¤¹þ¤ó¤Ç¤Ï¤¤¤±¤Þ¤»¤ó¡¥
¥í¡¼¥«¥ë¥¨¥³¡¼¤¹¤Ù¤Ê¸»úÎ󤬤ʤ¤¾ì¹ç¤Ïlength¥á¥ó¥Ð¤Ë£°¤¬ÊÖ¤ê¤Þ¤¹¡¥
¥í¡¼¥«¥ë¥¨¥³¡¼¤¹¤Ù¤ÆâÍƤ¬Á°²ó¤ÎjrKanjiString¤Î¸Æ½Ð¤·¤Î»þ¤ÈÊѤï¤é¤Ê¤¤ ¾ì¹ç(Î㤨¤Ð¥³¥ó¥È¥í¡¼¥ëʸ»ú¤¬²¡¤µ¤ì¡¤¤½¤Î¥¡¼¤¬Ìµ¸ú¤Ç¤¢¤Ã¤¿ ¾ì¹ç¤Ê¤É)¤Ïlength¥á¥ó¥Ð¤Ë-1¤¬ÊÖ¤ê¤Þ¤¹¡¥
¥â¡¼¥É¤ÎÊѹ¹¤ä¡¤¸õÊä°ìÍ÷¤Ë´Ø¤¹¤ë¾ðÊó¤ÎÍ̵¤Ï¡¤info¥á¥ó¥Ð¤Ë¤è¤Ã¤Æ ÅϤµ¤ì¤Þ¤¹¡¥info¥á¥ó¥Ð¤ÎKanjiModeInfo¥Ó¥Ã¥È¤¬on¤Ç ¤¢¤ì¤Ð¡¤mode¤Ë¿·¤·¤¤¥â¡¼¥É¤ò¼¨¤¹Ê¸»úÎó¤¬ÊÖ¤µ¤ì¤Þ¤¹¡¥info¥á ¥ó¥Ð¤ÎKanjiGLineInfo¥Ó¥Ã¥È¤¬on¤Ç¤¢¤ì¤Ð¡¤gline¹½Â¤ÂΤ˸õÊä°ìÍ÷Åù ¤Î¾ðÊ󤬳ÊǼ¤µ¤ì¤Æ¤¤¤Þ¤¹¡¥
gline¹½Â¤ÂΤÎline¥á¥ó¥Ð¤Ë¤Ï¸õÊä°ìÍ÷ɽ¼¨¤Î¤¿¤á¤Îʸ»úÎó¤¬ÊÖ ¤µ¤ì¤Þ¤¹¡¥gline¹½Â¤ÂΤÎline,revPos,revLen¤Î³Æ¥á¥ó¥Ð¤Ï¡¤¸õ Êä°ìÍ÷ʸ»úÎó¤Î¤½¤ì¤¾¤ì¡¤Ä¹¤µ¡¤¥ê¥Ð¡¼¥¹É½¼¨¤Î³«»Ï°ÌÃÖ¡¤¥ê¥Ð¡¼¥¹É½¼¨¤ÎĹ ¤µ¤¬ÊÖ¤µ¤ì¤Þ¤¹¡¥
ÊÑ´¹Ãæ¤Ë³ÎÄꤷ¤¿(EUC)ʸ»úÎ󤬤¢¤ë¾ì¹ç¤Ï¡¤ ¤½¤Îʸ»úÎó¤¬buffer_return¤Ç»ØÄꤷ¤¿¥Ð¥Ã¥Õ¥¡¤Ë³ÊǼ¤µ¤ì¡¤¤½¤Îʸ»ú Îó¤ÎŤµ(¥Ð¥¤¥Èñ°Ì)¤¬ÊÖ¤µ¤ì¤Þ¤¹¡¥³ÎÄꤷ¤¿Ê¸»úÎó¤¬Ìµ¤¤¾ì¹ç¤ÏÌá¤ê ÃͤÏ0¤Ë¤Ê¤ê¤Þ¤¹¡¥³ÎÄêʸ»úÎó¤ò³ÊǼ¤¹¤ë¥Ð¥Ã¥Õ¥¡buffer_return¤ÎÂç¤ ¤µ¤òbytes_buffer¤Ë¤ÆÍ¿¤¨¤Þ¤¹¡¥ ³ÎÄêʸ»úÎó¤ÎŤµ¤¬bytes_buffer¤è¤ê¤âŤ¤¾ì¹ç¤Ë¤Ï¡¤ ³ÎÄêʸ»úÎó¤Î¤¦¤Á¡¤bytes_bufferʬ ¤À¤±¤¬buffer_return¤Ë³ÊǼ¤µ¤ì¡¤jrKanjiString¤ÎÌá¤êÃÍ¤È ¤·¤Æ¡¤bytes_buffer¤ÇÍ¿¤¨¤¿Ãͤ¬ÊÖ¤ê¤Þ¤¹¡¥
¥Õ¥¡¥ó¥¯¥·¥ç¥ó¥¡¼
¥¨¥¹¥±¡¼¥×¥·¡¼¥±¥ó¥¹¤òȯ¹Ô¤¹¤ë¤è¤¦¤Ê¥Õ¥¡¥ó¥¯¥·¥ç¥ó¥¡¼¤Ë´Ø¤·¤Æ¤Ï¡¤¥Õ¥¡ ¥ó¥¯¥·¥ç¥ó¥¡¼¤Ë¤è¤ë¥¨¥¹¥±¡¼¥×¥·¡¼¥±¥ó¥¹¤ÎÊѤï¤ê¤Ë°Ê²¼¤Î¥Þ¥¯¥í̾¤Ç¼¨¤µ ¤ì¤ë¥³¡¼¥É¤òch¤È¤·¤ÆÍ¿¤¨¤Æ²¼¤µ¤¤¡¥
- ÏÀÍý̾
- ¥³¡¼¥É
- Nfer
- CANNA_KEY_Nfer
- Xfer
- CANNA_KEY_Xfer
- Up
- CANNA_KEY_Up
- Left
- CANNA_KEY_Left
- Right
- CANNA_KEY_Right
- Down
- CANNA_KEY_Down
- Insert
- CANNA_KEY_Insert
- Rollup
- CANNA_KEY_Rollup
- Rolldown
- CANNA_KEY_Rolldown
- Home
- CANNA_KEY_Home
- Help
- CANNA_KEY_Help
- S-Nfer
- CANNA_KEY_Shift_Nfer
- S-Xfer
- CANNA_KEY_Shift_Xfer
- S-Up
- CANNA_KEY_Shift_Up
- S-Left
- CANNA_KEY_Shift_Left
- S-Right
- CANNA_KEY_Shift_Right
- S-Down
- CANNA_KEY_Shift_Down
- C-Nfer
- CANNA_KEY_Control_Nfer
- C-Xfer
- CANNA_KEY_Control_Xfer
- C-Up
- CANNA_KEY_Control_Up
- C-Left
- CANNA_KEY_Control_Left
- C-Right
- CANNA_KEY_Control_Right
- C-Down
- CANNA_KEY_Control_Down
- F1
- CANNA_KEY_F1
- PF1
- CANNA_KEY_PF1
´ØÏ¢¾ðÊó
jrKanjiControl(3)Ìá¤êÃÍ
ÆþÎϽèÍýÃ沿¤é¤«¤Î¥¨¥é¡¼¤¬È¯À¸¤·¤¿¾ì¹ç¤Ï¡¤¤³¤Î´Ø¿ô¤ÎÌá¤êÃͤȤ·¤Æ-1¤¬ÊÖ ¤µ¤ì¡¤³°ÉôÊÑ¿ô(char *)jrKanjiError¤Ë¡¤¥¨¥é¡¼¥á¥Ã¥»¡¼¥¸¤¬³ÊǼ¤µ¤ì¤Þ¤¹¡¥
¤³¤Î´Ø¿ô¤Î¸Æ½Ð¤·¤Ë¤è¤ê³ÎÄꤷ¤¿Ê¸»úÎ󤬤¢¤ë¾ì¹ç¤Ï³ÎÄꤷ¤¿Ê¸»úÎó¤Î¥Ð¥¤¥È Ť¬ÊÖ¤ê¤Þ¤¹¡¥
¤½¤ì°Ê³°¤Î¾ì¹ç¤Ï0¤¬ÊÖ¤ê¤Þ¤¹¡¥
̾Á°
jrKanjiControl - jrKanjiString¤Ç¤Î¥â¡¼¥É¤ä¡¤½èÍý¤ÎÀ©¸æ¤ò¹Ô¤¦·Á¼°
#include <canna/jrkanji.h> int jrKanjiControl(context_id, request, arg) int context_id; int request; char *arg;
ÀâÌÀ
jrKanjiControl¤Ïcontext_id¤Ç¼¨¤µ¤ì¤ëÊÑ´¹¥³¥ó¥Æ¥¯¥¹¥È¤Ë ´Ø¤·¤Æ¡¤request¤Ç¼¨¤µ¤ì¤ë½èÍý¤ò¹Ô¤¤¤Þ¤¹¡¥½èÍý¤Ë¤è¤Ã¤Æ¤Ï¡¤°ú¿ô¤ò ȼ¤¦¾ì¹ç¤¬¤¢¤ê¡¤¤½¤Î¾ì¹ç¡¤°ú¿ô¤Ïarg¤Ë¤ÆÍ¿¤¨¤Þ¤¹¡¥
jrKanjiControl¤ÇÀ©¸æ¤µ¤ì¤ëµ¡Ç½¤È¤·¤Æ¤Ï°Ê²¼¤Î£µ¤Ä¤¬¤¢¤ê¤Þ¤¹¡¥
- request̾
- µ¡Ç½
- KC_INITIALIZE
- ¤«¤Ê´Á»úÊÑ´¹¤ò½é´ü²½¤¹¤ë¡¥
- KC_CHANGEMODE
- ÆþÎϥ⡼¥É¤òÊѹ¹¤¹¤ë¡¥
- KC_SETWIDTH
- ¸õÊä°ìÍ÷ɽ¼¨¤Î»þ¤ÎÉý¤ò»ØÄꤹ¤ë¡¥
- KC_FINALIZE
- ¤«¤Ê´Á»úÊÑ´¹¤Î½ªÎ»½èÍý¡¥
- KC_SETUNDEFKEYFUNCTION
- ̤ÄêµÁ¥¡¼¤ËÂФ¹¤ëµ¡Ç½¤ÎÀßÄê¤ò¹Ô¤¦¡¥
- KC_SETMODEINFOSTYLE
- ¥â¡¼¥É¾ðÊó¤ò¿ôÃͤÇɽ¸½¤¹¤ë¤«¤É¤¦¤«¤ò»ØÄꤹ¤ë¡¥
- KC_KAKUTEI
- ÆþÎÏÃæ¤Îʸ»úÎó¤ò³ÎÄꤹ¤ë¡¥
- KC_KILL
- ÆþÎÏÃæ¤Îʸ»úÎó¤òºï½ü¤¹¤ë¡¥
- KC_QUERYMODE
- ¸½ºß¤Î¥â¡¼¥É¤òÌ䤤¹ç¤ï¤»¤ë¡¥
- KC_SETSERVERNAME
- Àܳ¤¹¤ë¥µ¡¼¥Ð¤ò»ØÄꤹ¤ë¡¥
- KC_SETINITFILENAME
- ¥«¥¹¥¿¥Þ¥¤¥º¥Õ¥¡¥¤¥ë¤ò»ØÄꤹ¤ë¡¥
- KC_CLOSEUICONTEXT
- ¥³¥ó¥Æ¥¯¥¹¥È¤ò¥¯¥í¡¼¥º¤¹¤ë¡¥
- KC_QUERYMAXMODESTR
- ¥â¡¼¥Éɽ¼¨Ê¸»úÎó¤ÎºÇÂçŤòµá¤á¤ë¡¥
jrKanjiControl¤ÎºîÍѤϴðËÜŪ¤Ë¤Ï¥³¥ó¥Æ¥¯¥¹¥È¤Ç»ØÄꤵ¤ì¤¿¤â¤Î¤ËÂФ·¤Æ¤Î ¤ßºîÍѤ·¤Þ¤¹¡¥¤¿¤À¤·¡¤½é´ü²½¤Î½èÍý¤ä½ªÎ»¤Î½èÍý¤Ë´Ø¤·¤Æ¤Ï¤½¤Î¸Â¤ê¤Ç¤Ï¤¢ ¤ê¤Þ¤»¤ó¡¥
jrKanjiControl¤ÎÁàºî¤Ë¤è¤Ã¤Æ̤³ÎÄêʸ»úÎó¤Î¾õÂÖ¤¬ÊѲ½¤·¤¿¤ê¡¤¥â¡¼¥É¤Î¾õ ÂÖ¤¬ÊѤï¤ë¤³¤È¤¬¤¢¤ê¤Þ¤¹¡¥¤½¤Î¤è¤¦¤Ê²ÄǽÀ¤¬¤¢¤ë¾ì¹ç¤ÏargÉôʬ¤ËÊѲ½¤· ¤¿¾ðÊó¤ò³ÊǼ¤Ç¤¤ë¤è¤¦¤Ê¹½Â¤ÂΤؤΥݥ¤¥ó¥¿¤òÅϤ·¤Þ¤¹¡¥¤½¤Î¹½Â¤ÂΤÎÄêµÁ ¤Ï°Ê²¼¤Î¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡¥
typedef struct { int val; /* ¥Ð¥Ã¥Õ¥¡¤Ë³ÊǼ¤µ¤ì¤¿Ê¸»úÎó¤ÎŤµ¤¬ÊÖ¤ë */ unsigned char *buffer; /* ³ÎÄêʸ»úÎó¤ò³ÊǼ¤¹¤ë¤¿¤á¤Î¥Ð¥Ã¥Õ¥¡¤òÍ¿¤¨¤ë */ int bytes_buffer; /* ¾åµ¤Î¥Ð¥Ã¥Õ¥¡¤ÎÂ礤µ¤òÍ¿¤¨¤ë */ jrKanjiStatus *ks; /* ̤³ÎÄêʸ»úÎó¤Î¾ðÊó¤ò³ÊǼ¤¹¤ë¹½Â¤ÂΤؤΥݥ¤¥ó¥¿ */ } jrKanjiStatusWithValue;
jrKanjiControl¤Î¤½¤ì¤¾¤ì¤Îµ¡Ç½¤Î¼Â¹Ô¤Î¤·¤«¤¿¤Ï°Ê²¼¤ÎÄ̤ê¤Ç¤¹¡¥
- (1)
- KC_INITIALIZE - ¤«¤Ê´Á»úÊÑ´¹¤Î½é´ü²½
KC_INITIALIZE¤òrequestÉô¤Ç»ØÄꤹ¤ë¤³¤È¤Ë¤è¤ê¡¤¤«¤Ê´Á»úÊÑ´¹¤Î½é´ü ²½¤ò¹Ô¤¤¤Þ¤¹¡¥arg¤Ë¤Ïwarning¥á¥Ã¥»¡¼¥¸¤ò ³ÊǼ¤¹¤ë¤¿¤á¤Î(char **)·¿¤ÎÊÑ¿ô¤Ø¤Î¥Ý¥¤¥ó¥¿¤Þ¤¿¤ÏNULL¤ò»ØÄꤷ¤Þ¤¹¡¥½é ´ü²½¤Î½èÍý¤Ï´ðËÜŪ¤Ë¤ÏjrKanjiString(3)¤¬ºÇ½é¤Ë¸Æ¤Ð¤ì¤¿»þ¤Ë¼«Æ°Åª¤Ë¹Ô¤ï ¤ì¤Þ¤¹¤¬¡¤jrKanjiControl¤òÍѤ¤¤Æ½é´ü²½¤¹¤ë ¤³¤È¤Ë¤è¤ê¡¤jrKanjiString(3)¤Ç¤Î½é´ü²½½èÍý¤Ï¹Ô¤ï¤ì¤Ê¤¯¤Ê¤ê¤Þ¤¹¡¥
jrKanjiString(3)¤Î»ÈÍѤËÀèΩ¤Ã¤ÆjrKanjiControl¤òÍѤ¤¤Æ¤«¤Ê´Á»úÊÑ´¹¤Ë´Ø ¤¹¤ëÀ©¸æ¤ò¹Ô¤¦»þ¤Ê¤É¤Ï¡¤´Á»úÊÑ´¹¤Î½é´ü²½¤ò¹Ô¤¦É¬Íפ¬¤¢¤ê¤Þ¤¹¡¥
Àµ¾ï½ªÎ»»þ¤Ë¤ÏjrKanjiControl¤ÎÌá¤êÃͤȤ·¤Æ0¤¬Ê֤ꡤ°Û¾ï½ªÎ»»þ¤Ë¤Ï-1¤¬ ÊÖ¤ê¤Þ¤¹¡¥
KC_INITIALIZE¤ò¹Ô¤Ã¤¿¾ì¹ç¡¤¥¨¥é¡¼¤È¤Þ¤Ç¤Ï¤¤¤«¤Ê¤¯¤È¤â²¿¤é¤«¤Îwarning¤¬ ȯÀ¸¤¹¤ë¤³¤È¤¬¤¢¤ê¤Þ¤¹¡¥warning¤¬È¯À¸¤·¤¿¾ì¹ç¤Ïarg¤Ë¤ÆÍ¿¤¨¤é¤ì¤¿ ÊÑ¿ô¤ËÂФ·¤Æwarningʸ»úÎó¤ÎÇÛÎó¤Ø¤Î¥Ý¥¤¥ó¥¿¤¬³ÊǼ¤µ¤ì ÊÖ¤µ¤ì¤Þ¤¹¡¥warning¤¬¤Ê¤¤¤È¤¤ÏNULL¤¬³ÊǼ¤µ¤ìÊÖ¤µ¤ì¤Þ¤¹¡¥
(Îã)-
int res; /* ¥¨¥é¡¼¤¬Ê֤äƤ¯¤ë¾ì¹ç¤ËÈ÷¤¨¤ë */ char **warning; ..... res = jrKanjiControl(0, KC_INITIALIZE, &warning); if (warning) { char **p; for (p = warning ; *p ; p++) { fprintf(stderr, "%s, *p); } }
Â裳°ú¿ô¤ËÊÖ¤µ¤ì¤ëwarning¥á¥Ã¥»¡¼¥¸¤Ï¥é¥¤¥Ö¥é¥ê¤ÎÆâÉô¤Çmalloc¤µ¤ì¤Þ¤¹¡¥ ¤³¤ì¤Ï¡¤¼¡¤ËKC_INITIALIZE¤äKC_FINALIZE¤¬¹Ô¤ï¤ì¤¿»þ¤Ë³«Êü¤µ¤ì¤Þ¤¹¡¥¥¢¥× ¥ê¥±¡¼¥·¥ç¥ó¥×¥í¥°¥é¥Þ¤¬¾¡¼ê¤Ëfree¤·¤Æ¤Ï¤¤¤±¤Þ¤»¤ó¡¥warning¤Ïº£¤Î¤È¤³ ¤íºÇÂç64¥á¥Ã¥»¡¼¥¸¤Ë¸ÂÄꤵ¤ì¤Þ¤¹¡¥¤½¤ì°Ê¾å¤Î¥á¥Ã¥»¡¼¥¸¤ÏÀڼΤƤé¤ì¤Þ¤¹¡¥
¥á¥Ã¥»¡¼¥¸¤Ë´Þ¤Þ¤ì¤ë²ÄǽÀ¤Î¤¢¤ëwarning¤Ë¤Ï°Ê²¼¤Î¤â¤Î¤¬¤¢¤ê¤Þ¤¹¡¥
- ¡¦
- ¥«¥¹¥¿¥Þ¥¤¥º¥Õ¥¡¥¤¥ë¤¬¥·¥¹¥Æ¥à¤Î¤â¤Î¤â´Þ¤á¤Æ¤¹¤Ù¤ÆÍøÍѤǤ¤Ê¤¤¡¥
- ¡¦
- ¥«¥¹¥¿¥Þ¥¤¥º¥Õ¥¡¥¤¥ë¤Ë¥·¥ó¥¿¥Ã¥¯¥¹¥¨¥é¡¼¤¬¤¢¤ë¡¥
- ¡¦
- ¥í¡¼¥Þ»ú¤«¤ÊÊÑ´¹¼½ñ¤¬ÍøÍѤǤ¤Ê¤¤¡¥
- ¡¦
- ¤«¤Ê´Á»úÊÑ´¹¼½ñ¤¬ÍøÍѤǤ¤Ê¤¤¡¥
- ¡¦
- ¤«¤Ê´Á»úÊÑ´¹¥µ¡¼¥Ð¤ËÀܳ¤Ç¤¤Ê¤¤¡¥
Â裳°ú¿ô¤È¤·¤ÆNULL¤ò»ØÄꤷ¤¿¾ì¹çwarning¥á¥Ã¥»¡¼¥¸¤Ï¼Î¤Æ¤é¤ì¤Þ¤¹¡¥
- (2)
- KC_CHANGEMODE - ÆþÎϥ⡼¥É¤ÎÊѹ¹
ÆþÎϥ⡼¥É¤ò¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤«¤éÊѹ¹¤·¤Þ¤¹¡¥request¤Î Éôʬ¤Ë¤ÏKC_CHANGEMODE¤ò»ØÄꤷ¡¤arg¤ËjrKanjiStatusWithValue¹½Â¤ÂÎ ¤ò»ØÄꤷ¤Æ²¼¤µ¤¤¡¥jrKanjiStatusWithValue¹½Â¤ÂΤÎval¥á¥ó¥Ð¤Ë¤Æ¥â¡¼ ¥ÉÈÖ¹æ¤ò»ØÄꤹ¤ë¤³¤È¤Ë¤è¤êÆüËܸì¥â¡¼¥É¤¬ÀÚ¤êÂؤï¤ê¤Þ¤¹¡¥¥â¡¼¥ÉÈÖ¹æ¤Ï°Ê ²¼¤Î¥Þ¥¯¥í¤Ç¼¨¤µ¤ì¤Þ¤¹¡¥-
- ¥Þ¥¯¥íÈÖ¹æ
- ¥â¡¼¥É
- CANNA_MODE_AlphaMode
- ¥¢¥ë¥Õ¥¡¥Ù¥Ã¥È¥â¡¼¥É
- CANNA_MODE_HenkanMode
- ÊÑ´¹ÆþÎϥ⡼¥É
- CANNA_MODE_KigoMode
- µ¹æÆþÎϥ⡼¥É
- CANNA_MODE_ZenHiraKakuteiMode
- Á´³Ñ¤Ò¤é¤¬¤Ê³ÎÄêÆþÎϥ⡼¥É
- CANNA_MODE_ZenKataKakuteiMode
- Á´³Ñ¥«¥¿¥«¥Ê³ÎÄêÆþÎϥ⡼¥É
- CANNA_MODE_HanKataKakuteiMode
- Ⱦ³Ñ¥«¥¿¥«¥Ê³ÎÄêÆþÎϥ⡼¥É
- CANNA_MODE_ZenAlphaKakuteiMode
- Á´³Ñ¥¢¥ë¥Õ¥¡¥Ù¥Ã¥È³ÎÄêÆþÎϥ⡼¥É
- CANNA_MODE_HanAlphaKakuteiMode
- Ⱦ³Ñ¥¢¥ë¥Õ¥¡¥Ù¥Ã¥È³ÎÄêÆþÎϥ⡼¥É
- CANNA_MODE_HexMode
- 16¿Ê¥³¡¼¥ÉÆþÎϥ⡼¥É
- CANNA_MODE_BushuMode
- Éô¼óÆþÎϥ⡼¥É
- CANNA_MODE_TorokuMode
- ñ¸ìÅÐÏ¿¥â¡¼¥É
¤³¤Îµ¡Ç½¤Ë¤è¤ê¥â¡¼¥É¤òÊѹ¹¤¹¤ë¤È¥â¡¼¥É̾¤ò»Ï¤á¤È¤·¤Æ¿¤¯¤Îɽ¼¨¤¬ÊѲ½¤ò ¼õ¤±¤Þ¤¹¡¥É½¼¨¤ÎÊѹ¹¤Ïarg¤È¤·¤Æ»ØÄꤷ¤¿jrKanjiStatusWithValue¹½Â¤ÂÎ¤Ë ¤ÆÊÖ¤µ¤ì¤Þ¤¹¡¥
(Îã)
jrKanjiStatus ks; jrKanjiStatusWithValue ksv; unsigned char buf[SOMESIZE]; ..... ksv.ks = &ks; ksv.buffer = buf; ksv.bytes_buffer = SOMESIZE; ksv.val = CANNA_MODE_HexMode; jrKanjiControl(context, KC_CHANGEMODE, &ksv); len = ksv.val; ..... /* ̤³ÎÄêʸ»úÎó¤ä³ÎÄêʸ»úÎó¤Î¾ðÊó¤¬ksv¤Ë¤è¤êÊÖ¤µ¤ì¤Þ¤¹¡¥ */
- (3)
- KC_SETWIDTH - ¸õÊä°ìÍ÷ɽ¼¨¤Î¤¿¤á¤ÎÉý¤ò»ØÄê
¸õÊä°ìÍ÷¤Î¤¿¤á¤ËÍѤ¤¤é¤ì¤ëÎΰè¤Î¥³¥é¥à¿ô¤ò»ØÄꤷ¤Þ¤¹¡¥£±¥³¥é¥à¤ÎÉý¤Ï¥¢ ¥ë¥Õ¥¡¥Ù¥Ã¥Èʸ»ú¤¢¤ë¤¤¤ÏȾ³Ñ¥«¥¿¥«¥Ê£±Ê¸»ú¤Îʸ»úÉý¤Ç¤¢¤ê¡¤Á´³Ñ´Á»ú¤Ï£² ¥³¥é¥àÀê¤á¤ë¤³¤È¤Ë¤Ê¤ê¤Þ¤¹¡¥¸õÊä°ìÍ÷ɽ¼¨¤Î¤¿¤á¤ÎÉý¤ò »ØÄꤹ¤ë¤¿¤á¤ËrequestÉôʬ¤Ë»ØÄꤹ¤ëÃͤÏKC_SETWIDTH¤Ç¡¤ ¤³¤Î¤È¤arg¤Ë¥³¥é¥à¿ô¤ò»ØÄꤷ¤Þ¤¹¡¥
(Îã)-
jrKanjiControl(0, KC_SETWIDTH, (char *)60);
- (4)
- KC_FINALIZE - ¤«¤Ê´Á»úÊÑ´¹¤Î½ªÎ»½èÍý¡¥
¥×¥í¥°¥é¥à¤ò½ªÎ»¤¹¤ë¤Ê¤É¤Î¶ÉÌ̤Ǥ«¤Ê´Á»úÊÑ´¹¤â½ªÎ»¤¹¤ë¤³¤È¤ò»ØÄꤷ¤Þ¤¹¡¥ ¤«¤Ê´Á»úÊÑ´¹½èÍý¤ò½ªÎ»¤µ¤»¤ë»þ¤Ïɬ¤º¤³¤Î½èÍý¤ò¹Ô¤Ã¤Æ²¼¤µ¤¤¡¥½ª¤ï¤ë¤Ë¤¢ ¤¿¤Ã¤Æº£¤Þ¤Ç³Ø½¬¤·¤¿ÆâÍƤ¬¥Õ¥¡¥¤¥ë¤ËÅÐÏ¿¤µ¤ì¤Þ¤¹¡¥requestÉôʬ¤Ë ¤ÏKC_FINALIZE¤ò»ØÄꤷ¤Þ¤¹¡¥
Àµ¾ï½ªÎ»»þ¤Ë0¡¤°Û¾ï½ªÎ»»þ¤Ë-1¤¬Ìá¤êÃͤȤ·¤ÆÊÖ¤ê¤Þ¤¹¡¥
KC_FINALIZE¤ò¹Ô¤Ã¤¿¾ì¹ç¡¤¥¨¥é¡¼¤È¤Þ¤Ç¤¤¤«¤Ê¤¯¤È¤â²¿¤é¤«¤Îwarning¤¬È¯À¸ ¤¹¤ë¤³¤È¤¬¤¢¤ê¤Þ¤¹¡¥warning¤¬È¯À¸¤·¤¿¾ì¹ç¤Ïarg¤Ë¤ÆÍ¿¤¨¤é¤ì¤¿ ÊÑ¿ô¤Ëwarningʸ»úÎó¤ÎÇÛÎó¤Ø¤Î¥Ý¥¤¥ó¥¿¤¬³ÊǼ¤µ¤ìÊÖ¤µ¤ì¤Þ¤¹¡¥warning¤¬¤Ê ¤¤¾ì¹ç¤Ë¤ÏNULL¥Ý¥¤¥ó¥¿¤¬³ÊǼ¤µ¤ìÊÖ¤µ¤ì¤Þ¤¹¡¥
(Îã)-
int res; /* ¥¨¥é¡¼¤¬ÊÖ¤ë¾ì¹ç¤ËÈ÷¤¨¤ë */
char **warning;
.....
res = jrKanjiControl(0, KC_FINALIZE, &warning);
if (warning) {
char **p;
for (p = warning ; *p ; p++) {
fprintf(stderr, "%s, *p);
}
}Â裳°ú¿ô¤ËÊÖ¤µ¤ì¤ëwarning¥á¥Ã¥»¡¼¥¸¤Ï¡¤¥é¥¤¥Ö¥é¥ê¤ÎÆâÉô¤Çmalloc¤µ¤ì¤Þ ¤¹¡¥¤³¤ì¤Ï¡¤¼¡¤ËKC_INITIALIZE¤äKC_FINALIZE¤¬¹Ô¤ï¤ì¤¿»þ¤Ë³«Êü¤µ¤ì¤Þ¤¹¡¥ ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¥×¥í¥°¥é¥Þ¤¬¾¡¼ê¤Ëfree¤·¤Æ¤Ï¤¤¤±¤Þ¤»¤ó¡¥
warning¤Ïº£¤Î¤È¤³¤íºÇÂç64¥á¥Ã¥»¡¼¥¸¤Ë¸ÂÄꤵ¤ì¤Þ¤¹¡¥¤½¤ì°Ê¾å¤Î¥á¥Ã¥»¡¼ ¥¸¤ÏÀڼΤƤé¤ì¤Þ¤¹¡¥
¥á¥Ã¥»¡¼¥¸¤Ë´Þ¤Þ¤ì¤ë²ÄǽÀ¤Î¤¢¤ëwarning¤Ë¤Ï¼¡¤Î¤â¤Î¤¬¤¢¤ê¤Þ¤¹¡¥
- ¡¦
- ¼½ñ¤¬¥¢¥ó¥Þ¥¦¥ó¥È¤Ç¤¤Ê¤¤¡¥
Â裳°ú¿ô¤È¤·¤ÆNULL¤ò»ØÄꤷ¤¿¾ì¹ç¡¤warning¥á¥Ã¥»¡¼¥¸¤Ï¼Î¤Æ¤é¤ì¤Þ¤¹¡¥
- (5)
- KC_SETUNDEFKEYFUNCTION - ̤ÄêµÁ¥¡¼¤ËÂФ¹¤ëµ¡Ç½¤ÎÀßÄê
ÆɤߤòÆþÎϤ·¤Æ¤¤¤ë¾õÂÖ¤ÇC-t¤òÂǤ俤Ȥ¤Î¤è¤¦¤Ë̤ÄêµÁ¥¡¼¤òÆþÎϤ·¤¿»þ ¤Ë¼è¤é¤ì¤ë½èÍý¤ò»ØÄꤷ¤Þ¤¹¡¥Ì¤ÄêµÁ¥¡¼¤ËÂбþ¤·¤Æ¹Ô¤ï¤ì¤ë½èÍý¤È¤·¤Æ¤Ï°Ê ²¼¤Î½èÍý¤¬¤¢¤ê¤Þ¤¹¡¥-
- ¥Þ¥¯¥í̾
- ½èÍý
- kc_normal
- ¥Ó¡¼¥×
- kc_through
- ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¥×¥í¥°¥é¥à¤ËÅϤ¹
- kc_kakutei
- ³ÎÄꤷ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¥×¥í¥°¥é¥à¤ËÅϤ¹
- kc_kill
- ¾Ãµî¤·¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¥×¥í¥°¥é¥à¤ËÅϤ¹
kc_normal¤ò»ØÄꤷ¤¿¾ì¹ç¡¤³°ÉôÊÑ¿ôjrBeepFunc¤ËÀßÄꤵ¤ì¤¿´Ø¿ô¤¬Ì¤ÄêµÁ¥¡¼ ÆþÎÏ»þ¤Ë¥é¥¤¥Ö¥é¥ê¤Ë¤è¤Ã¤Æ¼«Æ°Åª¤Ë¸Æ¤Ó½Ð¤µ¤ì¤Þ¤¹¡¥jrBeepFunc¤ËÃͤòÀßÄê ¤·¤Ê¤¤¾ì¹ç¤Ë¤Ï(jrBeepFunc == NULL¤Î¾ì¹ç¤Ë¤Ï)²¿¤âµ¯¤³¤ê¤Þ¤»¤ó¡¥
(Îã)
extern (*jrBeepFunc)(), beep(); jrBeepFunc = beep; jrKanjiControl(0, KC_SETUNDEFKEYFUNCTION, kc_normal);
- (6)
- KC_SETMODEINFOSTYLE - ¥â¡¼¥É¾ðÊó¤Îɽ¸½
¥â¡¼¥É¾ðÊó¤òʸ»úÎó¤Ç¤Ï¤Ê¤¯¥Ó¥Ã¥È¥Þ¥Ã¥×¤Ê¤É¤Î¥Ç¡¼¥¿¤Çɽ¼¨¤·¤¿¤¤¾ì¹ç¤¬¤¢ ¤ê¤Þ¤¹¡¥¤½¤Î¤è¤¦¤Ê¾ì¹ç¤Ë¤Ï¥â¡¼¥É¾ðÊó¤È¤·¤Æ¿ôÃͥǡ¼¥¿¤¬Ê֤äƤ¯¤ë¤È½èÍý ¤¬¤·¤ä¤¹¤¯¤Ê¤ê¤Þ¤¹¡¥jrKanjiControl¤ÇKC_SETMODEINFOSTYLE¤ò »ØÄꤷ¡¤arg¤Ë£±¤òÅϤ¹¤³¤È¤Ë¤è¤Ã¤Æ¤½¤ì°Ê¸å¤ÏjrKanjiStatus¹½Â¤ÂÎ ¤Îmode¥á¥ó¥Ð¤Ë¤Ï¥â¡¼¥É¤òɽ¤¹¿ôÃͤË'@'(0x40)¤ò²Ã¤¨¤¿£±Ê¸»ú¤¬ÊÖ¤µ ¤ì¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡¥¥â¡¼¥É¤òɽ¤¹¿ôÃͤËÊÑ´¹¤¹¤ë¾ì¹ç¤Ë¤ÏÊ֤äƤ¤¿Ê¸»úÎó ¤«¤é'@'(0x40)¤ò°ú¤¤Þ¤¹¡¥¥â¡¼¥É¤òɽ¤¹¿ôÃͤˤĤ¤¤Æ¤ÏÆþÎϥ⡼¥É¤Î Êѹ¹((2)KC_CHANGEMODE)¤Î¤³¤¦¤ò»²¾È¤·¤Æ²¼¤µ¤¤¡¥
- (7)
- KC_KAKUTEI¡¤(8) KC_KILL - ÆþÎÏÃæ¤Îʸ»úÎó¤ÎÊü´þ
ÆþÎÏÃæ¤Îʸ»úÎó¤ò²¿¤é¤«¤ÎÅÔ¹ç¤ÇÊü´þ¤·¤¿¤¤¾ì¹ç¤¬¤¢¤ê¤Þ¤¹¡¥Êü´þ¤¹¤ë¾ì¹ç¤Ë ÆþÎÏÃæ¤Îʸ»úÎó¤ò³ÎÄêʸ»úÎó¤È¤·¤Æ¼è¤ê¹þ¤ó¤Ç¤«¤éÊü´þ¤·¤¿¤¤¾ì¹ç¤ÈÁ´¤¯¼Î¤Æ ¤Æ¤·¤Þ¤Ã¤Æ¤«¤éÊü´þ¤·¤¿¤¤¾ì¹ç¤¬¤¢¤ê¤Þ¤¹¡¥³ÎÄꤹ¤ë ¾ì¹ç¤Ë¤ÏjrKanjiControl¤Ë¤ÆKC_KAKUTEI¤ò»ØÄꤷ¡¤Êü´þ¤¹¤ë ¾ì¹ç¤Ë¤ÏKC_KILL¤ò»ØÄꤷ¤Þ¤¹¡¥
¤³¤Î½èÍý¤Ïɽ¼¨¤Ë±Æ¶Á¤òÍ¿¤¨¤ë¤Î¤ÇÂ裳°ú¿ô¤Ë¤ÏjrKanjiStatusWithValue¹½Â¤ ÂΤò»ØÄꤷ¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡¥
(Îã)-
jrKanjiStatusWithValue ksv; jrKanjiStatus ks; unsigned char buf[SOMESIZE]; ..... ksv.ks = &ks; ksv.buffer = buf; ksv.bytes_buffer = SOMESIZE; jrKanjiControl(context, KC_KAKUTEI, &ksv); len = ksv.val; .....
- (9)
- KC_QUERYMODE - ¥â¡¼¥É¤ÎÌ䤤¹ç¤ï¤»
¸½ºß¤Î¥â¡¼¥É¤òÌ䤤¹ç¤ï¤»¤ë¤Ë¤ÏjrKanjiControl¤ÇKC_QUERYMODE¤ò»ØÄꤷ¤Þ¤¹¡¥
Â裳°ú¿ô¤Ë¤Ï¥â¡¼¥Éʸ»úÎó¤ò³ÊǼ¤¹¤ë¤¿¤á¤Îʸ»úÇÛÎó¤Î¥Ý¥¤¥ó¥¿¤ò»ØÄꤷ¤Þ¤¹¡¥ ¥â¡¼¥Éʸ»úÎó¤Ï¥Ì¥ëʸ»ú¤Ç½ª¤ï¤ëʸ»úÎó¤Ç¤¹¡¥¤³¤³¤Ë¿ôÃͤ¬ÊÖ¤ë¤è¤¦¤Ë¤¹¤ë¤Ë ¤ÏjrKanjiControl¤ÇKC_SETMODEINFOSTYLE¤ò»ØÄꤷ¤Æ¥â¡¼¥Éʸ»úÎó¤Î¥¹¥¿¥¤¥ë ¤òÊѹ¹¤·¤Æ¤ª¤¤Þ¤¹¡¥
(Îã)-
char currentMode[MAXMODELEN]; ..... jrKanjiControl(0, KC_QUERYMODE, currentMode); .....
- (10)
- KC_SETSERVERNAME - ¥µ¡¼¥Ð¤Î»ØÄê
¤«¤Ê´Á»úÊÑ´¹¥µ¡¼¥Ð¤È¤·¤Æ¤É¤Î¥µ¡¼¥Ð¤ò»È¤¦¤«¤ò¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¥×¥í¥°¥é¥à ¤ò½ªÎ»¤¹¤ë¤³¤È¤Ê¤·¤ËÀÚÂؤ¨¤ë¤³¤È¤¬²Äǽ¤Ç¤¹¡¥¤«¤Ê´Á»úÊÑ´¹¥µ¡¼¥Ð¤È¤·¤ÆÀÜ Â³¤¹¤ë¤Ù¤¥µ¡¼¥Ð¤ò»ØÄꤹ¤ë¤Ë¤ÏjrKanjiControl¤ÇKC_SETSERVERNAME¤ò»ØÄꤷ ¤Þ¤¹¡¥Â裳°ú¿ô¤Ë¤ÏÀܳ¤·¤¿¤¤¥µ¡¼¥Ð̾¤ò»ØÄꤷ¤Þ¤¹¡¥
- (11)
- KC_SETINITFILENAME - ¥«¥¹¥¿¥Þ¥¤¥º¥Õ¥¡¥¤¥ë¤Î»ØÄê
¥«¥¹¥¿¥Þ¥¤¥º¥Õ¥¡¥¤¥ë¤ò¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¥×¥í¥°¥é¥à¦¤«¤éÊѹ¹¤¹¤ë¤³¤È¤¬¤Ç ¤¤Þ¤¹¡¥¥«¥¹¥¿¥Þ¥¤¥º¥Õ¥¡¥¤¥ë¤ÎÊѹ¹¤ÏjrKanjiControl¤Î Â裲°ú¿ô¤ËKC_SETINITFILENAME¤ò»ØÄꤷ¡¤Â裳°ú¿ô¤Ë¥Õ¥¡¥¤¥ë̾ʸ»úÎó¤ò»ØÄê ¤¹¤ë¤³¤È¤Ë¤è¤ê¹Ô¤¤¤Þ¤¹¡¥¤³¤Î½èÍý¤ò¹Ô¤¦¾ì¹ç¤ÏKC_INITIALIZE¤ËÀèΩ¤Ã¤Æ¼Â ¹Ô¤·¤Æ¤ª¤«¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡¥
(Îã)-
char *inifile = "app-own.canna" ..... jrKanjiControl(0, KC_SETINITFILENAME, initfile); .....
- (12)
- KC_CLOSEUICONTEXT - ¥³¥ó¥Æ¥¯¥¹¥È¤Î¥¯¥í¡¼¥º
ÊÑ´¹¥³¥ó¥Æ¥¯¥¹¥È¤òɽ¤¹¥³¥ó¥Æ¥¯¥¹¥ÈID¤ÏǤ°Õ¤ÎÀ°¿ô¤ò³ä¤êÅö¤Æ¤ë¤³¤È¤¬¤Ç¤ ¤Þ¤¹¡¥º£¤Þ¤Ç»È¤ï¤ì¤Æ¤¤¤Ê¤¤ ¥³¥ó¥Æ¥¯¥¹¥ÈID¤òjrKanjiString¤¢¤ë¤¤¤ÏjrKanjiControl¤ËÍ¿¤¨¤ë¤³¤È¤¬²Äǽ ¤Ç¤¢¤ê¡¤¤½¤Î¾ì¹ç¡¤¤½¤Î¥³¥ó¥Æ¥¯¥¹¥ÈÍѤΥ¤¥Ë¥·¥ã¥é¥¤¥º¤¬¹Ô¤ï¤ìɬÍ×¤Ê¥á ¥â¥ê¤¬³ÎÊݤµ¤ì¤Þ¤¹¡¥
¤½¤ì¤Þ¤Ç»ÈÍѤ·¤Æ¤¤¤¿ÆþÎϥݡ¼¥È¤¬»È¤ï¤ì¤Ê¤¯¤Ê¤Ã¤¿¾ì¹ç¤Ë¡¤¤½¤Î¥Ý¡¼¥È¤Ë³ä ¤êÅö¤Æ¤Æ»È¤Ã¤Æ¤¤¤¿¥³¥ó¥Æ¥¯¥¹¥ÈIDÍѤ˳ÎÊݤµ¤ì¤¿¥á¥â¥ê¤ò ³«Êü¤¹¤ë¤Ë¤ÏjrKanjiControl¤òÂ裲°ú¿ô¤ËKC_CLOSEUICONTEXT¤ò»ØÄꤷ¤Æ¸Æ¤Ó ½Ð¤·¤Þ¤¹¡¥
¤³¤Î½èÍý¤Ïɽ¼¨¤ÎÊѲ½¤ò¤È¤â¤Ê¤¦¤Î¤ÇÂ裳°ú¿ô¤Ë¤ÏjrKanjiStatusWithValue¹½ ¤ÂΤòÍ¿¤¨¤Þ¤¹¡¥
(Îã)-
jrKanjiStatusWithValue ksv; jrKanjiStatus ks; unsigned char buf[SOMESIZE]; ..... ksv.ks = &ks; ksv.buffer = buf; ksv.bytes_buffer = SOMESIZE; jrKanjiControl(0, KC_CLOSEUICONTEXT, &ksv); .....
- (13)
- KC_QUERYMAXMODESTR - ¥â¡¼¥Éɽ¼¨Ê¸»úÎó¤ÎºÇÂçŤòµá¤á¤ë¡¥
½é´ü²½¥Õ¥¡¥¤¥ë¤Ë¤Æ¥â¡¼¥Éɽ¼¨Ê¸»úÎ󤬥«¥¹¥¿¥Þ¥¤¥º¤Ç¤¤Þ¤¹¤¬¡¤¥«¥¹¥¿¥Þ¥¤ ¥º¤µ¤ì¤¿·ë²Ì¥â¡¼¥Éɽ¼¨Ê¸»úÎó¤Ë¤É¤ì¤À¤±¤Îɽ¼¨Îΰè¤ò³ÎÊݤ¹¤ë¤«¤òÄ´¤Ù¤ëɬ Íפ¬¤¢¤ë¾ì¹ç¤¬¤¢¤ê¤Þ¤¹¡¥jrKanjiControl¤òÂ裲°ú¿ô¤ËKC_QUERYMAXMODESTR¤ò »ØÄꤷ¤Æ¸Æ¤Ó½Ð¤¹¤³¤È¤Ë¤è¤ê¡¤¥â¡¼¥Éɽ¼¨Ê¸»úÎó¤È¤·¤Æ²¿¥³¥é¥àɬÍפ«¤¬ÊÖ¤ê ÃͤȤ·¤ÆÊÖ¤µ¤ì¤Þ¤¹¡¥¤³¤³¤Ç¸À¤¦¥³¥é¥à¤È¤ÏȾ³Ñ±Ñ¿ôʸ»ú¤Îʸ»úÉý¤ò£±¤È¤·¤¿ ¤È¤¤ÎÃͤò¼¨¤·¤Þ¤¹¡¥
Â裳°ú¿ô¤ÏÍѤ¤¤é¤ì¤Ê¤¤¤Î¤Ç¥À¥ß¡¼ÃͤȤ·¤Æ0¤òÍ¿¤¨¤Þ¤¹¡¥
(Îã)-
int max_mode_columns; ..... max_mode_columns = jrKanjiControl(0, KC_QUERYMAXMODESTR, 0); .....
̾¾Î
XLookupKanjiString - ¥¡¼¥Ü¡¼¥ÉÆþÎϤδÁ»úʸ»úÎó¤Ø¤ÎÊÑ´¹µ½Ò·Á¼°
#include <X11/Xlib.h> #include <X11/kanji.h> int XLookupKanjiString(event_struct, buffer_return, bytes_buffer, keysym_return, status_return, kanji_status_return) XKeyEvent *event_struct; char *buffer_return; int bytes_buffer; KeySym *keysym_return; XComposeStatus *status_return; XKanjiStatus *kanji_status_return;
°ú¿ô
-
- event_struct
- ¥¡¼¥¤¥Ù¥ó¥È¤ò»ØÄꤷ¤Þ¤¹¡£
- buffer_return
- ÊÑ´¹¤·¤¿´Á»úʸ»úÎó¤¬ÊÖ¤µ¤ì¤Þ¤¹¡£
- bytes_buffer
- ¥Ð¥Ã¥Õ¥¡¤ÎŤµ¤ò»ØÄꤷ¤Þ¤¹¡£
- keysym_return
- ¥¡¼¥·¥ó¥Ü¥ë¤òÊÖ¤·¤Þ¤¹¡£NULL¤ò»ØÄꤹ¤ë¤³¤È¤â¤Ç¤¤Þ¤¹¡£
- status_return
- XCompose¹½Â¤ÂΤؤΥݥ¤¥ó¥¿¤ò»ØÄꤷ¤Þ¤¹¡£
- kanji_status_return
- ¤«¤Ê´Á»úÊÑ´¹¤ÎÍͻҤ¬ÊÖ¤µ¤ì¤Þ¤¹¡£
ÀâÌÀ
XLookupKanjiString¤Ï¡¢¥¡¼¥¤¥Ù¥ó¥È¤òÆüËܸìʸ»úÎó¤Ë Âбþ¤µ¤»¤ë´Ê°×¥ë¡¼¥Á¥ó¤Ç¡¢ ¥¡¼¥¤¥Ù¥ó¥È¤Î½¤¾þ¥¡¼¥Ó¥Ã¥È¤ò»ÈÍѤ·¤Æ¥·¥Õ¥È¡¢¥í¥Ã¥¯¡¢ ¥³¥ó¥È¥í¡¼¥ëÅù¤Î½èÍý¤ò¹Ô¤¤¤Þ¤¹¡£
XLookupKanjiString¤Ë¤è¤Ã¤Æ8bit¥¢¥ë¥Õ¥¡¥Ù¥Ã¥Èʸ»ú µÚ¤Ó16bitÆüËܸìʸ»ú¤ò¼è¤ê°·¤¦¤³¤È¤¬¤Ç¤¤Þ¤¹¡£
¥¢¥ë¥Õ¥¡¥Ù¥Ã¥Èʸ»ú¤Î¼è¤ê°·¤¤¤Ë¤Ä¤¤¤Æ¤Ï¡¢ XLookupKanjiString¤ÏXLookupString¤ÈƱÍͤÎÆ°ºî¤Ë¤Ê¤ê¤Þ¤¹¡£
ÆüËܸìʸ»ú¤Î¼è¤ê°·¤¤¤Ë¤Ä¤¤¤Æ¤Ï¡¢ ¤³¤Î´Ø¿ô¤ÎÆâÉô¤Ë¤ª¤¤¤Æ¥í¡¼¥Þ»ú¤«¤ÊÊÑ´¹¡¢ ¤«¤Ê´Á»úÊÑ´¹¤¬¹Ô¤ï¤ì¤Þ¤¹¡£ ÆüËܸì¤ÎÆþÎÏ»þ¤ËXKanjiStatus¹½Â¤ÂΤ¬ÍѤ¤¤é¤ì¤Þ¤¹¡£XKanjiStatus¹½Â¤ÂÎ¤Ï °Ê²¼¤Î¤è¤¦¤ËÄêµÁ¤µ¤ì¤Þ¤¹¡£
typedef struct _XKanjiStatus { unsigned char *echoStr; /* local echo string */ int length; /* length of echo string */ int revPos; /* reverse position */ int revLen; /* reverse length */ unsigned long info; /* other informations */ unsigned char *mode; /* mode information */ struct { unsigned char *line; /* a grance of Kanji characters */ int length; /* length of it */ int revPos; /* reverse position of it */ int revLen; /* reverse length of it */ } gline; /* a grancing line information */ } XKanjiStatus; #define KanjiModeInfo 01 #define KanjiGLineInfo 02
¤«¤Ê´Á»úÊÑ´¹¤òÍѤ¤¤¿ÆüËܸìÆþÎÏ»þ¤Ë¤ÏÊÑ´¹¤ÎÂоݤȤʤëÆɤߤʤɤò ¥í¡¼¥«¥ë¥¨¥³¡¼¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£XLookupKanjiString¤Ï¥í¡¼¥«¥ë ¥¨¥³¡¼¤Ê¤Éɽ¼¨¤Ë´Ø¤¹¤ë¤³¤È¤Ï²¿¤â¹Ô¤ï¤º¡¢Âå¤ï¤ê¤Ë¥í¡¼¥«¥ë¥¨¥³¡¼ ¤¹¤ë¤Ù¤Ê¸»úÎó¤òXKanjiStatus¹½Â¤ÂΤòÍѤ¤¤Æ ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¦¤ËÊÖ¤·¤Þ¤¹¡£
ÊÑ´¹¤¬³ÎÄꤹ¤ë¤Þ¤Ç¤Ï¡¢¥í¡¼¥Þ»ú¤«¤ÊÊÑ´¹¤µ¤ì¤Æ¤¤¤ëʸ»ú¤ä¡¢ ÊÑ´¹¸õÊäʸ»ú¤Ê¤É¡¢¥í¡¼¥«¥ë¥¨¥³¡¼¤¹¤Ù¤(EUC) ʸ»úÎó¤¬echoStr¥á¥ó¥Ð¤Ë ¤è¤êÊÖ¤µ¤ì¤Þ¤¹¡£¤³¤Î¤È¤¡¢¥í¡¼¥«¥ë¥¨¥³¡¼Ê¸»úÎó¤Î Ťµ¡¢¥ê¥Ð¡¼¥¹É½¼¨¤Î³«»Ï°ÌÃÖ¤ÈŤµ¡Ê¥Ð¥¤¥Èñ°Ì¡Ë¤¬¡¢ ¤½¤ì¤¾¤ì¡¢length¥á¥ó¥Ð¡¢revPos¡¢revLen¥á¥ó¥Ð¤Ë¤Æ ÊÖ¤µ¤ì¤Þ¤¹¡£ ¥í¡¼¥«¥ë¥¨¥³¡¼¤¹¤Ù¤Ê¸»úÎó¤Î¤¿¤á¤Î¥Ð¥Ã¥Õ¥¡¤ÏXLookupKanjiString¤Ë ¤è¤Ã¤Æ¼«Æ°Åª¤Ë³ÎÊݤµ¤ì¤Þ¤¹¤¬¡¢¤½¤ÎÎΰè¤ÏÆɤ߼è¤ê¤Î¤ß¤ËÍѤ¤¤é¤ì¤ë¤Ù¤¤Ç¤¢¤ê¡¢ ¤½¤ÎÎΰè¤Ëʸ»úÎó¤ò½ñ¤¹þ¤ó¤Ç¤Ï¤¤¤±¤Þ¤»¤ó¡£
¥í¡¼¥«¥ë¥¨¥³¡¼¤¹¤Ù¤Ê¸»úÎó¤¬Ìµ¤¤¾ì¹ç¤Ïlength¥á¥ó¥Ð¤Ë£°¤¬ÊÖ¤ê¤Þ¤¹¡£
¥í¡¼¥«¥ë¥¨¥³¡¼¤¹¤Ù¤ÆâÍƤ¬Á°²ó¤ÎXLookupKanjiString¤Î¸Æ¤Ó½Ð¤·¤Î¤È¤¤È ÊѤï¤é¤Ê¤¤¾ì¹ç¡ÊÎ㤨¤Ð¥·¥Õ¥È¥¡¼¤¬²¡¤µ¤ì¤¿¾ì¹ç¤Ê¤É¡Ë¤Ïlength¥á¥ó¥Ð¤Ë ¡Ý£±¤¬ÊÖ¤ê¤Þ¤¹¡£
¥â¡¼¥É¤ÎÊѹ¹¤ä¡¢¸õÊä°ìÍ÷¤Ë´Ø¤¹¤ë¾ðÊó¤ÎÍ̵¤Ï¡¢info¥á¥ó¥Ð¤Ë¤è¤Ã¤ÆÅϤµ¤ì ¤Þ¤¹¡£info¥á¥ó¥Ð¤ÎKanjiModeInfo¥Ó¥Ã¥È¤¬on¤Ç¤¢¤ì¤Ð¡¢mode¤Ë¿·¤·¤¤¥â¡¼¥É ¤ò¼¨¤¹Ê¸»úÎó¤¬ÊÖ¤µ¤ì¤Þ¤¹¡£info¥á¥ó¥Ð¤ÎKanjiGLineInfo¥Ó¥Ã¥È¤¬on¤Ç¤¢¤ì¤Ð¡¢ gline¹½Â¤ÂΤ˸õÊä°ìÍ÷Åù¤Î¾ðÊ󤬳ÊǼ¤µ¤ì¤Æ¤¤¤Þ¤¹¡£
gline¹½Â¤ÂΤÎline¥á¥ó¥Ð¤Ë¤Ï¸õÊä°ìÍ÷ɽ¼¨¤Î¤¿¤á¤Îʸ»úÎó¤¬ÊÖ¤µ¤ì¤Þ¤¹¡£ gline¹½Â¤ÂΤÎline,revPos,revLen¤Î³Æ¥á¥ó¥Ð¤Ï¡¢¸õÊä°ìÍ÷ʸ»úÎó¤Î¤½¤ì¤¾¤ì¡¢ Ťµ¡¢¥ê¥Ð¡¼¥¹É½¼¨¤Î³«»Ï°ÌÃÖ¡¢¥ê¥Ð¡¼¥¹É½¼¨¤ÎŤµ¤¬ÊÖ¤µ¤ì¤Þ¤¹¡£
ÊÑ´¹Ãæ¤Ë³ÎÄꤷ¤¿(EUC)ʸ»úÎ󤬤¢¤ë¾ì¹ç¤Ï¡¢ ¤½¤Îʸ»úÎó¤¬buffer_return¤Ë³ÊǼ¤µ¤ì¡¢ ¤½¤Îʸ»úÎó¤ÎŤµ¡Ê¥Ð¥¤¥Èñ°Ì¡Ë¤¬¤³¤Î´Ø¿ô¤ÎÌá¤êÃͤȤ·¤ÆÊÖ¤µ¤ì¤Þ¤¹¡£ ³ÎÄꤷ¤¿Ê¸»úÎó¤¬Ìµ¤¤¾ì¹ç¤ÏÌá¤êÃͤϣ°¤Ë¤Ê¤ê¤Þ¤¹¡£
̾Á°
XKanjiControl - XLookupKanjiString¤Ç¤Î¥â¡¼¥É¤ä¡¤½èÍý¤ÎÀ©¸æ¤ò¹Ô¤¦·Á¼°
#include <X11/kanji.h> int XKanjiControl(dpy, win, request, arg) Display dpy; Window win; int request; char *arg;
ÀâÌÀ
XKanjiControl¤Ïdpy, win¤Ç¼¨¤µ¤ì¤ë¥¦¥£¥ó¥É¥¦¤Ë¤ª¤±¤ëÆüËܸìÆþÎÏ¤Ë ´Ø¤·¤Æ¡¤request¤Ç¼¨¤µ¤ì¤ë½èÍý¤ò¹Ô¤¤¤Þ¤¹¡¥½èÍý¤Ë¤è¤Ã¤Æ¤Ï¡¤°ú¿ô¤ò ȼ¤¦¾ì¹ç¤¬¤¢¤ê¡¤¤½¤Î¾ì¹ç¡¤°ú¿ô¤Ïarg¤Ë¤ÆÍ¿¤¨¤Þ¤¹¡¥
XKanjiControl¤ÇÀ©¸æ¤µ¤ì¤ëµ¡Ç½¤È¤·¤Æ¤Ï°Ê²¼¤¬¤¢¤ê¤Þ¤¹¡¥
- request̾
- µ¡Ç½
- KC_INITIALIZE
- ¤«¤Ê´Á»úÊÑ´¹¤ò½é´ü²½¤¹¤ë¡¥
- KC_CHANGEMODE
- ÆþÎϥ⡼¥É¤òÊѹ¹¤¹¤ë¡¥
- KC_SETWIDTH
- ¸õÊä°ìÍ÷ɽ¼¨¤Î»þ¤ÎÉý¤ò»ØÄꤹ¤ë¡¥
- KC_FINALIZE
- ¤«¤Ê´Á»úÊÑ´¹¤Î½ªÎ»½èÍý¡¥
- KC_SETUNDEFKEYFUNCTION
- ̤ÄêµÁ¥¡¼¤ËÂФ¹¤ëµ¡Ç½¤ÎÀßÄê¤ò¹Ô¤¦¡¥
- KC_SETMODEINFOSTYLE
- ¥â¡¼¥É¾ðÊó¤ò¿ôÃͤÇɽ¸½¤¹¤ë¤«¤É¤¦¤«¤ò»ØÄꤹ¤ë¡¥
- KC_KAKUTEI
- ÆþÎÏÃæ¤Îʸ»úÎó¤ò³ÎÄꤹ¤ë¡¥
- KC_KILL
- ÆþÎÏÃæ¤Îʸ»úÎó¤òºï½ü¤¹¤ë¡¥
- KC_QUERYMODE
- ¸½ºß¤Î¥â¡¼¥É¤òÌ䤤¹ç¤ï¤»¤ë¡¥
- KC_SETSERVERNAME
- Àܳ¤¹¤ë¥µ¡¼¥Ð¤ò»ØÄꤹ¤ë¡¥
- KC_SETINITFILENAME
- ¥«¥¹¥¿¥Þ¥¤¥º¥Õ¥¡¥¤¥ë¤ò»ØÄꤹ¤ë¡¥
- KC_CLOSEUICONTEXT
- ¥³¥ó¥Æ¥¯¥¹¥È¤ò¥¯¥í¡¼¥º¤¹¤ë¡¥
- KC_QUERYMAXMODESTR
- ¥â¡¼¥Éɽ¼¨Ê¸»úÎó¤ÎºÇÂçŤòµá¤á¤ë¡¥
XKanjiControl¤ÎºîÍѤϴðËÜŪ¤Ë¤Ïdpy, win¤Ç»ØÄꤵ¤ì¤¿¥¦¥£¥ó¥É¥¦¤Ç ¤ÎÆüËܸìÆþÎϤËÂФ·¤Æ¤Î ¤ßºîÍѤ·¤Þ¤¹¡¥¤¿¤À¤·¡¤½é´ü²½¤Î½èÍý¤ä½ªÎ»¤Î½èÍý¤Ë´Ø¤·¤Æ¤Ï¤½¤Î¸Â¤ê¤Ç¤Ï¤¢ ¤ê¤Þ¤»¤ó¡¥
XKanjiControl¤ÎÁàºî¤Ë¤è¤Ã¤Æ̤³ÎÄêʸ»úÎó¤Î¾õÂÖ¤¬ÊѲ½¤·¤¿¤ê¡¤¥â¡¼¥É¤Î¾õ ÂÖ¤¬ÊѤï¤ë¤³¤È¤¬¤¢¤ê¤Þ¤¹¡¥¤½¤Î¤è¤¦¤Ê²ÄǽÀ¤¬¤¢¤ë¾ì¹ç¤ÏargÉôʬ¤ËÊѲ½¤· ¤¿¾ðÊó¤ò³ÊǼ¤Ç¤¤ë¤è¤¦¤Ê¹½Â¤ÂΤؤΥݥ¤¥ó¥¿¤òÅϤ·¤Þ¤¹¡¥¤½¤Î¹½Â¤ÂΤÎÄêµÁ ¤Ï°Ê²¼¤Î¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡¥
typedef struct { int val; /* ¥Ð¥Ã¥Õ¥¡¤Ë³ÊǼ¤µ¤ì¤¿Ê¸»úÎó¤ÎŤµ¤¬ÊÖ¤ë */ unsigned char *buffer; /* ³ÎÄêʸ»úÎó¤ò³ÊǼ¤¹¤ë¤¿¤á¤Î¥Ð¥Ã¥Õ¥¡¤òÍ¿¤¨¤ë */ int bytes_buffer; /* ¾åµ¤Î¥Ð¥Ã¥Õ¥¡¤ÎÂ礤µ¤òÍ¿¤¨¤ë */ XKanjiStatus *ks; /* ̤³ÎÄêʸ»úÎó¤Î¾ðÊó¤ò³ÊǼ¤¹¤ë¹½Â¤ÂΤؤΥݥ¤¥ó¥¿ */ } XKanjiStatusWithValue;
XKanjiControl¤Î¤½¤ì¤¾¤ì¤Îµ¡Ç½¤Î¼Â¹Ô¤Î¤·¤«¤¿¤Ï°Ê²¼¤ÎÄ̤ê¤Ç¤¹¡¥
- (1)
- KC_INITIALIZE - ¤«¤Ê´Á»úÊÑ´¹¤Î½é´ü²½
KC_INITIALIZE¤òrequestÉô¤Ç»ØÄꤹ¤ë¤³¤È¤Ë¤è¤ê¡¤¤«¤Ê´Á»úÊÑ´¹¤Î½é´ü ²½¤ò¹Ô¤¤¤Þ¤¹¡¥arg¤Ë¤Ïwarning¥á¥Ã¥»¡¼¥¸¤ò ³ÊǼ¤¹¤ë¤¿¤á¤Î(char **)·¿¤ÎÊÑ¿ô¤Ø¤Î¥Ý¥¤¥ó¥¿¤Þ¤¿¤ÏNULL¤ò»ØÄꤷ¤Þ¤¹¡¥½é ´ü²½¤Î½èÍý¤Ï´ðËÜŪ¤Ë¤ÏXKanjiString(3)¤¬ºÇ½é¤Ë¸Æ¤Ð¤ì¤¿»þ¤Ë¼«Æ°Åª¤Ë¹Ô¤ï ¤ì¤Þ¤¹¤¬¡¤XKanjiControl¤òÍѤ¤¤Æ½é´ü²½¤¹¤ë ¤³¤È¤Ë¤è¤ê¡¤XKanjiString(3)¤Ç¤Î½é´ü²½½èÍý¤Ï¹Ô¤ï¤ì¤Ê¤¯¤Ê¤ê¤Þ¤¹¡¥
XKanjiString(3)¤Î»ÈÍѤËÀèΩ¤Ã¤ÆXKanjiControl¤òÍѤ¤¤Æ¤«¤Ê´Á»úÊÑ´¹¤Ë´Ø ¤¹¤ëÀ©¸æ¤ò¹Ô¤¦»þ¤Ê¤É¤Ï¡¤´Á»úÊÑ´¹¤Î½é´ü²½¤ò¹Ô¤¦É¬Íפ¬¤¢¤ê¤Þ¤¹¡¥
Àµ¾ï½ªÎ»»þ¤Ë¤ÏXKanjiControl¤ÎÌá¤êÃͤȤ·¤Æ0¤¬Ê֤ꡤ°Û¾ï½ªÎ»»þ¤Ë¤Ï-1¤¬ ÊÖ¤ê¤Þ¤¹¡¥
KC_INITIALIZE¤ò¹Ô¤Ã¤¿¾ì¹ç¡¤¥¨¥é¡¼¤È¤Þ¤Ç¤Ï¤¤¤«¤Ê¤¯¤È¤â²¿¤é¤«¤Îwarning¤¬ ȯÀ¸¤¹¤ë¤³¤È¤¬¤¢¤ê¤Þ¤¹¡¥warning¤¬È¯À¸¤·¤¿¾ì¹ç¤Ïarg¤Ë¤ÆÍ¿¤¨¤é¤ì¤¿ ÊÑ¿ô¤ËÂФ·¤Æwarningʸ»úÎó¤ÎÇÛÎó¤Ø¤Î¥Ý¥¤¥ó¥¿¤¬³ÊǼ¤µ¤ì ÊÖ¤µ¤ì¤Þ¤¹¡¥warning¤¬¤Ê¤¤¤È¤¤ÏNULL¤¬³ÊǼ¤µ¤ìÊÖ¤µ¤ì¤Þ¤¹¡¥
(Îã)-
int res; /* ¥¨¥é¡¼¤¬Ê֤äƤ¯¤ë¾ì¹ç¤ËÈ÷¤¨¤ë */ char **warning; ..... res = XKanjiControl(dpy, win, KC_INITIALIZE, &warning); if (warning) { char **p; for (p = warning ; *p ; p++) { fprintf(stderr, "%s, *p); } }
Âè4°ú¿ô¤ËÊÖ¤µ¤ì¤ëwarning¥á¥Ã¥»¡¼¥¸¤Ï¥é¥¤¥Ö¥é¥ê¤ÎÆâÉô¤Çmalloc¤µ¤ì¤Þ¤¹¡¥ ¤³¤ì¤Ï¡¤¼¡¤ËKC_INITIALIZE¤äKC_FINALIZE¤¬¹Ô¤ï¤ì¤¿»þ¤Ë³«Êü¤µ¤ì¤Þ¤¹¡¥¥¢¥× ¥ê¥±¡¼¥·¥ç¥ó¥×¥í¥°¥é¥Þ¤¬¾¡¼ê¤Ëfree¤·¤Æ¤Ï¤¤¤±¤Þ¤»¤ó¡¥warning¤Ïº£¤Î¤È¤³ ¤íºÇÂç64¥á¥Ã¥»¡¼¥¸¤Ë¸ÂÄꤵ¤ì¤Þ¤¹¡¥¤½¤ì°Ê¾å¤Î¥á¥Ã¥»¡¼¥¸¤ÏÀڼΤƤé¤ì¤Þ¤¹¡¥
¥á¥Ã¥»¡¼¥¸¤Ë´Þ¤Þ¤ì¤ë²ÄǽÀ¤Î¤¢¤ëwarning¤Ë¤Ï°Ê²¼¤Î¤â¤Î¤¬¤¢¤ê¤Þ¤¹¡¥
- ¡¦
- ¥«¥¹¥¿¥Þ¥¤¥º¥Õ¥¡¥¤¥ë¤¬¥·¥¹¥Æ¥à¤Î¤â¤Î¤â´Þ¤á¤Æ¤¹¤Ù¤ÆÍøÍѤǤ¤Ê¤¤¡¥
- ¡¦
- ¥«¥¹¥¿¥Þ¥¤¥º¥Õ¥¡¥¤¥ë¤Ë¥·¥ó¥¿¥Ã¥¯¥¹¥¨¥é¡¼¤¬¤¢¤ë¡¥
- ¡¦
- ¥í¡¼¥Þ»ú¤«¤ÊÊÑ´¹¼½ñ¤¬ÍøÍѤǤ¤Ê¤¤¡¥
- ¡¦
- ¤«¤Ê´Á»úÊÑ´¹¼½ñ¤¬ÍøÍѤǤ¤Ê¤¤¡¥
- ¡¦
- ¤«¤Ê´Á»úÊÑ´¹¥µ¡¼¥Ð¤ËÀܳ¤Ç¤¤Ê¤¤¡¥
Âè4°ú¿ô¤È¤·¤ÆNULL¤ò»ØÄꤷ¤¿¾ì¹çwarning¥á¥Ã¥»¡¼¥¸¤Ï¼Î¤Æ¤é¤ì¤Þ¤¹¡¥
- (2)
- KC_CHANGEMODE - ÆþÎϥ⡼¥É¤ÎÊѹ¹
ÆþÎϥ⡼¥É¤ò¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤«¤éÊѹ¹¤·¤Þ¤¹¡¥request¤Î Éôʬ¤Ë¤ÏKC_CHANGEMODE¤ò»ØÄꤷ¡¤arg¤ËXKanjiStatusWithValue¹½Â¤ÂÎ ¤ò»ØÄꤷ¤Æ²¼¤µ¤¤¡¥XKanjiStatusWithValue¹½Â¤ÂΤÎval¥á¥ó¥Ð¤Ë¤Æ¥â¡¼ ¥ÉÈÖ¹æ¤ò»ØÄꤹ¤ë¤³¤È¤Ë¤è¤êÆüËܸì¥â¡¼¥É¤¬ÀÚ¤êÂؤï¤ê¤Þ¤¹¡¥¥â¡¼¥ÉÈÖ¹æ¤Ï°Ê ²¼¤Î¥Þ¥¯¥í¤Ç¼¨¤µ¤ì¤Þ¤¹¡¥-
- ¥Þ¥¯¥íÈÖ¹æ
- ¥â¡¼¥É
- CANNA_MODE_AlphaMode
- ¥¢¥ë¥Õ¥¡¥Ù¥Ã¥È¥â¡¼¥É
- CANNA_MODE_HenkanMode
- ÊÑ´¹ÆþÎϥ⡼¥É
- CANNA_MODE_KigoMode
- µ¹æÆþÎϥ⡼¥É
- CANNA_MODE_ZenHiraKakuteiMode
- Á´³Ñ¤Ò¤é¤¬¤Ê³ÎÄêÆþÎϥ⡼¥É
- CANNA_MODE_ZenKataKakuteiMode
- Á´³Ñ¥«¥¿¥«¥Ê³ÎÄêÆþÎϥ⡼¥É
- CANNA_MODE_HanKataKakuteiMode
- Ⱦ³Ñ¥«¥¿¥«¥Ê³ÎÄêÆþÎϥ⡼¥É
- CANNA_MODE_ZenAlphaKakuteiMode
- Á´³Ñ¥¢¥ë¥Õ¥¡¥Ù¥Ã¥È³ÎÄêÆþÎϥ⡼¥É
- CANNA_MODE_HanAlphaKakuteiMode
- Ⱦ³Ñ¥¢¥ë¥Õ¥¡¥Ù¥Ã¥È³ÎÄêÆþÎϥ⡼¥É
- CANNA_MODE_HexMode
- 16¿Ê¥³¡¼¥ÉÆþÎϥ⡼¥É
- CANNA_MODE_BushuMode
- Éô¼óÆþÎϥ⡼¥É
- CANNA_MODE_TorokuMode
- ñ¸ìÅÐÏ¿¥â¡¼¥É
¤³¤Îµ¡Ç½¤Ë¤è¤ê¥â¡¼¥É¤òÊѹ¹¤¹¤ë¤È¥â¡¼¥É̾¤ò»Ï¤á¤È¤·¤Æ¿¤¯¤Îɽ¼¨¤¬ÊѲ½¤ò ¼õ¤±¤Þ¤¹¡¥É½¼¨¤ÎÊѹ¹¤Ïarg¤È¤·¤Æ»ØÄꤷ¤¿XKanjiStatusWithValue¹½Â¤ÂÎ¤Ë ¤ÆÊÖ¤µ¤ì¤Þ¤¹¡¥
(Îã)
XKanjiStatus ks; XKanjiStatusWithValue ksv; unsigned char buf[SOMESIZE]; ..... ksv.ks = &ks; ksv.buffer = buf; ksv.bytes_buffer = SOMESIZE; ksv.val = CANNA_MODE_HexMode; XKanjiControl(dpy, win, KC_CHANGEMODE, &ksv); len = ksv.val; ..... /* ̤³ÎÄêʸ»úÎó¤ä³ÎÄêʸ»úÎó¤Î¾ðÊó¤¬ksv¤Ë¤è¤êÊÖ¤µ¤ì¤Þ¤¹¡¥ */
- (3)
- KC_SETWIDTH - ¸õÊä°ìÍ÷ɽ¼¨¤Î¤¿¤á¤ÎÉý¤ò»ØÄê
¸õÊä°ìÍ÷¤Î¤¿¤á¤ËÍѤ¤¤é¤ì¤ëÎΰè¤Î¥³¥é¥à¿ô¤ò»ØÄꤷ¤Þ¤¹¡¥£±¥³¥é¥à¤ÎÉý¤Ï¥¢ ¥ë¥Õ¥¡¥Ù¥Ã¥Èʸ»ú¤¢¤ë¤¤¤ÏȾ³Ñ¥«¥¿¥«¥Ê£±Ê¸»ú¤Îʸ»úÉý¤Ç¤¢¤ê¡¤Á´³Ñ´Á»ú¤Ï£² ¥³¥é¥àÀê¤á¤ë¤³¤È¤Ë¤Ê¤ê¤Þ¤¹¡¥¸õÊä°ìÍ÷ɽ¼¨¤Î¤¿¤á¤ÎÉý¤ò »ØÄꤹ¤ë¤¿¤á¤ËrequestÉôʬ¤Ë»ØÄꤹ¤ëÃͤÏKC_SETWIDTH¤Ç¡¤ ¤³¤Î¤È¤arg¤Ë¥³¥é¥à¿ô¤ò»ØÄꤷ¤Þ¤¹¡¥
(Îã)-
XKanjiControl(dpy, win, KC_SETWIDTH, (char *)60);
- (4)
- KC_FINALIZE - ¤«¤Ê´Á»úÊÑ´¹¤Î½ªÎ»½èÍý¡¥
¥×¥í¥°¥é¥à¤ò½ªÎ»¤¹¤ë¤Ê¤É¤Î¶ÉÌ̤Ǥ«¤Ê´Á»úÊÑ´¹¤â½ªÎ»¤¹¤ë¤³¤È¤ò»ØÄꤷ¤Þ¤¹¡¥ ¤«¤Ê´Á»úÊÑ´¹½èÍý¤ò½ªÎ»¤µ¤»¤ë»þ¤Ïɬ¤º¤³¤Î½èÍý¤ò¹Ô¤Ã¤Æ²¼¤µ¤¤¡¥½ª¤ï¤ë¤Ë¤¢ ¤¿¤Ã¤Æº£¤Þ¤Ç³Ø½¬¤·¤¿ÆâÍƤ¬¥Õ¥¡¥¤¥ë¤ËÅÐÏ¿¤µ¤ì¤Þ¤¹¡¥requestÉôʬ¤Ë ¤ÏKC_FINALIZE¤ò»ØÄꤷ¤Þ¤¹¡¥
Àµ¾ï½ªÎ»»þ¤Ë0¡¤°Û¾ï½ªÎ»»þ¤Ë-1¤¬Ìá¤êÃͤȤ·¤ÆÊÖ¤ê¤Þ¤¹¡¥
KC_FINALIZE¤ò¹Ô¤Ã¤¿¾ì¹ç¡¤¥¨¥é¡¼¤È¤Þ¤Ç¤¤¤«¤Ê¤¯¤È¤â²¿¤é¤«¤Îwarning¤¬È¯À¸ ¤¹¤ë¤³¤È¤¬¤¢¤ê¤Þ¤¹¡¥warning¤¬È¯À¸¤·¤¿¾ì¹ç¤Ïarg¤Ë¤ÆÍ¿¤¨¤é¤ì¤¿ ÊÑ¿ô¤Ëwarningʸ»úÎó¤ÎÇÛÎó¤Ø¤Î¥Ý¥¤¥ó¥¿¤¬³ÊǼ¤µ¤ìÊÖ¤µ¤ì¤Þ¤¹¡¥warning¤¬¤Ê ¤¤¾ì¹ç¤Ë¤ÏNULL¥Ý¥¤¥ó¥¿¤¬³ÊǼ¤µ¤ìÊÖ¤µ¤ì¤Þ¤¹¡¥
(Îã)-
int res; /* ¥¨¥é¡¼¤¬ÊÖ¤ë¾ì¹ç¤ËÈ÷¤¨¤ë */
char **warning;
.....
res = XKanjiControl(dpy, win, KC_FINALIZE, &warning);
if (warning) {
char **p;
for (p = warning ; *p ; p++) {
fprintf(stderr, "%s, *p);
}
}Âè4°ú¿ô¤ËÊÖ¤µ¤ì¤ëwarning¥á¥Ã¥»¡¼¥¸¤Ï¡¤¥é¥¤¥Ö¥é¥ê¤ÎÆâÉô¤Çmalloc¤µ¤ì¤Þ ¤¹¡¥¤³¤ì¤Ï¡¤¼¡¤ËKC_INITIALIZE¤äKC_FINALIZE¤¬¹Ô¤ï¤ì¤¿»þ¤Ë³«Êü¤µ¤ì¤Þ¤¹¡¥ ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¥×¥í¥°¥é¥Þ¤¬¾¡¼ê¤Ëfree¤·¤Æ¤Ï¤¤¤±¤Þ¤»¤ó¡¥
warning¤Ïº£¤Î¤È¤³¤íºÇÂç64¥á¥Ã¥»¡¼¥¸¤Ë¸ÂÄꤵ¤ì¤Þ¤¹¡¥¤½¤ì°Ê¾å¤Î¥á¥Ã¥»¡¼ ¥¸¤ÏÀڼΤƤé¤ì¤Þ¤¹¡¥
¥á¥Ã¥»¡¼¥¸¤Ë´Þ¤Þ¤ì¤ë²ÄǽÀ¤Î¤¢¤ëwarning¤Ë¤Ï¼¡¤Î¤â¤Î¤¬¤¢¤ê¤Þ¤¹¡¥
- ¡¦
- ¼½ñ¤¬¥¢¥ó¥Þ¥¦¥ó¥È¤Ç¤¤Ê¤¤¡¥
Âè4°ú¿ô¤È¤·¤ÆNULL¤ò»ØÄꤷ¤¿¾ì¹ç¡¤warning¥á¥Ã¥»¡¼¥¸¤Ï¼Î¤Æ¤é¤ì¤Þ¤¹¡¥
- (5)
- KC_SETUNDEFKEYFUNCTION - ̤ÄêµÁ¥¡¼¤ËÂФ¹¤ëµ¡Ç½¤ÎÀßÄê
ÆɤߤòÆþÎϤ·¤Æ¤¤¤ë¾õÂÖ¤ÇC-t¤òÂǤ俤Ȥ¤Î¤è¤¦¤Ë̤ÄêµÁ¥¡¼¤òÆþÎϤ·¤¿»þ ¤Ë¼è¤é¤ì¤ë½èÍý¤ò»ØÄꤷ¤Þ¤¹¡¥Ì¤ÄêµÁ¥¡¼¤ËÂбþ¤·¤Æ¹Ô¤ï¤ì¤ë½èÍý¤È¤·¤Æ¤Ï°Ê ²¼¤Î½èÍý¤¬¤¢¤ê¤Þ¤¹¡¥-
- ¥Þ¥¯¥í̾
- ½èÍý
- kc_normal
- ¥Ó¡¼¥×
- kc_through
- ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¥×¥í¥°¥é¥à¤ËÅϤ¹
- kc_kakutei
- ³ÎÄꤷ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¥×¥í¥°¥é¥à¤ËÅϤ¹
- kc_kill
- ¾Ãµî¤·¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¥×¥í¥°¥é¥à¤ËÅϤ¹
kc_normal¤ò»ØÄꤷ¤¿¾ì¹ç¡¤³°ÉôÊÑ¿ôjrBeepFunc¤ËÀßÄꤵ¤ì¤¿´Ø¿ô¤¬Ì¤ÄêµÁ¥¡¼ ÆþÎÏ»þ¤Ë¥é¥¤¥Ö¥é¥ê¤Ë¤è¤Ã¤Æ¼«Æ°Åª¤Ë¸Æ¤Ó½Ð¤µ¤ì¤Þ¤¹¡¥jrBeepFunc¤ËÃͤòÀßÄê ¤·¤Ê¤¤¾ì¹ç¤Ë¤Ï(jrBeepFunc == NULL¤Î¾ì¹ç¤Ë¤Ï)²¿¤âµ¯¤³¤ê¤Þ¤»¤ó¡¥
(Îã)
extern (*jrBeepFunc)(), beep(); jrBeepFunc = beep; XKanjiControl(dpy, win, KC_SETUNDEFKEYFUNCTION, kc_normal);
- (6)
- KC_SETMODEINFOSTYLE - ¥â¡¼¥É¾ðÊó¤Îɽ¸½
¥â¡¼¥É¾ðÊó¤òʸ»úÎó¤Ç¤Ï¤Ê¤¯¥Ó¥Ã¥È¥Þ¥Ã¥×¤Ê¤É¤Î¥Ç¡¼¥¿¤Çɽ¼¨¤·¤¿¤¤¾ì¹ç¤¬¤¢ ¤ê¤Þ¤¹¡¥¤½¤Î¤è¤¦¤Ê¾ì¹ç¤Ë¤Ï¥â¡¼¥É¾ðÊó¤È¤·¤Æ¿ôÃͥǡ¼¥¿¤¬Ê֤äƤ¯¤ë¤È½èÍý ¤¬¤·¤ä¤¹¤¯¤Ê¤ê¤Þ¤¹¡¥XKanjiControl¤ÇKC_SETMODEINFOSTYLE¤ò »ØÄꤷ¡¤arg¤Ë£±¤òÅϤ¹¤³¤È¤Ë¤è¤Ã¤Æ¤½¤ì°Ê¸å¤ÏXKanjiStatus¹½Â¤ÂÎ ¤Îmode¥á¥ó¥Ð¤Ë¤Ï¥â¡¼¥É¤òɽ¤¹¿ôÃͤË'@'(0x40)¤ò²Ã¤¨¤¿£±Ê¸»ú¤¬ÊÖ¤µ ¤ì¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡¥¥â¡¼¥É¤òɽ¤¹¿ôÃͤËÊÑ´¹¤¹¤ë¾ì¹ç¤Ë¤ÏÊ֤äƤ¤¿Ê¸»úÎó ¤«¤é'@'(0x40)¤ò°ú¤¤Þ¤¹¡¥¥â¡¼¥É¤òɽ¤¹¿ôÃͤˤĤ¤¤Æ¤ÏÆþÎϥ⡼¥É¤Î Êѹ¹((2)KC_CHANGEMODE)¤Î¤³¤¦¤ò»²¾È¤·¤Æ²¼¤µ¤¤¡¥
- (7)
- KC_KAKUTEI¡¤(8) KC_KILL - ÆþÎÏÃæ¤Îʸ»úÎó¤ÎÊü´þ
ÆþÎÏÃæ¤Îʸ»úÎó¤ò²¿¤é¤«¤ÎÅÔ¹ç¤ÇÊü´þ¤·¤¿¤¤¾ì¹ç¤¬¤¢¤ê¤Þ¤¹¡¥Êü´þ¤¹¤ë¾ì¹ç¤Ë ÆþÎÏÃæ¤Îʸ»úÎó¤ò³ÎÄêʸ»úÎó¤È¤·¤Æ¼è¤ê¹þ¤ó¤Ç¤«¤éÊü´þ¤·¤¿¤¤¾ì¹ç¤ÈÁ´¤¯¼Î¤Æ ¤Æ¤·¤Þ¤Ã¤Æ¤«¤éÊü´þ¤·¤¿¤¤¾ì¹ç¤¬¤¢¤ê¤Þ¤¹¡¥³ÎÄꤹ¤ë ¾ì¹ç¤Ë¤ÏXKanjiControl¤Ë¤ÆKC_KAKUTEI¤ò»ØÄꤷ¡¤Êü´þ¤¹¤ë ¾ì¹ç¤Ë¤ÏKC_KILL¤ò»ØÄꤷ¤Þ¤¹¡¥
¤³¤Î½èÍý¤Ïɽ¼¨¤Ë±Æ¶Á¤òÍ¿¤¨¤ë¤Î¤ÇÂè4°ú¿ô¤Ë¤ÏXKanjiStatusWithValue¹½Â¤ ÂΤò»ØÄꤷ¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡¥-
XKanjiStatusWithValue ksv; XKanjiStatus ks; unsigned char buf[SOMESIZE]; ..... ksv.ks = &ks; ksv.buffer = buf; ksv.bytes_buffer = SOMESIZE; XKanjiControl(dpy, win, KC_KAKUTEI, &ksv); len = ksv.val; .....
- (9)
- KC_QUERYMODE - ¥â¡¼¥É¤ÎÌ䤤¹ç¤ï¤»
¸½ºß¤Î¥â¡¼¥É¤òÌ䤤¹ç¤ï¤»¤ë¤Ë¤ÏXKanjiControl¤ÇKC_QUERYMODE¤ò»ØÄꤷ¤Þ¤¹¡¥
Âè4°ú¿ô¤Ë¤Ï¥â¡¼¥Éʸ»úÎó¤ò³ÊǼ¤¹¤ë¤¿¤á¤Îʸ»úÇÛÎó¤Î¥Ý¥¤¥ó¥¿¤ò»ØÄꤷ¤Þ¤¹¡¥ ¥â¡¼¥Éʸ»úÎó¤Ï¥Ì¥ëʸ»ú¤Ç½ª¤ï¤ëʸ»úÎó¤Ç¤¹¡¥¤³¤³¤Ë¿ôÃͤ¬ÊÖ¤ë¤è¤¦¤Ë¤¹¤ë¤Ë ¤ÏXKanjiControl¤ÇKC_SETMODEINFOSTYLE¤ò»ØÄꤷ¤Æ¥â¡¼¥Éʸ»úÎó¤Î¥¹¥¿¥¤¥ë ¤òÊѹ¹¤·¤Æ¤ª¤¤Þ¤¹¡¥
(Îã)-
char currentMode[MAXMODELEN]; ..... XKanjiControl(dpy, win, KC_QUERYMODE, currentMode); .....
- (10)
- KC_SETSERVERNAME - ¥µ¡¼¥Ð¤Î»ØÄê
¤«¤Ê´Á»úÊÑ´¹¥µ¡¼¥Ð¤È¤·¤Æ¤É¤Î¥µ¡¼¥Ð¤ò»È¤¦¤«¤ò¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¥×¥í¥°¥é¥à ¤ò½ªÎ»¤¹¤ë¤³¤È¤Ê¤·¤ËÀÚÂؤ¨¤ë¤³¤È¤¬²Äǽ¤Ç¤¹¡¥¤«¤Ê´Á»úÊÑ´¹¥µ¡¼¥Ð¤È¤·¤ÆÀÜ Â³¤¹¤ë¤Ù¤¥µ¡¼¥Ð¤ò»ØÄꤹ¤ë¤Ë¤ÏXKanjiControl¤ÇKC_SETSERVERNAME¤ò»ØÄꤷ ¤Þ¤¹¡¥Âè4°ú¿ô¤Ë¤ÏÀܳ¤·¤¿¤¤¥µ¡¼¥Ð̾¤ò»ØÄꤷ¤Þ¤¹¡¥
- (11)
- KC_SETINITFILENAME - ¥«¥¹¥¿¥Þ¥¤¥º¥Õ¥¡¥¤¥ë¤Î»ØÄê
¥«¥¹¥¿¥Þ¥¤¥º¥Õ¥¡¥¤¥ë¤ò¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¥×¥í¥°¥é¥à¦¤«¤éÊѹ¹¤¹¤ë¤³¤È¤¬¤Ç ¤¤Þ¤¹¡¥¥«¥¹¥¿¥Þ¥¤¥º¥Õ¥¡¥¤¥ë¤ÎÊѹ¹¤ÏXKanjiControl¤Î Âè3°ú¿ô¤ËKC_SETINITFILENAME¤ò»ØÄꤷ¡¤Âè4°ú¿ô¤Ë¥Õ¥¡¥¤¥ë̾ʸ»úÎó¤ò»ØÄê ¤¹¤ë¤³¤È¤Ë¤è¤ê¹Ô¤¤¤Þ¤¹¡¥¤³¤Î½èÍý¤ò¹Ô¤¦¾ì¹ç¤ÏKC_INITIALIZE¤ËÀèΩ¤Ã¤Æ¼Â ¹Ô¤·¤Æ¤ª¤«¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡¥
(Îã)-
char *inifile = "app-own.canna" ..... XKanjiControl(dpy, win, KC_SETINITFILENAME, initfile); .....
- (12)
- KC_CLOSEUICONTEXT - ¥³¥ó¥Æ¥¯¥¹¥È¤Î¥¯¥í¡¼¥º
XKanjiControl¤äXKanjiString¤ò¸Æ¤Ó½Ð¤¹¤È¡¤dpy, win¤ÎÁȤ߹ç¤ï¤»¤Ë ÂФ·¤Æ¤Ò¤È¤Ä¤ÎÊÑ´¹¥³¥ó¥Æ¥¯¥¹¥È¤ò³ä¤êÅö¤Æ¤Þ¤¹¡¥ º£¤Þ¤Ç»È¤ï¤ì¤Æ¤¤¤Ê¤¤dpy, win¤Î ÁȤ߹ç¤ï¤»¤òXKanjiString¤¢¤ë¤¤¤ÏXKanjiControl¤ËÍ¿¤¨¤ë¤³¤È¤¬²Äǽ ¤Ç¤¢¤ê¡¤¤½¤Î¾ì¹ç¡¤¤½¤Î¥¦¥£¥ó¥É¥¦ÍѤ˿·¤¿¤Ë¥³¥ó¥Æ¥¯¥¹¥È¤¬ºîÀ®¤µ¤ìɬÍ×¤Ê¥á ¥â¥ê¤¬³ÎÊݤµ¤ì¤Þ¤¹¡¥
¤½¤ì¤Þ¤Ç»ÈÍѤ·¤Æ¤¤¤¿¥¦¥£¥ó¥É¥¦¤¬»È¤ï¤ì¤Ê¤¯¤Ê¤Ã¤¿¾ì¹ç¤Ë¡¤¤½¤Î¥¦¥£¥ó¥É¥¦¤Ë³ä ¤êÅö¤Æ¤Æ»È¤Ã¤Æ¤¤¤¿¥³¥ó¥Æ¥¯¥¹¥ÈÍѤ˳ÎÊݤµ¤ì¤¿¥á¥â¥ê¤ò ³«Êü¤¹¤ë¤Ë¤ÏXKanjiControl¤òÂè3°ú¿ô¤ËKC_CLOSEUICONTEXT¤ò»ØÄꤷ¤Æ¸Æ¤Ó ½Ð¤·¤Þ¤¹¡¥
¤³¤Î½èÍý¤Ïɽ¼¨¤ÎÊѲ½¤ò¤È¤â¤Ê¤¦¤Î¤ÇÂè4°ú¿ô¤Ë¤ÏXKanjiStatusWithValue¹½ ¤ÂΤòÍ¿¤¨¤Þ¤¹¡¥
(Îã)-
XKanjiStatusWithValue ksv; XKanjiStatus ks; unsigned char buf[SOMESIZE]; ..... ksv.ks = &ks; ksv.buffer = buf; ksv.bytes_buffer = SOMESIZE; XKanjiControl(dpy, win, KC_CLOSEUICONTEXT, &ksv); .....
- (13)
- KC_QUERYMAXMODESTR - ¥â¡¼¥Éɽ¼¨Ê¸»úÎó¤ÎºÇÂçŤòµá¤á¤ë¡¥
½é´ü²½¥Õ¥¡¥¤¥ë¤Ë¤Æ¥â¡¼¥Éɽ¼¨Ê¸»úÎ󤬥«¥¹¥¿¥Þ¥¤¥º¤Ç¤¤Þ¤¹¤¬¡¤¥«¥¹¥¿¥Þ¥¤ ¥º¤µ¤ì¤¿·ë²Ì¥â¡¼¥Éɽ¼¨Ê¸»úÎó¤Ë¤É¤ì¤À¤±¤Îɽ¼¨Îΰè¤ò³ÎÊݤ¹¤ë¤«¤òÄ´¤Ù¤ëɬ Íפ¬¤¢¤ë¾ì¹ç¤¬¤¢¤ê¤Þ¤¹¡¥XKanjiControl¤òÂè3°ú¿ô¤ËKC_QUERYMAXMODESTR¤ò »ØÄꤷ¤Æ¸Æ¤Ó½Ð¤¹¤³¤È¤Ë¤è¤ê¡¤¥â¡¼¥Éɽ¼¨Ê¸»úÎó¤È¤·¤Æ²¿¥³¥é¥àɬÍפ«¤¬ÊÖ¤ê ÃͤȤ·¤ÆÊÖ¤µ¤ì¤Þ¤¹¡¥¤³¤³¤Ç¸À¤¦¥³¥é¥à¤È¤ÏȾ³Ñ±Ñ¿ôʸ»ú¤Îʸ»úÉý¤ò£±¤È¤·¤¿ ¤È¤¤ÎÃͤò¼¨¤·¤Þ¤¹¡¥
Âè4°ú¿ô¤ÏÍѤ¤¤é¤ì¤Ê¤¤¤Î¤Ç¥À¥ß¡¼ÃͤȤ·¤Æ0¤òÍ¿¤¨¤Þ¤¹¡¥
(Îã)-
int max_mode_columns; ..... max_mode_columns = XKanjiControl(dpy, win, KC_QUERYMAXMODESTR, 0); .....
Contenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre