Enlightenment CVS committal

Author  : raster
Project : e17
Module  : apps/expedite

Dir     : e17/apps/expedite/src/bin


Modified Files:
        main.c ui.c 


Log Message:


add profiles in for testing speed for different target profiles

===================================================================
RCS file: /cvs/e/e17/apps/expedite/src/bin/main.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- main.c      2 Oct 2007 01:20:04 -0000       1.8
+++ main.c      3 Oct 2007 08:55:25 -0000       1.9
@@ -1094,10 +1094,47 @@
    return go;
 }
 
+static int
+_profile_parse(int argc, char **argv)
+{
+   int i;
+   int ok = 0;
+
+   for (i = 1; i < argc; i++)
+     {
+       if ((!strcmp(argv[i], "-p")) && (i < (argc - 1)))
+         {
+            i++;
+            if      (!strcmp(argv[i], "qvga"))   {win_w = 320 ; win_h = 240 ;}
+            else if (!strcmp(argv[i], "qvga-p")) {win_w = 240 ; win_h = 320 ;}
+            else if (!strcmp(argv[i], "vga"))    {win_w = 640 ; win_h = 480 ;}
+            else if (!strcmp(argv[i], "vga-p"))  {win_w = 480 ; win_h = 640 ;}
+            else if (!strcmp(argv[i], "wvga"))   {win_w = 800 ; win_h = 480 ;}
+            else if (!strcmp(argv[i], "wvga-p")) {win_w = 480 ; win_h = 800 ;}
+            else if (!strcmp(argv[i], "svga"))   {win_w = 800 ; win_h = 600 ;}
+            else if (!strcmp(argv[i], "svga-p")) {win_w = 600 ; win_h = 800 ;}
+            else if (!strcmp(argv[i], "xga"))    {win_w = 1024; win_h = 768 ;}
+            else if (!strcmp(argv[i], "xga-p"))  {win_w = 768 ; win_h = 1024;}
+            else if (!strcmp(argv[i], "wxga"))   {win_w = 1280; win_h = 768 ;}
+            else if (!strcmp(argv[i], "wxga-p")) {win_w = 768 ; win_h = 1280;}
+            else if (!strcmp(argv[i], "n800"))   {win_w = 720 ; win_h = 420 ;}
+            else
+              {
+                 printf("Invalid profile: %s\n", argv[i]);
+                 return 0;
+              }
+         }
+     }
+   return 1;
+}
+
 static void
 _engine_args(int argc, char **argv)
 {
+   int profile_ok;
+   
    /* FIXME: parse args for geometry, engine etc. */
+   profile_ok = _profile_parse(argc, argv);
    if (engine_software_x11_args(argc, argv))
      loop_func = engine_software_x11_loop;
    if (engine_gl_glew_args(argc, argv))
@@ -1114,20 +1151,24 @@
      loop_func = engine_software_sdl_loop;
    if (engine_direct3d_args(argc, argv))
      loop_func = engine_direct3d_loop;
-   if (!loop_func)
+   if ((!loop_func) || (!profile_ok))
      {
        fprintf(stderr,
                "No engine selected.\n"
                "\n"
                "Options:\n"
                "  -e ENGINE\n"
+               "  -p PROFILE\n"
                "\n"
                "Where ENGINE can be one of:\n"
                "  x11 xr gl-glew gl x11-16 ddraw direct3d sdl\n"
+               "Where PROFILE can be one of:\n"
+               "  qvga qvga-p vga vga-p wvga wvga-p svga svga-p xga xga-p wxga 
wxga-p\n"
+               "  n800\n"
                );
        exit(-1);
      }
-
+   
    evas_output_size_set(evas, win_w, win_h);
    evas_output_viewport_set(evas, 0, 0, win_w, win_h);
    evas_key_modifier_add(evas, "Shift");
===================================================================
RCS file: /cvs/e/e17/apps/expedite/src/bin/ui.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- ui.c        11 Apr 2007 12:36:32 -0000      1.2
+++ ui.c        3 Oct 2007 08:55:25 -0000       1.3
@@ -241,15 +241,26 @@
    evas_object_show(o);
    o_bg = o;
 
+   o = evas_object_rectangle_add(evas);
+   evas_object_move(o, 0, 0);
+   evas_object_resize(o, win_w, win_h);
+   evas_object_color_set(o, 255, 255, 255, 255);
+   evas_object_layer_set(o, -99);
+   evas_object_show(o);
+   o_wallpaper = o;
+
+/*   
    o = evas_object_image_add(evas);
    evas_object_move(o, 0, 0);
    evas_object_image_file_set(o, PACKAGE_DATA_DIR"/data/bg.png", NULL);
    evas_object_image_fill_set(o, 0, 0, win_w, win_h);
+   evas_object_image_smooth_scale_set(o, 0);
    evas_object_resize(o, win_w, win_h);
    evas_object_layer_set(o, -99);
    evas_object_show(o);
    o_wallpaper = o;
-
+ */
+   
    o = evas_object_text_add(evas);
    evas_object_text_font_set(o, "Vera-Bold", 10);
    evas_object_text_text_set(o, "EXPEDITE");



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to