Esempio n. 1
0
        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);
            }
        }
Esempio n. 3
0
        static PitayaBinding()
        {
            NativeRequestCallback = OnRequest;
            NativeEventCallback   = OnEvent;
            NativePushCallback    = OnPush;
            NativeNotifyCallback  = OnNotify;
            NativeErrorCallback   = OnError;

            SetLogFunction(LogFunction);
            NativeLibInit((int)_currentLogLevel, null, null, OnAssert, Platform(), BuildNumber(), Application.version);
        }
Esempio n. 4
0
        static StaticPitayaBinding()
        {
            NativeRequestCallback = OnRequest;
            NativeEventCallback   = OnEvent;
            NativePushCallback    = OnPush;
            NativeNotifyCallback  = OnNotify;
            NativeErrorCallback   = OnError;

            SetLogFunction(LogFunction);
#if UNITY_ANDROID
            InitializeNativeLib();
#endif
        }
Esempio n. 5
0
    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> >();
    }
Esempio n. 6
0
        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);
        }
Esempio n. 7
0
 private static extern int NativeAddEventHandler(IntPtr client, NativeEventCallback callback, IntPtr exData, IntPtr destructor);
Esempio n. 8
0
 private static extern int NativeAddEventHandler(IntPtr client, NativeEventCallback callback, IntPtr ex_data, IntPtr destructor);
Esempio n. 9
0
    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>>();
    }