Example #1
0
    internal static void Cb(IntPtr cb_data, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Efl.Eo.MarshalEo <Efl.Eo.NonOwnTag>))] Efl.Layout.ISignal 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);
        }
    }
Example #2
0
 internal void ManagedCb(Efl.Layout.ISignal kw_object, System.String emission, System.String source)
 {
     _cb(_cb_data, kw_object, emission, source);
     Eina.Error.RaiseIfUnhandledException();
 }