bool NetscapePlugin::platformHandleKeyboardEvent(const WebKeyboardEvent&) { CurrentPluginSetter setCurrentPlugin(this); notImplemented(); return false; }
bool NetscapePlugin::platformHandleMouseLeaveEvent(const WebMouseEvent& event) { CurrentPluginSetter setCurrentPlugin(this); if (m_isWindowed) return false; controller()->willSendEventToPlugin(); NPEvent npEvent = toNP(event); NPP_HandleEvent(&npEvent); return true; }
void CdWidget::channelSelected( const QString &name ) { int i; for ( i=0; i<(int)chan.count(); i++ ) { if ( chan.at(i)->name==name ) { emit setCurrentPlugin( this ); dump->stop(); dump->go( cdAddress, cdPort, *chan.at(i) ); emit dvbOpen( fifoName, chan.at(i)->name, chan.at(i)->vpid ); break; } } }
void NetscapePlugin::platformSetFocus(bool hasFocus) { CurrentPluginSetter setCurrentPlugin(this); if (m_isWindowed) return; controller()->willSendEventToPlugin(); NPEvent npEvent; npEvent.event = hasFocus ? WM_SETFOCUS : WM_KILLFOCUS; npEvent.wParam = 0; npEvent.lParam = 0; NPP_HandleEvent(&npEvent); }
void NetscapePlugin::platformPaint(GraphicsContext* context, const IntRect& dirtyRect, bool) { CurrentPluginSetter setCurrentPlugin(this); // FIXME: Call SetWindow here if we haven't called it yet (see r59904). if (m_isWindowed) { // FIXME: Paint windowed plugins into context if context->shouldIncludeChildWindows() is true. return; } controller()->willSendEventToPlugin(); LocalWindowsContext windowsContext(context, dirtyRect, m_isTransparent); m_npWindow.type = NPWindowTypeDrawable; m_npWindow.window = windowsContext.hdc(); WINDOWPOS windowpos = { 0, 0, 0, 0, 0, 0, 0 }; IntPoint pluginLocationInRootViewCoordinates = convertToRootView(IntPoint()); windowpos.x = pluginLocationInRootViewCoordinates.x(); windowpos.y = pluginLocationInRootViewCoordinates.y(); windowpos.cx = m_pluginSize.width(); windowpos.cy = m_pluginSize.height(); NPEvent npEvent; npEvent.event = WM_WINDOWPOSCHANGED; npEvent.wParam = 0; npEvent.lParam = reinterpret_cast<uintptr_t>(&windowpos); NPP_HandleEvent(&npEvent); callSetWindow(); RECT dirtyWinRect = dirtyRect; npEvent.event = WM_PAINT; npEvent.wParam = reinterpret_cast<uintptr_t>(windowsContext.hdc()); npEvent.lParam = reinterpret_cast<uintptr_t>(&dirtyWinRect); NPP_HandleEvent(&npEvent); }
RecaptchaSettingsPage::RecaptchaSettingsPage(QWidget *parent) : SettingsPage(parent), m_model(new RecaptchaPluginConfigModel(this)), m_view(new QListView(this)), m_scrollArea(new QScrollArea(this)), m_splitter(new QSplitter(Qt::Horizontal, this)), m_layout(new QVBoxLayout(this)) { setWindowTitle(tr("Recaptcha")); m_view->setModel(m_model); m_view->setUniformItemSizes(true); m_scrollArea->setWidgetResizable(true); m_scrollArea->setWidget(new QLabel(tr("No plugin selected"), m_scrollArea)); m_splitter->addWidget(m_view); m_splitter->addWidget(m_scrollArea); m_splitter->setStretchFactor(1, 1); m_layout->addWidget(m_splitter); connect(m_view, SIGNAL(clicked(QModelIndex)), this, SLOT(setCurrentPlugin(QModelIndex))); }