Esempio n. 1
0
        static unsafe void RecyclePtr(IntPtr intptr)
        {
            cef_window_info_t *ptr = (cef_window_info_t *)intptr;

            ObjectInterop.cef_string_utf16_clear(&ptr->window_name);
            //TODO:other strings
        }
Esempio n. 2
0
        static unsafe void RecyclePtr(IntPtr intptr)
        {
            cef_string_t *ptr = (cef_string_t *)intptr;

            if (ptr->str != null)
            {
                ObjectInterop.cef_string_utf16_clear(ptr);
            }
        }
Esempio n. 3
0
        static public CefBrowser CreateBrowserSync(CefWindowInfo wininfo, CefClient client, string url, CefBrowserSettings browser_settings, CefDictionaryValue extra_info = null, CefRequestContext requestContext = null)
        {
            CefString      cefurl   = url ?? throw new ArgumentNullException(nameof(url));
            cef_browser_t *pBrowser = ObjectInterop.cef_browser_host_create_browser_sync(wininfo, client, cefurl, browser_settings, extra_info, requestContext);

            if (pBrowser == null)
            {
                throw new Exception("Failed to create browser");
            }
            return(FromInArg(pBrowser));
        }
Esempio n. 4
0
        static unsafe void RecyclePtr(IntPtr intptr)
        {
            cef_settings_t *ptr = (cef_settings_t *)intptr;

            //TODO: if the libcef.dll is not initialized , this function is not able to call
            //so check the pointer before release it
            if (ptr->resources_dir_path.str != null)
            {
                ObjectInterop.cef_string_utf16_clear(&ptr->resources_dir_path);
            }
            //TODO:other strings
        }