void ChromeClient::setWindowRect(const FloatRect& rect) { IntRect intrect = IntRect(rect); WebKitWebWindowFeatures* webWindowFeatures = webkit_web_view_get_window_features(m_webView); g_object_set(webWindowFeatures, "x", intrect.x(), "y", intrect.y(), "width", intrect.width(), "height", intrect.height(), NULL); gboolean autoResizeWindow; WebKitWebSettings* settings = webkit_web_view_get_settings(m_webView); g_object_get(settings, "auto-resize-window", &autoResizeWindow, NULL); if (!autoResizeWindow) return; GtkWidget* window = gtk_widget_get_toplevel(GTK_WIDGET(m_webView)); if (gtk_widget_is_toplevel(window)) { gtk_window_move(GTK_WINDOW(window), intrect.x(), intrect.y()); gtk_window_resize(GTK_WINDOW(window), intrect.width(), intrect.height()); } }
bool ChromeClient::scrollbarsVisible() { WebKitWebWindowFeatures* webWindowFeatures = webkit_web_view_get_window_features(m_webView); gboolean visible; g_object_get(webWindowFeatures, "scrollbar-visible", &visible, NULL); return visible; }
static gboolean _on_web_view_ready(WebKitWebView * view, gpointer data) { GHtml * ghtml; WebKitWebWindowFeatures * features; gboolean b; gint w; gint h; ghtml = g_object_get_data(G_OBJECT(data), "ghtml"); features = webkit_web_view_get_window_features(WEBKIT_WEB_VIEW(view)); /* FIXME track properties with notify:: instead */ g_object_get(G_OBJECT(features), "width", &w, "height", &h, NULL); if(w > 0 && h > 0) surfer_resize(ghtml->surfer, w, h); g_object_get(G_OBJECT(features), "fullscreen", &b, NULL); if(b == TRUE) surfer_set_fullscreen(ghtml->surfer, TRUE); # ifndef EMBEDDED g_object_get(G_OBJECT(features), "menubar-visible", &b, NULL); surfer_show_menubar(ghtml->surfer, b); # endif g_object_get(G_OBJECT(features), "toolbar-visible", &b, NULL); surfer_show_toolbar(ghtml->surfer, b); g_object_get(G_OBJECT(features), "statusbar-visible", &b, NULL); surfer_show_statusbar(ghtml->surfer, b); surfer_show_window(ghtml->surfer, TRUE); return FALSE; }
JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1get_1window_1features) (JNIEnv *env, jclass that, jintLong arg0) { jintLong rc = 0; WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1view_1get_1window_1features_FUNC); rc = (jintLong)webkit_web_view_get_window_features((WebKitWebView *)arg0); WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1view_1get_1window_1features_FUNC); return rc; }
void ChromeClient::setWindowRect(const FloatRect& rect) { IntRect intrect = IntRect(rect); WebKitWebWindowFeatures* webWindowFeatures = webkit_web_view_get_window_features(m_webView); g_object_set(webWindowFeatures, "x", intrect.x(), "y", intrect.y(), "width", intrect.width(), "height", intrect.height(), NULL); }
void ChromeClient::setMenubarVisible(bool visible) { WebKitWebWindowFeatures* webWindowFeatures = webkit_web_view_get_window_features(m_webView); g_object_set(webWindowFeatures, "menubar-visible", visible, NULL); }