This commit is contained in:
2011-02-07 07:43:34 +00:00
parent 06c773a9c9
commit 6d11983b12
119 changed files with 3672 additions and 0 deletions

View File

@@ -0,0 +1,157 @@
/*
JIntellitype (http://www.melloware.com/)
Java JNI API for Windows Intellitype commands and global keystrokes.
Copyright (C) 1999, 2008 Emil A. Lefkof III, info@melloware.com
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Compiled with Mingw port of GCC,
Bloodshed Dev-C++ IDE (http://www.bloodshed.net/devcpp.html)
*/
#include "stdafx.h"
#include "com_melloware_jintellitype_JIntellitype.h"
#include "JIntellitypeHandler.h"
HINSTANCE g_instance = NULL;
BOOL WINAPI DllMain
(
HINSTANCE hinstDLL, // handle to DLL module
DWORD fdwReason, // reason for calling function
LPVOID lpvReserved // reserved
)
{
switch( fdwReason )
{
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
case DLL_PROCESS_ATTACH:
g_instance = hinstDLL;
break;
}
return TRUE;
}
extern "C"
/*
* Class: com_melloware_jintellitype_JIntellitype
* Method: initializeLibrary
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_com_melloware_jintellitype_JIntellitype_initializeLibrary
(JNIEnv *env, jobject object)
{
// Get handler
JIntellitypeHandler *l_handler = JIntellitypeHandler::extract( env, object );
// Create our handler
l_handler = new JIntellitypeHandler( env, object );
// Enable it
if( l_handler )
l_handler->initialize(env, g_instance);
}
extern "C"
/*
* Class: com_melloware_jintellitype_JIntellitype
* Method: regHotKey
* Signature: (III)V
*/
JNIEXPORT void JNICALL Java_com_melloware_jintellitype_JIntellitype_regHotKey
(JNIEnv *env, jobject object, jint identifier, jint modifier, jint keycode)
{
// Get handler
JIntellitypeHandler *l_handler = JIntellitypeHandler::extract( env, object );
if( l_handler )
{
l_handler->regHotKey(identifier, modifier, keycode);
}
else
{
// throw exception
jclass JIntellitypeException = env->FindClass("com/melloware/jintellitype/JIntellitypeException");
env->ThrowNew(JIntellitypeException,"JIntellitype was not initialized properly.");
}
}
extern "C"
/*
* Class: com_melloware_jintellitype_JIntellitype
* Method: unregHotKey
* Signature: (I)V
*/
JNIEXPORT void JNICALL Java_com_melloware_jintellitype_JIntellitype_unregHotKey
(JNIEnv *env, jobject object, jint identifier)
{
// Get handler
JIntellitypeHandler *l_handler = JIntellitypeHandler::extract( env, object );
if( l_handler )
{
l_handler->unregHotKey(identifier);
}
else
{
// throw exception
jclass JIntellitypeException = env->FindClass("com/melloware/jintellitype/JIntellitypeException");
env->ThrowNew(JIntellitypeException,"JIntellitype was not initialized properly.");
}
}
extern "C"
/*
* Class: com_melloware_jintellitype_JIntellitype
* Method: terminate
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_com_melloware_jintellitype_JIntellitype_terminate
(JNIEnv *env, jobject object)
{
// Get handler
JIntellitypeHandler *l_handler = JIntellitypeHandler::extract( env, object );
// Clean up all resources allocated by this API
if( l_handler )
l_handler->terminate();
}
extern "C"
/*
* Class: com_melloware_jintellitype_JIntellitype
* Method: isRunning
* Signature: (Ljava/lang/String;)Z
*/
JNIEXPORT jboolean JNICALL Java_com_melloware_jintellitype_JIntellitype_isRunning
(JNIEnv *env, jclass, jstring wndName)
{
// App name for the hidden window's registered class
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((LPCWSTR)szAppName, (LPCWSTR)cWndName);
env->ReleaseStringUTFChars(wndName, cWndName);
// If there is, another instance of our app is already running
return mHwnd != NULL;
}

