本文整理汇总了C++中GCIN_module_main_functions类的典型用法代码示例。如果您正苦于以下问题:C++ GCIN_module_main_functions类的具体用法?C++ GCIN_module_main_functions怎么用?C++ GCIN_module_main_functions使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了GCIN_module_main_functions类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void
module_hide_win (void)
{
gtk_widget_hide (g_pWinChewing);
g_gcinModMainFuncs.mf_hide_selections_win ();
g_gcinModMainFuncs.mf_hide_win_sym ();
}
示例2: module_feedkey_release
int module_feedkey_release(KeySym xkey, int kbstate)
{
switch (xkey) {
case XK_Shift_L:
case XK_Shift_R:
if (
( (*gmf.mf_tsin_chinese_english_toggle_key == TSIN_CHINESE_ENGLISH_TOGGLE_KEY_Shift) ||
(*gmf.mf_tsin_chinese_english_toggle_key == TSIN_CHINESE_ENGLISH_TOGGLE_KEY_ShiftL
&& xkey == XK_Shift_L) ||
(*gmf.mf_tsin_chinese_english_toggle_key == TSIN_CHINESE_ENGLISH_TOGGLE_KEY_ShiftR
&& xkey == XK_Shift_R))
&& gmf.mf_current_time() - key_press_time < 300000) {
#if WIN32
if (!*gmf.test_mode)
#endif
{
module_flush_input();
key_press_time = 0;
gmf.mf_hide_selections_win();
gmf.mf_tsin_set_eng_ch(!gmf.mf_tsin_pho_mode());
}
return 1;
} else
return 0;
default:
return 0;
}
}
示例3: module_change_font_size
void module_change_font_size()
{
dbg("change_anthy_font_size\n");
GdkColor fg;
gdk_color_parse(*gmf.mf_gcin_win_color_fg, &fg);
#if GTK_CHECK_VERSION(2,91,6)
GdkRGBA rgbfg;
gdk_rgba_parse(&rgbfg, gdk_color_to_string(&fg));
#endif
gmf.mf_change_win_bg(win_anthy);
gmf.mf_change_win_bg(event_box_anthy);
int i;
for(i=0; i < MAX_SEG_N; i++) {
GtkWidget *label = seg[i].label;
gmf.mf_set_label_font_size(label, *gmf.mf_gcin_font_size);
if (*gmf.mf_gcin_win_color_use) {
#if !GTK_CHECK_VERSION(2,91,6)
gtk_widget_modify_fg(label, GTK_STATE_NORMAL, &fg);
#else
gtk_widget_override_color(label, GTK_STATE_FLAG_NORMAL, &rgbfg);
#endif
}
}
}
示例4: module_hide_win
void module_hide_win()
{
if (state == STATE_SELECT) {
state = STATE_CONVERT;
gmf.mf_hide_selections_win();
}
gtk_widget_hide(win_anthy);
gmf.mf_hide_win_sym();
}
示例5: module_show_win
void module_show_win()
{
if (gmf.mf_gcin_edit_display_ap_only())
return;
if (!*gmf.mf_gcin_pop_up_win || !is_empty() || *gmf.mf_force_show ) {
if (!module_win_visible())
gtk_widget_show(win_anthy);
gmf.mf_show_win_sym();
}
}
示例6: mouse_button_callback
static void mouse_button_callback( GtkWidget *widget,GdkEventButton *event, gpointer data)
{
// dbg("mouse_button_callback %d\n", event->button);
switch (event->button) {
case 1:
gmf.mf_toggle_win_sym();
break;
case 2:
gmf.mf_inmd_switch_popup_handler(widget, (GdkEvent *)event);
break;
case 3:
gmf.mf_exec_gcin_setup();
break;
}
}
示例7: disp_input
static void disp_input()
{
int i;
if (gmf.mf_gcin_edit_display_ap_only())
return;
clear_seg_label();
int idx;
for(idx=i=0; i < jpN; i++) {
if (i==cursor) {
disp_keys(idx);
idx+=keysN;
cursor_markup(idx++, idx_hira_kata(jp[i], FALSE));
}
else
gtk_label_set_text(GTK_LABEL(seg[idx++].label), idx_hira_kata(jp[i], FALSE));
}
if (cursor==jpN) {
disp_keys(idx);
idx+=keysN;
cursor_markup(idx, " ");
}
minimize_win_anthy();
}
示例8: module_win_geom
void module_win_geom()
{
if (!win_anthy)
return;
gtk_window_get_position(GTK_WINDOW(win_anthy), gmf.mf_win_x, gmf.mf_win_y);
gmf.mf_get_win_size(win_anthy, gmf.mf_win_xl, gmf.mf_win_yl);
}
示例9: module_win_geom
void module_win_geom()
{
if (!gwin_int)
return;
gtk_window_get_position(GTK_WINDOW(gwin_int), gmf.mf_win_x, gmf.mf_win_y);
gmf.mf_get_win_size(gwin_int, gmf.mf_win_xl, gmf.mf_win_yl);
}
示例10: disp_select
static void disp_select()
{
// puts("disp_select");
gmf.mf_clear_sele();
int endn = pageidx + gmf.mf_phkbm->selkeyN;
if (endn > seg[cursor].selN)
endn = seg[cursor].selN;
int i;
for(i=pageidx; i<endn; i++) {
char buf[256];
anthy_get_segment(ac, cursor, i, buf, sizeof(buf));
// printf("%d %s\n", i, buf);
gmf.mf_set_sele_text(seg[cursor].selN, i - pageidx, buf, -1);
}
if (pageidx)
gmf.mf_disp_arrow_up();
if (i < seg[cursor].selN)
gmf.mf_disp_arrow_down();
int x,y;
gmf.mf_get_widget_xy(win_anthy, seg[cursor].label, &x, &y);
// printf("%x cusor %d %d\n", win_anthy, cursor, x);
y = gmf.mf_gcin_edit_display_ap_only()?
*gmf.mf_win_y:*gmf.mf_win_y+*gmf.mf_win_yl;
gmf.mf_disp_selections(x, y);
}
示例11: 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();
}
示例12: 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;
}
示例13: module_flush_input
int module_flush_input()
{
gmf.mf_hide_selections_win();
int val;
if (state==STATE_CONVERT) {
val = TRUE;
send_seg();
} else {
val = send_jp();
}
// dbg("cursor %d\n", cursor);
clear_all();
return val;
}
示例14: select_idx
static gboolean select_idx(int c)
{
int idx = pageidx + c;
if (idx < seg[cursor].selN) {
char buf[256];
anthy_get_segment(ac, cursor, idx, buf, sizeof(buf));
gtk_label_set_text(GTK_LABEL(seg[cursor].label), buf);
seg[cursor].selidx = idx;
state = STATE_CONVERT;
gmf.mf_hide_selections_win();
return (segN==1);
}
return FALSE;
}
示例15: 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;
}