diff --git a/components/finsh/cmd.c b/components/finsh/cmd.c index effa5c654fc7d2fecebcc2b1cc62bd0ff63356af..6052c2e1aed9e096949b3aed45e3e4a8711404ad 100644 --- a/components/finsh/cmd.c +++ b/components/finsh/cmd.c @@ -386,7 +386,7 @@ int list_module(void) FINSH_FUNCTION_EXPORT(list_module, list module in system) -int list_module_obj(const char* name) +int list_mod_detail(const char* name) { int i; struct rt_module *module; @@ -480,7 +480,7 @@ int list_module_obj(const char* name) return 0; } -FINSH_FUNCTION_EXPORT(list_module_obj, list module objects in system) +FINSH_FUNCTION_EXPORT(list_mod_detail, list module objects in system) #endif int list() diff --git a/components/libdl/dlopen.c b/components/libdl/dlopen.c index f31623083fc21d33e2545f8c56d16e90c6f5d6a4..52c860100ca54aaac6b05651add98a93a1fe861e 100644 --- a/components/libdl/dlopen.c +++ b/components/libdl/dlopen.c @@ -15,7 +15,7 @@ #include #include -#define MODULE_ROOT_DIR "/module" +#define MODULE_ROOT_DIR "/module/lib" void* dlopen(const char *filename, int flags) { diff --git a/examples/module/ftk_demo/demo_bidi.c b/examples/module/ftk_demo/demo_bidi.c deleted file mode 100644 index f6d0444db1334094c51d0b0e3d9f27fd4052c19d..0000000000000000000000000000000000000000 --- a/examples/module/ftk_demo/demo_bidi.c +++ /dev/null @@ -1,88 +0,0 @@ -#include "ftk.h" - -typedef struct _TimerInfo -{ - int times; - FtkWidget* label; -}TimerInfo; - -static Ret timeout(void* ctx) -{ - TimerInfo* info = ctx; - char buffer[32] = {0}; - if(info->times > 0) - { - snprintf(buffer, sizeof(buffer), "Quit after %d seconds", info->times); - ftk_widget_set_text(info->label, buffer); - info->times--; - - return RET_OK; - } - else - { - ftk_widget_unref(ftk_widget_toplevel(info->label)); - ftk_logd("%s: timeout and quit.\n", __func__); - FTK_FREE(info); - FTK_QUIT(); - return RET_REMOVE; - } -} - -#ifdef FTK_AS_PLUGIN -#include "ftk_app_demo.h" -FTK_HIDE int FTK_MAIN(int argc, char* argv[]); -FtkApp* ftk_app_demo_bidi_create() -{ - return ftk_app_demo_create(_("bidi"), ftk_main); -} -#else -#define FTK_HIDE extern -#endif /*FTK_AS_PLUGIN*/ - -FTK_HIDE int FTK_MAIN(int argc, char* argv[]) -{ - int width = 0; - int height = 0; - FtkGc gc = {.mask = FTK_GC_BG}; - TimerInfo* info = NULL; - - FTK_INIT(argc, argv); - info = (TimerInfo*)FTK_ZALLOC(sizeof(TimerInfo)); - info->times = 100; - - FtkSource* timer = ftk_source_timer_create(1000, timeout, info); - FtkWidget* win = ftk_app_window_create(); - - width = ftk_widget_width(win); - height = ftk_widget_height(win); - - FtkWidget* label = ftk_label_create(win, 10, 10, width - 20, 20); - ftk_widget_set_text(label, "arabic bidi demo"); - - label = ftk_label_create(win, 10, 40, width - 20, 20); - ftk_widget_set_text(label, "English Text"); - assert(strcmp(ftk_widget_get_text(label), "English Text") == 0); - - gc.bg.a = 0xff; - gc.bg.r = 0xF0; - gc.bg.g = 0xF0; - gc.bg.b = 0x80; - label = ftk_label_create(win, 10, height/2, width - 20, 120); - ftk_widget_set_gc(label, FTK_WIDGET_INSENSITIVE, &gc); - ftk_widget_unset_attr(label, FTK_ATTR_TRANSPARENT); - ftk_widget_set_text(label, "ان منح حياتك للمسيح تعد خطوة ايمان يمكنك القيام بها عن طريق الصلاة"); - - label = ftk_label_create(win, 50, height/2-30, width, 20); - info->label = label; - - ftk_widget_set_text(win, "label demo"); - ftk_widget_show_all(win, 1); - - ftk_widget_set_attr(win, FTK_ATTR_IGNORE_CLOSE); - ftk_main_loop_add_source(ftk_default_main_loop(), timer); - - FTK_RUN(); - - return 0; -} - diff --git a/examples/module/ftk_demo/demo_cairo.c b/examples/module/ftk_demo/demo_cairo.c deleted file mode 100644 index aa1aa6fa2405ab3b44554ab6d4cbe5ba1a0e672b..0000000000000000000000000000000000000000 --- a/examples/module/ftk_demo/demo_cairo.c +++ /dev/null @@ -1,375 +0,0 @@ -#include -#ifdef ENABLE_CAIRO -#include "ftk_cairo.h" - -static cairo_t* cr = NULL; - -static void paint_clip_image(int x, int y, int width, int height) -{ - int w, h; - cairo_surface_t *image; - char filename[FTK_MAX_PATH+1] = {0}; - - cairo_translate (cr, x, y); - - cairo_arc (cr, width/2, height/4, width/3, 0, 2*M_PI); - cairo_clip (cr); - cairo_new_path (cr); /* path not consumed by clip()*/ - - ftk_snprintf(filename, FTK_MAX_PATH, "%s/png1.png", - ftk_config_get_test_data_dir(ftk_default_config())); - image = cairo_image_surface_create_from_png (filename); - - w = cairo_image_surface_get_width (image); - h = cairo_image_surface_get_height (image); - -// cairo_scale (cr, 256.0/w, 256.0/h); - - cairo_set_source_surface (cr, image, 0, 0); - cairo_paint (cr); - - cairo_surface_destroy (image); - - return; -} - -static void paint_rect(int x, int y, int width, int height) -{ - /* a custom shape that could be wrapped in a function */ - double x0 = 25.6, /* parameters like cairo_rectangle */ - y0 = 25.6, - rect_width = 204.8, - rect_height = 204.8, - radius = 102.4; /* and an approximate curvature radius */ - - double x1,y1; - - cairo_translate (cr, x, y); - x1=x0+rect_width; - y1=y0+rect_height; - if (!rect_width || !rect_height) - return; - if (rect_width/2 0 ? g_index - 1 : 0; - ftk_widget_invalidate(ftk_widget_lookup(ctx, 100)); - - return RET_OK; -} - -static Ret button_next_clicked(void* ctx, void* obj) -{ - g_index++; - g_index = g_index % (sizeof(paints)/sizeof(paints[0])); - - ftk_widget_invalidate(ftk_widget_lookup(ctx, 100)); - - return RET_OK; -} - -static Ret button_quit_clicked(void* ctx, void* obj) -{ - ftk_widget_unref(ctx); - - return RET_OK; -} - -#ifdef FTK_AS_PLUGIN -#include "ftk_app_demo.h" -FTK_HIDE int FTK_MAIN(int argc, char* argv[]); -FtkApp* ftk_app_demo_cairo_create() -{ - return ftk_app_demo_create(_("cairo"), ftk_main); -} -#else -#define FTK_HIDE extern -#endif /*FTK_AS_PLUGIN*/ - -FTK_HIDE int FTK_MAIN(int argc, char* argv[]) -{ - int width = 0; - int height = 0; - FtkWidget* win = NULL; - FtkWidget* button = NULL; - FtkWidget* painter = NULL; - FTK_INIT(argc, argv); - - win = ftk_app_window_create(); - width = ftk_widget_width(win); - height = ftk_widget_height(win); - - button = ftk_button_create(win, 0, 10, width/3, 60); - ftk_widget_set_text(button, "prev"); - ftk_button_set_clicked_listener(button, button_prev_clicked, win); - - button = ftk_button_create(win, width/3, 10, width/3, 60); - ftk_widget_set_text(button, "next"); - ftk_button_set_clicked_listener(button, button_next_clicked, win); - - button = ftk_button_create(win, width*2/3, 10, width/3, 60); - ftk_widget_set_text(button, "quit"); - ftk_button_set_clicked_listener(button, button_quit_clicked, win); - - painter = ftk_painter_create(win, 0, 70, width, height); - ftk_widget_set_id(painter, 100); - ftk_painter_set_paint_listener(painter, on_paint, NULL); - - ftk_widget_set_text(win, "cairo demo"); - ftk_widget_show_all(win, 1); - FTK_QUIT_WHEN_WIDGET_CLOSE(win); - - FTK_RUN(); - - return 0; -} -#endif diff --git a/include/rtm.h b/include/rtm.h index 653d94327fe5e4cbaa1e14b70f9ebcea3aadb5a9..6acbb55d446345029f33c1106e12143d0501a1d6 100644 --- a/include/rtm.h +++ b/include/rtm.h @@ -9,8 +9,8 @@ const char __rtmsym_##symbol##_name[] = #symbol; \ const struct rt_module_symtab __rtmsym_##symbol SECTION("RTMSymTab")= \ { \ - (rt_uint32_t)&symbol, \ - __rtmsym_##symbol##_name, \ + (void *)&symbol, \ + __rtmsym_##symbol##_name \ }; #else @@ -19,8 +19,8 @@ const struct rt_module_symtab __rtmsym_##symbol SECTION("RTMSymTab")= \ struct rt_module_symtab { - rt_uint32_t addr; + void* addr; const char* name; -}; +}; #endif diff --git a/include/rtthread.h b/include/rtthread.h index 38f034a3e78040f5f3309ec57fbd81c50692a38c..15b5a03b187a41c19f3bb61e6e9900f6ab2f25bd 100644 --- a/include/rtthread.h +++ b/include/rtthread.h @@ -304,7 +304,7 @@ rt_err_t rt_device_control(rt_device_t dev, rt_uint8_t cmd, void* arg); * module interface */ -rt_module_t rt_module_load(const rt_uint8_t* name, void* module_ptr); +rt_module_t rt_module_load(const char* name, void* module_ptr); rt_err_t rt_module_unload(rt_module_t module); rt_module_t rt_module_open(const char* filename); void *rt_module_malloc(rt_size_t size); diff --git a/src/module.c b/src/module.c index b85b0f2b4b2c669f8c05c99fa7378abe8b0a500f..a80e1752279fef2285b708b2509d959b1abefe7d 100644 --- a/src/module.c +++ b/src/module.c @@ -20,7 +20,7 @@ #include "string.h" #include "kservice.h" -/* #define RT_MODULE_DEBUG */ +#define RT_MODULE_DEBUG #ifdef RT_USING_MODULE #include "module.h" @@ -43,7 +43,6 @@ struct rt_module_page rt_size_t npage; /* number of pages */ rt_list_t list; }; -static struct rt_module_page *rt_module_page_list; /* module memory allocator */ struct rt_mem_head @@ -67,12 +66,18 @@ struct rt_module_symtab *_rt_module_symtab_begin = RT_NULL, *_rt_module_symtab_e */ void rt_system_module_init(void) { +#ifdef __GNUC__ extern int __rtmsymtab_start; extern int __rtmsymtab_end; - -#ifdef __GNUC__ + _rt_module_symtab_begin = (struct rt_module_symtab *)&__rtmsymtab_start; _rt_module_symtab_end = (struct rt_module_symtab *)&__rtmsymtab_end; +#elif defined (__CC_ARM) + extern int RTMSymTab$$Base; + extern int RTMSymTab$$Limit; + + _rt_module_symtab_begin = (struct rt_module_symtab *)&RTMSymTab$$Base; + _rt_module_symtab_end = (struct rt_module_symtab *)&RTMSymTab$$Limit; #endif rt_list_init(&rt_module_symbol_list); @@ -81,14 +86,14 @@ void rt_system_module_init(void) rt_current_module = RT_NULL; } -static rt_uint32_t rt_module_symbol_find(const rt_uint8_t* sym_str) +static rt_uint32_t rt_module_symbol_find(const char* sym_str) { /* find in kernel symbol table */ struct rt_module_symtab* index; for (index = _rt_module_symtab_begin; index != _rt_module_symtab_end; index ++) { - if (rt_strcmp(index->name, (const char*)sym_str) == 0) - return index->addr; + if (rt_strcmp(index->name, sym_str) == 0) + return (rt_uint32_t)index->addr; } return 0; @@ -249,14 +254,14 @@ static void rt_module_init_object_container(struct rt_module* module) * @return the module object * */ -rt_module_t rt_module_load(const rt_uint8_t* name, void* module_ptr) +rt_module_t rt_module_load(const char* name, void* module_ptr) { rt_uint8_t *ptr = RT_NULL; rt_module_t module = RT_NULL; rt_bool_t linked = RT_FALSE; rt_uint32_t index, module_size = 0; - rt_kprintf("rt_module_load: %s\n", name); + rt_kprintf("rt_module_load: %s ,", name); /* check ELF header */ if (rt_memcmp(elf_module->e_ident, RTMMAG, SELFMAG) == 0) @@ -306,6 +311,8 @@ rt_module_t rt_module_load(const rt_uint8_t* name, void* module_ptr) ptr = module->module_space; rt_memset(ptr, 0, module_size); + rt_kprintf(" load address at 0x%x\n", ptr); + for (index = 0; index < elf_module->e_phnum; index++) { if(phdr[index].p_type == PT_LOAD) @@ -353,7 +360,7 @@ rt_module_t rt_module_load(const rt_uint8_t* name, void* module_ptr) rt_kprintf("unresolved relocate symbol: %s\n", strtab + sym->st_name); #endif /* need to resolve symbol in kernel symbol table */ - addr = rt_module_symbol_find(strtab + sym->st_name); + addr = rt_module_symbol_find((const char*)(strtab + sym->st_name)); if (addr == 0) { rt_kprintf("can't find %s in kernel symbol table\n", strtab + sym->st_name); @@ -378,7 +385,7 @@ rt_module_t rt_module_load(const rt_uint8_t* name, void* module_ptr) { /* find .dynsym section */ rt_uint8_t* shstrab = (rt_uint8_t*) module_ptr + shdr[elf_module->e_shstrndx].sh_offset; - if (rt_strcmp(shstrab + shdr[index].sh_name, ELF_DYNSYM) == 0) break; + if (rt_strcmp((const char *)(shstrab + shdr[index].sh_name), ELF_DYNSYM) == 0) break; } /* found .dynsym section */ @@ -403,12 +410,12 @@ rt_module_t rt_module_load(const rt_uint8_t* name, void* module_ptr) { if((ELF_ST_BIND(symtab[i].st_info) == STB_GLOBAL) && (ELF_ST_TYPE(symtab[i].st_info) == STT_FUNC)) { - rt_size_t length = rt_strlen(strtab + symtab[i].st_name) + 1; + rt_size_t length = rt_strlen((const char*)(strtab + symtab[i].st_name)) + 1; - module->symtab[count].addr = module->module_space + symtab[i].st_value; + module->symtab[count].addr = (void*)(module->module_space + symtab[i].st_value); module->symtab[count].name = rt_malloc(length); - rt_memset(module->symtab[count].name, 0, length); - rt_memcpy(module->symtab[count].name, strtab + symtab[i].st_name, length); + rt_memset((void*)module->symtab[count].name, 0, length); + rt_memcpy((void*)module->symtab[count].name, strtab + symtab[i].st_name, length); count++; } } @@ -732,7 +739,7 @@ rt_err_t rt_module_unload(rt_module_t module) rt_free(module->module_space); /* release module symbol table */ - for(i=0; insym; i++) rt_free(module->symtab[i].name); + for(i=0; insym; i++) rt_free((void *)module->symtab[i].name); if(module->symtab != RT_NULL) rt_free(module->symtab); /* delete module object */ diff --git a/src/rtm.c b/src/rtm.c index a0bafee0c76c8eb2c56222d2f16ab9b78dde275d..735852ad0d01a92696ac9f9967e477413ce9f629 100644 --- a/src/rtm.c +++ b/src/rtm.c @@ -26,130 +26,133 @@ /* * thread interface symbol */ -RTM_EXPORT(rt_thread_init) -RTM_EXPORT(rt_thread_detach) -RTM_EXPORT(rt_thread_create) -RTM_EXPORT(rt_thread_self) -RTM_EXPORT(rt_thread_find) -RTM_EXPORT(rt_thread_startup) -RTM_EXPORT(rt_thread_delete) -RTM_EXPORT(rt_thread_yield) -RTM_EXPORT(rt_thread_delay) -RTM_EXPORT(rt_thread_control) -RTM_EXPORT(rt_thread_suspend) -RTM_EXPORT(rt_thread_resume) -RTM_EXPORT(rt_thread_timeout) + +RTM_EXPORT(rt_thread_init); +RTM_EXPORT(rt_thread_detach); +RTM_EXPORT(rt_thread_create); +RTM_EXPORT(rt_thread_self); +RTM_EXPORT(rt_thread_find); +RTM_EXPORT(rt_thread_startup); +RTM_EXPORT(rt_thread_delete); +RTM_EXPORT(rt_thread_yield); +RTM_EXPORT(rt_thread_delay); +RTM_EXPORT(rt_thread_control); +RTM_EXPORT(rt_thread_suspend); +RTM_EXPORT(rt_thread_resume); +RTM_EXPORT(rt_thread_timeout); #ifdef RT_USING_SEMAPHORE /* * semaphore interface symbol */ -RTM_EXPORT(rt_sem_init) -RTM_EXPORT(rt_sem_detach) -RTM_EXPORT(rt_sem_create) -RTM_EXPORT(rt_sem_delete) -RTM_EXPORT(rt_sem_take) -RTM_EXPORT(rt_sem_trytake) -RTM_EXPORT(rt_sem_release) -RTM_EXPORT(rt_sem_control) +RTM_EXPORT(rt_sem_init); +RTM_EXPORT(rt_sem_detach); +RTM_EXPORT(rt_sem_create); +RTM_EXPORT(rt_sem_delete); +RTM_EXPORT(rt_sem_take); +RTM_EXPORT(rt_sem_trytake); +RTM_EXPORT(rt_sem_release); +RTM_EXPORT(rt_sem_control); #endif #ifdef RT_USING_MUTEX /* * mutex interface symbol */ -RTM_EXPORT(rt_mutex_init) -RTM_EXPORT(rt_mutex_detach) -RTM_EXPORT(rt_mutex_create) -RTM_EXPORT(rt_mutex_delete) -RTM_EXPORT(rt_mutex_take) -RTM_EXPORT(rt_mutex_release) -RTM_EXPORT(rt_mutex_control) +RTM_EXPORT(rt_mutex_init); +RTM_EXPORT(rt_mutex_detach); +RTM_EXPORT(rt_mutex_create); +RTM_EXPORT(rt_mutex_delete); +RTM_EXPORT(rt_mutex_take); +RTM_EXPORT(rt_mutex_release); +RTM_EXPORT(rt_mutex_control); #endif #ifdef RT_USING_EVENT /* * event interface symbol */ -RTM_EXPORT(rt_event_init) -RTM_EXPORT(rt_event_detach) -RTM_EXPORT(rt_event_create) -RTM_EXPORT(rt_event_delete) -RTM_EXPORT(rt_event_send) -RTM_EXPORT(rt_event_recv) -RTM_EXPORT(rt_event_control) +RTM_EXPORT(rt_event_init); +RTM_EXPORT(rt_event_detach); +RTM_EXPORT(rt_event_create); +RTM_EXPORT(rt_event_delete); +RTM_EXPORT(rt_event_send); +RTM_EXPORT(rt_event_recv); +RTM_EXPORT(rt_event_control); #endif #ifdef RT_USING_MAILBOX /* * mailbox interface symbol */ -RTM_EXPORT(rt_mb_init) -RTM_EXPORT(rt_mb_detach) -RTM_EXPORT(rt_mb_create) -RTM_EXPORT(rt_mb_delete) -RTM_EXPORT(rt_mb_send) -RTM_EXPORT(rt_mb_recv) -RTM_EXPORT(rt_mb_control) +RTM_EXPORT(rt_mb_init); +RTM_EXPORT(rt_mb_detach); +RTM_EXPORT(rt_mb_create); +RTM_EXPORT(rt_mb_delete); +RTM_EXPORT(rt_mb_send); +RTM_EXPORT(rt_mb_recv); +RTM_EXPORT(rt_mb_control); #endif #ifdef RT_USING_MESSAGEQUEUE /* * message queue interface symbol */ -RTM_EXPORT(rt_mq_init) -RTM_EXPORT(rt_mq_detach) -RTM_EXPORT(rt_mq_create) -RTM_EXPORT(rt_mq_delete) -RTM_EXPORT(rt_mq_send) -RTM_EXPORT(rt_mq_urgent) -RTM_EXPORT(rt_mq_recv) -RTM_EXPORT(rt_mq_control) +RTM_EXPORT(rt_mq_init); +RTM_EXPORT(rt_mq_detach); +RTM_EXPORT(rt_mq_create); +RTM_EXPORT(rt_mq_delete); +RTM_EXPORT(rt_mq_send); +RTM_EXPORT(rt_mq_urgent); +RTM_EXPORT(rt_mq_recv); +RTM_EXPORT(rt_mq_control); #endif #ifdef RT_USING_MEMPOOL /* * memory pool interface symbol */ -RTM_EXPORT(rt_mp_init) -RTM_EXPORT(rt_mp_detach) -RTM_EXPORT(rt_mp_create) -RTM_EXPORT(rt_mp_delete) -RTM_EXPORT(rt_mp_alloc) -RTM_EXPORT(rt_mp_free) +RTM_EXPORT(rt_mp_init); +RTM_EXPORT(rt_mp_detach); +RTM_EXPORT(rt_mp_create); +RTM_EXPORT(rt_mp_delete); +RTM_EXPORT(rt_mp_alloc); +RTM_EXPORT(rt_mp_free); #endif #ifdef RT_USING_HEAP /* * heap memory interface symbol */ -RTM_EXPORT(rt_malloc) -RTM_EXPORT(rt_free) -RTM_EXPORT(rt_realloc) -RTM_EXPORT(rt_calloc) +RTM_EXPORT(rt_malloc); +RTM_EXPORT(rt_free); +RTM_EXPORT(rt_realloc); +RTM_EXPORT(rt_calloc); #endif /* * clock & timer interface symbol */ -RTM_EXPORT(rt_tick_get) -RTM_EXPORT(rt_tick_from_millisecond) -RTM_EXPORT(rt_system_timer_init) -RTM_EXPORT(rt_system_timer_thread_init) -RTM_EXPORT(rt_timer_init) -RTM_EXPORT(rt_timer_detach) -RTM_EXPORT(rt_timer_create) -RTM_EXPORT(rt_timer_delete) -RTM_EXPORT(rt_timer_start) -RTM_EXPORT(rt_timer_stop) -RTM_EXPORT(rt_timer_control) +RTM_EXPORT(rt_tick_get); +RTM_EXPORT(rt_tick_from_millisecond); +RTM_EXPORT(rt_system_timer_init); +RTM_EXPORT(rt_system_timer_thread_init); +RTM_EXPORT(rt_timer_init); +RTM_EXPORT(rt_timer_detach); +RTM_EXPORT(rt_timer_create); +RTM_EXPORT(rt_timer_delete); +RTM_EXPORT(rt_timer_start); +RTM_EXPORT(rt_timer_stop); +RTM_EXPORT(rt_timer_control); /* * kservice interface symbol */ RTM_EXPORT(rt_memcpy) +RTM_EXPORT(rt_memcmp) RTM_EXPORT(rt_memset) RTM_EXPORT(rt_kprintf) RTM_EXPORT(rt_sprintf) +RTM_EXPORT(rt_strstr) /* * misc interface symbol @@ -160,6 +163,7 @@ extern int __aeabi_dmul; extern int __aeabi_i2d; extern int __aeabi_uidiv; extern int __aeabi_uidivmod; +extern int __aeabi_idivmod; extern int __aeabi_d2iz; RTM_EXPORT(__aeabi_ddiv) @@ -167,9 +171,11 @@ RTM_EXPORT(__aeabi_dmul) RTM_EXPORT(__aeabi_i2d) RTM_EXPORT(__aeabi_uidiv) RTM_EXPORT(__aeabi_idiv) +RTM_EXPORT(__aeabi_idivmod) RTM_EXPORT(__aeabi_uidivmod) RTM_EXPORT(__aeabi_d2iz) RTM_EXPORT(strcmp) +RTM_EXPORT(strcpy) RTM_EXPORT(strlen) RTM_EXPORT(rand) RTM_EXPORT(memset) @@ -189,13 +195,27 @@ RTM_EXPORT(time) #endif +#ifdef RT_USING_DFS +#include + +RTM_EXPORT(open) +RTM_EXPORT(close) +RTM_EXPORT(read) +RTM_EXPORT(write) +RTM_EXPORT(stat) +#endif + #ifdef RT_USING_RTGUI /* FIX ME , should be removed from here */ #include +#include #include #include #include #include +#include +#include +#include RTM_EXPORT(rtgui_view_show) RTM_EXPORT(rtgui_view_create) @@ -212,11 +232,27 @@ RTM_EXPORT(rtgui_workbench_destroy) RTM_EXPORT(rtgui_workbench_close) RTM_EXPORT(rtgui_timer_start) RTM_EXPORT(rtgui_timer_create) +RTM_EXPORT(rtgui_timer_destory) RTM_EXPORT(rtgui_timer_stop) -RTM_EXPORT(rtgui_widget_focus) -RTM_EXPORT(rtgui_widget_set_event_handler) RTM_EXPORT(rtgui_thread_register) RTM_EXPORT(rtgui_thread_deregister) - +RTM_EXPORT(rtgui_widget_focus) +RTM_EXPORT(rtgui_widget_set_event_handler) +RTM_EXPORT(rtgui_widget_rect_to_device) +RTM_EXPORT(rtgui_widget_update) +RTM_EXPORT(rtgui_widget_get_rect) +RTM_EXPORT(rtgui_widget_set_rect) +RTM_EXPORT(rtgui_widget_get_toplevel) +RTM_EXPORT(rtgui_panel_register) +RTM_EXPORT(rtgui_panel_set_default_focused) +RTM_EXPORT(rtgui_button_create) +RTM_EXPORT(rtgui_button_destroy) +RTM_EXPORT(rtgui_button_set_onbutton) +RTM_EXPORT(rtgui_container_add_child) +RTM_EXPORT(rtgui_filelist_view_create) +RTM_EXPORT(rtgui_filelist_view_get_fullpath) +RTM_EXPORT(rtgui_list_view_create) +RTM_EXPORT(rtgui_list_view_destroy) #endif #endif +