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

13
LINES

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

JavaX fragment (include)

1  
import org.jnativehook.mouse.*;
2  
3  
// f: voidfunc(NativeMouseEvent)
4  
static AutoCloseable onGlobalMouseRelease(fO f) {
5  
  jnativehook_init();
6  
  final NativeMouseInputAdapter listener = new {
7  
    public void nativeMouseReleased(NativeMouseEvent e) {
8  
      pcallF(f, e);
9  
    }
10  
  };
11  
  GlobalScreen.addNativeMouseListener(listener);
12  
  ret autoCloseable { GlobalScreen.removeNativeMouseListener(listener); };
13  
}

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: 308 / 351
Version history: 3 change(s)
Referenced in: [show references]