Re: Minimal ev-view and ev-document app in C



El jue, 16-04-2009 a las 11:55 -0400, Jose Aliste escribió:
> 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).

take a look at the evince-previewer code:

http://svn.gnome.org/viewvc/evince/trunk/previewer/

> 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;
> }
> 

what's exactly the problem? you should probably call
ev_view_set_screen_dpi() before ev_view_set_document()

> Greetings, thanks in advance
> Jose

-- 
Carlos Garcia Campos
   elkalmail yahoo es
   carlosgc gnome org
   http://carlosgc.linups.org
PGP key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x523E6462

Attachment: signature.asc
Description: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada digitalmente



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