This commit is contained in:
157
c/jintellitype/JIntellitype.cpp
Normal file
157
c/jintellitype/JIntellitype.cpp
Normal 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(szAppName, cWndName);
|
||||
env->ReleaseStringUTFChars(wndName, cWndName);
|
||||
// If there is, another instance of our app is already running
|
||||
return mHwnd != NULL;
|
||||
}
|
||||
|
||||
149
c/jintellitype/JIntellitype.dev
Normal file
149
c/jintellitype/JIntellitype.dev
Normal file
@@ -0,0 +1,149 @@
|
||||
[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=
|
||||
|
||||
76
c/jintellitype/JIntellitype.layout
Normal file
76
c/jintellitype/JIntellitype.layout
Normal file
@@ -0,0 +1,76 @@
|
||||
[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
|
||||
279
c/jintellitype/JIntellitypeHandler.cpp
Normal file
279
c/jintellitype/JIntellitypeHandler.cpp
Normal 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("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 );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
93
c/jintellitype/JIntellitypeHandler.h
Normal file
93
c/jintellitype/JIntellitypeHandler.h
Normal 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
|
||||
133
c/jintellitype/JIntellitypeThread.cpp
Normal file
133
c/jintellitype/JIntellitypeThread.cpp
Normal 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;
|
||||
}
|
||||
55
c/jintellitype/JIntellitypeThread.h
Normal file
55
c/jintellitype/JIntellitypeThread.h
Normal 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
|
||||
23
c/jintellitype/JIntellitype_private.h
Normal file
23
c/jintellitype/JIntellitype_private.h
Normal 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*/
|
||||
35
c/jintellitype/JIntellitype_private.rc
Normal file
35
c/jintellitype/JIntellitype_private.rc
Normal file
@@ -0,0 +1,35 @@
|
||||
/* 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
|
||||
}
|
||||
}
|
||||
|
||||
46
c/jintellitype/Makefile.win
Normal file
46
c/jintellitype/Makefile.win
Normal file
@@ -0,0 +1,46 @@
|
||||
# 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
|
||||
8
c/jintellitype/StdAfx.cpp
Normal file
8
c/jintellitype/StdAfx.cpp
Normal 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
c/jintellitype/StdAfx.h
Normal file
24
c/jintellitype/StdAfx.h
Normal 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_)
|
||||
53
c/jintellitype/com_melloware_jintellitype_JIntellitype.h
Normal file
53
c/jintellitype/com_melloware_jintellitype_JIntellitype.h
Normal 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
|
||||
Reference in New Issue
Block a user