So I've tried this in a different way, but still to no success. basically on OSX our main gecko window is behind a transparent window which is capturing mouse events first. To try and pass the mouse to the gecko window I'm trying the following . can anyone tell me why the window wouldn't be recieving the mouse events, I specifically need a plugin to respond to these events?
EventRef mouseevt; UInt32 button = 0; UInt32 clicks = 0; CreateEvent(NULL,kEventClassMouse,kEventMouseDown,0,kEventAttributeUserEvent,&mouseevt); SetEventParameter(mouseevt, kEventParamMouseLocation, typeQDPoint, sizeof(Point), &mousepos); SetEventParameter(mouseevt, kEventParamMouseButton, typeMouseButton, sizeof(UInt32), &button); SetEventParameter(mouseevt, kEventParamClickCount, typeUInt32, sizeof(UInt32), &clicks); SendEventToEventTarget(mouseevt, GetWindowEventTarget(nativeWindowRef)); //nativeWindowRef is the window I passed to CreateBrowser SendEventToEventTarget always returns an event not handled. Any help is greatly appreciated. Thanks, --Richard "Richard" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I want my host app to send Mouse / Keyboard events that it has captured to >the gecko window. I'm assuming it's something like this (for mouse) : > > nsCOMPtr<nsIWidget> pWidget; > m_BaseWindow->GetMainWidget(getter_AddRefs(pWidget)); > > nsMouseEvent event(false,NS_MOUSE_LEFT_CLICK,pWidget,nsMouseEvent::eReal); > event.clickCount = 1; > nsEventStatus status; > pWidget->DispatchEvent(&event,status); > > Is this the right idea??? Also how do you pass in the mouse coords. Is > there a better way I should be doing this? > > Thanks > > --Richard > _______________________________________________ dev-embedding mailing list [email protected] https://lists.mozilla.org/listinfo/dev-embedding
