summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Lespiau <damien.lespiau@intel.com>2012-11-04 00:47:35 +0000
committerDamien Lespiau <damien.lespiau@intel.com>2013-01-04 20:29:36 +0000
commit7e42974ec072355d1a59747115899db058d7bd30 (patch)
treece85dad9fd8bfd894d36559550360840ca9492df
parent57f1ff6432e86cccecfa3fe38f09c8c114d4542f (diff)
downloadcogl-7e42974ec072355d1a59747115899db058d7bd30.tar.gz
cogl-sharp: Add Context to the list of known types
This allows to generate Framebuffer.GetContext()
-rw-r--r--cogl-sharp/Context.cs2
-rw-r--r--cogl-sharp/Makefile.am1
-rw-r--r--cogl-sharp/_Context.cs10
-rw-r--r--cogl-sharp/_FrameBuffer.cs9
-rwxr-xr-xcogl-sharp/parse-gir.py1
5 files changed, 22 insertions, 1 deletions
diff --git a/cogl-sharp/Context.cs b/cogl-sharp/Context.cs
index 6665a866..e4cec391 100644
--- a/cogl-sharp/Context.cs
+++ b/cogl-sharp/Context.cs
@@ -28,7 +28,7 @@ using System.Runtime.InteropServices;
namespace Cogl
{
- public sealed class Context : Cogl.Object
+ public sealed partial class Context : Cogl.Object
{
public Context(IntPtr h) : base(h) {}
diff --git a/cogl-sharp/Makefile.am b/cogl-sharp/Makefile.am
index 16c340d8..60a060df 100644
--- a/cogl-sharp/Makefile.am
+++ b/cogl-sharp/Makefile.am
@@ -13,6 +13,7 @@ sources = \
Color.cs \
ColorMask.cs \
Context.cs \
+ _Context.cs \
Driver.cs \
Exception.cs \
FrameBuffer.cs \
diff --git a/cogl-sharp/_Context.cs b/cogl-sharp/_Context.cs
new file mode 100644
index 00000000..7a17cb0f
--- /dev/null
+++ b/cogl-sharp/_Context.cs
@@ -0,0 +1,10 @@
+/* This file has been generated by parse-gir.py, do not hand edit */
+using System;
+using System.Runtime.InteropServices;
+
+namespace Cogl
+{
+ public partial class Context
+ {
+ }
+}
diff --git a/cogl-sharp/_FrameBuffer.cs b/cogl-sharp/_FrameBuffer.cs
index 55b240b7..8f40e5c4 100644
--- a/cogl-sharp/_FrameBuffer.cs
+++ b/cogl-sharp/_FrameBuffer.cs
@@ -103,6 +103,15 @@ namespace Cogl
}
[DllImport("cogl2.dll")]
+ public static extern IntPtr cogl_framebuffer_get_context(IntPtr o);
+
+ public Context GetContext()
+ {
+ IntPtr p = cogl_framebuffer_get_context(handle);
+ return new Context(p);
+ }
+
+ [DllImport("cogl2.dll")]
public static extern IntPtr cogl_framebuffer_get_depth_texture(IntPtr o);
public Texture GetDepthTexture()
diff --git a/cogl-sharp/parse-gir.py b/cogl-sharp/parse-gir.py
index f945de45..b6cc13b4 100755
--- a/cogl-sharp/parse-gir.py
+++ b/cogl-sharp/parse-gir.py
@@ -24,6 +24,7 @@ enum_types = (
# object types to dump (.gir names)
object_types = (
+ "Context",
"Framebuffer",
"Onscreen",
"OnscreenTemplate",