mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-05 13:45:46 +00:00
Rename nsGUIEvent's nativeMsg field to pluginEvent. b=527617 r=roc
This commit is contained in:
parent
5dad284eab
commit
c616b14bed
@ -3605,7 +3605,7 @@ nsEventStateManager::DispatchMouseEvent(nsGUIEvent* aEvent, PRUint32 aMessage,
|
||||
event.isControl = ((nsMouseEvent*)aEvent)->isControl;
|
||||
event.isAlt = ((nsMouseEvent*)aEvent)->isAlt;
|
||||
event.isMeta = ((nsMouseEvent*)aEvent)->isMeta;
|
||||
event.nativeMsg = ((nsMouseEvent*)aEvent)->nativeMsg;
|
||||
event.pluginEvent = ((nsMouseEvent*)aEvent)->pluginEvent;
|
||||
event.relatedTarget = aRelatedContent;
|
||||
|
||||
mCurrentTargetContent = aTargetContent;
|
||||
|
@ -3609,7 +3609,7 @@ nsresult nsPluginInstanceOwner::KeyPress(nsIDOMEvent* aKeyEvent)
|
||||
if (privateEvent) {
|
||||
nsEvent *theEvent = privateEvent->GetInternalNSEvent();
|
||||
const nsGUIEvent *guiEvent = (nsGUIEvent*)theEvent;
|
||||
const EventRecord *ev = (EventRecord*)(guiEvent->nativeMsg);
|
||||
const EventRecord *ev = (EventRecord*)(guiEvent->pluginEvent);
|
||||
if (guiEvent &&
|
||||
guiEvent->message == NS_KEY_PRESS &&
|
||||
ev &&
|
||||
@ -4024,14 +4024,14 @@ nsEventStatus nsPluginInstanceOwner::ProcessEventX11Composited(const nsGUIEvent&
|
||||
//XXX case NS_MOUSE_SCROLL_EVENT: not received.
|
||||
|
||||
case NS_KEY_EVENT:
|
||||
if (anEvent.nativeMsg)
|
||||
if (anEvent.pluginEvent)
|
||||
{
|
||||
XKeyEvent &event = pluginEvent.xkey;
|
||||
#ifdef MOZ_WIDGET_GTK2
|
||||
event.root = GDK_ROOT_WINDOW();
|
||||
event.time = anEvent.time;
|
||||
const GdkEventKey* gdkEvent =
|
||||
static_cast<const GdkEventKey*>(anEvent.nativeMsg);
|
||||
static_cast<const GdkEventKey*>(anEvent.pluginEvent);
|
||||
event.keycode = gdkEvent->hardware_keycode;
|
||||
event.state = gdkEvent->state;
|
||||
switch (anEvent.message)
|
||||
@ -4044,7 +4044,7 @@ nsEventStatus nsPluginInstanceOwner::ProcessEventX11Composited(const nsGUIEvent&
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
// Information that could be obtained from nativeMsg but we may not
|
||||
// Information that could be obtained from pluginEvent but we may not
|
||||
// want to promise to provide:
|
||||
event.subwindow = None;
|
||||
event.x = 0;
|
||||
@ -4154,7 +4154,7 @@ nsEventStatus nsPluginInstanceOwner::ProcessEvent(const nsGUIEvent& anEvent)
|
||||
#endif
|
||||
NPCocoaEvent synthCocoaEvent;
|
||||
|
||||
void* event = anEvent.nativeMsg;
|
||||
void* event = anEvent.pluginEvent;
|
||||
|
||||
if (!event) {
|
||||
nsPoint pt = nsLayoutUtils::GetEventCoordinatesRelativeTo(&anEvent, mObjectFrame)
|
||||
@ -4260,9 +4260,9 @@ nsEventStatus nsPluginInstanceOwner::ProcessEvent(const nsGUIEvent& anEvent)
|
||||
|
||||
#ifdef XP_WIN
|
||||
// this code supports windowless plugins
|
||||
NPEvent *pPluginEvent = (NPEvent*)anEvent.nativeMsg;
|
||||
NPEvent *pPluginEvent = (NPEvent*)anEvent.pluginEvent;
|
||||
// we can get synthetic events from the nsEventStateManager... these
|
||||
// have no nativeMsg
|
||||
// have no pluginEvent
|
||||
NPEvent pluginEvent;
|
||||
if (anEvent.eventStructType == NS_MOUSE_EVENT) {
|
||||
if (!pPluginEvent) {
|
||||
@ -4468,14 +4468,14 @@ nsEventStatus nsPluginInstanceOwner::ProcessEvent(const nsGUIEvent& anEvent)
|
||||
//XXX case NS_MOUSE_SCROLL_EVENT: not received.
|
||||
|
||||
case NS_KEY_EVENT:
|
||||
if (anEvent.nativeMsg)
|
||||
if (anEvent.pluginEvent)
|
||||
{
|
||||
XKeyEvent &event = pluginEvent.xkey;
|
||||
#ifdef MOZ_WIDGET_GTK2
|
||||
event.root = GDK_ROOT_WINDOW();
|
||||
event.time = anEvent.time;
|
||||
const GdkEventKey* gdkEvent =
|
||||
static_cast<const GdkEventKey*>(anEvent.nativeMsg);
|
||||
static_cast<const GdkEventKey*>(anEvent.pluginEvent);
|
||||
event.keycode = gdkEvent->hardware_keycode;
|
||||
event.state = gdkEvent->state;
|
||||
switch (anEvent.message)
|
||||
@ -4488,7 +4488,7 @@ nsEventStatus nsPluginInstanceOwner::ProcessEvent(const nsGUIEvent& anEvent)
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
// Information that could be obtained from nativeMsg but we may not
|
||||
// Information that could be obtained from pluginEvent but we may not
|
||||
// want to promise to provide:
|
||||
event.subwindow = None;
|
||||
event.x = 0;
|
||||
|
@ -527,22 +527,22 @@ class nsGUIEvent : public nsEvent
|
||||
protected:
|
||||
nsGUIEvent(PRBool isTrusted, PRUint32 msg, nsIWidget *w, PRUint8 structType)
|
||||
: nsEvent(isTrusted, msg, structType),
|
||||
widget(w), nativeMsg(nsnull)
|
||||
widget(w), pluginEvent(nsnull)
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
nsGUIEvent(PRBool isTrusted, PRUint32 msg, nsIWidget *w)
|
||||
: nsEvent(isTrusted, msg, NS_GUI_EVENT),
|
||||
widget(w), nativeMsg(nsnull)
|
||||
widget(w), pluginEvent(nsnull)
|
||||
{
|
||||
}
|
||||
|
||||
/// Originator of the event
|
||||
nsCOMPtr<nsIWidget> widget;
|
||||
|
||||
/// Internal platform specific message.
|
||||
void* nativeMsg;
|
||||
/// Event for NPAPI plugin
|
||||
void* pluginEvent;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -3068,7 +3068,7 @@ static const PRInt32 sShadowInvalidationInterval = 100;
|
||||
carbonEvent.when = ::TickCount();
|
||||
::GetGlobalMouse(&carbonEvent.where);
|
||||
carbonEvent.modifiers = ::GetCurrentKeyModifiers();
|
||||
geckoEvent.nativeMsg = &carbonEvent;
|
||||
geckoEvent.pluginEvent = &carbonEvent;
|
||||
}
|
||||
#endif
|
||||
NPCocoaEvent cocoaEvent;
|
||||
@ -3084,7 +3084,7 @@ static const PRInt32 sShadowInvalidationInterval = 100;
|
||||
cocoaEvent.data.mouse.deltaX = [theEvent deltaX];
|
||||
cocoaEvent.data.mouse.deltaY = [theEvent deltaY];
|
||||
cocoaEvent.data.mouse.deltaZ = [theEvent deltaZ];
|
||||
geckoEvent.nativeMsg = &cocoaEvent;
|
||||
geckoEvent.pluginEvent = &cocoaEvent;
|
||||
}
|
||||
|
||||
mGeckoChild->DispatchWindowEvent(geckoEvent);
|
||||
@ -3120,7 +3120,7 @@ static const PRInt32 sShadowInvalidationInterval = 100;
|
||||
carbonEvent.when = ::TickCount();
|
||||
::GetGlobalMouse(&carbonEvent.where);
|
||||
carbonEvent.modifiers = ::GetCurrentKeyModifiers();
|
||||
geckoEvent.nativeMsg = &carbonEvent;
|
||||
geckoEvent.pluginEvent = &carbonEvent;
|
||||
}
|
||||
#endif
|
||||
NPCocoaEvent cocoaEvent;
|
||||
@ -3136,7 +3136,7 @@ static const PRInt32 sShadowInvalidationInterval = 100;
|
||||
cocoaEvent.data.mouse.deltaX = [theEvent deltaX];
|
||||
cocoaEvent.data.mouse.deltaY = [theEvent deltaY];
|
||||
cocoaEvent.data.mouse.deltaZ = [theEvent deltaZ];
|
||||
geckoEvent.nativeMsg = &cocoaEvent;
|
||||
geckoEvent.pluginEvent = &cocoaEvent;
|
||||
}
|
||||
|
||||
mGeckoChild->DispatchWindowEvent(geckoEvent);
|
||||
@ -3172,7 +3172,7 @@ static const PRInt32 sShadowInvalidationInterval = 100;
|
||||
carbonEvent.when = ::TickCount();
|
||||
::GetGlobalMouse(&carbonEvent.where);
|
||||
carbonEvent.modifiers = ::GetCurrentKeyModifiers();
|
||||
event.nativeMsg = &carbonEvent;
|
||||
event.pluginEvent = &carbonEvent;
|
||||
}
|
||||
#endif
|
||||
if (mPluginEventModel == NPEventModelCocoa) {
|
||||
@ -3185,7 +3185,7 @@ static const PRInt32 sShadowInvalidationInterval = 100;
|
||||
cocoaEvent.data.mouse.deltaX = [aEvent deltaX];
|
||||
cocoaEvent.data.mouse.deltaY = [aEvent deltaY];
|
||||
cocoaEvent.data.mouse.deltaZ = [aEvent deltaZ];
|
||||
event.nativeMsg = &cocoaEvent;
|
||||
event.pluginEvent = &cocoaEvent;
|
||||
}
|
||||
}
|
||||
|
||||
@ -3223,7 +3223,7 @@ static const PRInt32 sShadowInvalidationInterval = 100;
|
||||
carbonEvent.when = ::TickCount();
|
||||
::GetGlobalMouse(&carbonEvent.where);
|
||||
carbonEvent.modifiers = ::GetCurrentKeyModifiers();
|
||||
geckoEvent.nativeMsg = &carbonEvent;
|
||||
geckoEvent.pluginEvent = &carbonEvent;
|
||||
}
|
||||
#endif
|
||||
if (mPluginEventModel == NPEventModelCocoa) {
|
||||
@ -3238,7 +3238,7 @@ static const PRInt32 sShadowInvalidationInterval = 100;
|
||||
cocoaEvent.data.mouse.deltaX = [theEvent deltaX];
|
||||
cocoaEvent.data.mouse.deltaY = [theEvent deltaY];
|
||||
cocoaEvent.data.mouse.deltaZ = [theEvent deltaZ];
|
||||
geckoEvent.nativeMsg = &cocoaEvent;
|
||||
geckoEvent.pluginEvent = &cocoaEvent;
|
||||
}
|
||||
}
|
||||
mGeckoChild->DispatchWindowEvent(geckoEvent);
|
||||
@ -3267,7 +3267,7 @@ static const PRInt32 sShadowInvalidationInterval = 100;
|
||||
carbonEvent.when = ::TickCount();
|
||||
::GetGlobalMouse(&carbonEvent.where);
|
||||
carbonEvent.modifiers = btnState | ::GetCurrentKeyModifiers();
|
||||
geckoEvent.nativeMsg = &carbonEvent;
|
||||
geckoEvent.pluginEvent = &carbonEvent;
|
||||
}
|
||||
#endif
|
||||
NPCocoaEvent cocoaEvent;
|
||||
@ -3283,7 +3283,7 @@ static const PRInt32 sShadowInvalidationInterval = 100;
|
||||
cocoaEvent.data.mouse.deltaX = [theEvent deltaX];
|
||||
cocoaEvent.data.mouse.deltaY = [theEvent deltaY];
|
||||
cocoaEvent.data.mouse.deltaZ = [theEvent deltaZ];
|
||||
geckoEvent.nativeMsg = &cocoaEvent;
|
||||
geckoEvent.pluginEvent = &cocoaEvent;
|
||||
}
|
||||
|
||||
mGeckoChild->DispatchWindowEvent(geckoEvent);
|
||||
@ -3322,7 +3322,7 @@ static const PRInt32 sShadowInvalidationInterval = 100;
|
||||
carbonEvent.when = ::TickCount();
|
||||
::GetGlobalMouse(&carbonEvent.where);
|
||||
carbonEvent.modifiers = controlKey; // fake a context menu click
|
||||
geckoEvent.nativeMsg = &carbonEvent;
|
||||
geckoEvent.pluginEvent = &carbonEvent;
|
||||
}
|
||||
#endif
|
||||
NPCocoaEvent cocoaEvent;
|
||||
@ -3338,7 +3338,7 @@ static const PRInt32 sShadowInvalidationInterval = 100;
|
||||
cocoaEvent.data.mouse.deltaX = [theEvent deltaX];
|
||||
cocoaEvent.data.mouse.deltaY = [theEvent deltaY];
|
||||
cocoaEvent.data.mouse.deltaZ = [theEvent deltaZ];
|
||||
geckoEvent.nativeMsg = &cocoaEvent;
|
||||
geckoEvent.pluginEvent = &cocoaEvent;
|
||||
}
|
||||
|
||||
PRBool handled = mGeckoChild->DispatchWindowEvent(geckoEvent);
|
||||
@ -3372,7 +3372,7 @@ static const PRInt32 sShadowInvalidationInterval = 100;
|
||||
carbonEvent.when = ::TickCount();
|
||||
::GetGlobalMouse(&carbonEvent.where);
|
||||
carbonEvent.modifiers = controlKey; // fake a context menu click
|
||||
geckoEvent.nativeMsg = &carbonEvent;
|
||||
geckoEvent.pluginEvent = &carbonEvent;
|
||||
}
|
||||
#endif
|
||||
NPCocoaEvent cocoaEvent;
|
||||
@ -3388,7 +3388,7 @@ static const PRInt32 sShadowInvalidationInterval = 100;
|
||||
cocoaEvent.data.mouse.deltaX = [theEvent deltaX];
|
||||
cocoaEvent.data.mouse.deltaY = [theEvent deltaY];
|
||||
cocoaEvent.data.mouse.deltaZ = [theEvent deltaZ];
|
||||
geckoEvent.nativeMsg = &cocoaEvent;
|
||||
geckoEvent.pluginEvent = &cocoaEvent;
|
||||
}
|
||||
|
||||
nsAutoRetainCocoaObject kungFuDeathGrip(self);
|
||||
@ -3547,7 +3547,7 @@ static const PRInt32 sShadowInvalidationInterval = 100;
|
||||
else
|
||||
cocoaEvent.data.mouse.deltaY = 0.0;
|
||||
cocoaEvent.data.mouse.deltaZ = 0.0;
|
||||
geckoEvent.nativeMsg = &cocoaEvent;
|
||||
geckoEvent.pluginEvent = &cocoaEvent;
|
||||
}
|
||||
|
||||
nsAutoRetainCocoaObject kungFuDeathGrip(self);
|
||||
@ -4643,7 +4643,7 @@ GetUSLayoutCharFromKeyTranslate(UInt32 aKeyCode, UInt32 aModifiers)
|
||||
PRUint32 charCode(charCodes.ElementAt(i));
|
||||
|
||||
keyDownEvent.time = PR_IntervalNow();
|
||||
keyDownEvent.nativeMsg = &eventRec;
|
||||
keyDownEvent.pluginEvent = &eventRec;
|
||||
if (IsSpecialGeckoKey(macKeyCode)) {
|
||||
keyDownEvent.keyCode = keyCode;
|
||||
} else {
|
||||
@ -4775,11 +4775,11 @@ GetUSLayoutCharFromKeyTranslate(UInt32 aKeyCode, UInt32 aModifiers)
|
||||
#ifndef NP_NO_CARBON
|
||||
if (mPluginEventModel == NPEventModelCarbon) {
|
||||
ConvertCocoaKeyEventToCarbonEvent(mCurKeyEvent, carbonEvent);
|
||||
geckoEvent.nativeMsg = &carbonEvent;
|
||||
geckoEvent.pluginEvent = &carbonEvent;
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
geckoEvent.nativeMsg = NULL;
|
||||
geckoEvent.pluginEvent = NULL;
|
||||
}
|
||||
geckoEvent.isShift = (nsCocoaUtils::GetCocoaEventModifierFlags(mCurKeyEvent) & NSShiftKeyMask) != 0;
|
||||
if (!IsPrintableChar(geckoEvent.charCode)) {
|
||||
@ -5190,13 +5190,13 @@ static const char* ToEscapedString(NSString* aString, nsCAutoString& aBuf)
|
||||
EventRecord carbonEvent;
|
||||
if (mPluginEventModel == NPEventModelCarbon) {
|
||||
ConvertCocoaKeyEventToCarbonEvent(theEvent, carbonEvent);
|
||||
geckoEvent.nativeMsg = &carbonEvent;
|
||||
geckoEvent.pluginEvent = &carbonEvent;
|
||||
}
|
||||
#endif
|
||||
NPCocoaEvent cocoaEvent;
|
||||
if (mPluginEventModel == NPEventModelCocoa) {
|
||||
ConvertCocoaKeyEventToNPCocoaEvent(theEvent, cocoaEvent);
|
||||
geckoEvent.nativeMsg = &cocoaEvent;
|
||||
geckoEvent.pluginEvent = &cocoaEvent;
|
||||
}
|
||||
|
||||
mKeyDownHandled = mGeckoChild->DispatchWindowEvent(geckoEvent);
|
||||
@ -5245,11 +5245,11 @@ static const char* ToEscapedString(NSString* aString, nsCAutoString& aBuf)
|
||||
EventRecord carbonEvent;
|
||||
if (mPluginEventModel == NPEventModelCarbon) {
|
||||
ConvertCocoaKeyEventToCarbonEvent(theEvent, carbonEvent);
|
||||
geckoEvent.nativeMsg = &carbonEvent;
|
||||
geckoEvent.pluginEvent = &carbonEvent;
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
geckoEvent.nativeMsg = NULL;
|
||||
geckoEvent.pluginEvent = NULL;
|
||||
}
|
||||
|
||||
mKeyPressHandled = mGeckoChild->DispatchWindowEvent(geckoEvent);
|
||||
@ -5290,11 +5290,11 @@ static const char* ToEscapedString(NSString* aString, nsCAutoString& aBuf)
|
||||
EventRecord carbonEvent;
|
||||
if (mPluginEventModel == NPEventModelCarbon) {
|
||||
ConvertCocoaKeyEventToCarbonEvent(theEvent, carbonEvent);
|
||||
geckoEvent.nativeMsg = &carbonEvent;
|
||||
geckoEvent.pluginEvent = &carbonEvent;
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
geckoEvent.nativeMsg = NULL;
|
||||
geckoEvent.pluginEvent = NULL;
|
||||
}
|
||||
|
||||
mKeyPressHandled = mGeckoChild->DispatchWindowEvent(geckoEvent);
|
||||
@ -5432,7 +5432,7 @@ static BOOL keyUpAlreadySentKeyDown = NO;
|
||||
[self convertCocoaKeyEvent:theEvent toGeckoEvent:&keyUpEvent];
|
||||
NPCocoaEvent pluginEvent;
|
||||
ConvertCocoaKeyEventToNPCocoaEvent(theEvent, pluginEvent);
|
||||
keyUpEvent.nativeMsg = &pluginEvent;
|
||||
keyUpEvent.pluginEvent = &pluginEvent;
|
||||
mGeckoChild->DispatchWindowEvent(keyUpEvent);
|
||||
}
|
||||
#ifndef NP_NO_CARBON
|
||||
@ -5463,7 +5463,7 @@ static BOOL keyUpAlreadySentKeyDown = NO;
|
||||
[self convertCocoaKeyEvent:theEvent toGeckoEvent:&keyUpEvent];
|
||||
EventRecord macKeyUpEvent;
|
||||
ConvertCocoaKeyEventToCarbonEvent(theEvent, macKeyUpEvent);
|
||||
keyUpEvent.nativeMsg = &macKeyUpEvent;
|
||||
keyUpEvent.pluginEvent = &macKeyUpEvent;
|
||||
mGeckoChild->DispatchWindowEvent(keyUpEvent);
|
||||
}
|
||||
#endif
|
||||
@ -5489,7 +5489,7 @@ static BOOL keyUpAlreadySentKeyDown = NO;
|
||||
[self convertCocoaKeyEvent:nativeKeyDownEvent toGeckoEvent:&geckoEvent];
|
||||
|
||||
// plugin case returned out early, we don't need a native event here
|
||||
geckoEvent.nativeMsg = NULL;
|
||||
geckoEvent.pluginEvent = NULL;
|
||||
|
||||
keyDownHandled = mGeckoChild->DispatchWindowEvent(geckoEvent);
|
||||
if (!mGeckoChild)
|
||||
@ -5515,7 +5515,7 @@ static BOOL keyUpAlreadySentKeyDown = NO;
|
||||
geckoEvent.flags |= NS_EVENT_FLAG_NO_DEFAULT;
|
||||
|
||||
// plugin case returned out early, we don't need a native event here
|
||||
geckoEvent.nativeMsg = NULL;
|
||||
geckoEvent.pluginEvent = NULL;
|
||||
|
||||
mGeckoChild->DispatchWindowEvent(geckoEvent);
|
||||
if (!mGeckoChild)
|
||||
@ -5526,7 +5526,7 @@ static BOOL keyUpAlreadySentKeyDown = NO;
|
||||
[self convertCocoaKeyEvent:theEvent toGeckoEvent:&geckoEvent];
|
||||
|
||||
// plugin case returned out early, we don't need a native event here
|
||||
geckoEvent.nativeMsg = NULL;
|
||||
geckoEvent.pluginEvent = NULL;
|
||||
|
||||
mGeckoChild->DispatchWindowEvent(geckoEvent);
|
||||
|
||||
@ -5725,13 +5725,13 @@ static BOOL keyUpAlreadySentKeyDown = NO;
|
||||
EventRecord carbonEvent;
|
||||
if (mPluginEventModel == NPEventModelCarbon) {
|
||||
ConvertCocoaKeyEventToCarbonEvent(theEvent, carbonEvent, message);
|
||||
geckoEvent.nativeMsg = &carbonEvent;
|
||||
geckoEvent.pluginEvent = &carbonEvent;
|
||||
}
|
||||
#endif
|
||||
NPCocoaEvent cocoaEvent;
|
||||
if (mPluginEventModel == NPEventModelCocoa) {
|
||||
ConvertCocoaKeyEventToNPCocoaEvent(theEvent, cocoaEvent, message);
|
||||
geckoEvent.nativeMsg = &cocoaEvent;
|
||||
geckoEvent.pluginEvent = &cocoaEvent;
|
||||
}
|
||||
|
||||
mGeckoChild->DispatchWindowEvent(geckoEvent);
|
||||
|
@ -307,9 +307,9 @@ See bugs 411005 406407
|
||||
const nsGUIEvent *guiEvent = static_cast<nsGUIEvent*>(aEvent.nativeEvent);
|
||||
if (guiEvent &&
|
||||
(guiEvent->message == NS_KEY_PRESS || guiEvent->message == NS_KEY_UP || guiEvent->message == NS_KEY_DOWN) &&
|
||||
guiEvent->nativeMsg)
|
||||
guiEvent->pluginEvent)
|
||||
gtk_bindings_activate_event(GTK_OBJECT(mNativeTarget),
|
||||
static_cast<GdkEventKey*>(guiEvent->nativeMsg));
|
||||
static_cast<GdkEventKey*>(guiEvent->pluginEvent));
|
||||
*/
|
||||
|
||||
return PR_FALSE;
|
||||
|
@ -525,7 +525,7 @@ nsWindow::InitKeyEvent(nsKeyEvent &aEvent, GdkEventKey *aGdkEvent)
|
||||
// so link to the GdkEvent (which will vanish soon after return from the
|
||||
// event callback) to give plugins access to hardware_keycode and state.
|
||||
// (An XEvent would be nice but the GdkEvent is good enough.)
|
||||
aEvent.nativeMsg = (void *)aGdkEvent;
|
||||
aEvent.pluginEvent = (void *)aGdkEvent;
|
||||
|
||||
aEvent.time = aGdkEvent->time;
|
||||
}
|
||||
|
@ -3170,7 +3170,7 @@ PRBool nsWindow::DispatchMouseEvent(PRUint32 aEventType, MPARAM mp1, MPARAM mp2,
|
||||
*/
|
||||
pluginEvent.lParam = MAKELONG(event.refPoint.x, event.refPoint.y);
|
||||
|
||||
event.nativeMsg = (void *)&pluginEvent;
|
||||
event.pluginEvent = (void *)&pluginEvent;
|
||||
|
||||
// call the event callback
|
||||
if (nsnull != mEventCallback) {
|
||||
@ -3214,7 +3214,7 @@ PRBool nsWindow::DispatchFocus(PRUint32 aEventType)
|
||||
break;
|
||||
}
|
||||
|
||||
event.nativeMsg = (void *)&pluginEvent;
|
||||
event.pluginEvent = (void *)&pluginEvent;
|
||||
return DispatchWindowEvent(&event);
|
||||
}
|
||||
return PR_FALSE;
|
||||
|
@ -150,7 +150,7 @@ InitKeyEvent(nsKeyEvent &aEvent, QKeyEvent *aQEvent)
|
||||
// so link to the GdkEvent (which will vanish soon after return from the
|
||||
// event callback) to give plugins access to hardware_keycode and state.
|
||||
// (An XEvent would be nice but the GdkEvent is good enough.)
|
||||
aEvent.nativeMsg = (void *)aQEvent;
|
||||
aEvent.pluginEvent = (void *)aQEvent;
|
||||
}
|
||||
|
||||
nsWindow::nsWindow()
|
||||
|
@ -3022,7 +3022,7 @@ PRBool nsWindow::DispatchKeyEvent(PRUint32 aEventType, WORD aCharCode,
|
||||
pluginEvent.event = aMsg->message;
|
||||
pluginEvent.wParam = aMsg->wParam;
|
||||
pluginEvent.lParam = aMsg->lParam;
|
||||
event.nativeMsg = (void *)&pluginEvent;
|
||||
event.pluginEvent = (void *)&pluginEvent;
|
||||
}
|
||||
|
||||
PRBool result = DispatchWindowEvent(&event);
|
||||
@ -3131,7 +3131,7 @@ PRBool nsWindow::DispatchPluginEvent(const MSG &aMsg)
|
||||
pluginEvent.event = aMsg.message;
|
||||
pluginEvent.wParam = aMsg.wParam;
|
||||
pluginEvent.lParam = aMsg.lParam;
|
||||
event.nativeMsg = (void *)&pluginEvent;
|
||||
event.pluginEvent = (void *)&pluginEvent;
|
||||
return DispatchWindowEvent(&event);
|
||||
}
|
||||
|
||||
@ -3308,7 +3308,7 @@ PRBool nsWindow::DispatchMouseEvent(PRUint32 aEventType, WPARAM wParam,
|
||||
pluginEvent.wParam = wParam; // plugins NEED raw OS event flags!
|
||||
pluginEvent.lParam = lParam;
|
||||
|
||||
event.nativeMsg = (void *)&pluginEvent;
|
||||
event.pluginEvent = (void *)&pluginEvent;
|
||||
|
||||
// call the event callback
|
||||
if (nsnull != mEventCallback) {
|
||||
@ -3435,7 +3435,7 @@ PRBool nsWindow::DispatchFocus(PRUint32 aEventType)
|
||||
break;
|
||||
}
|
||||
|
||||
event.nativeMsg = (void *)&pluginEvent;
|
||||
event.pluginEvent = (void *)&pluginEvent;
|
||||
|
||||
return DispatchWindowEvent(&event);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user