Esempio n. 1
0
    void OnButton(EmulatorTouchEvent.Action action, EmulatorButtonEvent.ButtonCode buttonCode)
    {
        var btn = PhoneEvent.Types.KeyEvent
                  .CreateBuilder()
                  .SetAction((int)action)
                  .SetCode((int)buttonCode)
                  .Build();

        Enqueue(new Entry {
            type  = TypeOfEvent(btn),
            bytes = btn.ToByteArray()
        });
    }
Esempio n. 2
0
    void OnMotion(IEnumerable <TouchData> touches, EmulatorTouchEvent.Action action)
    {
        var motion = PhoneEvent.Types.MotionEvent
                     .CreateBuilder()
                     .SetTimestamp(GetTimestamp())
                     .SetAction((int)action)
                     .AddRangePointers(TouchesToPointers(touches))
                     .Build();

        Enqueue(new Entry {
            type  = TypeOfEvent(motion),
            bytes = motion.ToByteArray()
        });
    }
Esempio n. 3
0
 void OnApp(EmulatorTouchEvent.Action action)
 {
     OnButton(action, EmulatorButtonEvent.ButtonCode.kApp);
 }
Esempio n. 4
0
 void OnHome(EmulatorTouchEvent.Action action)
 {
     OnButton(action, EmulatorButtonEvent.ButtonCode.kHome);
 }