您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ webkit_web_frame_get_web_view函数代码示例

51自学网 2021-06-03 09:54:33
  C++
这篇教程C++ webkit_web_frame_get_web_view函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中webkit_web_frame_get_web_view函数的典型用法代码示例。如果您正苦于以下问题:C++ webkit_web_frame_get_web_view函数的具体用法?C++ webkit_web_frame_get_web_view怎么用?C++ webkit_web_frame_get_web_view使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了webkit_web_frame_get_web_view函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: zoomPageOutCallback

static JSValueRef zoomPageOutCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception){    WebKitWebView* view = webkit_web_frame_get_web_view(mainFrame);    if (!view)        return JSValueMakeUndefined(context);    webkit_web_view_zoom_out(view);    return JSValueMakeUndefined(context);}
开发者ID:flwh,项目名称:Alcatel_OT_985_kernel,代码行数:9,


示例2: webkit_web_frame_get_web_view

GtkClipboard* PasteboardHelperGtk::getCurrentTarget(Frame* frame) const{    WebKitWebView* webView = webkit_web_frame_get_web_view(kit(frame));    if (webkit_web_view_use_primary_for_paste(webView))        return getPrimary(frame);    else        return getClipboard(frame);}
开发者ID:flwh,项目名称:Alcatel_OT_985_kernel,代码行数:9,


示例3: WEBKIT_WEB_VIEW

void LayoutTestController::setMockGeolocationError(int code, JSStringRef message){    WebKitWebView* view = WEBKIT_WEB_VIEW(g_slist_nth_data(webViewList, 0));    if (!view)        view = webkit_web_frame_get_web_view(mainFrame);    ASSERT(view);    GOwnPtr<gchar> cMessage(JSStringCopyUTF8CString(message));    DumpRenderTreeSupportGtk::setMockGeolocationError(view, code, cMessage.get());}
开发者ID:Spencerx,项目名称:webkit,代码行数:10,


示例4: setGeolocationPermissionCommon

void LayoutTestController::setGeolocationPermission(bool allow){    setGeolocationPermissionCommon(allow);    WebKitWebView* view = WEBKIT_WEB_VIEW(g_slist_nth_data(webViewList, 0));    if (!view)        view = webkit_web_frame_get_web_view(mainFrame);    ASSERT(view);    DumpRenderTreeSupportGtk::setMockGeolocationPermission(view, allow);}
开发者ID:Spencerx,项目名称:webkit,代码行数:10,


示例5: webkit_web_frame_get_web_view

void LayoutTestController::setJavaScriptProfilingEnabled(bool flag){    WebKitWebView* view = webkit_web_frame_get_web_view(mainFrame);    ASSERT(view);    setDeveloperExtrasEnabled(flag);    WebKitWebInspector* inspector = webkit_web_view_get_inspector(view);    g_object_set(G_OBJECT(inspector), "javascript-profiling-enabled", flag, NULL);}
开发者ID:Spencerx,项目名称:webkit,代码行数:10,


示例6: webkit_web_frame_get_web_view

