本文整理汇总了C++中EwkView::webView方法的典型用法代码示例。如果您正苦于以下问题:C++ EwkView::webView方法的具体用法?C++ EwkView::webView怎么用?C++ EwkView::webView使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EwkView
的用法示例。
在下文中一共展示了EwkView::webView方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: handleSingleTap
void GestureHandler::handleSingleTap(const IntPoint& position)
{
Evas* evas = evas_object_evas_get(m_ewkView->evasObject());
ASSERT(evas);
// Send mouse move, down and up event to create fake click event.
Evas_Event_Mouse_Move mouseMove;
mouseMove.buttons = 0;
mouseMove.prev.output.x = mouseMove.prev.canvas.x = position.x();
mouseMove.prev.output.y = mouseMove.prev.canvas.y = position.y();
mouseMove.cur.output.x = mouseMove.cur.canvas.x = position.x();
mouseMove.cur.output.y = mouseMove.cur.canvas.y = position.y();
mouseMove.data = 0;
mouseMove.modifiers = const_cast<Evas_Modifier*>(evas_key_modifier_get(evas));
mouseMove.locks = const_cast<Evas_Lock*>(evas_key_lock_get(evas));
mouseMove.timestamp = ecore_loop_time_get();
mouseMove.event_flags = EVAS_EVENT_FLAG_NONE;
mouseMove.dev = 0;
m_ewkView->webView()->sendMouseEvent(&mouseMove);
Evas_Event_Mouse_Down mouseDown;
mouseDown.button = 1;
mouseDown.output.x = mouseDown.canvas.x = position.x();
mouseDown.output.y = mouseDown.canvas.y = position.y();
mouseDown.data = 0;
mouseDown.modifiers = const_cast<Evas_Modifier*>(evas_key_modifier_get(evas));
mouseDown.locks = const_cast<Evas_Lock*>(evas_key_lock_get(evas));
mouseDown.flags = EVAS_BUTTON_NONE;
mouseDown.timestamp = ecore_loop_time_get();
mouseDown.event_flags = EVAS_EVENT_FLAG_NONE;
mouseDown.dev = 0;
m_ewkView->webView()->sendMouseEvent(&mouseDown);
Evas_Event_Mouse_Up mouseUp;
mouseUp.button = 1;
mouseUp.output.x = mouseUp.canvas.x = position.x();
mouseUp.output.y = mouseUp.canvas.y = position.y();
mouseUp.data = 0;
mouseUp.modifiers = const_cast<Evas_Modifier*>(evas_key_modifier_get(evas));
mouseUp.locks = const_cast<Evas_Lock*>(evas_key_lock_get(evas));
mouseUp.flags = EVAS_BUTTON_NONE;
mouseUp.timestamp = ecore_loop_time_get();
mouseUp.event_flags = EVAS_EVENT_FLAG_NONE;
mouseUp.dev = 0;
m_ewkView->webView()->sendMouseEvent(&mouseUp);
}
示例2: handleEwkViewMouseUp
Eina_Bool EwkView::handleEwkViewMouseUp(Ewk_View_Smart_Data* smartData, const Evas_Event_Mouse_Up* upEvent)
{
EwkView* self = toEwkView(smartData);
self->page()->handleMouseEvent(NativeWebMouseEvent(upEvent, self->webView()->transformFromScene(), self->transformToScreen()));
if (InputMethodContextEfl* inputMethodContext = self->inputMethodContext())
inputMethodContext->handleMouseUpEvent(upEvent);
return true;
}
示例3: handleEwkViewMouseMove
Eina_Bool EwkView::handleEwkViewMouseMove(Ewk_View_Smart_Data* smartData, const Evas_Event_Mouse_Move* moveEvent)
{
EwkView* self = toEwkView(smartData);
self->page()->handleMouseEvent(NativeWebMouseEvent(moveEvent, self->webView()->transformFromScene(), self->transformToScreen()));
return true;
}