public CTTabContentsController(string name, NSBundle bundle, CTTabContents contents)
            : base(NSObjectFlag.Empty)
        {
            if (name == null)
            {
                throw new ArgumentNullException("name");
            }
            if (bundle == null)
            {
                throw new ArgumentNullException("bundle");
            }
            if (contents == null)
            {
                throw new ArgumentNullException("contents");
            }
            var nsname = NSString.CreateNative(name);

            IsDirectBinding = GetType().Assembly == global::ChromiumTabsAPI.Messaging.this_assembly;
            if (IsDirectBinding)
            {
                Handle = MonoMac.ObjCRuntime.Messaging.IntPtr_objc_msgSend_IntPtr_IntPtr_IntPtr(this.Handle, selInitWithNibNameBundleContents_Handle, nsname, bundle.Handle, contents.Handle);
            }
            else
            {
                Handle = MonoMac.ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper_IntPtr_IntPtr_IntPtr(this.SuperHandle, selInitWithNibNameBundleContents_Handle, nsname, bundle.Handle, contents.Handle);
            }
            NSString.ReleaseNative(nsname);
        }
Exemple #2
0
 public virtual void UpdateToolbarWithContents(CTTabContents contents, bool shouldRestore)
 {
     if (IsDirectBinding)
     {
         MonoMac.ObjCRuntime.Messaging.void_objc_msgSend_IntPtr_bool(this.Handle, selUpdateToolbarWithContentsShouldRestoreState_Handle, contents == null ? IntPtr.Zero : contents.Handle, shouldRestore);
     }
     else
     {
         MonoMac.ObjCRuntime.Messaging.void_objc_msgSendSuper_IntPtr_bool(this.SuperHandle, selUpdateToolbarWithContentsShouldRestoreState_Handle, contents == null ? IntPtr.Zero : contents.Handle, shouldRestore);
     }
 }
Exemple #3
0
 public virtual CTTabContents CreateBlankTabBasedOn(CTTabContents baseContents)
 {
     if (IsDirectBinding)
     {
         return((CTTabContents)Runtime.GetNSObject(MonoMac.ObjCRuntime.Messaging.IntPtr_objc_msgSend_IntPtr(this.Handle, selCreateBlankTabBasedOn_Handle, baseContents == null ? IntPtr.Zero : baseContents.Handle)));
     }
     else
     {
         return((CTTabContents)Runtime.GetNSObject(MonoMac.ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper_IntPtr(this.SuperHandle, selCreateBlankTabBasedOn_Handle, baseContents == null ? IntPtr.Zero : baseContents.Handle)));
     }
 }
Exemple #4
0
 public CTTabContents(CTTabContents baseContents)
     : base(NSObjectFlag.Empty)
 {
     IsDirectBinding = GetType().Assembly == global::ChromiumTabsAPI.Messaging.this_assembly;
     if (IsDirectBinding)
     {
         Handle = MonoMac.ObjCRuntime.Messaging.IntPtr_objc_msgSend_IntPtr(this.Handle, selInitWithBaseTabContents_Handle, baseContents == null ? IntPtr.Zero : baseContents.Handle);
     }
     else
     {
         Handle = MonoMac.ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper_IntPtr(this.SuperHandle, selInitWithBaseTabContents_Handle, baseContents == null ? IntPtr.Zero : baseContents.Handle);
     }
 }
 public virtual void TabDidChange(CTTabContents updatedContents)
 {
     if (updatedContents == null)
     {
         throw new ArgumentNullException("updatedContents");
     }
     if (IsDirectBinding)
     {
         MonoMac.ObjCRuntime.Messaging.void_objc_msgSend_IntPtr(this.Handle, selTabDidChange_Handle, updatedContents.Handle);
     }
     else
     {
         MonoMac.ObjCRuntime.Messaging.void_objc_msgSendSuper_IntPtr(this.SuperHandle, selTabDidChange_Handle, updatedContents.Handle);
     }
 }
Exemple #6
0
 public virtual CTTabContents AddTabContents(CTTabContents contents, bool foreground)
 {
     if (contents == null)
     {
         throw new ArgumentNullException("contents");
     }
     if (IsDirectBinding)
     {
         return((CTTabContents)Runtime.GetNSObject(MonoMac.ObjCRuntime.Messaging.IntPtr_objc_msgSend_IntPtr_bool(this.Handle, selAddTabContentsInForeground_Handle, contents.Handle, foreground)));
     }
     else
     {
         return((CTTabContents)Runtime.GetNSObject(MonoMac.ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper_IntPtr_bool(this.SuperHandle, selAddTabContentsInForeground_Handle, contents.Handle, foreground)));
     }
 }
 public virtual void DropTabContents(CTTabContents contents, global::System.Drawing.RectangleF frame, bool pinned)
 {
     if (contents == null)
     {
         throw new ArgumentNullException("contents");
     }
     if (IsDirectBinding)
     {
         ChromiumTabsAPI.Messaging.void_objc_msgSend_IntPtr_RectangleF_bool(this.Handle, selDropTabContentsWithFrameAsPinnedTab_Handle, contents.Handle, frame, pinned);
     }
     else
     {
         ChromiumTabsAPI.Messaging.void_objc_msgSendSuper_IntPtr_RectangleF_bool(this.SuperHandle, selDropTabContentsWithFrameAsPinnedTab_Handle, contents.Handle, frame, pinned);
     }
 }
