fix compiling error if there is no DFS file system.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@818 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
bernard.xiong 2010-07-30 09:47:56 +00:00
parent b9fcbfc344
commit 445da145e2
5 changed files with 14 additions and 0 deletions

View File

@ -68,6 +68,7 @@ static struct rtgui_image_engine* rtgui_image_get_engine(const char* type)
return RT_NULL;
}
#if defined(RTGUI_USING_DFS_FILERW) || defined(RTGUI_USING_STDIO_FILERW)
struct rtgui_image* rtgui_image_create_from_file(const char* type, const char* filename, rt_bool_t load)
{
struct rtgui_filerw* filerw;
@ -114,6 +115,7 @@ struct rtgui_image* rtgui_image_create_from_file(const char* type, const char* f
return image;
}
#endif
struct rtgui_image* rtgui_image_create_from_mem(const char* type, const rt_uint8_t* data, rt_size_t length, rt_bool_t load)
{

View File

@ -49,7 +49,9 @@ typedef struct rtgui_image rtgui_image_t;
/* init rtgui image system */
void rtgui_system_image_init(void);
#if defined(RTGUI_USING_DFS_FILERW) || defined(RTGUI_USING_STDIO_FILERW)
struct rtgui_image* rtgui_image_create_from_file(const char* type, const char* filename, rt_bool_t load);
#endif
struct rtgui_image* rtgui_image_create_from_mem(const char* type, const rt_uint8_t* data, rt_size_t length, rt_bool_t load);
void rtgui_image_destroy(struct rtgui_image* image);

View File

@ -39,6 +39,12 @@
#define RTGUI_USING_HZ_BMP
#define RTGUI_MEM_TRACE
#define RTGUI_USING_WINMOVE
#else
/* native running under RT-Thread */
#ifndef RT_USING_DFS
#undef RTGUI_USING_DFS_FILERW
#undef RTGUI_USING_HZ_FILE
#endif
#endif
#if RTGUI_DEFAULT_FONT_SIZE == 0

View File

@ -3,6 +3,7 @@
#include <rtgui/widgets/view.h>
#if defined(RTGUI_USING_DFS_FILERW) || defined(RTGUI_USING_STDIO_FILERW)
#define RTGUI_FITEM_FILE 0x0
#define RTGUI_FITEM_DIR 0x1
struct rtgui_file_item
@ -52,5 +53,6 @@ rt_bool_t rtgui_filelist_view_event_handler(struct rtgui_widget* widget, struct
void rtgui_filelist_view_set_directory(rtgui_filelist_view_t* view, const char* directory);
void rtgui_filelist_view_get_fullpath(rtgui_filelist_view_t* view, char* path, rt_size_t len);
#endif
#endif

View File

@ -24,6 +24,7 @@
#include <rtgui/widgets/listbox.h>
#include <rtgui/widgets/window.h>
#if defined(RTGUI_USING_DFS_FILERW) || defined(RTGUI_USING_STDIO_FILERW)
#ifdef _WIN32
#include <io.h>
#include <dirent.h>
@ -835,3 +836,4 @@ void rtgui_filelist_view_get_fullpath(rtgui_filelist_view_t* view, char* path, r
rt_snprintf(path, len, "%s%s",view->current_directory,
view->items[view->current_item].name);
}
#endif