This commit is contained in:
2011-02-01 19:17:43 +00:00
parent 35f2120568
commit a77bded1a2
14 changed files with 167 additions and 308 deletions

View File

@@ -149,7 +149,7 @@ JNIEXPORT jboolean JNICALL Java_com_melloware_jintellitype_JIntellitype_isRunnin
CHAR szAppName[] = "SunAwtFrame";
const char *cWndName = env->GetStringUTFChars(wndName, 0);
// Find out if there's a hidden window with the given title
HWND mHwnd = FindWindow(szAppName, cWndName);
HWND mHwnd = FindWindow((LPCWSTR)szAppName, (LPCWSTR)cWndName);
env->ReleaseStringUTFChars(wndName, cWndName);
// If there is, another instance of our app is already running
return mHwnd != NULL;

View File

@@ -1,149 +0,0 @@
[Project]
FileName=JIntellitype.dev
Name=JIntellitype
Ver=1
IsCpp=1
Type=3
Compiler=-D__GNUWIN32__ -W -DWIN32 -DNDEBUG -D_WINDOWS -D_MBCS -D_USRDLL -DBUILDING_DLL=1_@@_
CppCompiler=-D__GNUWIN32__ -W -DWIN32 -DNDEBUG -D_WINDOWS -D_MBCS -D_USRDLL_@@_
Includes=c:\java\jdk1.2.2\include;c:\java\jdk1.2.2\include\win32
Linker=-lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 --no-export-all-symbols --add-stdcall-alias_@@_
Libs=
UnitCount=8
Folders="Header Files","Resource Files","Source Files"
ObjFiles=
PrivateResource=JIntellitype_private.rc
ResourceIncludes=
MakeIncludes=
Icon=
ExeOutput=..\..\..\..\jintellitype
ObjectOutput=..\..\..\target
OverrideOutput=0
OverrideOutputName=JIntellitype.dll
HostApplication=
CommandLine=
UseCustomMakefile=0
CustomMakefile=
IncludeVersionInfo=1
SupportXPThemes=0
CompilerSet=0
CompilerSettings=0000000001001000000100
[Unit1]
FileName=JIntellitypeThread.cpp
Folder="Source Files"
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit2]
FileName=JIntellitype.cpp
Folder="Source Files"
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit3]
FileName=JIntellitypeHandler.cpp
Folder="Source Files"
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit5]
FileName=JIntellitypeHandler.h
Folder="Header Files"
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit7]
FileName=StdAfx.h
Folder="Header Files"
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit8]
FileName=com_melloware_jintellitype_JIntellitype.h
Folder=Header Files
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[VersionInfo]
Major=1
Minor=0
Release=0
Build=465
LanguageID=1033
CharsetID=1252
CompanyName=Melloware Inc (www.melloware.com)
FileVersion=1.0
FileDescription=Java JNI bridge to MS Intellitype commands
InternalName=
LegalCopyright=Copyright 2006 Melloware Inc
LegalTrademarks=Copyright 2006 Melloware Inc
OriginalFilename=
ProductName=JIntellitype
ProductVersion=1.0
AutoIncBuildNr=1
[Unit11]
FileName=com_melloware_jintellitype_JIntellitype.h
CompileCpp=1
Folder=Header Files
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit10]
FileName=com_melloware_jintellitype_JIntellitype.h
CompileCpp=1
Folder=Header Files
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit4]
FileName=StdAfx.cpp
CompileCpp=1
Folder="Source Files"
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit6]
FileName=JIntellitypeThread.h
CompileCpp=1
Folder="Header Files"
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

View File

@@ -1,76 +0,0 @@
[Editor_9]
CursorCol=1
CursorRow=20
TopLine=1
LeftChar=1
Open=0
Top=0
[Editors]
Focused=2
Order=1,2,0,7,4
[Editor_0]
Open=1
Top=0
CursorCol=5
CursorRow=118
TopLine=71
LeftChar=1
[Editor_1]
Open=1
Top=0
CursorCol=36
CursorRow=149
TopLine=75
LeftChar=1
[Editor_2]
Open=1
Top=1
CursorCol=14
CursorRow=209
TopLine=162
LeftChar=1
[Editor_3]
Open=0
Top=0
CursorCol=23
CursorRow=3
TopLine=1
LeftChar=1
[Editor_4]
Open=1
Top=0
CursorCol=1
CursorRow=27
TopLine=1
LeftChar=1
[Editor_5]
Open=0
Top=0
CursorCol=3
CursorRow=24
TopLine=11
LeftChar=1
[Editor_6]
Open=0
Top=0
CursorCol=1
CursorRow=16
TopLine=1
LeftChar=1
[Editor_7]
Open=1
Top=0
CursorCol=54
CursorRow=35
TopLine=3
LeftChar=1
[Editor_8]
Open=0
Top=0
CursorCol=1
CursorRow=3
TopLine=1
LeftChar=1
[Editor_10]
Open=0
Top=0

View File

@@ -146,7 +146,7 @@ void JIntellitypeHandler::doInitialize()
//register this window as a shell hook to intercept WM_APPCOMMAND messages
WM_SHELLHOOK = RegisterWindowMessage(TEXT("SHELLHOOK"));
BOOL (__stdcall *RegisterShellHookWindow)(HWND) = NULL;
RegisterShellHookWindow = (BOOL (__stdcall *)(HWND))GetProcAddress(GetModuleHandle("USER32.DLL"), "RegisterShellHookWindow");
RegisterShellHookWindow = (BOOL (__stdcall *)(HWND))GetProcAddress(GetModuleHandle((LPCWSTR)"USER32.DLL"), "RegisterShellHookWindow");
//make sure it worked
if (!RegisterShellHookWindow(m_window)) {

View File

@@ -1,35 +0,0 @@
/* THIS FILE WILL BE OVERWRITTEN BY DEV-C++ */
/* DO NOT EDIT! */
#include <windows.h> // include for version info constants
//
// TO CHANGE VERSION INFORMATION, EDIT PROJECT OPTIONS...
//
1 VERSIONINFO
FILEVERSION 1,0,0,465
PRODUCTVERSION 1,0,0,465
FILETYPE VFT_DLL
{
BLOCK "StringFileInfo"
{
BLOCK "040904E4"
{
VALUE "CompanyName", "Melloware Inc (www.melloware.com)"
VALUE "FileVersion", "1.0"
VALUE "FileDescription", "Java JNI bridge to MS Intellitype commands"
VALUE "InternalName", ""
VALUE "LegalCopyright", "Copyright 2006 Melloware Inc"
VALUE "LegalTrademarks", "Copyright 2006 Melloware Inc"
VALUE "OriginalFilename", ""
VALUE "ProductName", "JIntellitype"
VALUE "ProductVersion", "1.0"
}
}
BLOCK "VarFileInfo"
{
VALUE "Translation", 0x0409, 1252
}
}

View File

@@ -1,46 +0,0 @@
# Project: JIntellitype
# Makefile created by Dev-C++ 4.9.9.2
CPP = g++.exe
CC = gcc.exe
WINDRES = windres.exe
RES = ../../../target/JIntellitype_private.res
OBJ = ../../../target/JIntellitypeThread.o ../../../target/JIntellitype.o ../../../target/JIntellitypeHandler.o ../../../target/StdAfx.o $(RES)
LINKOBJ = ../../../target/JIntellitypeThread.o ../../../target/JIntellitype.o ../../../target/JIntellitypeHandler.o ../../../target/StdAfx.o $(RES)
LIBS = -L"C:/Dev-Cpp/lib" -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 --no-export-all-symbols --add-stdcall-alias -s
INCS = -I"C:/Dev-Cpp/include"
CXXINCS = -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include"
BIN = ../../../../jintellitype/JIntellitype.dll
CXXFLAGS = $(CXXINCS) -D__GNUWIN32__ -W -DWIN32 -DNDEBUG -D_WINDOWS -D_MBCS -D_USRDLL -fexpensive-optimizations -O3
CFLAGS = $(INCS) -D__GNUWIN32__ -W -DWIN32 -DNDEBUG -D_WINDOWS -D_MBCS -D_USRDLL -DBUILDING_DLL=1 -fexpensive-optimizations -O3
RM = rm -f
.PHONY: all all-before all-after clean clean-custom
all: all-before ../../../../jintellitype/JIntellitype.dll all-after
clean: clean-custom
${RM} $(OBJ) $(BIN)
DLLWRAP=dllwrap.exe
DEFFILE=../../../../jintellitype/libJIntellitype.def
STATICLIB=../../../../jintellitype/libJIntellitype.a
$(BIN): $(LINKOBJ)
$(DLLWRAP) --output-def $(DEFFILE) --driver-name c++ --implib $(STATICLIB) $(LINKOBJ) $(LIBS) -o $(BIN)
../../../target/JIntellitypeThread.o: JIntellitypeThread.cpp
$(CPP) -c JIntellitypeThread.cpp -o ../../../target/JIntellitypeThread.o $(CXXFLAGS)
../../../target/JIntellitype.o: JIntellitype.cpp
$(CPP) -c JIntellitype.cpp -o ../../../target/JIntellitype.o $(CXXFLAGS)
../../../target/JIntellitypeHandler.o: JIntellitypeHandler.cpp
$(CPP) -c JIntellitypeHandler.cpp -o ../../../target/JIntellitypeHandler.o $(CXXFLAGS)
../../../target/StdAfx.o: StdAfx.cpp
$(CPP) -c StdAfx.cpp -o ../../../target/StdAfx.o $(CXXFLAGS)
../../../target/JIntellitype_private.res: JIntellitype_private.rc
$(WINDRES) -i JIntellitype_private.rc --input-format=rc -o ../../../target/JIntellitype_private.res -O coff

View File

@@ -0,0 +1 @@
copy Release\jintellitype.dll ..\..\..\java\native\

View File

@@ -0,0 +1,20 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual C++ Express 2010
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jintellitype", "jintellitype.vcxproj", "{29297EB4-DE7D-4F2B-9FD7-FEB53409AA7D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{29297EB4-DE7D-4F2B-9FD7-FEB53409AA7D}.Debug|Win32.ActiveCfg = Debug|Win32
{29297EB4-DE7D-4F2B-9FD7-FEB53409AA7D}.Debug|Win32.Build.0 = Debug|Win32
{29297EB4-DE7D-4F2B-9FD7-FEB53409AA7D}.Release|Win32.ActiveCfg = Release|Win32
{29297EB4-DE7D-4F2B-9FD7-FEB53409AA7D}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

Binary file not shown.

View File

@@ -0,0 +1,96 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{29297EB4-DE7D-4F2B-9FD7-FEB53409AA7D}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>jintellitype</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<IncludePath>C:\Program Files %28x86%29\Java\jdk1.6.0_23\include;C:\Program Files %28x86%29\Java\jdk1.6.0_23\include\win32;$(IncludePath)</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<IncludePath>C:\Program Files %28x86%29\Java\jdk1.6.0_23\include;C:\Program Files %28x86%29\Java\jdk1.6.0_23\include\win32;$(IncludePath)</IncludePath>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;JINTELLITYPE_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;JINTELLITYPE_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
<PostBuildEvent>
<Command>copy.bat</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\JIntellitype.cpp" />
<ClCompile Include="..\JIntellitypeHandler.cpp" />
<ClCompile Include="..\JIntellitypeThread.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\com_melloware_jintellitype_JIntellitype.h" />
<ClInclude Include="..\JIntellitypeHandler.h" />
<ClInclude Include="..\JIntellitypeThread.h" />
<ClInclude Include="..\JIntellitype_private.h" />
<ClInclude Include="..\StdAfx.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\JIntellitypeThread.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\JIntellitypeHandler.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\JIntellitype.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\JIntellitypeHandler.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\JIntellitype_private.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\com_melloware_jintellitype_JIntellitype.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\StdAfx.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\JIntellitypeThread.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>

View File

@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>

Binary file not shown.

Binary file not shown.