/* input.c -- input method module.
- Copyright (C) 2003, 2004, 2005, 2006
+ Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009
National Institute of Advanced Industrial Science and Technology (AIST)
Registration Number H15PRO112
input event to an input key by himself. See the documentation of
the function minput_event_to_key () for the detail.
- <li> Foreign Input Method
+ <li> Foreign Input Method @anchor foreign-input-method
A foreign input method has @c Mnil LANGUAGE, and its body is
defined in an external resource (e.g. XIM of X Window System).
For this kind of input methods, the symbol NAME must have a
- property of key @c Minput_driver, and the value must be a pointer
+ property of key #Minput_driver, and the value must be a pointer
to an input method driver. Therefore, by preparing a proper
driver, any kind of input method can be treated in the framework
of the @c m17n @c library.
For convenience, the m17n-X library provides an input method
driver that enables the input style of OverTheSpot for XIM, and
- stores @c Minput_driver property of the symbol @c Mxim with a
+ stores #Minput_driver property of the symbol @c Mxim with a
pointer to the driver. See the documentation of m17n GUI API for
the detail.
³°ÉôÆþÎϥ᥽¥Ã¥É¤È¤Ï LANGUAGE ¤¬ @c Mnil ¤Î¤â¤Î¤Ç¤¢¤ê¡¢¤½¤ÎËÜÂΤϳ°
Éô¤Î¥ê¥½¡¼¥¹¤È¤·¤ÆÄêµÁ¤µ¤ì¤ë¡£¡Ê¤¿¤È¤¨¤ÐX Window System ¤ÎXIM ¤Ê
- ¤É¡£) ¤³¤Î¼ï¤ÎÆþÎϥ᥽¥Ã¥É¤Ç¤Ï¡¢¥·¥ó¥Ü¥ë NAME ¤Ï@c Minput_driver ¤ò
+ ¤É¡£) ¤³¤Î¼ï¤ÎÆþÎϥ᥽¥Ã¥É¤Ç¤Ï¡¢¥·¥ó¥Ü¥ë NAME ¤Ï #Minput_driver ¤ò
¥¡¼¤È¤¹¤ë¥×¥í¥Ñ¥Æ¥£¤ò»ý¤Á¡¢¤½¤ÎÃͤÏÆþÎϥ᥽¥Ã¥É¥É¥é¥¤¥Ð¤Ø¤Î¥Ý¥¤¥ó
¥¿¤Ç¤¢¤ë¡£¤³¤Î¤³¤È¤Ë¤è¤ê¡¢Å¬Àڤʥɥ饤¥Ð¤ò½àÈ÷¤¹¤ë¤³¤È¤Ë¤è¤Ã¤Æ¡¢¤¤
¤«¤Ê¤ë¼ïÎà¤ÎÆþÎϥ᥽¥Ã¥É¤â@c m17n @c ¥é¥¤¥Ö¥é¥ê ¤ÎÏÈÁȤÎÃæ¤Ç°·¤¦»ö
ÍøÊØÀ¤Î´ÑÅÀ¤«¤é¡¢m17n X ¥é¥¤¥Ö¥é¥ê¤Ï XIM ¤Î OverTheSpot ¤ÎÆþÎÏ¥¹¥¿
¥¤¥ë¤ò¼Â¸½¤¹¤ëÆþÎϥ᥽¥Ã¥É¥É¥é¥¤¥Ð¤òÄ󶡤·¡¢¤Þ¤¿¥·¥ó¥Ü¥ë @c Mxim ¤Î
- @c Minput_driver ¥×¥í¥Ñ¥Æ¥£¤ÎÃͤȤ·¤Æ¤½¤Î¥É¥é¥¤¥Ð¤Ø¤Î¥Ý¥¤¥ó¥¿¤òÊÝ»ý
+ #Minput_driver ¥×¥í¥Ñ¥Æ¥£¤ÎÃͤȤ·¤Æ¤½¤Î¥É¥é¥¤¥Ð¤Ø¤Î¥Ý¥¤¥ó¥¿¤òÊÝ»ý
¤·¤Æ¤¤¤ë¡£¾ÜºÙ¤Ë¤Ä¤¤¤Æ¤Ï m17n GUI API ¤Î¥É¥¥å¥á¥ó¥È¤ò»²¾È¤Î¤³¤È¡£
</ul>
static int fully_initialized;
-static MSymbol Minput_method;
-
/** Symbols to load an input method data. */
static MSymbol Mtitle, Mmacro, Mmodule, Mstate, Minclude;
NULL, NULL, NULL, "Escape", NULL, NULL, NULL, NULL };
char buf[6], buf2[32], buf3[2];
int i, j;
- /* Maximum case: '\215', C-M-m, C-M-M, M-Return, C-A-m, C-A-M, A-Return. */
+ /* Maximum case: '\215', C-M-m, C-M-M, M-Return, C-A-m, C-A-M, A-Return
+ plus one for cyclic alias. */
MSymbol alias[8];
M_key_alias = msymbol (" key-alias");
+ buf3[1] = '\0';
+
/* Aliases for 0x00-0x1F */
buf[0] = 'C';
buf[1] = '-';
for (i = 0, buf[2] = '@'; i < ' '; i++, buf[2]++)
{
j = 0;
+ buf3[0] = i;
+ alias[j++] = msymbol (buf3);
alias[j++] = one_char_symbol[i] = msymbol (buf);
if (key_names[i] || (buf[2] >= 'A' && buf[2] <= 'Z'))
{
}
/* Aliases for 0x7F */
- alias[0] = alias[2] = one_char_symbol[127] = msymbol ("Delete");
- alias[1] = msymbol ("C-?");
- for (j = 0; j < 2; j++)
+ buf3[0] = 0x7F;
+ alias[0] = alias[3] = msymbol (buf3);
+ alias[1] = one_char_symbol[127] = msymbol ("Delete");
+ alias[2] = msymbol ("C-?");
+ for (j = 0; j < 3; j++)
msymbol_put (alias[j], M_key_alias, alias[j + 1]);
/* Aliases for 0x80-0x9F */
buf[3] = '-';
buf[5] = '\0';
buf2[1] = '-';
- buf3[1] = '\0';
for (i = 128, buf[4] = '@'; i < 160; i++, buf[4]++)
{
j = 0;
alias[j++] = msymbol (buf);
buf[4] -= 32;
}
+
/* Establish cyclic alias chain. */
alias[j] = alias[0];
while (--j >= 0)
/* Aliases for 0xA0-0xFF */
for (i = 160, buf[4] = ' '; i < 255; i++, buf[4]++)
{
+ j = 0;
buf3[0] = i;
alias[j++] = msymbol (buf3);
buf[2] = 'M';
alias[j]= alias[0];
while (--j >= 0)
msymbol_put (alias[j], M_key_alias, alias[j + 1]);
- if (buf[4] < 'A' || (buf[4] > 'Z' && buf[4] < 'a') || buf[4] > 'z')
- {
- buf[2] = 'M';
- alias[0] = alias[2] = msymbol (buf);
- buf[2] = 'A';
- alias[1] = msymbol (buf);
- for (j = 0; j < 2; j++)
- msymbol_put (alias[j], M_key_alias, alias[j + 1]);
- }
}
buf3[0] = 255;
- alias[0] = alias[5] = msymbol (buf);
+ alias[0] = alias[3] = msymbol (buf3);
alias[1] = one_char_symbol[255] = msymbol ("M-Delete");
alias[2] = msymbol ("A-Delete");
- alias[3] = msymbol ("C-M-?");
- alias[4] = msymbol ("C-A-?");
- for (j = 0; j < 5; j++)
+ for (j = 0; j < 3; j++)
msymbol_put (alias[j], M_key_alias, alias[j + 1]);
+ /* Aliases for keys that can't be mapped to one-char-symbol
+ (e.g. C-A-1) */
+ /* buf is already set to "C-?-". */
+ for (i = ' '; i <= '~'; i++)
+ {
+ if (i == '@')
+ {
+ i = '_';
+ continue;
+ }
+ if (i == 'a')
+ {
+ i = 'z';
+ continue;
+ }
+ buf[2] = 'M';
+ buf[4] = i;
+ alias[0] = alias[2] = msymbol (buf);
+ buf[2] = 'A';
+ alias[1] = msymbol (buf);
+ for (j = 0; j < 2; j++)
+ msymbol_put (alias[j], M_key_alias, alias[j + 1]);
+ }
+
Minput_method = msymbol ("input-method");
Mtitle = msymbol ("title");
Mmacro = msymbol ("macro");
Mor = msymbol ("|");
Mnot = msymbol ("!");
- Mat_reload = msymbol ("@reload");
+ Mat_reload = msymbol ("-reload");
Mcandidates_group_size = msymbol ("candidates-group-size");
Mcandidates_charset = msymbol ("candidates-charset");
}
-/* Return a plist containing an integer value of VAR. */
+/* Return a plist containing an integer value of VAR. The plist must
+ not be UNREFed. */
static MPlist *
resolve_variable (MInputContextInfo *ic_info, MSymbol var)
}
/* Load a macro from PLIST into IM_INFO->macros.
- PLIST has this from:
+ PLIST has this form:
PLIST ::= ( MACRO-NAME ACTION * )
IM_INFO->macros is a plist of macro names vs action list. */
MERROR (MERROR_IM, -1);
name = MPLIST_SYMBOL (plist);
plist = MPLIST_NEXT (plist);
- if (MPLIST_TAIL_P (plist)
- || parse_action_list (plist, im_info->macros) < 0)
+ if (MFAILP (! MPLIST_TAIL_P (plist)))
MERROR (MERROR_IM, -1);
pl = mplist_get (im_info->macros, name);
M17N_OBJECT_UNREF (pl);
M17N_OBJECT_REF (im_info->description);
}
}
+ if (im_info->macros)
+ {
+ MPLIST_DO (pl, im_info->macros)
+ parse_action_list (MPLIST_PLIST (pl), im_info->macros);
+ }
+
im_info->tick = time (NULL);
}
return MCHARSET (sym);
}
+/* The returned plist must be UNREFed. */
+
static MPlist *
adjust_candidates (MPlist *plist, MCharset *charset)
{
return plist;
}
+/* The returned Plist must be UNREFed. */
+
static MPlist *
get_candidate_list (MInputContextInfo *ic_info, MPlist *args)
{
column = MPLIST_INTEGER (plist);
plist = MPLIST_PLIST (args);
+ if (! plist)
+ return NULL;
if (charset)
- plist = adjust_candidates (plist, charset);
+ {
+ plist = adjust_candidates (plist, charset);
+ if (! plist)
+ return NULL;
+ }
+ else
+ M17N_OBJECT_REF (plist);
- if (plist && column > 0)
+ if (column == 0)
+ return plist;
+
+ if (MPLIST_MTEXT_P (plist))
{
- if (MPLIST_MTEXT_P (plist))
- {
- MText *mt = MPLIST_MTEXT (plist);
- MPlist *next = MPLIST_NEXT (plist);
+ MText *mt = MPLIST_MTEXT (plist);
+ MPlist *next = MPLIST_NEXT (plist);
- if (MPLIST_TAIL_P (next))
- M17N_OBJECT_REF (mt);
- else
+ if (MPLIST_TAIL_P (next))
+ M17N_OBJECT_REF (mt);
+ else
+ {
+ mt = mtext_dup (mt);
+ while (! MPLIST_TAIL_P (next))
{
- mt = mtext_dup (mt);
- while (! MPLIST_TAIL_P (next))
- {
- mt = mtext_cat (mt, MPLIST_MTEXT (next));
- next = MPLIST_NEXT (next);
- }
+ mt = mtext_cat (mt, MPLIST_MTEXT (next));
+ next = MPLIST_NEXT (next);
}
- if (charset)
- M17N_OBJECT_UNREF (plist);
- plist = mplist ();
- len = mtext_nchars (mt);
- if (len <= column)
- mplist_add (plist, Mtext, mt);
- else
+ }
+ M17N_OBJECT_UNREF (plist);
+ plist = mplist ();
+ len = mtext_nchars (mt);
+ if (len <= column)
+ mplist_add (plist, Mtext, mt);
+ else
+ {
+ for (i = 0; i < len; i += column)
{
- for (i = 0; i < len; i += column)
- {
- int to = (i + column < len ? i + column : len);
- MText *sub = mtext_copy (mtext (), 0, mt, i, to);
+ int to = (i + column < len ? i + column : len);
+ MText *sub = mtext_copy (mtext (), 0, mt, i, to);
- mplist_add (plist, Mtext, sub);
- M17N_OBJECT_UNREF (sub);
- }
+ mplist_add (plist, Mtext, sub);
+ M17N_OBJECT_UNREF (sub);
}
- M17N_OBJECT_UNREF (mt);
}
- else if (! MPLIST_TAIL_P (plist))
+ M17N_OBJECT_UNREF (mt);
+ }
+ else if (MPLIST_PLIST_P (plist))
+ {
+ MPlist *tail = plist;
+ MPlist *new = mplist ();
+ MPlist *this = mplist ();
+ int count = 0;
+
+ MPLIST_DO (tail, tail)
{
- MPlist *tail = plist;
- MPlist *new = mplist ();
- MPlist *this = mplist ();
- int count = 0;
+ MPlist *p = MPLIST_PLIST (tail);
- MPLIST_DO (tail, tail)
+ MPLIST_DO (p, p)
{
- MPlist *p = MPLIST_PLIST (tail);
+ MText *mt = MPLIST_MTEXT (p);
- MPLIST_DO (p, p)
+ if (count == column)
{
- MText *mt = MPLIST_MTEXT (p);
-
- if (count == column)
- {
- mplist_add (new, Mplist, this);
- M17N_OBJECT_UNREF (this);
- this = mplist ();
- count = 0;
- }
- mplist_add (this, Mtext, mt);
- count++;
+ mplist_add (new, Mplist, this);
+ M17N_OBJECT_UNREF (this);
+ this = mplist ();
+ count = 0;
}
+ mplist_add (this, Mtext, mt);
+ count++;
}
- mplist_add (new, Mplist, this);
- M17N_OBJECT_UNREF (this);
- mplist_set (plist, Mnil, NULL);
- MPLIST_DO (tail, new)
- {
- MPlist *elt = MPLIST_PLIST (tail);
+ }
+ mplist_add (new, Mplist, this);
+ M17N_OBJECT_UNREF (this);
+ mplist_set (plist, Mnil, NULL);
+ MPLIST_DO (tail, new)
+ {
+ MPlist *elt = MPLIST_PLIST (tail);
- mplist_add (plist, Mplist, elt);
- }
- M17N_OBJECT_UNREF (new);
+ mplist_add (plist, Mplist, elt);
}
+ M17N_OBJECT_UNREF (new);
}
return plist;
else if (name == M_candidates)
{
MPlist *plist = get_candidate_list (ic_info, args);
+ MPlist *pl;
int len;
- if (! plist || (MPLIST_PLIST_P (plist) && MPLIST_TAIL_P (plist)))
+ if (! plist)
continue;
+ if (MPLIST_PLIST_P (plist) && MPLIST_TAIL_P (plist))
+ {
+ M17N_OBJECT_UNREF (plist);
+ continue;
+ }
if (MPLIST_MTEXT_P (plist))
{
preedit_insert (ic, ic->cursor_pos, NULL,
mtext_ref_char (MPLIST_MTEXT (plist), 0));
len = 1;
}
- else if (MPLIST_TAIL_P (MPLIST_PLIST (plist)))
- continue;
else
{
MText * mt = MPLIST_MTEXT (MPLIST_PLIST (plist));
preedit_insert (ic, ic->cursor_pos, mt, 0);
len = mtext_nchars (mt);
}
- plist = mplist_copy (plist);
+ pl = mplist_copy (plist);
+ M17N_OBJECT_UNREF (plist);
mtext_put_prop (ic->preedit,
ic->cursor_pos - len, ic->cursor_pos,
- Mcandidate_list, plist);
- M17N_OBJECT_UNREF (plist);
+ Mcandidate_list, pl);
+ M17N_OBJECT_UNREF (pl);
mtext_put_prop (ic->preedit,
ic->cursor_pos - len, ic->cursor_pos,
Mcandidate_index, (void *) 0);
/*=*/
/***en
- @name Variables: Predefined symbols for callback commands.
+ @brief Symbol whose name is "input-method".
+ */
+/***ja
+ @brief "input-method" ¤ò̾Á°¤È¤·¤Æ»ý¤Ä¥·¥ó¥Ü¥ë.
+ */
+MSymbol Minput_method;
+/***en
+ @name Variables: Predefined symbols for callback commands. */
+/***ja
+ @name ÊÑ¿ô¡§ ¥³¡¼¥ë¥Ð¥Ã¥¯¥³¥Þ¥ó¥ÉÍÑÄêµÁºÑ¤ß¥·¥ó¥Ü¥ë. */
+/*** @{ */
+/***en
These are the predefined symbols that are used as the @c COMMAND
argument of callback functions of an input method driver (see
#MInputDriver::callback_list).
Most of them do not require extra argument nor return any value;
exceptions are these:
- Minput_get_surrounding_text: When a callback function assigned for
+ @b Minput_get_surrounding_text: When a callback function assigned for
this command is called, the first element of #MInputContext::plist
has key #Minteger and the value specifies which portion of the
surrounding text should be retrieved. If the value is positive,
function should return without changing the first element of
#MInputContext::plist.
- Minput_delete_surrounding_text: When a callback function assigned
+ @b Minput_delete_surrounding_text: When a callback function assigned
for this command is called, the first element of
#MInputContext::plist has key #Minteger and the value specifies
which portion of the surrounding text should be deleted in the
function must delete the specified text. It should not alter
#MInputContext::plist. */
/***ja
- @name ÊÑ¿ô¡§ ¥³¡¼¥ë¥Ð¥Ã¥¯¥³¥Þ¥ó¥ÉÍÑÄêµÁºÑ¤ß¥·¥ó¥Ü¥ë.
-
ÆþÎϥ᥽¥Ã¥É¥É¥é¥¤¥Ð¤Î¥³¡¼¥ë¥Ð¥Ã¥¯´Ø¿ô¤Ë¤ª¤¤¤Æ @c COMMAND
°ú¿ô¤È¤·¤ÆÍѤ¤¤é¤ì¤ëÄêµÁºÑ¤ß¥·¥ó¥Ü¥ë (#MInputDriver::callback_list »²¾È)¡£
Minput_get_surrounding_text ¤ÈƱÍͤΤä¤êÊý¤Ç»ØÄꤹ¤ë¡£¥³¡¼¥ë¥Ð¥Ã¥¯
´Ø¿ô¤Ï»ØÄꤵ¤ì¤¿¥Æ¥¥¹¥È¤òºï½ü¤·¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£¤Þ¤¿
#MInputContext::plist ¤òÊѤ¨¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£ */
-/*** @{ */
-/*=*/
-
MSymbol Minput_preedit_start;
MSymbol Minput_preedit_done;
MSymbol Minput_preedit_draw;
/*=*/
/***en
- @name Variables: Predefined symbols used in input method information.
-
+ @name Variables: Predefined symbols used in input method information. */
+/***ja
+ @name ÊÑ¿ô: ÆþÎϥ᥽¥Ã¥É¾ðÊóÍÑÄêµÁºÑ¤ß¥·¥ó¥Ü¥ë. */
+/*** @{ */
+/*=*/
+/***en
These are the predefined symbols describing status of input method
command and variable, and are used in a return value of
minput_get_command () and minput_get_variable (). */
/***ja
- @name ÊÑ¿ô: ÆþÎϥ᥽¥Ã¥É¾ðÊóÍÑÄêµÁºÑ¤ß¥·¥ó¥Ü¥ë.
-
ÆþÎϥ᥽¥Ã¥É¤Î¥³¥Þ¥ó¥É¤äÊÑ¿ô¤Î¾õÂÖ¤òɽ¤·¡¢minput_get_command () ¤È
minput_get_variable () ¤ÎÌá¤êÃͤȤ·¤ÆÍѤ¤¤é¤ì¤ëÄêµÁºÑ¤ß¥·¥ó¥Ü¥ë¡£ */
-/*** @{ */
-/*=*/
MSymbol Minherited;
MSymbol Mcustomized;
MSymbol Mconfigured;
MInputDriver *minput_driver;
+/*=*/
+/***
+ The variable #Minput_driver is a symbol for a foreign input method.
+ See @ref foreign-input-method "foreign input method" for the detail. */
MSymbol Minput_driver;
/*=*/
The minput_create_ic () function creates an input context object
associated with input method $IM, and calls callback functions
- corresponding to #Minput_preedit_start, #Minput_status_start, and
- #Minput_status_draw in this order.
+ corresponding to @b Minput_preedit_start, @b Minput_status_start, and
+ @b Minput_status_draw in this order.
@return
If an input context is successfully created, minput_create_ic ()
´Ø¿ô minput_create_ic () ¤ÏÆþÎϥ᥽¥Ã¥É $IM
¤ËÂбþ¤¹¤ëÆþÎÏ¥³¥ó¥Æ¥¯¥¹¥È¥ª¥Ö¥¸¥§¥¯¥È¤òÀ¸À®¤·¡¢
- #Minput_preedit_start, #Minput_status_start, #Minput_status_draw
+ @b Minput_preedit_start, @b Minput_status_start, @b Minput_status_draw
¤ËÂбþ¤¹¤ë¥³¡¼¥ë¥Ð¥Ã¥¯´Ø¿ô¤ò¤³¤Î½ç¤Ë¸Æ¤Ö¡£
@return
The minput_destroy_ic () function destroys the input context $IC,
which must have been created by minput_create_ic (). It calls
- callback functions corresponding to #Minput_preedit_done,
- #Minput_status_done, and #Minput_candidates_done in this order. */
+ callback functions corresponding to @b Minput_preedit_done,
+ @b Minput_status_done, and @b Minput_candidates_done in this order. */
/***ja
@brief ÆþÎÏ¥³¥ó¥Æ¥¯¥¹¥È¤òÇ˲õ¤¹¤ë.
´Ø¿ô minput_destroy_ic () ¤Ï¡¢ÆþÎÏ¥³¥ó¥Æ¥¯¥¹¥È $IC ¤òÇ˲õ¤¹¤ë¡£
¤³¤ÎÆþÎÏ¥³¥ó¥Æ¥¯¥¹¥È¤Ï minput_create_ic ()
¤Ë¤è¤Ã¤Æºî¤é¤ì¤¿¤â¤Î¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£¤³¤Î´Ø¿ô¤Ï
- #Minput_preedit_done, #Minput_status_done, #Minput_candidates_done
+ @b Minput_preedit_done, @b Minput_status_done, @b Minput_candidates_done
¤ËÂбþ¤¹¤ë¥³¡¼¥ë¥Ð¥Ã¥¯´Ø¿ô¤ò¤³¤Î½ç¤Ë¸Æ¤Ö¡£
*/
The minput_filter () function filters input key $KEY according to
input context $IC, and calls callback functions corresponding to
- #Minput_preedit_draw, #Minput_status_draw, and
- #Minput_candidates_draw if the preedit text, the status, and the
+ @b Minput_preedit_draw, @b Minput_status_draw, and
+ @b Minput_candidates_draw if the preedit text, the status, and the
current candidate are changed respectively.
To make the input method commit the current preedit text (if any)
$KEY.
To inform the input method about the focus-out event, call this
- function with #Minput_focus_out as $KEY.
+ function with @b Minput_focus_out as $KEY.
To inform the input method about the focus-in event, call this
- function with #Minput_focus_in as $KEY.
+ function with @b Minput_focus_in as $KEY.
To inform the input method about the focus-move event (i.e. input
spot change within the same input context), call this function
- with #Minput_focus_move as $KEY.
+ with @b Minput_focus_move as $KEY.
@return
If $KEY is filtered out, this function returns 1. In that case,
´Ø¿ô minput_filter () ¤ÏÆþÎÏ¥¡¼ $KEY ¤òÆþÎÏ¥³¥ó¥Æ¥¯¥¹¥È $IC
¤Ë±þ¤¸¤Æ¥Õ¥£¥ë¥¿¤·¡¢preedit ¥Æ¥¥¹¥È¡¢¥¹¥Æ¡¼¥¿¥¹¡¢¸½»þÅÀ¤Ç¤Î¸õÊ䤬ÊѲ½¤·¤¿»þÅÀ¤Ç¡¢¤½¤ì¤¾¤ì
- #Minput_preedit_draw, #Minput_status_draw,
- #Minput_candidates_draw ¤ËÂбþ¤¹¤ë¥³¡¼¥ë¥Ð¥Ã¥¯´Ø¿ô¤ò¸Æ¤Ö¡£
+ @b Minput_preedit_draw, @b Minput_status_draw,
+ @b Minput_candidates_draw ¤ËÂбþ¤¹¤ë¥³¡¼¥ë¥Ð¥Ã¥¯´Ø¿ô¤ò¸Æ¤Ö¡£
@return
$KEY ¤¬¥Õ¥£¥ë¥¿¤µ¤ì¤ì¤Ð¡¢¤³¤Î´Ø¿ô¤Ï 1 ¤òÊÖ¤¹¡£
@brief Reset an input context.
The minput_reset_ic () function resets input context $IC by
- calling a callback function corresponding to #Minput_reset. It
+ calling a callback function corresponding to @b Minput_reset. It
resets the status of $IC to its initial one. As the
current preedit text is deleted without commitment, if necessary,
- call minput_filter () with the arg @r key #Mnil to force the input
+ call minput_filter () with the arg @b key #Mnil to force the input
method to commit the preedit in advance. */
/***ja
@brief ÆþÎÏ¥³¥ó¥Æ¥¯¥¹¥È¤ò¥ê¥»¥Ã¥È¤¹¤ë.
- ´Ø¿ô minput_reset_ic () ¤Ï #Minput_reset ¤ËÂбþ¤¹¤ë¥³¡¼¥ë¥Ð¥Ã¥¯´Ø¿ô
+ ´Ø¿ô minput_reset_ic () ¤Ï @b Minput_reset ¤ËÂбþ¤¹¤ë¥³¡¼¥ë¥Ð¥Ã¥¯´Ø¿ô
¤ò¸Æ¤Ö¤³¤È¤Ë¤è¤Ã¤ÆÆþÎÏ¥³¥ó¥Æ¥¯¥¹¥È $IC ¤ò¥ê¥»¥Ã¥È¤¹¤ë¡£¥ê¥»¥Ã¥È¤È¤Ï¡¢
¼ÂºÝ¤Ë¤ÏÆþÎϥ᥽¥Ã¥É¤ò½é´ü¾õÂ֤˰ܤ¹¤³¤È¤Ç¤¢¤ë¡£¸½ºßÆþÎÏÃæ¤Î¥Æ¥¥¹
¥È¤Ï¥³¥ß¥Ã¥È¤µ¤ì¤ë¤³¤È¤Ê¤¯ºï½ü¤µ¤ì¤ë¤Î¤Ç¡¢¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¥×¥í¥°¥é
- ¥à¤Ï¡¢É¬Íפʤé¤Ðͽ¤á minput_filter () ¤ò°ú¿ô @r key #Mnil ¤Ç¸Æ¤ó¤Ç
+ ¥à¤Ï¡¢É¬Íפʤé¤Ðͽ¤á minput_filter () ¤ò°ú¿ô @b key #Mnil ¤Ç¸Æ¤ó¤Ç
¶¯À©Åª¤Ë¥×¥ê¥¨¥Ç¥£¥Ã¥È¥Æ¥¥¹¥È¤ò¥³¥ß¥Ã¥È¤µ¤»¤ë¤³¤È¡£ */
void
command has no description.
@c STATUS is a symbol representing how the key assignment is decided.
- The value is #Mnil (the default key assignment), #Mcustomized (the
+ The value is #Mnil (the default key assignment), @b Mcustomized (the
key assignment is customized by per-user customization file), or
- #Mconfigured (the key assignment is set by the call of
+ @b Mconfigured (the key assignment is set by the call of
minput_config_command ()). For a local command only, it may also
- be #Minherited (the key assignment is inherited from the
+ be @b Minherited (the key assignment is inherited from the
corresponding global command).
@c KEYSEQ is a plist of one or more symbols representing a key
¤Ï #Mnil ¤Ç¤¢¤ë¡£
@c STATUS ¤Ï¥¡¼³ä¤êÅö¤Æ¤¬¤É¤Î¤è¤¦¤ËÄê¤á¤é¤ì¤ë¤«¤ò¤¢¤é¤ï¤¹¥·¥ó¥Ü¥ë
- ¤Ç¤¢¤ê¡¢¤½¤ÎÃÍ¤Ï #Mnil ¡Ê¥Ç¥Õ¥©¥ë¥È¤Î³ä¤êÅö¤Æ¡Ë, #Mcustomized ¡Ê¥æ¡¼
+ ¤Ç¤¢¤ê¡¢¤½¤ÎÃÍ¤Ï #Mnil ¡Ê¥Ç¥Õ¥©¥ë¥È¤Î³ä¤êÅö¤Æ¡Ë, @b Mcustomized ¡Ê¥æ¡¼
¥¶Ëè¤Î¥«¥¹¥¿¥Þ¥¤¥º¥Õ¥¡¥¤¥ë¤Ë¤è¤Ã¤Æ¥«¥¹¥¿¥Þ¥¤¥º¤µ¤ì¤¿³ä¤êÅö¤Æ¡Ë,
- #Mconfigured ¡Êminput_config_command ()¤ò¸Æ¤Ö¤³¤È¤Ë¤è¤Ã¤ÆÀßÄꤵ¤ì¤ë
+ @b Mconfigured ¡Êminput_config_command ()¤ò¸Æ¤Ö¤³¤È¤Ë¤è¤Ã¤ÆÀßÄꤵ¤ì¤ë
³ä¤êÅö¤Æ¡Ë¤Î¤¤¤º¤ì¤«¤Ç¤¢¤ë¡£¥í¡¼¥«¥ë¥³¥Þ¥ó¥É¤Î¾ì¹ç¤Ë¤Ï¡¢
- #Minherited ¡ÊÂбþ¤¹¤ë¥°¥í¡¼¥Ð¥ë¥³¥Þ¥ó¥É¤«¤é¤Î·Ñ¾µ¤Ë¤è¤ë³ä¤êÅö¤Æ¡Ë
+ @b Minherited ¡ÊÂбþ¤¹¤ë¥°¥í¡¼¥Ð¥ë¥³¥Þ¥ó¥É¤«¤é¤Î·Ñ¾µ¤Ë¤è¤ë³ä¤êÅö¤Æ¡Ë
¤Ç¤â¤è¤¤¡£
@c KEYSEQ ¤Ï£±¤Ä°Ê¾å¤Î¥·¥ó¥Ü¥ë¤«¤é¤Ê¤ë plist ¤Ç¤¢¤ê¡¢³Æ¥·¥ó¥Ü¥ë¤Ï¥³¥Þ
variable has no description.
@c STATUS is a symbol representing how the value is decided. The
- value is #Mnil (the default value), #Mcustomized (the value is
- customized by per-user customization file), or #Mconfigured (the
+ value is #Mnil (the default value), @b Mcustomized (the value is
+ customized by per-user customization file), or @b Mconfigured (the
value is set by the call of minput_config_variable ()). For a
- local variable only, it may also be #Minherited (the value is
+ local variable only, it may also be @b Minherited (the value is
inherited from the corresponding global variable).
@c VALUE is the initial value of the variable. If the key of this
#Mnil ¤Ç¤¢¤ë¡£
@c STATUS ¤ÏÃͤ¬¤É¤Î¤è¤¦¤ËÄê¤á¤é¤ì¤ë¤«¤ò¤¢¤é¤ï¤¹¥·¥ó¥Ü¥ë¤Ç¤¢¤ê¡¢
- @c STATUS ¤ÎÃÍ¤Ï #Mnil ¡Ê¥Ç¥Õ¥©¥ë¥È¤ÎÃÍ¡Ë, #Mcustomized ¡Ê¥æ¡¼¥¶Ëè¤Î
- ¥«¥¹¥¿¥Þ¥¤¥º¥Õ¥¡¥¤¥ë¤Ë¤è¤Ã¤Æ¥«¥¹¥¿¥Þ¥¤¥º¤µ¤ì¤¿ÃÍ¡Ë, #Mconfigured
+ @c STATUS ¤ÎÃÍ¤Ï #Mnil ¡Ê¥Ç¥Õ¥©¥ë¥È¤ÎÃÍ¡Ë, @b Mcustomized ¡Ê¥æ¡¼¥¶Ëè¤Î
+ ¥«¥¹¥¿¥Þ¥¤¥º¥Õ¥¡¥¤¥ë¤Ë¤è¤Ã¤Æ¥«¥¹¥¿¥Þ¥¤¥º¤µ¤ì¤¿ÃÍ¡Ë, @b Mconfigured
¡Êminput_config_variable ()¤ò¸Æ¤Ö¤³¤È¤Ë¤è¤Ã¤ÆÀßÄꤵ¤ì¤ëÃ͡ˤΤ¤¤º¤ì
- ¤«¤Ç¤¢¤ë¡£¥í¡¼¥«¥ëÊÑ¿ô¤Î¾ì¹ç¤Ë¤Ï¡¢#Minherited ¡ÊÂбþ¤¹¤ë¥°¥í¡¼¥Ð¥ë
+ ¤«¤Ç¤¢¤ë¡£¥í¡¼¥«¥ëÊÑ¿ô¤Î¾ì¹ç¤Ë¤Ï¡¢@b Minherited ¡ÊÂбþ¤¹¤ë¥°¥í¡¼¥Ð¥ë
ÊÑ¿ô¤«¤é·Ñ¾µ¤·¤¿Ã͡ˤǤâ¤è¤¤¡£
@c VALUE ¤ÏÊÑ¿ô¤Î½é´üÃͤǤ¢¤ë¡£¤³¤ÎÍ×ÁǤΥ¡¼¤¬#Mt ¤Ç¤¢¤ì¤Ð½é´üÃͤò»ý
@return
If the operation was successful, 0 is returned. Otherwise -1 is
- returned, and #merror_code is set to #MERROR_IM. */
+ returned, and #merror_code is set to @c MERROR_IM. */
/***ja
@brief ÆþÎϥ᥽¥Ã¥ÉÊÑ¿ô¤Î½é´üÃͤòÀßÄꤹ¤ë.
@return
½èÍý¤¬À®¸ù¤¹¤ì¤Ð 0 ¤òÊÖ¤¹¡£¤½¤¦¤Ç¤Ê¤±¤ì¤Ð -1 ¤òÊÖ¤·¡¢
- #merror_code ¤ò #MERROR_IM ¤ËÀßÄꤹ¤ë¡£ */
+ #merror_code ¤ò @c MERROR_IM ¤ËÀßÄꤹ¤ë¡£ */
int
minput_set_variable (MSymbol language, MSymbol name,
@return
If the operation was successful, 0 is returned. Otherwise -1 is
- returned, and #merror_code is set to #MERROR_IM. */
+ returned, and #merror_code is set to @c MERROR_IM. */
/***ja
@brief ÆþÎϥ᥽¥Ã¥É¥³¥Þ¥ó¥É¤Ë¥¡¼¥·¡¼¥¯¥¨¥ó¥¹¤ò³ä¤êÅö¤Æ¤ë.
@return
½èÍý¤¬À®¸ù¤¹¤ì¤Ð 0 ¤òÊÖ¤¹¡£¤½¤¦¤Ç¤Ê¤±¤ì¤Ð -1 ¤òÊÖ¤·¡¢
- #merror_code ¤ò #MERROR_IM ¤ËÀßÄꤹ¤ë¡£ */
+ #merror_code ¤ò @c MERROR_IM ¤ËÀßÄꤹ¤ë¡£ */
int
minput_assign_command_keys (MSymbol language, MSymbol name,