Exemple #8
0
 public virtual bool RunUnloadListenerBeforeClosing(CTTabContents contents)
 {
     if (contents == null)
     {
         throw new ArgumentNullException("contents");
     }
     if (IsDirectBinding)
     {
         return(MonoMac.ObjCRuntime.Messaging.bool_objc_msgSend_IntPtr(this.Handle, selRunUnloadListenerBeforeClosing_Handle, contents.Handle));
     }
     else
     {
         return(MonoMac.ObjCRuntime.Messaging.bool_objc_msgSendSuper_IntPtr(this.SuperHandle, selRunUnloadListenerBeforeClosing_Handle, contents.Handle));
     }
 }
Exemple #9
0
 public virtual void CreateHistoricalTab(CTTabContents contents)
 {
     if (contents == null)
     {
         throw new ArgumentNullException("contents");
     }
     if (IsDirectBinding)
     {
         MonoMac.ObjCRuntime.Messaging.void_objc_msgSend_IntPtr(this.Handle, selCreateHistoricalTab_Handle, contents.Handle);
     }
     else
     {
         MonoMac.ObjCRuntime.Messaging.void_objc_msgSendSuper_IntPtr(this.SuperHandle, selCreateHistoricalTab_Handle, contents.Handle);
     }
 }
Exemple #10
0
 public virtual CTBrowser CreateNewStripWithContents(CTTabContents contents)
 {
     if (contents == null)
     {
         throw new ArgumentNullException("contents");
     }
     if (IsDirectBinding)
     {
         return((CTBrowser)Runtime.GetNSObject(MonoMac.ObjCRuntime.Messaging.IntPtr_objc_msgSend_IntPtr(this.Handle, selCreateNewStripWithContents_Handle, contents.Handle)));
     }
     else
     {
         return((CTBrowser)Runtime.GetNSObject(MonoMac.ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper_IntPtr(this.SuperHandle, selCreateNewStripWithContents_Handle, contents.Handle)));
     }
 }
Exemple #11
0
 public virtual void ReplaceTabContentsAtIndex(int index, CTTabContents contents)
 {
     if (contents == null)
     {
         throw new ArgumentNullException("contents");
     }
     if (IsDirectBinding)
     {
         MonoMac.ObjCRuntime.Messaging.void_objc_msgSend_int_IntPtr(this.Handle, selReplaceTabContentsAtIndexWithTabContents_Handle, index, contents.Handle);
     }
     else
     {
         MonoMac.ObjCRuntime.Messaging.void_objc_msgSendSuper_int_IntPtr(this.SuperHandle, selReplaceTabContentsAtIndexWithTabContents_Handle, index, contents.Handle);
     }
 }
Exemple #12
0
 public virtual int IndexOfTabContents(CTTabContents contents)
 {
     if (contents == null)
     {
         throw new ArgumentNullException("contents");
     }
     if (IsDirectBinding)
     {
         return(MonoMac.ObjCRuntime.Messaging.int_objc_msgSend_IntPtr(this.Handle, selIndexOfTabContents_Handle, contents.Handle));
     }
     else
     {
         return(MonoMac.ObjCRuntime.Messaging.int_objc_msgSendSuper_IntPtr(this.SuperHandle, selIndexOfTabContents_Handle, contents.Handle));
     }
 }
 public virtual void UpdateToolbarWithContents(CTTabContents tab, bool shouldRestore)
 {
     if (tab == null)
     {
         throw new ArgumentNullException("tab");
     }
     if (IsDirectBinding)
     {
         MonoMac.ObjCRuntime.Messaging.void_objc_msgSend_IntPtr_bool(this.Handle, selUpdateToolbarWithContentsShouldRestoreState_Handle, tab.Handle, shouldRestore);
     }
     else
     {
         MonoMac.ObjCRuntime.Messaging.void_objc_msgSendSuper_IntPtr_bool(this.SuperHandle, selUpdateToolbarWithContentsShouldRestoreState_Handle, tab.Handle, shouldRestore);
     }
 }
 public CTTabContentsController(CTTabContents contents)
     : base(NSObjectFlag.Empty)
 {
     if (contents == null)
     {
         throw new ArgumentNullException("contents");
     }
     IsDirectBinding = GetType().Assembly == global::ChromiumTabsAPI.Messaging.this_assembly;
     if (IsDirectBinding)
     {
         Handle = MonoMac.ObjCRuntime.Messaging.IntPtr_objc_msgSend_IntPtr(this.Handle, selInitWithContents_Handle, contents.Handle);
     }
     else
     {
         Handle = MonoMac.ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper_IntPtr(this.SuperHandle, selInitWithContents_Handle, contents.Handle);
     }
 }
Exemple #15
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 abstract CTBrowser CreateNewStripWithContents(CTTabContents contents);
 public abstract void CreateHistoricalTab(CTTabContents contents);
 public abstract bool RunUnloadListenerBeforeClosing(CTTabContents contents);