Hi Eliot,
Thank you. Meanwhile I have tried to use only pointers to structs by writing some C code.
I confirm that in Pharo you can load FFI and OldAlien in the ConfigurationBrowser.
Yet it seems both FFI and Alien versions in the ConfigurationBrowser are behind the squeak repositories.
I did not try if the new versions worked.
I have posted some time ago an example for X11 windows on Linux, and I never got an answer why it was failing.
It was the following
testGetOurWindowLocation
"self new testGetOurWindowLocation"
| display ourWindow aParent anX anY aWidth aHeight aBorderWidth aDepth |
display := X11Display XOpenDisplay: nil.
ourWindow := display ourWindow.
(Alien lookup: 'XGetGeometry' inLibrary: 'X11')
primFFICallResult: nil
withArguments:
{display.
ourWindow xid.
(aParent := Alien new: 4).
(anX := Alien new: 4).
(anY := Alien new: 4).
(aWidth := Alien new: 4).
(aHeight := Alien new: 4).
(aBorderWidth := Alien new: 4).
(aDepth := Alien new: 4)}.
(anX unsignedLongAt: 1) inspect.
Has anybody looked at Wayland (replacement of X11) on Linux ?
Annick