Exemplo n.º 1
0
 public void decidePolicyForNewWindowAction(WebView WebView, CFDictionaryPropertyBag actionInformation, WebURLRequest request, string frameName, IWebPolicyDecisionListener listener)
 {
     if (AllowNewWindows)
         listener.use();
     else
         listener.ignore();
 }
Exemplo n.º 2
0
 public void decidePolicyForNavigationAction(WebView WebView, CFDictionaryPropertyBag actionInformation, WebURLRequest request, webFrame frame, IWebPolicyDecisionListener listener)
 {
     if (AllowNavigation || AllowInitialNavigation)
         listener.use();
     else
         listener.ignore();
 }
Exemplo n.º 3
0
 public int contextMenuItemsForElement(WebView sender, CFDictionaryPropertyBag element, int defaultItemsHMenu)
 {
     if (!owner.IsWebBrowserContextMenuEnabled)  /* {@@} */
     {                                           /* {@@} */
         owner.ContextMenuShow();                /* {@@} */
     }                                           /* {@@} */
     return(owner.IsWebBrowserContextMenuEnabled ? defaultItemsHMenu : 0);
 }
Exemplo n.º 4
0
        public void decidePolicyForNewWindowAction(WebView WebView, CFDictionaryPropertyBag actionInformation, IWebURLRequest request, string frameName, IWebPolicyDecisionListener listener)
        {
            if (listener != null)
            {
                listener.use();
            }
            string url = request.url();

            NewWindowRequestUrlAvailable(url);
        }
Exemplo n.º 5
0
 public void decidePolicyForNavigationAction(WebView WebView, CFDictionaryPropertyBag actionInformation, IWebURLRequest request, webFrame frame, IWebPolicyDecisionListener listener)
 {
     if (AllowNavigation || AllowInitialNavigation)
     {
         listener.use();
     }
     else
     {
         listener.ignore();
     }
 }
Exemplo n.º 6
0
 public void decidePolicyForNewWindowAction(WebView WebView, CFDictionaryPropertyBag actionInformation, IWebURLRequest request, string frameName, IWebPolicyDecisionListener listener)
 {
     if (AllowNewWindows)
     {
         listener.use();
     }
     else
     {
         listener.ignore();
     }
 }
Exemplo n.º 7
0
        public void mouseDidMoveOverElement(WebView sender, CFDictionaryPropertyBag elementInformation, uint modifierFlags)
        {
            object textcontent;

            elementInformation.RemoteRead("WebElementLinkURLKey", out textcontent, null, 0, null);
            if (!string.IsNullOrEmpty((string)textcontent))
            {
                StatusTextChanged((string)textcontent);
                owner.StatusText = (string)textcontent;
                if ((string)textcontent != string.Empty)
                {
                    owner.LastSelectedLink = (string)textcontent;
                }
            }
            else
            {
                StatusTextChanged(string.Empty);
                owner.StatusText = string.Empty;
            }
            textcontent = null;
            object el;

            elementInformation.RemoteRead("WebElementDOMNodeKey", out el, null, 0, null);
            if (el == null)
            {
                owner.setCurElSafe(null);
                return;
            }
            IDOMNode node = el as IDOMNode;

            if (node is IDOMElement || node is IDOMHTMLElement || node is IDOMHTMLTextAreaElement || node is IDOMHTMLInputElement && node != null)
            {
                owner.setCurElSafe(node);
                MouseDidMoveOverElement(sender, node);
            }
            else
            {
                el   = null;
                node = null;
                GC.Collect();
            }
            el = null;
            if (node != null)
            {
                node = null;
            }
            Marshal.ReleaseComObject(elementInformation);
        }
Exemplo n.º 8
0
 public int contextMenuItemsForElement(WebView sender, CFDictionaryPropertyBag element, int defaultItemsHMenu)
 {
     owner.CustomContextMenuManager.FireShowContextMenu();
     if (owner.UseDefaultContextMenu)
     {
         if (owner.CustomContextMenuManager.AppropriateContextMenuType == ContextMenuType.Body || owner.CustomContextMenuManager.AppropriateContextMenuType == ContextMenuType.Button || owner.CustomContextMenuManager.AppropriateContextMenuType == ContextMenuType.Form || owner.CustomContextMenuManager.AppropriateContextMenuType == ContextMenuType.TextSelected || owner.CustomContextMenuManager.AppropriateContextMenuType == ContextMenuType.ImageAndLink || owner.CustomContextMenuManager.AppropriateContextMenuType == ContextMenuType.Image || owner.CustomContextMenuManager.AppropriateContextMenuType == ContextMenuType.Link)
         {
             return(0);
         }
         else
         {
             return(owner.UseDefaultContextMenu ? defaultItemsHMenu : 0);
         };
     }
     else
     {
         return(owner.UseDefaultContextMenu ? defaultItemsHMenu : 0);
     }
 }
