Enlightenment CVS committal Author : doursse Project : e17 Module : proto/epdf
Dir : e17/proto/epdf/src/bin Modified Files: Makefile.am epdf_evas_test.c Log Message: * configure.in: * src/bin/Makefile.am: * src/lib/Makefile.am: * src/plugins/epsilon/Makefile.am: * src/plugins/ewl/Makefile.am: make epdf work on Windows. Add libtool versioning. Check poppler 0.5.9 instead of 0.6. configure fails if the xpdf headers are not found. Add options to configure to disable ewl or etk. * src/lib/poppler_index.cpp: remove useless header. * src/bin/epdf_evas_test.c: (main): if software_x11 is not found, use software_ddraw. =================================================================== RCS file: /cvs/e/e17/proto/epdf/src/bin/Makefile.am,v retrieving revision 1.5 retrieving revision 1.6 diff -u -3 -r1.5 -r1.6 --- Makefile.am 7 Jul 2007 16:12:08 -0000 1.5 +++ Makefile.am 6 Oct 2007 18:22:34 -0000 1.6 @@ -11,7 +11,7 @@ INCLUDES = \ -I$(top_srcdir)/src/lib \ [EMAIL PROTECTED]@ [EMAIL PROTECTED]@ @EPDF_CFLAGS@ bin_PROGRAMS = epdf_evas_test epdf_esmart_test $(EPDF_EWL_TEST) $(EPDF_ETK_TEST) @@ -20,14 +20,14 @@ epdf_evas_test_LDADD = \ $(top_builddir)/src/lib/libepdf.la \ - $(EPDF_LIBS) + $(EPDF_LIBS) $(ECORE_EVAS_LIBS) epdf_esmart_test_SOURCES = \ epdf_esmart_test.c epdf_esmart_test_LDADD = \ $(top_builddir)/src/lib/libepdf.la \ - $(EPDF_LIBS) + $(EPDF_LIBS) $(ECORE_EVAS_LIBS) epdf_ewl_test_SOURCES = \ epdf_ewl_test.c =================================================================== RCS file: /cvs/e/e17/proto/epdf/src/bin/epdf_evas_test.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -3 -r1.7 -r1.8 --- epdf_evas_test.c 30 Aug 2007 14:26:08 -0000 1.7 +++ epdf_evas_test.c 6 Oct 2007 18:22:34 -0000 1.8 @@ -27,27 +27,27 @@ if (argc < 3) { printf ("\nUsage: %s filename page_number\n\n", argv[0]); - exit (-1); + return EXIT_FAILURE; } document = epdf_document_new (argv[1]); if (!document) { printf ("Bad pdf file\n"); - exit (-1); + return EXIT_FAILURE; } sscanf (argv[2], "%d", &page_number); if (page_number >= epdf_document_page_count_get (document)) { printf ("Page number exceeds the page count of the PDF document\n"); epdf_document_delete (document); - exit (-1); + return EXIT_FAILURE; } page = epdf_page_new (document, page_number); if (!page) { printf ("Bad page\n"); epdf_document_delete (document); - exit (-1); + return EXIT_FAILURE; } document_info_print (document, page); @@ -55,16 +55,28 @@ if (!evas_init()) return -1; if (!ecore_init()) { evas_shutdown (); - return -1; + return EXIT_FAILURE; } if (!ecore_evas_init()) { evas_shutdown (); ecore_shutdown (); - return -1; + return EXIT_FAILURE; } ee = ecore_evas_software_x11_new (NULL, 0, 0, 0, 600, 850); + /* these tests can be improved... */ + if (!ee) { + printf ("Can not find Software X11 engine. Trying DirectDraw engine...\n"); + ee = ecore_evas_software_ddraw_new (NULL, 0, 0, 600, 850); + if (!ee) { + printf ("Can not find Software X11 engine. Trying DirectDraw engine...\n"); + printf ("Exiting...\n"); + evas_shutdown (); + ecore_shutdown (); + return EXIT_FAILURE; + } + } ecore_event_handler_add (ECORE_EVENT_SIGNAL_EXIT, app_signal_exit, NULL); ecore_evas_callback_delete_request_set (ee, app_delete_request); ecore_evas_title_set (ee, "Evas Pdf Test"); @@ -92,7 +104,7 @@ ecore_shutdown (); evas_shutdown (); - return 0; + return EXIT_SUCCESS; } static void display_index (Epdf_Document *document, Ecore_List *children, int n) ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs