コード例 #1
0
        public void CopyTo(string[] array, int arrayIndex)
        {
            cef_string_list_t instance = GetNativeInstance();
            var cstr0 = new cef_string_t();

            for (int i = 0; i < array.Length; i++)
            {
                if (CefNativeApi.cef_string_list_value(instance, unchecked ((UIntPtr)i), &cstr0) == 0)
                {
                    throw new InvalidOperationException();
                }

                array[i + arrayIndex] = CefString.ReadAndFree(&cstr0);
            }
        }
コード例 #2
0
        public string[] ToArray()
        {
            cef_string_list_t instance = GetNativeInstance();
            var cstr0 = new cef_string_t();

            var array = new string[this.Count];

            for (int i = 0; i < array.Length; i++)
            {
                if (CefNativeApi.cef_string_list_value(instance, unchecked ((UIntPtr)i), &cstr0) == 0)
                {
                    throw new InvalidOperationException();
                }

                array[i] = CefString.ReadAndFree(&cstr0);
            }
            return(array);
        }
コード例 #3
0
        private static unsafe void OnFileDialogDismissedImpl(cef_run_file_dialog_callback_t *self, int selected_accept_filter, cef_string_list_t file_paths)
        {
            var instance = GetInstance((IntPtr)self) as CefRunFileDialogCallback;

            if (instance == null || ((ICefRunFileDialogCallbackPrivate)instance).AvoidOnFileDialogDismissed())
            {
                return;
            }
            instance.OnFileDialogDismissed(selected_accept_filter != 0, CefStringList.Wrap(file_paths));
        }
コード例 #4
0
        // void (*)(_cef_display_handler_t* self, _cef_browser_t* browser, cef_string_list_t icon_urls)*
        private static unsafe void OnFaviconUrlChangeImpl(cef_display_handler_t *self, cef_browser_t *browser, cef_string_list_t icon_urls)
        {
            var instance = GetInstance((IntPtr)self) as CefDisplayHandler;

            if (instance == null || ((ICefDisplayHandlerPrivate)instance).AvoidOnFaviconUrlChange())
            {
                ReleaseIfNonNull((cef_base_ref_counted_t *)browser);
                return;
            }
            instance.OnFaviconUrlChange(CefBrowser.Wrap(CefBrowser.Create, browser), CefStringList.Wrap(icon_urls));
        }
コード例 #5
0
ファイル: CefResolveCallback.cs プロジェクト: vmas/CefNet
        private static unsafe void OnResolveCompletedImpl(cef_resolve_callback_t *self, CefErrorCode result, cef_string_list_t resolved_ips)
        {
            var instance = GetInstance((IntPtr)self) as CefResolveCallback;

            if (instance == null || ((ICefResolveCallbackPrivate)instance).AvoidOnResolveCompleted())
            {
                return;
            }
            instance.OnResolveCompleted(result, CefStringList.Wrap(resolved_ips));
        }
コード例 #6
0
 private CefStringList(cef_string_list_t instance)
 {
     _instance = instance;
     IsNative  = true;
 }
コード例 #7
0
 public CefStringList()
 {
     _instance = CefNativeApi.cef_string_list_alloc();
 }
コード例 #8
0
 public static CefStringList Wrap(cef_string_list_t instance)
 {
     return(new CefStringList(instance));
 }
コード例 #9
0
        private static unsafe void GetCookieableSchemesImpl(cef_browser_process_handler_t *self, cef_string_list_t schemes, int *include_defaults)
        {
            var instance = GetInstance((IntPtr)self) as CefBrowserProcessHandler;

            if (instance == null || ((ICefBrowserProcessHandlerPrivate)instance).AvoidGetCookieableSchemes())
            {
                return;
            }
            instance.GetCookieableSchemes(CefStringList.Wrap(schemes), ref *include_defaults);
        }