internal static void NotifyEvents(int eventCount, IntPtr eventData) { NativeEventCallback callback = onEvents; if (callback != null) { callback(eventCount, eventData); } }
internal static void NotifyEvents(int eventCount, IntPtr eventData) { NativeEventCallback nativeEventCallback = NativeInputSystem.onEvents; if (nativeEventCallback != null) { nativeEventCallback(eventCount, eventData); } }
static PitayaBinding() { NativeRequestCallback = OnRequest; NativeEventCallback = OnEvent; NativePushCallback = OnPush; NativeNotifyCallback = OnNotify; NativeErrorCallback = OnError; SetLogFunction(LogFunction); NativeLibInit((int)_currentLogLevel, null, null, OnAssert, Platform(), BuildNumber(), Application.version); }
static StaticPitayaBinding() { NativeRequestCallback = OnRequest; NativeEventCallback = OnEvent; NativePushCallback = OnPush; NativeNotifyCallback = OnNotify; NativeErrorCallback = OnError; SetLogFunction(LogFunction); #if UNITY_ANDROID InitializeNativeLib(); #endif }
public PomeloClient() { // why doesn't pass the method directly // https://stackoverflow.com/questions/1681930/what-is-the-difference-between-a-delegate-instance-and-a-method-pointer nativeLCRCallback = OnLCR; nativeLCWCallback = OnLCW; nativeRequestCallback = OnRequest; nativeNotifyCallback = OnNotify; nativeEventCallback = OnEvent; requestHandlers = new Dictionary <uint, Action <string, string> >(); eventHandlers = new Dictionary <string, List <EventBinding> >(); }
static PitayaBinding() { NativeRequestCallback = OnRequest; NativeEventCallback = OnEvent; NativePushCallback = OnPush; NativeNotifyCallback = OnNotify; NativeErrorCallback = OnError; string platform; switch (Application.platform) { case RuntimePlatform.Android: platform = "android"; break; case RuntimePlatform.LinuxEditor: case RuntimePlatform.LinuxPlayer: platform = "linux"; break; case RuntimePlatform.WindowsEditor: case RuntimePlatform.WindowsPlayer: platform = "windows"; break; case RuntimePlatform.IPhonePlayer: platform = "ios"; break; case RuntimePlatform.OSXEditor: case RuntimePlatform.OSXPlayer: platform = "mac"; break; default: platform = Application.platform.ToString(); break; } SetLogFunction(LogFunction); NativeLibInit((int)_currentLogLevel, null, null, OnAssert, platform, BuildNumber(), Application.version); }
private static extern int NativeAddEventHandler(IntPtr client, NativeEventCallback callback, IntPtr exData, IntPtr destructor);
private static extern int NativeAddEventHandler(IntPtr client, NativeEventCallback callback, IntPtr ex_data, IntPtr destructor);
public PomeloClient() { // why doesn't pass the method directly // https://stackoverflow.com/questions/1681930/what-is-the-difference-between-a-delegate-instance-and-a-method-pointer nativeLCRCallback = OnLCR; nativeLCWCallback = OnLCW; nativeRequestCallback = OnRequest; nativeNotifyCallback = OnNotify; nativeEventCallback = OnEvent; requestHandlers = new Dictionary<uint, Action<string, string>>(); eventHandlers = new Dictionary<string, List<EventBinding>>(); }