public void SetData(string data)
 {
     using (var stringInputStream = new InstanceWrapper <nsIStringInputStream>(Contracts.StringInputStream))
     {
         stringInputStream.Instance.SetData(data, data.Length);
         _inputStream.Instance.SetData(stringInputStream.Instance);
     }
 }
Exemplo n.º 2
0
 public bool Equals(InstanceWrapper <T> other)
 {
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     return(Instance.GetHashCode() == other.Instance.GetHashCode());
 }
        void GeckoWebBrowser_Loaded(object sender, System.Windows.RoutedEventArgs e)
        {
            Xpcom.Initialize();
            _webBrowser = new InstanceWrapper <nsIWebBrowser>(Contracts.WebBrowser);

            _webBrowserFocus = (nsIWebBrowserFocus)_webBrowser.Instance;
            _baseWindow      = (nsIBaseWindow)_webBrowser.Instance;
            _webNav          = (nsIWebNavigation)_webBrowser.Instance;
            _webBrowser.Instance.SetContainerWindowAttribute(this);
            _baseWindow.InitWindow(Handle, IntPtr.Zero, 0, 0, (int)ActualWidth, (int)ActualHeight);
            _baseWindow.Create();

            #region nsIWebProgressListener/nsIWebProgressListener2
            Guid nsIWebProgressListenerGUID  = typeof(nsIWebProgressListener).GUID;
            Guid nsIWebProgressListener2GUID = typeof(nsIWebProgressListener2).GUID;
            _webProgressWeakReference = _webProgressListener.GetWeakReference();
            _webBrowser.Instance.AddWebBrowserListener(_webProgressWeakReference, ref nsIWebProgressListenerGUID);
            _webBrowser.Instance.AddWebBrowserListener(_webProgressWeakReference, ref nsIWebProgressListener2GUID);
            #endregion
            _baseWindow.SetVisibilityAttribute(true);
        }
Exemplo n.º 4
0
 private GeckoWindow(nsIDOMWindow window)
 {
     //Interop.ComDebug.WriteDebugInfo( window );
     _domWindow = new InstanceWrapper <nsIDOMWindow>(window);
 }
Exemplo n.º 5
0
 public Pipe()
 {
     _pipe = new InstanceWrapper <nsIPipe>(Contracts.Pipe);
     _pipe.Instance.Init(true, true, 0, 0, null);
 }
Exemplo n.º 6
0
 public GeckoWindowCollection(nsIDOMWindowCollection collection)
 {
     _collection = new InstanceWrapper <nsIDOMWindowCollection>(collection);
 }
Exemplo n.º 7
0
 internal WritableVariant(nsIWritableVariant writableVariant)
 {
     _writableVariant = new InstanceWrapper <nsIWritableVariant>(writableVariant);
 }
Exemplo n.º 8
0
 /// <summary>
 /// Creates new writable Variant
 /// </summary>
 public WritableVariant()
 {
     _writableVariant = new InstanceWrapper <nsIWritableVariant>(Contracts.WritableVariant);
 }
Exemplo n.º 9
0
 public Sound()
 {
     _sound = new InstanceWrapper <nsISound>(Contracts.Sound);
     _sound.Instance.Init();
 }
 public GeckoMIMEInputStream()
 {
     _inputStream = new InstanceWrapper <nsIMIMEInputStream>(Contracts.MimeInputStream);
 }