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 show_win0()
{
#if _DEBUG && 1
    dbg("show_win0 pop:%d in:%d for:%d \n", hime_pop_up_win, tsin_has_input(), force_show);
#endif
    create_win0();
    create_win0_gui();

    if (hime_pop_up_win && !tsin_has_input() && !force_show) {
//    dbg("show ret\n");
        return;
    }

#if 0
    if (!GTK_WIDGET_VISIBLE(gwin0))
#endif
    {
//    dbg("gtk_widget_show %x\n", gwin0);
        move_win0(win_x, win_y);
        gtk_widget_show(gwin0);
    }

    show_win_sym();

    if (current_CS->b_raise_window)
    {
        gtk_window_present(GTK_WINDOW(gwin0));
        raise_tsin_selection_win();
    }
}
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
void show_win0()
{
#if WIN32
  if (test_mode)
    return;
#endif

#if _DEBUG && 1
	dbg("show_win0 pop:%d in:%d for:%d win_xy:%d,%d\n", gcin_pop_up_win, tsin_has_input(), force_show, win_x, win_y);
#endif
  create_win0();
  create_win0_gui();

  if (gcin_pop_up_win && !tsin_has_input() && !force_show) {
//    dbg("show ret\n");
    return;
  }

#if WIN32
  compact_win0();
#endif

#if UNIX && 0
  if (!GTK_WIDGET_VISIBLE(gwin0))
#endif
  {
//    dbg("gtk_widget_show %x\n", gwin0);
#if UNIX
    move_win0(win_x, win_y);
    gtk_widget_show(gwin0);
#else
	move_win0(win_x, win_y);
    gtk_widget_show(gwin0);
//    move_win0(win_x, win_y);
#endif
  }

  show_win_sym();

#if UNIX
  if (current_CS->b_raise_window)
#endif
  {
    gtk_window_present(GTK_WINDOW(gwin0));
    raise_tsin_selection_win();
  }
}
Example #5
0
File: eve.cpp Project: gogonkt/gcin
void move_in_win(ClientState *cs, int x, int y)
{
  check_CS();

  if (current_CS && current_CS->fixed_pos) {
    x = current_CS->fixed_x;
    y = current_CS->fixed_y;
  } else
  if (gcin_input_style == InputStyleRoot) {
    x = gcin_root_x;
    y = gcin_root_y;
  }

#if 0
  dbg("move_in_win %d %d\n",x, y);
#endif
#if 1
  if (current_in_win_x == x && current_in_win_y == y)
    return;
#endif
  current_in_win_x = x ; current_in_win_y = y;

  switch (current_method_type()) {
    case method_type_PHO:
      move_win_pho(x, y);
      break;
#if USE_TSIN
    case method_type_TSIN:
      move_win0(x, y);
      break;
#endif
    case method_type_INT_CODE:
      move_win_int(x, y);
      break;
#if USE_ANTHY
    case method_type_ANTHY:
      move_win_anthy(x, y);
      break;
#endif
    default:
      if (!cs->in_method)
        return;
      move_win_gtab(x, y);
  }
}
Example #6
0
void move_in_win(ClientState *cs, int x, int y)
{
  check_CS();

  if (current_CS && current_CS->fixed_pos) {
    x = current_CS->fixed_x;
    y = current_CS->fixed_y;
  } else
  if (hime_input_style == InputStyleRoot) {
    x = hime_root_x;
    y = hime_root_y;
  }

#if 0
  dbg("move_in_win %d %d\n",x, y);
#endif
#if 0
  if (current_in_win_x == x && current_in_win_y == y)
    return;
#endif
  current_in_win_x = x ; current_in_win_y = y;

  switch (current_method_type()) {
    case method_type_PHO:
      move_win_pho(x, y);
      break;
#if USE_TSIN
    case method_type_TSIN:
      move_win0(x, y);
      break;
#endif
    case method_type_MODULE:
      if (inmd[cs->in_method].mod_cb_funcs)
        module_cb1(cs)->module_move_win(x, y);
      break;
    default:
      if (!cs->in_method)
        return;
      move_win_gtab(x, y);
  }
}