2010-12-15 08:22:55 +08:00
|
|
|
#include "ftk.h"
|
|
|
|
|
|
|
|
#ifdef FTK_AS_PLUGIN
|
|
|
|
#include "ftk_app_demo.h"
|
|
|
|
FTK_HIDE int FTK_MAIN(int argc, char* argv[]);
|
|
|
|
FtkApp* ftk_app_demo_hello_create()
|
|
|
|
{
|
|
|
|
return ftk_app_demo_create(_("hello"), ftk_main);
|
|
|
|
}
|
|
|
|
#else
|
|
|
|
#define FTK_HIDE extern
|
|
|
|
#endif /*FTK_AS_PLUGIN*/
|
|
|
|
|
|
|
|
FTK_HIDE int FTK_MAIN(int argc, char* argv[])
|
|
|
|
{
|
|
|
|
FtkWidget* win = NULL;
|
|
|
|
|
|
|
|
FTK_INIT(argc, argv);
|
|
|
|
win = ftk_app_window_create();
|
2011-05-23 09:04:03 +08:00
|
|
|
ftk_window_set_animation_hint(win, "app_main_window");
|
2010-12-15 08:22:55 +08:00
|
|
|
ftk_widget_set_text(win, "Hello FTK!");
|
|
|
|
ftk_widget_show(win, 1);
|
|
|
|
FTK_QUIT_WHEN_WIDGET_CLOSE(win);
|
|
|
|
|
|
|
|
FTK_RUN();
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|