Help needed to get the application work for native linuxeditors

Shachar Shemesh wine-devel at
Fri Feb 27 04:38:22 CST 2004

saravanan wrote:

>   Can you tell me where I can get the help on X APIs. I am very new to
>Linux programming.
>I feel that replacing windows GetFocus API & Postmessage API with that of
>Linux APIs might work.
>                                                            Saravanan
Man, I feel old in the face of such enthusiasm.

Hi Saravanan,

Please, the last thing I want is to pour cold water on your enthusiasm. 
However, I'm afraid the project you are contemplating on doing here is 
in the order of magnitude of Wine itself.

You see, the thing about X windows is that they don't have an HWND, for 
the very simple reason that they are not Windows windows (not a generic 
name my %$&!@). As such, you will find that in order to do what you are 
trying to do, you will have to create a HWND representation for windows 
you don't control. It gets worse - X gets events, not messages. You will 
have to create message loops for each window you want to create a Win32 
identity for, and then figure out for each individual message how to 
translate it into the X API space. This is not a trivial job to do, and 
so far as far as I know, Wine has not handled this aspect at all. It 
just didn't seem important enough to anyone.

Wine is currently mostly handling the Windows->X translation, not the 
other way around. This means that Wine is currently figuring out how to 
make the Win32 constructs appear inside the X world. Making the X 
constructs appear in the Win32 world has never came up, as far as I know.

That said, you can search some of the following sites for the docs you 


Shachar Shemesh
Lingnu Open Systems Consulting

More information about the wine-devel mailing list