Esempio n. 1
0
        /// <summary>
        /// The get window xid.
        /// </summary>
        /// <param name="handle">
        /// The handle.
        /// </param>
        /// <returns>
        /// The <see cref="IntPtr"/>.
        /// </returns>
        internal static IntPtr GetWindowXid(IntPtr handle)
        {
            if (CefRuntime.Platform == CefRuntimePlatform.Windows)
            {
                IntPtr pGdkWindow = Win.gtksharp_gtk_widget_get_window(handle);
                return(Win.gdk_win32_drawable_get_handle(pGdkWindow));
            }

            if (CefRuntime.Platform == CefRuntimePlatform.Linux)
            {
                IntPtr pGdkWindow = Linux.gtk_widget_get_window(handle);
                return(Linux.gdk_x11_drawable_get_xid(pGdkWindow));
            }

            return(IntPtr.Zero);
        }