Drawing in a Widget



hi,

i like to known why doesn`t appear a rectangle inside
the widget window  in the follow small code . 

#include <gtk/gtk.h>

int main(int argc, char **argv)
{
        GtkWidget *window;

        gtk_init(&argc, &argv);

        window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
        gtk_widget_set_usize(window, 100, 100);
        gtk_widget_realize(window);

        gdk_draw_rectangle(window->window, window->style->fg_gc[GTK_WIDGET_STATE(window)], 1, 1, 1, 20, 20);

        gtk_widget_show(window);

        gtk_main();
}                                                             

thanks

-- 
Fabiano Fantini Vitale <ffv@conectiva.com.br>
Conectiva S.A.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]