30 lines
572 B
C
30 lines
572 B
C
#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();
|
|
ftk_window_set_animation_hint(win, "app_main_window");
|
|
ftk_widget_set_text(win, "Hello FTK!");
|
|
ftk_widget_show(win, 1);
|
|
FTK_QUIT_WHEN_WIDGET_CLOSE(win);
|
|
|
|
FTK_RUN();
|
|
|
|
return 0;
|
|
}
|
|
|