当前位置: 首页>>代码示例>>Java>>正文


Java WinDef.WPARAM属性代码示例

本文整理汇总了Java中com.sun.jna.platform.win32.WinDef.WPARAM属性的典型用法代码示例。如果您正苦于以下问题:Java WinDef.WPARAM属性的具体用法?Java WinDef.WPARAM怎么用?Java WinDef.WPARAM使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在com.sun.jna.platform.win32.WinDef的用法示例。


在下文中一共展示了WinDef.WPARAM属性的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: doKeyPress

@Override
protected void doKeyPress(final int keyCode, final boolean shifted) throws InterruptedException {
    logger.log(Level.FINER, "doKeyPress " + keyCode + " " + shifted);
    while (isCtrlKeyDown()) {
        Thread.sleep(100);
    }
    final int lParam = 0x00000001 | 0x50 /* scancode */<< 16 | 0x01000000 /* extended */;
    final WPARAM wparam = new WinDef.WPARAM(keyCode);
    final WPARAM wparamShift = new WinDef.WPARAM(KeyEvent.VK_SHIFT);
    final LPARAM lparamDown = new WinDef.LPARAM(lParam);
    final LPARAM lparamUp = new WinDef.LPARAM(lParam | 1 << 30 | 1 << 31);
    if (shifted) {
        User32.INSTANCE.PostMessage(handler, WM_KEYDOWN, wparamShift, lparamDown);
    }
    User32.INSTANCE.PostMessage(handler, WM_KEYDOWN, wparam, lparamDown);
    User32.INSTANCE.PostMessage(handler, WM_KEYUP, wparam, lparamUp);
    if (shifted) {
        User32.INSTANCE.PostMessage(handler, WM_KEYUP, wparamShift, lparamUp);
    }
}
 
开发者ID:paspiz85,项目名称:nanobot,代码行数:20,代码来源:BlueStacksWinPlatform.java

示例2: hookTheMouse

private LowLevelMouseProc hookTheMouse() {
    return new LowLevelMouseProc() {
        @Override
        public WinDef.LRESULT callback(int nCode, WinDef.WPARAM wParam, MSLLHOOKSTRUCT info) {
            if (nCode >= 0) {

                switch (wParam.intValue()) {
                    case JNIMouseHook.WM_LBUTTONDOWN:
                        addEventToQueue(info.pt.x, info.pt.y);
                        break;
                    case JNIMouseHook.WM_RBUTTONDOWN:
                        addEventToQueue(info.pt.x, info.pt.y);
                        break;
                    case JNIMouseHook.WM_MBUTTONDOWN:
                        addEventToQueue(info.pt.x, info.pt.y);
                        break;
                    case JNIMouseHook.WM_MOUSEMOVE:

                        break;
                    default:
                        break;
                }
                // unhook if needed
                if (threadFinish == true) {
                    USER32INST.PostQuitMessage(0);
                }
            }

            Pointer ptr = info.getPointer();
            long peer = Pointer.nativeValue(ptr);
            return USER32INST.CallNextHookEx(hhk, nCode, wParam, new LPARAM(peer));
        }
    };
}
 
开发者ID:martin-lizner,项目名称:trezor-ssh-agent,代码行数:34,代码来源:JNIMouseHook.java

示例3: callback

public WinDef.LRESULT callback(WinDef.HWND hwnd, WinDef.UINT Msg, WinDef.WPARAM wParam, WinDef.LPARAM lParam) {
   return user32.CallWindowProc(previousProcPtr, hwnd, Msg, wParam, lParam);
}
 
开发者ID:vanjadardic,项目名称:KiTTY2,代码行数:3,代码来源:WinUtil.java

示例4: callback

WinDef.LRESULT callback(int nCode, WinDef.WPARAM wParam, MSLLHOOKSTRUCT lParam); 
开发者ID:martin-lizner,项目名称:trezor-ssh-agent,代码行数:1,代码来源:JNIMouseHook.java

示例5: SendMessage

WinDef.LRESULT SendMessage(WinDef.HWND hWnd, int msg, WinDef.WPARAM num1, byte[] num2); 
开发者ID:martin-lizner,项目名称:trezor-ssh-agent,代码行数:1,代码来源:JNIMouseHook.java

示例6: CallWindowProc

public WinDef.LRESULT CallWindowProc(BaseTSD.LONG_PTR lpPrevWndFunc, WinDef.HWND hWnd, WinDef.UINT Msg, WinDef.WPARAM wParam, WinDef.LPARAM lParam); 
开发者ID:vanjadardic,项目名称:KiTTY2,代码行数:1,代码来源:User32.java

示例7: PostMessage

public WinDef.HWND PostMessage(WinDef.HWND hWnd, WinDef.UINT Msg, WinDef.WPARAM wParam, WinDef.LPARAM lParam); 
开发者ID:vanjadardic,项目名称:KiTTY2,代码行数:1,代码来源:User32.java


注:本文中的com.sun.jna.platform.win32.WinDef.WPARAM属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。