1 | import org.jnativehook.mouse.*; |
2 | |
3 | // f: voidfunc(NativeMouseEvent) |
4 | static AutoCloseable onGlobalMousePress(fO f) { |
5 | jnativehook_init(); |
6 | final NativeMouseInputAdapter listener = new { |
7 | public void nativeMousePressed(NativeMouseEvent e) { |
8 | pcallF(f, e); |
9 | } |
10 | }; |
11 | GlobalScreen.addNativeMouseListener(listener); |
12 | ret autoCloseable { GlobalScreen.removeNativeMouseListener(listener); }; |
13 | } |
Began life as a copy of #1010548
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: | #1015113 |
Snippet name: | onGlobalMousePress [JNativeHook] |
Eternal ID of this version: | #1015113/6 |
Text MD5: | f8601a4d93de72d8b7a5942e9edda44b |
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:29 |
Source code size: | 410 bytes / 13 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 524 / 505 |
Version history: | 5 change(s) |
Referenced in: | [show references] |