internal static cef_display_handler_t* Alloc()
 {
     var ptr = (cef_display_handler_t*)Marshal.AllocHGlobal(_sizeof);
     *ptr = new cef_display_handler_t();
     ptr->_base._size = (UIntPtr)_sizeof;
     return ptr;
 }
        internal static cef_display_handler_t *Alloc()
        {
            var ptr = (cef_display_handler_t *)Marshal.AllocHGlobal(_sizeof);

            *ptr = new cef_display_handler_t();
            ptr->_base._size = (UIntPtr)_sizeof;
            return(ptr);
        }
        private void on_status_message(cef_display_handler_t* self, cef_browser_t* browser, cef_string_t* value)
        {
            CheckSelf(self);

            var mBrowser = CefBrowser.FromNative(browser);
            var mValue = cef_string_t.ToString(value);

            OnStatusMessage(mBrowser, mValue);
        }
        private int on_tooltip(cef_display_handler_t* self, cef_browser_t* browser, cef_string_t* text)
        {
            CheckSelf(self);

            var mBrowser = CefBrowser.FromNative(browser);
            var mText = cef_string_t.ToString(text);

            return OnTooltip(mBrowser, mText) ? 1 : 0;
        }
        private void on_title_change(cef_display_handler_t* self, cef_browser_t* browser, cef_string_t* title)
        {
            CheckSelf(self);

            var mBrowser = CefBrowser.FromNative(browser);
            var mTitle = cef_string_t.ToString(title);

            OnTitleChange(mBrowser, mTitle);
        }
        private void on_address_change(cef_display_handler_t* self, cef_browser_t* browser, cef_frame_t* frame, cef_string_t* url)
        {
            CheckSelf(self);

            var mBrowser = CefBrowser.FromNative(browser);
            var mFrame = CefFrame.FromNative(frame);
            var mUrl = cef_string_t.ToString(url);

            OnAddressChange(mBrowser, mFrame, mUrl);
        }
 private int release(cef_display_handler_t* self)
 {
     lock (SyncRoot)
     {
         var result = --_refct;
         if (result == 0)
         {
             lock (_roots) { _roots.Remove((IntPtr)_self); }
         }
         return result;
     }
 }
 private int add_ref(cef_display_handler_t* self)
 {
     lock (SyncRoot)
     {
         var result = ++_refct;
         if (result == 1)
         {
             lock (_roots) { _roots.Add((IntPtr)_self, this); }
         }
         return result;
     }
 }
 private int get_refct(cef_display_handler_t* self)
 {
     return _refct;
 }
 private void CheckSelf(cef_display_handler_t* self)
 {
     if (_self != self) throw ExceptionBuilder.InvalidSelfReference();
 }
 internal static void Free(cef_display_handler_t* ptr)
 {
     Marshal.FreeHGlobal((IntPtr)ptr);
 }
        private int on_console_message(cef_display_handler_t* self, cef_browser_t* browser, cef_string_t* message, cef_string_t* source, int line)
        {
            CheckSelf(self);

            var mBrowser = CefBrowser.FromNative(browser);
            var mMessage = cef_string_t.ToString(message);
            var mSource = cef_string_t.ToString(source);

            return OnConsoleMessage(mBrowser, mMessage, mSource, line) ? 1 : 0;
        }