[Lazarus] Getting X Window handle ?

Michael Van Canneyt michael at freepascal.org
Mon Nov 5 10:35:45 CET 2012


Hello,

I'm trying to embed the VLC player (using the videolan DLLS) in a LCL application.
On Windows, this works fine. On Linux, this does not work.

The reason is that the VideoLan library expects the native window handle. 
On Windows, TWinControl.Handle provides this.

On Linux, TWinControl.Handle returns the GTK widget pointer if I'm using GTK. 
(I imagine it will be something similar when using Qt)

How can I get access to the low-level X window handle (id) of a TWinControl on Linux ?

As soon as I get that working, I can donate the TLCLVCLplayer code for 
inclusion in Lazarus (about 50 lines of code).

The widget-set independent code will go in FPC subversion later today. 
It can be used on any platform, but will only show video in a free-floating window.

Michael.









More information about the Lazarus mailing list