summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--javascript/WebIDL/Makefile12
-rw-r--r--javascript/WebIDL/uievents.idl185
2 files changed, 190 insertions, 7 deletions
diff --git a/javascript/WebIDL/Makefile b/javascript/WebIDL/Makefile
index cebc7085e..1f9abeca2 100644
--- a/javascript/WebIDL/Makefile
+++ b/javascript/WebIDL/Makefile
@@ -14,8 +14,9 @@
all: dom.idl html.idl uievents.idl
-.INTERMEDIATE:dom-spec.html dom-spec.xml dom-idl.html html-spec.html html-spec.xml html-idl.html
-
+.INTERMEDIATE:dom-spec.html dom-spec.xml dom-idl.html
+.INTERMEDIATE:html-spec.html html-spec.xml html-idl.html
+.INTERMEDIATE:uievents-spec.html uievents-spec.xml uievents-idl.html
dom-spec.html:
curl -s https://dom.spec.whatwg.org/ -o $@
@@ -24,14 +25,11 @@ html-spec.html:
curl -s https://html.spec.whatwg.org/ -o $@
uievents-spec.html:
- curl -s https://w3c.github.io/uievents/ -o $@
+ curl -s http://www.w3.org/TR/uievents/ -o $@
%-spec.xml: %-spec.html
-tidy -q -f $@.errors --new-blocklevel-tags header,hgroup,figure,time,main,nav,svg,rect,text,image,mark,figcaption,section -o $@ -asxml $<
-uievents-idl.html: uievents-spec.xml
- hxselect 'dl.idl' < $< | hxremove 'p' >> $@
-
%-idl.html: %-spec.xml
hxselect 'pre[class="idl"]' < $< > $@
@@ -44,4 +42,4 @@ uievents-idl.html: uievents-spec.xml
clean:
- ${RM} dom.idl html.idl dom-spec.html dom-spec.xml dom-idl.html html-spec.html html-spec.xml html-idl.html
+ ${RM} dom.idl html.idl uievents.idl dom-spec.html dom-spec.xml dom-idl.html html-spec.html html-spec.xml html-idl.html uievents-spec.html uievents-spec.xml uievents-idl.html uievents-spec.xml.errors
diff --git a/javascript/WebIDL/uievents.idl b/javascript/WebIDL/uievents.idl
new file mode 100644
index 000000000..3f339f381
--- /dev/null
+++ b/javascript/WebIDL/uievents.idl
@@ -0,0 +1,185 @@
+// Retrived from
+// Thu Jul 23 21:40:07 BST 2015
+
+
+[Constructor(DOMString type, optional UIEventInit eventInitDict)]
+interface UIEvent : Event {
+ readonly attribute Window? view;
+ readonly attribute long detail;
+};
+
+dictionary UIEventInit : EventInit {
+ Window? view = null;
+ long detail = 0;
+};
+
+[Constructor(DOMString typeArg, optional FocusEventInit focusEventInitDict)]
+interface FocusEvent : UIEvent {
+ readonly attribute EventTarget? relatedTarget;
+};
+
+dictionary FocusEventInit : UIEventInit {
+ EventTarget? relatedTarget = null;
+};
+
+[Constructor(DOMString typeArg, optional MouseEventInit mouseEventInitDict)]
+interface MouseEvent : UIEvent {
+ readonly attribute long screenX;
+ readonly attribute long screenY;
+ readonly attribute long clientX;
+ readonly attribute long clientY;
+ readonly attribute boolean ctrlKey;
+ readonly attribute boolean shiftKey;
+ readonly attribute boolean altKey;
+ readonly attribute boolean metaKey;
+ readonly attribute short button;
+ readonly attribute EventTarget? relatedTarget;
+ // Introduced in this specification
+ readonly attribute unsigned short buttons;
+ boolean getModifierState (DOMString keyArg);
+};
+
+dictionary MouseEventInit : EventModifierInit {
+ long screenX = 0;
+ long screenY = 0;
+ long clientX = 0;
+ long clientY = 0;
+ short button = 0;
+ unsigned short buttons = 0;
+ EventTarget? relatedTarget = null;
+};
+
+dictionary EventModifierInit : UIEventInit {
+ boolean ctrlKey = false;
+ boolean shiftKey = false;
+ boolean altKey = false;
+ boolean metaKey = false;
+ boolean modifierAltGraph = false;
+ boolean modifierCapsLock = false;
+ boolean modifierFn = false;
+ boolean modifierFnLock = false;
+ boolean modifierHyper = false;
+ boolean modifierNumLock = false;
+ boolean modifierOS = false;
+ boolean modifierScrollLock = false;
+ boolean modifierSuper = false;
+ boolean modifierSymbol = false;
+ boolean modifierSymbolLock = false;
+};
+
+[Constructor(DOMString typeArg, optional WheelEventInit wheelEventInitDict)]
+interface WheelEvent : MouseEvent {
+ // DeltaModeCode
+ const unsigned long DOM_DELTA_PIXEL = 0x00;
+ const unsigned long DOM_DELTA_LINE = 0x01;
+ const unsigned long DOM_DELTA_PAGE = 0x02;
+ readonly attribute double deltaX;
+ readonly attribute double deltaY;
+ readonly attribute double deltaZ;
+ readonly attribute unsigned long deltaMode;
+};
+
+dictionary WheelEventInit : MouseEventInit {
+ double deltaX = 0.0;
+ double deltaY = 0.0;
+ double deltaZ = 0.0;
+ unsigned long deltaMode = 0;
+};
+
+[Constructor(DOMString typeArg, optional KeyboardEventInit keyboardEventInitDict)]
+interface KeyboardEvent : UIEvent {
+ // KeyLocationCode
+ const unsigned long DOM_KEY_LOCATION_STANDARD = 0x00;
+ const unsigned long DOM_KEY_LOCATION_LEFT = 0x01;
+ const unsigned long DOM_KEY_LOCATION_RIGHT = 0x02;
+ const unsigned long DOM_KEY_LOCATION_NUMPAD = 0x03;
+ readonly attribute DOMString key;
+ readonly attribute DOMString code;
+ readonly attribute unsigned long location;
+ readonly attribute boolean ctrlKey;
+ readonly attribute boolean shiftKey;
+ readonly attribute boolean altKey;
+ readonly attribute boolean metaKey;
+ readonly attribute boolean repeat;
+ readonly attribute boolean isComposing;
+ boolean getModifierState (DOMString keyArg);
+};
+
+dictionary KeyboardEventInit : EventModifierInit {
+ DOMString key = "";
+ DOMString code = "";
+ unsigned long location = 0;
+ boolean repeat = false;
+ boolean isComposing = false;
+};
+
+[Constructor(DOMString typeArg, optional CompositionEventInit compositionEventInitDict)]
+interface CompositionEvent : UIEvent {
+ readonly attribute DOMString data;
+};
+
+dictionary CompositionEventInit : UIEventInit {
+ DOMString data = "";
+};
+
+partial interface CustomEvent {
+ // Originally introduced (and deprecated) in this specification
+ void initCustomEvent (DOMString typeArg, boolean bubblesArg, boolean cancelableArg, any detailArg);
+};
+
+partial interface UIEvent {
+ // Deprecated in this specification
+ void initUIEvent (DOMString typeArg, boolean bubblesArg, boolean cancelableArg, Window? viewArg, long detailArg);
+};
+
+partial interface FocusEvent {
+ // Originally introduced (and deprecated) in this specification
+ void initFocusEvent (DOMString typeArg, boolean bubblesArg, boolean cancelableArg, Window? viewArg, long detailArg, EventTarget? relatedTargetArg);
+};
+
+partial interface MouseEvent {
+ // Deprecated in this specification
+ void initMouseEvent (DOMString typeArg, boolean bubblesArg, boolean cancelableArg, Window? viewArg, long detailArg, long screenXArg, long screenYArg, long clientXArg, long clientYArg, boolean ctrlKeyArg, boolean altKeyArg, boolean shiftKeyArg, boolean metaKeyArg, short buttonArg, EventTarget? relatedTargetArg);
+};
+
+partial interface WheelEvent {
+ // Originally introduced (and deprecated) in this specification
+ void initWheelEvent (DOMString typeArg, boolean bubblesArg, boolean cancelableArg, Window? viewArg, long detailArg, long screenXArg, long screenYArg, long clientXArg, long clientYArg, short buttonArg, EventTarget? relatedTargetArg, DOMString modifiersListArg, double deltaXArg, double deltaYArg, double deltaZArg, unsigned long deltaMode);
+};
+
+partial interface KeyboardEvent {
+ // Originally introduced (and deprecated) in this specification
+ void initKeyboardEvent (DOMString typeArg, boolean bubblesArg, boolean cancelableArg, Window? viewArg, DOMString keyArg, unsigned long locationArg, DOMString modifiersListArg, boolean repeat, DOMString locale);
+};
+
+partial interface CompositionEvent {
+ // Originally introduced (and deprecated) in this specification
+ void initCompositionEvent (DOMString typeArg, boolean bubblesArg, boolean cancelableArg, Window? viewArg, DOMString dataArg, DOMString locale);
+};
+
+partial interface KeyboardEvent {
+ // The following support legacy user agents
+ readonly attribute unsigned long charCode;
+ readonly attribute unsigned long keyCode;
+ readonly attribute unsigned long which;
+};
+
+partial dictionary KeyboardEventInit {
+ unsigned long charCode = 0;
+ unsigned long keyCode = 0;
+ unsigned long which = 0;
+};
+
+interface MutationEvent : Event {
+ // attrChangeType
+ const unsigned short MODIFICATION = 1;
+ const unsigned short ADDITION = 2;
+ const unsigned short REMOVAL = 3;
+ readonly attribute Node? relatedNode;
+ readonly attribute DOMString prevValue;
+ readonly attribute DOMString newValue;
+ readonly attribute DOMString attrName;
+ readonly attribute unsigned short attrChange;
+ void initMutationEvent (DOMString typeArg, boolean bubblesArg, boolean cancelableArg, Node? relatedNodeArg, DOMString prevValueArg, DOMString newValueArg, DOMString attrNameArg, unsigned short attrChangeArg);
+};
+