HangulInputContext* hangul_ic_new(HangulKeyboardType keyboard);
void hangul_ic_delete(HangulInputContext *hic);
-bool hangul_ic_filter(HangulInputContext *hic, int ascii);
+bool hangul_ic_process(HangulInputContext *hic, int ascii);
void hangul_ic_reset(HangulInputContext *hic);
void hangul_ic_flush(HangulInputContext *hic);
bool hangul_ic_backspace(HangulInputContext *hic);
}
static bool
-hangul_ic_filter_jamo(HangulInputContext *hic, ucschar ch)
+hangul_ic_process_jamo(HangulInputContext *hic, ucschar ch)
{
ucschar jong;
ucschar combined;
}
static bool
-hangul_ic_filter_jaso(HangulInputContext *hic, ucschar ch)
+hangul_ic_process_jaso(HangulInputContext *hic, ucschar ch)
{
if (hangul_is_choseong(ch)) {
if (hic->buffer.choseong == 0) {
}
bool
-hangul_ic_filter(HangulInputContext *hic, int ascii)
+hangul_ic_process(HangulInputContext *hic, int ascii)
{
ucschar ch;
hic->commit_string[0] = 0;
if (hic->type == HANGUL_INPUT_FILTER_JAMO)
- return hangul_ic_filter_jamo(hic, ch);
+ return hangul_ic_process_jamo(hic, ch);
else
- return hangul_ic_filter_jaso(hic, ch);
+ return hangul_ic_process_jaso(hic, ch);
}
const ucschar*
}
/* im's member function */
-static PyObject *_pyhangulic_filter(PY_HANGULIC *self, PyObject *args)
+static PyObject *_pyhangulic_process(PY_HANGULIC *self, PyObject *args)
{
int ret;
int ascii;
if(!PyArg_ParseTuple(args,"i", &ascii)) {
- PyErr_SetString(_pyhangul_error,"Usage: filter(ascii)");
+ PyErr_SetString(_pyhangul_error,"Usage: process(ascii)");
return NULL;
}
- ret = hangul_ic_filter(self->hic, ascii);
+ ret = hangul_ic_process(self->hic, ascii);
return Py_BuildValue("i", ret);
}
/* PY_HANGULIC methods */
static PyMethodDef PY_HANGULIC_methods[] = {
- { "filter", (PyCFunction)_pyhangulic_filter, METH_VARARGS, NULL},
+ { "process", (PyCFunction)_pyhangulic_process, METH_VARARGS, NULL},
{ "reset", (PyCFunction)_pyhangulic_reset, METH_VARARGS, NULL},
{ "flush", (PyCFunction)_pyhangulic_flush, METH_VARARGS, NULL},
{ "backspace", (PyCFunction)_pyhangulic_backspace, METH_VARARGS, NULL},
}
for (ascii = getchar(); ascii != EOF; ascii = getchar()) {
- int ret = hangul_ic_filter(hic, ascii);
+ int ret = hangul_ic_process(hic, ascii);
commit_string = (wchar_t*)hangul_ic_get_commit_string(hic);
n = wcstombs(commit, commit_string, sizeof(commit));
commit[n] = '\0';