/// <summary>Creates a new instance of a <see cref="GeckoRetargetedEventArgs"/> object.</summary> /// <param name="uri"></param> public GeckoRetargetedEventArgs(Uri uri, GeckoWindow domWind, Request req) { Uri = uri; DomWindow = domWind; DomWindowTopLevel = domWind.IsTopWindow(); Request = req; }
/// <summary>Creates a new instance of a <see cref="GeckoNavigatedEventArgs"/> object.</summary> /// <param name="value"></param> /// <param name="response"></param> internal GeckoNavigatedEventArgs(Uri value, nsIRequest response, GeckoWindow domWind, bool _sameDocument, bool _errorPage) { Uri = value; _response = response; DomWindow = domWind; DomWindowTopLevel = ((domWind == null) ? true : DomWindow.DomWindow.Equals(DomWindow.Top.DomWindow)); IsSameDocument = _sameDocument; IsErrorPage = _errorPage; }
public void InitMouseEvent(string type, bool canBubble, bool cancelable, GeckoWindow view, int detail, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, ushort button, DomEventTarget target) { using (var typeArg = new nsAString(type)) { _domMouseEvent.InitMouseEvent(typeArg, canBubble, cancelable, view.DomWindow, detail, screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, metaKey, button, target.NativeObject); } }
public static bool IsTopWindow(this GeckoWindow geckoWindow) { if (geckoWindow == null) { return(true); } var top = geckoWindow.Top; if (top == null) { return(true); } return(top.DomWindow.GetHashCode() == geckoWindow.DomWindow.GetHashCode()); }
/// <summary> /// Workaround suggested by Tom Hindle, since GeckoFx-45's CanXSelection properties aren't working. /// </summary> /// <returns></returns> private bool IsThereACurrentTextSelection() { using (var win = new GeckoWindow(_browser.WebBrowserFocus.GetFocusedWindowAttribute())) { var sel = win.Selection; if (sel.IsCollapsed || sel.FocusNode is GeckoImageElement) return false; } return true; }
public static bool IsTopWindow(GeckoWindow geckoWindow) { if (geckoWindow == null) return true; var top = geckoWindow.Top; if (top == null) return true; return top.DomWindow.GetHashCode() == geckoWindow.DomWindow.GetHashCode(); }
public AutoJSContext(GeckoWindow window) : this((nsIGlobalObject)window.DomWindow) { }
public AutoJSContext(GeckoWindow window) : this(window.DomWindow) { }
/// <summary>Creates a new instance of a <see cref="GeckoRedirectingEventArgs"/> object.</summary> /// <param name="value"></param> public GeckoRedirectingEventArgs(Uri value, GeckoWindow domWind) { Uri = value; DomWindow = domWind; DomWindowTopLevel = ((domWind == null) ? true : DomWindow.DomWindow.Equals(DomWindow.Top.DomWindow)); }
/// <summary>Creates a new instance of a <see cref="GeckoNavigatedEventArgs"/> object.</summary> /// <param name="value"></param> /// <param name="response"></param> internal GeckoNavigatedEventArgs(Uri value, nsIRequest response, GeckoWindow domWind, bool _sameDocument, bool _errorPage) { Uri = value; _response = response; DomWindow = domWind; using (var topWindow = DomWindow.Top) { DomWindowTopLevel = ((domWind == null) ? true : DomWindow.DomWindow.Equals(topWindow.DomWindow)); } IsSameDocument = _sameDocument; IsErrorPage = _errorPage; }
protected override void Dispose(bool disposing) { if (disposing) { //var count = Gecko.Interop.ComDebug.GetRefCount(WebBrowser); if (NavigateFinishedNotifier != null) NavigateFinishedNotifier.Dispose(); //count = Gecko.Interop.ComDebug.GetRefCount(WebBrowser); if (_Window != null) _Window.Dispose(); _Window = null; if (_Document != null) _Document.Dispose(); _Document = null; } base.Dispose(disposing); }
public GeckoRedirectingEventArgs(Uri destUri, GeckoWindow domWindow) { // TODO: Complete member initialization this.destUri = destUri; this.domWindow = domWindow; }
public void InitMouseScrollEvent(string type, bool canBubble, bool cancelable, GeckoWindow view, int detail, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, ushort button, DomEventTarget target, int axis ) { using (var typeArg = new nsAString(type)) { throw new NotImplementedException(); //_mouseScrollEvent.InitMouseScrollEvent(typeArg, canBubble, cancelable, view.DomWindow, detail, screenX, // screenY, // clientX, clientY, ctrlKey, altKey, shiftKey, metaKey, button, // target.NativeObject, axis); } }