Java 类com.sun.jna.platform.win32.WinDef.LRESULT 实例源码

项目:yajsw    文件:WindowsXPMouse.java   
public LowLevelMouseProc hookTheMouse()
{
    return new LowLevelMouseProc()
    {

        public LRESULT callback(int nCode, WPARAM wParam,
                MOUSEHOOKSTRUCT info)
        {
            LRESULT result = USER32INST.CallNextHookEx(hhk, nCode, wParam,
                    new WinDef.LPARAM(Pointer.nativeValue(info.getPointer())));
            if (nCode >= 0)
            {
                int action = wParam.intValue();
                // System.out.println(action);
                switch (action)
                {
                case WM_LBUTTONDOWN:
                    // do stuff
                    break;
                case WM_RBUTTONDOWN:
                    WindowsXPMouse.action.run();
                    break;
                case WM_MBUTTONDOWN:
                    // do other stuff
                    break;
                case WM_LBUTTONUP:
                    WindowsXPMouse.action.run();
                    break;
                case WM_MOUSEMOVE:

                    break;
                default:
                    break;
                }
                /**************************** DO NOT CHANGE, this code unhooks mouse *********************************/
                if (threadFinish == true)
                {
                    // System.out.println("post quit");
                    USER32INST.PostQuitMessage(0);
                }
                /*************************** END OF UNCHANGABLE *******************************************************/
            }
            return result;
        }
    };
}
项目:MercuryTrade    文件:MainTestKeyHook.java   
public LRESULT callback(int nCode, WPARAM wParam, LPARAM lParam) {
    System.err.println("callback bbbnhkilhjkibh nCode: " + nCode);
    return new LRESULT(0);
}
项目:spark-svn-mirror    文件:UserIdlePlugin.java   
public void initKeyHook() {

        thread = new Thread(new Runnable() {

        @Override
        public void run() {
            final User32 lib = User32.INSTANCE;
            HMODULE hMod = Kernel32.INSTANCE.GetModuleHandle(null);
            keyboardHook = new LowLevelKeyboardProc() {
            public LRESULT callback(int nCode, WPARAM wParam,
                KBDLLHOOKSTRUCT info) {
                if (nCode >= 0) {
                switch (wParam.intValue()) {
                // case WinUser.WM_KEYUP:
                case WinUser.WM_KEYDOWN:
                    // case WinUser.WM_SYSKEYUP:
                case WinUser.WM_SYSKEYDOWN:
                    // do active
                    userActive();
                }
                }
                return lib.CallNextHookEx(hhk, nCode, wParam,
                    info.getPointer());
            }
            };
            hhk = lib.SetWindowsHookEx(WinUser.WH_KEYBOARD_LL,
                keyboardHook, hMod, 0);

            // This bit never returns from GetMessage
            int result;
            MSG msg = new MSG();
            while ((result = lib.GetMessage(msg, null, 0, 0)) != 0) {
            if (result == -1) {
                System.err.println("error in get message");
                break;
            } else {
                System.err.println("got message");
                lib.TranslateMessage(msg);
                lib.DispatchMessage(msg);
            }
            }
            lib.UnhookWindowsHookEx(hhk);
        }
        });
        thread.start();
    }
项目:jpexs-decompiler    文件:WinUser.java   
/**
 * @param hwnd [in] Type: HWND
 *
 * A handle to the window.
 *
 * @param uMsg [in] Type: UINT
 *
 * The message.
 *
 * For lists of the system-provided messages, see System-Defined
 * Messages.
 *
 * @param wParam [in] Type: WPARAM
 *
 * Additional message information. The contents of this parameter depend
 * on the value of the uMsg parameter.
 *
 * @param lParam [in] Type: LPARAM
 *
 * Additional message information. The contents of this parameter depend
 * on the value of the uMsg parameter.
 *
 * @return the lresult
 */
LRESULT callback(HWND hwnd, int uMsg, WPARAM wParam, LPARAM lParam);
项目:jnaplatext    文件:WinUser.java   
/**
 * An application-defined function that processes messages sent
 * to a window.
 *
 * @param hwnd A handle to the window.
 * @param uMsg The message.
 * @param wParam Additional message information.
 * @param lParam Additional message information.
 * @return The result of the message processing and depends on
 * the message sent
 */
LRESULT callback(HWND hwnd, int uMsg, WPARAM wParam, LPARAM lParam);
项目:Nird2    文件:WindowsShutdownManagerImpl.java   
LRESULT DefWindowProc(HWND hwnd, int msg, WPARAM wp, LPARAM lp);
项目:Nird2    文件:WindowsShutdownManagerImpl.java   
LRESULT SetWindowLong(HWND hwnd, int index, WindowProc newProc);
项目:Nird2    文件:WindowsShutdownManagerImpl.java   
LRESULT SetWindowLongPtr(HWND hwnd, int index, WindowProc newProc);
项目:Nird2    文件:WindowsShutdownManagerImpl.java   
LRESULT DispatchMessage(MSG msg);
项目:Nird2    文件:WindowsShutdownManagerImpl.java   
LRESULT callback(HWND hwnd, int msg, WPARAM wp, LPARAM lp);
项目:Nird2    文件:WindowsShutdownManagerImpl.java   
LRESULT DefWindowProc(HWND hwnd, int msg, WPARAM wp, LPARAM lp);
项目:Nird2    文件:WindowsShutdownManagerImpl.java   
LRESULT SetWindowLong(HWND hwnd, int index, WindowProc newProc);
项目:Nird2    文件:WindowsShutdownManagerImpl.java   
LRESULT SetWindowLongPtr(HWND hwnd, int index, WindowProc newProc);
项目:Nird2    文件:WindowsShutdownManagerImpl.java   
LRESULT DispatchMessage(MSG msg);
项目:Nird2    文件:WindowsShutdownManagerImpl.java   
LRESULT callback(HWND hwnd, int msg, WPARAM wp, LPARAM lp);
项目:NanoUI    文件:User32Ext.java   
public LRESULT SendMessage(HWND hwnd, int msg, WPARAM wParam, LPARAM lParam);
项目:yajsw    文件:WindowsXPMouse.java   
LRESULT callback(int nCode, WPARAM wParam, MOUSEHOOKSTRUCT lParam);
项目:briar    文件:WindowsShutdownManagerImpl.java   
LRESULT DefWindowProc(HWND hwnd, int msg, WPARAM wp, LPARAM lp);
项目:briar    文件:WindowsShutdownManagerImpl.java   
LRESULT SetWindowLong(HWND hwnd, int index, WindowProc newProc);
项目:briar    文件:WindowsShutdownManagerImpl.java   
LRESULT SetWindowLongPtr(HWND hwnd, int index, WindowProc newProc);
项目:briar    文件:WindowsShutdownManagerImpl.java   
LRESULT DispatchMessage(MSG msg);
项目:briar    文件:WindowsShutdownManagerImpl.java   
public LRESULT callback(HWND hwnd, int msg, WPARAM wp, LPARAM lp);
项目:jpexs-decompiler    文件:WinUser.java   
LRESULT callback(int nCode, WPARAM wParam, KBDLLHOOKSTRUCT lParam);