diff options
author | Jason Smith <jason.smith@xamarin.com> | 2016-03-22 13:02:25 -0700 |
---|---|---|
committer | Jason Smith <jason.smith@xamarin.com> | 2016-03-22 16:13:41 -0700 |
commit | 17fdde66d94155fc62a034fa6658995bef6fd6e5 (patch) | |
tree | b5e5073a2a7b15cdbe826faa5c763e270a505729 /Xamarin.Forms.Core/OpenGLView.cs | |
download | xamarin-forms-17fdde66d94155fc62a034fa6658995bef6fd6e5.tar.gz xamarin-forms-17fdde66d94155fc62a034fa6658995bef6fd6e5.tar.bz2 xamarin-forms-17fdde66d94155fc62a034fa6658995bef6fd6e5.zip |
Initial import
Diffstat (limited to 'Xamarin.Forms.Core/OpenGLView.cs')
-rw-r--r-- | Xamarin.Forms.Core/OpenGLView.cs | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/Xamarin.Forms.Core/OpenGLView.cs b/Xamarin.Forms.Core/OpenGLView.cs new file mode 100644 index 00000000..530a2f0d --- /dev/null +++ b/Xamarin.Forms.Core/OpenGLView.cs @@ -0,0 +1,38 @@ +using System; +using Xamarin.Forms.Platform; + +namespace Xamarin.Forms +{ + [RenderWith(typeof(_OpenGLViewRenderer))] + public sealed class OpenGLView : View, IOpenGlViewController + { + #region Statics + + public static readonly BindableProperty HasRenderLoopProperty = BindableProperty.Create("HasRenderLoop", typeof(bool), typeof(OpenGLView), default(bool)); + + #endregion + + public bool HasRenderLoop + { + get { return (bool)GetValue(HasRenderLoopProperty); } + set { SetValue(HasRenderLoopProperty, value); } + } + + public Action<Rectangle> OnDisplay { get; set; } + + event EventHandler IOpenGlViewController.DisplayRequested + { + add { DisplayRequested += value; } + remove { DisplayRequested -= value; } + } + + public void Display() + { + EventHandler handler = DisplayRequested; + if (handler != null) + handler(this, EventArgs.Empty); + } + + event EventHandler DisplayRequested; + } +}
\ No newline at end of file |