internal static cef_string_visitor_t* Alloc() { var ptr = (cef_string_visitor_t*)Marshal.AllocHGlobal(_sizeof); *ptr = new cef_string_visitor_t(); ptr->_base._size = (UIntPtr)_sizeof; return ptr; }
internal static cef_string_visitor_t *Alloc() { var ptr = (cef_string_visitor_t *)Marshal.AllocHGlobal(_sizeof); *ptr = new cef_string_visitor_t(); ptr->_base._size = (UIntPtr)_sizeof; return(ptr); }
private int release(cef_string_visitor_t* self) { lock (SyncRoot) { var result = --_refct; if (result == 0) { lock (_roots) { _roots.Remove((IntPtr)_self); } } return result; } }
private int add_ref(cef_string_visitor_t* self) { lock (SyncRoot) { var result = ++_refct; if (result == 1) { lock (_roots) { _roots.Add((IntPtr)_self, this); } } return result; } }
private void CheckSelf(cef_string_visitor_t* self) { if (_self != self) throw ExceptionBuilder.InvalidSelfReference(); }
private int get_refct(cef_string_visitor_t* self) { return _refct; }
internal static void Free(cef_string_visitor_t* ptr) { Marshal.FreeHGlobal((IntPtr)ptr); }
public static void get_text(cef_frame_t* self, cef_string_visitor_t* visitor) { get_text_delegate d; var p = self->_get_text; if (p == _pd) { d = _dd; } else { d = (get_text_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_text_delegate)); if (_pd == IntPtr.Zero) { _dd = d; _pd = p; } } d(self, visitor); }
private void visit(cef_string_visitor_t* self, cef_string_t* @string) { CheckSelf(self); Visit(cef_string_t.ToString(@string)); }