From 402b79e3b5640415366893a634d0404c28a1ffc8 Mon Sep 17 00:00:00 2001 From: Damien Lespiau Date: Sun, 4 Nov 2012 00:20:24 +0000 Subject: 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(+) create mode 100644 cogl-sharp/OnScreenTemplate.cs create mode 100644 cogl-sharp/_OnScreenTemplate.cs diff --git a/cogl-sharp/Makefile.am b/cogl-sharp/Makefile.am index fb14622b..499a2299 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 00000000..04b3f75c --- /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 + * . + * + * Authors: + * Damien Lespiau + */ + +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 00000000..708038f0 --- /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 97229753..f231175f 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' }, -- cgit v1.2.1