本文整理汇总了C++中GCIN_module_main_functions::mf_send_text方法的典型用法代码示例。如果您正苦于以下问题:C++ GCIN_module_main_functions::mf_send_text方法的具体用法?C++ GCIN_module_main_functions::mf_send_text怎么用?C++ GCIN_module_main_functions::mf_send_text使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GCIN_module_main_functions
的用法示例。
在下文中一共展示了GCIN_module_main_functions::mf_send_text方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: send_seg
static void send_seg()
{
char out[512];
int i;
for(i=0, out[0]=0; i < segN; i++) {
strcat(out, gtk_label_get_text(GTK_LABEL(seg[i].label)));
anthy_commit_segment(ac, i, seg[i].selidx);
seg[i].selidx = 0;
}
// printf("sent convert '%s'\n", out);
gmf.mf_send_text(out);
clear_all();
}
示例2: free
int
module_flush_input (void)
{
char *pszTmp;
if (chewing_commit_Check (g_pChewingCtx))
{
pszTmp = chewing_commit_String (g_pChewingCtx);
g_gcinModMainFuncs.mf_send_text (pszTmp);
free (pszTmp);
}
chewing_Reset (g_pChewingCtx);
return 0;
}
示例3: send_jp
static gboolean send_jp()
{
char out[512];
merge_jp(out, FALSE);
if (!out[0])
return FALSE;
clear_seg_label();
jpN=0;
keysN = 0;
// printf("sent romanji '%s'\n", out);
gmf.mf_send_text(out);
segN = 0;
return TRUE;
}
示例4: memset
//.........这里部分代码省略.........
case XK_Left:
case XK_KP_Left:
chewing_handle_Left (g_pChewingCtx);
break;
case XK_Right:
case XK_KP_Right:
chewing_handle_Right (g_pChewingCtx);
break;
#if 0
case XK_Shift_L:
chewing_handle_ShiftLeft (g_pChewingCtx);
break;
case XK_Shift_R:
chewing_handle_ShiftRight (g_pChewingCtx);
break;
#endif
case XK_Tab:
chewing_handle_Tab (g_pChewingCtx);
break;
default:
if (nKeyVal > 32 && nKeyVal < 127)
chewing_handle_Default (g_pChewingCtx, nKeyVal);
break;
}
gcin_label_clear (MAX_SEG_NUM);
g_nCurrentCursorPos = chewing_cursor_Current (g_pChewingCtx);
if (g_nCurrentCursorPos < 0 || g_nCurrentCursorPos > MAX_SEG_NUM)
return FALSE;
// zuin symbols
pszTmp = chewing_zuin_String (g_pChewingCtx, &nZuinLen);
if (pszTmp)
{
for (nBufIdx = 0; nBufIdx < nZuinLen; nBufIdx++)
{
memcpy (szWord, pszTmp + nBufIdx * 3, 3);
for (nPhoIdx = 0; nPhoIdx < 3; nPhoIdx++)
if (strstr (g_gcinModMainFuncs.mf_pho_chars[nPhoIdx], szWord) != NULL)
gcin_label_show (szWord, nPhoIdx + chewing_buffer_Len (g_pChewingCtx) + 1);
}
free (pszTmp);
}
// check if the composing is valid or not
if (chewing_buffer_Check (g_pChewingCtx))
{
g_gcinModMainFuncs.mf_hide_selections_win ();
pszTmp = chewing_buffer_String (g_pChewingCtx);
// init cand_no
chewing_cand_Enumerate (g_pChewingCtx);
g_gcinModMainFuncs.mf_clear_sele ();
if (chewing_cand_TotalChoice (g_pChewingCtx))
{
nIdx = 0;
while (chewing_cand_hasNext (g_pChewingCtx))
{
pszChewingCand = chewing_cand_String (g_pChewingCtx);
if (nIdx > chewing_get_candPerPage (g_pChewingCtx) - 1)
break;
gcin_label_cand_show (pszChewingCand, nIdx++);
free (pszChewingCand);
}
}
for (nIdx = 0; nIdx < chewing_buffer_Len (g_pChewingCtx); nIdx++)
{
memcpy (szWord, pszTmp + (nIdx * 3), 3);
gcin_label_show (szWord, nIdx);
}
free (pszTmp);
}
if (chewing_commit_Check (g_pChewingCtx))
{
pszTmp = chewing_commit_String (g_pChewingCtx);
g_gcinModMainFuncs.mf_send_text (pszTmp);
// FIXME: workaround for repeated commit
// it impacts the bEscCleanAllBuf setting!
chewing_handle_Esc (g_pChewingCtx);
free (pszTmp);
}
module_show_win ();
return TRUE;
}