Enlightenment CVS committal

Author  : doursse
Project : e17
Module  : proto/edvi

Dir     : e17/proto/edvi/src/bin


Modified Files:
        Makefile.am edvi_esmart_test.c edvi_etk_test.c 
        edvi_evas_test.c edvi_ewl_test.c 


Log Message:
* Makefile.am:
* configure.in:
* edvi-config.in:
* src/Makefile.am:
* src/bin/Makefile.am:
* src/lib/Makefile.am:
edvi-config removed, use of pkg-config to check the various efl
and other minor clean up.
* src/bin/edvi_esmart_test.c: (main), (app_resize):
* src/bin/edvi_etk_test.c: (main):
* src/bin/edvi_evas_test.c: (main):
* src/bin/edvi_ewl_test.c: (main):
minor clean up of the test programs
* src/lib/esmart_dvi.c: (esmart_dvi_init), (_smart_page_render):
* src/lib/etk_dvi.c: (etk_dvi_file_set), (_etk_dvi_constructor),
(_etk_dvi_load):
* src/lib/ewl_dvi.c: (ewl_dvi_init), (ewl_dvi_file_set):
the initial value of the page is set to -1. Let the first page
to be drawn the first time the widget is showed.
* src/plugins/Makefile.am:
* src/plugins/epsilon/Makefile.am:
* src/plugins/epsilon/epsilon_thumbnailer.c:
(epsilon_thumb_imlib_standardize), (clip),
(epsilon_generate_thumb), (epsilon_plugin_init):
add epsilon thumbnailer
* src/plugins/ewl/Makefile.am:
* src/plugins/ewl/ewl_dvi.c: (test_info), (_change_page_cb),
(create_test), (create_dvi_fd_cb), (create_dvi_fd_window_response),
(dvi_load):
move ewl test to its own dir

===================================================================
RCS file: /cvs/e/e17/proto/edvi/src/bin/Makefile.am,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- Makefile.am 16 Jul 2006 20:51:17 -0000      1.1
+++ Makefile.am 30 Aug 2007 14:44:48 -0000      1.2
@@ -9,9 +9,9 @@
 EDVI_ETK_TEST = edvi_etk_test
 endif
 
-INCLUDES =                     \
+INCLUDES =             \
 -I$(top_srcdir)/src/lib        \
[EMAIL PROTECTED]@ @ECORE_CFLAGS@
[EMAIL PROTECTED]@
 
 bin_PROGRAMS = edvi_evas_test edvi_esmart_test $(EDVI_EWL_TEST) 
$(EDVI_ETK_TEST)
 
@@ -20,16 +20,14 @@
 
 edvi_evas_test_LDADD =                         \
        $(top_builddir)/src/lib/libedvi.la      \
-       $(EVAS_LIBS)                            \
-       $(ECORE_LIBS)
+       $(EDVI_LIBS)
 
 edvi_esmart_test_SOURCES =                     \
        edvi_esmart_test.c
 
 edvi_esmart_test_LDADD =                       \
        $(top_builddir)/src/lib/libedvi.la      \
-       $(EVAS_LIBS)                            \
-       $(ECORE_LIBS)
+       $(EDVI_LIBS)
 
 edvi_ewl_test_SOURCES =                                \
        edvi_ewl_test.c
@@ -38,8 +36,7 @@
 
 edvi_ewl_test_LDADD =                          \
        $(top_builddir)/src/lib/libedvi.la      \
-       $(EVAS_LIBS)                            \
-       $(ECORE_LIBS)                           \
+       $(EDVI_LIBS)                            \
        $(EWL_LIBS)
 
 edvi_etk_test_SOURCES =                                \
@@ -49,23 +46,4 @@
 
 edvi_etk_test_LDADD =                          \
        $(top_builddir)/src/lib/libedvi.la      \
-       $(EVAS_LIBS)                            \
-       $(ECORE_LIBS)
-
-if BUILD_EDVI_EWL
-pkgdir                  = @EWL_TEST_LIBS_DIR@
-pkg_LTLIBRARIES         = libewl_test_dvi.la
-
-libewl_test_dvi_la_SOURCES = ewl_test_dvi.c
-libewl_test_dvi_la_CFLAGS  = @EWL_CFLAGS@
-libewl_test_dvi_la_LIBADD  =                   \
-       $(top_builddir)/src/lib/libedvi.la      \
-       @EWL_LIBS@
-libewl_test_dvi_la_LDFLAGS =                   \
-       -L$(top_builddir)/src/lib               \
-       -L$(top_builddir)/src/lib/.libs
-
-EXTRA_DIST     = $(libewl_test_dvi_la_SOURCES)
-exampledir     = @EWL_TEST_SOURCE_DIR@
-example_DATA   = $(libewl_test_dvi_la_SOURCES)
-endif
+       $(EDVI_LIBS)
===================================================================
RCS file: /cvs/e/e17/proto/edvi/src/bin/edvi_esmart_test.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- edvi_esmart_test.c  22 Feb 2007 17:26:50 -0000      1.3
+++ edvi_esmart_test.c  30 Aug 2007 14:44:48 -0000      1.4
@@ -19,39 +19,37 @@
   Ecore_Evas *ee;
   Evas *evas;
   Evas_Object *o;
