Browse Source

no message

Hongtae Kim 7 years ago
parent
commit
6fc403e12a
1 changed files with 17 additions and 2 deletions
  1. 17
    2
      TestApp1/TestApp1.cpp

+ 17
- 2
TestApp1/TestApp1.cpp View File

6
 #endif
6
 #endif
7
 
7
 
8
 #include <DK.h>
8
 #include <DK.h>
9
-
9
+#include <functional>
10
 class TestApp1 : public DKApplication
10
 class TestApp1 : public DKApplication
11
 {
11
 {
12
 public:
12
 public:
22
 int main(int argc, const char * argv[])
22
 int main(int argc, const char * argv[])
23
 #endif
23
 #endif
24
 {
24
 {
25
-	return TestApp1().Run();
25
+	TestApp1 app;
26
+	app.EventLoop()->Post(DKFunction([&]()
27
+	{
28
+		DKLog("test1");
29
+	})->Invocation(), 2);
30
+	app.EventLoop()->Post(DKFunction([&]()
31
+	{
32
+		DKLog("test2");
33
+	})->Invocation(), 4);
34
+	app.EventLoop()->Post(DKFunction([&]()
35
+	{
36
+		DKLog("Terminate!!");
37
+		app.Terminate(0);
38
+	})->Invocation(), 6);
39
+
40
+	return app.Run();
26
 }
41
 }