• 大小: 202KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-05-10
  • 语言: Java
  • 标签: jintellitype  

资源简介

java捕获用户快捷键的工具包,应用程序级,意思就是在窗体未获得焦点的情况下也可以捕获!

资源截图

代码片段和文件信息

/*
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 = J

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2013-12-16 08:02  jintellitype-1.3.9\
     文件       16183  2013-12-16 08:02  jintellitype-1.3.9\jintellitype-1.3.9.jar
     目录           0  2013-12-16 08:02  jintellitype-1.3.9\src\
     目录           0  2011-08-11 08:16  jintellitype-1.3.9\src\main\
     目录           0  2011-08-11 08:16  jintellitype-1.3.9\src\main\cpp\
     目录           0  2011-08-11 08:16  jintellitype-1.3.9\src\main\java\
     目录           0  2011-08-11 08:16  jintellitype-1.3.9\src\main\java\com\
     目录           0  2011-08-11 08:16  jintellitype-1.3.9\src\main\java\com\melloware\
     目录           0  2011-08-11 08:16  jintellitype-1.3.9\src\main\java\com\melloware\jintellitype\
     文件        1481  2011-08-11 08:16  jintellitype-1.3.9\src\main\cpp\com_melloware_jintellitype_JIntellitype.h
     文件        4495  2011-08-11 08:16  jintellitype-1.3.9\src\main\cpp\JIntellitype.cpp
     文件        2837  2011-08-11 08:16  jintellitype-1.3.9\src\main\cpp\JIntellitype.dev
     文件         847  2011-08-11 08:16  jintellitype-1.3.9\src\main\cpp\JIntellitype.layout
     文件        9098  2011-08-11 08:16  jintellitype-1.3.9\src\main\cpp\JIntellitypeHandler.cpp
     文件        2583  2011-08-11 08:16  jintellitype-1.3.9\src\main\cpp\JIntellitypeHandler.h
     文件        3212  2011-08-11 08:16  jintellitype-1.3.9\src\main\cpp\JIntellitypeThread.cpp
     文件        1359  2011-08-11 08:16  jintellitype-1.3.9\src\main\cpp\JIntellitypeThread.h
     文件         715  2011-08-11 08:16  jintellitype-1.3.9\src\main\cpp\JIntellitype_private.h
     文件         861  2011-08-11 08:16  jintellitype-1.3.9\src\main\cpp\JIntellitype_private.rc
     文件        2355  2011-08-11 08:16  jintellitype-1.3.9\src\main\cpp\Makefile.win
     文件         292  2011-08-11 08:16  jintellitype-1.3.9\src\main\cpp\StdAfx.cpp
     文件         775  2011-08-11 08:16  jintellitype-1.3.9\src\main\cpp\StdAfx.h
     文件        1732  2011-08-11 08:16  jintellitype-1.3.9\src\main\java\com\melloware\jintellitype\HotkeyListener.java
     文件        2070  2011-08-11 08:16  jintellitype-1.3.9\src\main\java\com\melloware\jintellitype\IntellitypeListener.java
     文件       26090  2012-10-20 07:58  jintellitype-1.3.9\src\main\java\com\melloware\jintellitype\JIntellitype.java
     文件        5829  2011-08-11 08:16  jintellitype-1.3.9\src\main\java\com\melloware\jintellitype\JIntellitypeConstants.java
     文件        1509  2011-08-11 08:16  jintellitype-1.3.9\src\main\java\com\melloware\jintellitype\JIntellitypeException.java
     文件        3002  2011-08-11 08:16  jintellitype-1.3.9\src\main\java\com\melloware\jintellitype\Main.java
     目录           0  2011-08-11 08:16  jintellitype-1.3.9\src\test\
     目录           0  2011-08-11 08:16  jintellitype-1.3.9\src\test\java\
     目录           0  2011-08-11 08:16  jintellitype-1.3.9\src\test\java\com\
............此处省略9个文件信息

评论

共有 条评论