WebCore:
authorweinig <weinig@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Sep 2006 17:08:48 +0000 (17:08 +0000)
committerweinig <weinig@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Sep 2006 17:08:48 +0000 (17:08 +0000)
        Reviewed by Darin.

        Patch for http://bugzilla.opendarwin.org/show_bug.cgi?id=10766
        Auto-generate the Objective-C DOM Events bindings

        - Auto-generates DOMEvent, DOMKeyboardEvent, DOMMouseEvent, DOMMutationEvent,
          DOMOverflowEvent, DOMUIEvent, and DOMWheelEvent.

        - Splits out DOMEventListener and DOMEventTarget into their own files.

        * DerivedSources.make:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/objc/DOMEventListener.h: Added.
        * bindings/objc/DOMEventTarget.h: Added.
        * bindings/objc/DOMEvents.h:
        * bindings/objc/DOMEvents.mm:
        (-[DOMEvent WebCore::]):
        (-[DOMEvent _initWithEvent:WebCore::]):
        (+[DOMEvent _eventWith:WebCore::]):
        * bindings/objc/DOMEventsNonstandard.mm: Removed.
        * bindings/objc/DOMNode.h:
        * bindings/objc/PublicDOMInterfaces.h:
        * bindings/scripts/CodeGenerator.pm:
        * bindings/scripts/CodeGeneratorObjC.pm:
        * dom/Event.idl:
        * dom/EventListener.idl: Added.
        * dom/EventTarget.idl: Added.
        * dom/KeyboardEvent.idl:
        * dom/MouseEvent.idl:
        * dom/UIEvent.idl:
        * dom/WheelEvent.idl:

WebKit:

        Reviewed by Darin.

        Patch for http://bugzilla.opendarwin.org/show_bug.cgi?id=10766
        Auto-generate the Objective-C DOM Events bindings

        * MigrateHeaders.make:
        * WebKit.xcodeproj/project.pbxproj:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@16262 268f45cc-cd09-0410-ab3c-d52691b4dbfc

22 files changed:
WebCore/ChangeLog
WebCore/DerivedSources.make
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/bindings/objc/DOMEventListener.h [new file with mode: 0644]
WebCore/bindings/objc/DOMEventTarget.h [new file with mode: 0644]
WebCore/bindings/objc/DOMEvents.h
WebCore/bindings/objc/DOMEvents.mm
WebCore/bindings/objc/DOMEventsNonstandard.mm [deleted file]
WebCore/bindings/objc/DOMNode.h
WebCore/bindings/objc/PublicDOMInterfaces.h
WebCore/bindings/scripts/CodeGenerator.pm
WebCore/bindings/scripts/CodeGeneratorObjC.pm
WebCore/dom/Event.idl
WebCore/dom/EventListener.idl [new file with mode: 0644]
WebCore/dom/EventTarget.idl [new file with mode: 0644]
WebCore/dom/KeyboardEvent.idl
WebCore/dom/MouseEvent.idl
WebCore/dom/UIEvent.idl
WebCore/dom/WheelEvent.idl
WebKit/ChangeLog
WebKit/MigrateHeaders.make
WebKit/WebKit.xcodeproj/project.pbxproj

index f6e03b0d1e4a268d9f158515c7a16a012407b005..f3db1c29ec744f343fe343da2abc425a21c42622 100644 (file)
@@ -1,3 +1,37 @@
+2006-09-07  Sam Weinig  <sam.weinig@gmail.com>
+
+        Reviewed by Darin.
+
+        Patch for http://bugzilla.opendarwin.org/show_bug.cgi?id=10766
+        Auto-generate the Objective-C DOM Events bindings
+
+        - Auto-generates DOMEvent, DOMKeyboardEvent, DOMMouseEvent, DOMMutationEvent, 
+          DOMOverflowEvent, DOMUIEvent, and DOMWheelEvent.
+          
+        - Splits out DOMEventListener and DOMEventTarget into their own files.
+
+        * DerivedSources.make:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/objc/DOMEventListener.h: Added.
+        * bindings/objc/DOMEventTarget.h: Added.
+        * bindings/objc/DOMEvents.h:
+        * bindings/objc/DOMEvents.mm:
+        (-[DOMEvent WebCore::]):
+        (-[DOMEvent _initWithEvent:WebCore::]):
+        (+[DOMEvent _eventWith:WebCore::]):
+        * bindings/objc/DOMEventsNonstandard.mm: Removed.
+        * bindings/objc/DOMNode.h:
+        * bindings/objc/PublicDOMInterfaces.h:
+        * bindings/scripts/CodeGenerator.pm:
+        * bindings/scripts/CodeGeneratorObjC.pm:
+        * dom/Event.idl:
+        * dom/EventListener.idl: Added.
+        * dom/EventTarget.idl: Added.
+        * dom/KeyboardEvent.idl:
+        * dom/MouseEvent.idl:
+        * dom/UIEvent.idl:
+        * dom/WheelEvent.idl:
+
 2006-09-07  Rob Buis  <buis@kde.org>
 
         Reviewed by Maciej.
index eb9e98e450dac75aa372fd4118931eb11fa8ffad..0f35723c35b4a741614500270bfeea9756087995 100644 (file)
@@ -68,6 +68,7 @@ all : \
     DOMElement.h \
     DOMEntity.h \
     DOMEntityReference.h \
+    DOMEvent.h \
     DOMHTMLAnchorElement.h \
     DOMHTMLAreaElement.h \
     DOMHTMLBRElement.h \
@@ -121,15 +122,21 @@ all : \
     DOMHTMLTextAreaElement.h \
     DOMHTMLTitleElement.h \
     DOMHTMLUListElement.h \
+    DOMKeyboardEvent.h \
     DOMMediaList.h \
+    DOMMouseEvent.h \
+    DOMMutationEvent.h \
     DOMNamedNodeMap.h \
     DOMNodeList.h \
     DOMNotation.h \
+    DOMOverflowEvent.h \
     DOMProcessingInstruction.h \
     DOMRect.h \
     DOMStyleSheet.h \
     DOMStyleSheetList.h \
-    DOMText.h
+    DOMText.h \
+    DOMUIEvent.h \
+    DOMWheelEvent.h
 endif
 
 all : \
index 57c489e848f55db6357965a70a2f0d4135b386f8..312db2c4c35556d69a94f02f4cc86c0b18bb1a28 100644 (file)
                8575DF850AA6130E00F5DBB5 /* DOMHTMLHtmlElement.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 85992EB40AA5069500AC0785 /* DOMHTMLHtmlElement.h */; };
                8575DF860AA6130E00F5DBB5 /* DOMHTMLLinkElement.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 85992EB60AA5069500AC0785 /* DOMHTMLLinkElement.h */; };
                8575DF870AA6130E00F5DBB5 /* DOMHTMLTitleElement.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 85992EB80AA5069500AC0785 /* DOMHTMLTitleElement.h */; };
+               857E0B250AB043460036E447 /* DOMMouseEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 857E0B230AB043460036E447 /* DOMMouseEvent.h */; };
+               857E0B260AB043460036E447 /* DOMMouseEvent.mm in Sources */ = {isa = PBXBuildFile; fileRef = 857E0B240AB043460036E447 /* DOMMouseEvent.mm */; };
+               857E0B2C0AB043FC0036E447 /* DOMMouseEventPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 857E0B2B0AB043FC0036E447 /* DOMMouseEventPrivate.h */; };
+               857E0B310AB044780036E447 /* DOMMouseEvent.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 857E0B230AB043460036E447 /* DOMMouseEvent.h */; };
+               857E0B320AB044780036E447 /* DOMMouseEventPrivate.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 857E0B2B0AB043FC0036E447 /* DOMMouseEventPrivate.h */; };
                858C381C0AA8E29600B187A4 /* DOMCSSValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 858C381A0AA8E29600B187A4 /* DOMCSSValue.h */; };
                858C381D0AA8E29600B187A4 /* DOMCSSValue.mm in Sources */ = {isa = PBXBuildFile; fileRef = 858C381B0AA8E29600B187A4 /* DOMCSSValue.mm */; };
                858C382C0AA8E40500B187A4 /* DOMCSSPrimitiveValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 858C382A0AA8E40500B187A4 /* DOMCSSPrimitiveValue.h */; };
                85ACAA8E0A9B759C00671E90 /* DOMNodeList.mm in Sources */ = {isa = PBXBuildFile; fileRef = 85ACAA8A0A9B759C00671E90 /* DOMNodeList.mm */; };
                85ACABB00A9CAF8000671E90 /* DOMDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 85ACABAE0A9CAF8000671E90 /* DOMDocument.h */; settings = {ATTRIBUTES = (); }; };
                85ACABB10A9CAF8000671E90 /* DOMDocument.mm in Sources */ = {isa = PBXBuildFile; fileRef = 85ACABAF0A9CAF8000671E90 /* DOMDocument.mm */; };
+               85AFA8220AAF528A00E84305 /* DOMEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 85AFA8200AAF528A00E84305 /* DOMEvent.h */; };
+               85AFA8230AAF528A00E84305 /* DOMEvent.mm in Sources */ = {isa = PBXBuildFile; fileRef = 85AFA8210AAF528A00E84305 /* DOMEvent.mm */; };
                85BA4CDD0AA6861B0088052D /* DOMHTMLButtonElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 85BA4CD50AA6861B0088052D /* DOMHTMLButtonElement.h */; };
                85BA4CDE0AA6861B0088052D /* DOMHTMLButtonElement.mm in Sources */ = {isa = PBXBuildFile; fileRef = 85BA4CD60AA6861B0088052D /* DOMHTMLButtonElement.mm */; };
                85BA4CDF0AA6861B0088052D /* DOMHTMLFieldSetElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 85BA4CD70AA6861B0088052D /* DOMHTMLFieldSetElement.h */; };
                85BA4D2C0AA6889F0088052D /* DOMHTMLMenuElement.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 85BA4D050AA688680088052D /* DOMHTMLMenuElement.h */; };
                85BA4D2D0AA6889F0088052D /* DOMHTMLOListElement.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 85BA4D070AA688680088052D /* DOMHTMLOListElement.h */; };
                85BA4D2E0AA6889F0088052D /* DOMHTMLUListElement.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 85BA4D090AA688680088052D /* DOMHTMLUListElement.h */; };
+               85C7F3E60AAF5D5E004014DD /* DOMEvent.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 85AFA8200AAF528A00E84305 /* DOMEvent.h */; };
+               85C7F4080AAF6EA9004014DD /* DOMEventPrivate.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 85C7F4070AAF6EA9004014DD /* DOMEventPrivate.h */; };
+               85C7F4460AAF76DC004014DD /* DOMEventListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 85C7F4440AAF76DC004014DD /* DOMEventListener.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               85C7F4470AAF76DC004014DD /* DOMEventTarget.h in Headers */ = {isa = PBXBuildFile; fileRef = 85C7F4450AAF76DC004014DD /* DOMEventTarget.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               85C7F4910AAF79DC004014DD /* DOMUIEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 85C7F48F0AAF79DC004014DD /* DOMUIEvent.h */; };
+               85C7F4920AAF79DC004014DD /* DOMUIEvent.mm in Sources */ = {isa = PBXBuildFile; fileRef = 85C7F4900AAF79DC004014DD /* DOMUIEvent.mm */; };
+               85C7F4C30AAF8081004014DD /* DOMUIEventPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 85C7F4C20AAF8081004014DD /* DOMUIEventPrivate.h */; };
+               85C7F4D00AAF83F6004014DD /* DOMUIEvent.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 85C7F48F0AAF79DC004014DD /* DOMUIEvent.h */; };
+               85C7F4D10AAF83F6004014DD /* DOMUIEventPrivate.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 85C7F4C20AAF8081004014DD /* DOMUIEventPrivate.h */; };
+               85C7F5BF0AAFB7CC004014DD /* DOMMutationEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 85C7F5BC0AAFB7CC004014DD /* DOMMutationEvent.h */; };
+               85C7F5C00AAFB7CD004014DD /* DOMMutationEvent.mm in Sources */ = {isa = PBXBuildFile; fileRef = 85C7F5BD0AAFB7CC004014DD /* DOMMutationEvent.mm */; };
+               85C7F5C10AAFB7CD004014DD /* DOMMutationEventPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 85C7F5BE0AAFB7CC004014DD /* DOMMutationEventPrivate.h */; };
+               85C7F5D00AAFB8D9004014DD /* DOMOverflowEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 85C7F5CE0AAFB8D9004014DD /* DOMOverflowEvent.h */; };
+               85C7F5D10AAFB8D9004014DD /* DOMOverflowEvent.mm in Sources */ = {isa = PBXBuildFile; fileRef = 85C7F5CF0AAFB8D9004014DD /* DOMOverflowEvent.mm */; };
+               85C7F5E70AAFBAFB004014DD /* DOMWheelEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 85C7F5E50AAFBAFB004014DD /* DOMWheelEvent.h */; };
+               85C7F5E80AAFBAFB004014DD /* DOMWheelEvent.mm in Sources */ = {isa = PBXBuildFile; fileRef = 85C7F5E60AAFBAFB004014DD /* DOMWheelEvent.mm */; };
                85CA96B80A9621A600690CCF /* DOMEntity.h in Headers */ = {isa = PBXBuildFile; fileRef = 85CA96B60A9621A600690CCF /* DOMEntity.h */; settings = {ATTRIBUTES = (); }; };
                85CA96B90A9621A600690CCF /* DOMEntity.mm in Sources */ = {isa = PBXBuildFile; fileRef = 85CA96B70A9621A600690CCF /* DOMEntity.mm */; };
                85CA96EA0A9624E900690CCF /* DOMNotation.h in Headers */ = {isa = PBXBuildFile; fileRef = 85CA96E80A9624E900690CCF /* DOMNotation.h */; settings = {ATTRIBUTES = (); }; };
                85DF2F8F0AA3C88100AD64C5 /* DOMHTMLCollection.mm in Sources */ = {isa = PBXBuildFile; fileRef = 85DF2F8D0AA3C88100AD64C5 /* DOMHTMLCollection.mm */; };
                85DF2F9B0AA3CAE500AD64C5 /* DOMHTMLOptionsCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 85DF2F990AA3CAE500AD64C5 /* DOMHTMLOptionsCollection.h */; settings = {ATTRIBUTES = (); }; };
                85DF2F9C0AA3CAE500AD64C5 /* DOMHTMLOptionsCollection.mm in Sources */ = {isa = PBXBuildFile; fileRef = 85DF2F9A0AA3CAE500AD64C5 /* DOMHTMLOptionsCollection.mm */; };
