mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 16:14:10 -08:00
Completes DOM Level 2 mapping
This commit is contained in:
parent
0ab1639821
commit
037538c416
|
@ -22,4 +22,9 @@ import org.teavm.jso.JSObject;
|
||||||
* @author Alexey Andreev
|
* @author Alexey Andreev
|
||||||
*/
|
*/
|
||||||
public interface DOMImplementation extends JSObject {
|
public interface DOMImplementation extends JSObject {
|
||||||
|
boolean hasFeature(String feature, String version);
|
||||||
|
|
||||||
|
DocumentType createDocumentType(String qualifiedName, String publicId, String systemId);
|
||||||
|
|
||||||
|
Document createDocument(String namespaceURI, String qualifiedName, DocumentType doctype);
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,10 +15,28 @@
|
||||||
*/
|
*/
|
||||||
package org.teavm.dom.core;
|
package org.teavm.dom.core;
|
||||||
|
|
||||||
|
import org.teavm.jso.JSProperty;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Alexey Andreev
|
* @author Alexey Andreev
|
||||||
*/
|
*/
|
||||||
public interface DocumentType extends Node {
|
public interface DocumentType extends Node {
|
||||||
|
@JSProperty
|
||||||
|
String getName();
|
||||||
|
|
||||||
|
@JSProperty
|
||||||
|
NamedNodeMap<Entity> getEntities();
|
||||||
|
|
||||||
|
@JSProperty
|
||||||
|
NamedNodeMap<Notation> getNotations();
|
||||||
|
|
||||||
|
@JSProperty
|
||||||
|
String getPublicId();
|
||||||
|
|
||||||
|
@JSProperty
|
||||||
|
String getSystemId();
|
||||||
|
|
||||||
|
@JSProperty
|
||||||
|
String getInternalSubset();
|
||||||
}
|
}
|
||||||
|
|
33
teavm-dom/src/main/java/org/teavm/dom/core/Entity.java
Normal file
33
teavm-dom/src/main/java/org/teavm/dom/core/Entity.java
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2014 Alexey Andreev.
|
||||||
|
*
|
||||||
|
* 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.dom.core;
|
||||||
|
|
||||||
|
import org.teavm.jso.JSProperty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Alexey Andreev <konsoletyper@gmail.com>
|
||||||
|
*/
|
||||||
|
public interface Entity extends Node {
|
||||||
|
@JSProperty
|
||||||
|
String getPublicId();
|
||||||
|
|
||||||
|
@JSProperty
|
||||||
|
String getSystemId();
|
||||||
|
|
||||||
|
@JSProperty
|
||||||
|
String getNotationName();
|
||||||
|
}
|
30
teavm-dom/src/main/java/org/teavm/dom/core/Notation.java
Normal file
30
teavm-dom/src/main/java/org/teavm/dom/core/Notation.java
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2014 Alexey Andreev.
|
||||||
|
*
|
||||||
|
* 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.dom.core;
|
||||||
|
|
||||||
|
import org.teavm.jso.JSProperty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Alexey Andreev <konsoletyper@gmail.com>
|
||||||
|
*/
|
||||||
|
public interface Notation extends Node {
|
||||||
|
@JSProperty
|
||||||
|
String getPublicId();
|
||||||
|
|
||||||
|
@JSProperty
|
||||||
|
String getSystemId();
|
||||||
|
}
|
|
@ -15,10 +15,19 @@
|
||||||
*/
|
*/
|
||||||
package org.teavm.dom.core;
|
package org.teavm.dom.core;
|
||||||
|
|
||||||
|
import org.teavm.jso.JSProperty;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Alexey Andreev
|
* @author Alexey Andreev
|
||||||
*/
|
*/
|
||||||
public interface ProcessingInstruction extends Node {
|
public interface ProcessingInstruction extends Node {
|
||||||
|
@JSProperty
|
||||||
|
String getData();
|
||||||
|
|
||||||
|
@JSProperty
|
||||||
|
void setData(String data);
|
||||||
|
|
||||||
|
@JSProperty
|
||||||
|
String getTarget();
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2014 Alexey Andreev.
|
||||||
|
*
|
||||||
|
* 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.dom.events;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Alexey Andreev <konsoletyper@gmail.com>
|
||||||
|
*/
|
||||||
|
public interface DocumentEvent {
|
||||||
|
Event createEvent(String eventType);
|
||||||
|
}
|
69
teavm-dom/src/main/java/org/teavm/dom/events/MouseEvent.java
Normal file
69
teavm-dom/src/main/java/org/teavm/dom/events/MouseEvent.java
Normal file
|
@ -0,0 +1,69 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2014 Alexey Andreev.
|
||||||
|
*
|
||||||
|
* 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.dom.events;
|
||||||
|
|
||||||
|
import org.teavm.jso.JSObject;
|
||||||
|
import org.teavm.jso.JSProperty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Alexey Andreev <konsoletyper@gmail.com>
|
||||||
|
*/
|
||||||
|
public interface MouseEvent extends Event {
|
||||||
|
short LEFT_BUTTON = 0;
|
||||||
|
short MIDDLE_BUTTON = 1;
|
||||||
|
short RIGHT_BUTTON = 2;
|
||||||
|
String CLICK = "click";
|
||||||
|
String MOUSEDOWN = "mousedown";
|
||||||
|
String MOUSEUP = "mouseup";
|
||||||
|
String MOUSEOVER = "mouseover";
|
||||||
|
String MOUSEMOVE = "mousemove";
|
||||||
|
String MOUSEOUT = "mouseout";
|
||||||
|
|
||||||
|
@JSProperty
|
||||||
|
int getScreenX();
|
||||||
|
|
||||||
|
@JSProperty
|
||||||
|
int getScreenY();
|
||||||
|
|
||||||
|
@JSProperty
|
||||||
|
int getClientX();
|
||||||
|
|
||||||
|
@JSProperty
|
||||||
|
int getClientY();
|
||||||
|
|
||||||
|
@JSProperty
|
||||||
|
boolean getCtrlKey();
|
||||||
|
|
||||||
|
@JSProperty
|
||||||
|
boolean getShiftKey();
|
||||||
|
|
||||||
|
@JSProperty
|
||||||
|
boolean getAltKey();
|
||||||
|
|
||||||
|
@JSProperty
|
||||||
|
boolean getMetaKey();
|
||||||
|
|
||||||
|
@JSProperty
|
||||||
|
short getButton();
|
||||||
|
|
||||||
|
@JSProperty
|
||||||
|
EventTarget getRelatedTarget();
|
||||||
|
|
||||||
|
void initMouseEvent(String type, boolean canBubble, boolean cancelable, JSObject view, int detail, int screenX,
|
||||||
|
int screenY, int clientX, int clientY, boolean ctrlKey, boolean altKey, boolean shiftKey, boolean metaKey,
|
||||||
|
short button, EventTarget relatedTarget);
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user