[cogl/wip/cogl-sharp: 2/8] cogl-sharp: Expose PipelineWrapMode
- From: Damien Lespiau <dlespiau src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl/wip/cogl-sharp: 2/8] cogl-sharp: Expose PipelineWrapMode
- Date: Tue, 2 Oct 2012 16:16:24 +0000 (UTC)
commit 9e3a6824d828a6a13502abafabffad64a757d9ea
Author: Damien Lespiau <damien lespiau intel com>
Date: Mon Oct 1 22:25:19 2012 +0100
cogl-sharp: Expose PipelineWrapMode
And thus some extra methods of Pipeline. This also fixes multi-words
enum members.
cogl-sharp/Makefile.am | 29 ++++++++++----------
cogl-sharp/PipelineWrapMode.cs | 13 +++++++++
cogl-sharp/_Pipeline.cs | 56 ++++++++++++++++++++++++++++++++++++++++
cogl-sharp/parse-gir.py | 4 ++-
4 files changed, 87 insertions(+), 15 deletions(-)
---
diff --git a/cogl-sharp/Makefile.am b/cogl-sharp/Makefile.am
index 7e9f953..4db7611 100644
--- a/cogl-sharp/Makefile.am
+++ b/cogl-sharp/Makefile.am
@@ -8,20 +8,21 @@ assembly_DATA = cogl2-sharp.dll cogl2-sharp.dll.config cogl2-sharp.dll.mdb
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = cogl2-sharp.pc
-sources = \
- BufferBit.cs \
- Color.cs \
- ColorMask.cs \
- Context.cs \
- FrameBuffer.cs \
- _FrameBuffer.cs \
- Matrix.cs \
- Object.cs \
- OnScreen.cs \
- Pipeline.cs \
- _Pipeline.cs \
- PixelFormat.cs \
- AssemblyInfo.cs \
+sources = \
+ BufferBit.cs \
+ Color.cs \
+ ColorMask.cs \
+ Context.cs \
+ FrameBuffer.cs \
+ _FrameBuffer.cs \
+ Matrix.cs \
+ Object.cs \
+ OnScreen.cs \
+ Pipeline.cs \
+ _Pipeline.cs \
+ PipelineWrapMode.cs \
+ PixelFormat.cs \
+ AssemblyInfo.cs \
$(NULL)
cogl2-sharp.dll: $(sources)
diff --git a/cogl-sharp/PipelineWrapMode.cs b/cogl-sharp/PipelineWrapMode.cs
new file mode 100644
index 0000000..ec4a6e8
--- /dev/null
+++ b/cogl-sharp/PipelineWrapMode.cs
@@ -0,0 +1,13 @@
+/* This file has been generated by parse-gir.py, do not hand edit */
+using System;
+
+namespace Cogl
+{
+ public enum PipelineWrapMode
+ {
+ Repeat = 10497,
+ MirroredRepeat = 33648,
+ ClampToEdge = 33071,
+ Automatic = 519
+ }
+}
diff --git a/cogl-sharp/_Pipeline.cs b/cogl-sharp/_Pipeline.cs
index 39e8813..ed44652 100644
--- a/cogl-sharp/_Pipeline.cs
+++ b/cogl-sharp/_Pipeline.cs
@@ -40,6 +40,30 @@ namespace Cogl
}
[DllImport("cogl2.dll")]
+ public static extern PipelineWrapMode cogl_pipeline_get_layer_wrap_mode_p(IntPtr o, int layer_index);
+
+ public PipelineWrapMode GetLayerWrapModeP(int layer_index)
+ {
+ return cogl_pipeline_get_layer_wrap_mode_p(handle, layer_index);
+ }
+
+ [DllImport("cogl2.dll")]
+ public static extern PipelineWrapMode cogl_pipeline_get_layer_wrap_mode_s(IntPtr o, int layer_index);
+
+ public PipelineWrapMode GetLayerWrapModeS(int layer_index)
+ {
+ return cogl_pipeline_get_layer_wrap_mode_s(handle, layer_index);
+ }
+
+ [DllImport("cogl2.dll")]
+ public static extern PipelineWrapMode cogl_pipeline_get_layer_wrap_mode_t(IntPtr o, int layer_index);
+
+ public PipelineWrapMode GetLayerWrapModeT(int layer_index)
+ {
+ return cogl_pipeline_get_layer_wrap_mode_t(handle, layer_index);
+ }
+
+ [DllImport("cogl2.dll")]
public static extern int cogl_pipeline_get_n_layers(IntPtr o);
public int GetNLayers()
@@ -112,6 +136,38 @@ namespace Cogl
}
[DllImport("cogl2.dll")]
+ public static extern void cogl_pipeline_set_layer_wrap_mode(IntPtr o, int layer_index, PipelineWrapMode mode);
+
+ public void SetLayerWrapMode(int layer_index, PipelineWrapMode mode)
+ {
+ cogl_pipeline_set_layer_wrap_mode(handle, layer_index, mode);
+ }
+
+ [DllImport("cogl2.dll")]
+ public static extern void cogl_pipeline_set_layer_wrap_mode_p(IntPtr o, int layer_index, PipelineWrapMode mode);
+
+ public void SetLayerWrapModeP(int layer_index, PipelineWrapMode mode)
+ {
+ cogl_pipeline_set_layer_wrap_mode_p(handle, layer_index, mode);
+ }
+
+ [DllImport("cogl2.dll")]
+ public static extern void cogl_pipeline_set_layer_wrap_mode_s(IntPtr o, int layer_index, PipelineWrapMode mode);
+
+ public void SetLayerWrapModeS(int layer_index, PipelineWrapMode mode)
+ {
+ cogl_pipeline_set_layer_wrap_mode_s(handle, layer_index, mode);
+ }
+
+ [DllImport("cogl2.dll")]
+ public static extern void cogl_pipeline_set_layer_wrap_mode_t(IntPtr o, int layer_index, PipelineWrapMode mode);
+
+ public void SetLayerWrapModeT(int layer_index, PipelineWrapMode mode)
+ {
+ cogl_pipeline_set_layer_wrap_mode_t(handle, layer_index, mode);
+ }
+
+ [DllImport("cogl2.dll")]
public static extern void cogl_pipeline_set_point_size(IntPtr o, float point_size);
public void SetPointSize(float point_size)
diff --git a/cogl-sharp/parse-gir.py b/cogl-sharp/parse-gir.py
index 08379f7..bb93651 100755
--- a/cogl-sharp/parse-gir.py
+++ b/cogl-sharp/parse-gir.py
@@ -9,6 +9,7 @@ C_NS = "http://www.gtk.org/introspection/c/1.0"
enum_types = (
"BufferBit",
"ColorMask",
+ "PipelineWrapMode",
"PixelFormat"
)
@@ -70,7 +71,8 @@ def make_enum_name(enum_name, member_name):
if uppercase and member_name != 'any':
return member_name.upper()
- return member_name.capitalize()
+ words = member_name.split('_')
+ return "".join(map(lambda x: x.capitalize(), words))
def do_generate_enum(node, is_flags):
type_name = node.getAttribute("name")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]