Re: Wmotor/Xmotor interoperability
- Posted by CChris <christian.cuvier at agriculture.go?v?fr> Aug 13, 2007
- 498 views
Bernie Ryan wrote: > > 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) > Oh, so the main engine "only" provides for a common wrapper system for "any" installed toolkit, but what is presented is the interface for each toolkit (gdi, Xt,...). Got it now. > 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. > Microsoft is well known for stealing small software companies' bright ideas and settling the resulting patent litigations out of court, so... I don't see how you could do that. Would it make sense in an open source environment anyway? CChris > Bernie > > My files in archive: > WMOTOR, XMOTOR, W32ENGIN, MIXEDLIB, EU_ENGIN, WIN32ERU, WIN32API > > Can be downloaded here: > <a > href="http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan">http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan</a>