-  char *filename;
   int page_number;
 
   if (argc < 3)
     {
       printf ("\nUsage: %s filename page_number\n\n", argv[0]);
-      return -1;
+      return EXIT_FAILURE;
     }
 
   printf ("[DVI] version : %s\n", edvi_version_get ());
   if (!edvi_init (300, "cx", 4,
                   1.0, 1.0,
-                  0, 0, 0, 0, 255, 255, 255)) {
-    return -1;
+                  0, 255, 255, 255, 0, 0, 0)) {
+    return EXIT_FAILURE;
   }
 
-  filename = argv[1];
   sscanf (argv[2], "%d", &page_number);
 
   if (!evas_init()) {
     edvi_shutdown ();
-    return -1;
+    return EXIT_FAILURE;
   }
   if (!ecore_init()) {
     evas_shutdown ();
     edvi_shutdown ();
-    return -1;
+    return EXIT_FAILURE;
   }
   if (!ecore_evas_init()) {
     ecore_shutdown ();
     evas_shutdown ();
     edvi_shutdown ();
-    return -1;
+    return EXIT_FAILURE;
   }
 
   ee = ecore_evas_software_x11_new(NULL, 0,  0, 0, 600, 850);
@@ -61,7 +59,7 @@
   ecore_evas_name_class_set(ee, "esmart_dvi_test", "test_esmart_dvi");
   ecore_evas_callback_resize_set(ee, app_resize);
   ecore_evas_show(ee);
-  
+
   evas = ecore_evas_get(ee);
 
   o = esmart_dvi_add (evas);
@@ -69,22 +67,22 @@
     ecore_evas_shutdown ();
     ecore_shutdown ();
     evas_shutdown ();
-    return -1;
+    return EXIT_FAILURE;
   }
-  esmart_dvi_file_set (o, filename);
+
+  esmart_dvi_file_set (o, argv[1]);
   esmart_dvi_page_set (o, page_number);
-  esmart_dvi_scale_set (o, 0.5, 0.5);
   evas_object_move (o, 0, 0);
   evas_object_show (o);
 
   ecore_main_loop_begin ();
-   
+
   ecore_evas_shutdown ();
   ecore_shutdown ();
   evas_shutdown ();
   edvi_shutdown ();
 
-  return 0;
+  return EXIT_SUCCESS;
 }
 
 static void
@@ -92,7 +90,7 @@
 {
    Evas_Coord w, h;
    Evas *evas;
-   
+
    evas = ecore_evas_get(ee);
    evas_output_viewport_get(evas, NULL, NULL, &w, &h);
 /*    bg_resize(w, h); */
===================================================================
RCS file: /cvs/e/e17/proto/edvi/src/bin/edvi_etk_test.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- edvi_etk_test.c     12 Feb 2007 14:38:31 -0000      1.7
+++ edvi_etk_test.c     30 Aug 2007 14:44:48 -0000      1.8
@@ -25,14 +25,14 @@
 
   if (argc == 1) {
     printf ("Usage: %s dvi_file\n", argv[0]);
-    return -1;
+    return EXIT_FAILURE;
   }
 
   printf ("[DVI] version : %s\n", edvi_version_get ());
   if (!edvi_init (300, "cx", 4,
                   1.0, 1.0,
                   0, 255, 255, 255, 0, 0, 0)) {
-    return -1;
+    return EXIT_FAILURE;
   }
 
   etk_init (&argc, &argv);
@@ -45,12 +45,12 @@
     printf ("The file %s can't be opened\n", argv[1]);
     etk_shutdown ();
     edvi_shutdown ();
-    return -1;
+    return EXIT_FAILURE;
   }
 
   window = etk_window_new ();
   etk_window_title_set (ETK_WINDOW (window), "Etk Dvi Test Application");
-  etk_signal_connect ("delete_event", ETK_OBJECT (window),
+  etk_signal_connect ("delete-event", ETK_OBJECT (window),
                       ETK_CALLBACK(_quit_cb), NULL);
 
   hbox = etk_hbox_new (ETK_FALSE, 6);
@@ -80,7 +80,7 @@
   }
 
   /* change page */
