Changeset 36088 for lang/objective-cplusplus/i3/trunk
- Timestamp:
- 12/07/09 21:22:45 (3 years ago)
- Location:
- lang/objective-cplusplus/i3/trunk
- Files:
-
- 18 modified
- 1 copied
-
Makefile.am (modified) (1 diff)
-
am/i3.am (modified) (3 diffs)
-
am/i3_test.am (modified) (1 diff)
-
configure.ac (modified) (2 diffs)
-
scripts/ac_init_version.sh (modified) (1 diff)
-
src/Common.h (modified) (2 diffs)
-
src/Initial.h (modified) (2 diffs)
-
src/Mediator.cpp (modified) (1 diff)
-
src/Test4.cpp (modified) (1 diff)
-
src/Tester.cpp (modified) (3 diffs)
-
src/Version.h (modified) (1 diff)
-
src/gui-windows/InputWindowPlatform.cpp (modified) (4 diffs)
-
src/os-windows/Pty.cpp (modified) (2 diffs)
-
tmp/i3.rc (copied) (copied from lang/objective-cplusplus/i3/trunk/windows/resources/i3.rc) (2 diffs)
-
windows/i3_test.vcproj (modified) (1 diff)
-
windows/mil_test.vcproj (modified) (4 diffs)
-
windows/resources/fakecygpty.rc (modified) (1 diff)
-
windows/resources/resource.h (modified) (1 diff)
-
www/default.css (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lang/objective-cplusplus/i3/trunk/Makefile.am
r35900 r36088 4 4 5 5 bin_PROGRAMS = i3 6 CLEANFILES = *.gcno po/stamp-po #XXXpo/stamp-po!?6 CLEANFILES = *.gcno po/stamp-po 7 7 DISTCLEANFILES = 8 8 BUILT_SOURCES = -
lang/objective-cplusplus/i3/trunk/am/i3.am
r35953 r36088 2 2 # Common 3 3 4 i3_exe : i3${EXEEXT} # for IDE4 i3_exe : i3${EXEEXT} # for IDE 5 5 6 6 i3_SOURCES_NO_MAIN = \ … … 16 16 src/${GUI_DIR}/Gui.cpp \ 17 17 src/${GUI_DIR}/InputWindowPlatform.cpp \ 18 src/${GUI_DIR}/OutputWindowPlatform.cpp \ 18 19 src/${GUI_DIR}/CompletionWindowPlatform.cpp 19 20 #src/ConfigFile.cpp … … 52 53 #i3_SOURCES_NO_MAIN += src/os-windows/Utf8ToUtf16Stream.cpp 53 54 54 i3_CXXFLAGS += -DMIL_OS_WINDOWS55 i3_LDADD += -lpsapi -lshlwapi55 i3_CXXFLAGS += -DMIL_OS_WINDOWS 56 i3_LDADD += -lpsapi -lshlwapi 56 57 else 57 i3_CXXFLAGS += -DMIL_OS_UNIX58 i3_CXXFLAGS += -DMIL_OS_UNIX 58 59 endif 59 60 60 61 if WITH_GUI_WINDOWS 62 61 63 i3_CXXFLAGS += -DMIL_GUI_WINDOWS -fno-operator-names 64 i3_SOURCES_NO_MAIN += 65 i3_LDADD += resource.o 66 67 resource.o: ${top_srcdir}/windows/resources/i3.rc 68 iconv -f UTF-16LE -t UTF-8 $< > $<.utf-8.c 69 perl -pe 's/^\xEF\xBB\xBF//' $<.utf-8.c > $<.utf-8.nobom.c 70 ${CPP} $<.utf-8.nobom.c -o $<.preprecessed.rc 71 ${CROSS_COMPILE}windres -O coff -o $@ -i $<.preprecessed.rc 72 62 73 if WITH_OS_WINDOWS 63 i3_LDFLAGS += -mwindows74 i3_LDFLAGS += -mwindows 64 75 endif 65 i3_LDADD += -lgdi32 -luser32 -lpsapi -lshlwapi -lcomctl3276 i3_LDADD += -lgdi32 -luser32 -lpsapi -lshlwapi -lcomctl32 66 77 else 67 78 i3_SOURCES_NO_MAIN += src/mil/include/mil/StaticDataObjc.cpp 68 79 i3_CXXFLAGS += -DMIL_GUI_COCOA ${COCOA_CXXFLAGS} 69 80 i3_LDADD += ${COCOA_LIBS} 70 i3_OBJCFLAGS = ${i3_CXXFLAGS}71 81 endif 72 82 -
lang/objective-cplusplus/i3/trunk/am/i3_test.am
r35836 r36088 2 2 # Common 3 3 4 i3_test_exe : i3_test${EXEEXT}5 i3_test2_exe : i3_test2${EXEEXT}4 i3_test_exe : i3_test${EXEEXT} 5 i3_test2_exe : i3_test2${EXEEXT} 6 6 7 7 i3_test_SOURCES = ${i3_SOURCES_NO_MAIN} \ -
lang/objective-cplusplus/i3/trunk/configure.ac
r36037 r36088 131 131 132 132 if test "$with_gui" != "windows"; then 133 AC_MSG_CHECKING([ objective-c++])133 AC_MSG_CHECKING([Objective C++]) 134 134 prologue="class Foo {}; @interface Bar {} @end @implementation Bar @end" 135 135 body="Foo foo; Bar* bar;" … … 139 139 [AC_LANG_PROGRAM([[$prologue]], [[$body]])], 140 140 [AC_MSG_RESULT([yes])], 141 [AC_MSG_FAILURE([ objective-c++ compiler/linker does not work])])141 [AC_MSG_FAILURE([Objective C++ compiler/linker does not work])]) 142 142 AC_CHECK_HEADERS([boost/ptr_container/detail/static_move_ptr.hpp boost/detail/is_incrementable.hpp]) 143 143 LDFLAGS="$LDFLAGS_ORIG" -
lang/objective-cplusplus/i3/trunk/scripts/ac_init_version.sh
r35843 r36088 1 1 # -*- coding: us-ascii-unix -*- 2 2 3 VERSION=`cat src/Version.h | tr -d '\r\n' | sed 's/^[[:space:]]*\"\([[:graph:]]*\)\"[[:space:]]*$/\1/'` 3 I3_VERSION_MAJOR=` grep I3_VERSION_MAJOR src/Version.h | cut -d " " -f 3` 4 I3_VERSION_MINOR=` grep I3_VERSION_MINOR src/Version.h | cut -d " " -f 3` 5 I3_VERSION_EXTENSION=`grep I3_VERSION_EXTENSION src/Version.h | cut -d " " -f 3` 4 6 5 which svn > /dev/null 2> /dev/null 6 if [ ${?} -ne 0 ]; then 7 echo ${VERSION}.unknown-revision 8 exit 9 fi 7 VERSION="${I3_VERSION_MAJOR}.${I3_VERSION_MINOR}${I3_VERSION_EXTENSION}" 8 # which svn > /dev/null 2> /dev/null 9 # if [ ${?} -ne 0 ]; then 10 # echo ${VERSION}.unknown-revision 11 # exit 12 # fi 10 13 11 REVISION=`LC_ALL=en svn info | grep "Last Changed Rev:" | head -n 1 | awk '{print $4}'`12 UPDATES=`svn status | grep -v "^\?"`13 if [ "${UPDATES}" != "" ]; then14 REVISION="${REVISION}.modified"15 fi14 # REVISION=`LC_ALL=en svn info | grep "Last Changed Rev:" | head -n 1 | awk '{print $4}'` 15 # UPDATES=`svn status | grep -v "^\?"` 16 # if [ "${UPDATES}" != "" ]; then 17 # REVISION="${REVISION}.modified" 18 # fi 16 19 17 echo ${VERSION}.r${REVISION} 20 # echo ${VERSION}.r${REVISION} 21 echo ${VERSION} -
lang/objective-cplusplus/i3/trunk/src/Common.h
r35906 r36088 1 1 #pragma once 2 2 3 //TODO: config.h 4 #ifdef HAVE_CONFIG_H 5 # include "../config.h" 6 #else 3 #ifdef _MSC_VER 7 4 # define PACKAGE_NAME "i3" 8 //# define PACKAGE_VERSION "1.0"9 5 # ifndef _WIN32_WCE 10 6 # define ENABLE_NLS 1 … … 12 8 # define ICONV_CONST const 13 9 # define HAVE_PUTENV 1 14 # ifdef _MSC_VER 15 # define HAVE_WBINDTEXTDOMAIN 16 # endif 10 # define HAVE_MALLOC_H 1 11 # define HAVE_WBINDTEXTDOMAIN 17 12 #endif 18 13 -
lang/objective-cplusplus/i3/trunk/src/Initial.h
r35848 r36088 6 6 * 7 7 */ 8 9 8 10 9 // TODO: nest macro ? … … 28 27 29 28 30 namespace i3 {31 const char VERSION[] =32 #include "Version.h"33 ;34 35 }36 //#define _WIN32_WCE37 38 -
lang/objective-cplusplus/i3/trunk/src/Mediator.cpp
r36034 r36088 26 26 // threaded 27 27 //inputWindow.createUI(); 28 completionWindow.start();29 outputWindow.start();30 shellManager.start();31 delegate.start();28 //completionWindow.start(); 29 //outputWindow.start(); 30 //shellManager.start(); 31 //delegate.start(); 32 32 #ifdef I3_TEST 33 33 inputWindow.start(); -
lang/objective-cplusplus/i3/trunk/src/Test4.cpp
r36034 r36088 12 12 using namespace i3; 13 13 14 int argc = 1; 15 char* argv[] = {{""}}; 14 char argv0[] = "foo"; 15 char argv1[] = "bar"; 16 char argv2[] = "baz"; 17 char* argv[] = {argv0, argv1, argv2}; 18 int argc = _countof(argv); 16 19 17 20 exit_status exit_status; -
lang/objective-cplusplus/i3/trunk/src/Tester.cpp
r36034 r36088 39 39 name = name_; 40 40 passed = false; 41 index++;42 41 } 43 42 } … … 45 44 void Tester::run() { 46 45 CHECK_VALID; 46 47 sleep(3); 48 47 49 for (;;) { 48 50 for (int i = 0; i < 100 && this->execute_front(); i++) { … … 72 74 73 75 template <> 74 void InputWindow::execute(SimplePing& e) {} 76 void InputWindow::execute(SimplePing& e) { 77 78 } 75 79 76 80 bool Tester::startNext() { 77 81 CHECK_VALID; 78 82 83 index++; 79 84 if (index == 1) { 80 85 next("simple ping"); 81 mediator.getInputWindow(); 86 SimplePing s; 87 mediator.getInputWindow().post(s, *this); 82 88 } 83 89 return false; -
lang/objective-cplusplus/i3/trunk/src/Version.h
r35843 r36088 1 2 3 "0.3alpha" 4 5 1 #define I3_VERSION_MAJOR 0 2 #define I3_VERSION_MINOR 3 3 #define I3_VERSION_EXTENSION alpha -
lang/objective-cplusplus/i3/trunk/src/gui-windows/InputWindowPlatform.cpp
r35976 r36088 274 274 for (;;) { 275 275 /* 276 http://msdn.microsoft.com/en-us/library/ms633520(VS.85).aspx277 278 int GetWindowText(279 HWND hWnd,280 LPTSTR lpString,281 int nMaxCount282 );283 276 http://msdn.microsoft.com/en-us/library/ms633520(VS.85).aspx 277 278 int GetWindowText( 279 HWND hWnd, 280 LPTSTR lpString, 281 int nMaxCount 282 ); 283 284 284 Parameters 285 285 hWnd … … 333 333 EditChangedEvent e = {}; 334 334 getChild().mediator.getDelegate().post(e, *this); 335 336 } 337 break;335 336 } 337 break; 338 338 } 339 339 } … … 461 461 return 8; 462 462 } 463 }464 465 466 template <>467 void InputWindowPlatform<InputWindow>::run() {468 createUI();469 UpdateWindow(hLocalWnd);470 ShowWindow(hLocalWnd, SW_SHOW);471 loop();472 463 } 473 464 … … 745 736 } 746 737 747 } 738 template <> 739 void InputWindowPlatform<InputWindow>::run() { 740 createUI(); 741 UpdateWindow(hLocalWnd); 742 ShowWindow(hLocalWnd, SW_SHOW); 743 loop(); 744 } 745 746 } -
lang/objective-cplusplus/i3/trunk/src/os-windows/Pty.cpp
r35906 r36088 38 38 39 39 Pty::Pty() { 40 hStdInput = INVALID_HANDLE_VALUE; 41 hStdOutput = INVALID_HANDLE_VALUE; 42 hStdError = INVALID_HANDLE_VALUE; 43 hMyStdInput = INVALID_HANDLE_VALUE; 44 hMyStdOutput = INVALID_HANDLE_VALUE; 45 hMyStdError = INVALID_HANDLE_VALUE; 40 46 } 41 47 42 48 Pty::~Pty() { 43 49 //interrupt(); 44 for (int i = 0; i < 3; i++) { 45 write( 46 "\r\n" 47 "\r\n" 48 "\004" 49 "\003" 50 "exit\r\n" 51 "logout\r\n" 52 "\r\n" 53 ); 54 } 50 if (hMyStdInput != INVALID_HANDLE_VALUE) { 51 for (int i = 0; i < 3; i++) { 52 write( 53 "\r\n" 54 "\r\n" 55 "\004" 56 "\003" 57 "exit\r\n" 58 "logout\r\n" 59 "\r\n" 60 ); 61 } 62 } 55 63 TerminateProcess(pi.hProcess, 0); 56 64 } … … 65 73 DWORD written = 0; 66 74 if (WriteFile(hMyStdInput, buffer, bytes, &written, NULL) == 0) { 67 MessageBox(NULL, _T("writefile failure"), _T("writefile failure"), MB_OK);75 MessageBox(NULL, _T("WriteFile(): failed"), _T("info"), MB_OK); 68 76 return false; 69 77 } -
lang/objective-cplusplus/i3/trunk/tmp/i3.rc
r34769 r36088 5 5 #include <commctrl.h> 6 6 //#include <richedit.h> 7 8 7 9 8 // … … 38 37 BLOCK "041104b0" 39 38 { 40 VALUE "FileDescription", "i3 - 前世代キーボードランチャ"39 VALUE "FileDescription", "i3 - 旧世代キーボードランチャ" 41 40 VALUE "FileVersion", "1,0,0,0" 42 41 VALUE "LegalCopyright", "GNU 一般公衆利用許諾" -
lang/objective-cplusplus/i3/trunk/windows/i3_test.vcproj
r36035 r36088 838 838 </File> 839 839 <File 840 RelativePath="..\src\os-windows\Pty.h" 841 > 842 </File> 843 <File 840 844 RelativePath="..\src\ShellManager.h" 841 845 > -
lang/objective-cplusplus/i3/trunk/windows/mil_test.vcproj
r36013 r36088 965 965 </File> 966 966 <File 967 RelativePath="..\src\mil\include\mil\Debug.h" 968 > 969 </File> 970 <File 967 971 RelativePath="..\src\mil\include\mil\os-windows\Debug.h" 968 972 > 969 973 </File> 970 974 <File 971 RelativePath="..\src\mil\include\mil\Debug.h"972 >973 </File>974 <File975 975 RelativePath="..\src\mil\include\mil\gui-windows\DummyMessageHandler-inl.h" 976 976 > … … 985 985 </File> 986 986 <File 987 RelativePath="..\src\mil\include\mil\gui-windows\GuiModule.h" 988 > 989 </File> 990 <File 987 991 RelativePath="..\src\mil\include\mil\GuiModule.h" 988 992 > 989 993 </File> 990 994 <File 991 RelativePath="..\src\mil\include\mil\gui-windows\GuiModule.h"992 >993 </File>994 <File995 995 RelativePath="..\src\mil\include\mil\Memory.h" 996 996 > … … 1021 1021 </File> 1022 1022 <File 1023 RelativePath="..\src\mil\include\mil\PrecompiledHeaders.h" 1024 > 1025 </File> 1026 <File 1027 RelativePath="..\src\mil\include\mil\gui-windows\PrecompiledHeaders.h" 1028 > 1029 </File> 1030 <File 1023 1031 RelativePath="..\src\mil\include\mil\os-windows\PrecompiledHeaders.h" 1024 1032 > 1025 1033 </File> 1026 1034 <File 1027 RelativePath="..\src\mil\include\mil\PrecompiledHeaders.h"1028 >1029 </File>1030 <File1031 RelativePath="..\src\mil\include\mil\gui-windows\PrecompiledHeaders.h"1032 >1033 </File>1034 <File1035 1035 RelativePath="..\src\mil\include\quicktest\quicktest.h" 1036 1036 > … … 1054 1054 <File 1055 1055 RelativePath="..\src\mil\include\mil\Thread.h" 1056 >1057 </File>1058 <File1059 RelativePath="..\src\mil\include\mil\os-windows\Thread.h"1060 1056 > 1061 1057 </File> -
lang/objective-cplusplus/i3/trunk/windows/resources/fakecygpty.rc
r16243 r36088 1 // -*- coding: us-ascii-dos -*- 2 1 3 FAKECYGPTY_ICON ICON DISCARDABLE "fakecygpty.ico" 4 -
lang/objective-cplusplus/i3/trunk/windows/resources/resource.h
r36081 r36088 1 1 // -*- coding: us-ascii-dos -*- 2 2 3 #ifndef IDC_STATIC4 #define IDC_STATIC (-1)5 #endif6 3 7 4 -
lang/objective-cplusplus/i3/trunk/www/default.css
r34619 r36088 20 20 margin-top: 2em; 21 21 margin-left: 2em; 22 background: url(" right-bottom.jpg") white no-repeat fixed right bottom;22 background: url("/right-bottom.jpg") white no-repeat fixed right bottom; 23 23 /* color: #282931; */ 24 24 font-family: "Trebuchet MS", Trebuchet, Tahoma, sans-serif;
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)