本文整理汇总了C++中EwkView::wkPage方法的典型用法代码示例。如果您正苦于以下问题:C++ EwkView::wkPage方法的具体用法?C++ EwkView::wkPage怎么用?C++ EwkView::wkPage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EwkView
的用法示例。
在下文中一共展示了EwkView::wkPage方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: handleEvasObjectCalculate
void EwkView::handleEvasObjectCalculate(Evas_Object* evasObject)
{
Ewk_View_Smart_Data* smartData = toSmartData(evasObject);
ASSERT(smartData);
EwkView* self = toEwkView(smartData);
smartData->changed.any = false;
Evas_Coord x, y, width, height;
evas_object_geometry_get(evasObject, &x, &y, &width, &height);
if (smartData->changed.position) {
smartData->changed.position = false;
smartData->view.x = x;
smartData->view.y = y;
evas_object_move(smartData->image, x, y);
WKViewSetUserViewportTranslation(self->wkView(), x, y);
}
if (smartData->changed.size) {
smartData->changed.size = false;
smartData->view.w = width;
smartData->view.h = height;
WKViewSetSize(self->wkView(), WKSizeMake(width, height));
if (WKPageUseFixedLayout(self->wkPage()))
self->pageViewportController().didChangeViewportSize(self->size());
self->setNeedsSurfaceResize();
}
}
示例2: didChangeViewportAttributes
void ViewClientEfl::didChangeViewportAttributes(WKViewRef, WKViewportAttributesRef attributes, const void* clientInfo)
{
EwkView* ewkView = toEwkView(clientInfo);
ASSERT(WKPageUseFixedLayout(ewkView->wkPage()));
// FIXME: pageViewportController should accept WKViewportAttributesRef.
ewkView->pageViewportController().didChangeViewportAttributes(toImpl(attributes)->originalAttributes());
}
示例3: didRenderFrame
void ViewClientEfl::didRenderFrame(WKViewRef, WKSize contentsSize, WKRect coveredRect, const void* clientInfo)
{
EwkView* ewkView = toEwkView(clientInfo);
if (WKPageUseFixedLayout(ewkView->wkPage()))
ewkView->pageViewportController().didRenderFrame(toIntSize(contentsSize), toIntRect(coveredRect));
else
ewkView->scheduleUpdateDisplay();
}
示例4: didChangeContentsPosition
void ViewClientEfl::didChangeContentsPosition(WKViewRef, WKPoint position, const void* clientInfo)
{
EwkView* ewkView = toEwkView(clientInfo);
if (WKPageUseFixedLayout(ewkView->wkPage())) {
ewkView->pageViewportController().pageDidRequestScroll(toIntPoint(position));
return;
}
ewkView->scheduleUpdateDisplay();
}
示例5: didChangeContentsSize
void ViewClientEfl::didChangeContentsSize(WKViewRef, WKSize size, const void* clientInfo)
{
EwkView* ewkView = toEwkView(clientInfo);
if (WKPageUseFixedLayout(ewkView->wkPage()))
ewkView->pageViewportController().didChangeContentsSize(toIntSize(size));
else
ewkView->scheduleUpdateDisplay();
ewkView->smartCallback<ContentsSizeChanged>().call(size);
}
示例6: didChangeViewportAttributes
void ViewClientEfl::didChangeViewportAttributes(WKViewRef, WKViewportAttributesRef attributes, const void* clientInfo)
{
EwkView* ewkView = toEwkView(clientInfo);
if (WKPageUseFixedLayout(ewkView->wkPage())) {
// FIXME: pageViewportController should accept WKViewportAttributesRef.
ewkView->pageViewportController().didChangeViewportAttributes(toImpl(attributes)->originalAttributes());
return;
}
ewkView->scheduleUpdateDisplay();
}
示例7: didCompletePageTransition
void ViewClientEfl::didCompletePageTransition(WKViewRef, const void* clientInfo)
{
EwkView* ewkView = toEwkView(clientInfo);
if (WKPageUseFixedLayout(ewkView->wkPage())) {
ewkView->pageViewportController().pageTransitionViewportReady();
return;
}
ewkView->scheduleUpdateDisplay();
}
示例8: didChangeContentsSize
void ViewClientEfl::didChangeContentsSize(WKViewRef, WKSize size, const void* clientInfo)
{
EwkView* ewkView = toEwkView(clientInfo);
if (WKPageUseFixedLayout(ewkView->wkPage()))
#if USE(ACCELERATED_COMPOSITING)
ewkView->pageViewportController().didChangeContentsSize(toIntSize(size));
#else
{ }
#endif
else
示例9: webProcessCrashed
void ViewClientEfl::webProcessCrashed(WKViewRef, WKURLRef url, const void* clientInfo)
{
EwkView* ewkView = toEwkView(clientInfo);
// Check if loading was ongoing, when web process crashed.
double loadProgress = WKPageGetEstimatedProgress(ewkView->wkPage());
if (loadProgress >= 0 && loadProgress < 1) {
loadProgress = 1;
ewkView->smartCallback<LoadProgress>().call(&loadProgress);
}
ewkView->smartCallback<TooltipTextUnset>().call();
bool handled = false;
ewkView->smartCallback<WebProcessCrashed>().call(&handled);
if (!handled) {
WKEinaSharedString urlString(url);
WARN("WARNING: The web process experienced a crash on '%s'.\n", static_cast<const char*>(urlString));
// Display an error page
ewk_view_html_string_load(ewkView->evasObject(), "The web process has crashed.", 0, urlString);
}
}