Example #1
0
        public Source(GLib.SourceFuncs source_funcs, uint struct_size)
        {
            IntPtr native_source_funcs = GLib.Marshaller.StructureToPtrAlloc(source_funcs);

            Raw          = g_source_new(native_source_funcs, struct_size);
            source_funcs = GLib.SourceFuncs.New(native_source_funcs);
            Marshal.FreeHGlobal(native_source_funcs);
        }
Example #2
0
        public static bool RemoveByFuncsUserData(GLib.SourceFuncs funcs, IntPtr user_data)
        {
            IntPtr native_funcs = GLib.Marshaller.StructureToPtrAlloc(funcs);
            bool   raw_ret      = g_source_remove_by_funcs_user_data(native_funcs, user_data);
            bool   ret          = raw_ret;

            funcs = GLib.SourceFuncs.New(native_funcs);
            Marshal.FreeHGlobal(native_funcs);
            return(ret);
        }