Exemplo n.º 9
0
 public void mouseDidMoveOverElement(WebView sender, CFDictionaryPropertyBag elementInformation, uint modifierFlags)
 {
     object textcontent;
     elementInformation.RemoteRead("WebElementLinkURLKey", out textcontent, null, 0, null);
     if (!string.IsNullOrEmpty((string)textcontent))
     {
         StatusTextChanged((string)textcontent);
         owner.StatusText = (string)textcontent;
         if ((string)textcontent != string.Empty)
             owner.LastSelectedLink = (string)textcontent;
     }
     else
     {
         StatusTextChanged(string.Empty);
         owner.StatusText = string.Empty;
     }
     textcontent = null;
     object el;
     elementInformation.RemoteRead("WebElementDOMNodeKey", out el, null, 0, null);
     if (el == null)
     {
         owner.setCurElSafe(null);
         return;
     }
     IDOMNode node = el as IDOMNode;
     if (node is IDOMElement || node is IDOMHTMLElement || node is IDOMHTMLTextAreaElement || node is IDOMHTMLInputElement && node != null)
     {
         owner.setCurElSafe(node);
         MouseDidMoveOverElement(sender, node);
     }
     else
     {
         el = null;
         node = null;
         GC.Collect();
     }
     el = null;
     if (node != null)
     {
         node = null;
     }
     Marshal.ReleaseComObject(elementInformation);
 }
Exemplo n.º 10
0
 public int contextMenuItemsForElement(WebView sender, CFDictionaryPropertyBag element, int defaultItemsHMenu)
 {
     owner.CustomContextMenuManager.FireShowContextMenu();
     if (owner.UseDefaultContextMenu)
     {
         if (owner.CustomContextMenuManager.AppropriateContextMenuType == ContextMenuType.Body || owner.CustomContextMenuManager.AppropriateContextMenuType == ContextMenuType.Button || owner.CustomContextMenuManager.AppropriateContextMenuType == ContextMenuType.Form || owner.CustomContextMenuManager.AppropriateContextMenuType == ContextMenuType.TextSelected || owner.CustomContextMenuManager.AppropriateContextMenuType == ContextMenuType.ImageAndLink || owner.CustomContextMenuManager.AppropriateContextMenuType == ContextMenuType.Image || owner.CustomContextMenuManager.AppropriateContextMenuType == ContextMenuType.Link)
             return 0;
         else
             return owner.UseDefaultContextMenu ? defaultItemsHMenu : 0; ;
     }
     else
     { return owner.UseDefaultContextMenu ? defaultItemsHMenu : 0; }
 }
Exemplo n.º 11
0
 public int contextMenuItemsForElement(WebView sender, CFDictionaryPropertyBag element, int defaultItemsHMenu)
 {
     return(0);
 }
Exemplo n.º 12
0
 public void contextMenuItemSelected(WebView sender, IntPtr item, CFDictionaryPropertyBag element)
 {
 }
Exemplo n.º 13
0
 public void mouseDidMoveOverElement(WebView sender, CFDictionaryPropertyBag elementInformation, uint modifierFlags)
 {
 }
Exemplo n.º 14
0
 public void decidePolicyForNewWindowAction(WebView webView, CFDictionaryPropertyBag actionInformation, WebURLRequest request, string frameName, IWebPolicyDecisionListener listener)
 {
     decidePolicyForNewWindowAction(webView, actionInformation, (IWebURLRequest)request, frameName, listener);
 }
        public void decidePolicyForNavigationAction(WebView WebView, CFDictionaryPropertyBag actionInformation, IWebURLRequest request, webFrame frame, IWebPolicyDecisionListener listener)
        {
            if (AllowNavigation || AllowInitialNavigation)
            {
                //use basic authentication if username and password are supplied.
                if (pwdEnabled && string.IsNullOrEmpty(request.valueForHTTPHeaderField("Authorization")) && wbc!=null)
                {

                    wbc.Navigate(request.url());
                    listener.ignore();
                    return;
                }

                listener.use();
            }
            else
                listener.ignore();
        }
 public int contextMenuItemsForElement(WebView sender, CFDictionaryPropertyBag element, int defaultItemsHMenu)
 {
     return owner.IsWebBrowserContextMenuEnabled ? defaultItemsHMenu : 0;
 }
