mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-09-09 00:13:20 +02:00
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
This commit is contained in:
parent
6ab620d689
commit
b868b80dee
@ -133,6 +133,7 @@ namespace GtkSharp.Generation {
|
|||||||
AddType (new ManualGen ("GDateTime", "GLib.DateTime"));
|
AddType (new ManualGen ("GDateTime", "GLib.DateTime"));
|
||||||
AddType (new ManualGen ("GDate", "GLib.Date"));
|
AddType (new ManualGen ("GDate", "GLib.Date"));
|
||||||
AddType (new ManualGen ("GSource", "GLib.Source"));
|
AddType (new ManualGen ("GSource", "GLib.Source"));
|
||||||
|
AddType (new ManualGen ("GMainContext", "GLib.MainContext"));
|
||||||
AddType (new SimpleGen ("GPollFD", "GLib.PollFD", "GLib.PollFD.Zero"));
|
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 ("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})"));
|
AddType (new MarshalGen ("time_t", "System.DateTime", "IntPtr", "GLib.Marshaller.DateTimeTotime_t ({0})", "GLib.Marshaller.time_tToDateTime ({0})"));
|
||||||
|
@ -38,13 +38,13 @@ namespace GLib {
|
|||||||
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
||||||
static extern void g_main_context_ref (IntPtr raw);
|
static extern void g_main_context_ref (IntPtr raw);
|
||||||
|
|
||||||
internal MainContext (IntPtr raw)
|
public MainContext (IntPtr raw)
|
||||||
{
|
{
|
||||||
handle = raw;
|
handle = raw;
|
||||||
g_main_context_ref (handle);
|
g_main_context_ref (handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal IntPtr Handle {
|
public IntPtr Handle {
|
||||||
get {
|
get {
|
||||||
return handle;
|
return handle;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user