[cogl/wip/cogl-sharp: 39/51] cogl-sharp: Expose OnScreenTemplate



commit 402b79e3b5640415366893a634d0404c28a1ffc8
Author: Damien Lespiau <damien lespiau intel com>
Date:   Sun Nov 4 00:20:24 2012 +0000

    cogl-sharp: Expose OnScreenTemplate

 cogl-sharp/Makefile.am          |    2 +
 cogl-sharp/OnScreenTemplate.cs  |   48 +++++++++++++++++++++++++++++++++++++++
 cogl-sharp/_OnScreenTemplate.cs |   26 +++++++++++++++++++++
 cogl-sharp/parse-gir.py         |    4 +++
 4 files changed, 80 insertions(+), 0 deletions(-)
---
diff --git a/cogl-sharp/Makefile.am b/cogl-sharp/Makefile.am
index fb14622..499a229 100644
--- a/cogl-sharp/Makefile.am
+++ b/cogl-sharp/Makefile.am
@@ -22,6 +22,8 @@ sources =			\
 	Object.cs		\
 	OnScreen.cs		\
 	_OnScreen.cs		\
+	OnScreenTemplate.cs	\
+	_OnScreenTemplate.cs	\
 	Pipeline.cs		\
 	_Pipeline.cs		\
 	PipelineAlphaFunc.cs	\
diff --git a/cogl-sharp/OnScreenTemplate.cs b/cogl-sharp/OnScreenTemplate.cs
new file mode 100644
index 0000000..04b3f75
--- /dev/null
+++ b/cogl-sharp/OnScreenTemplate.cs
@@ -0,0 +1,48 @@
+/*
+ * Cogl
+ *
+ * An object oriented GL/GLES Abstraction/Utility Layer
+ *
+ * Copyright (C) 2012 Intel Corporation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ * Authors:
+ *   Damien Lespiau <damien lespiau intel com>
+ */
+
+using System;
+using System.Runtime.InteropServices;
+
+namespace Cogl
+{
+    public sealed partial class OnScreenTemplate : Object
+    {
+        public OnScreenTemplate(IntPtr h) : base(h) {}
+
+        [DllImport("cogl2.dll")]
+        private static extern IntPtr cogl_onscreen_template_new(IntPtr swap);
+
+        public OnScreenTemplate()
+        {
+            handle = cogl_onscreen_template_new(IntPtr.Zero);
+        }
+
+        public OnScreenTemplate(SwapChain swap_chain)
+        {
+            handle = cogl_onscreen_template_new(swap_chain.Handle);
+        }
+    }
+}
diff --git a/cogl-sharp/_OnScreenTemplate.cs b/cogl-sharp/_OnScreenTemplate.cs
new file mode 100644
index 0000000..708038f
--- /dev/null
+++ b/cogl-sharp/_OnScreenTemplate.cs
@@ -0,0 +1,26 @@
+/* This file has been generated by parse-gir.py, do not hand edit */
+using System;
+using System.Runtime.InteropServices;
+
+namespace Cogl
+{
+    public partial class OnScreenTemplate
+    {
+        [DllImport("cogl2.dll")]
+        public static extern void cogl_onscreen_template_set_samples_per_pixel(IntPtr o, int n);
+
+        public void SetSamplesPerPixel(int n)
+        {
+            cogl_onscreen_template_set_samples_per_pixel(handle, n);
+        }
+
+        [DllImport("cogl2.dll")]
+        public static extern void cogl_onscreen_template_set_swap_throttled(IntPtr o, bool throttled);
+
+        public void SetSwapThrottled(bool throttled)
+        {
+            cogl_onscreen_template_set_swap_throttled(handle, throttled);
+        }
+
+    }
+}
diff --git a/cogl-sharp/parse-gir.py b/cogl-sharp/parse-gir.py
index 9722975..f231175 100755
--- a/cogl-sharp/parse-gir.py
+++ b/cogl-sharp/parse-gir.py
@@ -26,6 +26,7 @@ enum_types = (
 object_types = (
     "Framebuffer",
     "Onscreen",
+    "OnscreenTemplate",
     "Pipeline",
     "SwapChain",
     "Texture",
@@ -62,6 +63,9 @@ name_overrides = {
             'swap_region',
         )
     },
+    'OnscreenTemplate': {
+        'class': 'OnScreenTemplate',
+    },
     'Offscreen': {
         'class': 'OffScreen'
     },



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]