当前位置: 首页>>代码示例>>C++>>正文


C++ EwkView::wkPage方法代码示例

本文整理汇总了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();
    }
}
开发者ID:cheekiatng,项目名称:webkit,代码行数:32,代码来源:EwkView.cpp

示例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());
}
开发者ID:cheekiatng,项目名称:webkit,代码行数:8,代码来源:ViewClientEfl.cpp

示例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();
}
开发者ID:cheekiatng,项目名称:webkit,代码行数:8,代码来源:ViewClientEfl.cpp

示例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();
}
开发者ID:Wrichik1999,项目名称:webkit,代码行数:10,代码来源:ViewClientEfl.cpp

示例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);
}
开发者ID:Wrichik1999,项目名称:webkit,代码行数:10,代码来源:ViewClientEfl.cpp

示例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();
}
开发者ID:Wrichik1999,项目名称:webkit,代码行数:10,代码来源:ViewClientEfl.cpp

示例7: didCompletePageTransition

void ViewClientEfl::didCompletePageTransition(WKViewRef, const void* clientInfo)
{
    EwkView* ewkView = toEwkView(clientInfo);
    if (WKPageUseFixedLayout(ewkView->wkPage())) {
        ewkView->pageViewportController().pageTransitionViewportReady();
        return;
    }

    ewkView->scheduleUpdateDisplay();
}
开发者ID:Wrichik1999,项目名称:webkit,代码行数:10,代码来源:ViewClientEfl.cpp

示例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
开发者ID:Happy-Ferret,项目名称:webkit.js,代码行数:10,代码来源:ViewClientEfl.cpp

示例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);
    }
}
开发者ID:Wrichik1999,项目名称:webkit,代码行数:24,代码来源:ViewClientEfl.cpp


注:本文中的EwkView::wkPage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。