mta-mono/MultiTheftAuto/Event.cs

54 lines
2.0 KiB
C#
Raw Normal View History

2015-12-12 10:10:23 +00:00
using MultiTheftAuto.EventArgs;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.CompilerServices;
2015-12-12 10:10:23 +00:00
namespace MultiTheftAuto
{
public class Event
{
#region Static methods
2015-12-12 10:10:23 +00:00
[MethodImpl( MethodImplOptions.InternalCall )]
public static extern bool Add( string name, bool allowRemoteTrigger );
2015-12-12 10:10:23 +00:00
[MethodImpl( MethodImplOptions.InternalCall )]
public static extern bool AddHandler( string eventName, Element attachedTo, Delegate handlerFunction, bool getPropagated = true, string priority = "normal" );
2015-12-12 10:10:23 +00:00
[MethodImpl( MethodImplOptions.InternalCall )]
public static extern bool RemoveHandler( string eventName, Element attachedTo, Delegate handlerFunction );
2015-12-12 10:10:23 +00:00
[MethodImpl( MethodImplOptions.InternalCall )]
public static extern bool Trigger( string eventName, Element baseElement, params object[] arguments );
2015-12-12 10:10:23 +00:00
[MethodImpl( MethodImplOptions.InternalCall )]
public static extern bool TriggerClient( Element sendTo, string name, Element sourceElement, params object[] arguments );
2015-12-12 10:10:23 +00:00
[MethodImpl( MethodImplOptions.InternalCall )]
public static extern bool Cancel( bool cancel = true, string reason = "" );
2015-12-12 10:10:23 +00:00
[MethodImpl( MethodImplOptions.InternalCall )]
public static extern string GetCancelReason();
2015-12-12 10:10:23 +00:00
[MethodImpl( MethodImplOptions.InternalCall )]
public static extern bool WasCancelled();
2015-12-12 10:10:23 +00:00
// [MethodImpl( MethodImplOptions.InternalCall )]
// public static extern int TriggerLatentClient( Element sendTo, string name, int bandwidth, bool persist, Element theElement, params object[] arguments );
2015-12-12 10:10:23 +00:00
// [MethodImpl( MethodImplOptions.InternalCall )]
// public static extern int GetLatentHandles( Player player );
2015-12-12 10:10:23 +00:00
// [MethodImpl( MethodImplOptions.InternalCall )]
// public static extern int GetLatentStatus( Player player, int handle );
2015-12-12 10:10:23 +00:00
// [MethodImpl( MethodImplOptions.InternalCall )]
// public static extern int CancelLatent( Player player, int handle );
2015-12-12 10:10:23 +00:00
#endregion
}
}