예제 #1
0
 internal static cef_focus_handler_t* Alloc()
 {
     var ptr = (cef_focus_handler_t*)Marshal.AllocHGlobal(_sizeof);
     *ptr = new cef_focus_handler_t();
     ptr->_base._size = (UIntPtr)_sizeof;
     return ptr;
 }
예제 #2
0
        private void on_got_focus(cef_focus_handler_t* self, cef_browser_t* browser)
        {
            CheckSelf(self);

            var m_browser = CefBrowser.FromNative(browser);

            OnGotFocus(m_browser);
        }
예제 #3
0
        private int on_set_focus(cef_focus_handler_t* self, cef_browser_t* browser, CefFocusSource source)
        {
            CheckSelf(self);

            var m_browser = CefBrowser.FromNative(browser);

            return OnSetFocus(m_browser, source) ? 1 : 0;
        }
예제 #4
0
        private void on_take_focus(cef_focus_handler_t* self, cef_browser_t* browser, int next)
        {
            CheckSelf(self);

            var m_browser = CefBrowser.FromNative(browser);

            OnTakeFocus(m_browser, next != 0);
        }
        internal static cef_focus_handler_t *Alloc()
        {
            var ptr = (cef_focus_handler_t *)Marshal.AllocHGlobal(_sizeof);

            *ptr = new cef_focus_handler_t();
            ptr->_base._size = (UIntPtr)_sizeof;
            return(ptr);
        }
예제 #6
0
 private void add_ref(cef_focus_handler_t* self)
 {
     lock (SyncRoot)
     {
         var result = ++_refct;
         if (result == 1)
         {
             lock (_roots) { _roots.Add((IntPtr)_self, this); }
         }
     }
 }
예제 #7
0
 private int release(cef_focus_handler_t* self)
 {
     lock (SyncRoot)
     {
         var result = --_refct;
         if (result == 0)
         {
             lock (_roots) { _roots.Remove((IntPtr)_self); }
             return 1;
         }
         return 0;
     }
 }
예제 #8
0
 private void CheckSelf(cef_focus_handler_t* self)
 {
     if (_self != self) throw ExceptionBuilder.InvalidSelfReference();
 }
예제 #9
0
 private int get_refct(cef_focus_handler_t* self)
 {
     return _refct;
 }
예제 #10
0
 internal static void Free(cef_focus_handler_t* ptr)
 {
     Marshal.FreeHGlobal((IntPtr)ptr);
 }
예제 #11
0
 private int has_one_ref(cef_focus_handler_t* self)
 {
     lock (SyncRoot) { return _refct == 1 ? 1 : 0; }
 }