Skip to content

Commit

Permalink
Extracted items from PR konsoletyper#580
Browse files Browse the repository at this point in the history
  • Loading branch information
Ihromant committed Nov 23, 2023
1 parent 86efdb0 commit ae63199
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 0 deletions.
54 changes: 54 additions & 0 deletions jso/apis/src/main/java/org/teavm/jso/dom/events/Touch.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/*
* Copyright 2023 ihromant.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.teavm.jso.dom.events;

import org.teavm.jso.JSObject;
import org.teavm.jso.JSProperty;

public interface Touch extends JSObject {
@JSProperty
int getIdentifier();

@JSProperty
int getScreenX();

@JSProperty
int getScreenY();

@JSProperty
int getClientX();

@JSProperty
int getClientY();

@JSProperty
int getPageX();

@JSProperty
int getPageY();

@JSProperty
int getRadiusX();

@JSProperty
int getRadiusY();

@JSProperty
int getRotationAngle();

@JSProperty
double getForce();
}
41 changes: 41 additions & 0 deletions jso/apis/src/main/java/org/teavm/jso/dom/events/TouchEvent.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
* Copyright 2023 ihromant.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.teavm.jso.dom.events;

import org.teavm.jso.JSProperty;

public interface TouchEvent extends Event {
@JSProperty
boolean getCtrlKey();

@JSProperty
boolean getShiftKey();

@JSProperty
boolean getAltKey();

@JSProperty
boolean getMetaKey();

@JSProperty
Touch[] getChangedTouches();

@JSProperty
Touch[] getTargetTouches();

@JSProperty
Touch[] getTouches();
}

0 comments on commit ae63199

Please # to comment.