internal static cef_completion_callback_t* Alloc()
 {
     var ptr = (cef_completion_callback_t*)Marshal.AllocHGlobal(_sizeof);
     *ptr = new cef_completion_callback_t();
     ptr->_base._size = (UIntPtr)_sizeof;
     return ptr;
 }
Exemple #2
0
        internal static cef_completion_callback_t *Alloc()
        {
            var ptr = (cef_completion_callback_t *)Marshal.AllocHGlobal(_sizeof);

            *ptr = new cef_completion_callback_t();
            ptr->_base._size = (UIntPtr)_sizeof;
            return(ptr);
        }
 private void add_ref(cef_completion_callback_t* self)
 {
     lock (SyncRoot)
     {
         var result = ++_refct;
         if (result == 1)
         {
             lock (_roots) { _roots.Add((IntPtr)_self, this); }
         }
     }
 }
 private int release(cef_completion_callback_t* self)
 {
     lock (SyncRoot)
     {
         var result = --_refct;
         if (result == 0)
         {
             lock (_roots) { _roots.Remove((IntPtr)_self); }
             return 1;
         }
         return 0;
     }
 }
Exemple #5
0
 public static extern int begin_tracing(cef_string_t* categories, cef_completion_callback_t* callback);
 private void CheckSelf(cef_completion_callback_t* self)
 {
     if (_self != self) throw ExceptionBuilder.InvalidSelfReference();
 }
 private int has_one_ref(cef_completion_callback_t* self)
 {
     lock (SyncRoot) { return _refct == 1 ? 1 : 0; }
 }
        private void on_complete(cef_completion_callback_t* self)
        {
            CheckSelf(self);

            OnComplete();
        }
 public static int flush_store(cef_cookie_manager_t* self, cef_completion_callback_t* callback)
 {
     flush_store_delegate d;
     var p = self->_flush_store;
     if (p == _p9) { d = _d9; }
     else
     {
         d = (flush_store_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(flush_store_delegate));
         if (_p9 == IntPtr.Zero) { _d9 = d; _p9 = p; }
     }
     return d(self, callback);
 }
 internal static void Free(cef_completion_callback_t* ptr)
 {
     Marshal.FreeHGlobal((IntPtr)ptr);
 }
 private int get_refct(cef_completion_callback_t* self)
 {
     return _refct;
 }