anchor.diff:              Update <- update
               Render <- render
   
  +type InputLookView (context, inputEvents : ConcurrentQueue<InputEvent>) as this =
  +    inherit View (context)
  +
  +    let mutable lastTouchX = 0.f
  +    let mutable lastTouchY = 0.f
  +    let mutable isLooking = false
  +
  +    do
  +        this.Touch.Add (fun args ->
  +            let ev = args.Event
  +            let touchX = ev.GetX ()
  +            let touchY = ev.GetY ()
  +
  +            match args.Event.Action with
  +
  +            | MotionEventActions.Up ->
  +                isLooking <- true
  +
  +            | MotionEventActions.Down ->
  +                isLooking <- false
  +                lastTouchX <- touchX
  +                lastTouchY <- touchY
  +
  +            | _ -> ()
  +
  +            match args.Event.Action with
  +
  +            | MotionEventActions.Move ->
  +                let xrel = touchX - lastTouchX
  +                let yrel = touchY - lastTouchY
  +                inputEvents.Enqueue (MouseMoved (0, 0, int xrel, int yrel))
  +
  +            | _ -> ()
  +        )
  +
  +type InputMovementView (context, inputEvents : ConcurrentQueue<InputEvent>) as this =
  +    inherit View (context)
  +
  +    let mutable lastTouchX = 0.f
  +    let mutable lastTouchY = 0.f
  +
  +    do
  +        this.Touch.Add (fun args ->
  +            let ev = args.Event
  +            let touchX = ev.GetX ()
  +            let touchY = ev.GetY ()
  +
  +            match args.Event.Action with
  +
  +            | MotionEventActions.Up ->
  +                inputEvents.Enqueue (KeyReleased ('w'))
  +
  +            | _ -> ()
  +
  +            match args.Event.Action with
  +
  +            | MotionEventActions.Down ->
  +                inputEvents.Enqueue (KeyPressed ('w'))
  +
  +            | MotionEventActions.Up ->
  +                inputEvents.Enqueue (KeyReleased ('w'))
  +
  +            | _ -> ()
  +        )
  +
  +type Runnable (f: unit -> unit) =
  +    inherit Java.Lang.Object ()
  +
  +    interface IRunnable with
  +
  +        member this.Run () = f ()
  +
   type GLView (context) as x =
       inherit RelativeLayout (context)
   
       let surfaceView = new GLSurfaceView (context)
       let renderer = new GLRenderer (surfaceView, x)
  -
  -    let mutable lastTouchX = 0.f
  -    let mutable lastTouchY = 0.f
   
       let inputEvents = ConcurrentQueue ()
   
  
positive.code:             let mutable e = Unchecked.defaultof<InputEvent>
              while inputEvents.TryDequeue (&e) do
                  events.Add e
              { Events = events |> Seq.toList }
  
  [<Activity (
      Label = "Foom", 
  
negative.code: 
          x.AddView surfaceView
  
          x.Post (
              new Runnable (fun () ->
                      let layoutParams = new LinearLayout.LayoutParams (ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.WrapContent)
                      let layout = new LinearLayout (context)
                      layout.LayoutParameters <- layoutParams
  
                      let view1 = new InputLookView (context, inputEvents)
                      let view2 = new InputMovementView (context, inputEvents)
                      let l1 = new LinearLayout.LayoutParams(x.Width / 2, x.Height)
                      let l2 = new LinearLayout.LayoutParams(x.Width / 2, x.Height)
  
                      layout.AddView (view1, l1)
                      layout.AddView (view2, l2)
                      x.AddView layout
              )
          )
          |> ignore
  
      interface IInput with
  
  