Example #1
0
void disp_char(int index, char *ch)
{
  if (gcin_edit_display_ap_only())
    return;
  if (!top_bin)
    return;

//  dbg("disp_char %d %s\n", index, ch);
  create_char(index);
  GtkWidget *label = chars[index].label;

  if (label) {
    if (ch[0]==' ' && ch[1]==' ')
      set_label_space(label);
    else {
      gtk_label_set_text(GTK_LABEL(label), ch);
    }
  }

#if GTK_CHECK_VERSION(3,0,0)
    // bug in gtk3
    set_label_font_size(label, gcin_font_size);
#endif

  get_win0_geom();
  if (win_x + win_xl >= dpy_xl)
    move_win0(dpy_xl - win_xl, win_y);

  gtk_widget_show_all(chars[index].vbox);
}
Example #2
0
void disp_tsin_select(int index)
{
    int x,y;

    if (index < 0)
        return;

//  dbg("hime_edit_display_ap_only() %d\n", hime_edit_display_ap_only());

    if (hime_edit_display_ap_only()) {
        getRootXY(current_CS->client_win, current_CS->spot_location.x, current_CS->spot_location.y, &x, &y);
    } else {
#if 1
        int i;
        // bug in GTK, widget position is wrong, repeat util find one
        for(i=index; i>=0; i--) {
            gtk_widget_show_now(chars[i].label);
            gtk_widget_show(chars[i].vbox);
            gtk_main_iteration_do(FALSE);

            int tx = get_widget_xy(gwin0, chars[i].vbox, &x, &y);

            if (tx>=0)
                break;
        }
#else
        get_widget_xy(gwin0, chars[index].vbox, &x, &y);
#endif
        get_win0_geom();
    }
    disp_selections(x, y);
}
Example #3
0
void disp_char(int index, char *ch)
{
    if (hime_edit_display_ap_only())
        return;
    if (!top_bin)
        return;

//  dbg("disp_char %d %s\n", index, ch);
    create_char(index);
    GtkWidget *label = chars[index].label;

    if (label) {
        if (ch[0]==' ' && ch[1]==' ')
            set_label_space(label);
        else {
            gtk_label_set_text(GTK_LABEL(label), ch);
        }
    }

    get_win0_geom();
    if (win_x + win_xl >= dpy_xl)
        move_win0(dpy_xl - win_xl, win_y);

    gtk_widget_show_all(chars[index].vbox);
}
Example #4
0
File: eve.cpp Project: gogonkt/gcin
void update_active_in_win_geom()
{
//  dbg("update_active_in_win_geom\n");
  switch (current_method_type()) {
    case method_type_PHO:
      get_win_pho_geom();
      break;
#if USE_TSIN
    case method_type_TSIN:
      get_win0_geom();
      break;
#endif
    case method_type_INT_CODE:
	  get_win_int_geom();
      break;
#if USE_ANTHY
    case method_type_ANTHY:
      get_win_anthy_geom();
      break;
#endif
    default:
      get_win_gtab_geom();
      break;
  }
}
Example #5
0
void update_active_in_win_geom()
{
//  dbg("update_active_in_win_geom\n");
  switch (current_method_type()) {
    case method_type_PHO:
      get_win_pho_geom();
      break;
#if USE_TSIN
    case method_type_TSIN:
      get_win0_geom();
      break;
#endif
    case method_type_MODULE:
      module_cb()->module_get_win_geom();
      break;
    default:
      get_win_gtab_geom();
      break;
  }
}
Example #6
0
File: eve.c Project: Tetralet/hime
void update_active_in_win_geom()
{
  HIME_module_callback_functions *mod_cbs;
//  dbg("update_active_in_win_geom\n");
  switch (current_method_type()) {
    case method_type_PHO:
      get_win_pho_geom();
      break;
#if USE_TSIN
    case method_type_TSIN:
      get_win0_geom();
      break;
#endif
    case method_type_MODULE:
      mod_cbs = module_cb();
      if(mod_cbs && mod_cbs->module_get_win_geom)
        mod_cbs->module_get_win_geom();
      break;
    default:
      get_win_gtab_geom();
      break;
  }
}