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;
 }
Exemple #2
0
        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_loading_state_change(cef_display_handler_t* self, cef_browser_t* browser, int isLoading, int canGoBack, int canGoForward)
        {
            CheckSelf(self);

            var mBrowser = CefBrowser.FromNative(browser);

            OnLoadingStateChange(mBrowser, isLoading != 0, canGoBack != 0, canGoForward != 0);
        }
        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);
        }
Exemple #8
0
        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;
        }
Exemple #9
0
 private void add_ref(cef_display_handler_t* self)
 {
     lock (SyncRoot)
     {
         var result = ++_refct;
         if (result == 1)
         {
             lock (_roots) { _roots.Add((IntPtr)_self, this); }
         }
     }
 }
 private int release(cef_display_handler_t* self)
 {
     lock (SyncRoot)
     {
         var result = --_refct;
         if (result == 0)
         {
             lock (_roots) { _roots.Remove((IntPtr)_self); }
         }
         return result;
     }
 }
Exemple #11
0
 private int has_one_ref(cef_display_handler_t* self)
 {
     lock (SyncRoot) { return _refct == 1 ? 1 : 0; }
 }
Exemple #12
0
 private void CheckSelf(cef_display_handler_t* self)
 {
     if (_self != self) throw ExceptionBuilder.InvalidSelfReference();
 }
 private int get_refct(cef_display_handler_t* self)
 {
     return _refct;
 }
 internal static void Free(cef_display_handler_t* ptr)
 {
     Marshal.FreeHGlobal((IntPtr)ptr);
 }