View File

@@ -0,0 +1,279 @@
/*
JIntellitype (http://www.melloware.com/)
Java JNI API for Windows Intellitype commands and global keystrokes.
Copyright (C) 1999, 2008 Emil A. Lefkof III, info@melloware.com
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Compiled with Mingw port of GCC,
Bloodshed Dev-C++ IDE (http://www.bloodshed.net/devcpp.html)
*/
#include "stdafx.h"
#include "JIntellitypeHandler.h"
#include "JIntellitypeThread.h"
#include <stdlib.h>
UINT WM_SHELLHOOK = 0;
/*
* Extract the unique handlerID from the java object
*/
JIntellitypeHandler *JIntellitypeHandler::extract( JNIEnv *env, jobject object )
{
// Get field ID
jfieldID l_handlerId = env->GetFieldID( env->GetObjectClass( object ), "handler", "I" );
// Get field
JIntellitypeHandler *l_handler = (JIntellitypeHandler *) env->GetIntField( object, l_handlerId );
return l_handler;
}
/*
* Constructor
*/
JIntellitypeHandler::JIntellitypeHandler( JNIEnv *env, jobject object )
{
m_window = NULL;
// Reference object
m_object = env->NewGlobalRef(object );
// Get method IDs
m_fireHotKey = env->GetMethodID( env->GetObjectClass( m_object ) , "onHotKey", "(I)V" );
m_fireIntellitype = env->GetMethodID( env->GetObjectClass( m_object ) , "onIntellitype", "(I)V" );
// Get field ID
jfieldID l_handlerId = env->GetFieldID( env->GetObjectClass( m_object ) , "handler", "I" );
// Set field
env->SetIntField( m_object, l_handlerId, (jint) this );
}
/*
* Destructor
*/
JIntellitypeHandler::~JIntellitypeHandler()
{
// Get field ID
jfieldID l_handlerId = g_JIntellitypeThread.m_env->GetFieldID( g_JIntellitypeThread.m_env->GetObjectClass( m_object ), "handler", "I" );
// Set field
g_JIntellitypeThread.m_env->SetIntField( m_object, l_handlerId, 0 );
// Release our reference
g_JIntellitypeThread.m_env->DeleteGlobalRef( m_object );
// unregister the shell hook
DeregisterShellHookWindow( m_window );
// Destroy window
DestroyWindow( m_window );
}
/*
* Perform initialization of the object and thread.
*/
void JIntellitypeHandler::initialize( JNIEnv *env, HINSTANCE instance )
{
m_instance = instance;
g_JIntellitypeThread.MakeSureThreadIsUp( env );
while( !PostThreadMessage( g_JIntellitypeThread, WM_JINTELLITYPE, INITIALIZE_CODE, (LPARAM) this ) )
Sleep( 0 );
}
/*
* Callback method that creates the hidden window on initialization to receive
* any WM_HOTKEY messages and process them.
*/
void JIntellitypeHandler::doInitialize()
{
// Register window class
WNDCLASSEX l_Class;
l_Class.cbSize = sizeof( l_Class );
l_Class.style = CS_HREDRAW | CS_VREDRAW;
l_Class.lpszClassName = TEXT( "JIntellitypeHandlerClass" );
l_Class.lpfnWndProc = WndProc;
l_Class.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
l_Class.hCursor = NULL;
l_Class.hIcon = NULL;
l_Class.hIconSm = NULL;
l_Class.lpszMenuName = NULL;
l_Class.cbClsExtra = 0;
l_Class.cbWndExtra = 0;
l_Class.hInstance = m_instance;
if( !RegisterClassEx( &l_Class ) )
return;
// Create window
m_window = CreateWindow
(
TEXT( "JIntellitypeHandlerClass" ),
TEXT( "JIntellitypeHandler" ),
WS_OVERLAPPEDWINDOW,
0, 0, 0, 0,
NULL,
NULL,
m_instance,
NULL
);
if( !m_window )
return;
//Set pointer to this object inside the Window's USERDATA section
SetWindowLong( m_window, GWL_USERDATA, (LONG) this );
// hide the window
ShowWindow(m_window, SW_HIDE);
UpdateWindow(m_window);
//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((LPCWSTR)"USER32.DLL"), "RegisterShellHookWindow");
//make sure it worked
if (!RegisterShellHookWindow(m_window)) {
// throw exception
jclass JIntellitypeException = g_JIntellitypeThread.m_env->FindClass("com/melloware/jintellitype/JIntellitypeException");
g_JIntellitypeThread.m_env->ThrowNew(JIntellitypeException,"Could not register window as a shell hook window.");
}
}
/*
* Registers a hotkey.
* identifier - unique identifier assigned to this key comination
* modifier - ALT, SHIFT, CTRL, WIN or combination of
* keycode- Ascii keycode, 65 for A, 66 for B etc
*/
void JIntellitypeHandler::regHotKey( jint identifier, jint modifier, jint keycode )
{
JIntellitypeHandlerCallback *callback = (JIntellitypeHandlerCallback*) malloc(sizeof(JIntellitypeHandlerCallback));
callback->identifier = identifier;
callback->modifier = modifier;
callback->keycode = keycode;
callback->handler = this;
PostThreadMessage( g_JIntellitypeThread, WM_JINTELLITYPE, REGISTER_HOTKEY_CODE, (LPARAM) callback );
}
/*
* Actually registers the hotkey using the Win32API RegisterHotKey call.
*/
void JIntellitypeHandler::doRegHotKey(LPARAM callback_)
{
JIntellitypeHandlerCallback *callback = (JIntellitypeHandlerCallback*) callback_;
RegisterHotKey(m_window, callback->identifier, callback->modifier, callback->keycode);
free(callback);
}
/*
* Unregisters a previously assigned hotkey.
* identifier - unique identifier assigned to this key comination
*/
void JIntellitypeHandler::unregHotKey( jint identifier )
{
JIntellitypeHandlerCallback *callback = (JIntellitypeHandlerCallback*) malloc(sizeof(JIntellitypeHandlerCallback));
callback->identifier = identifier;
callback->handler = this;
PostThreadMessage( g_JIntellitypeThread, WM_JINTELLITYPE, UNREGISTER_HOTKEY_CODE, (LPARAM) callback );
}
/*
* Actually unregisters the hotkey using the Win32API UnregisterHotKey call.
*/
void JIntellitypeHandler::doUnregisterHotKey(LPARAM callback_)
{
JIntellitypeHandlerCallback *callback = (JIntellitypeHandlerCallback*) callback_;
UnregisterHotKey(m_window, callback->identifier);
free(callback);
}
/*
* When an intellitype command is recieved by the JFrame this method is called
* to perform a callback to the Intellitype java listeners.
* commandId - the unique command Id from the WM_APPCOMMAND listings
*/
void JIntellitypeHandler::intellitype( jint commandId )
{
JIntellitypeHandlerCallback *callback = (JIntellitypeHandlerCallback*) malloc(sizeof(JIntellitypeHandlerCallback));
callback->command = commandId;
callback->handler = this;
PostThreadMessage( g_JIntellitypeThread, WM_JINTELLITYPE, INTELLITYPE_CODE, (LPARAM) callback );
}
/*
* Call the correct JVM with the intellitype command for the listeners listening.
*/
void JIntellitypeHandler::doIntellitype(LPARAM callback_)
{
JIntellitypeHandlerCallback *callback = (JIntellitypeHandlerCallback*) callback_;
g_JIntellitypeThread.m_env->CallVoidMethod(m_object, m_fireIntellitype, callback->command);
free(callback);
}
/*
* Cleans up resources allocated by JIntellitype.
*/
void JIntellitypeHandler::terminate()
{
PostThreadMessage( g_JIntellitypeThread, WM_JINTELLITYPE, TERMINATE_CODE, (LPARAM) this );
}
/*
* Callback method to send hotkey to the Java HotKeyListeners registered.
*/
void JIntellitypeHandler::fireHotKey(jint hotkeyId)
{
g_JIntellitypeThread.m_env->CallVoidMethod(m_object, m_fireHotKey, hotkeyId);
}
/*
* WndProc method registered to the hidden window to listen for WM_HOTKEY
* messages and send them back to the Java listeners.
*/
LRESULT CALLBACK JIntellitypeHandler::WndProc( HWND hWnd, UINT uMessage, WPARAM wParam, LPARAM lParam )
{
// check for Intellitype messages and if found send them to Intellitype listeners
if (uMessage == WM_SHELLHOOK) {
if (wParam == HSHELL_APPCOMMAND) {
jint cmd = GET_APPCOMMAND_LPARAM(lParam);
JIntellitypeHandler *l_this = (JIntellitypeHandler *) GetWindowLong( hWnd, GWL_USERDATA );
l_this->intellitype(cmd);
}
return TRUE;
}
// check for registered hotkey messages and send them to HotKeyListeners
switch( uMessage ) {
case WM_HOTKEY: {
JIntellitypeHandler *l_this = (JIntellitypeHandler *) GetWindowLong( hWnd, GWL_USERDATA );
l_this->fireHotKey(wParam);
return TRUE;
break;
}
default:
return DefWindowProc( hWnd, uMessage, wParam, lParam );
}
}

