Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

13
LINES

< > BotCompany Repo | #1015115 // onGlobalMouseRelease [JNativeHook]

JavaX fragment (include)

import org.jnativehook.mouse.*;

// f: voidfunc(NativeMouseEvent)
static AutoCloseable onGlobalMouseRelease(fO f) {
  jnativehook_init();
  final NativeMouseInputAdapter listener = new {
    public void nativeMouseReleased(NativeMouseEvent e) {
      pcallF(f, e);
    }
  };
  GlobalScreen.addNativeMouseListener(listener);
  ret autoCloseable { GlobalScreen.removeNativeMouseListener(listener); };
}

Author comment

Began life as a copy of #1015113

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1015115
Snippet name: onGlobalMouseRelease [JNativeHook]
Eternal ID of this version: #1015115/4
Text MD5: 05237bd50446e59f3f3d0c6b31e878fd
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-11-15 02:40:36
Source code size: 413 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 305 / 346
Version history: 3 change(s)
Referenced in: [show references]