summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Core/OpenGLView.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Core/OpenGLView.cs')
-rw-r--r--Xamarin.Forms.Core/OpenGLView.cs38
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