Exemple #1
0
        private unsafe static cef_base_scoped_t *Allocate(int size)
        {
            cef_base_scoped_t *instance = (cef_base_scoped_t *)CefStructure.Allocate(size);

            instance->del = (void *)Marshal.GetFunctionPointerForDelegate(fnDel);
            return(instance);
        }
        private unsafe static cef_base_ref_counted_t *Allocate(int size)
        {
            cef_base_ref_counted_t *instance = (cef_base_ref_counted_t *)CefStructure.Allocate(size);

            instance->add_ref              = (void *)Marshal.GetFunctionPointerForDelegate(fnAddRef);
            instance->release              = (void *)Marshal.GetFunctionPointerForDelegate(fnRelease);
            instance->has_one_ref          = (void *)Marshal.GetFunctionPointerForDelegate(fnHasOneRef);
            instance->has_at_least_one_ref = (void *)Marshal.GetFunctionPointerForDelegate(fnHasAtLeastOneRef);
            return(instance);
        }
Exemple #3
0
 public CefBrowserSettings()
 {
     _disposable     = true;
     _instance       = (cef_browser_settings_t *)CefStructure.Allocate(sizeof(cef_browser_settings_t));
     _instance->size = new UIntPtr((uint)sizeof(cef_browser_settings_t));
 }
 public CefRequestContextSettings()
 {
     _disposable     = true;
     _instance       = (cef_request_context_settings_t *)CefStructure.Allocate(sizeof(cef_request_context_settings_t));
     _instance->size = new UIntPtr((uint)sizeof(cef_request_context_settings_t));
 }