changeset 345:d04085404583

Remove jpg sinc ethe image loader is not ready yet.
author wycc
date Sun, 08 Mar 2009 11:47:14 +0800
parents ab7f3c00fd05 (current diff) bb6e964da1c8 (diff)
children b391722bf20e 4ae9888bbde6
files examples/menu/filebrowser.c
diffstat 3 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/examples/menu/filebrowser.c	Sun Mar 08 11:46:09 2009 +0800
+++ b/examples/menu/filebrowser.c	Sun Mar 08 11:47:14 2009 +0800
@@ -102,7 +102,7 @@
 
     printf("check %s\n",s);
 
-    if (endWith(s,".jpg") || endWith(s,".png")) {
+    if (endWith(s,".png")) {
     	    snprintf(path,1024,"%s%s", data->curDir,data->titles[select]);
 	    mypreview(data,path);
     }
--- a/include/mb_shapes.h	Sun Mar 08 11:46:09 2009 +0800
+++ b/include/mb_shapes.h	Sun Mar 08 11:47:14 2009 +0800
@@ -244,6 +244,7 @@
 				  co_aix w, co_aix h);
 extern int sh_image_set_img_data(shape_t *shape, mb_img_data_t *img_data,
 				 co_aix x, co_aix y, co_aix w, co_aix h);
+extern mb_img_data_t *sh_image_get_img_data(shape_t *shape);
 /* @} */
 /* @} */
 
--- a/src/shape_image.c	Sun Mar 08 11:46:09 2009 +0800
+++ b/src/shape_image.c	Sun Mar 08 11:47:14 2009 +0800
@@ -210,3 +210,10 @@
     return OK;
 }
 
+mb_img_data_t *sh_image_get_img_data(shape_t *shape) {
+    sh_image_t *img = (sh_image_t *)shape;
+    
+    ASSERT(shape->obj.obj_type == MBO_IMAGE);
+    
+    return img->img_data;
+}