Hi,
I can't really give you any advice on using the X API, but I can tell you that the Win32 and X API are completely different. If you want to support native X apps then you will have to either completely rewrite your Windows program in Linux or you will have to compile the Linux editor as a Winelib app and run it under Wine. I suggest you find a good book on the X API and/or contact the appropriate mailing lists to find out which functions you should use.
Rob
"saravanan" saravananv@erdcitvm.org 02/26/04 11:17 AM >>>
Hai friends,
I successfully ran a script manager(keyboard Manager/driver) developed for windows (using VC++) in Linux using wine. Its working in the wordpad application called using wine.I want to make it work in Linux editors.
The technical details about the working of the keyboard driver is as follows. 1) The keyboard driver is a keyboard hooker program. The keyboard driver will trap all the keystrokes from the keyboard and convert the Ascii value to the appropriate native language Character code. 2) First we have to get the handle of the window/control where the cursor is currently located, for that the GetFocus API is used. 3) Virtual-key code of the key that generated the keystroke message is converted to appropriate another code for making the keyboard Inscript or phonetic and send using Postmessage API.
I have some doubts. Do these APIs written for windows work in linux. In linux , How could i get the handle of the window where the cursor is currently located. What are the changes that i should make in the source code to make it work for linux editors. Looking for your suggessions. Thanks in advance .
Saravanan
______________________________________ Scanned and protected by Email scanner
Hi,
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 ----- Original Message ----- From: Robert Shearman R.J.Shearman@warwick.ac.uk To: saravananv@erdcitvm.org Cc: wine-devel@winehq.org Sent: Thursday, February 26, 2004 8:23 PM Subject: Re: Help needed to get the application work for native linuxeditors
Hi,
I can't really give you any advice on using the X API, but I can tell you that the Win32 and X API are completely different. If you want to support native X apps then you will have to either completely rewrite your Windows program in Linux or you will have to compile the Linux editor as a Winelib app and run it under Wine. I suggest you find a good book on the X API and/or contact the appropriate mailing lists to find out which functions you should use.
Rob
"saravanan" saravananv@erdcitvm.org 02/26/04 11:17 AM >>>
Hai friends,
I successfully ran a script manager(keyboard Manager/driver) developed
for windows (using VC++) in Linux using wine. Its working in the wordpad application called using wine.I want to make it work in Linux editors.
The technical details about the working of the keyboard driver is as
follows.
- The keyboard driver is a keyboard hooker program. The keyboard driver
will trap all the keystrokes from the keyboard and convert the Ascii value to the appropriate native language Character code.
- First we have to get the handle of the window/control where the cursor
is currently located, for that the GetFocus API is used.
- Virtual-key code of the key that generated the keystroke message is
converted to appropriate another code for making the keyboard Inscript or phonetic and send using Postmessage API.
I have some doubts. Do these APIs written for windows work in linux. In
linux , How could i get the handle of the window where the cursor is currently located. What are the changes that i should make in the source code to make it work for linux editors.
Looking for your suggessions. Thanks in advance .
Saravanan
Scanned and protected by Email scanner
______________________________________ Scanned and protected by Email scanner
On Fri, 27 Feb 2004 15:29:30 +0530, saravanan wrote:
Hi,
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.
The man pages are a good start, here is the Xlib manual:
http://www.tronche.com/gui/x/xlib/
thanks -mike
saravanan wrote:
Hi,
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 want. http://x.org, http://xfree86.org, http://freedesktop.org.
Shachar