예제 #1
0
QHIMEInputContext::QHIMEInputContext()
    : QInputContext(), hime_ch(NULL)
{
//    printf("create_xim\n");
    Display *appDpy = QPaintDevice::x11AppDisplay();

    if (!hime_ch) {
      if (!(hime_ch = hime_im_client_open(appDpy)))
        perror("cannot open hime_ch");
        return;
    }
}
예제 #2
0
QHimePlatformInputContext::QHimePlatformInputContext()
{
    dbg("QHimePlatformInputContext::QHimePlatformInputContext() \n");
    QPlatformNativeInterface *native = QGuiApplication::platformNativeInterface();
    if(!native)
        return;
    Display *display = static_cast<Display *>(native->nativeResourceForWindow("display", NULL));	

    if (!(hime_ch = hime_im_client_open(display))) {
        perror("cannot open hime_ch");
        dbg("hime_im_client_open error\n");
        return;
    }

    dbg("QHimePlatformInputContext succ\n");
}
예제 #3
0
파일: hime-send.c 프로젝트: Explorer09/hime
void send_hime_message(Display *dpy, char *s)
{
  HIME_client_handle *handle = hime_im_client_open(dpy);
  hime_im_client_message(handle, s);
  hime_im_client_close(handle);
}