/src/demos/demo_hello.c
C | 29 lines | 23 code | 6 blank | 0 comment | 0 complexity | d8d581b940917870a4943ce8daab3587 MD5 | raw file
1#include "ftk.h" 2 3#ifdef FTK_AS_PLUGIN 4#include "ftk_app_demo.h" 5FTK_HIDE int FTK_MAIN(int argc, char* argv[]); 6FtkApp* ftk_app_demo_hello_create() 7{ 8 return ftk_app_demo_create(_("hello"), ftk_main); 9} 10#else 11#define FTK_HIDE extern 12#endif /*FTK_AS_PLUGIN*/ 13 14FTK_HIDE int FTK_MAIN(int argc, char* argv[]) 15{ 16 FtkWidget* win = NULL; 17 18 FTK_INIT(argc, argv); 19 win = ftk_app_window_create(); 20 ftk_window_set_animation_hint(win, "app_main_window"); 21 ftk_widget_set_text(win, "Hello FTK!"); 22 ftk_widget_show(win, 1); 23 FTK_QUIT_WHEN_WIDGET_CLOSE(win); 24 25 FTK_RUN(); 26 27 return 0; 28} 29