View File

@@ -0,0 +1,93 @@
/*
JIntellitype (http://www.melloware.com/)
Java JNI API for Windows Intellitype commands and global keystrokes.
Copyright (C) 1999, 2008 Emil A. Lefkof III, info@melloware.com
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Compiled with Mingw port of GCC,
Bloodshed Dev-C++ IDE (http://www.bloodshed.net/devcpp.html)
*/
#ifndef __JIntellitypeHandler_h__
#define __JIntellitypeHandler_h__
#include "JIntellitypeThread.h"
class JIntellitypeHandler
{
friend DWORD WINAPI JIntellitypeThread::ThreadProc( LPVOID lpParameter );
public:
static JIntellitypeHandler *extract( JNIEnv *env, jobject object );
JIntellitypeHandler( JNIEnv *env, jobject object );
void initialize( JNIEnv *env, HINSTANCE instance );
void regHotKey( jint identifier, jint modifier, jint keycode );
void unregHotKey( jint identifier );
void intellitype( jint commandId );
void terminate();
private:
enum
{
INITIALIZE_CODE = 1,
REGISTER_HOTKEY_CODE = 2,
UNREGISTER_HOTKEY_CODE = 3,
TERMINATE_CODE = 4,
INTELLITYPE_CODE = 5
};
~JIntellitypeHandler();
void createHiddenWindow();
void doInitialize();
void doRegHotKey(LPARAM callback);
void doUnregisterHotKey(LPARAM callback);
void doIntellitype(LPARAM callback);
void fireHotKey(jint hotkeyId);
void fireIntellitype(jint commandId);
HINSTANCE m_instance;
HWND m_window;
jobject m_object;
jmethodID m_fireHotKey;
jmethodID m_fireIntellitype;
static LRESULT CALLBACK WndProc( HWND hWnd, UINT uMessage, WPARAM wParam, LPARAM lParam );
static DWORD WINAPI ThreadProc( LPVOID lpParameter );
};
typedef struct {
JIntellitypeHandler *handler;
jint identifier;
jint modifier;
jint keycode;
jint command;
} JIntellitypeHandlerCallback;
#ifndef WM_APPCOMMAND
#define WM_APPCOMMAND 0x319
#define FAPPCOMMAND_MASK 0x8000
#define GET_APPCOMMAND_LPARAM(lParam) ((short)(HIWORD(lParam) & ~FAPPCOMMAND_MASK))
#define HSHELL_APPCOMMAND 12
#endif
#endif

