예제 #1
0
 private CefDomEvent(cef_domevent_t *ptr)
 {
     if (ptr == null)
     {
         throw new ArgumentNullException("ptr");
     }
     _self = ptr;
 }
예제 #2
0
 internal static CefDomEvent FromNativeOrNull(cef_domevent_t *ptr)
 {
     if (ptr == null)
     {
         return(null);
     }
     return(new CefDomEvent(ptr));
 }
예제 #3
0
 public void Dispose()
 {
     if (_self != null)
     {
         Release();
         _self = null;
     }
     GC.SuppressFinalize(this);
 }
예제 #4
0
 public void Dispose()
 {
     if (_self != null)
     {
         Release();
         _self = null;
     }
     GC.SuppressFinalize(this);
 }
        /// <summary>
        /// Called when an event is received. The event object passed to this
        /// method contains a snapshot of the DOM at the time this method is
        /// executed. DOM objects are only valid for the scope of this method. Do
        /// not keep references to or attempt to access any DOM objects outside
        /// the scope of this method.
        /// </summary>
        private void handle_event(cef_domevent_listener_t *self, cef_domevent_t * @event)
        {
            ThrowIfObjectDisposed();

            var m_domEvent = CefDomEvent.From(@event);

            this.HandleEvent(m_domEvent);

            m_domEvent.Dispose();
        }
예제 #6
0
        private void handle_event(cef_domevent_listener_t *self, cef_domevent_t * @event)
        {
            CheckSelf(self);

            var m_event = CefDomEvent.FromNative(@event);

            HandleEvent(m_event);

            m_event.Dispose();
        }
예제 #7
0
        public static int can_bubble(cef_domevent_t *self)
        {
            can_bubble_delegate d;
            var p = self->_can_bubble;

            if (p == _p6)
            {
                d = _d6;
            }
            else
            {
                d = (can_bubble_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(can_bubble_delegate));
                if (_p6 == IntPtr.Zero)
                {
                    _d6 = d; _p6 = p;
                }
            }
            return(d(self));
        }
예제 #8
0
        public static int has_one_ref(cef_domevent_t *self)
        {
            has_one_ref_delegate d;
            var p = self->_base._has_one_ref;

            if (p == _p2)
            {
                d = _d2;
            }
            else
            {
                d = (has_one_ref_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(has_one_ref_delegate));
                if (_p2 == IntPtr.Zero)
                {
                    _d2 = d; _p2 = p;
                }
            }
            return(d(self));
        }
예제 #9
0
        public static int release(cef_domevent_t *self)
        {
            release_delegate d;
            var p = self->_base._release;

            if (p == _p1)
            {
                d = _d1;
            }
            else
            {
                d = (release_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(release_delegate));
                if (_p1 == IntPtr.Zero)
                {
                    _d1 = d; _p1 = p;
                }
            }
            return(d(self));
        }
예제 #10
0
        public static void add_ref(cef_domevent_t *self)
        {
            add_ref_delegate d;
            var p = self->_base._add_ref;

            if (p == _p0)
            {
                d = _d0;
            }
            else
            {
                d = (add_ref_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(add_ref_delegate));
                if (_p0 == IntPtr.Zero)
                {
                    _d0 = d; _p0 = p;
                }
            }
            d(self);
        }
예제 #11
0
        public static cef_domdocument_t *get_document(cef_domevent_t *self)
        {
            get_document_delegate d;
            var p = self->_get_document;

            if (p == _p8)
            {
                d = _d8;
            }
            else
            {
                d = (get_document_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_document_delegate));
                if (_p8 == IntPtr.Zero)
                {
                    _d8 = d; _p8 = p;
                }
            }
            return(d(self));
        }
예제 #12
0
        public static cef_domnode_t *get_current_target(cef_domevent_t *self)
        {
            get_current_target_delegate d;
            var p = self->_get_current_target;

            if (p == _pa)
            {
                d = _da;
            }
            else
            {
                d = (get_current_target_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_current_target_delegate));
                if (_pa == IntPtr.Zero)
                {
                    _da = d; _pa = p;
                }
            }
            return(d(self));
        }
예제 #13
0
        public static int can_cancel(cef_domevent_t *self)
        {
            can_cancel_delegate d;
            var p = self->_can_cancel;

            if (p == _p7)
            {
                d = _d7;
            }
            else
            {
                d = (can_cancel_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(can_cancel_delegate));
                if (_p7 == IntPtr.Zero)
                {
                    _d7 = d; _p7 = p;
                }
            }
            return(d(self));
        }
예제 #14
0
        public static CefDomEventPhase get_phase(cef_domevent_t *self)
        {
            get_phase_delegate d;
            var p = self->_get_phase;

            if (p == _p5)
            {
                d = _d5;
            }
            else
            {
                d = (get_phase_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_phase_delegate));
                if (_p5 == IntPtr.Zero)
                {
                    _d5 = d; _p5 = p;
                }
            }
            return(d(self));
        }
예제 #15
0
        public static CefDomEventCategory get_category(cef_domevent_t *self)
        {
            get_category_delegate d;
            var p = self->_get_category;

            if (p == _p4)
            {
                d = _d4;
            }
            else
            {
                d = (get_category_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_category_delegate));
                if (_p4 == IntPtr.Zero)
                {
                    _d4 = d; _p4 = p;
                }
            }
            return(d(self));
        }
예제 #16
0
        public static cef_string_userfree *get_type(cef_domevent_t *self)
        {
            get_type_delegate d;
            var p = self->_get_type;

            if (p == _p3)
            {
                d = _d3;
            }
            else
            {
                d = (get_type_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_type_delegate));
                if (_p3 == IntPtr.Zero)
                {
                    _d3 = d; _p3 = p;
                }
            }
            return(d(self));
        }
예제 #17
0
 internal static CefDomEvent FromNative(cef_domevent_t *ptr)
 {
     return(new CefDomEvent(ptr));
 }
예제 #18
0
 private CefDomEvent(cef_domevent_t* ptr)
 {
     if (ptr == null) throw new ArgumentNullException("ptr");
     _self = ptr;
 }