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:
chaos.proton@gmail.com 2012-04-19 02:14:21 +00:00
parent db06460208
commit cdd01a2528
3 changed files with 20 additions and 20 deletions

View File

@ -64,6 +64,23 @@ void rtgui_system_image_init(void)
#endif #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) static struct rtgui_image_engine* rtgui_image_get_engine_by_filename(const char* fn)
{ {
struct rtgui_list_node *node; 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; 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_image* rtgui_image_create_from_file(const char* type, const char* filename, rt_bool_t load)
{ {
struct rtgui_filerw* filerw; struct rtgui_filerw* filerw;

View File

@ -59,7 +59,7 @@ struct rtgui_list_view
/* the number of item in a page */ /* the number of item in a page */
rt_uint16_t page_items; rt_uint16_t page_items;
/* current item */ /* current item */
rt_uint16_t current_item; rt_int16_t current_item;
/* icon layout */ /* icon layout */
rt_uint8_t row_items, col_items; rt_uint8_t row_items, col_items;

View File

@ -96,7 +96,7 @@ static void rtgui_list_view_onicondraw(struct rtgui_list_view* view, struct rtgu
} }
} }
static void rtgui_list_view_update_icon(struct rtgui_list_view* view, rt_uint16_t old_item) static void rtgui_list_view_update_icon(struct rtgui_list_view* view, rt_int16_t old_item)
{ {
struct rtgui_rect rect, item_rect, drawing_rect; struct rtgui_rect rect, item_rect, drawing_rect;
rt_ubase_t c, r; /* col and row index */ rt_ubase_t c, r; /* col and row index */
@ -230,7 +230,7 @@ static void rtgui_list_view_onlistdraw(struct rtgui_list_view* view, struct rtgu
} }
} }
void rtgui_list_view_update_list(struct rtgui_list_view* view, rt_uint16_t old_item) void rtgui_list_view_update_list(struct rtgui_list_view* view, rt_int16_t old_item)
{ {
struct rtgui_dc* dc; struct rtgui_dc* dc;
const struct rtgui_list_item* item; const struct rtgui_list_item* item;