Skip to content

Commit

Permalink
Revert click listener kotlin conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
nachtien committed Apr 22, 2022
1 parent 291bc2e commit eafaf6a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
buildscript {
ext.kotlin_version = '1.6.0'
ext.kotlin_version = '1.6.21'
repositories {
mavenCentral()
google()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,39 +20,42 @@
// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package com.viro.core

package com.viro.core;

/**
* Callback interface for responding to click events, which occur when any Controller button is
* clicked.
*/
interface ClickListener {
public interface ClickListener {


/**
* Callback when a click event is registered over the given [Node].
* Callback when a click event is registered over the given {@link Node}.
*
* @param source The platform specific source ID, which indicates what button or
* component on the Controller triggered the event. See the Controller's
* Guide for information.
* @param node The [Node] that was clicked.
* @param node The {@link Node} that was clicked.
* @param location The location of the event in world coordinates.
*/
fun onClick(source: Int, node: Node?, location: Vector?)
void onClick(int source, Node node, Vector location);

/**
* Callback when the [ClickState] is changed over the given [Node]. This callback is
* Callback when the {@link ClickState} is changed over the given {@link Node}. This callback is
* for receiving fine-grained information about a click: when the pointer goes down, when it
* goes up, and if/when the 'click' itself is registered. For a completed click, this callback
* is invoked *three* times: on [ClickState.CLICK_DOWN], [ClickState.CLICK_UP],
* and then for [ClickState.CLICKED].
*
* To simply listen for click events, use [onClick].
* is invoked <i>three</i> times: on {@link ClickState#CLICK_DOWN}, {@link ClickState#CLICK_UP},
* and then for {@link ClickState#CLICKED}.
* <p>
* To simply listen for click events, use {@link #onClick(int, Node, Vector)}.
*
* @param source The platform specific source ID, which indicates what button or component
* on the Controller triggered the event. See the Controller's Guide for
* information.
* @param node The [Node] that was clicked.
* @param node The {@link Node} that was clicked.
* @param clickState The status of the click event.
* @param location The location of the event in world coordinates.
*/
fun onClickState(source: Int, node: Node?, clickState: ClickState, location: Vector?)
void onClickState(int source, Node node, ClickState clickState, Vector location);
}

0 comments on commit eafaf6a

Please sign in to comment.