- Timestamp:
- 11/15/10 10:52:45 (3 years ago)
- Location:
- lang/objective-cplusplus/i3/trunk
- Files:
-
- 7 modified
-
src/i3/Mediator.cc (modified) (1 diff)
-
src/i3/Mediator.h (modified) (1 diff)
-
src/i3/ui-cocoa/tests/TestUI.cc (modified) (2 diffs)
-
src/i3/ui-windows/InputWindowPlatform.cc (modified) (5 diffs)
-
src/mil/tests/New.cc (modified) (1 diff)
-
unix/am/i3_test.am (modified) (1 diff)
-
unix/am/mil_test.am (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/objective-cplusplus/i3/trunk/src/i3/Mediator.cc
r37884 r38674 57 57 return 0; 58 58 } 59 CompletionWindow& Mediator::getCompletionWindow() {60 return completionWindow;61 }62 OutputWindow& Mediator::getOutputWindow() {63 return outputWindow;64 }65 InputWindow& Mediator::getInputWindow() {66 return inputWindow;67 }68 ShellManager& Mediator::getShellManager() {69 return shellManager;70 }71 Delegate& Mediator::getDelegate() {72 return delegate;73 }74 59 } 75 60 -
lang/objective-cplusplus/i3/trunk/src/i3/Mediator.h
r36210 r38674 20 20 Delegate delegate; 21 21 public: 22 CompletionWindow& getCompletionWindow(); 23 OutputWindow& getOutputWindow(); 24 InputWindow& getInputWindow(); 25 ShellManager& getShellManager(); 26 Delegate& getDelegate(); 22 template <class Event, class Sender> 23 void postToCompletionWindow(Event& e, Sender& s) { 24 completionWindow.post(e, s); 25 } 26 template <class Event, class Sender> 27 void postToOutputWindow(Event& e, Sender& s) { 28 outputWindow.post(e, s); 29 } 30 template <class Event, class Sender> 31 void postToInputWindow(Event& e, Sender& s) { 32 inputWindow.post(e, s); 33 } 34 template <class Event, class Sender> 35 void postToShellManager(Event& e, Sender& s) { 36 shellManager.post(e, s); 37 } 38 template <class Event, class Sender> 39 void postToDelegate(Event& e, Sender& s) { 40 delegate.post(e, s); 41 } 27 42 Mediator(); 28 43 ~Mediator(); -
lang/objective-cplusplus/i3/trunk/src/i3/ui-cocoa/tests/TestUI.cc
r38667 r38674 21 21 return 9012; 22 22 } 23 24 int filter4(int, char**) { 25 throw std::runtime_error("filter4"); 26 return 3456; 27 } 28 23 29 } 24 30 … … 40 46 QT_CHECK(strcmp("hoge", [[exception name] UTF8String]) == 0); 41 47 QT_CHECK(strcmp("hige", [[exception reason] UTF8String]) == 0); 48 49 std::runtime_error e(""); 50 try { 51 exception = nil; 52 exception = filter_exception_and_start_objc(&result, filter4, 0, NULL); 53 } catch (std::runtime_error e_) { 54 e = e_; 55 } 56 QT_CHECK(result == EXIT_FAILURE); 57 QT_CHECK(exception == nil); 58 QT_CHECK(strcmp(e.what(), "filter4") == 0); 42 59 } 43 60 -
lang/objective-cplusplus/i3/trunk/src/i3/ui-windows/InputWindowPlatform.cc
r38658 r38674 66 66 return; 67 67 } else if (_tcscmp(e.command, _T("exit")) == 0) { 68 ShowWindow(mediator.getInputWindow().window.load(), SW_HIDE);68 //ShowWindow(mediator.getInputWindow().window.load(), SW_HIDE); 69 69 ExitEvent ex; 70 mediator. getInputWindow().post(ex, *this);70 mediator.postToInputWindow(ex, *this); 71 71 tfree(e.command); 72 72 return; 73 73 } 74 74 75 mediator. getShellManager().post(e, *this);75 mediator.postToShellManager(e, *this); 76 76 //HINSTANCE ins = ShellExecute( 77 77 // NULL, // �e�E�B���h�E�̃n���h�� … … 105 105 ///int result = GetWindowText(e.edit, data, _countof(data)); 106 106 std::vector<TCHAR> data; 107 getChild().mediator.getInputWindow().read(data); 107 data.push_back(0); 108 //getChild().mediator.getInputWindow().read(data); 108 109 109 110 if (!data[0]) { … … 124 125 BOOST_STATIC_ASSERT(sizeof(HICON) == sizeof(DWORD_PTR)); 125 126 126 HICON old = getChild().mediator.getInputWindow().icon.exchange(new_icon); 127 if (old) { 128 DestroyIcon(old); 129 } 130 HWND hWnd = getChild().mediator.getInputWindow().getWindow(); 131 RECT r = { 132 0, 133 0, 134 32, 135 32 136 }; 137 127 //HICON old = getChild().mediator.sendToInputWindow().icon.exchange(new_icon); 128 //if (old) { 129 // DestroyIcon(old); 130 //} 131 //HWND hWnd = getChild().mediator.getInputWindow().getWindow(); 132 //RECT r = { 133 // 0, 134 // 0, 135 // 32, 136 // 32 137 //}; 138 138 // 139 139 // TODO: InvalidateRect(,,TRUE) and UpdateWindow() redraw I/O policy 140 140 //RedrawWindow(hWnd, &r, NULL, RDW_INTERNALPAINT); // should rewrite using postmessage 141 141 //InvalidateRect(hWnd, &r, TRUE); 142 InvalidateRect(hWnd, NULL, FALSE);142 //InvalidateRect(hWnd, NULL, FALSE); 143 143 //UpdateWindow(hWnd); 144 144 } … … 431 431 432 432 EditChangedEvent e = {}; 433 getChild().mediator. getDelegate().post(e, *this);433 getChild().mediator.postToDelegate(e, *this); 434 434 SetMsgHandled(false); 435 435 } … … 466 466 } 467 467 memcpy(e.command, ptr, bytes); 468 getChild().mediator. getDelegate().post(e, *this);468 getChild().mediator.postToDelegate(e, *this); 469 469 SetWindowText(edit, _T("")); 470 470 } -
lang/objective-cplusplus/i3/trunk/src/mil/tests/New.cc
r38662 r38674 7 7 #include "Test.h" 8 8 9 namespace NewTest { 10 11 struct Simple { 12 void execute(AppendString& e) { 13 } 14 }; 9 15 10 16 QT_TEST(test_New) { 17 mil::Module<Simple> simple1; 18 mil::Module<Simple> simple2; 19 20 } 11 21 12 22 } 13 14 -
lang/objective-cplusplus/i3/trunk/unix/am/i3_test.am
r38667 r38674 5 5 src/i3/tests/Tester.cc \ 6 6 src/i3/tests/TestNLS.cc \ 7 src/i3/tests/TestConfigFile.cc \8 src/i3/tests/TestEvent.cc \9 7 src/i3/$(OS_DIR)/tests/TestOS.cc \ 10 8 src/i3/$(UI_DIR)/tests/TestUI.cc 11 9 10 11 #src/i3/tests/TestConfigFile.cc \ 12 #src/i3/tests/TestEvent.cc \ 13 # 14 12 15 i3_test_CPPFLAGS = -I$(srcdir)/src/i3/tests 16 i3_test_LDFLAGS = -l./libmilobjcexceptionfilter.a 13 17 14 18 if USE_GCC_PRECOMPILED_HEADER -
lang/objective-cplusplus/i3/trunk/unix/am/mil_test.am
r38667 r38674 3 3 mil_test_SOURCES = \ 4 4 src/mil/tests/New.cc \ 5 src/mil/tests/Pool2.cc \6 src/mil/tests/Memory.cc \7 src/mil/tests/Thread.cc \8 src/mil/tests/DoubleBuffer.cc \9 src/mil/tests/MscCrt.cc \10 src/mil/tests/Synchronize.cc \11 src/mil/tests/Atomic.cc \12 src/mil/tests/Module.cc \13 5 src/mil/tests/Main.cc \ 14 6 src/mil/StaticData.cc … … 17 9 # 18 10 11 # src/mil/tests/Pool.cc \ 12 # src/mil/tests/Pool2.cc \ 13 # src/mil/tests/Memory.cc \ 14 # src/mil/tests/Thread.cc \ 15 # src/mil/tests/DoubleBuffer.cc \ 16 # src/mil/tests/MscCrt.cc \ 17 # src/mil/tests/Synchronize.cc \ 18 # src/mil/tests/Atomic.cc \ 19 # src/mil/tests/Module.cc \ 20 # 21 # 22 23 mil_test_CPPFLAGS = $(AM_CPPFLAGS) 24 mil_test_LDFLAGS = $(AM_LDFLAGS) 25 mil_test_LDADD = $(AM_LDADD) 26 19 27 if WITH_UI_WINDOWS 20 28 mil_test_SOURCES += src/mil/windows/WindowProcedureTest.cc
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)