void QUimHelperManager::checkHelperConnection() { if ( im_uim_fd < 0 ) { im_uim_fd = uim_helper_init_client_fd( QUimHelperManager::helper_disconnect_cb ); if ( im_uim_fd >= 0 ) { notifier = new QSocketNotifier( im_uim_fd, QSocketNotifier::Read ); connect( notifier, SIGNAL( activated( int ) ), this, SLOT( slotStdinActivated() ) ); }
void uim_toolbar_check_helper_connection(GtkWidget *widget) { if (uim_fd < 0) { uim_fd = uim_helper_init_client_fd(helper_disconnect_cb); if (uim_fd > 0) { GIOChannel *channel; channel = g_io_channel_unix_new(uim_fd); read_tag = g_io_add_watch(channel, G_IO_IN | G_IO_HUP | G_IO_ERR, fd_read_cb, (gpointer)widget); g_io_channel_unref(channel); } } }
void UimStateIndicator::checkHelperConnection() { if ( uim_fd < 0 ) { uim_fd = uim_helper_init_client_fd( helper_disconnect_cb ); if ( uim_fd > 0 ) { if ( notifier ) delete notifier; notifier = new QSocketNotifier( uim_fd, QSocketNotifier::Read ); connect( notifier, SIGNAL( activated( int ) ), this, SLOT( slotStdinActivated() ) ); } }
KUimCharDict::KUimCharDict( QWidget *parent ) : QWidget( parent ) { #ifdef Q_WS_X11 // Don't give input focus to this window. XWMHints *wmhints = XGetWMHints( QX11Info::display(), winId() ); if ( !wmhints ) wmhints = XAllocWMHints(); wmhints->flags = InputHint; wmhints->input = False; XSetWMHints( QX11Info::display(), winId(), wmhints ); XFree( wmhints ); #endif setupWidgets(); readConfig(); uim_fd = uim_helper_init_client_fd( 0 ); }
void uimled_uim_connect(void) { if (uimled_uim_fd >= 0) return; uimled_uim_fd = uim_helper_init_client_fd(uimled_uim_disconnect); if (uimled_uim_fd < 0) return; if (!uimled_uim_read_id) { if (pthread_create(&uimled_uim_read_id, NULL, uimled_uim_read_thread, &uimled_uim_fd) == -1) { perror("pthread_create"); return; } } }