Beispiel #1
0
        public CTToolbarController(string nibName, NSBundle bundle, CTBrowser browser)
            : base(NSObjectFlag.Empty)
        {
            if (nibName == null)
            {
                throw new ArgumentNullException("nibName");
            }
            if (bundle == null)
            {
                throw new ArgumentNullException("bundle");
            }
            if (browser == null)
            {
                throw new ArgumentNullException("browser");
            }
            var nsnibName = NSString.CreateNative(nibName);

            IsDirectBinding = GetType().Assembly == global::ChromiumTabsAPI.Messaging.this_assembly;
            if (IsDirectBinding)
            {
                Handle = MonoMac.ObjCRuntime.Messaging.IntPtr_objc_msgSend_IntPtr_IntPtr_IntPtr(this.Handle, selInitWithNibNameBundleBrowser_Handle, nsnibName, bundle.Handle, browser.Handle);
            }
            else
            {
                Handle = MonoMac.ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper_IntPtr_IntPtr_IntPtr(this.SuperHandle, selInitWithNibNameBundleBrowser_Handle, nsnibName, bundle.Handle, browser.Handle);
            }
            NSString.ReleaseNative(nsnibName);
        }
Beispiel #2
0
 public virtual void TabDidDetachFromBrowser(CTBrowser browser, int index)
 {
     if (browser == null)
     {
         throw new ArgumentNullException("browser");
     }
     if (IsDirectBinding)
     {
         MonoMac.ObjCRuntime.Messaging.void_objc_msgSend_IntPtr_int(this.Handle, selTabDidDetachFromBrowserAtIndex_Handle, browser.Handle, index);
     }
     else
     {
         MonoMac.ObjCRuntime.Messaging.void_objc_msgSendSuper_IntPtr_int(this.SuperHandle, selTabDidDetachFromBrowserAtIndex_Handle, browser.Handle, index);
     }
 }
Beispiel #3
0
 public virtual void TabDidInsertIntoBrowser(CTBrowser browser, int index, bool foreground)
 {
     if (browser == null)
     {
         throw new ArgumentNullException("browser");
     }
     if (IsDirectBinding)
     {
         MonoMac.ObjCRuntime.Messaging.void_objc_msgSend_IntPtr_int_bool(this.Handle, selTabDidInsertIntoBrowserAtIndexInForeground_Handle, browser.Handle, index, foreground);
     }
     else
     {
         MonoMac.ObjCRuntime.Messaging.void_objc_msgSendSuper_IntPtr_int_bool(this.SuperHandle, selTabDidInsertIntoBrowserAtIndexInForeground_Handle, browser.Handle, index, foreground);
     }
 }
 public CTBrowserWindowController(CTBrowser browser)
     : base(NSObjectFlag.Empty)
 {
     if (browser == null)
     {
         throw new ArgumentNullException("browser");
     }
     IsDirectBinding = GetType().Assembly == global::ChromiumTabsAPI.Messaging.this_assembly;
     if (IsDirectBinding)
     {
         Handle = MonoMac.ObjCRuntime.Messaging.IntPtr_objc_msgSend_IntPtr(this.Handle, selInitWithBrowser_Handle, browser.Handle);
     }
     else
     {
         Handle = MonoMac.ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper_IntPtr(this.SuperHandle, selInitWithBrowser_Handle, browser.Handle);
     }
 }
Beispiel #5
0
 public virtual void TabReplacedinBrowser(CTTabContents oldContents, CTBrowser browser, int index)
 {
     if (oldContents == null)
     {
         throw new ArgumentNullException("oldContents");
     }
     if (browser == null)
     {
         throw new ArgumentNullException("browser");
     }
     if (IsDirectBinding)
     {
         MonoMac.ObjCRuntime.Messaging.void_objc_msgSend_IntPtr_IntPtr_int(this.Handle, selTabReplacedInBrowserAtIndex_Handle, oldContents.Handle, browser.Handle, index);
     }
     else
     {
         MonoMac.ObjCRuntime.Messaging.void_objc_msgSendSuper_IntPtr_IntPtr_int(this.SuperHandle, selTabReplacedInBrowserAtIndex_Handle, oldContents.Handle, browser.Handle, index);
     }
 }
        public CTBrowserWindowController(string windowNibPath, CTBrowser browser)
            : base(NSObjectFlag.Empty)
        {
            if (windowNibPath == null)
            {
                throw new ArgumentNullException("windowNibPath");
            }
            if (browser == null)
            {
                throw new ArgumentNullException("browser");
            }
            var nswindowNibPath = NSString.CreateNative(windowNibPath);

            IsDirectBinding = GetType().Assembly == global::ChromiumTabsAPI.Messaging.this_assembly;
            if (IsDirectBinding)
            {
                Handle = MonoMac.ObjCRuntime.Messaging.IntPtr_objc_msgSend_IntPtr_IntPtr(this.Handle, selInitWithWindowNibPathBrowser_Handle, nswindowNibPath, browser.Handle);
            }
            else
            {
                Handle = MonoMac.ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper_IntPtr_IntPtr(this.SuperHandle, selInitWithWindowNibPathBrowser_Handle, nswindowNibPath, browser.Handle);
            }
            NSString.ReleaseNative(nswindowNibPath);
        }
 public CTTabStripController(CTTabStripView view, global::MonoMac.AppKit.NSView switchView, CTBrowser browser)
     : base(NSObjectFlag.Empty)
 {
     if (view == null)
     {
         throw new ArgumentNullException("view");
     }
     if (switchView == null)
     {
         throw new ArgumentNullException("switchView");
     }
     if (browser == null)
     {
         throw new ArgumentNullException("browser");
     }
     IsDirectBinding = GetType().Assembly == global::ChromiumTabsAPI.Messaging.this_assembly;
     if (IsDirectBinding)
     {
         Handle = MonoMac.ObjCRuntime.Messaging.IntPtr_objc_msgSend_IntPtr_IntPtr_IntPtr(this.Handle, selInitWithViewSwitchViewBrowser_Handle, view.Handle, switchView.Handle, browser.Handle);
     }
     else
     {
         Handle = MonoMac.ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper_IntPtr_IntPtr_IntPtr(this.SuperHandle, selInitWithViewSwitchViewBrowser_Handle, view.Handle, switchView.Handle, browser.Handle);
     }
 }