http://home.pchome.com.tw/cool/sdl_im/
Where can I get necessary files?
you can get SDL1.2.8 from: http://www.libsdl.org
you can get the patch for SDL1.2.8 from : patch20041227.tar.gz
How to merge this patch?
If you already download SDL1.2.8 and the patch file(for SDL1.2.8), you
can
uncompress and copy the patch content to replace the same name SDL
files.
If you use Visual C++ in Win32, add ENABLE_IM_EVENT define to your
Makefile,
and link Imm32.lib. If you use automake in Linux, just check
“--enable-im-event” symbol(default=yes) when you command
“./configure”.
What are platforms supported?
This patch supported IME(Input Method Editor) in Win32 and XIM(X Input
Method) in Linux. It also supported to flip IME/XIM window in fullscreen
mode.
How to use these new functions?
First, ensure your IM at least supporting one of three modes: Root,
OverTheSpot, OnTheSpot.
And then, read following manual:
SDL_imvalue
SDL_SetIMValues
SDL_GetIMValues
SDL_SetIMPosition
SDL_FlushIMString
SDL_GetIMInfo
If you have any suggestion, question, or problem, please mail to me.
Why do you consider to do this patch?
I have two reasons to do this:
1.If you want to develop a online-game and want to distribute it to the
whole world especially to Asia, IM support is necessary.
2.There are many good GUI libraries based on SDL. If SDL support IM,
that
means we can not only choose MFC, Qt or GTK+ for your window
application,
but also have many others GUI libraries to use. Feel free to choose
your
choice is the greatest thing and has very fun.
Can I join to patch SDL?
Of course! It is NOT very hard to patch, because SDL's structure is
clear
and object-oriented. And what technology you have to know is just
knowing
how to create a window and let this main window receive events in your
platform. I will be very gladly if you have interest to make SDL
supporting
IM.
Besides, I hope somebody can instead of me to keep on this project until
merged to SDL Official Release, because I want to be a traditional
Chinese
medical science, have many books to study, and have no much time to
maintain
it.
Do you need help?
Yes! I need your help:
1. In Win32 DirectDraw window, although I had successfully flip IME
window
in fullscreen mode, the status window still can not be flipped. I
don't know
how to do this, If you know, please tell me.
2. This patch doesn't have many test. If you can test it by using
Japanese,
Korean or any other language using multi-byte characters, I will
greatly
appreciate your help.
3. If you have some window programming experience in Mac (Classic),
MacOS X,
BeOS, FreeBSD or any other platform that I don't have. Please join
me to
implement IM support together! :-)
What are the important points to patch?
The first, the reason SDL don't support IM now is that SDL have held up
the
events translation to IM server. In order to translate events to IM
server,
you have to find out where the events was held up:
1. In Win32(DirectX), in file “src/video/windx5/SDL_dx5events.c”, at
function DX5_CheckInput, add TranslateMessage function in the first
event
loop.
2. In Linux(X11), in file “src/video/x11/SDL_x11events.c”, at function
X11_DispatchEvent, add XfilterEvent function after XNextEvent.
Second, to understand the structure of SDL video event is important. All
of
the new function are the virtual members function of interface
SDL_VideoDevice(see “src/video/SDL_sysvideo.h”). To implement any
other
platform, all you have to do is just to implement the virtual function.
For
example, the function X11_FlushIMString in
“src/video/x11/SDL_x11events_c.h” and
“src/video/x11/SDL_x11events.c”
is the implement of virtual member “SDL_VideoDevice::FlushIMString”.
[To Be Continued..]
Page changes log:
2004/12/27: This page/patch is public. :-)
_______________________________________________
Tuxpaint-dev mailing list
[email protected]
http://tux4kids.net/mailman/listinfo/tuxpaint-dev