[cogl/wip/cogl-sharp: 38/51] cogl-sharp: Expose SwapChain



commit 42226a3d1da5d65c9b42d7f175482bf9acbd9b84
Author: Damien Lespiau <damien lespiau intel com>
Date:   Sun Nov 4 00:13:26 2012 +0000

    cogl-sharp: Expose SwapChain

 cogl-sharp/Makefile.am   |    2 ++
 cogl-sharp/SwapChain.cs  |   43 +++++++++++++++++++++++++++++++++++++++++++
 cogl-sharp/_SwapChain.cs |   26 ++++++++++++++++++++++++++
 cogl-sharp/parse-gir.py  |    1 +
 4 files changed, 72 insertions(+), 0 deletions(-)
---
diff --git a/cogl-sharp/Makefile.am b/cogl-sharp/Makefile.am
index 8f4bba6..fb14622 100644
--- a/cogl-sharp/Makefile.am
+++ b/cogl-sharp/Makefile.am
@@ -31,6 +31,8 @@ sources =			\
 	PixelFormat.cs		\
 	Quaternion.cs		\
 	RendererConstraint.cs	\
+	SwapChain.cs		\
+	_SwapChain.cs		\
 	Texture.cs		\
 	_Texture.cs		\
 	TextureFlags.cs		\
diff --git a/cogl-sharp/SwapChain.cs b/cogl-sharp/SwapChain.cs
new file mode 100644
index 0000000..1561695
--- /dev/null
+++ b/cogl-sharp/SwapChain.cs
@@ -0,0 +1,43 @@
+/*
+ * 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 SwapChain : Cogl.Object
+    {
+        public SwapChain(IntPtr h) : base(h) {}
+
+        [DllImport("cogl2.dll")]
+        private static extern IntPtr cogl_swap_chain_new();
+
+        public SwapChain()
+        {
+            handle = cogl_swap_chain_new();
+        }
+    }
+}
diff --git a/cogl-sharp/_SwapChain.cs b/cogl-sharp/_SwapChain.cs
new file mode 100644
index 0000000..283ec01
--- /dev/null
+++ b/cogl-sharp/_SwapChain.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 SwapChain
+    {
+        [DllImport("cogl2.dll")]
+        public static extern void cogl_swap_chain_set_has_alpha(IntPtr o, bool has_alpha);
+
+        public void SetHasAlpha(bool has_alpha)
+        {
+            cogl_swap_chain_set_has_alpha(handle, has_alpha);
+        }
+
+        [DllImport("cogl2.dll")]
+        public static extern void cogl_swap_chain_set_length(IntPtr o, int length);
+
+        public void SetLength(int length)
+        {
+            cogl_swap_chain_set_length(handle, length);
+        }
+
+    }
+}
diff --git a/cogl-sharp/parse-gir.py b/cogl-sharp/parse-gir.py
index a170ab3..9722975 100755
--- a/cogl-sharp/parse-gir.py
+++ b/cogl-sharp/parse-gir.py
@@ -27,6 +27,7 @@ object_types = (
     "Framebuffer",
     "Onscreen",
     "Pipeline",
+    "SwapChain",
     "Texture",
 )
 



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