Minimal ev-view and ev-document app in C



Hi List,

I am trying to do a toy app in C that embeds the EvView widget in it
with no luck. Can someone point me to a good minimal sample of how the
code looks? ( I tried to find doc in the net but it seems there isnt
any).

BTW, Here is what I'am trying to do. I am new to gtk in C, usually
code my small gtk apps  in python... So any pointers would be great!!


int main( int   argc, char *argv[] )
{
        GtkWidget *window;
        GtkWidget *evview;
        EvDocument *document;
        gtk_init (&argc, &argv);
        ev_init();

        window = gtk_window_new (GTK_WINDOW_TOPLEVEL);

        evview = ev_view_new();
        document =
ev_document_factory_get_document("file:////prueba.pdf",NULL);  // This
file does exists in my system.
        ev_view_set_document((EvView *) evview, document);

        gtk_container_add (GTK_CONTAINER (window), evview);

        gtk_widget_show (evview);
        gtk_widget_show (window);

        gtk_main ();

        return 0;
}


Greetings, thanks in advance
Jose


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