Changeset 26757 for lang/cplusplus
- Timestamp:
- 12/15/08 16:21:11 (4 years ago)
- Location:
- lang/cplusplus/i3/trunk
- Files:
-
- 11 modified
-
configure.ac (modified) (1 diff)
-
src/Common.h (modified) (2 diffs)
-
src/CompletionWindow.h (modified) (1 diff)
-
src/ConfigFile.cpp (modified) (1 diff)
-
src/InputWindow.h (modified) (1 diff)
-
src/OutputWindow.h (modified) (1 diff)
-
src/ShellManager.h (modified) (1 diff)
-
src/gui-windows/CompletionWindowCore.h (modified) (1 diff)
-
src/gui-windows/InputWindowCore.cpp (modified) (4 diffs)
-
src/gui-windows/InputWindowCore.h (modified) (2 diffs)
-
src/mol/include/mol/gui-windows/GuiModule.h (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/cplusplus/i3/trunk/configure.ac
r26336 r26757 87 87 CFLAGS_ORIG="$CFLAGS" 88 88 CFLAGS="$CFLAGS $LIBINTL" 89 AC_CHECK_FUNC ([wbindtextdomain])89 AC_CHECK_FUNCS([wbindtextdomain]) 90 90 CFLAGS="$CFLAGS_ORIG" 91 91 -
lang/cplusplus/i3/trunk/src/Common.h
r25972 r26757 14 14 # define PACKAGE_NAME "i3" 15 15 # define PACKAGE_VERSION "1.0" 16 # define ENABLE_NLS 116 //# define ENABLE_NLS 1 17 17 # define ICONV_CONST const 18 18 #endif … … 33 33 // mol 34 34 #include <mol/Mol.h> 35 #include <mol/Module.h>36 #include <mol/Thread.h>37 35 38 36 namespace i3 -
lang/cplusplus/i3/trunk/src/CompletionWindow.h
r18130 r26757 4 4 5 5 #pragma once 6 #include "Common.h"7 6 #include "CompletionWindowCore.h" 8 7 -
lang/cplusplus/i3/trunk/src/ConfigFile.cpp
r26335 r26757 1 1 #include <PrecompiledHeaders.h> 2 2 #include "Common.h" 3 #include "Mediator.h"4 3 #include "ConfigFile.h" 5 4 -
lang/cplusplus/i3/trunk/src/InputWindow.h
r18130 r26757 1 1 #pragma once 2 2 3 #include <mol/GuiModule.h> 3 4 #include "Common.h" 4 5 #include "InputWindowCore.h" -
lang/cplusplus/i3/trunk/src/OutputWindow.h
r18130 r26757 4 4 5 5 #pragma once 6 #include <mol/GuiModule.h> 6 7 #include "Common.h" 7 8 -
lang/cplusplus/i3/trunk/src/ShellManager.h
r25984 r26757 4 4 5 5 #pragma once 6 #include <mol/Module.h> 6 7 #include "Common.h" 7 #include <mol/Module.h>8 8 9 9 namespace i3 -
lang/cplusplus/i3/trunk/src/gui-windows/CompletionWindowCore.h
r18130 r26757 4 4 5 5 #pragma once 6 #include <mol/GuiModule.h> 6 7 #include "Common.h" 7 #include "CompletionWindowCore.h"8 8 9 9 namespace i3 -
lang/cplusplus/i3/trunk/src/gui-windows/InputWindowCore.cpp
r25984 r26757 9 9 10 10 template <> 11 InputWindowCore<InputWindow>::InputWindowCore(Mediator& mediator) : mediator(mediator), hEdit(NULL) 11 InputWindowCore<InputWindow>::InputWindowCore(Mediator& mediator) : mediator(mediator), hEdit(NULL), riched32_dll(NULL) 12 12 { 13 13 } … … 30 30 MessageBox(NULL, _T("bye"), _T("NOT TRANSLATED 645678241758"), MB_OK); 31 31 32 if (riched32_dll) { 33 FreeLibrary(riched32_dll); 34 } 35 32 36 //ofstream o7("nul"); 33 37 //ofstream o8("nul"); … … 49 53 } 50 54 51 LoadLibrary(_T("RICHED32.DLL")); 52 //LoadLibrary(_T("Riched20.dll")); // required? 55 riched32_dll = LoadLibrary(_T("riched20.dll")); 56 //riched32_dll = LoadLibrary(_T("riched32.dll")); 57 53 58 54 59 const TCHAR ClassName[] = _T("InputWindow 0zuhiIf"); … … 102 107 hEdit = CreateWindowEx( 103 108 0, 104 //_T("RICHEDIT_CLASS"),105 _T("RICHEDIT"),109 RICHEDIT_CLASS, 110 //_T("RICHEDIT"), 106 111 _T(""), 107 112 WS_CHILD | WS_VISIBLE | WS_BORDER, -
lang/cplusplus/i3/trunk/src/gui-windows/InputWindowCore.h
r23069 r26757 1 1 #pragma once 2 2 3 #include <mol/GuiModule.h> 3 4 #include "Common.h" 4 #include <windows.h>5 5 6 6 namespace i3 … … 25 25 private: 26 26 HWND hEdit; 27 HMODULE riched32_dll; 27 28 public: 28 29 // for copipe -
lang/cplusplus/i3/trunk/src/mol/include/mol/gui-windows/GuiModule.h
r25984 r26757 70 70 71 71 LONG_PTR breakLoopRequest; 72 72 73 public: 73 74 Child& getChild() … … 78 79 { 79 80 InterlockedExchangePointer(&breakLoopRequest, 1); 80 if (getWindow()) 81 { 82 if (DestroyWindow(getWindow()) != 0) 83 { 84 // ok 85 } 86 else 87 { 88 // error 89 } 90 setWindow(NULL); 81 if (InterlockedExchangePointer(&destroyed, 1) == 0) 82 { 83 HWND w = getWindow(); 84 if (IsWindow(w)) 85 { 86 if (DestroyWindow(w) != 0) 87 { 88 // ok 89 } 90 else 91 { 92 // error 93 DebugBreak(); 94 } 95 } 91 96 } 92 97 } 93 98 ~GuiModule() { 99 assert(!IsWindow(getWindow()) || destroyed); 94 100 destroy(); 95 101 } 96 102 void loop() 97 103 { 98 if (breakLoopRequest) 99 { 100 PostQuitMessage(0); 104 if (InterlockedExchangePointer(&breakLoopRequest, 0)) // danger ? 105 { 106 InterlockedExchangePointer(&breakLoopRequest, 1); 107 //PostQuitMessage(0); 101 108 return; 102 109 } 103 110 104 SetTimer(NULL,0,10000,NULL); // for check "break message loop request"111 //SetTimer(NULL, 0, 10000, NULL); // for check "break message loop request" 105 112 106 113 MSG msg = {}; 107 for (BOOL result = 0; (result = GetMessage(&msg, NULL, 0, 0)), result;) 108 { 109 if (result == -1) 114 for (;;) 115 { 116 BOOL result = GetMessage(&msg, NULL, 0, 0); 117 if (!result) 118 { 119 break; 120 } 121 else if (result == -1) 110 122 { 111 123 // error … … 113 125 break; 114 126 } 115 if (breakLoopRequest) // danger ?116 {117 PostQuitMessage(0);118 break;119 }127 //if (breakLoopRequest) // danger ? 128 //{ 129 // PostQuitMessage(0); 130 // break; 131 //} 120 132 121 133 TranslateMessage(&msg); … … 124 136 } 125 137 126 GuiModule(): hWnd(NULL), wndproc(getChild()), breakLoopRequest(false), repost(false), handled(true) 138 GuiModule(): hWnd(NULL), wndproc(getChild()), breakLoopRequest(false), repost(false), handled(true), destroyed(0) 127 139 { 128 140 } … … 156 168 bool repost; 157 169 bool handled; 170 DWORD_PTR destroyed; 158 171 protected: 159 172 void repostEvent() … … 173 186 e->execute(e, &getChild()); 174 187 return 0; 188 } else if (msg == WM_DESTROY || msg == WM_QUIT) { 189 InterlockedExchangePointer(&destroyed, 1); 175 190 } 176 191 … … 179 194 { 180 195 #include "MessageCracker-inl.h" 196 default: 197 SetMsgHandled(false); 198 break; 181 199 } 182 200
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)