View File

@@ -0,0 +1,133 @@
/*
JIntellitype (http://www.melloware.com/)
Java JNI API for Windows Intellitype commands and global keystrokes.
Copyright (C) 1999, 2008 Emil A. Lefkof III, info@melloware.com
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Compiled with Mingw port of GCC,
Bloodshed Dev-C++ IDE (http://www.bloodshed.net/devcpp.html)
*/
#include "stdafx.h"
#include "JIntellitypeThread.h"
#include "JIntellitypeHandler.h"
JIntellitypeThread g_JIntellitypeThread;
JIntellitypeThread::JIntellitypeThread()
{
m_env = NULL;
m_thread = 0;
m_vm = NULL;
m_handlerCount = 0;
}
void JIntellitypeThread::MakeSureThreadIsUp( JNIEnv *env )
{
if( !m_thread )
{
// Get VM
env->GetJavaVM( &m_vm );
// Start "native" thread
CreateThread
(
NULL,
0,
ThreadProc,
this,
0,
&m_thread
);
}
}
JIntellitypeThread::operator DWORD ()
{
return m_thread;
}
DWORD WINAPI JIntellitypeThread::ThreadProc( LPVOID lpParameter )
{
JIntellitypeThread *l_this = (JIntellitypeThread *) lpParameter;
// Attach the thread to the VM
l_this->m_vm->AttachCurrentThread( (void**) &l_this->m_env, NULL );
MSG msg;
while( GetMessage( &msg, NULL, 0, 0 ) )
{
if( msg.message == WM_JINTELLITYPE )
{
// Extract handler
JIntellitypeHandler *l_handler;
switch( msg.wParam )
{
case JIntellitypeHandler::INITIALIZE_CODE:
l_handler = (JIntellitypeHandler*) msg.lParam;
l_this->m_handlerCount++;
l_handler->doInitialize();
break;
case JIntellitypeHandler::REGISTER_HOTKEY_CODE:
l_handler = ((JIntellitypeHandlerCallback*) msg.lParam)->handler;
l_handler->doRegHotKey(msg.lParam);
break;
case JIntellitypeHandler::UNREGISTER_HOTKEY_CODE:
l_handler = ((JIntellitypeHandlerCallback*) msg.lParam)->handler;
l_handler->doUnregisterHotKey(msg.lParam);
break;
case JIntellitypeHandler::INTELLITYPE_CODE:
l_handler = ((JIntellitypeHandlerCallback*) msg.lParam)->handler;
l_handler->doIntellitype(msg.lParam);
break;
case JIntellitypeHandler::TERMINATE_CODE:
l_handler = (JIntellitypeHandler*) msg.lParam;
// Destroy it!
delete l_handler;
// No more handlers?
if( !--l_this->m_handlerCount )
{
l_this->m_thread = 0;
// Detach thread from VM
l_this->m_vm->DetachCurrentThread();
// Time to die
ExitThread( 0 );
}
break;
}
}
else
{
TranslateMessage( &msg );
DispatchMessage( &msg );
}
}
// Detach thread from VM
l_this->m_vm->DetachCurrentThread();
return 0;
}

