WebCore:
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Aug 2008 21:04:12 +0000 (21:04 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Aug 2008 21:04:12 +0000 (21:04 +0000)
2008-08-20  Josh Aas  <joshmoz@gmail.com>

        Reviewed and landed by Anders.

        <rdar://problem/6163636>
        rename NPCocoaEvent's "event" struct to "data" (20446)

        * bridge/npapi.h:
        (_NPCocoaEvent::):

WebKit/mac:

2008-08-20  Josh Aas  <joshmoz@gmail.com>

        Reviewed and landed by Anders.

        <rdar://problem/6163636>
        rename NPCocoaEvent's "event" struct to "data" (20446)

        * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
        (WebNetscapePluginEventHandlerCocoa::drawRect):
        (WebNetscapePluginEventHandlerCocoa::sendMouseEvent):
        (WebNetscapePluginEventHandlerCocoa::flagsChanged):
        (WebNetscapePluginEventHandlerCocoa::sendKeyEvent):
        (WebNetscapePluginEventHandlerCocoa::windowFocusChanged):
        (WebNetscapePluginEventHandlerCocoa::focusChanged):

WebKitExamplePlugins:

2008-08-20  Josh Aas  <joshmoz@gmail.com>

        Reviewed and landed by Anders.

        <rdar://problem/6163636>
        rename NPCocoaEvent's "event" struct to "data" (20446)

        * NetscapeCocoaPlugin/main.m:
        (handleMouseEvent):
        (handleKeyboardEvent):
        (NPP_HandleEvent):

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

WebCore/ChangeLog
WebCore/bridge/npapi.h
WebKit/mac/ChangeLog
WebKit/mac/Plugins/WebNetscapePluginEventHandlerCocoa.mm
WebKitExamplePlugins/ChangeLog
WebKitExamplePlugins/NetscapeCocoaPlugin/main.m

index 2bf1421..6949f5b 100644 (file)
@@ -1,3 +1,13 @@
+2008-08-20  Josh Aas  <joshmoz@gmail.com>
+
+        Reviewed and landed by Anders.
+
+        <rdar://problem/6163636> 
+        rename NPCocoaEvent's "event" struct to "data" (20446)
+        
+        * bridge/npapi.h:
+        (_NPCocoaEvent::):
+
 2008-08-20  Beth Dakin  <bdakin@apple.com>
 
         Reviewed by Darin.
index f96291f..499e1a0 100644 (file)
@@ -482,7 +482,7 @@ typedef struct _NPCocoaEvent {
         struct {
             NPBool hasFocus;
         } focus;        
-    } event;
+    } data;
 } NPCocoaEvent;
 
 #endif
index 1084a85..e94420a 100644 (file)
@@ -1,3 +1,18 @@
+2008-08-20  Josh Aas  <joshmoz@gmail.com>
+
+        Reviewed and landed by Anders.
+
+        <rdar://problem/6163636> 
+        rename NPCocoaEvent's "event" struct to "data" (20446)
+
+        * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
+        (WebNetscapePluginEventHandlerCocoa::drawRect):
+        (WebNetscapePluginEventHandlerCocoa::sendMouseEvent):
+        (WebNetscapePluginEventHandlerCocoa::flagsChanged):
+        (WebNetscapePluginEventHandlerCocoa::sendKeyEvent):
+        (WebNetscapePluginEventHandlerCocoa::windowFocusChanged):
+        (WebNetscapePluginEventHandlerCocoa::focusChanged):
+
 2008-08-20  Beth Dakin  <bdakin@apple.com>
 
         Reviewed by Darin.
index dab634a..cf9a6df 100644 (file)
@@ -45,10 +45,10 @@ void WebNetscapePluginEventHandlerCocoa::drawRect(const NSRect& rect)
     NPCocoaEvent event;
     
     initializeEvent(&event, NPCocoaEventDrawRect);