-  etk_signal_connect ("row_clicked", ETK_OBJECT (list),
+  etk_signal_connect ("row-clicked", ETK_OBJECT (list),
                       ETK_CALLBACK(_change_page_cb), dvi);
 
   /* we attach and show */
@@ -89,7 +89,7 @@
 
   etk_box_append (ETK_BOX (hbox), dvi, ETK_BOX_START, ETK_BOX_NONE, 0);
   etk_widget_show (dvi);
-  
+
   etk_widget_show (window);
 
   etk_main ();
@@ -97,7 +97,7 @@
   etk_shutdown ();
   edvi_shutdown ();
 
-  return 0;
+  return EXIT_SUCCESS;
 }
 
 static void
===================================================================
RCS file: /cvs/e/e17/proto/edvi/src/bin/edvi_evas_test.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- edvi_evas_test.c    22 Feb 2007 17:26:50 -0000      1.3
+++ edvi_evas_test.c    30 Aug 2007 14:44:48 -0000      1.4
@@ -42,7 +42,6 @@
 int
 main (int argc, char * argv[])
 {
-  char          *filename;
   Edvi_Device   *device;
   Edvi_Property *property;
   Edvi_Document *document;
@@ -51,20 +50,19 @@
   Evas          *evas;
   Evas_Object   *o;
   char          *param_kpathsea_mode  = "cx";
+  int            page_number;
 
-  if (argc < 2) {
-    printf ("\nUsage: %s file.dvi\n\n", argv[0]);
-    return -1;
+  if (argc < 3) {
+    printf ("\nUsage: %s file.dvi page_number\n\n", argv[0]);
+    return EXIT_FAILURE;
   }
 
-  filename = argv[1];
-
   printf ("[DVI] version : %s\n", edvi_version_get ());
 
   if (!edvi_init (300, param_kpathsea_mode, 4,
                   1.0, 1.0,
                   0, 255, 255, 255, 0, 0, 0)) {
-    return -1;
+    return EXIT_FAILURE;
   }
 
   device = edvi_device_new (edvi_dpi_get (), edvi_dpi_get ());
@@ -78,12 +76,13 @@
   }
   edvi_property_property_set (property, EDVI_PROPERTY_DELAYED_FONT_OPEN);
 
-  document = edvi_document_new (filename, device, property);
+  document = edvi_document_new (argv[1], device, property);
   if (!document) {
     goto free_property;
   }
 
-  page = edvi_page_new (document, 0);
+  sscanf (argv[2], "%d", &page_number);
+  page = edvi_page_new (document, page_number);
   if (!page) {
     goto free_document;
   }
@@ -121,6 +120,16 @@
   ecore_main_loop_begin ();
 
   ecore_evas_shutdown ();
+  ecore_shutdown ();
+  evas_shutdown ();
+  edvi_page_delete (page);
+  edvi_document_delete (document);
+  edvi_property_delete (property);
+  edvi_device_delete (device);
+  edvi_shutdown ();
+
+  return EXIT_SUCCESS;
+
  shutdown_ecore:
   ecore_shutdown ();
  shutdown_evas:
@@ -136,7 +145,7 @@
  shutdown:
   edvi_shutdown ();
 
-  return 0;
+  return EXIT_FAILURE;
 }
 
 static void
===================================================================
RCS file: /cvs/e/e17/proto/edvi/src/bin/edvi_ewl_test.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- edvi_ewl_test.c     25 Jul 2007 17:01:02 -0000      1.6
+++ edvi_ewl_test.c     30 Aug 2007 14:44:48 -0000      1.7
@@ -27,15 +27,14 @@
 
   if (argc == 1) {
     printf ("Usage: %s dvi_file\n", argv[0]);
-    return -1;
+    return EXIT_FAILURE;
   }
 
   printf ("[DVI] version       : %s\n", edvi_version_get ());
   if (!edvi_init (300, "cx", 4,
                   1.0, 1.0,
-                  0, 255, 255, 255, 0, 0, 0)) {
-    return -1;
-  }
+                  0, 255, 255, 255, 0, 0, 0))
+    return EXIT_FAILURE;
 
   ewl_init (&argc, (char **)argv);
   str_data = ecore_list_new();
@@ -44,13 +43,13 @@
   /* We open the dvi file */
   dvi = ewl_dvi_new ();
   ewl_dvi_file_set (EWL_DVI (dvi), argv[1]);
-  document = EWL_DVI (dvi)->dvi_document;
+  document = ewl_dvi_dvi_document_get (EWL_DVI (dvi));
   if (!document) {
     printf ("The file %s can't be opened\n", argv[1]);
     ecore_list_destroy (str_data);
     ewl_main_quit ();
     edvi_shutdown ();
-    return -1;
+    return EXIT_FAILURE;
   }
 
   window = ewl_window_new ();
@@ -100,7 +99,7 @@
 
   edvi_shutdown ();
 
-  return 0;
+  return EXIT_SUCCESS;
 }
 
 static void _quit_cb (Ewl_Widget * w, void *ev_data, void *user_data)



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

Reply via email to