コード例 #1
0
        internal static void on_title_change(IntPtr gcHandlePtr, IntPtr browser, out int browser_release, IntPtr title_str, int title_length)
        {
            var self = (CfxDisplayHandler)System.Runtime.InteropServices.GCHandle.FromIntPtr(gcHandlePtr).Target;

            if (self == null || self.CallbacksDisabled)
            {
                browser_release = 1;
                return;
            }
            var e = new CfxOnTitleChangeEventArgs(browser, title_str, title_length);

            self.m_OnTitleChange?.Invoke(self, e);
            e.m_isInvalid   = true;
            browser_release = e.m_browser_wrapped == null? 1 : 0;
        }
コード例 #2
0
        internal static void on_title_change(IntPtr gcHandlePtr, IntPtr browser, IntPtr title_str, int title_length)
        {
            var self = (CfxDisplayHandler)System.Runtime.InteropServices.GCHandle.FromIntPtr(gcHandlePtr).Target;

            if (self == null)
            {
                return;
            }
            var e            = new CfxOnTitleChangeEventArgs(browser, title_str, title_length);
            var eventHandler = self.m_OnTitleChange;

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