summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.MacOS/Renderers
diff options
context:
space:
mode:
authorkingces95 <kingces95@users.noreply.github.com>2017-03-07 19:56:24 (GMT)
committerGitHub <noreply@github.com>2017-03-07 19:56:24 (GMT)
commite6d5186c8acbf37b877c7ca3c77a378352a3743d (patch)
treed61ca8ea619f7844e9e0a973dbd7bac794e39147 /Xamarin.Forms.Platform.MacOS/Renderers
parent2b92142ab2a501de71d3572efc0e5deb2b7bae9a (diff)
downloadxamarin-forms-e6d5186c8acbf37b877c7ca3c77a378352a3743d.zip
xamarin-forms-e6d5186c8acbf37b877c7ca3c77a378352a3743d.tar.gz
xamarin-forms-e6d5186c8acbf37b877c7ca3c77a378352a3743d.tar.bz2
Remove InternalsVisibleTo from Core to XF.Platforms.* (#782)
* Remove InternalsVisibleTo from Core to XF.Platforms.* * Changes per Jason's code review * Move LockableObservableListWrapper to internals namespace * Changes per Stephane's code review * update docs * Touch code to get CI to run tests * Rebase; Update documentation
Diffstat (limited to 'Xamarin.Forms.Platform.MacOS/Renderers')
-rw-r--r--Xamarin.Forms.Platform.MacOS/Renderers/ButtonRenderer.cs2
-rw-r--r--Xamarin.Forms.Platform.MacOS/Renderers/ImageRenderer.cs2
-rw-r--r--Xamarin.Forms.Platform.MacOS/Renderers/ListViewDataSource.cs1
-rw-r--r--Xamarin.Forms.Platform.MacOS/Renderers/MasterDetailPageRenderer.cs2
-rw-r--r--Xamarin.Forms.Platform.MacOS/Renderers/NavigationPageRenderer.cs2
-rw-r--r--Xamarin.Forms.Platform.MacOS/Renderers/PageRenderer.cs2
-rw-r--r--Xamarin.Forms.Platform.MacOS/Renderers/TabbedPageRenderer.cs2
-rw-r--r--Xamarin.Forms.Platform.MacOS/Renderers/WebViewRenderer.cs22
8 files changed, 18 insertions, 17 deletions
diff --git a/Xamarin.Forms.Platform.MacOS/Renderers/ButtonRenderer.cs b/Xamarin.Forms.Platform.MacOS/Renderers/ButtonRenderer.cs
index 05b87fa..b23b422 100644
--- a/Xamarin.Forms.Platform.MacOS/Renderers/ButtonRenderer.cs
+++ b/Xamarin.Forms.Platform.MacOS/Renderers/ButtonRenderer.cs
@@ -92,7 +92,7 @@ namespace Xamarin.Forms.Platform.MacOS
{
IImageSourceHandler handler;
FileImageSource source = Element.Image;
- if (source != null && (handler = Registrar.Registered.GetHandler<IImageSourceHandler>(source.GetType())) != null)
+ if (source != null && (handler = Internals.Registrar.Registered.GetHandler<IImageSourceHandler>(source.GetType())) != null)
{
NSImage uiimage;
try
diff --git a/Xamarin.Forms.Platform.MacOS/Renderers/ImageRenderer.cs b/Xamarin.Forms.Platform.MacOS/Renderers/ImageRenderer.cs
index 090df9a..f936f4a 100644
--- a/Xamarin.Forms.Platform.MacOS/Renderers/ImageRenderer.cs
+++ b/Xamarin.Forms.Platform.MacOS/Renderers/ImageRenderer.cs
@@ -83,7 +83,7 @@ namespace Xamarin.Forms.Platform.MacOS
((IImageController)Element).SetIsLoading(true);
- if (source != null && (handler = Registrar.Registered.GetHandler<IImageSourceHandler>(source.GetType())) != null)
+ if (source != null && (handler = Internals.Registrar.Registered.GetHandler<IImageSourceHandler>(source.GetType())) != null)
{
NSImage uiimage;
try
diff --git a/Xamarin.Forms.Platform.MacOS/Renderers/ListViewDataSource.cs b/Xamarin.Forms.Platform.MacOS/Renderers/ListViewDataSource.cs
index 6742053..0a0a9db 100644
--- a/Xamarin.Forms.Platform.MacOS/Renderers/ListViewDataSource.cs
+++ b/Xamarin.Forms.Platform.MacOS/Renderers/ListViewDataSource.cs
@@ -3,6 +3,7 @@ using System.Collections;
using System.Collections.Generic;
using AppKit;
using Foundation;
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms.Platform.MacOS
{
diff --git a/Xamarin.Forms.Platform.MacOS/Renderers/MasterDetailPageRenderer.cs b/Xamarin.Forms.Platform.MacOS/Renderers/MasterDetailPageRenderer.cs
index 8d2fd55..34005c3 100644
--- a/Xamarin.Forms.Platform.MacOS/Renderers/MasterDetailPageRenderer.cs
+++ b/Xamarin.Forms.Platform.MacOS/Renderers/MasterDetailPageRenderer.cs
@@ -19,7 +19,7 @@ namespace Xamarin.Forms.Platform.MacOS
{
var platformEffect = effect as PlatformEffect;
if (platformEffect != null)
- platformEffect.Container = View;
+ platformEffect.SetContainer(View);
}
protected MasterDetailPage MasterDetailPage => _masterDetailPage ?? (_masterDetailPage = (MasterDetailPage)Element);
diff --git a/Xamarin.Forms.Platform.MacOS/Renderers/NavigationPageRenderer.cs b/Xamarin.Forms.Platform.MacOS/Renderers/NavigationPageRenderer.cs
index 23d7f85..218d787 100644
--- a/Xamarin.Forms.Platform.MacOS/Renderers/NavigationPageRenderer.cs
+++ b/Xamarin.Forms.Platform.MacOS/Renderers/NavigationPageRenderer.cs
@@ -28,7 +28,7 @@ namespace Xamarin.Forms.Platform.MacOS
{
var platformEffect = effect as PlatformEffect;
if (platformEffect != null)
- platformEffect.Container = View;
+ platformEffect.SetContainer(View);
}
public NavigationPageRenderer() : this(IntPtr.Zero)
diff --git a/Xamarin.Forms.Platform.MacOS/Renderers/PageRenderer.cs b/Xamarin.Forms.Platform.MacOS/Renderers/PageRenderer.cs
index e0845d5..863b2a7 100644
--- a/Xamarin.Forms.Platform.MacOS/Renderers/PageRenderer.cs
+++ b/Xamarin.Forms.Platform.MacOS/Renderers/PageRenderer.cs
@@ -24,7 +24,7 @@ namespace Xamarin.Forms.Platform.MacOS
{
var platformEffect = effect as PlatformEffect;
if (platformEffect != null)
- platformEffect.Container = View;
+ platformEffect.SetContainer(View);
}
public VisualElement Element { get; private set; }
diff --git a/Xamarin.Forms.Platform.MacOS/Renderers/TabbedPageRenderer.cs b/Xamarin.Forms.Platform.MacOS/Renderers/TabbedPageRenderer.cs
index 3aee095..e1591be 100644
--- a/Xamarin.Forms.Platform.MacOS/Renderers/TabbedPageRenderer.cs
+++ b/Xamarin.Forms.Platform.MacOS/Renderers/TabbedPageRenderer.cs
@@ -80,7 +80,7 @@ namespace Xamarin.Forms.Platform.MacOS
{
var platformEffect = effect as PlatformEffect;
if (platformEffect != null)
- platformEffect.Container = View;
+ platformEffect.SetContainer(View);
}
public void SetElementSize(Size size)
diff --git a/Xamarin.Forms.Platform.MacOS/Renderers/WebViewRenderer.cs b/Xamarin.Forms.Platform.MacOS/Renderers/WebViewRenderer.cs
index 8d93c2c..509c38f 100644
--- a/Xamarin.Forms.Platform.MacOS/Renderers/WebViewRenderer.cs
+++ b/Xamarin.Forms.Platform.MacOS/Renderers/WebViewRenderer.cs
@@ -13,7 +13,7 @@ namespace Xamarin.Forms.Platform.MacOS
WebNavigationEvent _lastBackForwardEvent;
WebNavigationEvent _lastEvent;
- IElementController ElementController => Element;
+ IWebViewController ElementController => Element;
void IWebViewDelegate.LoadHtml(string html, string baseUrl)
{
@@ -43,9 +43,9 @@ namespace Xamarin.Forms.Platform.MacOS
Control.OnFinishedLoading += OnNSWebViewFinishedLoad;
Control.OnFailedLoading += OnNSWebViewFailedLoadWithError;
- Element.EvalRequested += OnEvalRequested;
- Element.GoBackRequested += OnGoBackRequested;
- Element.GoForwardRequested += OnGoForwardRequested;
+ ElementController.EvalRequested += OnEvalRequested;
+ ElementController.GoBackRequested += OnGoBackRequested;
+ ElementController.GoForwardRequested += OnGoForwardRequested;
Layer.BackgroundColor = NSColor.Clear.CGColor;
}
@@ -69,9 +69,9 @@ namespace Xamarin.Forms.Platform.MacOS
_disposed = true;
Control.OnFinishedLoading -= OnNSWebViewFinishedLoad;
Control.OnFailedLoading -= OnNSWebViewFailedLoadWithError;
- Element.EvalRequested -= OnEvalRequested;
- Element.GoBackRequested -= OnGoBackRequested;
- Element.GoForwardRequested -= OnGoForwardRequested;
+ ElementController.EvalRequested -= OnEvalRequested;
+ ElementController.GoBackRequested -= OnGoBackRequested;
+ ElementController.GoForwardRequested -= OnGoForwardRequested;
}
base.Dispose(disposing);
}
@@ -90,8 +90,8 @@ namespace Xamarin.Forms.Platform.MacOS
{
if (Element == null)
return;
- Element.CanGoBack = Control.CanGoBack();
- Element.CanGoForward = Control.CanGoForward();
+ ElementController.CanGoBack = Control.CanGoBack();
+ ElementController.CanGoForward = Control.CanGoForward();
}
void OnEvalRequested(object sender, EvalRequested eventArg)
@@ -124,7 +124,7 @@ namespace Xamarin.Forms.Platform.MacOS
void OnNSWebViewFailedLoadWithError(object sender, WebKit.WebResourceErrorEventArgs e)
{
_lastEvent = _lastBackForwardEvent;
- Element?.SendNavigated(new WebNavigatedEventArgs(_lastEvent, new UrlWebViewSource { Url = Control.MainFrameUrl },
+ ElementController?.SendNavigated(new WebNavigatedEventArgs(_lastEvent, new UrlWebViewSource { Url = Control.MainFrameUrl },
Control.MainFrameUrl, WebNavigationResult.Failure));
UpdateCanGoBackForward();
@@ -140,7 +140,7 @@ namespace Xamarin.Forms.Platform.MacOS
_ignoreSourceChanges = false;
_lastEvent = _lastBackForwardEvent;
- Element?.SendNavigated(new WebNavigatedEventArgs(_lastEvent, Element?.Source, Control.MainFrameUrl,
+ ElementController?.SendNavigated(new WebNavigatedEventArgs(_lastEvent, Element?.Source, Control.MainFrameUrl,
WebNavigationResult.Success));
UpdateCanGoBackForward();