+               85DF34400AAFC0ED00E59AE3 /* DOMKeyboardEventPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 85DF343F0AAFC0ED00E59AE3 /* DOMKeyboardEventPrivate.h */; };
+               85DF345D0AAFC2D400E59AE3 /* DOMMutationEvent.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 85C7F5BC0AAFB7CC004014DD /* DOMMutationEvent.h */; };
+               85DF345E0AAFC2D400E59AE3 /* DOMMutationEventPrivate.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 85C7F5BE0AAFB7CC004014DD /* DOMMutationEventPrivate.h */; };
+               85DF345F0AAFC2D400E59AE3 /* DOMOverflowEvent.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 85C7F5CE0AAFB8D9004014DD /* DOMOverflowEvent.h */; };
+               85DF34600AAFC2D400E59AE3 /* DOMWheelEvent.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 85C7F5E50AAFBAFB004014DD /* DOMWheelEvent.h */; };
+               85DF34610AAFC2D400E59AE3 /* DOMWheelEventPrivate.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 85FF313B0AAFBD7200374F38 /* DOMWheelEventPrivate.h */; };
+               85DF34620AAFC2D400E59AE3 /* DOMKeyboardEvent.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 85FF31580AAFBFCB00374F38 /* DOMKeyboardEvent.h */; };
+               85DF34630AAFC2D400E59AE3 /* DOMKeyboardEventPrivate.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 85DF343F0AAFC0ED00E59AE3 /* DOMKeyboardEventPrivate.h */; };
                85DF81270AA7787200486AD7 /* DOMHTMLAnchorElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 85DF81210AA7787200486AD7 /* DOMHTMLAnchorElement.h */; };
                85DF81280AA7787200486AD7 /* DOMHTMLAnchorElement.mm in Sources */ = {isa = PBXBuildFile; fileRef = 85DF81220AA7787200486AD7 /* DOMHTMLAnchorElement.mm */; };
                85DF81290AA7787200486AD7 /* DOMHTMLImageElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 85DF81230AA7787200486AD7 /* DOMHTMLImageElement.h */; };
                85F74E080AA8DF8C000DC284 /* DOMCSSStyleDeclaration.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 85032DD10AA8C9BE007D3B7D /* DOMCSSStyleDeclaration.h */; };
                85F74E090AA8DF8C000DC284 /* DOMCSSStyleRule.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 85032DD30AA8C9BE007D3B7D /* DOMCSSStyleRule.h */; };
                85F74E0A0AA8DF8C000DC284 /* DOMCSSUnknownRule.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 85032DD50AA8C9BE007D3B7D /* DOMCSSUnknownRule.h */; };
+               85FF313C0AAFBD7200374F38 /* DOMWheelEventPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 85FF313B0AAFBD7200374F38 /* DOMWheelEventPrivate.h */; };
+               85FF315A0AAFBFCB00374F38 /* DOMKeyboardEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 85FF31580AAFBFCB00374F38 /* DOMKeyboardEvent.h */; };
+               85FF315B0AAFBFCB00374F38 /* DOMKeyboardEvent.mm in Sources */ = {isa = PBXBuildFile; fileRef = 85FF31590AAFBFCB00374F38 /* DOMKeyboardEvent.mm */; };
                93032CC809AEC34300F82A18 /* PathCG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93032CC709AEC34300F82A18 /* PathCG.cpp */; };
                93032CCA09AEC34B00F82A18 /* Path.h in Headers */ = {isa = PBXBuildFile; fileRef = 93032CC909AEC34B00F82A18 /* Path.h */; };
                9305B24D098F1B6B00C28855 /* Timer.h in Headers */ = {isa = PBXBuildFile; fileRef = 9305B24C098F1B6B00C28855 /* Timer.h */; };
                DB23C2CC0A508D29002489EB /* IndentOutdentCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = DB23C2CA0A508D29002489EB /* IndentOutdentCommand.h */; };
                DD763BB20992C2C900740B8E /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = DD763BB10992C2C900740B8E /* libxml2.dylib */; };
                DD7CDF250A23CF9800069928 /* CSSUnknownRule.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6CCE0A1989CA007FB8C5 /* CSSUnknownRule.h */; };
