Re: Wmotor/Xmotor interoperability
- Posted by Bernie Ryan <xotron at bluef?o?.com> Aug 13, 2007
- 498 views
CChris wrote: > > > If I write an application for Wmotor and get it working under Windows, would > the corresponding set of source files run properly under Unix with Xmotor > installed? > If not, is there a straightforward process to translate code intended for > Wmotor > so as to execute properly using Xmotor? > > CChris First the version of xmotor/wmotor in the archive is shrouded and will only run in eu version 2.5 I have been using an unshrouded version with eu 3.1.x and it also works. The main library ( motor.eu ) is the same one in both wmotor and xmotor. The only difference between wmotor and xmotor is the demos and the include files. xmotor -- is used to write programs in x, xt, athena, open-motif, presently I am playing around with using it with GTK. wmotor -- is used for writing win32 code. To write a cross-platform program you would need to use motor.eu to create a wrapper library to use win32 code on windows and (motif or athena) to emulate the same win32 code on Linux. The advanage of motor.eu library is the ease of wrapping, shared libraries, structures, even varible argument parameters, and other Linux support code. To use some functions in windows: library("kernel32.dll") declare("ConnectNamedPipe",2,s) declare("ContinueDebugEvent",3,s) declare("ConvertDefaultLocale",1,u) declare("ConvertThreadToFiber",1,u) declare("CopyFileA",3,s) To use some functions in Linux using XT: library("libXt.so") declare("XtAppAddWorkProc",3,u) declare("XtAppAddConverter",6,n) declare("XtScreenDatabase",1,u) declare("XtAppSetSelectionTimeout",2,n) declare("XtVaGetApplicationResources","..",n) <<-- Note a variable argument parameter . declare("XtIsObject",1,u) I am also contemplating adding in line Assembler support in euphoria functions. I have thought about releasing unshrouded code to the archive but how do I protect my original ideas from others claiming to have them as their own after I have invested all my hard work to discover my ideas. Bernie My files in archive: WMOTOR, XMOTOR, W32ENGIN, MIXEDLIB, EU_ENGIN, WIN32ERU, WIN32API Can be downloaded here: http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan