internal static cef_drag_handler_t* Alloc() { var ptr = (cef_drag_handler_t*)Marshal.AllocHGlobal(_sizeof); *ptr = new cef_drag_handler_t(); ptr->_base._size = (UIntPtr)_sizeof; return ptr; }
internal static cef_drag_handler_t *Alloc() { var ptr = (cef_drag_handler_t *)Marshal.AllocHGlobal(_sizeof); *ptr = new cef_drag_handler_t(); ptr->_base._size = (UIntPtr)_sizeof; return(ptr); }
private int on_drag_enter(cef_drag_handler_t* self, cef_browser_t* browser, cef_drag_data_t* dragData, CefDragOperationsMask mask) { CheckSelf(self); var m_browser = CefBrowser.FromNative(browser); var m_dragData = CefDragData.FromNative(dragData); var m_result = OnDragEnter(m_browser, m_dragData, mask); return m_result ? 1 : 0; }
private void add_ref(cef_drag_handler_t* self) { lock (SyncRoot) { var result = ++_refct; if (result == 1) { lock (_roots) { _roots.Add((IntPtr)_self, this); } } } }
private int release(cef_drag_handler_t* self) { lock (SyncRoot) { var result = --_refct; if (result == 0) { lock (_roots) { _roots.Remove((IntPtr)_self); } return 1; } return 0; } }
internal static void Free(cef_drag_handler_t* ptr) { Marshal.FreeHGlobal((IntPtr)ptr); }
private int get_refct(cef_drag_handler_t* self) { return _refct; }
private void CheckSelf(cef_drag_handler_t* self) { if (_self != self) throw ExceptionBuilder.InvalidSelfReference(); }
private int has_one_ref(cef_drag_handler_t* self) { lock (SyncRoot) { return _refct == 1 ? 1 : 0; } }