View File

@@ -0,0 +1,55 @@
/*
JIntellitype (http://www.melloware.com/)
Java JNI API for Windows Intellitype commands and global keystrokes.
Copyright (C) 1999, 2008 Emil A. Lefkof III, info@melloware.com
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Compiled with Mingw port of GCC,
Bloodshed Dev-C++ IDE (http://www.bloodshed.net/devcpp.html)
*/
#ifndef __JIntellitypeThread_h__
#define __JIntellitypeThread_h__
class JIntellitypeThread
{
public:
JIntellitypeThread();
void MakeSureThreadIsUp( JNIEnv *env );
JNIEnv *m_env;
static DWORD WINAPI ThreadProc( LPVOID lpParameter );
operator DWORD ();
private:
DWORD m_thread;
JavaVM *m_vm;
int m_handlerCount;
};
extern JIntellitypeThread g_JIntellitypeThread;
#define WM_JINTELLITYPE (WM_USER+1)
#endif

View File

@@ -0,0 +1,23 @@
/* THIS FILE WILL BE OVERWRITTEN BY DEV-C++ */
/* DO NOT EDIT ! */
#ifndef JINTELLITYPE_PRIVATE_H
#define JINTELLITYPE_PRIVATE_H
/* VERSION DEFINITIONS */
#define VER_STRING "1.0.0.465"
#define VER_MAJOR 1
#define VER_MINOR 0
#define VER_RELEASE 0
#define VER_BUILD 465
#define COMPANY_NAME "Melloware Inc (www.melloware.com)"
#define FILE_VERSION "1.0"
#define FILE_DESCRIPTION "Java JNI bridge to MS Intellitype commands"
#define INTERNAL_NAME ""
#define LEGAL_COPYRIGHT "Copyright 2006 Melloware Inc"
#define LEGAL_TRADEMARKS "Copyright 2006 Melloware Inc"
#define ORIGINAL_FILENAME ""
#define PRODUCT_NAME "JIntellitype"
#define PRODUCT_VERSION "1.0"
#endif /*JINTELLITYPE_PRIVATE_H*/

