private void DestroyAnimator() { if (animator != IntPtr.Zero) { EcoreAnimator.RemoveAnimator(animator); animator = IntPtr.Zero; } }
/// <summary> /// Called when the host application is destroyed. /// </summary> public void OnDestroy() { if (_renderingHandled) { EcoreAnimator.RemoveAnimator(EcoreCallbackHandle); _renderingHandled = false; } }
private void List_RenderPost(object sender, EventArgs e) { list.RenderPost -= List_RenderPost; _enteringSpeed = (EcoreAnimator.GetCurrentTime() - _enteringSpeed) * 1000; _frameSet = Elementary.BringInScrollFriction; Elementary.BringInScrollFriction = TimeSet; list.ScrollTo(ItemTarget, ScrollToPosition.In, true); }
/// <summary> /// Called when the host application resumes. /// </summary> public void OnResume() { _suspended = false; if (!_renderingHandled) { EcoreCallbackHandle = EcoreAnimator.AddAnimator(DoFrameSafeFromEcore); _renderingHandled = true; } }
/// <summary> /// Called when the host application suspends. /// </summary> public void OnSuspend() { _suspended = true; if (_renderingHandled) { EcoreAnimator.RemoveAnimator(EcoreCallbackHandle); _renderingHandled = false; } }
/// <summary> /// Called when the host receives the suspend event. /// </summary> public void OnSuspend() { Log.Info(ReactConstants.Tag, ">>>>>>>>> OnSuspend <<<<<<<<<<"); //CompositionTarget.Rendering -= _animatedFrameCallback; if (IntPtr.Zero != _anim) { EcoreAnimator.RemoveAnimator(_anim); } }
private void CreateAnimator() { if (animator == IntPtr.Zero) { animator = EcoreAnimator.AddAnimator(() => { Evas.evas_object_image_pixels_dirty_set(evasImage, true); return(true); }); } }
/// <summary> /// Called when the host receives the resume event. /// </summary> public void OnResume() { Log.Info(ReactConstants.Tag, ">>>>>>>>> OnResume <<<<<<<<<<"); //CompositionTarget.Rendering += _animatedFrameCallback; if (IntPtr.Zero == _anim) { _anim = EcoreAnimator.AddAnimator(OnEcoreRender); } // start watch sw = Stopwatch.StartNew(); }
private void List_ScrollAnimationStopped(object sender, EventArgs e) { list.RenderPost -= List_RenderPostFrame; list.ScrollAnimationStarted -= List_ScrollAnimationStarted; list.ScrollAnimationStopped -= List_ScrollAnimationStopped; EcoreAnimator.RemoveAnimator(_anim); Elementary.BringInScrollFriction = _frameSet; FrameFPS = _frameCount / TimeSet; AnimatorFPS = _ecoreCount / TimeSet; Button btn1 = new Button(box2) { AlignmentX = -1, AlignmentY = -1, WeightX = 1, WeightY = 1, Geometry = new Rect(square.X, square.Y, square.Width, square.Height / 3) }; btn1.Text = string.Format("Entering Speed : {0:f1} msec", _enteringSpeed); btn1.Show(); Button btn2 = new Button(box2) { AlignmentX = -1, AlignmentY = -1, WeightX = 1, WeightY = 1, Geometry = new Rect(square.X, square.Y + square.Height / 3, square.Width, square.Height / 3) }; btn2.Text = string.Format("Animator FPS : {0:f1} fps", AnimatorFPS); btn2.Show(); Button btn3 = new Button(box2) { AlignmentX = -1, AlignmentY = -1, WeightX = 1, WeightY = 1, Geometry = new Rect(square.X, square.Y + square.Height / 3 * 2, square.Width, square.Height / 3) }; btn3.Text = string.Format("Evas FPS : {0:f1} fps", FrameFPS); btn3.Show(); }
private void List_ScrollAnimationStopped(object sender, EventArgs e) { list.RenderPost -= List_RenderPostFrame; list.ScrollAnimationStarted -= List_ScrollAnimationStarted; list.ScrollAnimationStopped -= List_ScrollAnimationStopped; EcoreAnimator.RemoveAnimator(_anim); Elementary.BringInScrollFriction = _frameSet; FrameFPS = _frameCount / TimeSet; AnimatorFPS = _ecoreCount / TimeSet; Button btn1 = new Button(box2) { AlignmentX = -1, AlignmentY = -1, WeightX = 1, WeightY = 1, }; btn1.Text = string.Format("Entering Speed : {0:f1} msec", _enteringSpeed); btn1.Show(); box2.PackEnd(btn1); Button btn2 = new Button(box2) { AlignmentX = -1, AlignmentY = -1, WeightX = 1, WeightY = 1, }; btn2.Text = string.Format("Animator FPS : {0:f1} fps", AnimatorFPS); btn2.Show(); box2.PackEnd(btn2); Button btn3 = new Button(box2) { AlignmentX = -1, AlignmentY = -1, WeightX = 1, WeightY = 1, }; btn3.Text = string.Format("Evas FPS : {0:f1} fps", FrameFPS); btn3.Show(); box2.PackEnd(btn3); box2.SetAlignment(-1, -1); box2.SetWeight(1, 0.07); }
private void List_Changed(object sender, EventArgs e) { _enteringSpeed = EcoreAnimator.GetCurrentTime(); list.Changed -= List_Changed; list.RenderPost += List_RenderPost; }
private void List_ScrollAnimationStarted(object sender, EventArgs e) { _ecoreCount = 0; _anim = EcoreAnimator.AddAnimator(OnEcoreCheck); list.RenderPost += List_RenderPostFrame; }