what is the xid? The x11 thingy?
in that case you will need to implement a method on GdkWindow (not GtkWindow):
https://docs.gtk.org/gdk3-x11/method.X11Window.get_xid.html
then you do something like:
GRunLoop defer: [ xid := myGtkWindow gdkWindow xid ].
but this is tied to the x11 system and linux is going out really fast of it (is 
being replaced by Wayland).
I can bet there has to be a better way to connect it to a window.

Esteban
On Jul 12 2023, at 12:05 am, Jupiter Jones <jupiter.jo...@mail.com> wrote:
> Hi Estiban,
>
> Thanks for that - works beautifully :)
>
> The next challenge was to let VLC know the xid for the gtk window, but of 
> course the one function that answers the xid for gtk appears to be in yet 
> another library (gtk-x11) which, of course, has no binding for Pharo as yet :)
>
> As I’m new to FFI (as is my offsider), this will take a bit of learning and 
> fumbling, so if someone knows it’s going to be a fools errand (ie. this isn’t 
> likely to resolve the link between VLC and gtk) please let me know.
>
> Otherwise, we’ll dive in.
>
> Cheers,
>
> J
>
> > On 10 Jul 2023, at 9:50 pm, Esteban Lorenzano <esteba...@netc.eu> wrote:
> > Hi,
> > Heh, there were several problems around :)
> > 1) Indeed, Ubuntu naming conventions were a problem for the gtk bindings. I 
> > updated them and now it should not be a problem (but you need to pull them 
> > again).
> > 2) I assume you are using Pharo Launcher (or zeroconf directly). And this 
> > is a problem... PharoLauncher is a great idea, and for Windows is a mustbut 
> > in linux world it just does not matches the philosophy: There are many 
> > distrubutions and changes and is impossible to correctly distribute a VM 
> > with all dependencies without using the packaging they expect (we need to 
> > start thinking on distribute the VM as a flatpak, but that will take time 
> > to be implemented).
> > You need to use the VM we provide with Open Build Service: 
> > https://software.opensuse.org//download.html?project=devel:languages:pharo:stable&package=pharo-ui
> > 3) finally, this is not a real problem immediately, but a recommendation: 
> > Pharo has different ways of being ejecuted. The default one will execute 
> > the VM and everything needed in the main thread. This is usually suitable 
> > for Pharo needs, but it is a problem when the UI loop is required to run 
> > separately (not just for Gtk but any backend that you need to run on idle 
> > mode).
> >
> > Fortunaltely, Pharo implements also a way to be executed in a worker 
> > thread, making space so the main thread can be used for other purposes. We 
> > highly recommend that you execute Pharo using a worker thread (future 
> > versions of Spec-Gtk will require this usage, and is definitively better.
> > How to execute in worker thread:
> > pharo --worker MyImage.image --interactive
> >
> > I updated the README on pharo-spec/Spec-Gtk to precise this points.
> > Cheers!
> > Esteban
> > On Jul 10 2023, at 7:17 am, Jupiter Jones <jupiter.jo...@mail.com> wrote:
> > > Another step forward.
> > >
> > > I created a new ubuntu 22 install, installed pharo 11 and installed 
> > > spec-gtk. The first issue was the libraries are named: 
> > > libgobject-2.0.so.0 and libpango-1.0.so.0 with the “.0” suffix. I created 
> > > links to those with the names spec-gtk is expecting.
> > >
> > > Then, the little test window opened but looked like this:
> > >
> > >
> > > Is there something else I’m missing?
> > >
> > > Thanks for your advice.
> > >
> > > Cheers,
> > >
> > > Phil
> > >
> > >
> > > > On 9 Jul 2023, at 6:02 pm, Esteban Lorenzano <esteba...@netc.eu> wrote:
> > > > Hi,
> > > > Spec-Gtk should work without problems on P11, except on macs, where 
> > > > there is a known problem.
> > > > what is the process you are taking to install it? where are you trying 
> > > > it?
> > > >
> > > > I don't know the status of the VLC bindings.
> > > > Esteban
> > > > On Jul 9 2023, at 2:53 am, Jupiter Jones <jupiter.jo...@mail.com> wrote:
> > > > > The stark silence answers my question :)
> > > > >
> > > > > So…
> > > > >
> > > > > I found a nice binding to VLC [1] and was thinking of using Spec2 
> > > > > GTK+ to create a video widget/component. Does anyone with more in 
> > > > > depth knowledge of Spec2 and GTK foresee any obvious blocks?
> > > > >
> > > > > First block :) I can’t find a way to play with the Spec2 GTK+ binding 
> > > > > [2] without the image crashing on startup. I see someone has already 
> > > > > logged the issue in GitHub for 10 and 11, and I tried 12 just for 
> > > > > fun, and it also ate all the memory then crashed.
> > > > >
> > > > > Is there a Pharo version that will work with the Spec2 GTK+ binding 
> > > > > installed? Maybe I’m looking at this too early :)
> > > > >
> > > > > [1] https://github.com/badetitou/Pharo-LibVLC
> > > > > [2] https://github.com/pharo-spec/Spec-Gtk
> > > > >
> > > > > > On 3 Jul 2023, at 5:07 pm, Jupiter Jones <jupiter.jo...@mail.com> 
> > > > > > wrote:
> > > > > > Can anyone point to to some library, documentation or examples of 
> > > > > > how to play video in Pharo?
> > > > > > Thanks in advance.
> > > > > > Cheers,
> > > > > > J

Reply via email to