View File

@@ -0,0 +1,8 @@
// stdafx.cpp : source file that includes just the standard includes
// win32.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"
// TODO: reference any additional headers you need in STDAFX.H
// and not in this file

24
cpp/jintellitype/StdAfx.h Normal file
View File

@@ -0,0 +1,24 @@
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#if !defined(AFX_STDAFX_H__1F571525_24C2_11D3_B0CF_0000E85D9A83__INCLUDED_)
#define AFX_STDAFX_H__1F571525_24C2_11D3_B0CF_0000E85D9A83__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// Insert your headers here
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#include <windows.h>
#include <shellapi.h>
#include <jni.h>
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_STDAFX_H__1F571525_24C2_11D3_B0CF_0000E85D9A83__INCLUDED_)

View File

@@ -0,0 +1,53 @@
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class com_melloware_jintellitype_JIntellitype */
#ifndef _Included_com_melloware_jintellitype_JIntellitype
#define _Included_com_melloware_jintellitype_JIntellitype
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: com_melloware_jintellitype_JIntellitype
* Method: initializeLibrary
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_com_melloware_jintellitype_JIntellitype_initializeLibrary
(JNIEnv *, jobject);
/*
* Class: com_melloware_jintellitype_JIntellitype
* Method: regHotKey
* Signature: (III)V
*/
JNIEXPORT void JNICALL Java_com_melloware_jintellitype_JIntellitype_regHotKey
(JNIEnv *, jobject, jint, jint, jint);
/*
* Class: com_melloware_jintellitype_JIntellitype
* Method: terminate
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_com_melloware_jintellitype_JIntellitype_terminate
(JNIEnv *, jobject);
/*
* Class: com_melloware_jintellitype_JIntellitype
* Method: unregHotKey
* Signature: (I)V
*/
JNIEXPORT void JNICALL Java_com_melloware_jintellitype_JIntellitype_unregHotKey
(JNIEnv *, jobject, jint);
/*
* Class: com_melloware_jintellitype_JIntellitype
* Method: isRunning
* Signature: (Ljava/lang/String;)Z
*/
JNIEXPORT jboolean JNICALL Java_com_melloware_jintellitype_JIntellitype_isRunning
(JNIEnv *, jclass, jstring);
#ifdef __cplusplus
}
#endif
#endif

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>