Post by DJLinux on Nov 24, 2008 5:36:56 GMT -5
homepage: japi.de (English)
JAPI is a GUI server for Windos, Linux and many more
Download: JapiPugin.zip
Docs on/offline: JAPI documentation
note 1:
i changed only 5 japi functions for Basic4GL
C:
retstring = j_getitem(obj,number,retstring)
retstring = j_gettext(obj,retstring)
retstring = j_getseltext(obj,retstring)
retstring = j_filedialog(obj,title,directory,retstring)
retstring = j_fileselect(obj,title,filter,retstring)
Basic4GL:
Item$ = j_GetItem(Obj,Number)
Text$ = j_GetText(Obj)
SelText$ = j_GetSelText(Obj)
FileName$ = j_FileDialog(Obj,Title$,Directory$)
FileName$ = j_FileSelect(Obj,Title$,Filter$)
note 2:
The JAPI server self is written in JAVA and can run on any computer
it must not the same where your app are running.
It can be any box in your local network or over the internet.
j_start()
will start a new Japi server (if not other are running) local on your box
and your B4GL app can use all the GUI components
but with j_connect(string) you can connect to any running japi server
string can be any host name
j_connect("localhost") ' your box
j_connect("mysuperserver.com") ' a box in your local network or internet
or any IP
j_connect("127.0.0.1") ' your box
j_connect("192.168.0.1") ' a box in your local network or internet
Examples:
C
BASIC
before you port all this examples to Basic4GL
take a look to my short tests in the zip file
i added helpers:
OSMsgBox(Text$,Title$,Flags)
OSExecuteAndWait(Cmd$,Args$)
OSExecuteAndExit(Cmd$,Args$)
OSOpenDialog(Title$,Flags,Filter$)
OSSaveDialog(Title$,Flags,Filter$)
...
Result#=ACOS(Arg#)
Result#=ASIN(Arg#)
...
B4GLWindowShow(True/False)
B4GLWindowOnTop(True/False)
B4GLWindowPosition(x,y)
B4GLWindowSize(w,h)
B4GLWindowResize(x,y)
B4GLWindowSetTitle(Title$)
Title$=B4GLWindowGetTitle()
B4GLWindowGetRGBChannels(x,y,w,h,r(),g(),b())
B4GLWindowSetRGBChannels(x,y,w,h,r(),g(),b())
...
j_Ext_DrawImageOver(Target,Image,x,y, r,g,b)
...