예제 #1
0
        protected virtual bool OnNewWindowPolicyDecisionRequested(WebFrame frame, NetworkRequest request, WebNavigationAction action, WebPolicyDecision decision)
        {
            var val        = new Value(GType.Int);
            var valueArray = new ValueArray(5u);
            var array      = new Value[5];

            array [0] = new Value(this);
            valueArray.Append(array [0]);
            array [1] = new Value(frame);
            valueArray.Append(array [1]);
            array [2] = new Value(request);
            valueArray.Append(array [2]);
            array [3] = new Value(action);
            valueArray.Append(array [3]);
            array [4] = new Value(decision);
            valueArray.Append(array [4]);
            GLib.Object.g_signal_chain_from_overridden(valueArray.ArrayPtr, ref val);
            var array2 = array;

            for (int i = 0; i < array2.Length; i++)
            {
                var value = array2 [i];
                value.Dispose();
            }
            bool result = (bool)val;

            val.Dispose();
            return(result);
        }
예제 #2
0
        protected virtual bool OnWebViewReady(WebFrame frame)
        {
            Value      empty      = Value.Empty;
            ValueArray valueArray = new ValueArray(2u);

            Value[] array = new Value[2];
            array [0] = new Value(this);
            valueArray.Append(array [0]);
            array [1] = new Value(frame);
            valueArray.Append(array [1]);
            GLib.Object.g_signal_chain_from_overridden(valueArray.ArrayPtr, ref empty);
            Value[] array2 = array;
            for (int i = 0; i < array2.Length; i++)
            {
                Value value = array2 [i];
                value.Dispose();
            }
            return(true);
        }