[cogl/wip/cogl-sharp: 47/51] cogl-sharp: Bind a few Xlib specific renderer methods



commit 3f04f173612913d86b10a6b19704c7d5805ee31e
Author: Damien Lespiau <damien lespiau intel com>
Date:   Sat Dec 29 14:24:48 2012 +0000

    cogl-sharp: Bind a few Xlib specific renderer methods

 cogl-sharp/Renderer.cs |   49 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 49 insertions(+), 0 deletions(-)
---
diff --git a/cogl-sharp/Renderer.cs b/cogl-sharp/Renderer.cs
index e01fba6..9524075 100644
--- a/cogl-sharp/Renderer.cs
+++ b/cogl-sharp/Renderer.cs
@@ -69,5 +69,54 @@ namespace Cogl
                 throw new Cogl.Exception(error);
         }
 
+        /* XXX: XlibRenderer subclass? */
+#if COGL_HAS_XLIB_SUPPORT
+        [DllImport("cogl2.dll")]
+        private static extern IntPtr
+        cogl_xlib_renderer_get_display(IntPtr renderer);
+
+        public IntPtr XlibGetDisplay()
+        {
+            return cogl_xlib_renderer_get_display(handle);
+        }
+
+        [DllImport("cogl2.dll")]
+        private static extern void
+        cogl_xlib_renderer_set_foreign_display(IntPtr renderer, IntPtr display);
+
+        public void XlibSetForeignDisplay(IntPtr display)
+        {
+            cogl_xlib_renderer_set_foreign_display(handle, display);
+        }
+
+        [DllImport("cogl2.dll")]
+        private static extern IntPtr
+        cogl_xlib_renderer_get_foreign_display(IntPtr renderer);
+
+        public IntPtr XlibGetForeignDisplay()
+        {
+            return cogl_xlib_renderer_get_foreign_display(handle);
+        }
+
+        [DllImport("cogl2.dll")]
+        private static extern void
+        cogl_xlib_renderer_set_event_retrieval_enabled(IntPtr renderer,
+                                                       bool enable);
+
+        public void XlibSetEventRetrievalEnabled(bool enable)
+        {
+            cogl_xlib_renderer_set_event_retrieval_enabled(handle, enable);
+        }
+
+        [DllImport("cogl2.dll")]
+        private static extern void
+        cogl_xlib_renderer_handle_event(IntPtr renderer, IntPtr _event);
+
+        public void XlibHandleEvent(IntPtr _event)
+        {
+            cogl_xlib_renderer_handle_event(handle, _event);
+        }
+#endif
+
     }
 }



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