internal static void Cb(IntPtr cb_data, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Efl.Eo.MarshalTest <Efl.Layout.SignalConcrete, Efl.Eo.NonOwnTag>))] Efl.Layout.Signal kw_object, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String emission, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String source) { GCHandle handle = GCHandle.FromIntPtr(cb_data); EflLayoutSignalCb cb = (EflLayoutSignalCb)handle.Target; try { cb(kw_object, emission, source); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } }
internal void ManagedCb(Efl.Layout.Signal kw_object, System.String emission, System.String source) { _cb(_cb_data, kw_object, emission, source); Eina.Error.RaiseIfUnhandledException(); }