Coder Social home page Coder Social logo

xcb-imdkit's Introduction

xcb-imdkit

xcb-imdkit is an implementation of xim protocol in xcb, comparing with the implementation of IMDkit with Xlib, and xim inside Xlib, it has less memory foot print, better performance, and safer on malformed client.

And not to say it's all asynchronous and it works with xcb.

Though, it doesn't have complete protocol support, since some part of the protocol is never used. Those parts include:

  • XIM_EXT_SET_EVENT_MASK (no im actually use this)
  • XIM_EXT_FORWARD_EVENT (it's not any better than forward event)
  • XIM_AUTH (IMDkit doesn't implement this, Xlib only has stub, so still no implementation.)
  • XIM_STR_CONVERSION (Synchronous protocol, but not used anywhere)
  • Locale check on client side, this is actually very evil for input method.
  • Only X transport is supported.

To build this project, you need: libxcb, xcb-util, xcb-util-keysym

Commands: mkdir build cd build cmake -DCMAKE_INSTALL_PREFIX=/usr .. make sudo make install

xcb-imdkit is released under LGPLv2+, and it is using uthash internally, which is released under BSD-license.

xcb-imdkit's People

Contributors

wengxt avatar yuyichao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xcb-imdkit's Issues

Use system uthash header when possible

Many distributions provides uthash development packages, like Debian and all its derivatives, Arch Linux and its derivatives and Fedora. Please consider using external uthash header first and fallback to embedded uthash.h file if that is not found.

Thanks!

Using xcb-imdkit (e.g. test_client) with ibus

I'm hoping to use xcb-imdkit to enable XIM support for an XCB program. I have tried to connect to the running ibus server on my machine by adjusting the test_client program to do:

xcb_xim_create(c, screen_default_nbr, "@im=ibus");

This doesn't seem to work, all I get is:

-- XIM_OPEN_REPLY
-- XIM_QUERY_EXTENSION_REPLY

And then xcb_xim_filter_event doesn't return true again.
Should it be possible to connect test_client to ibus in this way?

Partial Input?

First of all: Thank you very much for developing this!

Now my problem: How to obtain partial input before XIM_COMMIT is sent? The demo_client only shows XIM_FORWARD_EVENT and XIM_COMMIT after initialization. Is it somehow possible to get the text currently displayed by the IME before it is committed?

Also, it took me quite a while to figure out how to update the SpotLocation, it's probably a good idea to add this to the demo_client.

Close IME on termination of program.

So far I have not been able to close the IME once the program exits. Running the demo client and then closing its window just keeps the IME open (if it has been opened previously that is). Is this a bug, is there a function I need to call?

What is the expected output for test_client / test_server?

Hi there, I'm new to XCB/XIM and I'm trying to create a XCB window application with XIM supporting.
I have tried running test_client and test_server (starting from running server, with XIM_DEBUG=1) at the same time, which gave me:

> ./test/test_client
-- XIM_REGISTER_TRIGGERKEYS
-- XIM_OPEN_REPLY
-- XIM_QUERY_EXTENSION_REPLY
-- XIM_ENCODING_NEGOTIATION_REPLY
-- XIM_GET_IM_VALUES_REPLY
-- XIM_CREATE_IC_REPLY
icid:1
-- XIM_SET_IC_VALUES_REPLY
set ic 1 done
-- XIM_GET_IC_VALUES_REPLY
get ic 1 done
-- XIM_FORWARD_EVENT
Key press Keycode 65, State 4
> ./test/test_server
winid:31457280
requestor:52428800
buf:@transport=X/
-- XIM_CONNECT
-- XIM_OPEN
-- XIM_QUERY_EXTENSION
-- XIM_ENCODING_NEGOTIATION
-- XIM_GET_IM_VALUES
-- XIM_CREATE_IC
-- XIM_SET_IC_VALUES
-- XIM_GET_IC_VALUES
-- XIM_FORWARD_EVENT

I'm assuming test_client should show me more events, but it didn't look like that.

Report negotiated encoding

In server implementation, Encoding negotiation is done by _xcb_im_handle_encoding_negotiation. But it does not tell users of the library what encoding is decided to use.

Some clients send UTF-8 as a supported encoding and if so, servers can use that encoding other than COMPOUND_TEXT or Portable Character Encoding.

So I would like to get the negotiated encoding in some way. For example, callback with the reply_frame.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.