SlimTrade
SlimTrade copied to clipboard
Full support for Mac and Linux
SlimTrade needs to be able to do two things that are currently not cross platform:
- Detect if Path of Exile is currently focused
- Focus Path of Exile
This is currently only supported on windows. It is done using the Java Native Access (JNA) library, full API here. For Windows, it uses the win32/user32 API, which has the functions for getting the foreground window, enumerating all windows, and focusing windows. Using this library isn't required, but it does have additional APIs for other platforms.
The actual code that needs updating is getFocusedWindowTitle() and focusPathOfExileWindow in PoeInterface.java marked with TODOs and FIXMEs. This code runs fairly frequently, so it cannot be noticeably slow.
There doesn't seem to be a pure Java solution to this issue, and I don't currently have other operating systems to test solutions myself. Any feedback is appreciated.