-    event.event.draw.x = rect.origin.x;
-    event.event.draw.y = rect.origin.y;
-    event.event.draw.width = rect.size.width;
-    event.event.draw.height = rect.size.height;
+    event.data.draw.x = rect.origin.x;
+    event.data.draw.y = rect.origin.y;
+    event.data.draw.width = rect.size.width;
+    event.data.draw.height = rect.size.height;
     
     sendEvent(&event);
 }
@@ -101,14 +101,14 @@ bool WebNetscapePluginEventHandlerCocoa::sendMouseEvent(NSEvent *nsEvent, NPCoco
         clickCount = [nsEvent clickCount];
     
     initializeEvent(&event, type);
-    event.event.mouse.modifierFlags = [nsEvent modifierFlags];
-    event.event.mouse.buttonNumber = [nsEvent buttonNumber];
-    event.event.mouse.clickCount = clickCount;
-    event.event.mouse.pluginX = point.x;
-    event.event.mouse.pluginY = point.y;
-    event.event.mouse.deltaX = [nsEvent deltaX];
-    event.event.mouse.deltaY = [nsEvent deltaY];
-    event.event.mouse.deltaZ = [nsEvent deltaZ];
+    event.data.mouse.modifierFlags = [nsEvent modifierFlags];
+    event.data.mouse.buttonNumber = [nsEvent buttonNumber];
+    event.data.mouse.clickCount = clickCount;
+    event.data.mouse.pluginX = point.x;
+    event.data.mouse.pluginY = point.y;
+    event.data.mouse.deltaX = [nsEvent deltaX];
+    event.data.mouse.deltaY = [nsEvent deltaY];
+    event.data.mouse.deltaZ = [nsEvent deltaZ];
     
     return sendEvent(&event);
 }
@@ -132,11 +132,11 @@ void WebNetscapePluginEventHandlerCocoa::flagsChanged(NSEvent *nsEvent)
     NPCocoaEvent event;
         
     initializeEvent(&event, NPCocoaEventFlagsChanged);
-    event.event.key.modifierFlags = [nsEvent modifierFlags];
-    event.event.key.keyCode = [nsEvent keyCode];
-    event.event.key.isARepeat = false;
-    event.event.key.characters = 0;
-    event.event.key.charactersIgnoringModifiers = 0;
+    event.data.key.modifierFlags = [nsEvent modifierFlags];
+    event.data.key.keyCode = [nsEvent keyCode];
+    event.data.key.isARepeat = false;
+    event.data.key.characters = 0;
+    event.data.key.charactersIgnoringModifiers = 0;
     
     sendEvent(&event);
 }
@@ -146,11 +146,11 @@ bool WebNetscapePluginEventHandlerCocoa::sendKeyEvent(NSEvent* nsEvent, NPCocoaE
     NPCocoaEvent event;
 
     initializeEvent(&event, type);
-    event.event.key.modifierFlags = [nsEvent modifierFlags];
-    event.event.key.keyCode = [nsEvent keyCode];
-    event.event.key.isARepeat = [nsEvent isARepeat];
-    event.event.key.characters = (NPNSString *)[nsEvent characters];
-    event.event.key.charactersIgnoringModifiers = (NPNSString *)[nsEvent charactersIgnoringModifiers];
+    event.data.key.modifierFlags = [nsEvent modifierFlags];
+    event.data.key.keyCode = [nsEvent keyCode];
+    event.data.key.isARepeat = [nsEvent isARepeat];
+    event.data.key.characters = (NPNSString *)[nsEvent characters];
+    event.data.key.charactersIgnoringModifiers = (NPNSString *)[nsEvent charactersIgnoringModifiers];
      
     return sendEvent(&event);
 }
@@ -160,7 +160,7 @@ void WebNetscapePluginEventHandlerCocoa::windowFocusChanged(bool hasFocus)
     NPCocoaEvent event;
     
     initializeEvent(&event, NPCocoaEventWindowFocusChanged);
