Text Input Box with Xlib

Eirik Byrkjeflot Anonsen eirik at opera.com
Sun Feb 3 21:56:55 PST 2013


Gabriel Duarte <confusosk8 at gmail.com> writes:

> Hello!
>
> No, you didn't get the ideia. I do no want to use a toolkit, I'm
> writing a toolkit. It's an exercise and for fun, not something
> professional like GTK+, Qt or TK. I have already used GTK+ and Qt,
> even FLTK for my projects, so using them is not the big deal. I just
> asked here for someone who had some experience building this kind of
> stuff and because I'm not so experienced to Xlib.
>
> Build a text input box is challenging and because of this I asked for
> some advices of how to write it, not use an already done from some
> other toolkit.

If you only want to handle the simple stuff and isn't going to use this
for anything "useful", I guess it won't hurt much :)

For getting text input from the user, you probably want to look at XIM:

http://www.x.org/releases/X11R7.6/doc/libX11/specs/XIM/xim.html

There are plenty of gotchas along the way to a working implementation,
and in the end there will be issues you quite simply can't fix.  Mostly
because very few applications use XIM these days, so the XIM backends
tend to be more buggy than the Gtk and Qt backends.

eirik


More information about the xorg mailing list