⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 webkitwebwindowfeatures.cpp

📁 linux下开源浏览器WebKit的源码,市面上的很多商用浏览器都是移植自WebKit
💻 CPP
📖 第 1 页 / 共 2 页
字号:
                                    flags));    /**     * WebKitWebWindowFeatures:menubar-visible:     *     * Controls whether the menubar should be visible for the window.     *     * Since: 1.0.3     */    g_object_class_install_property(gobject_class,                                    PROP_MENUBAR_VISIBLE,                                    g_param_spec_boolean(                                    "menubar-visible",                                    "Menubar Visible",                                    "Controls whether the menubar should be visible for the window.",                                    TRUE,                                    flags));    /**     * WebKitWebWindowFeatures:locationbar-visible:     *     * Controls whether the locationbar should be visible for the window.     *     * Since: 1.0.3     */    g_object_class_install_property(gobject_class,                                    PROP_LOCATIONBAR_VISIBLE,                                    g_param_spec_boolean(                                    "locationbar-visible",                                    "Locationbar Visible",                                    "Controls whether the locationbar should be visible for the window.",                                    TRUE,                                    flags));    /**     * WebKitWebWindowFeatures:fullscreen:     *     * Controls whether window will be displayed fullscreen.     *     * Since: 1.0.3     */    g_object_class_install_property(gobject_class,                                    PROP_FULLSCREEN,                                    g_param_spec_boolean(                                    "fullscreen",                                    "Fullscreen",                                    "Controls whether window will be displayed fullscreen.",                                    FALSE,                                    flags));    g_type_class_add_private(klass, sizeof(WebKitWebWindowFeaturesPrivate));}static void webkit_web_window_features_init(WebKitWebWindowFeatures* web_window_features){    web_window_features->priv = WEBKIT_WEB_WINDOW_FEATURES_GET_PRIVATE(web_window_features);}static void webkit_web_window_features_set_property(GObject* object, guint prop_id, const GValue* value, GParamSpec* pspec){    WebKitWebWindowFeatures* web_window_features = WEBKIT_WEB_WINDOW_FEATURES(object);    WebKitWebWindowFeaturesPrivate* priv = web_window_features->priv;    switch(prop_id) {    case PROP_X:        priv->x = g_value_get_int(value);        break;    case PROP_Y:        priv->y = g_value_get_int(value);        break;    case PROP_WIDTH:        priv->width = g_value_get_int(value);        break;    case PROP_HEIGHT:        priv->height = g_value_get_int(value);        break;    case PROP_TOOLBAR_VISIBLE:        priv->toolbar_visible = g_value_get_boolean(value);        break;    case PROP_STATUSBAR_VISIBLE:        priv->statusbar_visible = g_value_get_boolean(value);        break;    case PROP_SCROLLBAR_VISIBLE:        priv->scrollbar_visible = g_value_get_boolean(value);        break;    case PROP_MENUBAR_VISIBLE:        priv->menubar_visible = g_value_get_boolean(value);        break;    case PROP_LOCATIONBAR_VISIBLE:        priv->locationbar_visible = g_value_get_boolean(value);        break;    case PROP_FULLSCREEN:        priv->fullscreen = g_value_get_boolean(value);        break;    default:        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);        break;    }}static void webkit_web_window_features_get_property(GObject* object, guint prop_id, GValue* value, GParamSpec* pspec){    WebKitWebWindowFeatures* web_window_features = WEBKIT_WEB_WINDOW_FEATURES(object);    WebKitWebWindowFeaturesPrivate* priv = web_window_features->priv;    switch (prop_id) {    case PROP_X:        g_value_set_int(value, priv->x);        break;    case PROP_Y:        g_value_set_int(value, priv->y);        break;    case PROP_WIDTH:        g_value_set_int(value, priv->width);        break;    case PROP_HEIGHT:        g_value_set_int(value, priv->height);        break;    case PROP_TOOLBAR_VISIBLE:        g_value_set_boolean(value, priv->toolbar_visible);        break;    case PROP_STATUSBAR_VISIBLE:        g_value_set_boolean(value, priv->statusbar_visible);        break;    case PROP_SCROLLBAR_VISIBLE:        g_value_set_boolean(value, priv->scrollbar_visible);        break;    case PROP_MENUBAR_VISIBLE:        g_value_set_boolean(value, priv->menubar_visible);        break;    case PROP_LOCATIONBAR_VISIBLE:        g_value_set_boolean(value, priv->locationbar_visible);        break;    case PROP_FULLSCREEN:        g_value_set_boolean(value, priv->fullscreen);        break;    default:        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);        break;    }}/** * webkit_web_window_features_new: * * Creates a new #WebKitWebWindowFeatures instance with default values. It must * be manually attached to a WebView. * * Returns: a new #WebKitWebWindowFeatures instance * * Since 1.0.3 */WebKitWebWindowFeatures* webkit_web_window_features_new(){    return WEBKIT_WEB_WINDOW_FEATURES(g_object_new(WEBKIT_TYPE_WEB_WINDOW_FEATURES, NULL));}// for internal use onlyWebKitWebWindowFeatures* webkit_web_window_features_new_from_core_features(const WebCore::WindowFeatures& features){    WebKitWebWindowFeatures *webWindowFeatures = webkit_web_window_features_new();    if(features.xSet)        g_object_set(webWindowFeatures, "x", static_cast<int>(features.x), NULL);    if(features.ySet)        g_object_set(webWindowFeatures, "y", static_cast<int>(features.y), NULL);    if(features.widthSet)        g_object_set(webWindowFeatures, "width", static_cast<int>(features.width), NULL);    if(features.heightSet)        g_object_set(webWindowFeatures, "height", static_cast<int>(features.height), NULL);    g_object_set(webWindowFeatures,                 "toolbar-visible", features.toolBarVisible,                 "statusbar-visible", features.statusBarVisible,                 "scrollbar-visible", features.scrollbarsVisible,                 "menubar-visible", features.menuBarVisible,                 "locationbar-visible", features.locationBarVisible,                 "fullscreen", features.fullscreen,                 NULL);    return webWindowFeatures;}/** * webkit_web_window_features_equal: * @features1: a #WebKitWebWindowFeatures instance * @features2: another #WebKitWebWindowFeatures instance * * Decides if a #WebKitWebWindowFeatures instance equals another, as * in has the same values. * * Returns: %TRUE if the instances have the same values, %FALSE * otherwise * * Since 1.0.3 */gboolean webkit_web_window_features_equal(WebKitWebWindowFeatures* features1, WebKitWebWindowFeatures* features2){    WebKitWebWindowFeaturesPrivate* priv1 = features1->priv;    WebKitWebWindowFeaturesPrivate* priv2 = features2->priv;    if((priv1->x == priv2->x) &&       (priv1->y == priv2->y) &&       (priv1->width == priv2->width) &&       (priv1->height == priv2->height) &&       (priv1->toolbar_visible == priv2->toolbar_visible) &&       (priv1->statusbar_visible == priv2->statusbar_visible) &&       (priv1->scrollbar_visible == priv2->scrollbar_visible) &&       (priv1->menubar_visible == priv2->menubar_visible) &&       (priv1->locationbar_visible == priv2->locationbar_visible) &&       (priv1->fullscreen == priv2->fullscreen))        return TRUE;    return FALSE;}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -