[Webkit-unassigned] [Bug 17154] [GTK] Widget size negotiation

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Feb 2 13:41:56 PST 2008


http://bugs.webkit.org/show_bug.cgi?id=17154





------- Comment #4 from alp at atoker.com  2008-02-02 13:41 PDT -------
Improved comparative test-case:

/* gcc -Wall `pkg-config --cflags --libs webkit-1.0` size-test.c */

/* This manual test constructs two top level windows for size request and
 * look-and-feel comparisons between the native GTK+ TextView and WebKit's
 * WebView.
 */

#include <gtk/gtk.h>
#include <webkit/webkit.h>

int
main (int argc, char *argv[])
{
    gtk_init (&argc, &argv);

    GtkWidget *view;
    GtkWidget *window;

    // Construct a Window with a WebView
    view = webkit_web_view_new ();
    webkit_web_view_set_editable (WEBKIT_WEB_VIEW (view), TRUE);
    window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
    gtk_window_set_title (GTK_WINDOW (window), "WebView");
    gtk_container_add (GTK_CONTAINER (window), GTK_WIDGET (view));
    gchar *uri = (gchar *) (argc > 1 ? argv[1] : "about:blank");
    webkit_web_view_open (WEBKIT_WEB_VIEW (view), uri);
    gtk_widget_show_all (window);

    // Construct a Window with a TextView
    view = gtk_text_view_new ();
    window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
    gtk_window_set_title (GTK_WINDOW (window), "TextView");
    gtk_container_add (GTK_CONTAINER (window), GTK_WIDGET (view));
    gtk_widget_show_all (window);

    gtk_main ();
    return 0;
}


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list