SDL 내에서 XIM을 이용하여 글자를 입력..

segfault의 이미지

SDL 내에서 XIM을 이용하여 한글을 입력하도록 하고 싶습니다.

라이브러리가 있는지 궁금합니다.

아니면 Xlib을 사용해야 하는지요?

ageldama의 이미지

http://twomix.devolution.com/pipermail/sdl/2004-June/062824.html

http://www.libsdl.org/cgi/cvsweb.cgi/SDL12/BUGS?rev=1.14로부터...

Quote:

Linux:
Wide UNICODE character input (Kanji, etc.) is not yet supported.
It requires handling of keyboard mapping events and using the XIM
input translation extension. I will implement it as requested.
Latin-1 keyboard input works fine.

The keyboard modifiers are not set to the correct state on startup.

The AAlib, GGI, and SVGAlib video drivers are not heavily tested.

직접 구현하셔야 할 것 같습니다;;;

----
The future is here. It's just not widely distributed yet.
- William Gibson

krisna의 이미지

XIM으로 부터 입력을 받고 싶다면, Xlib을 이용해야 합니다.

여기를 참고하십시오:
http://x.holovko.ru/Xlib/chap13.html#13.12.%20Input%20Method%20Overview

개요는 이렇습니다.

XOpenIM()
XCreateIC()

while (run) {
    X{mb|wc}LookupString()
}

XDestroyIC()
XCloseIM()

open/close로 xim 서버와 연결을 열고 닫고, createIC로 각각 입력이 필요한 곳에서 사용하는 input context를 만들어서 관리하는 방식입니다.