Exemplo n.º 17
0
 public int contextMenuItemsForElement(WebView sender, CFDictionaryPropertyBag element, int defaultItemsHMenu)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 18
0
 public void decidePolicyForNavigationAction(WebView webView, CFDictionaryPropertyBag actionInformation, WebURLRequest request, IWebFrame frame, IWebPolicyDecisionListener listener)
 {
     decidePolicyForNavigationAction(webView, actionInformation, (IWebURLRequest)request, frame, listener);
 }
Exemplo n.º 19
0
 public void willSubmitForm(webFrame frame, webFrame sourceFrame, IDOMElement form, CFDictionaryPropertyBag values, IWebFormSubmissionListener listener)
 {
     SubmitForm((HTMLElement)HTMLElement.Create(form), listener);
 }
Exemplo n.º 20
0
 public IWebEmbeddedView embeddedViewWithArguments(WebView sender, webFrame frame, CFDictionaryPropertyBag arguments)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 21
0
 public void decidePolicyForNewWindowAction(WebView webView, CFDictionaryPropertyBag actionInformation, WebURLRequest request, string frameName, IWebPolicyDecisionListener listener)
 {
     decidePolicyForNewWindowAction(webView, actionInformation, (IWebURLRequest)request, frameName, listener);
 }
Exemplo n.º 22
0
 public IWebEmbeddedView embeddedViewWithArguments(WebView sender, webFrame frame, CFDictionaryPropertyBag arguments)
 {
     return(new DefaultWebEmbeddedView());
 }
Exemplo n.º 23
0
 public int contextMenuItemsForElement(WebView sender, CFDictionaryPropertyBag element, int defaultItemsHMenu)
 {
     return(owner.IsWebBrowserContextMenuEnabled ? defaultItemsHMenu : 0);
 }
Exemplo n.º 24
0
 public WebView createWebViewWithRequest(WebView sender, IWebURLRequest request, CFDictionaryPropertyBag windowFeatures)
 {
     if (owner.AllowNewWindows)
     {
         WebView view;
         CreateWebViewWithRequest(request, out view, true);
         return view;
     }
     else
     {
         return null;
     }
 }
Exemplo n.º 25
0
 public IWebEmbeddedView embeddedViewWithArguments(WebView sender, webFrame frame, CFDictionaryPropertyBag arguments)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 26
0
 public void decidePolicyForNewWindowAction(WebView WebView, CFDictionaryPropertyBag actionInformation, IWebURLRequest request, string frameName, IWebPolicyDecisionListener listener)
 {
     if (listener != null)
        listener.use();
     string url = request.url();
     NewWindowRequestUrlAvailable(url);
 }
Exemplo n.º 27
0
 public WebView createWebViewWithRequest(WebView sender, IWebURLRequest request, CFDictionaryPropertyBag windowFeatures)
 {
     if (owner.AllowNewWindows)
     {
         WebView view;
         CreateWebViewWithRequest(request, out view, true);
         return(view);
     }
     else
     {
         return(null);
     }
 }
Exemplo n.º 28
0
 public void willSubmitForm(webFrame frame, webFrame sourceFrame, IDOMElement form, CFDictionaryPropertyBag values, IWebFormSubmissionListener listener)
 {
     SubmitForm((HTMLElement)HTMLElement.Create(form),listener);
 }
Exemplo n.º 29
0
 public int contextMenuItemsForElement(WebView sender, CFDictionaryPropertyBag element, int defaultItemsHMenu)
 {
     throw new NotImplementedException();
 }
 public void contextMenuItemSelected(WebView sender, IntPtr item, CFDictionaryPropertyBag element)
 {
 }
Exemplo n.º 31
0
 public void decidePolicyForNavigationAction(WebView webView, CFDictionaryPropertyBag actionInformation, WebURLRequest request, IWebFrame frame, IWebPolicyDecisionListener listener)
 {
     decidePolicyForNavigationAction(webView, actionInformation, (IWebURLRequest)request, frame, listener);
 }
 public void mouseDidMoveOverElement(WebView sender, CFDictionaryPropertyBag elementInformation, uint modifierFlags)
 {
 }
Exemplo n.º 33
0
 public int contextMenuItemsForElement(WebView sender, CFDictionaryPropertyBag element, int defaultItemsHMenu)
 {
     if (!owner.IsWebBrowserContextMenuEnabled)  /* {@@} */
     {                                           /* {@@} */
         owner.ContextMenuShow();                /* {@@} */
     }                                           /* {@@} */
     return owner.IsWebBrowserContextMenuEnabled ? defaultItemsHMenu : 0;
 }