mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-12-26 01:07:21 +00:00
bring back commit 2079
I over written that commit accidentally, bring it back. git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2093 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
@@ -64,6 +64,23 @@ void rtgui_system_image_init(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
static struct rtgui_image_engine* rtgui_image_get_engine(const char* type)
|
||||
{
|
||||
struct rtgui_list_node *node;
|
||||
struct rtgui_image_engine *engine;
|
||||
|
||||
rtgui_list_foreach(node, &_rtgui_system_image_list)
|
||||
{
|
||||
engine = rtgui_list_entry(node, struct rtgui_image_engine, list);
|
||||
|
||||
if (strncasecmp(engine->name, type, strlen(engine->name)) ==0)
|
||||
return engine;
|
||||
}
|
||||
|
||||
return RT_NULL;
|
||||
}
|
||||
|
||||
#if defined(RTGUI_USING_DFS_FILERW) || defined(RTGUI_USING_STDIO_FILERW)
|
||||
static struct rtgui_image_engine* rtgui_image_get_engine_by_filename(const char* fn)
|
||||
{
|
||||
struct rtgui_list_node *node;
|
||||
@@ -88,23 +105,6 @@ static struct rtgui_image_engine* rtgui_image_get_engine_by_filename(const char*
|
||||
return RT_NULL;
|
||||
}
|
||||
|
||||
static struct rtgui_image_engine* rtgui_image_get_engine(const char* type)
|
||||
{
|
||||
struct rtgui_list_node *node;
|
||||
struct rtgui_image_engine *engine;
|
||||
|
||||
rtgui_list_foreach(node, &_rtgui_system_image_list)
|
||||
{
|
||||
engine = rtgui_list_entry(node, struct rtgui_image_engine, list);
|
||||
|
||||
if (strncasecmp(engine->name, type, strlen(engine->name)) ==0)
|
||||
return engine;
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user