Enlightenment CVS committal Author : doursse Project : e17 Module : proto/epdf
Dir : e17/proto/epdf/src/bin Modified Files: epdf_esmart_test.c epdf_evas_test.c epdf_ewl_test.c Log Message: rename poppler* files to epdf* files. remove poppler 0.4 support (too old) * configure.in: add __attribute__ check * src/bin/epdf_esmart_test.c: (main), (app_resize): * src/bin/epdf_evas_test.c: (main), (document_info_print): * src/bin/epdf_ewl_test.c: (_tree_fill), (main), (_change_page_cb): * src/lib/Epdf.h: * src/lib/Makefile.am: * src/lib/esmart_pdf.c: (esmart_pdf_init), (esmart_pdf_file_set), (esmart_pdf_page_set), (esmart_pdf_page_get), (esmart_pdf_size_get), (esmart_pdf_orientation_set), (esmart_pdf_orientation_get), (esmart_pdf_scale_set), (esmart_pdf_scale_get), (esmart_pdf_page_next), (esmart_pdf_page_previous), (esmart_pdf_pdf_document_get), (esmart_pdf_pdf_page_get), (esmart_pdf_pdf_index_get), (esmart_pdf_render), (_smart_clip_unset): * src/lib/esmart_pdf.h: * src/lib/etk_pdf.c: (etk_pdf_file_set), (etk_pdf_page_set), (etk_pdf_page_get), (etk_pdf_size_get), (etk_pdf_orientation_set), (etk_pdf_orientation_get), (etk_pdf_scale_set), (etk_pdf_scale_get), (etk_pdf_page_next), (etk_pdf_page_previous), (etk_pdf_pdf_document_get), (etk_pdf_pdf_page_get), (etk_pdf_pdf_index_get), (_etk_pdf_constructor), (_etk_pdf_realize_cb), (_etk_pdf_unrealize_cb), (_etk_pdf_load): * src/lib/etk_pdf.h: * src/lib/ewl_pdf.c: (ewl_pdf_init), (ewl_pdf_file_set), (ewl_pdf_file_get), (ewl_pdf_page_set), (ewl_pdf_page_get), (ewl_pdf_pdf_size_get), (ewl_pdf_orientation_set), (ewl_pdf_orientation_get), (ewl_pdf_scale_set), (ewl_pdf_scale_get), (ewl_pdf_page_next), (ewl_pdf_page_previous), (ewl_pdf_search_next), (ewl_pdf_pdf_document_get), (ewl_pdf_pdf_page_get), (ewl_pdf_pdf_index_get), (ewl_pdf_configure_cb), (ewl_pdf_reveal_cb): * src/lib/ewl_pdf.h: * src/plugins/epsilon/epsilon_thumbnailer.c: (epsilon_generate_thumb): big fat API break. Add epdf_page_render_slice to render only a part of a page. epdf_page_render renders the whole page. *_set functions change the epdf context only. epdf_page_render will use that context. =================================================================== RCS file: /cvs/e/e17/proto/epdf/src/bin/epdf_esmart_test.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- epdf_esmart_test.c 15 Nov 2007 05:04:20 -0000 1.3 +++ epdf_esmart_test.c 20 Apr 2008 21:58:17 -0000 1.4 @@ -49,7 +49,7 @@ ecore_evas_name_class_set(ee, "esmart_pdf_test", "test_esmart_pdf"); ecore_evas_callback_resize_set(ee, app_resize); ecore_evas_show(ee); - + evas = ecore_evas_get(ee); bg = evas_object_rectangle_add(evas); @@ -67,12 +67,12 @@ } esmart_pdf_file_set (o, filename); esmart_pdf_page_set (o, page_number); - esmart_pdf_scale_set (o, 0.5, 0.5); + esmart_pdf_render (o); evas_object_move (o, 0, 0); evas_object_show (o); ecore_main_loop_begin (); - + ecore_evas_shutdown (); ecore_shutdown (); evas_shutdown (); @@ -86,7 +86,7 @@ Evas_Coord w, h; Evas *evas; Evas_Object *bg; - + evas = ecore_evas_get(ee); evas_output_viewport_get(evas, NULL, NULL, &w, &h); bg = ecore_evas_data_get(ee, "bg"); =================================================================== RCS file: /cvs/e/e17/proto/epdf/src/bin/epdf_evas_test.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -3 -r1.8 -r1.9 --- epdf_evas_test.c 6 Oct 2007 18:22:34 -0000 1.8 +++ epdf_evas_test.c 20 Apr 2008 21:58:17 -0000 1.9 @@ -43,12 +43,13 @@ return EXIT_FAILURE; } - page = epdf_page_new (document, page_number); + page = epdf_page_new (document); if (!page) { printf ("Bad page\n"); epdf_document_delete (document); return EXIT_FAILURE; } + epdf_page_page_set (page, page_number); document_info_print (document, page); @@ -88,10 +89,7 @@ o = evas_object_image_add (evas); evas_object_move (o, 0, 0); - epdf_page_render (page, o, - EPDF_PAGE_ORIENTATION_PORTRAIT, - 0, 0, -1, -1, - 1.0, 1.0); + epdf_page_render (page, o); evas_object_show (o); ecore_evas_resize (ee, epdf_page_width_get (page), epdf_page_height_get (page)); @@ -154,6 +152,7 @@ char *mod_date; const char *page_mode; const char *page_layout; + const char *orientation; printf ("\n"); printf (" Poppler version....: %s\n", epdf_poppler_version_get ()); @@ -235,9 +234,24 @@ printf (" Page Properties:\n"); printf ("\n"); - printf (" Number.............: %d\n", epdf_page_number_get (page)); + printf (" Number.............: %d\n", epdf_page_page_get (page)); printf (" Size (pixels)......: %d x %d\n", epdf_page_width_get (page), epdf_page_height_get (page)); - printf (" Orientation........: %s\n", epdf_page_orientation_name_get (page)); + switch (epdf_page_orientation_get (page)) + { + case EPDF_PAGE_ORIENTATION_PORTRAIT: + orientation = "portrait"; + break; + case EPDF_PAGE_ORIENTATION_LANDSCAPE: + orientation = "landscape"; + break; + case EPDF_PAGE_ORIENTATION_UPSIDEDOWN: + orientation = "upside down"; + break; + case EPDF_PAGE_ORIENTATION_SEASCAPE: + orientation = "seascape"; + break; + } + printf (" Orientation........: %s\n", orientation); printf ("\n"); =================================================================== RCS file: /cvs/e/e17/proto/epdf/src/bin/epdf_ewl_test.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -3 -r1.10 -r1.11 --- epdf_ewl_test.c 27 Jan 2008 05:47:55 -0000 1.10 +++ epdf_ewl_test.c 20 Apr 2008 21:58:17 -0000 1.11 @@ -48,7 +48,7 @@ free (data); return NULL; } - + ecore_list_first_goto (items); while ((item = ecore_list_next (items))) { Ecore_List *c; @@ -82,7 +82,7 @@ return d->rows[row]->text; } -static int +static unsigned int tree_data_count_get (void *data) { Tree_Data *d; @@ -227,7 +227,7 @@ ecore_list_append(str_data, txt); } - model = ewl_model_ecore_list_get(); + model = ewl_model_ecore_list_instance(); list = ewl_list_new (); ewl_object_fill_policy_set (EWL_OBJECT (list), EWL_FLAG_FILL_ALL); @@ -267,29 +267,31 @@ _change_page_cb (Ewl_Widget *widget, void *ev_data, void *user_data) { Ewl_Pdf *pdf; - Ecore_List *el; - Ewl_Selection_Idx *idx; + Ewl_Selection_Idx *sel; if (ewl_widget_type_is (widget, "list")) { - el = ewl_mvc_data_get (EWL_MVC (widget)); - idx = ewl_mvc_selected_get (EWL_MVC (widget)); +/* sel = ewl_mvc_selected_get (EWL_MVC (widget)); */ - pdf = EWL_PDF (user_data); - if (idx->row != ewl_pdf_page_get (pdf)) { - ewl_pdf_page_set (pdf, idx->row); - ewl_callback_call (EWL_WIDGET (pdf), EWL_CALLBACK_REVEAL); - } +/* pdf = EWL_PDF (user_data); */ +/* if (idx->row != ewl_pdf_page_get (pdf)) { */ +/* ewl_pdf_page_set (pdf, idx->row); */ +/* ewl_callback_call (EWL_WIDGET (pdf), EWL_CALLBACK_REVEAL); */ +/* } */ } else { - Ewl_Selection *sel; Tree_Data *data; + Tree_Row_Data *row_data; - el = ewl_mvc_selected_list_get (EWL_MVC (widget)); - sel = ecore_list_first_goto (el); - idx = EWL_SELECTION_IDX(sel); - if (!idx) printf ("pas de idx\n"); - data = (Tree_Data *)ewl_mvc_data_get (EWL_MVC (widget)); - if (idx) - printf ("row %d\n", idx->row); + printf ("1\n"); + sel = ewl_mvc_selected_get (EWL_MVC (widget)); + if (!sel) return; + printf ("2 %d\n\n", sel->row); + data = (Tree_Data *)EWL_SELECTION(sel)->data; + row_data = data->rows[sel->row]; + if (row_data) { + printf ("3 %d\n\n", row_data->page); + ewl_pdf_page_set (pdf, row_data->page); + ewl_callback_call (EWL_WIDGET (pdf), EWL_CALLBACK_REVEAL); + } } } ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs