Linux X11 Framework (X Windows System for FreeBASIC)

Linux specific questions.
D.J.Peters
Posts: 8586
Joined: May 28, 2005 3:28
Contact:

Linux X11 Framework (X Windows System for FreeBASIC)

Post by D.J.Peters »

I have ported over 600 protoytypes as an "x11.bi" FreeBASIC include file.
download: fbX11.zip

Attention
I have many tested not all 600.

Please report any "X11.bi" releated problems here.

Thanks Joshy
Last edited by D.J.Peters on Jul 19, 2011 1:43, edited 5 times in total.
v1ctor
Site Admin
Posts: 3804
Joined: May 27, 2005 8:08
Location: SP / Bra[s]il
Contact:

Post by v1ctor »

Are you doing the translation by hand? Let SWIG do it, the headers will be translated in seconds.

Btw, the "convention" now is to use "ByVal SomeName As SomeType Ptr" and not "ByRef SomeName As SomeType" in function prototypes. Byref params make pointers too error prone to work with and "@sometype" makes more sense than "byval someptr" and you will be sure no different pointer types are been passed - the byval modifier turns off any checking.
jcohen
Posts: 85
Joined: Jun 20, 2005 18:01

Great work

Post by jcohen »

Great work and thanks alot DJ Peters
D.J.Peters
Posts: 8586
Joined: May 28, 2005 3:28
Contact:

Post by D.J.Peters »

v1ctor wrote:Are you doing the translation by hand? Let SWIG do it, the headers will be translated in seconds...
Yes it is made by hand from the include files from my own Linux Basic Compiler GAMEBASM.

I have make an try with the swig tool on a windows partition but x.h xlib.h and xutil.h is not independet and many macros are wrong with this tools (or my wrong usage of swig) and all comments and useful hints / infos are gone with swig.

I use the "x11.bi" file in the next X11 FreeBASIC lessons and all wrong declares will be fixed.
After it you can put it to the FreeBASIC package if you will.

Joshy

Curently only a handful declares are litle bugy.
Last edited by D.J.Peters on Apr 19, 2007 22:11, edited 1 time in total.
mjs
Site Admin
Posts: 842
Joined: Jun 16, 2005 19:50
Location: Germany

Post by mjs »

Great work.

Regards,
Mark
Mike Chambers
Posts: 85
Joined: Jun 18, 2006 19:48

Post by Mike Chambers »

this looks awesome, but the link to x11.bi is bad!! DJ Peters could you put it up again and give the new link? i really want to try this out.
Zippy
Posts: 1295
Joined: Feb 10, 2006 18:05

Post by Zippy »

His server URL changed slightly, use:

http://www.alice-dsl.net/d.j.peters/libs/X11.bi

-tested, working.
D.J.Peters
Posts: 8586
Joined: May 28, 2005 3:28
Contact:

Post by D.J.Peters »

my ISP changed something
now all my links need www in front
i don't know why it is.

Joshy
KristopherWindsor
Posts: 2428
Joined: Jul 19, 2006 19:17
Location: Sunnyvale, CA
Contact:

Post by KristopherWindsor »

D.J.Peters wrote:my ISP changed something
now all my links need www in front
i don't know why it is.
Are you using any .htaccess files? I'm forcing the "www" to disappear with this:

Code: Select all

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^kristopherw.us$ [NC]
RewriteRule ^(.*)$ http://kristopherw.us/$1 [L,R=301]
But that's probably not the problem... complain to your ISP. ;P
deepthought
Posts: 42
Joined: Aug 03, 2009 22:42

Post by deepthought »

Houston, we have a problem.http://www.freebasic.net/forum/viewtopi ... 27#152827
any ideas?
Rens
Posts: 256
Joined: Jul 06, 2005 21:09

Post by Rens »

Hi D.J.Peters,
Please report any "X11.bi" releated problems here.
Well, I am having some problems with x11.bi under KNOPPIX.
FBC version 0.22.0 (05-06-2011) for linux (target:linux)

Getting some errors when i include your x11.bi in a simple testing program:

#include "/KNOPPIX-DATA/usr/include/freebasic/X11.bi"
?"test"
sleep
end

/KNOPPIX-DATA/usr/include/freebasic/X11.bi(2888) error 56: Illegal specification, at parameter 13 ()) of XGetWindowProperty() in ') as integer'
/KNOPPIX-DATA/usr/include/freebasic/X11.bi(3523) error 56: Illegal specification, at parameter 3 (colord) of XStoreColors() in 'byval colord as XCOLORptr, _'
/KNOPPIX-DATA/usr/include/freebasic/X11.bi(3949) error 7: Expected ')', found 'byval' in 'byval name_len as integer , _'

Can you help me with this one?

Thanx
redcrab
Posts: 623
Joined: Feb 07, 2006 15:29
Location: France / Luxemburg
Contact:

Post by redcrab »

Thanks D.J. That's a nice works,
as serious as the FBSOUND,

German credibility ;)

Thanks for your great works
dkl
Site Admin
Posts: 3235
Joined: Jul 28, 2005 14:45
Location: Germany

Post by dkl »

Rens, there appears to be an extra comma at X11.bi(2887), a missing comma at X11.bi(3948) and at X11.bi(3523) it should be 'XCOLOR ptr' instead of 'XCOLORptr'.

After these fixes it seems to work with FB 0.22 despite being from 2005. There also are some X11 headers at http://code.google.com/p/freebasic-head ... Finc%2FX11, though I don't know whether there are differences.
sir_mud
Posts: 1401
Joined: Jul 29, 2006 3:00
Location: US
Contact:

Post by sir_mud »

The difference is the x11 headers there are machine translated only. I haven't had the chance to go through them to correct anything or format them how they should be. The advantage though is you don't have a huge include file slowing down compilation and errors in the headers will be easy to isolate. If anyone finds errors in them they can post it on the issue page there (req google acct) or can shoot me an email using the form at http://mud.owlbox.net
Roland Chastain
Posts: 992
Joined: Nov 24, 2011 19:49
Location: France
Contact:

Re: Linux X11 Framework (X Windows System for FreeBASIC)

Post by Roland Chastain »

Hello Joshy!

Is is still possible to get your X11 package?

Regards.

Roland
Post Reply