AccessibilityUIElement AccessibilityController::rootElement(){    WebKitWebView* view = webkit_web_frame_get_web_view(mainFrame);    // The presumed, desired rootElement is the parent of the web view.    GtkWidget* webViewParent = gtk_widget_get_parent(GTK_WIDGET(view));    AtkObject* axObject = gtk_widget_get_accessible(webViewParent);     return AccessibilityUIElement(axObject);}
开发者ID:UIKit0,项目名称:WebkitAIR,代码行数:10,


示例7: mouseDownCallback

static JSValueRef mouseDownCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception){    WebKitWebView* view = webkit_web_frame_get_web_view(mainFrame);    if (!view)        return JSValueMakeUndefined(context);    down = true;    GdkEvent event;    memset(&event, 0, sizeof(event));    event.type = GDK_BUTTON_PRESS;    event.button.button = 1;    if (argumentCount == 1) {        event.button.button = (int)JSValueToNumber(context, arguments[0], exception) + 1;        g_return_val_if_fail((!exception || !*exception), JSValueMakeUndefined(context));    }    currentEventButton = event.button.button;    event.button.x = lastMousePositionX;    event.button.y = lastMousePositionY;    event.button.window = GTK_WIDGET(view)->window;    event.button.time = GDK_CURRENT_TIME;    event.button.device = gdk_device_get_core_pointer();    int x_root, y_root;#if GTK_CHECK_VERSION(2,17,3)    gdk_window_get_root_coords(GTK_WIDGET(view)->window, lastMousePositionX, lastMousePositionY, &x_root, &y_root);#else    getRootCoords(GTK_WIDGET(view), &x_root, &y_root);#endif    event.button.x_root = x_root;    event.button.y_root = y_root;    updateClickCount(event.button.button);    if (!msgQueue[endOfQueue].delay) {        webkit_web_frame_layout(mainFrame);        gboolean return_val;        g_signal_emit_by_name(view, "button_press_event", &event, &return_val);        if (clickCount == 2) {            event.type = GDK_2BUTTON_PRESS;            g_signal_emit_by_name(view, "button_press_event", &event, &return_val);        }    } else {        // replaySavedEvents should have the required logic to make leapForward delays work        msgQueue[endOfQueue++].event = event;        replaySavedEvents();    }    return JSValueMakeUndefined(context);}
开发者ID:flwh,项目名称:Alcatel_OT_985_kernel,代码行数:55,


示例8: originalName

void LayoutTestController::overridePreference(JSStringRef key, JSStringRef value){    GOwnPtr<gchar> originalName(JSStringCopyUTF8CString(key));    GOwnPtr<gchar> valueAsString(JSStringCopyUTF8CString(value));    WebKitWebView* view = webkit_web_frame_get_web_view(mainFrame);    ASSERT(view);    // This transformation could be handled by a hash table (and it once was), but    // having it prominent, makes it easier for people from other ports to keep the    // list up to date.    const gchar* propertyName = 0;    if (g_str_equal(originalName.get(), "WebKitJavaScriptEnabled"))        propertyName = "enable-scripts";    else if (g_str_equal(originalName.get(), "WebKitDefaultFontSize"))        propertyName = "default-font-size";    else if (g_str_equal(originalName.get(), "WebKitEnableCaretBrowsing"))        propertyName = "enable-caret-browsing";    else if (g_str_equal(originalName.get(), "WebKitUsesPageCachePreferenceKey"))        propertyName = "enable-page-cache";    else if (g_str_equal(originalName.get(), "WebKitPluginsEnabled"))        propertyName = "enable-plugins";    else if (g_str_equal(originalName.get(), "WebKitHyperlinkAuditingEnabled"))        propertyName = "enable-hyperlink-auditing";    else if (g_str_equal(originalName.get(), "WebKitWebGLEnabled"))        propertyName = "enable-webgl";    else if (g_str_equal(originalName.get(), "WebKitTabToLinksPreferenceKey")) {        DumpRenderTreeSupportGtk::setLinksIncludedInFocusChain(!g_ascii_strcasecmp(valueAsString.get(), "true") || !g_ascii_strcasecmp(valueAsString.get(), "1"));        return;    } else {        fprintf(stderr, "LayoutTestController::overridePreference tried to override "                "unknown preference '%s'./n", originalName.get());        return;    }    WebKitWebSettings* settings = webkit_web_view_get_settings(view);    GParamSpec* pspec = g_object_class_find_property(G_OBJECT_CLASS(        WEBKIT_WEB_SETTINGS_GET_CLASS(settings)), propertyName);    GValue currentPropertyValue = { 0, { { 0 } } };    g_value_init(&currentPropertyValue, pspec->value_type);    if (G_VALUE_HOLDS_STRING(&currentPropertyValue))        g_object_set(settings, propertyName, valueAsString.get(), NULL);    else if (G_VALUE_HOLDS_BOOLEAN(&currentPropertyValue))        g_object_set(G_OBJECT(settings), propertyName, !g_ascii_strcasecmp(valueAsString.get(), "true")                        || !g_ascii_strcasecmp(valueAsString.get(), "1"), NULL);    else if (G_VALUE_HOLDS_INT(&currentPropertyValue))        g_object_set(G_OBJECT(settings), propertyName, atoi(valueAsString.get()), NULL);    else if (G_VALUE_HOLDS_FLOAT(&currentPropertyValue)) {        gfloat newValue = g_ascii_strtod(valueAsString.get(), 0);        g_object_set(G_OBJECT(settings), propertyName, newValue, NULL);    } else        fprintf(stderr, "LayoutTestController::overridePreference failed to override "                "preference '%s'./n", originalName.get());}
开发者ID:KDE,项目名称:android-qtwebkit,代码行数:55,


示例9: mouseUpCallback

static JSValueRef mouseUpCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception){    WebKitWebView* view = webkit_web_frame_get_web_view(mainFrame);    if (!view)        return JSValueMakeUndefined(context);    GdkEvent event;    memset(&event, 0, sizeof(event));    event.type = GDK_BUTTON_RELEASE;    event.button.button = 1;    if (argumentCount == 1) {        event.button.button = (int)JSValueToNumber(context, arguments[0], exception) + 1;        g_return_val_if_fail((!exception || !*exception), JSValueMakeUndefined(context));    }    currentEventButton = event.button.button;    event.button.x = lastMousePositionX;    event.button.y = lastMousePositionY;    event.button.window = GTK_WIDGET(view)->window;    event.button.time = GDK_CURRENT_TIME;    event.button.device = gdk_device_get_core_pointer();    event.button.state = getStateFlags();    down = false;    int x_root, y_root;#if GTK_CHECK_VERSION(2,17,3)    gdk_window_get_root_coords(GTK_WIDGET(view)->window, lastMousePositionX, lastMousePositionY, &x_root, &y_root);#else    getRootCoords(GTK_WIDGET(view), &x_root, &y_root);#endif    event.button.x_root = x_root;    event.button.y_root = y_root;    if ((dragMode && !replayingSavedEvents) || msgQueue[endOfQueue].delay) {        msgQueue[endOfQueue].event = event;        msgQueue[endOfQueue++].isDragEvent = true;        replaySavedEvents();    } else {        webkit_web_frame_layout(mainFrame);        gboolean return_val;        g_signal_emit_by_name(view, "button_release_event", &event, &return_val);    }    lastClickPositionX = lastMousePositionX;    lastClickPositionY = lastMousePositionY;    return JSValueMakeUndefined(context);}
开发者ID:flwh,项目名称:Alcatel_OT_985_kernel,代码行数:54,


示例10: webkit_web_frame_get_web_view

bool BackForwardItem::invoke() const{    WebKitWebView* webView = webkit_web_frame_get_web_view(mainFrame);    if (m_howFar == 1)        webkit_web_view_go_forward(webView);    else if (m_howFar == -1)        webkit_web_view_go_back(webView);    else {        WebKitWebBackForwardList* webBackForwardList = webkit_web_view_get_back_forward_list(webView);        WebKitWebHistoryItem* item = webkit_web_back_forward_list_get_nth_item(webBackForwardList, m_howFar);        webkit_web_view_go_to_back_forward_item(webView, item);    }    return true;}
开发者ID:325116067,项目名称:semc-qsd8x50,代码行数:14,


示例11: webkit_web_frame_get_web_view

void TestRunner::setPageVisibility(const char* visibility){    WebKitWebView* webView = webkit_web_frame_get_web_view(mainFrame);    String visibilityString(visibility);    WebCore::PageVisibilityState visibilityState = WebCore::PageVisibilityStateVisible;    if (visibilityString == "visible")        visibilityState = WebCore::PageVisibilityStateVisible;    else if (visibilityString == "hidden")        visibilityState = WebCore::PageVisibilityStateHidden;    else        return;    DumpRenderTreeSupportGtk::setPageVisibility(webView, visibilityState, false);}
开发者ID:MYSHLIFE,项目名称:webkit,代码行数:15,


示例12: writingDirection

void TestRunner::setTextDirection(JSStringRef direction){    GUniquePtr<gchar> writingDirection(JSStringCopyUTF8CString(direction));    WebKitWebView* view = webkit_web_frame_get_web_view(mainFrame);    ASSERT(view);    if (g_str_equal(writingDirection.get(), "auto"))        gtk_widget_set_direction(GTK_WIDGET(view), GTK_TEXT_DIR_NONE);    else if (g_str_equal(writingDirection.get(), "ltr"))        gtk_widget_set_direction(GTK_WIDGET(view), GTK_TEXT_DIR_LTR);    else if (g_str_equal(writingDirection.get(), "rtl"))        gtk_widget_set_direction(GTK_WIDGET(view), GTK_TEXT_DIR_RTL);    else        fprintf(stderr, "TestRunner::setTextDirection called with unknown direction: '%s'./n", writingDirection.get());}
开发者ID:MYSHLIFE,项目名称:webkit,代码行数:16,


示例13: mouseWheelToCallback

static JSValueRef mouseWheelToCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception){    WebKitWebView* view = webkit_web_frame_get_web_view(mainFrame);    if (!view)        return JSValueMakeUndefined(context);    if (argumentCount < 2)        return JSValueMakeUndefined(context);    int horizontal = (int)JSValueToNumber(context, arguments[0], exception);    g_return_val_if_fail((!exception || !*exception), JSValueMakeUndefined(context));    int vertical = (int)JSValueToNumber(context, arguments[1], exception);    g_return_val_if_fail((!exception || !*exception), JSValueMakeUndefined(context));    // GTK+ doesn't support multiple direction scrolls in the same event!    g_return_val_if_fail((!vertical || !horizontal), JSValueMakeUndefined(context));    GdkEvent event;    event.type = GDK_SCROLL;    event.scroll.x = lastMousePositionX;    event.scroll.y = lastMousePositionY;    event.scroll.time = GDK_CURRENT_TIME;    event.scroll.window = GTK_WIDGET(view)->window;    if (horizontal < 0)        event.scroll.direction = GDK_SCROLL_LEFT;    else if (horizontal > 0)        event.scroll.direction = GDK_SCROLL_RIGHT;    else if (vertical < 0)        event.scroll.direction = GDK_SCROLL_UP;    else if (vertical > 0)        event.scroll.direction = GDK_SCROLL_DOWN;    else        g_assert_not_reached();    if (dragMode && down && !replayingSavedEvents) {        msgQueue[endOfQueue].event = event;        msgQueue[endOfQueue++].isDragEvent = true;    } else {        webkit_web_frame_layout(mainFrame);        gtk_main_do_event(&event);    }    return JSValueMakeUndefined(context);}
开发者ID:flwh,项目名称:Alcatel_OT_985_kernel,代码行数:45,


示例14: selectedRangeCallback

static JSValueRef selectedRangeCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception){    WebKitWebView* view = webkit_web_frame_get_web_view(mainFrame);    if (!view)        return JSValueMakeUndefined(context);    int start, end;    if (!DumpRenderTreeSupportGtk::selectedRange(view, &start, &end))        return JSValueMakeUndefined(context);    JSValueRef arrayValues[2];    arrayValues[0] = JSValueMakeNumber(context, start);    arrayValues[1] = JSValueMakeNumber(context, end);    JSObjectRef arrayObject = JSObjectMakeArray(context, 2, arrayValues, exception);    g_return_val_if_fail((!exception || !*exception), JSValueMakeUndefined(context));    return arrayObject;}
开发者ID:wufuyue,项目名称:TCL_S820,代码行数:18,


示例15: replaySavedEvents

void replaySavedEvents(){    // FIXME: This doesn't deal with forward leaps, but it should.    WebKitWebView* view = webkit_web_frame_get_web_view(mainFrame);    if (!view)        return;    replayingSavedEvents = true;    for (unsigned queuePos = 0; queuePos < endOfQueue; queuePos++) {        GdkEvent event = msgQueue[queuePos].event;        gboolean return_val;        switch (event.type) {        case GDK_BUTTON_RELEASE:            g_signal_emit_by_name(view, "button_release_event", &event, &return_val);            break;        case GDK_BUTTON_PRESS:            g_signal_emit_by_name(view, "button_press_event", &event, &return_val);            break;        case GDK_MOTION_NOTIFY:            g_signal_emit_by_name(view, "motion_notify_event", &event, &return_val);            break;        default:            continue;        }        startOfQueue++;    }    int numQueuedMessages = endOfQueue - startOfQueue;    if (!numQueuedMessages) {        startOfQueue = 0;        endOfQueue = 0;        replayingSavedEvents = false;        return;    }    startOfQueue = 0;    endOfQueue = 0;    replayingSavedEvents = false;}
开发者ID:flwh,项目名称:Alcatel_OT_985_kernel,代码行数:44,



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


C++ webkit_web_view_get_back_forward_list函数代码示例
C++ webKitPlatformSupport函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。