Exemplo n.º 1
0
        internal static void on_got_focus(IntPtr gcHandlePtr, IntPtr browser, out int browser_release)
        {
            var self = (CfxFocusHandler)System.Runtime.InteropServices.GCHandle.FromIntPtr(gcHandlePtr).Target;

            if (self == null || self.CallbacksDisabled)
            {
                browser_release = 1;
                return;
            }
            var e = new CfxOnGotFocusEventArgs(browser);

            self.m_OnGotFocus?.Invoke(self, e);
            e.m_isInvalid   = true;
            browser_release = e.m_browser_wrapped == null? 1 : 0;
        }
Exemplo n.º 2
0
        internal static void on_got_focus(IntPtr gcHandlePtr, IntPtr browser)
        {
            var self = (CfxFocusHandler)System.Runtime.InteropServices.GCHandle.FromIntPtr(gcHandlePtr).Target;

            if (self == null || self.CallbacksDisabled)
            {
                return;
            }
            var e            = new CfxOnGotFocusEventArgs(browser);
            var eventHandler = self.m_OnGotFocus;

            if (eventHandler != null)
            {
                eventHandler(self, e);
            }
            e.m_isInvalid = true;
            if (e.m_browser_wrapped == null)
            {
                CfxApi.cfx_release(e.m_browser);
            }
        }