Skip to content

Commit

Permalink
Kotlinify ChoreographerProvider (#43840)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #43840

Changelog: [Internal]

As part of the Sustainability Week (see [post](https://fb.workplace.com/groups/251759413609061/permalink/742797531171911/)).

Differential Revision: D55731748
  • Loading branch information
fabriziocucci authored and facebook-github-bot committed Apr 4, 2024
1 parent 7c745e3 commit 2f19aa3
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,26 @@
* LICENSE file in the root directory of this source tree.
*/

package com.facebook.react.internal;
package com.facebook.react.internal

public interface ChoreographerProvider {
/**
* The interface to a android.view.Choreographer-like object, that can either use the
* android.view.Choreographer or a mock one for testing purposes, or override built-in
* android.view.Choreographer's behaviors.
*/
interface Choreographer {

public interface Choreographer {
/** Posts a frame callback to run on the next frame. */
void postFrameCallback(android.view.Choreographer.FrameCallback callback);
public fun postFrameCallback(callback: android.view.Choreographer.FrameCallback)

/** Removes a previously posted frame callback. */
void removeFrameCallback(android.view.Choreographer.FrameCallback callback);
public fun removeFrameCallback(callback: android.view.Choreographer.FrameCallback)
}

/**
* Get an instance of Choreographer.
*
* @return An instance of Choreographer.
*/
Choreographer getChoreographer();
public fun getChoreographer(): Choreographer
}

0 comments on commit 2f19aa3

Please sign in to comment.