From b868b80deef1a510bce2fe47ef5220ad2d9a8a14 Mon Sep 17 00:00:00 2001 From: Stephan Sundermann Date: Wed, 9 Oct 2013 19:44:50 +0200 Subject: [PATCH] glib,generator: map MainContext type and expose members This is needed to reference a MainContext from external bindings, which need to create a MainContext using a Handle --- generator/SymbolTable.cs | 1 + glib/MainContext.cs | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/generator/SymbolTable.cs b/generator/SymbolTable.cs index 039a63025..520024ce6 100644 --- a/generator/SymbolTable.cs +++ b/generator/SymbolTable.cs @@ -133,6 +133,7 @@ namespace GtkSharp.Generation { AddType (new ManualGen ("GDateTime", "GLib.DateTime")); AddType (new ManualGen ("GDate", "GLib.Date")); AddType (new ManualGen ("GSource", "GLib.Source")); + AddType (new ManualGen ("GMainContext", "GLib.MainContext")); AddType (new SimpleGen ("GPollFD", "GLib.PollFD", "GLib.PollFD.Zero")); AddType (new MarshalGen ("gunichar", "char", "uint", "GLib.Marshaller.CharToGUnichar ({0})", "GLib.Marshaller.GUnicharToChar ({0})")); AddType (new MarshalGen ("time_t", "System.DateTime", "IntPtr", "GLib.Marshaller.DateTimeTotime_t ({0})", "GLib.Marshaller.time_tToDateTime ({0})")); diff --git a/glib/MainContext.cs b/glib/MainContext.cs index e46fa7847..2144aff59 100644 --- a/glib/MainContext.cs +++ b/glib/MainContext.cs @@ -38,13 +38,13 @@ namespace GLib { [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_main_context_ref (IntPtr raw); - internal MainContext (IntPtr raw) + public MainContext (IntPtr raw) { handle = raw; g_main_context_ref (handle); } - internal IntPtr Handle { + public IntPtr Handle { get { return handle; }