internal static cef_navigation_entry_visitor_t* Alloc() { var ptr = (cef_navigation_entry_visitor_t*)Marshal.AllocHGlobal(_sizeof); *ptr = new cef_navigation_entry_visitor_t(); ptr->_base._size = (UIntPtr)_sizeof; return ptr; }
internal static cef_navigation_entry_visitor_t *Alloc() { var ptr = (cef_navigation_entry_visitor_t *)Marshal.AllocHGlobal(_sizeof); *ptr = new cef_navigation_entry_visitor_t(); ptr->_base._size = (UIntPtr)_sizeof; return(ptr); }
private int visit(cef_navigation_entry_visitor_t* self, cef_navigation_entry_t* entry, int current, int index, int total) { CheckSelf(self); var m_entry = CefNavigationEntry.FromNative(entry); var m_result = Visit(m_entry, current != 0, index, total); m_entry.Dispose(); return m_result ? 1 : 0; }
private void add_ref(cef_navigation_entry_visitor_t* self) { lock (SyncRoot) { var result = ++_refct; if (result == 1) { lock (_roots) { _roots.Add((IntPtr)_self, this); } } } }
private int release(cef_navigation_entry_visitor_t* self) { lock (SyncRoot) { var result = --_refct; if (result == 0) { lock (_roots) { _roots.Remove((IntPtr)_self); } return 1; } return 0; } }
public static void get_navigation_entries(cef_browser_host_t* self, cef_navigation_entry_visitor_t* visitor, int current_only) { get_navigation_entries_delegate d; var p = self->_get_navigation_entries; if (p == _p14) { d = _d14; } else { d = (get_navigation_entries_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_navigation_entries_delegate)); if (_p14 == IntPtr.Zero) { _d14 = d; _p14 = p; } } d(self, visitor, current_only); }
internal static void Free(cef_navigation_entry_visitor_t* ptr) { Marshal.FreeHGlobal((IntPtr)ptr); }
private void CheckSelf(cef_navigation_entry_visitor_t* self) { if (_self != self) throw ExceptionBuilder.InvalidSelfReference(); }
private int has_one_ref(cef_navigation_entry_visitor_t* self) { lock (SyncRoot) { return _refct == 1 ? 1 : 0; } }