Skip to content

Commit

Permalink
fix(net6): Adjust manual native ctors signature
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromelaban committed May 7, 2022
1 parent e569a04 commit 1815b79
Show file tree
Hide file tree
Showing 18 changed files with 359 additions and 267 deletions.
16 changes: 16 additions & 0 deletions build/PackageDiffIgnore.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8813,6 +8813,22 @@
<Member
fullName="System.UInt32 Windows.Foundation.Collections.ValueSet.get_Size()"
reason="Not part of UWP API" />

<!-- BEGIN .NET 6 ios updated native ctors -->
<Member fullName="System.Void Windows.UI.Xaml.Application..ctor(System.IntPtr handle)" reason="Changed by .NET 6 iOS" />
<Member fullName="System.Void Uno.UI.Views.Controls.BindableUIActivityIndicatorView..ctor(System.IntPtr handle)" reason="Changed by .NET 6 iOS" />
<Member fullName="System.Void Uno.UI.Views.Controls.BindableUIAlertView..ctor(System.IntPtr handle)" reason="Changed by .NET 6 iOS" />
<Member fullName="System.Void Uno.UI.Views.Controls.BindableUIButton..ctor(System.IntPtr handle)" reason="Changed by .NET 6 iOS" />
<Member fullName="System.Void Uno.UI.Views.Controls.BindableUIScrollView..ctor(System.IntPtr handle)" reason="Changed by .NET 6 iOS" />
<Member fullName="System.Void Uno.UI.Views.Controls.BindableUISwitch..ctor(System.IntPtr handle)" reason="Changed by .NET 6 iOS" />
<Member fullName="System.Void Uno.UI.Views.Controls.BindableUICollectionView..ctor(System.IntPtr handle)" reason="Changed by .NET 6 iOS" />
<Member fullName="System.Void Uno.UI.Controls.BindableSearchBar..ctor(System.IntPtr handle)" reason="Changed by .NET 6 iOS" />
<Member fullName="System.Void Uno.UI.Controls.BindableUISlider..ctor(System.IntPtr handle)" reason="Changed by .NET 6 iOS" />
<Member fullName="System.Void Uno.UI.Controls.BindableUIView..ctor(System.IntPtr handle)" reason="Changed by .NET 6 iOS" />
<Member fullName="System.Void Uno.UI.Controls.RootViewController..ctor(System.IntPtr handle)" reason="Changed by .NET 6 iOS" />
<Member fullName="System.Void Uno.UI.Controls.UnoNavigationBar..ctor(System.IntPtr handle)" reason="Changed by .NET 6 iOS" />
<Member fullName="System.Void Uno.UI.Controls.BindableNSView..ctor(System.IntPtr handle)" reason="Changed by .NET 6 iOS" />
<!-- END .NET 6 ios updated native ctors -->
</Methods>
<Properties>
<Member
Expand Down
7 changes: 6 additions & 1 deletion src/Uno.UI/Controls/BindableNSView.macOS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
using Windows.UI.Xaml.Media;
using AppKit;
using System.Collections;
using ObjCRuntime;

#if !NET6_0_OR_GREATER
using NativeHandle = System.IntPtr;
#endif

namespace Uno.UI.Controls
{
Expand Down Expand Up @@ -59,7 +64,7 @@ public BindableNSView()
}
}