-               E1052C320A4D70010072D99B /* DOMEventsNonstandard.mm in Sources */ = {isa = PBXBuildFile; fileRef = E1052C310A4D70010072D99B /* DOMEventsNonstandard.mm */; };
                E14842DE0A674934007E4D39 /* StreamingTextDecoderICU.h in Headers */ = {isa = PBXBuildFile; fileRef = E14842DD0A674934007E4D39 /* StreamingTextDecoderICU.h */; };
                E14842FF0A674A31007E4D39 /* StreamingTextDecoderICU.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E14842FE0A674A31007E4D39 /* StreamingTextDecoderICU.cpp */; };
                E148432F0A674FC2007E4D39 /* StreamingTextDecoderMac.h in Headers */ = {isa = PBXBuildFile; fileRef = E148432E0A674FC2007E4D39 /* StreamingTextDecoderMac.h */; };
                        dstPath = Versions/A/PrivateHeaders;
                        dstSubfolderSpec = 1;
                        files = (
+                               857E0B310AB044780036E447 /* DOMMouseEvent.h in CopyFiles */,
+                               857E0B320AB044780036E447 /* DOMMouseEventPrivate.h in CopyFiles */,
+                               85DF345D0AAFC2D400E59AE3 /* DOMMutationEvent.h in CopyFiles */,
+                               85DF345E0AAFC2D400E59AE3 /* DOMMutationEventPrivate.h in CopyFiles */,
+                               85DF345F0AAFC2D400E59AE3 /* DOMOverflowEvent.h in CopyFiles */,
+                               85DF34600AAFC2D400E59AE3 /* DOMWheelEvent.h in CopyFiles */,
+                               85DF34610AAFC2D400E59AE3 /* DOMWheelEventPrivate.h in CopyFiles */,
+                               85DF34620AAFC2D400E59AE3 /* DOMKeyboardEvent.h in CopyFiles */,
+                               85DF34630AAFC2D400E59AE3 /* DOMKeyboardEventPrivate.h in CopyFiles */,
+                               85C7F4D00AAF83F6004014DD /* DOMUIEvent.h in CopyFiles */,
+                               85C7F4D10AAF83F6004014DD /* DOMUIEventPrivate.h in CopyFiles */,
+                               85C7F4080AAF6EA9004014DD /* DOMEventPrivate.h in CopyFiles */,
+                               85C7F3E60AAF5D5E004014DD /* DOMEvent.h in CopyFiles */,
                                1CFCEEF00AACC72B00348750 /* DOMCSSPrimitiveValuePrivate.h in CopyFiles */,
                                1CFCEEE20AACC6C700348750 /* DOMNamedNodeMapPrivate.h in CopyFiles */,
                                1CFCEEDF0AACC6A300348750 /* DOMHTMLPreElementPrivate.h in CopyFiles */,
                856C89FB0A90F068005C687B /* DOMNode.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMNode.mm; sourceTree = "<group>"; };
                856C8AE20A912649005C687B /* DOMObject.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMObject.h; sourceTree = "<group>"; };
                856C8AE30A912649005C687B /* DOMObject.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMObject.mm; sourceTree = "<group>"; };
+               857E0B230AB043460036E447 /* DOMMouseEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMMouseEvent.h; sourceTree = "<group>"; };
+               857E0B240AB043460036E447 /* DOMMouseEvent.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMMouseEvent.mm; sourceTree = "<group>"; };
+               857E0B2B0AB043FC0036E447 /* DOMMouseEventPrivate.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMMouseEventPrivate.h; sourceTree = "<group>"; };
                858C381A0AA8E29600B187A4 /* DOMCSSValue.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMCSSValue.h; sourceTree = "<group>"; };
                858C381B0AA8E29600B187A4 /* DOMCSSValue.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMCSSValue.mm; sourceTree = "<group>"; };
                858C382A0AA8E40500B187A4 /* DOMCSSPrimitiveValue.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMCSSPrimitiveValue.h; sourceTree = "<group>"; };
                85ACAA8A0A9B759C00671E90 /* DOMNodeList.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMNodeList.mm; sourceTree = "<group>"; };
                85ACABAE0A9CAF8000671E90 /* DOMDocument.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMDocument.h; sourceTree = "<group>"; };
                85ACABAF0A9CAF8000671E90 /* DOMDocument.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMDocument.mm; sourceTree = "<group>"; };
+               85AFA7410AAF298400E84305 /* EventListener.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = EventListener.idl; sourceTree = "<group>"; };
+               85AFA7420AAF298400E84305 /* EventTarget.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = EventTarget.idl; sourceTree = "<group>"; };
+               85AFA8200AAF528A00E84305 /* DOMEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMEvent.h; sourceTree = "<group>"; };
+               85AFA8210AAF528A00E84305 /* DOMEvent.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMEvent.mm; sourceTree = "<group>"; };
                85BA4CD50AA6861B0088052D /* DOMHTMLButtonElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMHTMLButtonElement.h; sourceTree = "<group>"; };
                85BA4CD60AA6861B0088052D /* DOMHTMLButtonElement.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMHTMLButtonElement.mm; sourceTree = "<group>"; };
                85BA4CD70AA6861B0088052D /* DOMHTMLFieldSetElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMHTMLFieldSetElement.h; sourceTree = "<group>"; };
                85C56CA90AA89E6600D95755 /* CSSImportRule.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = CSSImportRule.idl; sourceTree = "<group>"; };
                85C56CAC0AA89F8E00D95755 /* CSSCharsetRule.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = CSSCharsetRule.idl; sourceTree = "<group>"; };
                85C56CAD0AA89FE000D95755 /* CSSUnknownRule.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = CSSUnknownRule.idl; sourceTree = "<group>"; };
+               85C7F4070AAF6EA9004014DD /* DOMEventPrivate.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMEventPrivate.h; sourceTree = "<group>"; };
+               85C7F4440AAF76DC004014DD /* DOMEventListener.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMEventListener.h; sourceTree = "<group>"; };
+               85C7F4450AAF76DC004014DD /* DOMEventTarget.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMEventTarget.h; sourceTree = "<group>"; };
+               85C7F48F0AAF79DC004014DD /* DOMUIEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMUIEvent.h; sourceTree = "<group>"; };
+               85C7F4900AAF79DC004014DD /* DOMUIEvent.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMUIEvent.mm; sourceTree = "<group>"; };
+               85C7F4C20AAF8081004014DD /* DOMUIEventPrivate.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMUIEventPrivate.h; sourceTree = "<group>"; };
+               85C7F5BC0AAFB7CC004014DD /* DOMMutationEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMMutationEvent.h; sourceTree = "<group>"; };
+               85C7F5BD0AAFB7CC004014DD /* DOMMutationEvent.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMMutationEvent.mm; sourceTree = "<group>"; };
+               85C7F5BE0AAFB7CC004014DD /* DOMMutationEventPrivate.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMMutationEventPrivate.h; sourceTree = "<group>"; };
+               85C7F5CE0AAFB8D9004014DD /* DOMOverflowEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMOverflowEvent.h; sourceTree = "<group>"; };
+               85C7F5CF0AAFB8D9004014DD /* DOMOverflowEvent.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMOverflowEvent.mm; sourceTree = "<group>"; };
+               85C7F5E50AAFBAFB004014DD /* DOMWheelEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMWheelEvent.h; sourceTree = "<group>"; };
+               85C7F5E60AAFBAFB004014DD /* DOMWheelEvent.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMWheelEvent.mm; sourceTree = "<group>"; };
                85CA96B60A9621A600690CCF /* DOMEntity.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMEntity.h; sourceTree = "<group>"; };
                85CA96B70A9621A600690CCF /* DOMEntity.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMEntity.mm; sourceTree = "<group>"; };
                85CA96E80A9624E900690CCF /* DOMNotation.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMNotation.h; sourceTree = "<group>"; };
                85DF2F920AA3C9B600AD64C5 /* HTMLOptionsCollection.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = HTMLOptionsCollection.idl; sourceTree = "<group>"; };
                85DF2F990AA3CAE500AD64C5 /* DOMHTMLOptionsCollection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMHTMLOptionsCollection.h; sourceTree = "<group>"; };
                85DF2F9A0AA3CAE500AD64C5 /* DOMHTMLOptionsCollection.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMHTMLOptionsCollection.mm; sourceTree = "<group>"; };
+               85DF343F0AAFC0ED00E59AE3 /* DOMKeyboardEventPrivate.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMKeyboardEventPrivate.h; sourceTree = "<group>"; };
                85DF81210AA7787200486AD7 /* DOMHTMLAnchorElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMHTMLAnchorElement.h; sourceTree = "<group>"; };
                85DF81220AA7787200486AD7 /* DOMHTMLAnchorElement.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMHTMLAnchorElement.mm; sourceTree = "<group>"; };
                85DF81230AA7787200486AD7 /* DOMHTMLImageElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMHTMLImageElement.h; sourceTree = "<group>"; };
                85F32AEB0AA63B8700FF3184 /* DOMHTMLTextAreaElement.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMHTMLTextAreaElement.mm; sourceTree = "<group>"; };
                85F56A780A98CE3700ADB60A /* DOMProcessingInstruction.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMProcessingInstruction.h; sourceTree = "<group>"; };
                85F56A790A98CE3700ADB60A /* DOMProcessingInstruction.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMProcessingInstruction.mm; sourceTree = "<group>"; };
+               85FF313B0AAFBD7200374F38 /* DOMWheelEventPrivate.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMWheelEventPrivate.h; sourceTree = "<group>"; };
+               85FF31580AAFBFCB00374F38 /* DOMKeyboardEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMKeyboardEvent.h; sourceTree = "<group>"; };
+               85FF31590AAFBFCB00374F38 /* DOMKeyboardEvent.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMKeyboardEvent.mm; sourceTree = "<group>"; };
                93032CC709AEC34300F82A18 /* PathCG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PathCG.cpp; sourceTree = "<group>"; };
                93032CC909AEC34B00F82A18 /* Path.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Path.h; sourceTree = "<group>"; };
                9305B24C098F1B6B00C28855 /* Timer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Timer.h; sourceTree = "<group>"; };
                DB23C2C90A508D29002489EB /* IndentOutdentCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = IndentOutdentCommand.cpp; sourceTree = "<group>"; };
                DB23C2CA0A508D29002489EB /* IndentOutdentCommand.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IndentOutdentCommand.h; sourceTree = "<group>"; };
                DD763BB10992C2C900740B8E /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = /usr/lib/libxml2.dylib; sourceTree = "<absolute>"; };
-               E1052C310A4D70010072D99B /* DOMEventsNonstandard.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMEventsNonstandard.mm; sourceTree = "<group>"; };
                E14842DD0A674934007E4D39 /* StreamingTextDecoderICU.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StreamingTextDecoderICU.h; sourceTree = "<group>"; };
                E14842FE0A674A31007E4D39 /* StreamingTextDecoderICU.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StreamingTextDecoderICU.cpp; sourceTree = "<group>"; };
                E148432E0A674FC2007E4D39 /* StreamingTextDecoderMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; name = StreamingTextDecoderMac.h; path = mac/StreamingTextDecoderMac.h; sourceTree = "<group>"; };
                        name = HTML;
                        sourceTree = "<group>";
                };
+               85AFA7AB0AAF3BB000E84305 /* Events */ = {
+                       isa = PBXGroup;
+                       children = (
+                               85C7F4070AAF6EA9004014DD /* DOMEventPrivate.h */,
+                               85AFA8200AAF528A00E84305 /* DOMEvent.h */,
+                               85AFA8210AAF528A00E84305 /* DOMEvent.mm */,
+                               85DF343F0AAFC0ED00E59AE3 /* DOMKeyboardEventPrivate.h */,
+                               85FF31580AAFBFCB00374F38 /* DOMKeyboardEvent.h */,
+                               85FF31590AAFBFCB00374F38 /* DOMKeyboardEvent.mm */,
+                               857E0B2B0AB043FC0036E447 /* DOMMouseEventPrivate.h */,
+                               857E0B230AB043460036E447 /* DOMMouseEvent.h */,
+                               857E0B240AB043460036E447 /* DOMMouseEvent.mm */,
+                               85C7F5BC0AAFB7CC004014DD /* DOMMutationEvent.h */,
+                               85C7F5BD0AAFB7CC004014DD /* DOMMutationEvent.mm */,
+                               85C7F5BE0AAFB7CC004014DD /* DOMMutationEventPrivate.h */,
+                               85C7F5CE0AAFB8D9004014DD /* DOMOverflowEvent.h */,
+                               85C7F5CF0AAFB8D9004014DD /* DOMOverflowEvent.mm */,
+                               85C7F4C20AAF8081004014DD /* DOMUIEventPrivate.h */,
+                               85C7F48F0AAF79DC004014DD /* DOMUIEvent.h */,
+                               85C7F4900AAF79DC004014DD /* DOMUIEvent.mm */,
+                               85FF313B0AAFBD7200374F38 /* DOMWheelEventPrivate.h */,
+                               85C7F5E50AAFBAFB004014DD /* DOMWheelEvent.h */,
+                               85C7F5E60AAFBAFB004014DD /* DOMWheelEvent.mm */,
+                       );
+                       name = Events;
+                       sourceTree = "<group>";
+               };
                85B232260A8BF3A100FDF47B /* Derived Sources */ = {
                        isa = PBXGroup;
                        children = (
                                85967D9F0AA8BB59005FEDEE /* Core */,
-                               850657040AAB476C002D15C0 /* StyleSheets */,
                                85967DCA0AA8BF0F005FEDEE /* CSS */,
+                               85AFA7AB0AAF3BB000E84305 /* Events */,
                                85C56D030AA8BAA700D95755 /* HTML */,
+                               850657040AAB476C002D15C0 /* StyleSheets */,
                        );
                        name = "Derived Sources";
                        path = DerivedSources/WebCore;
                        name = HTML;
                        sourceTree = "<group>";
                };
+               85C7F4430AAF7686004014DD /* Events */ = {
+                       isa = PBXGroup;
+                       children = (
+                               85C7F4440AAF76DC004014DD /* DOMEventListener.h */,
+                               85C7F4450AAF76DC004014DD /* DOMEventTarget.h */,
+                       );
+                       name = Events;
+                       sourceTree = "<group>";
+               };
                93032CCC09AEC36200F82A18 /* cg */ = {
                        isa = PBXGroup;
                        children = (
                                85B232260A8BF3A100FDF47B /* Derived Sources */,
                                854F12AC0A8EBC18000940B5 /* Core */,
                                858C39510AA9024C00B187A4 /* CSS */,
+                               85C7F4430AAF7686004014DD /* Events */,
                                85992FC20AA5DD4600AC0785 /* HTML */,
                                859B7FB90A8D288800A5F1EA /* CodeGeneratorObjC.pm */,
                                1CD0B6200AABDB5000D0A3FF /* PublicDOMInterfaces.h */,
                                BC1A379B097C715F0019F3D8 /* DOMCSS.mm */,
                                BC1A379C097C715F0019F3D8 /* DOMEvents.h */,
                                BC1A379D097C715F0019F3D8 /* DOMEvents.mm */,
-                               E1052C310A4D70010072D99B /* DOMEventsNonstandard.mm */,
                                BC1A379F097C715F0019F3D8 /* DOMExtensions.h */,
                                BC1A37A0097C715F0019F3D8 /* DOMHTML.h */,
                                BC1A37A1097C715F0019F3D8 /* DOMHTML.mm */,
                                85031B2C0A44EFC700F992E0 /* Event.h */,
                                14E836D209F8512000B85AE4 /* Event.idl */,
                                935FBC4409BA00B900E230B1 /* EventListener.h */,
+                               85AFA7410AAF298400E84305 /* EventListener.idl */,
                                939885C108B7E3D100E707C4 /* EventNames.cpp */,
                                939885C208B7E3D100E707C4 /* EventNames.h */,
+                               85AFA7420AAF298400E84305 /* EventTarget.idl */,
                                14EC267E09CA07E000E1EEEC /* EventTargetNode.cpp */,
                                14EC267D09CA07E000E1EEEC /* EventTargetNode.h */,
                                935FBCF109BA143B00E230B1 /* ExceptionCode.h */,
                                850657000AAB4763002D15C0 /* DOMStyleSheet.h in Headers */,
                                850657020AAB4763002D15C0 /* DOMStyleSheetList.h in Headers */,
                                934706AB0AACD809002C1D43 /* TextDecoder.h in Headers */,
+                               85AFA8220AAF528A00E84305 /* DOMEvent.h in Headers */,
+                               85C7F4460AAF76DC004014DD /* DOMEventListener.h in Headers */,
+                               85C7F4470AAF76DC004014DD /* DOMEventTarget.h in Headers */,
+                               85C7F4910AAF79DC004014DD /* DOMUIEvent.h in Headers */,
+                               85C7F4C30AAF8081004014DD /* DOMUIEventPrivate.h in Headers */,
+                               85C7F5BF0AAFB7CC004014DD /* DOMMutationEvent.h in Headers */,
+                               85C7F5C10AAFB7CD004014DD /* DOMMutationEventPrivate.h in Headers */,
+                               85C7F5D00AAFB8D9004014DD /* DOMOverflowEvent.h in Headers */,
+                               85C7F5E70AAFBAFB004014DD /* DOMWheelEvent.h in Headers */,
+                               85FF313C0AAFBD7200374F38 /* DOMWheelEventPrivate.h in Headers */,
+                               85FF315A0AAFBFCB00374F38 /* DOMKeyboardEvent.h in Headers */,
+                               85DF34400AAFC0ED00E59AE3 /* DOMKeyboardEventPrivate.h in Headers */,
+                               857E0B250AB043460036E447 /* DOMMouseEvent.h in Headers */,
+                               857E0B2C0AB043FC0036E447 /* DOMMouseEventPrivate.h in Headers */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                                BCCD74E50A4C8DDF005FDA6D /* HTMLViewSourceDocument.cpp in Sources */,
                                448A29C00A46D9CB0030759F /* JSHTMLOptionsCollection.cpp in Sources */,
                                448AD27C0A48137A0023D179 /* JSHTMLOptionsCollectionCustom.cpp in Sources */,
-                               E1052C320A4D70010072D99B /* DOMEventsNonstandard.mm in Sources */,
                                1A1D13810A5325520064BF5F /* DOMXPath.mm in Sources */,
                                93A1EAA00A5634C9006960A0 /* ImageDocumentMac.mm in Sources */,
                                1A0D57360A5C77FE007EDD4C /* OverflowEvent.cpp in Sources */,
                                850657010AAB4763002D15C0 /* DOMStyleSheet.mm in Sources */,
                                850657030AAB4763002D15C0 /* DOMStyleSheetList.mm in Sources */,
                                E1EBBBD40AAC9B87001FE8E2 /* CSSCharsetRule.cpp in Sources */,
+                               85AFA8230AAF528A00E84305 /* DOMEvent.mm in Sources */,
+                               85C7F4920AAF79DC004014DD /* DOMUIEvent.mm in Sources */,
+                               85C7F5C00AAFB7CD004014DD /* DOMMutationEvent.mm in Sources */,
+                               85C7F5D10AAFB8D9004014DD /* DOMOverflowEvent.mm in Sources */,
+                               85C7F5E80AAFBAFB004014DD /* DOMWheelEvent.mm in Sources */,
+                               85FF315B0AAFBFCB00374F38 /* DOMKeyboardEvent.mm in Sources */,
+                               857E0B260AB043460036E447 /* DOMMouseEvent.mm in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
diff --git a/WebCore/bindings/objc/DOMEventListener.h b/WebCore/bindings/objc/DOMEventListener.h
new file mode 100644 (file)
index 0000000..94551cd
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.  All rights reserved.
+ * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+@class DOMEvent;
+
+@protocol DOMEventListener <NSObject>
+- (void)handleEvent:(DOMEvent *)event;
+@end
diff --git a/WebCore/bindings/objc/DOMEventTarget.h b/WebCore/bindings/objc/DOMEventTarget.h
new file mode 100644 (file)
index 0000000..0247cb7
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.  All rights reserved.
+ * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+@class DOMEvent;
+@protocol DOMEventListener;
+
+@protocol DOMEventTarget <NSObject, NSCopying>
+- (void)addEventListener:(NSString *)type :(id <DOMEventListener>)listener :(BOOL)useCapture;
+- (void)removeEventListener:(NSString *)type :(id <DOMEventListener>)listener :(BOOL)useCapture;
+- (BOOL)dispatchEvent:(DOMEvent *)event;
+@end
index 2aa0f4f2c8134dc13046e8bd8e97e10fc9c99a9c..a018e7f651a957be31678d4e37da20c6476cb31e 100644 (file)
 #import <WebCore/DOMObject.h>
 #import <WebCore/DOMViews.h>
 
-@class DOMEvent;
+#import <WebCore/DOMEvent.h>
+#import <WebCore/DOMEventListener.h>
+#import <WebCore/DOMEventTarget.h>
+#import <WebCore/DOMKeyboardEvent.h>
+#import <WebCore/DOMMouseEvent.h>
+#import <WebCore/DOMMutationEvent.h>
+#import <WebCore/DOMOverflowEvent.h>
+#import <WebCore/DOMUIEvent.h>
+#import <WebCore/DOMWheelEvent.h>
 
 extern NSString * const DOMEventException;
 
@@ -37,85 +45,6 @@ enum DOMEventExceptionCode {
     DOM_UNSPECIFIED_EVENT_TYPE_ERR = 0
 };
 
-@protocol DOMEventListener <NSObject>
-- (void)handleEvent:(DOMEvent *)event;
-@end
-
-@protocol DOMEventTarget <NSObject, NSCopying>
-- (void)addEventListener:(NSString *)type :(id <DOMEventListener>)listener :(BOOL)useCapture;
-- (void)removeEventListener:(NSString *)type :(id <DOMEventListener>)listener :(BOOL)useCapture;
-- (BOOL)dispatchEvent:(DOMEvent *)event;
-@end
-
-@interface DOMNode (DOMEventTarget) <DOMEventTarget>
-@end
-
-enum {
-    DOM_CAPTURING_PHASE = 1,
-    DOM_AT_TARGET = 2,
-    DOM_BUBBLING_PHASE = 3
-};
-
-@interface DOMEvent : DOMObject
-- (NSString *)type;
-- (id <DOMEventTarget>)target;
-- (id <DOMEventTarget>)currentTarget;
-- (unsigned short)eventPhase;
-- (BOOL)bubbles;
-- (BOOL)cancelable;
-- (DOMTimeStamp)timeStamp;
-- (void)stopPropagation;
-- (void)preventDefault;
-- (void)initEvent:(NSString *)eventTypeArg :(BOOL)canBubbleArg :(BOOL)cancelableArg;
-@end
-
-@interface DOMUIEvent : DOMEvent
-- (DOMAbstractView *)view;
-- (int)detail;
-- (void)initUIEvent:(NSString *)typeArg :(BOOL)canBubbleArg :(BOOL)cancelableArg :(DOMAbstractView *)viewArg :(int)detailArg;
-@end
-
-@interface DOMMouseEvent : DOMUIEvent
-- (int)screenX;
-- (int)screenY;
-- (int)clientX;
-- (int)clientY;
-- (BOOL)ctrlKey;
-- (BOOL)shiftKey;
-- (BOOL)altKey;
-- (BOOL)metaKey;
-- (unsigned short)button;
-- (id <DOMEventTarget>)relatedTarget;
-- (void)initMouseEvent:(NSString *)typeArg :(BOOL)canBubbleArg :(BOOL)cancelableArg :(DOMAbstractView *)viewArg :(int)detailArg :(int)screenXArg :(int)screenYArg :(int)clientX :(int)clientY :(BOOL)ctrlKeyArg :(BOOL)altKeyArg :(BOOL)shiftKeyArg :(BOOL)metaKeyArg :(unsigned short)buttonArg :(id <DOMEventTarget>)relatedTargetArg;
-@end
-
-enum {
-    DOM_MODIFICATION = 1,
-    DOM_ADDITION = 2,
-    DOM_REMOVAL = 3
-};
-
-@interface DOMMutationEvent : DOMEvent
-- (DOMNode *)relatedNode;
-- (NSString *)prevValue;
-- (NSString *)newValue;
-- (NSString *)attrName;
-- (unsigned short)attrChange;
-- (void)initMutationEvent:(NSString *)typeArg :(BOOL)canBubbleArg :(BOOL)cancelableArg :(DOMNode *)relatedNodeArg :(NSString *)prevValueArg :(NSString *)newValueArg :(NSString *)attrNameArg :(unsigned short)attrChangeArg;
-@end
-
-enum {
-    DOM_HORIZONTAL = 0,
-    DOM_VERTICAL = 1,
-    DOM_BOTH = 2
-};
-
-@interface DOMOverflowEvent : DOMEvent
-- (unsigned short)orient;
-- (BOOL)horizontalOverflow;
-- (BOOL)verticalOverflow;
-@end
-
 enum {
     DOM_KEY_LOCATION_STANDARD      = 0x00,
     DOM_KEY_LOCATION_LEFT          = 0x01,
@@ -123,30 +52,6 @@ enum {
     DOM_KEY_LOCATION_NUMPAD        = 0x03
 };
 
-@interface DOMKeyboardEvent : DOMUIEvent
-- (NSString*)keyIdentifier;
-- (unsigned)keyLocation;
-- (BOOL)ctrlKey;
-- (BOOL)shiftKey;
-- (BOOL)altKey;
-- (BOOL)metaKey;
-- (BOOL)getModifierState:(NSString *)keyIdentifierArg;
-@end
-
 @interface DOMKeyboardEvent (NonStandardAdditions)
-- (int)keyCode;
-- (int)charCode;
-@end
-
-@interface DOMWheelEvent : DOMUIEvent
-- (int)screenX;
-- (int)screenY;
-- (int)clientX;
-- (int)clientY;
-- (BOOL)ctrlKey;
-- (BOOL)shiftKey;
-- (BOOL)altKey;
-- (BOOL)metaKey;
-- (BOOL)isHorizontal;
-- (int)wheelDelta;
+- (BOOL)getModifierState:(NSString *)keyIdentifierArg;
 @end
index 42948bf01d615dd07ad52eb72a45ff548fbdf3f8..e5107b0100c0bde9c6d77cb02df41d28b5f90425 100644 (file)
@@ -1,6 +1,7 @@
 /*
  * Copyright (C) 2004 Apple Computer, Inc.  All rights reserved.
  * Copyright (C) 2006 Jonas Witt <jonas.witt@gmail.com>
+ * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
 #import "OverflowEvent.h"
 #import "UIEvent.h"
 
-using namespace WebCore;
-
 ALLOW_DOM_CAST(Event)
 
-@class DOMWheelEvent;
-
-@implementation DOMEvent
-
-- (NSString *)type
-{
-    return [self _event]->type();
-}
-
-- (id <DOMEventTarget>)target
-{
-    return [DOMNode _nodeWith:[self _event]->target()];
-}
-
-- (id <DOMEventTarget>)currentTarget
-{
-    return [DOMNode _nodeWith:[self _event]->currentTarget()];
-}
-
-- (unsigned short)eventPhase
-{
-    return [self _event]->eventPhase();
-}
-
-- (BOOL)bubbles
-{
-    return [self _event]->bubbles();
-}
-
-- (BOOL)cancelable
-{
-    return [self _event]->cancelable();
-}
-
-- (::DOMTimeStamp)timeStamp
-{
-    return [self _event]->timeStamp();
-}
-
-- (void)stopPropagation
-{
-    [self _event]->stopPropagation();
-}
-
-- (void)preventDefault
-{
-    [self _event]->preventDefault();
-}
-
-- (void)initEvent:(NSString *)eventTypeArg :(BOOL)canBubbleArg :(BOOL)cancelableArg
-{
-    [self _event]->initEvent(eventTypeArg, canBubbleArg, cancelableArg);
-}
-
-@end
+//------------------------------------------------------------------------------------------
+// DOMEvent
 
 @implementation DOMEvent (WebCoreInternal)
 
-- (Event *)_event
+- (WebCore::Event *)_event
 {
-    return DOM_cast<Event *>(_internal);
+    return DOM_cast<WebCore::Event *>(_internal);
 }
 
-- (id)_initWithEvent:(Event *)impl
+- (id)_initWithEvent:(WebCore::Event *)impl
 {
     ASSERT(impl);
 
@@ -115,7 +61,7 @@ ALLOW_DOM_CAST(Event)
     return self;
 }
 
-+ (DOMEvent *)_eventWith:(Event *)impl
++ (DOMEvent *)_eventWith:(WebCore::Event *)impl
 {
     if (!impl)
         return nil;
@@ -144,59 +90,13 @@ ALLOW_DOM_CAST(Event)
     return [[[wrapperClass alloc] _initWithEvent:impl] autorelease];
 }
 
-- (void)dealloc
-{
-    if (_internal)
-        DOM_cast<Event *>(_internal)->deref();
-    [super dealloc];
-}
-
-- (void)finalize
-{
-    if (_internal)
-        DOM_cast<Event *>(_internal)->deref();
-    [super finalize];
-}
-
-
 @end
 
-@implementation DOMKeyboardEvent
-
-- (KeyboardEvent *)_keyboardEvent
-{
-    return static_cast<KeyboardEvent *>(DOM_cast<Event *>(_internal));
-}
-
-- (NSString*)keyIdentifier
-{
-    return (NSString *) [self _keyboardEvent]->keyIdentifier();
-}
-
-- (unsigned)keyLocation
-{
-    return [self _keyboardEvent]->keyLocation();
-}
-
-- (BOOL)ctrlKey
-{
-    return [self _keyboardEvent]->ctrlKey();
-}
 
-- (BOOL)shiftKey
-{
-    return [self _keyboardEvent]->shiftKey();
-}
+//------------------------------------------------------------------------------------------
+// DOMKeyboardEvent
 
-- (BOOL)altKey
-{
-    return [self _keyboardEvent]->altKey();
-}
-
-- (BOOL)metaKey
-{
-    return [self _keyboardEvent]->metaKey();
-}
+@implementation DOMKeyboardEvent (NonStandardAdditions)
 
 - (BOOL)getModifierState:(NSString *)keyIdentifierArg
 {
@@ -211,168 +111,4 @@ ALLOW_DOM_CAST(Event)
     return NO;
 }
 
-- (void)initKeyboardEvent:(NSString *)typeArg :(BOOL)canBubbleArg :(BOOL)cancelableArg :(DOMAbstractView *)viewArg :(NSString *)keyIdentifierArg :(unsigned)keyLocationArg :(BOOL)ctrlKeyArg :(BOOL)altKeyArg :(BOOL)shiftKeyArg :(BOOL)metaKeyArg {
-    [self _keyboardEvent]->initKeyboardEvent(typeArg, canBubbleArg, cancelableArg,
-        [viewArg _abstractView], keyIdentifierArg, keyLocationArg, ctrlKeyArg, altKeyArg, shiftKeyArg, metaKeyArg, false);
-}
-
-@end
-
-@implementation DOMMouseEvent
-
-- (MouseEvent *)_mouseEvent
-{
-    return static_cast<MouseEvent *>(DOM_cast<Event *>(_internal));
-}
-
-- (int)screenX
-{
-    return [self _mouseEvent]->screenX();
-}
-
-- (int)screenY
-{
-    return [self _mouseEvent]->screenY();
-}
-
-- (int)clientX
-{
-    return [self _mouseEvent]->clientX();
-}
-
-- (int)clientY
-{
-    return [self _mouseEvent]->clientY();
-}
-
-- (BOOL)ctrlKey
-{
-    return [self _mouseEvent]->ctrlKey();
-}
-
-- (BOOL)shiftKey
-{
-    return [self _mouseEvent]->shiftKey();
-}
-
-- (BOOL)altKey
-{
-    return [self _mouseEvent]->altKey();
-}
-
-- (BOOL)metaKey
-{
-    return [self _mouseEvent]->metaKey();
-}
-
-- (unsigned short)button
-{
-    return [self _mouseEvent]->button();
-}
-
-- (id <DOMEventTarget>)relatedTarget
-{
-    return [DOMNode _nodeWith:[self _mouseEvent]->relatedTarget()];
-}
-
-- (void)initMouseEvent:(NSString *)typeArg :(BOOL)canBubbleArg :(BOOL)cancelableArg :(DOMAbstractView *)viewArg :(int)detailArg :(int)screenXArg :(int)screenYArg :(int)clientX :(int)clientY :(BOOL)ctrlKeyArg :(BOOL)altKeyArg :(BOOL)shiftKeyArg :(BOOL)metaKeyArg :(unsigned short)buttonArg :(id <DOMEventTarget>)relatedTargetArg
-{
-    DOMNode *relatedTargetObjc = relatedTargetArg;
-    Node* relTargetNode = [relatedTargetObjc _node];
-    EventTargetNode* relatedTarget = (relTargetNode && relTargetNode->isEventTargetNode()) ? static_cast<EventTargetNode*>(relTargetNode) : 0;
-    
-    [self _mouseEvent]->initMouseEvent(typeArg, canBubbleArg, cancelableArg,
-        [viewArg _abstractView], detailArg, screenXArg, screenYArg, clientX, clientY,
-        shiftKeyArg, ctrlKeyArg, altKeyArg, metaKeyArg, buttonArg,
-        relatedTarget);
-}
-
-@end
-
-@implementation DOMMutationEvent
-
-- (MutationEvent *)_mutationEvent
-{
-    return static_cast<MutationEvent *>(DOM_cast<Event *>(_internal));
-}
-
-- (DOMNode *)relatedNode
-{
-    return [DOMNode _nodeWith:[self _mutationEvent]->relatedNode()];
-}
-
-- (NSString *)prevValue
-{
-    return [self _mutationEvent]->prevValue();
-}
-
-- (NSString *)newValue
-{
-    return [self _mutationEvent]->newValue();
-}
-
-- (NSString *)attrName
-{
-    return [self _mutationEvent]->attrName();
-}
-
-- (unsigned short)attrChange
-{
-    return [self _mutationEvent]->attrChange();
-}
-
-- (void)initMutationEvent:(NSString *)typeArg :(BOOL)canBubbleArg :(BOOL)cancelableArg :(DOMNode *)relatedNodeArg :(NSString *)prevValueArg :(NSString *)newValueArg :(NSString *)attrNameArg :(unsigned short)attrChangeArg
-{
-    [self _mutationEvent]->initMutationEvent(typeArg, canBubbleArg, cancelableArg,
-        [relatedNodeArg _node], prevValueArg, newValueArg, attrNameArg, attrChangeArg);
-}
-
-@end
-
-@implementation DOMUIEvent
-
-- (UIEvent *)_UIEvent
-{
-    return static_cast<UIEvent *>(DOM_cast<Event *>(_internal));
-}
-
-- (DOMAbstractView *)view
-{
-    return [DOMAbstractView _abstractViewWith:[self _UIEvent]->view()];
-}
-
-- (int)detail
-{
-    return [self _UIEvent]->detail();
-}
-
-- (void)initUIEvent:(NSString *)typeArg :(BOOL)canBubbleArg :(BOOL)cancelableArg :(DOMAbstractView *)viewArg :(int)detailArg
-{
-    [self _UIEvent]->initUIEvent(typeArg, canBubbleArg, cancelableArg, [viewArg _abstractView], detailArg);
-}
-
-@end
-
-@implementation DOMOverflowEvent
-
-- (OverflowEvent *)_overflowEvent
-{
-    return static_cast<OverflowEvent *>(DOM_cast<Event *>(_internal));
-}
-
-- (unsigned short)orient
-{
-    return [self _overflowEvent]->orient();
-}
-
-- (BOOL)horizontalOverflow
-{
-    return [self _overflowEvent]->horizontalOverflow();
-}
-
-- (BOOL)verticalOverflow
-{
-    return [self _overflowEvent]->verticalOverflow();
-}
-
 @end
diff --git a/WebCore/bindings/objc/DOMEventsNonstandard.mm b/WebCore/bindings/objc/DOMEventsNonstandard.mm
deleted file mode 100644 (file)
index 7e3716c..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright (C) 2004 Apple Computer, Inc.  All rights reserved.
- * Copyright (C) 2006 Jonas Witt <jonas.witt@gmail.com>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- */
-
-#import "config.h"
-#import "DOMPrivate.h"
-
-#import "DOMInternal.h"
-#import "KeyboardEvent.h"
-#import "WheelEvent.h"
-
-using namespace WebCore;
-
-ALLOW_DOM_CAST(Event)
-
-@implementation DOMWheelEvent
-
-- (WheelEvent *)_wheelEvent
-{
-    return static_cast<WheelEvent *>(DOM_cast<Event *>(_internal));
-}
-
-- (int)screenX
-{
-    return [self _wheelEvent]->screenX();
-}
-
-- (int)screenY
-{
-    return [self _wheelEvent]->screenY();
-}
-
-- (int)clientX
-{
-    return [self _wheelEvent]->clientX();
-}
-
-- (int)clientY
-{
-    return [self _wheelEvent]->clientY();
-}
-
-- (BOOL)ctrlKey
-{
-    return [self _wheelEvent]->ctrlKey();
-}
-
-- (BOOL)shiftKey
-{
-    return [self _wheelEvent]->shiftKey();
-}
-
-- (BOOL)altKey {
-    return [self _wheelEvent]->altKey();
-}
-
-- (BOOL)metaKey {
-    return [self _wheelEvent]->metaKey();
-}
-
-- (BOOL)isHorizontal
-{
-    return [self _wheelEvent]->isHorizontal();
-}
-
-- (int)wheelDelta
-{
-    return [self _wheelEvent]->wheelDelta();
-}
-
-- (void)initWheelEvent:(BOOL)horizontal :(int)wheelDelta :(DOMAbstractView *)viewArg :(int)screenXArg :(int)screenYArg :(int)clientX :(int)clientY :(BOOL)ctrlKeyArg :(BOOL)altKeyArg :(BOOL)shiftKeyArg :(BOOL)metaKeyArg
-{
-    [self _wheelEvent]->initWheelEvent(horizontal, wheelDelta, [viewArg _abstractView], 
-        screenXArg, screenYArg, clientX, clientY,
-        ctrlKeyArg, altKeyArg, shiftKeyArg, metaKeyArg);
-}
-
-@end
-
-@implementation DOMKeyboardEvent (NonStandardAdditions)
-
-- (KeyboardEvent *)_keyboardEvent
-{
-    return static_cast<KeyboardEvent *>(DOM_cast<Event *>(_internal));
-}
-
-- (int)keyCode
-{
-    return [self _keyboardEvent]->keyCode();
-}
-
-- (int)charCode
-{
-    return [self _keyboardEvent]->charCode();
-}
-
-@end
index 69e4e57d0a2891e2292ed6a49628e9ba752ba9ae..ccdb630971ee03945bd840af599608e438a2b2a7 100644 (file)
@@ -25,6 +25,7 @@
  */
 
 #import <WebCore/DOMObject.h>
+#import <WebCore/DOMEventTarget.h>
 
 @class DOMDocument; 
 @class DOMNamedNodeMap;
@@ -82,3 +83,6 @@ enum {
 - (NSRect)boundingBox;
 - (NSArray *)lineBoxRects;
 @end
+
+@interface DOMNode (DOMEventTarget) <DOMEventTarget>
+@end
index 1383234322ec10c5094e6e4ae2549650057cccaf..fc6f462a587345d1a0f0e26d85d9cb7eceee01a0 100644 (file)
 @property(readonly) DOMCSSPrimitiveValue *bottom;
 @property(readonly) DOMCSSPrimitiveValue *left;
 @end
+
+@interface DOMEvent : DOMObject
+@property(readonly) NSString *type;
+@property(readonly) id <DOMEventTarget> target;
+@property(readonly) id <DOMEventTarget> currentTarget;
+@property(readonly) unsigned short eventPhase;
+@property(readonly) BOOL bubbles;
+@property(readonly) BOOL cancelable;
+@property(readonly) DOMTimeStamp timeStamp;
+- (void)stopPropagation;
+- (void)preventDefault;
+//- (void)initEvent:(NSString *)eventTypeArg canBubbleArg:(BOOL)canBubbleArg cancelableArg:(BOOL)cancelableArg;
+- (void)initEvent:(NSString *)eventTypeArg :(BOOL)canBubbleArg :(BOOL)cancelableArg;
+@end
+
+@interface DOMUIEvent : DOMEvent
+@property(readonly) DOMAbstractView *view;
+@property(readonly) int detail;
+//- (void)initUIEvent:(DOMAtomicString *)type canBubble:(BOOL)canBubble cancelable:(BOOL)cancelable view:(DOMAbstractView *)view detail:(int)detail;
+- (void)initUIEvent:(NSString *)type :(BOOL)canBubble :(BOOL)cancelable :(DOMAbstractView *)view :(int)detail;
+@end
+
+@interface DOMMutationEvent : DOMEvent
+@property(readonly) DOMNode *relatedNode;
+@property(readonly) NSString *prevValue;
+@property(readonly) NSString *newValue;
+@property(readonly) NSString *attrName;
+@property(readonly) unsigned short attrChange;
+//- (void)initMutationEvent:(NSString *)type canBubble:(BOOL)canBubble cancelable:(BOOL)cancelable relatedNode:(DOMNode *)relatedNode prevValue:(NSString *)prevValue newValue:(NSString *)newValue attrName:(NSString *)attrName attrChange:(unsigned short)attrChange;
+- (void)initMutationEvent:(NSString *)type :(BOOL)canBubble :(BOOL)cancelable :(DOMNode *)relatedNode :(NSString *)prevValue :(NSString *)newValue :(NSString *)attrName :(unsigned short)attrChange;
+@end
+
+@interface DOMOverflowEvent : DOMEvent
+@property(readonly) unsigned short orient;
+@property(readonly) BOOL horizontalOverflow;
+@property(readonly) BOOL verticalOverflow;
+@end
+
+@interface DOMWheelEvent : DOMUIEvent
+@property(readonly) int screenX;
+@property(readonly) int screenY;
+@property(readonly) int clientX;
+@property(readonly) int clientY;
+@property(readonly) BOOL ctrlKey;
+@property(readonly) BOOL shiftKey;
+@property(readonly) BOOL altKey;
+@property(readonly) BOOL metaKey;
+@property(readonly) BOOL isHorizontal;
+@property(readonly) int wheelDelta;
+@end
+
+@interface DOMKeyboardEvent : DOMUIEvent
+@property(readonly) NSString *keyIdentifier;
+@property(readonly) unsigned keyLocation;
+@property(readonly) BOOL ctrlKey;
+@property(readonly) BOOL shiftKey;
+@property(readonly) BOOL altKey;
+@property(readonly) BOOL metaKey;
+@property(readonly) int keyCode;
+@property(readonly) int charCode;
+@end
+
+@interface DOMMouseEvent : DOMUIEvent
+@property(readonly) int screenX;
+@property(readonly) int screenY;
+@property(readonly) int clientX;
+@property(readonly) int clientY;
+@property(readonly) BOOL ctrlKey;
+@property(readonly) BOOL shiftKey;
+@property(readonly) BOOL altKey;
+@property(readonly) BOOL metaKey;
+@property(readonly) unsigned short button;
+@property(readonly) id <DOMEventTarget> relatedTarget;
+//- (void)initMouseEvent:(NSString *)type canBubble:(BOOL)canBubble cancelable:(BOOL)cancelable view:(DOMAbstractView *)view detail:(int)detail screenX:(int)screenX screenY:(int)screenY clientX:(int)clientX clientY:(int)clientY ctrlKey:(BOOL)ctrlKey altKey:(BOOL)altKey shiftKey:(BOOL)shiftKey metaKey:(BOOL)metaKey button:(unsigned short)button relatedTarget:(id <DOMEventTarget>)relatedTarget;
+- (void)initMouseEvent:(NSString *)type :(BOOL)canBubble :(BOOL)cancelable :(DOMAbstractView *)view :(int)detail :(int)screenX :(int)screenY :(int)clientX :(int)clientY :(BOOL)ctrlKey :(BOOL)altKey :(BOOL)shiftKey :(BOOL)metaKey :(unsigned short)button :(id <DOMEventTarget>)relatedTarget;
+@end
index f135d4853b4ac6b59a47f91a252ed15a4ea66b85..4bd14e05cc3c82abf949dde7e0666a9f51e0e405 100644 (file)
@@ -2,6 +2,7 @@
 # KDOM IDL parser
 #
 # Copyright (C) 2005 Nikolas Zimmermann <wildfox@kde.org>
+# Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
 # 
 # This file is part of the KDE project
 # 
@@ -45,16 +46,16 @@ my @foundFilenames = ();
 # Default constructor
 sub new
 {
-  my $object = shift;
-  my $reference = { };
+    my $object = shift;
+    my $reference = { };
 
-  $useDirectories = shift;
-  $useGenerator = shift;
-  $useOutputDir = shift;
-  $useLayerOnTop = shift;
+    $useDirectories = shift;
+    $useGenerator = shift;
+    $useOutputDir = shift;
+    $useLayerOnTop = shift;
 
-  bless($reference, $object);
-  return $reference;
+    bless($reference, $object);
+    return $reference;
 }
 
 sub StripModule($)
@@ -67,36 +68,33 @@ sub StripModule($)
 
 sub ProcessDocument
 {
-  my $object = shift;
-  $useDocument = shift;
-  my $defines = shift;
+    my $object = shift;
+    $useDocument = shift;
+    my $defines = shift;
   
-  my $ifaceName = $useGenerator;
-  $ifaceName = "CodeGenerator$ifaceName";
-
-  # Dynamically load external code generation perl module...
-  require $ifaceName . ".pm";
-  $codeGenerator = $ifaceName->new($object, $useOutputDir, $useLayerOnTop);
-  unless (defined($codeGenerator)) {
-    my $classes = $useDocument->classes;
-    foreach(@$classes) {
-      my $class = $_;
-      print "Skipping $useGenerator code generation for IDL interface \"" . $class->name . "\".\n";
+    my $ifaceName = "CodeGenerator" . $useGenerator;
+
+    # Dynamically load external code generation perl module...
+    require $ifaceName . ".pm";
+    $codeGenerator = $ifaceName->new($object, $useOutputDir, $useLayerOnTop);
+    unless (defined($codeGenerator)) {
+        my $classes = $useDocument->classes;
+        foreach my $class (@$classes) {
+            print "Skipping $useGenerator code generation for IDL interface \"" . $class->name . "\".\n";
+        }
+        return;
     }
-    return;
-  }
 
-  # Start the actual code generation!
-  $codeGenerator->GenerateModule($useDocument, $defines);
+    # Start the actual code generation!
+    $codeGenerator->GenerateModule($useDocument, $defines);
 
-  my $classes = $useDocument->classes;
-  foreach(@$classes) {
-    my $class = $_;
-    print "Generating $useGenerator bindings code for IDL interface \"" . $class->name . "\"...\n";
-    $codeGenerator->GenerateInterface($class, $defines);
-  }
+    my $classes = $useDocument->classes;
+    foreach my $class (@$classes) {
+        print "Generating $useGenerator bindings code for IDL interface \"" . $class->name . "\"...\n";
+        $codeGenerator->GenerateInterface($class, $defines);
+    }
 
-  $codeGenerator->finish();
+    $codeGenerator->finish();
 }
 
 sub AddMethodsConstantsAndAttributesFromParentClasses
@@ -116,13 +114,11 @@ sub AddMethodsConstantsAndAttributesFromParentClasses
     my $attributesRef = $dataNode->attributes;
 
     # Exception: For the DOM 'Node' is our topmost baseclass, not EventTargetNode.
-    if(($parentsMax eq 1) and ($parents[0] eq "EventTargetNode")) {
-        return;
-    }
+    return if $parentsMax eq 1 and $parents[0] eq "EventTargetNode";
 
     my $ignoreParent = 1;
-    foreach(@{$dataNode->parents}) {
-        if($ignoreParent eq 1) {
+    foreach (@{$dataNode->parents}) {
+        if ($ignoreParent) {
             # Ignore first parent class, already handled by the generation itself.
             $ignoreParent = 0;
             next;
@@ -134,22 +130,18 @@ sub AddMethodsConstantsAndAttributesFromParentClasses
         $endCondition = 0;
         $foundFilename = "";
 
-        foreach(@{$useDirectories}) {
-            if($foundFilename eq "") {
-                $object->ScanDirectory("$interface.idl", $_, $_, 0);
-            }
+        foreach (@{$useDirectories}) {
+            $object->ScanDirectory("$interface.idl", $_, $_, 0) if ($foundFilename eq "");
         }
 
-        if($foundFilename ne "") {
+        if ($foundFilename ne "") {
             print "  |  |>  Parsing parent IDL \"$foundFilename\" for interface \"$interface\"\n";
 
             # Step #2: Parse the found IDL file (in quiet mode).
             my $parser = IDLParser->new(1);
             my $document = $parser->Parse($foundFilename, "");
 
-            foreach(@{$document->classes}) {
-                my $class = $_;
-
+            foreach my $class (@{$document->classes}) {
                 # Step #3: Collect constants & functions & attributes of this parent-class...
                 my $constantsMax = @{$class->constants};
                 my $functionsMax = @{$class->functions};
@@ -158,15 +150,15 @@ sub AddMethodsConstantsAndAttributesFromParentClasses
                 print "  |  |>  -> Inherting $constantsMax constants, $functionsMax functions, $attributesMax attributes...\n  |  |>\n";
 
                 # Step #4: Concatenate data...
-                foreach(@{$class->constants}) {
+                foreach (@{$class->constants}) {
                     push(@$constantsRef, $_);
                 }
 
-                foreach(@{$class->functions}) {
+                foreach (@{$class->functions}) {
                     push(@$functionsRef, $_);
                 }
 
-                foreach(@{$class->attributes}) {
+                foreach (@{$class->attributes}) {
                     push(@$attributesRef, $_);
                 }
 
@@ -182,237 +174,222 @@ sub AddMethodsConstantsAndAttributesFromParentClasses
 # Helper for all CodeGenerator***.pm modules
 sub FindTopBaseClass
 {
-  # If you are processing the 'Attr' interface, it has the single
-  # parent interface 'Node', which is the topmost base class. Return it.
-  #
-  # It gets trickier for ie. the 'PlatformMouseEvent' interface, whose parent is
-  # the 'UIEvent' interface, whose parent is the 'Event' interface. Return it.
-  my $object = shift;
-  my $interface = StripModule(shift);
-  my $topBaseClass = "";
+    # If you are processing the 'Attr' interface, it has the single
+    # parent interface 'Node', which is the topmost base class. Return it.
+    #
+    # It gets trickier for ie. the 'PlatformMouseEvent' interface, whose parent is
+    # the 'UIEvent' interface, whose parent is the 'Event' interface. Return it.
+    my $object = shift;
+    my $interface = StripModule(shift);
+    my $topBaseClass = "";
   
-  # Loop until we found the top most base class for 'interface'
-  while($interface ne "") {
-    # Step #1: Find the IDL file associated with 'interface'
-    $endCondition = 0; $foundFilename = "";
-
-    foreach(@{$useDirectories}) {
-      if($foundFilename eq "") {
-        $object->ScanDirectory("$interface.idl", $_, $_, 0);
-      }
-    }
+    # Loop until we found the top most base class for 'interface'
+    while($interface ne "") {
+        # Step #1: Find the IDL file associated with 'interface'
+        $endCondition = 0; $foundFilename = "";
 
-    if($foundFilename ne "") {
-      print "  |  |>  Parsing parent IDL \"$foundFilename\" for interface \"$interface\"\n";
+        foreach (@{$useDirectories}) {
+            $object->ScanDirectory("$interface.idl", $_, $_, 0) if $foundFilename eq "";
+        }
 
-      # Step #2: Parse the found IDL file (in quiet mode).
-      my $parser = IDLParser->new(1);
-      my $document = $parser->Parse($foundFilename);
+        if ($foundFilename ne "") {
+            print "  |  |>  Parsing parent IDL \"$foundFilename\" for interface \"$interface\"\n";
 
-      # Step #3: Check wheter the parsed IDL file has parents
-      foreach(@{$document->classes}) {
-        my $class = $_;
+            # Step #2: Parse the found IDL file (in quiet mode).
+            my $parser = IDLParser->new(1);
+            my $document = $parser->Parse($foundFilename);
 
-        my $useInterface = $interface;
+            # Step #3: Check wheter the parsed IDL file has parents
+            foreach my $class (@{$document->classes}) {
+                my $useInterface = $interface;
 
-        if($class->name eq $useInterface) {
-          my @parents = @{$class->parents};
-          my $parentsMax = @{$class->parents};
+                if ($class->name eq $useInterface) {
+                    my @parents = @{$class->parents};
+                    my $parentsMax = @{$class->parents};
 
-          $interface = "";
+                    $interface = "";
 
-          # Exception: For the DOM 'Node' is our topmost baseclass, not EventTarget.
-          if(($parentsMax > 0) and ($parents[0] ne "events::EventTarget")) {
-            $interface = StripModule($parents[0]);
-          } elsif(!$class->noDPtrFlag) { # Include 'module' ...
-            $topBaseClass = $document->module . "::" . $class->name;
-          }
-        }  
-      }
-    } else {
-      die("Could NOT find specified parent interface \"$interface\"!\n");
+                    # Exception: For the DOM 'Node' is our topmost baseclass, not EventTarget.
+                    if (($parentsMax > 0) and ($parents[0] ne "events::EventTarget")) {
+                        $interface = StripModule($parents[0]);
+                    } elsif (!$class->noDPtrFlag) { # Include 'module' ...
+                        $topBaseClass = $document->module . "::" . $class->name;
+                    }
+                }
+            }
+        } else {
+            die("Could NOT find specified parent interface \"$interface\"!\n");
+        }
     }
-  }
 
-  return $topBaseClass;
+    return $topBaseClass;
 }
 
 # Helper for all IDLCodeGenerator***.pm modules
 sub ClassHasWriteableAttributes
 {
-  # Determine wheter a given interface has any writeable attributes...
-  my $object = shift;
-  my $interface = StripModule(shift);
-  my $hasWriteableAttributes = 0;
-  
-  # Step #1: Find the IDL file associated with 'interface'
-  $endCondition = 0; $foundFilename = "";
+    # Determine wheter a given interface has any writeable attributes...
+    my $object = shift;
+    my $interface = StripModule(shift);
+    my $hasWriteableAttributes = 0;
 
-  foreach(@{$useDirectories}) {
-    if($foundFilename eq "") {
-      $object->ScanDirectory("$interface.idl", $_, $_, 0);
-    }
-  }
+    # Step #1: Find the IDL file associated with 'interface'
+    $endCondition = 0;
+    $foundFilename = "";
 
-  # Step #2: Parse the found IDL file (in quiet mode).
-  my $parser = IDLParser->new(1);
-  my $document = $parser->Parse($foundFilename);
+    foreach (@{$useDirectories}) {
+        $object->ScanDirectory("$interface.idl", $_, $_, 0) if $foundFilename eq "";
+    }
 
-  # Step #3: Check wheter the parsed IDL file has parents
-  foreach(@{$document->classes}) {
-    my $class = $_;
+    # Step #2: Parse the found IDL file (in quiet mode).
+    my $parser = IDLParser->new(1);
+    my $document = $parser->Parse($foundFilename);
 
-    if($class->name eq $interface) {
-      foreach(@{$class->attributes}) {
-        if($_->type !~ /^readonly\ attribute$/) {
-          $hasWriteableAttributes = 1;
+    # Step #3: Check wheter the parsed IDL file has parents
+    foreach my $class (@{$document->classes}) {
+        if ($class->name eq $interface) {
+            foreach (@{$class->attributes}) {
+                $hasWriteableAttributes = 1 if ($_->type ne "readonly attribute");
+            }
         }
-      }
     }
-  }
 
-  return $hasWriteableAttributes;
+    return $hasWriteableAttributes;
 }
 
 # Helper for all IDLCodeGenerator***.pm modules
 sub AllClassesWhichInheritFrom
 {
-  # Determine which interfaces inherit from the passed one...
-  my $object = shift;
+    # Determine which interfaces inherit from the passed one...
+    my $object = shift;
 
-  my $interface = shift;
-  $interface =~ s/([a-zA-Z0-9]*::)*//; # Strip namespace(s).
+    my $interface = shift;
+    $interface =~ s/([a-zA-Z0-9]*::)*//; # Strip namespace(s).
 
-  # Step #1: Loop through all included directories to scan for all IDL files...
-  my @allIDLFiles = ();
-  foreach(@{$useDirectories}) {
-    $endCondition = 0;
-    @foundFilenames = ();
+    # Step #1: Loop through all included directories to scan for all IDL files...
+    my @allIDLFiles = ();
+    foreach (@{$useDirectories}) {
+        $endCondition = 0;
+        @foundFilenames = ();
 
-    $object->ScanDirectory("allidls", $_, $_, 1);
-    foreach(@foundFilenames) {
-      push(@allIDLFiles, $_);
+        $object->ScanDirectory("allidls", $_, $_, 1);
+        foreach (@foundFilenames) {
+            push(@allIDLFiles, $_);
+        }
     }
-  }
 
-  # Step #2: Loop through all found IDL files...
-  my %classDataCache;
-  foreach(@allIDLFiles) {
-    # Step #3: Parse the found IDL file (in quiet mode).
-    my $parser = IDLParser->new(1);
-    my $document = $parser->Parse($_);
+    # Step #2: Loop through all found IDL files...
+    my %classDataCache;
+    foreach (@allIDLFiles) {
+        # Step #3: Parse the found IDL file (in quiet mode).
+        my $parser = IDLParser->new(1);
+        my $document = $parser->Parse($_);
 
-    # Step #4: Cache the parsed IDL datastructures.
-    my $cacheHandle = $_; $cacheHandle =~ s/.*\/(.*)\.idl//;
-    $classDataCache{$1} = $document;
-  }
+        # Step #4: Cache the parsed IDL datastructures.
+        my $cacheHandle = $_; $cacheHandle =~ s/.*\/(.*)\.idl//;
+        $classDataCache{$1} = $document;
+    }
 
-  my %classDataCacheCopy = %classDataCache; # Protect!
+    my %classDataCacheCopy = %classDataCache; # Protect!
 
-  # Step #5: Loop through all cached IDL documents...
-  my @classList = ();
-  while(my($name, $document) = each %classDataCache) {
-    $endCondition = 0;
+    # Step #5: Loop through all cached IDL documents...
+    my @classList = ();
+    while (my($name, $document) = each %classDataCache) {
+        $endCondition = 0;
 
-    # Step #6: Check wheter the parsed IDL file has parents...
-    $object->RecursiveInheritanceHelper($document, $interface, \@classList, \%classDataCacheCopy);
-  }
+        # Step #6: Check wheter the parsed IDL file has parents...
+        $object->RecursiveInheritanceHelper($document, $interface, \@classList, \%classDataCacheCopy);
+    }
 
-  # Step #7: Return list of all classes which inherit from me!
-  return \@classList;
+    # Step #7: Return list of all classes which inherit from me!
+    return \@classList;
 }
 
 # Helper for all IDLCodeGenerator***.pm modules
 sub AllClasses
 {
-  # Determines all interfaces within a project...
-  my $object = shift;
+    # Determines all interfaces within a project...
+    my $object = shift;
 
-  # Step #1: Loop through all included directories to scan for all IDL files...
-  my @allIDLFiles = ();
-  foreach(@{$useDirectories}) {
-    $endCondition = 0;
-    @foundFilenames = ();
+    # Step #1: Loop through all included directories to scan for all IDL files...
+    my @allIDLFiles = ();
+    foreach (@{$useDirectories}) {
+        $endCondition = 0;
+        @foundFilenames = ();
 
-    $object->ScanDirectory("allidls", $_, $_, 1);
-    foreach(@foundFilenames) {
-      push(@allIDLFiles, $_);
+        $object->ScanDirectory("allidls", $_, $_, 1);
+        foreach (@foundFilenames) {
+            push(@allIDLFiles, $_);
+        }
     }
-  }
-
-  # Step #2: Loop through all found IDL files...
-  my @classList = ();
-  foreach(@allIDLFiles) {
-    # Step #3: Parse the found IDL file (in quiet mode).
-    my $parser = IDLParser->new(1);
-    my $document = $parser->Parse($_);
 
-    # Step #4: Check if class is a baseclass...
-    foreach(@{$document->classes}) {
-      my $class = $_;
+    # Step #2: Loop through all found IDL files...
+    my @classList = ();
+    foreach (@allIDLFiles) {
+        # Step #3: Parse the found IDL file (in quiet mode).
+        my $parser = IDLParser->new(1);
+        my $document = $parser->Parse($_);
 
-      my $identifier = $class->name;
-      my $namespace = $moduleNamespaceHash{$document->module};
-      $identifier = $namespace . "::" . $identifier if($namespace ne "");
+        # Step #4: Check if class is a baseclass...
+        foreach my $class (@{$document->classes}) {
+            my $identifier = $class->name;
+            my $namespace = $moduleNamespaceHash{$document->module};
+            $identifier = $namespace . "::" . $identifier if $namespace ne "";
 
-      my @array = grep { /^$identifier$/ } @$classList;
+            my @array = grep { /^$identifier$/ } @$classList;
 
-      my $arraySize = @array;
-      if($arraySize eq 0) {
-        push(@classList, $identifier);
-      }
+            my $arraySize = @array;
+            if ($arraySize eq 0) {
+                push(@classList, $identifier);
+            }
+        }
     }
-  }
 
-  # Step #7: Return list of all base classes!
-  return \@classList;
+    # Step #7: Return list of all base classes!
+    return \@classList;
 }
 
 # Internal helper for 'AllClassesWhichInheritFrom'
 sub RecursiveInheritanceHelper
 {
-  my $object = shift;
-
-  my $document = shift;
-  my $interface = shift;
-  my $classList = shift;
-  my $classDataCache = shift;
-
-  if($endCondition eq 1) {
-    return 1;
-  }
-
-  foreach(@{$document->classes}) {
-    my $class = $_;
-
-    foreach(@{$class->parents}) {
-      my $cacheHandle = StripModule($_);
-
-      if($cacheHandle eq $interface) {
-        my $identifier = $document->module . "::" . $class->name;
-        my @array = grep { /^$identifier$/ } @$classList; my $arraySize = @array;
-        push(@$classList, $identifier) if($arraySize eq 0);
-
-        $endCondition = 1;
-        return $endCondition;
-      } else { 
-        my %cache = %{$classDataCache};
-
-        my $checkDocument = $cache{$cacheHandle};
-        $endCondition = $object->RecursiveInheritanceHelper($checkDocument, $interface,
-                                  $classList, $classDataCache);
-        if($endCondition eq 1) {
-          my $identifier = $document->module . "::" . $class->name;
-          my @array = grep { /^$identifier$/ } @$classList; my $arraySize = @array;
-          push(@$classList, $identifier) if($arraySize eq 0);
-
-          return $endCondition;
+    my $object = shift;
+
+    my $document = shift;
+    my $interface = shift;
+    my $classList = shift;
+    my $classDataCache = shift;
+
+    return 1 if $endCondition eq 1;
+
+    foreach my $class (@{$document->classes}) {
+        foreach (@{$class->parents}) {
+            my $cacheHandle = StripModule($_);
+
+            if ($cacheHandle eq $interface) {
+                my $identifier = $document->module . "::" . $class->name;
+                my @array = grep { /^$identifier$/ } @$classList; my $arraySize = @array;
+                push(@$classList, $identifier) if $arraySize eq 0;
+
+                $endCondition = 1;
+                return $endCondition;
+            } else { 
+                my %cache = %{$classDataCache};
+
+                my $checkDocument = $cache{$cacheHandle};
+                $endCondition = $object->RecursiveInheritanceHelper($checkDocument, $interface,
+                                                                    $classList, $classDataCache);
+                if ($endCondition eq 1) {
+                    my $identifier = $document->module . "::" . $class->name;
+                    my @array = grep { /^$identifier$/ } @$classList; my $arraySize = @array;
+                    push(@$classList, $identifier) if $arraySize eq 0;
+
+                    return $endCondition;
+                }
+            }
         }
-      }
     }
-  }
 
-  return $endCondition;
+    return $endCondition;
 }
 
 # Helper for all CodeGenerator***.pm modules
@@ -446,73 +423,61 @@ sub RemoveExcludedAttributesAndFunctions
 # Helper for all CodeGenerator***.pm modules
 sub IsPrimitiveType
 {
-  my $object = shift;
-
-  my $type = shift;
-
-  if(($type =~ /^int$/) or ($type =~ /^short$/) or ($type =~ /^long$/) or
-     ($type =~ /^unsigned int$/) or ($type =~ /^unsigned short$/) or ($type =~ /^unsigned long$/) or
-     ($type =~ /^float$/) or ($type =~ /^double$/) or ($type =~ /^boolean$/) or ($type =~ /^void$/)) {
-    return 1;
-  }
+    my $object = shift;
+    my $type = shift;
 
-  return 0;
+    return 1 if $type eq "int" or $type eq "short" or $type eq "long" 
+                or $type eq "unsigned int" or $type eq "unsigned short"
+                or $type eq "unsigned long" or $type eq "float" or $type eq "double"
+                or $type eq "boolean" or $type eq "void";
+    return 0;
 }
 
 # Internal Helper
 sub ScanDirectory
 {
-  my $object = shift;
+    my $object = shift;
 
-  my $interface = shift;
-  my $directory = shift;
-  my $useDirectory = shift;
-  my $reportAllFiles = shift;
+    my $interface = shift;
+    my $directory = shift;
+    my $useDirectory = shift;
+    my $reportAllFiles = shift;
 
-  if(($endCondition eq 1) and ($reportAllFiles eq 0)) {
-    return;
-  }
+    return if ($endCondition eq 1) and ($reportAllFiles eq 0);
 
-  chdir($directory) or die "[ERROR] Can't enter directory $directory: \"$!\"\n";
-  opendir(DIR, ".") or die "[ERROR] Can't open directory $directory: \"$!\"\n";
+    chdir($directory) or die "[ERROR] Can't enter directory $directory: \"$!\"\n";
+    opendir(DIR, ".") or die "[ERROR] Can't open directory $directory: \"$!\"\n";
 
-  my @names = readdir(DIR) or die "[ERROR] Cant't read directory $directory: \"$!\"\n";
-  closedir(DIR);
+    my @names = readdir(DIR) or die "[ERROR] Cant't read directory $directory: \"$!\"\n";
+    closedir(DIR);
 
-  foreach(@names) {
-    my $name = $_;
+    foreach my $name (@names) {
+        # Skip if we already found the right file or
+        # if we encounter 'exotic' stuff (ie. '.', '..', '.svn')
+        next if ($endCondition eq 1) or ($name =~ /^\./);
 
-    # Skip if we already found the right file or
-    # if we encounter 'exotic' stuff (ie. '.', '..', '.svn')
-    if(($endCondition eq 1) or ($name =~ /^\./)) {
-      next;
-    }
+        # Recurisvely enter directory...
+        if (-d $name) {
+            $object->ScanDirectory($interface, $name, $useDirectory, $reportAllFiles);
+            next;
+        }
 
-    # Recurisvely enter directory...
-    if(-d $name) {
-      $object->ScanDirectory($interface, $name, $useDirectory, $reportAllFiles);
-      next;
-    }
+        # Check wheter we found the desired file...
+        my $condition = ($name eq $interface);
+        $condition = 1 if ($interface eq "allidls") and ($name =~ /\.idl$/);
 
-    # Check wheter we found the desired file...
-    my $condition = ($name eq $interface);
-    if(($interface eq "allidls") and
-       ($name =~ /\.idl$/)) {
-      $condition = 1;
-    }
+        if ($condition) {
+            $foundFilename = "$directory/$name";
 
-    if($condition) {
-      $foundFilename = "$directory/$name";
+            if ($reportAllFiles eq 0) {
+                $endCondition = 1;
+            } else {
+                push(@foundFilenames, $foundFilename);
+            }
+        }
 
-      if($reportAllFiles eq 0) {
-        $endCondition = 1;
-      } else {
-        push(@foundFilenames, $foundFilename);
-      }
+        chdir($useDirectory) or die "[ERROR] Can't change directory to $useDirectory: \"$!\"\n";
     }
-
-    chdir($useDirectory) or die "[ERROR] Can't change directory to $useDirectory: \"$!\"\n";
-  }
 }
 
 1;
index 28494ea61470a3da23ae0fa6b5e6ff54644968f0..b5314d77a209587477e58252df7386d90df57283 100644 (file)
@@ -33,6 +33,7 @@ my %headerForwardDeclarationsForProtocols = ();
 my %privateHeaderForwardDeclarationsForProtocols = ();
 my %publicInterfaces = ();
 my $newPublicClass = 0;
+my $isProtocol = 0;
 my $buildingForTigerOrEarlier = 1 if $ENV{"MACOSX_DEPLOYMENT_TARGET"} and $ENV{"MACOSX_DEPLOYMENT_TARGET"} <= 10.4;
 my $buildingForLeopardOrLater = 1 if $ENV{"MACOSX_DEPLOYMENT_TARGET"} and $ENV{"MACOSX_DEPLOYMENT_TARGET"} >= 10.5;
 
@@ -163,11 +164,12 @@ sub GenerateInterface
     my $name = $dataNode->name;
     my $className = GetClassName($name);
     my $parentClassName = "DOM" . GetParentImplClassName($dataNode);
+    $isProtocol = $dataNode->extendedAttributes->{ObjCProtocol};
 
     ReadPublicInterfaces($className, $parentClassName, $defines);
 
     # Start actual generation..
-    $object->GenerateImplementation($dataNode);
+    $object->GenerateImplementation($dataNode) unless $isProtocol;
     $object->GenerateHeader($dataNode);
 
     # Write changes.
@@ -194,26 +196,13 @@ sub GetClassName
     my $name = $codeGenerator->StripModule(shift);
 
     # special cases
-    if ($name eq "boolean") {
-        return "BOOL";
-    } elsif ($name eq "unsigned long") {
-        return "unsigned";
-    } elsif ($name eq "long") {
-        return "int";
-    } elsif ($name eq "DOMString") {
-        return "NSString";
-    } elsif ($name eq "URL") {
-        return "NSURL";
-    } elsif ($name eq "DOMWindow") {
-        return "DOMAbstractView";
-    } elsif ($name eq "XPathNSResolver") {
-        return "id <DOMXPathNSResolver>";
-    } elsif ($name eq "unsigned short" 
-             or $name eq "float"
-             or $name eq "void"
-             or $name eq "DOMImplementation") {
-        return $name;
-    }
+    return "NSString" if IsStringType($name);
+    return "BOOL" if $name eq "boolean";
+    return "unsigned" if $name eq "unsigned long";
+    return "int" if $name eq "long";
+    return "NSURL" if $name eq "URL";
+    return "DOMAbstractView" if $name eq "DOMWindow";
+    return $name if $codeGenerator->IsPrimitiveType($name) or $name eq "DOMImplementation" or $name eq "DOMTimeStamp";
 
     # Default, assume Objective-C type has the same type name as
     # idl type prefixed with "DOM".
@@ -253,44 +242,48 @@ sub GetParentImplClassName
     return $parent;
 }
 
+sub IsProtocolType
+{
+    $type = shift;
+
+    return 1 if $type eq "XPathNSResolver" or $type eq "EventListener" or $type eq "EventTarget";
+    return 0;
+}
+
+sub IsStringType
+{
+    $type = shift;
+
+    return 1 if $type eq "DOMString" or $type eq "AtomicString";
+    return 0;
+}
+
 sub GetObjCType
 {
-    my $name = GetClassName(shift);
-
-    if ($codeGenerator->IsPrimitiveType($name)
-            or $name eq "BOOL"
-            or $name eq "unsigned"
-            or $name eq "int"
-            or $name eq "id <DOMXPathNSResolver>") {
-        return $name;
-    }
+    my $type = shift;
+    my $name = GetClassName($type);
 
-    # Default, return type as a pointer.
-    return "$name *";
+    return "id <" . $name . ">" if IsProtocolType($type);
+    return $name if $codeGenerator->IsPrimitiveType($type) or $type eq "DOMTimeStamp";
+    return $name . " *";
 }
 
 sub GetObjCTypeMaker
 {
     my $type = $codeGenerator->StripModule(shift);
 
-    return "" if $codeGenerator->IsPrimitiveType($type) or $type eq "DOMString" or $type eq "URL";
+    return "" if $codeGenerator->IsPrimitiveType($type) or IsStringType($type) or $type eq "URL" or $type eq "DOMTimeStamp";
     return "_RGBColorWithRGB" if $type eq "RGBColor";
 
     my $typeMaker = "";
-    if ($type =~ /^(HTML|CSS)/) {
-        $typeMaker = $type; 
-    } elsif ($type eq "DOMImplementation") {
-        $typeMaker = "DOMImplementation";
-    } elsif ($type eq "CDATASection") {
-        $typeMaker = "CDATASection";
+    if ($type =~ /^(HTML|CSS)/ or $type eq "DOMImplementation" or $type eq "CDATASection") {
+        $typeMaker = $type;
+    } elsif ($type =~ /^XPath(.+)/) {
+        $typeMaker = "xpath" . $1;
     } elsif ($type eq "DOMWindow") {
         $typeMaker = "abstractView";
-    } elsif ($type eq "XPathResult") {
-        $typeMaker = "xpathResult";
-    } elsif ($type eq "XPathNSResolver") {
-        $typeMaker = "xpathNSResolver";
-    } elsif ($type eq "XPathExpression") {
-        $typeMaker = "xpathExpression";
+    } elsif ($type eq "EventTarget") {
+        $typeMaker = "node";
     } else {
         $typeMaker = lcfirst($type);
     }
@@ -305,9 +298,11 @@ sub GetObjCTypeGetter
     my $argName = shift;
     my $type = $codeGenerator->StripModule(shift);
 
-    return $argName if $codeGenerator->IsPrimitiveType($type) or $type eq "DOMString" or $type eq "URL";
+    return $argName if $codeGenerator->IsPrimitiveType($type) or IsStringType($type) or $type eq "URL";
+    return $argName . "EventTarget" if $type eq "EventTarget";
     return "[nativeResolver _xpathNSResolver]" if $type eq "XPathNSResolver";
     return "[" . $argName . " _xpathResult]" if $type eq "XPathResult";
+    return "[" . $argName . " _abstractView]" if $type eq "DOMWindow";
     return "[" . $argName . " _" . $type . "]" if $type =~ /^(HTML|CSS)/;
     return "[" . $argName . " _" . lcfirst($type) . "]";
 }
@@ -317,11 +312,12 @@ sub AddForwardDeclarationsForType
     my $type = $codeGenerator->StripModule(shift);
     my $public = shift;
 
-    return if $codeGenerator->IsPrimitiveType($type) or $type eq "DOMString";
+    return if $codeGenerator->IsPrimitiveType($type) or IsStringType($type) or $type eq "URL" or $type eq "DOMTimeStamp";
 
-    if ($type eq "XPathNSResolver") {
-        $headerForwardDeclarationsForProtocols{"DOMXPathNSResolver"} = 1 if $public;
-        $privateHeaderForwardDeclarationsForProtocols{"DOMXPathNSResolver"} = 1 if !$public and !$headerForwardDeclarationsForProtocols{"DOMXPathNSResolver"};
+    if (IsProtocolType($type)) {
+        $type = "DOM" . $type;
+        $headerForwardDeclarationsForProtocols{$type} = 1 if $public;
+        $privateHeaderForwardDeclarationsForProtocols{$type} = 1 if !$public and !$headerForwardDeclarationsForProtocols{$type};
         return;
     }
 
@@ -344,9 +340,9 @@ sub AddIncludesForType
 {
     my $type = $codeGenerator->StripModule(shift);
 
-    return if $codeGenerator->IsPrimitiveType($type) or $type eq "URL";
+    return if $codeGenerator->IsPrimitiveType($type) or $type eq "URL" or $type eq "DOMTimeStamp";
 
-    if ($type eq "DOMString") {
+    if (IsStringType($type)) {
         $implIncludes{"PlatformString.h"} = 1;
         return;
     }
@@ -364,13 +360,6 @@ sub AddIncludesForType
         return;
     }
 
-    # Temp DOMEvents.h
-    if ($type eq "Event") {
-        $implIncludes{"DOMEvents.h"} = 1;
-        $implIncludes{"$type.h"} = 1;
-        return;
-    }
-
     # Temp DOMViews.h
     if ($type eq "DOMWindow") {
         $implIncludes{"DOMViews.h"} = 1;
@@ -392,6 +381,11 @@ sub AddIncludesForType
         return;
     }
 
+    if ($type eq "EventTarget") {
+        $implIncludes{"DOM$type.h"} = 1;
+        return;
+    }
+
     # FIXME: for some reason it won't compile without both CSSStyleDeclaration.h
     # and CSSMutableStyleDeclaration.h
     if ($type eq "CSSStyleDeclaration") {
@@ -421,17 +415,27 @@ sub GenerateHeader
 
     # - Add default header template
     @headerContentHeader = split("\r", $headerLicenceTemplate);
+    push(@headerContentHeader, "\n");
 
     # - INCLUDES -
-    my $parentHeaderName = GetClassHeaderName($parentClassName);
-    push(@headerContentHeader, "\n#import <WebCore/$parentHeaderName.h>\n\n");
+    unless ($isProtocol) {
+        my $parentHeaderName = GetClassHeaderName($parentClassName);
+        push(@headerContentHeader, "#import <WebCore/$parentHeaderName.h>\n\n");
+    }
 
     # - Add constants.
     if ($numConstants > 0) {
         my @headerConstants = ();
+
+        # FIXME: we need a way to include multiple enums, for now, only include the first.
+        my $greatestConstantValue = $dataNode->constants->[0]->value;
         foreach my $constant (@{$dataNode->constants}) {
             my $constantName = $constant->name;
             my $constantValue = $constant->value;
+
+            last if $constantValue < $greatestConstantValue;
+            $greatestConstantValue = $constantValue;
+
             my $output = "    DOM_" . $constantName . " = " . $constantValue;
             push(@headerConstants, $output);
         }
@@ -445,8 +449,13 @@ sub GenerateHeader
         push(@headerContent, "\n};\n\n");        
     }
 
-    # - Begin @interface 
-    push(@headerContent, "\@interface $className : $parentClassName\n");
+    # - Begin @interface or @protocol
+    if ($isProtocol) {
+        my $parentProtocols = "NSObject" . ($interfaceName eq "EventTarget" ? ", NSCopying" : "");
+        push(@headerContent, "\@protocol $className <$parentProtocols>\n");
+    } else {
+        push(@headerContent, "\@interface $className : $parentClassName\n");
+    }
 
     my @headerAttributes = ();
     my @privateHeaderAttributes = ();
@@ -564,7 +573,7 @@ sub GenerateHeader
         }
     }
 
-    # - End @interface 
+    # - End @interface or @protocol
     push(@headerContent, "\@end\n");
 
     if (@deprecatedHeaderFunctions > 0) {
@@ -656,6 +665,8 @@ sub GenerateImplementation
                 $internalBaseType = "WebCore::CSSValue"
             } elsif ($parentImplClassName eq "CSSRule") {
                 $internalBaseType = "WebCore::CSSRule"
+            } elsif ($parentImplClassName eq "Event" or $parentImplClassName eq "UIEvent") {
+                $internalBaseType = "WebCore::Event"
             } else {
                 $internalBaseType = "WebCore::Node"
             }
@@ -696,6 +707,10 @@ sub GenerateImplementation
 
             my $attributeTypeSansPtr = $attributeType;
             $attributeTypeSansPtr =~ s/ \*$//; # Remove trailing " *" from pointer types.
+
+            # special case for EventTarget protocol
+            $attributeTypeSansPtr = "DOMNode" if $idlType eq "EventTarget";
+
             my $typeMaker = GetObjCTypeMaker($attribute->signature->type);
 
             # Special cases
@@ -764,7 +779,7 @@ sub GenerateImplementation
                 push(@implContent, $setterSig);
                 push(@implContent, "{\n");
 
-                unless ($codeGenerator->IsPrimitiveType($idlType) or $idlType eq "DOMString") {
+                unless ($codeGenerator->IsPrimitiveType($idlType) or IsStringType($idlType)) {
                     push(@implContent, "    ASSERT($argName);\n\n");
                 }
 
@@ -813,8 +828,9 @@ sub GenerateImplementation
 
                 push(@parameterNames, $implGetter);
                 $needsCustom{"XPathNSResolver"} = $paramName if $idlType eq "XPathNSResolver";
+                $needsCustom{"EventTarget"} = $paramName if $idlType eq "EventTarget";
 
-                unless ($codeGenerator->IsPrimitiveType($idlType) or $idlType eq "DOMString") {
+                unless ($codeGenerator->IsPrimitiveType($idlType) or IsStringType($idlType)) {
                     push(@needsAssert, "    ASSERT($paramName);\n");
                 }
 
@@ -839,6 +855,17 @@ sub GenerateImplementation
                 push(@functionContent, "    DOMNativeXPathNSResolver *nativeResolver = (DOMNativeXPathNSResolver *)$paramName;\n\n");
             }
 
+            # special case the EventTarget
+            if (defined $needsCustom{"EventTarget"}) {
+                my $paramName = $needsCustom{"EventTarget"};
+                push(@functionContent, "    DOMNode* ${paramName}ObjC = $paramName;\n");
+                push(@functionContent, "    WebCore::Node* ${paramName}Node = [${paramName}ObjC _node];\n");
+                push(@functionContent, "    WebCore::EventTargetNode* ${paramName}EventTarget = (${paramName}Node && ${paramName}Node->isEventTargetNode()) ? static_cast<WebCore::EventTargetNode*>(${paramName}Node) : 0;\n\n");
+                $implIncludes{"DOMNode.h"} = 1;
+                $implIncludes{"Node.h"} = 1;
+                $implIncludes{"EventTargetNode.h"} = 1;
+            }
+
             push(@parameterNames, "ec") if $raisesExceptions;
 
             my $content = "IMPL->" . $functionName . "(" . join(", ", @parameterNames) . ")";
@@ -940,23 +967,25 @@ sub WriteData
     unlink($implFileName);
 
     # Write implementation file.
-    open($IMPL, ">$implFileName") or die "Couldn't open file $implFileName";
+    unless ($isProtocol) {
+        open($IMPL, ">$implFileName") or die "Couldn't open file $implFileName";
 
-    print $IMPL @implContentHeader;
+        print $IMPL @implContentHeader;
 
-    foreach my $implInclude (sort keys(%implIncludes)) {
-        print $IMPL "#import \"$implInclude\"\n";
-    }
+        foreach my $implInclude (sort keys(%implIncludes)) {
+            print $IMPL "#import \"$implInclude\"\n";
+        }
 
-    print $IMPL "\n" if keys %implIncludes > 0;
-    print $IMPL @implContent;
+        print $IMPL "\n" if keys(%implIncludes) > 0;
+        print $IMPL @implContent;
 
-    close($IMPL);
-    undef($IMPL);
+        close($IMPL);
+        undef($IMPL);
 
-    @implHeaderContent = "";
-    @implContent = "";    
-    %implIncludes = ();
+        @implHeaderContent = "";
+        @implContent = "";    
+        %implIncludes = ();
+    }
 
     # Write public header.
     open($HEADER, ">$headerFileName") or die "Couldn't open file $headerFileName";
index 12bdd719ff223a50c076672e3729d3d2bd5a4177..7aa5980965e7167b4a8f4a113cebd37cc5dbbbae 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2006 Apple Computer, Inc.
+ * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -23,9 +24,9 @@ module events {
     interface [LegacyParent=KJS::DOMEvent, GenerateConstructor] Event {
 
         // DOM PhaseType
-        const unsigned short      CAPTURING_PHASE                = 1;
-        const unsigned short      AT_TARGET                      = 2;
-        const unsigned short      BUBBLING_PHASE                 = 3;
+        const unsigned short CAPTURING_PHASE     = 1;
+        const unsigned short AT_TARGET           = 2;
+        const unsigned short BUBBLING_PHASE      = 3;
 
         // Reverse-engineered from Netscape
         const unsigned short MOUSEDOWN           = 1;
@@ -44,5 +45,20 @@ module events {
         const unsigned short BLUR                = 8192;
         const unsigned short SELECT              = 16384;
         const unsigned short CHANGE              = 32768;
+
+        readonly attribute [Exclude=JS] DOMString        type;
+        readonly attribute [Exclude=JS] EventTarget      target;
+        readonly attribute [Exclude=JS] EventTarget      currentTarget;
+        readonly attribute [Exclude=JS] unsigned short   eventPhase;
+        readonly attribute [Exclude=JS] boolean          bubbles;
+        readonly attribute [Exclude=JS] boolean          cancelable;
+        readonly attribute [Exclude=JS] DOMTimeStamp     timeStamp;
+        [Exclude=JS] void               stopPropagation();
+        [Exclude=JS] void               preventDefault();
+        [Exclude=JS, OldStyleObjC] void initEvent(in DOMString eventTypeArg, 
+                                                  in boolean canBubbleArg, 
+                                                  in boolean cancelableArg);
+
     };
+
 }
diff --git a/WebCore/dom/EventListener.idl b/WebCore/dom/EventListener.idl
new file mode 100644 (file)
index 0000000..c4cd53f
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2006 Apple Computer, Inc.
+ * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+module events {
+
+    // Introduced in DOM Level 2:
+    interface [ObjCProtocol] EventListener {
+        void               handleEvent(in Event evt);
+    };
+
+}
diff --git a/WebCore/dom/EventTarget.idl b/WebCore/dom/EventTarget.idl
new file mode 100644 (file)
index 0000000..ae98d87
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2006 Apple Computer, Inc.
+ * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+module events {
+
+    // Introduced in DOM Level 2:
+    interface [ObjCProtocol] EventTarget {
+        [OldStyleObjC] void               addEventListener(in DOMString type, 
+                                                           in EventListener listener, 
+                                                           in boolean useCapture);
+        [OldStyleObjC] void               removeEventListener(in DOMString type, 
+                                                              in EventListener listener, 
+                                                              in boolean useCapture);
+        boolean            dispatchEvent(in Event evt)
+            raises(EventException);
+    };
+
+}
index 3fe770604cfb88906acd0af7ffa68bd709d5e8b7..05786b32ea224ec93b8b9121a92a8e14ea729e38 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2006 Apple Computer, Inc.
+ * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -29,7 +30,7 @@ module events {
         readonly attribute boolean          shiftKey;
         readonly attribute boolean          altGraphKey;
 
-        [OldStyleObjC] void initKeyboardEvent(in AtomicString type, 
+        void initKeyboardEvent(in AtomicString type, 
                                in boolean canBubble, 
                                in boolean cancelable, 
                                in DOMWindow view, 
@@ -40,6 +41,11 @@ module events {
                                in boolean shiftKey,
                                in boolean metaKey,
                                in boolean altGraphKey);
+
+        // WebKit Extensions
+        readonly attribute [Exclude=JS] long keyCode;
+        readonly attribute [Exclude=JS] long charCode;
+
     };
 
 }
index c3fc1466dee85c13ed4df058d9a2ee6d456f9a40..4d70b657b40305f208287bd4035523264bf8fe0e 100644 (file)
@@ -39,20 +39,20 @@ module events {
         readonly attribute Node             toElement;
         
         [OldStyleObjC] void initMouseEvent(in AtomicString type, 
-                                          in boolean canBubble, 
-                                          in boolean cancelable, 
-                                          in DOMWindow view, 
-                                          in long detail, 
-                                          in long screenX, 
-                                          in long screenY, 
-                                          in long clientX, 
-                                          in long clientY, 
-                                          in boolean ctrlKey, 
-                                          in boolean altKey, 
-                                          in boolean shiftKey, 
-                                          in boolean metaKey, 
-                                          in unsigned short button, 
-                                          in EventTarget relatedTarget);
+                                           in boolean canBubble, 
+                                           in boolean cancelable, 
+                                           in DOMWindow view, 
+                                           in long detail, 
+                                           in long screenX, 
+                                           in long screenY, 
+                                           in long clientX, 
+                                           in long clientY, 
+                                           in boolean ctrlKey, 
+                                           in boolean altKey, 
+                                           in boolean shiftKey, 
+                                           in boolean metaKey, 
+                                           in unsigned short button, 
+                                           in EventTarget relatedTarget);
     };
 
 }
index f16065b4542d700cc90107f2821b5fc3d2b6c77e..6a8c41c666393397d951c77811ad874d49213c97 100644 (file)
 module events {
 
     // Introduced in DOM Level 2:
-
     interface UIEvent : Event {
-
-        readonly attribute DOMWindow  view;
+        readonly attribute DOMWindow            view;
         readonly attribute long                 detail;
-        
+
         readonly attribute long                 keyCode;
         readonly attribute long                 charCode;
         readonly attribute long                 layerX;
@@ -35,10 +33,10 @@ module events {
         readonly attribute long                 which;
         
         [OldStyleObjC] void initUIEvent(in AtomicString type, 
-                                       in boolean canBubble, 
-                                       in boolean cancelable, 
-                                       in DOMWindow view, 
-                                       in long detail);
+                                        in boolean canBubble, 
+                                        in boolean cancelable, 
+                                        in DOMWindow view, 
+                                        in long detail);
     };
 
 }
index 9b4d454cf138b6d3e23556b51ba21f706983d832..abc7e9aae4090bb471bd3852dd21472d7d8e8b48 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2006 Apple Computer, Inc.
+ * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -36,6 +37,9 @@ module events {
         readonly attribute long    x;
         readonly attribute long    y;
 
+        // WebKit Extensions
+        readonly attribute [Exclude=JS] boolean isHorizontal;
+
     };
 
 }
index 051a42b1b08067f86b9cafc93de0fdd2b6c1e883..7df3daa3aafda38ade8de862608ac21defe756b6 100644 (file)
@@ -1,3 +1,13 @@
+2006-09-07  Sam Weinig  <sam.weinig@gmail.com>
+
+        Reviewed by Darin.
+
+        Patch for http://bugzilla.opendarwin.org/show_bug.cgi?id=10766
+        Auto-generate the Objective-C DOM Events bindings
+
+        * MigrateHeaders.make:
+        * WebKit.xcodeproj/project.pbxproj:
+
 2006-09-06  Alexey Proskuryakov  <ap@nypop.com>
 
         * MigrateHeaders.make: Fixed a double slash in 
index 7dd171e5c7c9608028a8d35765220eac473ade38..8a4ad97b160d4d49db46ad36f2fd7143b2a5ebd1 100644 (file)
@@ -68,6 +68,10 @@ all : \
     $(PRIVATE_HEADERS_DIR)/DOMElementPrivate.h \
     $(PUBLIC_HEADERS_DIR)/DOMEntity.h \
     $(PUBLIC_HEADERS_DIR)/DOMEntityReference.h \
+    $(PUBLIC_HEADERS_DIR)/DOMEvent.h \
+    $(PRIVATE_HEADERS_DIR)/DOMEventPrivate.h \
+    $(PUBLIC_HEADERS_DIR)/DOMEventListener.h \
+    $(PUBLIC_HEADERS_DIR)/DOMEventTarget.h \
     $(PUBLIC_HEADERS_DIR)/DOMEvents.h \
     $(PUBLIC_HEADERS_DIR)/DOMExtensions.h \
     $(PUBLIC_HEADERS_DIR)/DOMHTML.h \
@@ -141,14 +145,21 @@ all : \
     $(PRIVATE_HEADERS_DIR)/DOMHTMLTextAreaElementPrivate.h \
     $(PUBLIC_HEADERS_DIR)/DOMHTMLTitleElement.h \
     $(PUBLIC_HEADERS_DIR)/DOMHTMLUListElement.h \
+    $(PUBLIC_HEADERS_DIR)/DOMKeyboardEvent.h \
+    $(PRIVATE_HEADERS_DIR)/DOMKeyboardEventPrivate.h \
     $(PUBLIC_HEADERS_DIR)/DOMList.h \
     $(PUBLIC_HEADERS_DIR)/DOMMediaList.h \
+    $(PUBLIC_HEADERS_DIR)/DOMMouseEvent.h \
+    $(PRIVATE_HEADERS_DIR)/DOMMouseEventPrivate.h \
+    $(PUBLIC_HEADERS_DIR)/DOMMutationEvent.h \
+    $(PRIVATE_HEADERS_DIR)/DOMMutationEventPrivate.h \
     $(PUBLIC_HEADERS_DIR)/DOMNamedNodeMap.h \
     $(PRIVATE_HEADERS_DIR)/DOMNamedNodeMapPrivate.h \
     $(PUBLIC_HEADERS_DIR)/DOMNode.h \
     $(PUBLIC_HEADERS_DIR)/DOMNodeList.h \
     $(PUBLIC_HEADERS_DIR)/DOMNotation.h \
     $(PUBLIC_HEADERS_DIR)/DOMObject.h \
+    $(PUBLIC_HEADERS_DIR)/DOMOverflowEvent.h \
     $(PRIVATE_HEADERS_DIR)/DOMPrivate.h \
     $(PUBLIC_HEADERS_DIR)/DOMProcessingInstruction.h \
     $(PRIVATE_HEADERS_DIR)/DOMProcessingInstructionPrivate.h \
@@ -160,7 +171,11 @@ all : \
     $(PUBLIC_HEADERS_DIR)/DOMStylesheets.h \
     $(PUBLIC_HEADERS_DIR)/DOMText.h \
     $(PUBLIC_HEADERS_DIR)/DOMTraversal.h \
+    $(PUBLIC_HEADERS_DIR)/DOMUIEvent.h \
+    $(PRIVATE_HEADERS_DIR)/DOMUIEventPrivate.h \
     $(PUBLIC_HEADERS_DIR)/DOMViews.h \
+    $(PUBLIC_HEADERS_DIR)/DOMWheelEvent.h \
+    $(PRIVATE_HEADERS_DIR)/DOMWheelEventPrivate.h \
     $(PUBLIC_HEADERS_DIR)/DOMXPath.h \
     $(PRIVATE_HEADERS_DIR)/WebDashboardRegion.h \
     $(PUBLIC_HEADERS_DIR)/WebScriptObject.h \
index c355207109b376b5450943880a50e5f4c2889754..5ada32bd4295b5f135442b909b3f67a89d6bec53 100644 (file)
                0867D690FE84028FC02AAC07 /* Project object */ = {
                        isa = PBXProject;
                        buildConfigurationList = 149C283208902B0F008A9EFC /* Build configuration list for PBXProject "WebKit" */;
-                       compatibilityVersion = "Xcode 2.4";
                        hasScannedForEncodings = 1;
                        knownRegions = (
                                English,
                        productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
                        projectDirPath = "";
                        projectRoot = "";
-                       shouldCheckCompatibility = 1;
                        targets = (
                                9398100A0824BF01008DF038 /* WebKit */,
                        );