Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/edje

Dir     : e17/libs/edje/src/bin


Modified Files:
        edje_main.c 


Log Message:


get relative mouse pos relative to the edje... and add a -fill opt to edje

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/edje/src/bin/edje_main.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -3 -r1.42 -r1.43
--- edje_main.c 2 Jul 2004 10:17:25 -0000       1.42
+++ edje_main.c 8 Jul 2004 04:29:27 -0000       1.43
@@ -13,6 +13,7 @@
    Evas_Object *title_clip;
    Evas_Object *image;
    Evas_Coord       minw, minh;
+   Evas_Coord       maxw, maxh;
    int          hdir;
    int          vdir;
    char         down_top : 1;
@@ -60,6 +61,7 @@
 Evas        *evas       = NULL;
 int          startw     = 240;
 int          starth     = 320;
+int          mdfill     = 0;
 
 static int
 main_start(int argc, char **argv)
@@ -98,6 +100,10 @@
                {
                  mode = 1;
                }
+             else if (!strcmp(argv[i], "-fill"))
+               {
+                 mdfill = 1;
+               }
           }
      }
    if (mode == 0)
@@ -666,11 +672,18 @@
    char buf[1024];
    Evas_Coord tw, th, w, h;
    Evas_Coord xx, yy, ww, hh;
-   
+
    xx = 10;
    yy = 10;
    ww = startw - 40;
    hh = starth - 50;
+   if (mdfill)
+     {
+       xx = -10;
+       yy = -20;
+       ww = startw;
+       hh = starth;
+     }
    
    de = calloc(1, sizeof(Demo_Edje));
    edjes = evas_list_append(edjes, de);
@@ -759,11 +772,20 @@
    edje_object_part_drag_page_set(o, "dragable", 0.2, 0.2);
    evas_object_move(o, xx + 10, yy + 20);
    evas_object_show(o);
-   edje_object_size_min_get(o, &(de->minw), &(de->minh));
    w = ww;
    h = hh;
+   edje_object_size_min_get(o, &(de->minw), &(de->minh));
    if (ww < de->minw) w = de->minw;
    if (hh < de->minh) h = de->minh;
+   edje_object_size_min_get(o, &(de->maxw), &(de->maxh));
+   if (de->maxw > 0)
+     {
+       if (ww > de->maxw) w = de->maxw;
+     }
+   if (de->maxh > 0)
+     {
+       if (hh > de->maxh) h = de->maxh;
+     }
    evas_object_resize(o, w, h);
    de->edje = o;
 
@@ -795,7 +817,7 @@
    if (argc < 2)
      {
        printf("Usage:\n");
-       printf("  %s file_to_show.eet [-gl] [-g WxH] [collection_to_show] ...\n", 
argv[0]);
+       printf("  %s file_to_show.eet [-gl] [-g WxH] [-fill] [collection_to_show] 
...\n", argv[0]);
        printf("\n");
        printf("Example:\n");
        printf("  %s data/e_logo.eet\n", argv[0]);




-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to