public BindableNSView(IntPtr handle)
public BindableNSView(NativeHandle handle)
: base(handle)
{
Initialize();
Expand Down
7 changes: 6 additions & 1 deletion src/Uno.UI/Controls/BindableSearchBar.iOS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using Windows.UI.Xaml.Data;
using Uno.Client;
using CoreGraphics;
using ObjCRuntime;

#if XAMARIN_IOS_UNIFIED
using Foundation;
Expand All @@ -19,6 +20,10 @@
using MonoTouch.UIKit;
#endif

#if !NET6_0_OR_GREATER
using NativeHandle = System.IntPtr;
#endif

namespace Uno.UI.Controls
{
public partial class BindableSearchBar : UISearchBar, DependencyObject, System.ComponentModel.INotifyPropertyChanged
Expand Down Expand Up @@ -56,7 +61,7 @@ public BindableSearchBar(NSObjectFlag t)
Initialize();
}

public BindableSearchBar(IntPtr handle)
public BindableSearchBar(NativeHandle handle)
: base(handle)
{
Initialize();
Expand Down
7 changes: 6 additions & 1 deletion src/Uno.UI/Controls/BindableUIActivityIndicatorView.iOS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
using UIKit;
using Windows.UI.Xaml;
using CoreGraphics;
using ObjCRuntime;

#if !NET6_0_OR_GREATER
using NativeHandle = System.IntPtr;
#endif

namespace Uno.UI.Views.Controls
{
Expand Down Expand Up @@ -33,7 +38,7 @@ public BindableUIActivityIndicatorView(NSObjectFlag t)
InitializeBinder();
}

public BindableUIActivityIndicatorView(IntPtr handle)
public BindableUIActivityIndicatorView(NativeHandle handle)
: base(handle)
{
InitializeBinder();
Expand Down
7 changes: 6 additions & 1 deletion src/Uno.UI/Controls/BindableUIAlertView.iOS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using Windows.UI.Xaml.Data;
using Uno.UI.DataBinding;
using Windows.UI.Xaml;
using ObjCRuntime;

#if XAMARIN_IOS_UNIFIED
using Foundation;
Expand All @@ -14,6 +15,10 @@
using MonoTouch.UIKit;
#endif

#if !NET6_0_OR_GREATER
using NativeHandle = System.IntPtr;
#endif

namespace Uno.UI.Views.Controls
{
public partial class BindableUIAlertView : UIAlertView, DependencyObject
Expand All @@ -38,7 +43,7 @@ public BindableUIAlertView (RectangleF frame)
InitializeBinder();
}

public BindableUIAlertView (IntPtr handle)
public BindableUIAlertView (NativeHandle handle)
: base (handle)
{
InitializeBinder();
Expand Down
7 changes: 6 additions & 1 deletion src/Uno.UI/Controls/BindableUIButton.iOS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using Uno.Extensions;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Media;
using ObjCRuntime;

using Uno.Foundation.Logging;

Expand All @@ -15,6 +16,10 @@
using MonoTouch.UIKit;
#endif

#if !NET6_0_OR_GREATER
using NativeHandle = System.IntPtr;
#endif

namespace Uno.UI.Views.Controls
{
/// <summary>
Expand All @@ -28,7 +33,7 @@ public BindableUIButton()
InitializeBinder();
}

public BindableUIButton(IntPtr handle)
public BindableUIButton(NativeHandle handle)
: base(handle)
{
InitializeBinder();
Expand Down
7 changes: 6 additions & 1 deletion src/Uno.UI/Controls/BindableUIScrollView.iOS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using Windows.UI.Xaml.Data;
using Uno.UI.DataBinding;
using Windows.UI.Xaml;
using ObjCRuntime;

#if XAMARIN_IOS_UNIFIED
using Foundation;
Expand All @@ -14,11 +15,15 @@
using MonoTouch.UIKit;
#endif

#if !NET6_0_OR_GREATER
using NativeHandle = System.IntPtr;
#endif

namespace Uno.UI.Views.Controls
{
public partial class BindableUIScrollView : UIScrollView, DependencyObject
{
public BindableUIScrollView (IntPtr handle)
public BindableUIScrollView (NativeHandle handle)
: base (handle)
{
InitializeBinder();
Expand Down
7 changes: 6 additions & 1 deletion src/Uno.UI/Controls/BindableUISlider.iOS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
using UIKit;
using Windows.UI.Xaml;
using CoreGraphics;
using ObjCRuntime;

#if !NET6_0_OR_GREATER
using NativeHandle = System.IntPtr;
#endif

namespace Uno.UI.Controls
{
Expand Down Expand Up @@ -34,7 +39,7 @@ public BindableUISlider(NSObjectFlag t)
Initialize();
}

public BindableUISlider(IntPtr handle)
public BindableUISlider(NativeHandle handle)
: base(handle)
{
Initialize();
Expand Down
7 changes: 6 additions & 1 deletion src/Uno.UI/Controls/BindableUISwitch.iOS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using Windows.UI.Xaml;
using Windows.UI.Xaml.Media;
using Windows.UI;
using ObjCRuntime;

#if XAMARIN_IOS_UNIFIED
using Foundation;
Expand All @@ -15,6 +16,10 @@
using MonoTouch.UIKit;
#endif

#if !NET6_0_OR_GREATER
using NativeHandle = System.IntPtr;
#endif

namespace Uno.UI.Views.Controls
{
public partial class BindableUISwitch : UISwitch, DependencyObject
Expand Down Expand Up @@ -48,7 +53,7 @@ public BindableUISwitch(NSObjectFlag t)
InitializeBinder();
}

public BindableUISwitch(IntPtr handle)
public BindableUISwitch(NativeHandle handle)
: base(handle)
{
InitializeBinder();
Expand Down
7 changes: 6 additions & 1 deletion src/Uno.UI/Controls/BindableUIView.iOS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using Uno.Disposables;
using Uno.Extensions;
using Uno.UI.DataBinding;
using ObjCRuntime;

#if XAMARIN_IOS_UNIFIED
using Foundation;
Expand All @@ -20,6 +21,10 @@
using MonoTouch.UIKit;
#endif

#if !NET6_0_OR_GREATER
using NativeHandle = System.IntPtr;
#endif

namespace Uno.UI.Controls
{
public partial class BindableUIView : UIView, DependencyObject, IShadowChildrenProvider
Expand Down Expand Up @@ -79,7 +84,7 @@ public BindableUIView()
ClipsToBounds = false;
}

public BindableUIView(IntPtr handle)
public BindableUIView(NativeHandle handle)
: base(handle)
{
Initialize();
Expand Down
7 changes: 6 additions & 1 deletion src/Uno.UI/Controls/RootViewController.iOS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
using Uno.Extensions;
using Windows.Devices.Sensors;
using CoreGraphics;
using ObjCRuntime;

#if !NET6_0_OR_GREATER
using NativeHandle = System.IntPtr;
#endif

namespace Uno.UI.Controls
{
Expand Down Expand Up @@ -38,7 +43,7 @@ public RootViewController(NSCoder coder)
Initialize();
}

public RootViewController(IntPtr handle)
public RootViewController(NativeHandle handle)
: base(handle)
{
Initialize();
Expand Down
7 changes: 6 additions & 1 deletion src/Uno.UI/Controls/UnoNavigationBar.iOS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
using Windows.UI.Xaml;
using Foundation;
using UIKit;
using ObjCRuntime;

#if !NET6_0_OR_GREATER
using NativeHandle = System.IntPtr;
#endif

namespace Uno.UI.Controls
{
Expand Down Expand Up @@ -35,7 +40,7 @@ public UnoNavigationBar(NSObjectFlag t)
InitializeBinder();
}

public UnoNavigationBar(IntPtr handle)
public UnoNavigationBar(NativeHandle handle)
: base(handle)
{
InitializeBinder();
Expand Down
7 changes: 6 additions & 1 deletion src/Uno.UI/UI/Xaml/Application.iOS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,18 @@
using Uno.Foundation.Logging;
using System.Globalization;
using System.Threading;
using ObjCRuntime;

#if HAS_UNO_WINUI
using LaunchActivatedEventArgs = Microsoft.UI.Xaml.LaunchActivatedEventArgs;
#else
using LaunchActivatedEventArgs = Windows.ApplicationModel.Activation.LaunchActivatedEventArgs;
#endif

#if !NET6_0_OR_GREATER
using NativeHandle = System.IntPtr;
#endif

namespace Windows.UI.Xaml
{
[Register("UnoAppDelegate")]
Expand All @@ -39,7 +44,7 @@ public Application()
SubscribeBackgroundNotifications();
}

public Application(IntPtr handle) : base(handle)
public Application(NativeHandle handle) : base(handle)
{
}

Expand Down
7 changes: 6 additions & 1 deletion src/Uno.UI/UI/Xaml/Application.macOS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
using Uno.Extensions;
using Uno.Foundation.Logging;
using System.Linq;
using ObjCRuntime;

using Selector = ObjCRuntime.Selector;
using Windows.System.Profile;
Expand All @@ -25,6 +26,10 @@
using LaunchActivatedEventArgs = Windows.ApplicationModel.Activation.LaunchActivatedEventArgs;
#endif

#if !NET6_0_OR_GREATER
using NativeHandle = System.IntPtr;
#endif

namespace Windows.UI.Xaml
{
[Register("UnoAppDelegate")]
Expand All @@ -49,7 +54,7 @@ public Application()
SubscribeBackgroundNotifications();
}

public Application(IntPtr handle) : base(handle)
public Application(NativeHandle handle) : base(handle)
{

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using Windows.UI.Xaml.Data;
using Uno.UI.DataBinding;
using Windows.UI.Xaml;
using ObjCRuntime;

#if XAMARIN_IOS_UNIFIED
using Foundation;
Expand All @@ -14,6 +15,10 @@
using MonoTouch.UIKit;
#endif

#if !NET6_0_OR_GREATER
using NativeHandle = System.IntPtr;
#endif

namespace Uno.UI.Views.Controls
{
public partial class BindableUICollectionView : UICollectionView, DependencyObject
Expand All @@ -36,7 +41,7 @@ public BindableUICollectionView (NSObjectFlag t)
Initialize();
}

public BindableUICollectionView (IntPtr handle)
public BindableUICollectionView (NativeHandle handle)
: base (handle)
{
Initialize();
Expand Down
Loading

0 comments on commit 1815b79

Please sign in to comment.