The input driver @c minput_gui_driver is provided for internal
input methods that is useful on window systems. It displays
preedit text and status text at the inputting spot. See the
- documentation of @c minput_gui_driver for more detail.
+ documentation of @c minput_gui_driver for more details.
In the m17n-X library, the foreign input method of name @c Mxim is
provided. It uses XIM (X Input Method) as a background input
engine. The symbol @c Mxim has a property @c Minput_driver whose
value is a pointer to the input driver @c minput_xim_driver. See
- the documentation of @c minput_xim_driver for more detail. */
+ the documentation of @c minput_xim_driver for more details. */
/***ja
@addtogroup m17nInputMethodWin
#include <string.h>
#include <ctype.h>
+#include "config.h"
#include "m17n-gui.h"
#include "m17n-misc.h"
#include "internal.h"
win_ic_info->ic_info = (MInputContextInfo *) ic->info;
win_ic_info->frame = frame;
win_ic_info->client.win = win_info->client;
- mwin__window_geometry (frame, win_info->client, win_info->client,
+ (*frame->driver->window_geometry) (frame, win_info->client, win_info->client,
&win_ic_info->client.geometry);
win_ic_info->focus.win = win_info->focus;
- mwin__window_geometry (frame, win_info->focus, win_info->client,
+ (*frame->driver->window_geometry) (frame, win_info->focus, win_info->client,
&win_ic_info->focus.geometry);
- win_ic_info->preedit.win = mwin__create_window (frame, win_info->client);
+ win_ic_info->preedit.win = (*frame->driver->create_window) (frame, win_info->client);
win_ic_info->preedit.control.two_dimensional = 1;
win_ic_info->preedit.control.as_image = 0;
win_ic_info->preedit.control.with_cursor = 1;
win_ic_info->preedit.geometry.x = -1;
win_ic_info->preedit.geometry.y = -1;
- win_ic_info->status.win = mwin__create_window (frame, win_info->client);
+ win_ic_info->status.win = (*frame->driver->create_window) (frame, win_info->client);
win_ic_info->status.control.as_image = 1;
win_ic_info->status.control.enable_bidi = 1;
- win_ic_info->candidates.win = mwin__create_window (frame, win_info->client);
+ win_ic_info->candidates.win = (*frame->driver->create_window) (frame, win_info->client);
win_ic_info->candidates.control.as_image = 1;
ic->info = win_ic_info;
{
MInputGUIContextInfo *win_ic_info = (MInputGUIContextInfo *) ic->info;
MInputContextInfo *ic_info = (MInputContextInfo *) win_ic_info->ic_info;
+ MFrame *frame = win_ic_info->frame;
- mwin__destroy_window (win_ic_info->frame, win_ic_info->preedit.win);
- mwin__destroy_window (win_ic_info->frame, win_ic_info->status.win);
- mwin__destroy_window (win_ic_info->frame, win_ic_info->candidates.win);
+ (*frame->driver->destroy_window) (frame, win_ic_info->preedit.win);
+ (*frame->driver->destroy_window) (frame, win_ic_info->status.win);
+ (*frame->driver->destroy_window) (frame, win_ic_info->candidates.win);
ic->info = ic_info;
(*minput_default_driver.destroy_ic) (ic);
free (win_ic_info);
}
}
- mwin__adjust_window (frame, win, geometry, &physical);
+ (*frame->driver->adjust_window) (frame, win, geometry, &physical);
mdraw_text_with_control (frame, win, -x0, -y0, mt, 0, len, control);
}
if (! win_ic_info->preedit.mapped)
{
- mwin__map_window (frame, win_ic_info->preedit.win);
+ (*frame->driver->map_window) (frame, win_ic_info->preedit.win);
win_ic_info->preedit.mapped = 1;
}
win_ic_info->preedit.control.cursor_pos = ic->cursor_pos;
{
if (win_ic_info->candidates.mapped)
{
- mwin__unmap_window (frame, win_ic_info->candidates.win);
+ (*frame->driver->unmap_window) (frame, win_ic_info->candidates.win);
win_ic_info->candidates.mapped = 0;
}
return;
if (! win_ic_info->candidates.mapped)
{
- mwin__map_window (frame, win_ic_info->candidates.win);
+ (*frame->driver->map_window) (frame, win_ic_info->candidates.win);
win_ic_info->candidates.mapped = 1;
}
{
if (win_ic_info->preedit.mapped)
{
- mwin__unmap_window (frame, win_ic_info->preedit.win);
+ (*frame->driver->unmap_window) (frame, win_ic_info->preedit.win);
win_ic_info->preedit.mapped = 0;
}
}
{
if (! win_ic_info->status.mapped)
{
- mwin__map_window (frame, win_ic_info->status.win);
+ (*frame->driver->map_window) (frame, win_ic_info->status.win);
win_ic_info->status.mapped = 1;
}
}
{
if (win_ic_info->status.mapped)
{
- mwin__unmap_window (frame, win_ic_info->status.win);
+ (*frame->driver->unmap_window) (frame, win_ic_info->status.win);
win_ic_info->status.mapped = 0;
}
}
{
if (! win_ic_info->candidates.mapped)
{
- mwin__map_window (frame, win_ic_info->candidates.win);
+ (*frame->driver->map_window) (frame, win_ic_info->candidates.win);
win_ic_info->candidates.mapped = 1;
}
}
{
if (win_ic_info->candidates.mapped)
{
- mwin__unmap_window (frame, win_ic_info->candidates.win);
+ (*frame->driver->unmap_window) (frame, win_ic_info->candidates.win);
win_ic_info->candidates.mapped = 0;
}
}
The argument $ARG of the function minput_create_ic () must be a
pointer to the structure @c MInputGUIArgIC. See the documentation
- of @c MInputGUIArgIC for more detail.
+ of @c MInputGUIArgIC for more details.
If the argument $KEY is @c Mnil, the argument $ARG of the
function minput_filter () must be a pointer to the object of type
/*=*/
/***en
+ @brief Symbol of the name "xim".
+
+ The variable Mxim is a symbol of name "xim". It is a name of the
+ input method driver #minput_xim_driver. */
+/***ja
+ @brief "xim"¤ò̾Á°¤È¤·¤Æ»ý¤Ä¥·¥ó¥Ü¥ë .
+
+ ÊÑ¿ô Mxim ¤Ï"xim"¤ò̾Á°¤È¤·¤Æ»ý¤Ä¥·¥ó¥Ü¥ë¤Ç¤¢¤ë¡£"xim" ¤ÏÆþÎϥ᥽¥Ã
+ ¥É¥É¥é¥¤¥Ð #minput_xim_driver ¤Î̾Á°¤Ç¤¢¤ë¡£ */
+
+MSymbol Mxim;
+
+/*=*/
+
+/***en
@brief Convert an event to an input key.
The minput_event_to_key () function returns the input key
minput_event_to_key (MFrame *frame, void *event)
{
int modifiers;
- MSymbol key = mwin__parse_event (frame, event, &modifiers);
+ MSymbol key;
char *name, *str;
+ M_CHECK_READABLE (frame, MERROR_IM, Mnil);
+ key = (*frame->driver->parse_event) (frame, event, &modifiers);
if (! modifiers)
return key;