Changeset 36221 for lang/objective-cplusplus/i3/trunk/src
- Timestamp:
- 12/21/09 03:12:38 (3 years ago)
- Location:
- lang/objective-cplusplus/i3/trunk/src
- Files:
-
- 9 modified
-
Mediator.cpp (modified) (1 diff)
-
Test2.cpp (modified) (1 diff)
-
Test4.cpp (modified) (1 diff)
-
Tester.cpp (modified) (4 diffs)
-
gui-windows/InputWindowPlatform.cpp (modified) (3 diffs)
-
mil/include/mil/gui-windows/GuiModule.h (modified) (1 diff)
-
mil/include/mil/os-windows/Debug.h (modified) (1 diff)
-
mil/src/test/Main.cpp (modified) (1 diff)
-
os-windows/Os.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lang/objective-cplusplus/i3/trunk/src/Mediator.cpp
r36210 r36221 21 21 #if !defined(MIL_GUI_COCOA) || defined(__APPLE__) 22 22 // threaded 23 inputWindow.createUI();24 //completionWindow.start();25 //outputWindow.start();26 //shellManager.start();27 //delegate.start();23 //inputWindow.createUI(); 24 completionWindow.start(); 25 outputWindow.start(); 26 shellManager.start(); 27 delegate.start(); 28 28 #ifdef I3_TEST 29 29 inputWindow.start(); -
lang/objective-cplusplus/i3/trunk/src/Test2.cpp
r35623 r36221 12 12 int argc = 0; 13 13 char** argv = NULL; 14 init_os_global_data(argc, argv);15 init_gui_global_data(argc, argv);16 14 17 15 TCHAR temp[STACKABLE_MAX_PATH] = {}; -
lang/objective-cplusplus/i3/trunk/src/Test4.cpp
r36088 r36221 18 18 int argc = _countof(argv); 19 19 20 exit_status exit_status; 20 int exit_status; 21 22 exit_status = init_common_global_data(argc, argv); 23 QT_CHECK(!exit_status); 21 24 22 25 exit_status = init_os_global_data(argc, argv); -
lang/objective-cplusplus/i3/trunk/src/Tester.cpp
r36214 r36221 8 8 Tester* tester_ptr = NULL; 9 9 10 #define CHECK_VALID { if (!valid) { throw std::logic_error("Tester"); } }10 #define CHECK_VALID { if (!valid) { throw std::logic_error("Tester"); }} 11 11 12 12 Tester::Tester() : mediator(*(std::auto_ptr<Mediator>(new Mediator()))), valid(false), passed(true), index(0) { … … 31 31 CHECK_VALID; 32 32 33 std::cout << "Test [" << getName() << "] passed" << std::endl;33 //std::cout << "Test [" << getName() << "] passed" << std::endl; 34 34 synchronized (mutex) { 35 35 passed = true; … … 58 58 } 59 59 if (!startNext()) { 60 debug << "run() return";60 //debug << "run() return"; 61 61 return; 62 62 } … … 92 92 } 93 93 94 struct Focus { 95 }; 96 97 template <> 98 void InputWindow::execute(Focus&) { 99 SetForegroundWindow(hLocalWnd); 100 SetFocus(hEdit); 101 } 102 103 void simple_input(Tester& t) { 104 t.next("simple input"); 105 Focus f; 106 t.mediator.getInputWindow().post(f, t); 107 sleep(1); 108 109 keybd_event('F', 0, 0, 0 ); 110 keybd_event('F', 0, KEYEVENTF_KEYUP, 0); 111 keybd_event('O', 0, 0, 0 ); 112 keybd_event('O', 0, KEYEVENTF_KEYUP, 0); 113 keybd_event('O', 0, 0, 0 ); 114 keybd_event('O', 0, KEYEVENTF_KEYUP, 0); 115 116 keybd_event(VK_RETURN, 0, 0, 0 ); 117 keybd_event(VK_RETURN, 0, KEYEVENTF_KEYUP, 0); 118 } 119 94 120 static void (*tester_tests[])(Tester&) = { 95 121 simple_ping, 96 122 simple_ping2, 97 123 simple_ping, 124 simple_input, 98 125 }; 99 126 -
lang/objective-cplusplus/i3/trunk/src/gui-windows/InputWindowPlatform.cpp
r36130 r36221 14 14 TCHAR* command; 15 15 }; 16 17 template <> 18 void ShellManager::beforeExecute(ExecuteEvent& e) { 19 if (tester.getName() == "simple input") { 20 QT_CHECK(i3::string(e.command) == _T("foo")); 21 tester.pass(); 22 } 23 } 16 24 17 25 template <> … … 466 474 void InputWindowPlatform<InputWindow>::createUI() { 467 475 if (hLocalWnd) { 476 debug << "createUI re-called"; 477 if (!IsWindow(hLocalWnd)) { 478 debug << "hLocalWnd is not window"; 479 } 468 480 return; 469 481 } … … 740 752 createUI(); 741 753 UpdateWindow(hLocalWnd); 742 ShowWindow (hLocalWnd, SW_SHOW);754 ShowWindowAsync(hLocalWnd, SW_SHOW); 743 755 loop(); 744 756 } -
lang/objective-cplusplus/i3/trunk/src/mil/include/mil/gui-windows/GuiModule.h
r35976 r36221 153 153 } 154 154 155 assert(GetWindowThreadProcessId(this->hLocalWnd, NULL) == GetCurrentThreadId()); 156 155 157 MSG msg = {}; 156 158 //while (__builtin_expect(!breakLoopRequest, true)) -
lang/objective-cplusplus/i3/trunk/src/mil/include/mil/os-windows/Debug.h
r36216 r36221 175 175 cout << data.str() << "," << file << ":" << line << ",last_error=" << last_error << flush; 176 176 177 LPVOIDbuf = NULL;177 char* buf = NULL; 178 178 if (FormatMessageA( 179 179 FORMAT_MESSAGE_ALLOCATE_BUFFER | 180 180 FORMAT_MESSAGE_FROM_SYSTEM | 181 FORMAT_MESSAGE_IGNORE_INSERTS|FORMAT_MESSAGE_MAX_WIDTH_MASK, 181 FORMAT_MESSAGE_IGNORE_INSERTS| 182 FORMAT_MESSAGE_MAX_WIDTH_MASK, 182 183 NULL, 183 184 last_error, -
lang/objective-cplusplus/i3/trunk/src/mil/src/test/Main.cpp
r36214 r36221 10 10 } 11 11 12 int start(int argc, char** argv) { 12 int start(int argc, char** argv) { 13 13 14 #ifdef MIL_GUI_COCOA 14 15 [NSApplication sharedApplication]; -
lang/objective-cplusplus/i3/trunk/src/os-windows/Os.h
r35906 r36221 19 19 namespace i3 { 20 20 //typedef ::TCHAR TCHAR; 21 exit_statuscheck_args();21 int check_args(); 22 22 23 23 struct Os {
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)