-    event.event.focus.hasFocus = hasFocus;
+    event.data.focus.hasFocus = hasFocus;
     
     sendEvent(&event);
 }
@@ -170,7 +170,7 @@ void WebNetscapePluginEventHandlerCocoa::focusChanged(bool hasFocus)
     NPCocoaEvent event;
 
     initializeEvent(&event, NPCocoaEventFocusChanged);
-    event.event.focus.hasFocus = hasFocus;
+    event.data.focus.hasFocus = hasFocus;
     
     sendEvent(&event);
 }
index 4599b3e..551a3fc 100644 (file)
@@ -1,3 +1,15 @@
+2008-08-20  Josh Aas  <joshmoz@gmail.com>
+
+        Reviewed and landed by Anders.
+
+        <rdar://problem/6163636> 
+        rename NPCocoaEvent's "event" struct to "data" (20446)
+
+        * NetscapeCocoaPlugin/main.m:
+        (handleMouseEvent):
+        (handleKeyboardEvent):
+        (NPP_HandleEvent):
+
 2008-05-22  Josh Aas  <joshmoz@gmail.com>
 
         Reviewed by Anders.
index 3f17384..1f66ac1 100644 (file)
@@ -271,12 +271,12 @@ static void handleMouseEvent(PluginObject *obj, NPCocoaEvent *event)
                                                    "Click count: %d\n"
                                                    "Delta: (%g, %g, %g)",
                                                    eventType(event->type), 
-                                                   event->event.mouse.modifierFlags,
-                                                   event->event.mouse.pluginX,
-                                                   event->event.mouse.pluginY,
-                                                   event->event.mouse.buttonNumber,
-                                                   event->event.mouse.clickCount,
-                                                   event->event.mouse.deltaX, event->event.mouse.deltaY, event->event.mouse.deltaZ];
+                                                   event->data.mouse.modifierFlags,
+                                                   event->data.mouse.pluginX,
+                                                   event->data.mouse.pluginY,
+                                                   event->data.mouse.buttonNumber,
+                                                   event->data.mouse.clickCount,
+                                                   event->data.mouse.deltaX, event->data.mouse.deltaY, event->data.mouse.deltaZ];
     
     
     [obj->string release];
@@ -284,7 +284,7 @@ static void handleMouseEvent(PluginObject *obj, NPCocoaEvent *event)
  
     invalidatePlugin(obj);
     
-    if (event->event.mouse.buttonNumber == 1) {
+    if (event->data.mouse.buttonNumber == 1) {
         if (!obj->menuHandler)
             obj->menuHandler = [[MenuHandler alloc] initWithBrowserFuncs:browser instance:obj->npp];
         
@@ -302,11 +302,11 @@ static void handleKeyboardEvent(PluginObject *obj, NPCocoaEvent *event)
                         "Is a repeat: %@\n"
                         "Key code: %d",
                         eventType(event->type), 
-                        event->event.key.modifierFlags,
-                        event->event.key.characters,
-                        event->event.key.charactersIgnoringModifiers,
-                        event->event.key.isARepeat ? @"YES" : @"NO",
-                        event->event.key.keyCode];
+                        event->data.key.modifierFlags,
+                        event->data.key.characters,
+                        event->data.key.charactersIgnoringModifiers,
+                        event->data.key.isARepeat ? @"YES" : @"NO",
+                        event->data.key.keyCode];
     
     
     [obj->string release];
@@ -323,7 +323,7 @@ int16 NPP_HandleEvent(NPP instance, void* event)
     
     switch(cocoaEvent->type) {
         case NPCocoaEventFocusChanged:
-            obj->hasFocus = cocoaEvent->event.focus.hasFocus;
+            obj->hasFocus = cocoaEvent->data.focus.hasFocus;
             invalidatePlugin(obj);
             return 1;