|
Lines 823-861
UIMInstance::uim_cand_deactive_cb (void
Link Here
|
| 823 |
} |
823 |
} |
| 824 |
} |
824 |
} |
| 825 |
|
825 |
|
| 826 |
void |
|
|
| 827 |
UIMInstance::uim_surrounding_text_request_cb (void *ptr) |
| 828 |
{ |
| 829 |
UIMInstance *this_ptr = static_cast <UIMInstance *> (ptr); |
| 830 |
if (this_ptr) { |
| 831 |
|
| 832 |
SCIM_DEBUG_IMENGINE(2) << "uim_surrounding_text_request_cb.\n"; |
| 833 |
|
| 834 |
WideString wstr; |
| 835 |
int cursor; |
| 836 |
|
| 837 |
if (this_ptr->get_surrounding_text (wstr, cursor)) { |
| 838 |
String str = utf8_wcstombs (wstr); |
| 839 |
uim_set_surrounding_text (this_ptr->m_uc, str.c_str (), cursor, wstr.length ()); |
| 840 |
} |
| 841 |
} |
| 842 |
} |
| 843 |
|
| 844 |
int |
| 845 |
UIMInstance::uim_surrounding_text_delete_cb (void *ptr, int offset, int len) |
| 846 |
{ |
| 847 |
UIMInstance *this_ptr = static_cast <UIMInstance *> (ptr); |
| 848 |
int ret = -1; |
| 849 |
|
| 850 |
if (this_ptr) { |
| 851 |
SCIM_DEBUG_IMENGINE(2) << "uim_surrounding_text_delete_cb.\n"; |
| 852 |
|
| 853 |
if (this_ptr->delete_surrounding_text (offset, len)) |
| 854 |
ret = 0; |
| 855 |
} |
| 856 |
|
| 857 |
return ret; |
| 858 |
} |
| 859 |
/* |
826 |
/* |
| 860 |
vi:ts=4:nowrap:ai:expandtab |
827 |
vi:ts=4:nowrap:ai:expandtab |
| 861 |
*/ |
828 |
*/ |