0

I use libvlc_media_player_set_hwnd() function in GTK# (Xamarin). But I can't get a HWND of GTK# widget and set it in libvlc_media_player_set_hwnd() function. In GTK+ I can use gdk_x11_drawable_get_xid(), but I haven't found this function in GTK#.

So how I can get a HWND of widgets or use this function for output media in the needed window/container/widget?

konstantin_doncov
  • 2,725
  • 4
  • 40
  • 100

1 Answers1

1

You could always import gdk_x11_drawable_get_xid() manually from the library:

[SuppressUnmanagedCodeSecurity, DllImport(GDK_X11_LIB)]
public static extern IntPtr gdk_x11_drawable_get_xid(IntPtr gdkDisplay);

Where GDK_X11_LIB is a string containing the your gdk-x11 library. For GTK 2.0 GDK_X11_LIB would be "libgdk-x11-2.0.so" on GNU/Linux.

Josh
  • 63
  • 6