XIM and XIC tutorials - Xwindows

This is a discussion on XIM and XIC tutorials - Xwindows ; Hi. I try to understand how the X works (by writing a small experimental widget toolkit). But I miss documentation for some X functions, namely XIM and XIC stuff. The man pages distributed with XFree86 contain descriptions of the functions. ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: XIM and XIC tutorials

  1. XIM and XIC tutorials

    Hi.

    I try to understand how the X works (by writing a small experimental
    widget toolkit).

    But I miss documentation for some X functions, namely XIM and XIC
    stuff. The man pages distributed with XFree86 contain descriptions of
    the functions. Unfortunately some functions of XIM/XIC take varargs
    and its poorly documented what args are expected (or maybe I'm too
    stupid to find it :-).

    Where can I find some more info about? Can anyone post here some links
    to tutorials and/or introduction into the problematics, please?

    Thanks.
    Mity

    P.S. I even don't know the status of XIM and XIC: Are they X
    extensions or are they integral part of X API? Some paper I read
    referred to it as X extensions but the functions are defined in
    . And manual I saw (http://tronche.com/gui/x/xlib/) does
    not include these functions at all.

  2. Re: XIM and XIC tutorials

    Mity wrote:
    >Hi.
    >
    >I try to understand how the X works (by writing a small experimental
    >widget toolkit).
    >
    >But I miss documentation for some X functions, namely XIM and XIC
    >stuff. The man pages distributed with XFree86 contain descriptions of
    >the functions. Unfortunately some functions of XIM/XIC take varargs
    >and its poorly documented what args are expected (or maybe I'm too
    >stupid to find it :-).
    >
    >Where can I find some more info about? Can anyone post here some links
    >to tutorials and/or introduction into the problematics, please?
    >
    >Thanks.
    >Mity
    >
    >P.S. I even don't know the status of XIM and XIC: Are they X
    >extensions or are they integral part of X API? Some paper I read
    >referred to it as X extensions but the functions are defined in
    >. And manual I saw (http://tronche.com/gui/x/xlib/) does
    >not include these functions at all.


    Are you actually trying to support Asian-language input? If not,
    you don't need these functions.

    Input methods are described in the Xlib documentation; they appear
    to be part of core X.


  3. Re: XIM and XIC tutorials

    kbr@pangea.ca (Kip Rugger) wrote in message news:...
    > Mity wrote:
    > >Hi.
    > >
    > >I try to understand how the X works (by writing a small experimental
    > >widget toolkit).
    > >
    > >But I miss documentation for some X functions, namely XIM and XIC
    > >stuff. The man pages distributed with XFree86 contain descriptions of
    > >the functions. Unfortunately some functions of XIM/XIC take varargs
    > >and its poorly documented what args are expected (or maybe I'm too
    > >stupid to find it :-).
    > >
    > >Where can I find some more info about? Can anyone post here some links
    > >to tutorials and/or introduction into the problematics, please?
    > >
    > >Thanks.
    > >Mity
    > >
    > >P.S. I even don't know the status of XIM and XIC: Are they X
    > >extensions or are they integral part of X API? Some paper I read
    > >referred to it as X extensions but the functions are defined in
    > >. And manual I saw (http://tronche.com/gui/x/xlib/) does
    > >not include these functions at all.

    >
    > Are you actually trying to support Asian-language input? If not,
    > you don't need these functions.
    >
    > Input methods are described in the Xlib documentation; they appear
    > to be part of core X.


    No, I don't need to support asian languages (at least for the
    beginning :-).

    What I try to do is to handle the keyboard input with XLookupString().
    But the XLookupString() translates keyboard events to ISO Latin-1
    characters only (at least man page for the function claims it). I'm
    Czech and Czech uses some accented characters which are not included
    in ISO Latin-1.

    I found that there are more complex functions like XmbLookupString(),
    XwcLookupString() and Xutf8LookupString() but all these take the input
    context as their first argument. So I would like to know how to
    manipulate the IC correctly.

    Or maybe I missed some other portable way how to translate KeyPress
    and KeyRelease to characters regarding some other charset then ISO
    Latin-1?

    In any case thanks for your answer.
    Mity

  4. Re: XIM and XIC tutorials

    Mity wrote:
    >> Are you actually trying to support Asian-language input? If not,
    >> you don't need these functions.
    >>
    >> Input methods are described in the Xlib documentation; they appear
    >> to be part of core X.

    >
    >No, I don't need to support asian languages (at least for the
    >beginning :-).
    >
    >What I try to do is to handle the keyboard input with XLookupString().
    >But the XLookupString() translates keyboard events to ISO Latin-1
    >characters only (at least man page for the function claims it). I'm
    >Czech and Czech uses some accented characters which are not included
    >in ISO Latin-1.
    >
    >I found that there are more complex functions like XmbLookupString(),
    >XwcLookupString() and Xutf8LookupString() but all these take the input
    >context as their first argument. So I would like to know how to
    >manipulate the IC correctly.
    >
    >Or maybe I missed some other portable way how to translate KeyPress
    >and KeyRelease to characters regarding some other charset then ISO
    >Latin-1?
    >
    >In any case thanks for your answer.
    >Mity


    There are three types of applications:

    1) Those that work in the 'C' locale (the default);

    2) Those that use the LANG= environment variable to operate in a
    specific, 8-bit character set; and

    3) Those that are fully internationalized and use UCS/UTF characters.

    I suspect that you are looking for type 2 with the ISO 8859-2 character set.
    This is relatively easy.

    If you are using Xt, then you only need to call XtSetLanguageProc(0, 0, 0)
    as the first Xt call in your program; then magically you will have dead
    keys or compose functionality just as you have in, say, Xterm.

    If you are not using Xt, simply do what XtSetLanguageProc describes in its
    man page.

    In any event, XLookupString is the function you use for event->character
    conversions. You also would use a different font for output, but other
    than these changes you are operating pretty much as you would in the
    'C' locale.


  5. Re: XIM and XIC tutorials

    Great! This should help me. Thank you very much.

    Mity

+ Reply to Thread