protected virtual WebView OnCreateWebView(WebFrame frame) { ExtendedWebView webView = new ExtendedWebView(); 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(webView); }
public MainWindow(string url) : base(Gtk.WindowType.Toplevel) { Build (); webView = new ExtendedWebView (); ExtendedWebSettings settings = new ExtendedWebSettings (); settings.g_object_set ("user-agent", new GLib.Value ("Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Firefox/24.0")); settings.g_object_set ("enable-spell-checking", new GLib.Value (true)); webView.TitleChanged += HandleTitleChanged; webView.Settings = settings; webView.NewWindowPolicyDecisionRequested += HandleNewWindowPolicyDecisionRequested; webView.CreateWebView += HandleCreateWebView; //notifications.Elapsed += HandleElapsed; //notifications.Start(); webView.Open(url); VBox vbox1 = new VBox(); vbox1.PackStart(webView); this.Add(vbox1); this.ShowAll(); }
protected virtual WebView OnCreateWebView(WebFrame frame) { ExtendedWebView webView = new ExtendedWebView(); 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 webView; }