Caprica.VlcSharp.Player.Embedded.VideoSurface.Gtk.GtkComponentIdVideoSurface.Wid C# (CSharp) Method

Wid() private static method

private static Wid ( Gtk.Widget widget ) : Int32
widget Gtk.Widget
return System.Int32
        private static Int32 Wid(Widget widget)
        {
            IntPtr windowPtr = gtk_widget_get_window(widget.Handle);
            if(windowPtr != IntPtr.Zero) {
                IntPtr xidPtr = gdk_x11_drawable_get_xid(windowPtr);
                if(xidPtr != IntPtr.Zero) {
                    return xidPtr.ToInt32();
                }
            }
            return 0;
        }