Enlightenment CVS committal

Author  : monkeyiq
Project : misc
Module  : gevas2

Dir     : misc/gevas2/src


Modified Files:
        gevas.c gevasimage.c gevasimage.h 


Log Message:
woops, forgetsees to cvs comitsss me did.

===================================================================
RCS file: /cvsroot/enlightenment/misc/gevas2/src/gevas.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- gevas.c     26 Nov 2002 09:33:13 -0000      1.6
+++ gevas.c     27 Aug 2003 14:47:53 -0000      1.7
@@ -200,7 +200,7 @@
 
 void gevas_add_fontpath(GtkgEvas * ev, const gchar * path)
 {
-    evas_object_font_path_append(EVAS(ev), (char*)path);
+    evas_font_path_append(EVAS(ev), (char*)path);
     fprintf(stderr," GEVAS add font path: %s\n", path);
 }
 
@@ -1486,11 +1486,11 @@
 /*                     break; */
 
                case ARG_FONT_CACHE:
-            evas_object_font_cache_set( ev->evas, GTK_VALUE_INT(*arg));
+            evas_font_cache_set( ev->evas, GTK_VALUE_INT(*arg));
                        break;
 
                case ARG_IMAGE_CACHE:
-            evas_object_image_cache_set(ev->evas, GTK_VALUE_INT(*arg));
+            evas_image_cache_set(ev->evas, GTK_VALUE_INT(*arg));
                        break;
 
                case ARG_SIZE_REQUEST_X:
@@ -1546,10 +1546,10 @@
                        GTK_VALUE_POINTER(*arg) = ev->evas;
                        break;
                case ARG_FONT_CACHE:
-                       GTK_VALUE_INT(*arg) = evas_object_font_cache_get(ev->evas);
+                       GTK_VALUE_INT(*arg) = evas_font_cache_get(ev->evas);
                        break;
                case ARG_IMAGE_CACHE:
-            GTK_VALUE_INT(*arg) = evas_object_image_cache_get(ev->evas);
+            GTK_VALUE_INT(*arg) = evas_image_cache_get(ev->evas);
                        break;
                case ARG_SIZE_REQUEST_X:
                        GTK_VALUE_INT(*arg) = ev->size_request_x;
===================================================================
RCS file: /cvsroot/enlightenment/misc/gevas2/src/gevasimage.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- gevasimage.c        26 Nov 2002 09:33:13 -0000      1.9
+++ gevasimage.c        27 Aug 2003 14:47:53 -0000      1.10
@@ -337,13 +337,16 @@
        }
 }
 
-void gevasimage_load_from_rgba32data( GtkgEvasImage* object,
-                                      guint32* rgbadata,
-                                      int w, int h )
+static void __gevasimage_load_from_rgba32data( GtkgEvasImage* object,
+                                               guint32* rgbadata,
+                                               int w, int h,
+                                               int copydata )
 {
     double x=0;
     double y=0;
     int layer = 0;
+    fprintf( stderr, "gevasimage_load_from_rgba32data(1) x:%f y:%f w:%d h:%d 
layer:%d\n",
+             x, y, w, h, layer );
     GtkgEvasImage *ev;
     Evas_Object* eo;
     g_return_if_fail(object != NULL);
@@ -366,17 +369,38 @@
     eo = evas_object_image_add( EVAS(ev) );
     _gevas_set_obj( GTK_OBJECT(ev), eo);
 
-    gevasobj_resize( GTK_GEVASOBJ(ev), w, h );
-//    evas_object_resize( eo, w, h );
+//    gevasobj_resize( GTK_GEVASOBJ(ev), w, h );
+    evas_object_resize( eo, w, h );
     evas_object_image_size_set( eo, w, h );
-    evas_object_image_data_set( eo, (int*)(rgbadata) );
+    if( copydata )
+        evas_object_image_data_copy_set( eo, (int*)(rgbadata) );
+    else
+        evas_object_image_data_set( eo, (int*)(rgbadata) );
+    
     evas_object_image_fill_set( eo, 0, 0, w, h );
 
+    fprintf( stderr, "gevasimage_load_from_rgba32data(2) x:%f y:%f w:%d h:%d 
layer:%d\n",
+             x, y, w, h, layer );
+    
     gevasobj_set_location( GTK_GEVASOBJ(object), x, y );
     gevasobj_set_layer( GTK_GEVASOBJ(object), layer );
     gevasobj_queue_redraw( GTK_GEVASOBJ( object ) );
 }
 
+void gevasimage_load_from_rgba32data( GtkgEvasImage* object,
+                                      guint32* rgbadata,
+                                      int w, int h )
+{
+    __gevasimage_load_from_rgba32data( object, rgbadata, w, h, 0 );
+}
+
+void gevasimage_load_copy_from_rgba32data( GtkgEvasImage* object,
+                                           guint32* rgbadata,
+                                           int w, int h )
+{
+    __gevasimage_load_from_rgba32data( object, rgbadata, w, h, 1 );
+}
+    
 
 
 static void gevasimage_get_arg(GtkObject * object, GtkArg * arg, guint arg_id)
===================================================================
RCS file: /cvsroot/enlightenment/misc/gevas2/src/gevasimage.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- gevasimage.h        26 Aug 2002 14:56:05 -0000      1.3
+++ gevasimage.h        27 Aug 2003 14:47:53 -0000      1.4
@@ -117,9 +117,18 @@
     void gevasimage_ensure_smallerthan_with_ratio( GtkgEvasImage* gi,
                                                    int MaxDesiredWidthOrHeight );
 
+    /**
+     * Its assumed that rgbadata is around for as long as the gevasimage is
+     */ 
     void gevasimage_load_from_rgba32data( GtkgEvasImage* gi,
                                           guint32* rgbadata,
                                           int w, int h );
+    /**
+     * rgba data is copied.
+     */
+    void gevasimage_load_copy_from_rgba32data( GtkgEvasImage* gi,
+                                               guint32* rgbadata,
+                                               int w, int h );
 
 
 #ifdef __cplusplus




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to