OS2::Focus - Perl extension to get and set focus on PM windows.
use OS2::Focus ':short'; $old_focus = QueryFocus; ... # Say, create some Tk windows... SetFocus($old_focus) or warn "Cannot change focus, the error is $^E.\n".
None by default.
HWND_DESKTOP is exported with a tag
PMREF documentation for the following functions:
BOOL WinFocusChange (HWND hwndDesktop, HWND hwndSetFocus, ULONG flFocusChange) HWND WinQueryFocus (HWND hwndDesktop) BOOL WinSetFocus (HWND hwndDesktop, HWND hwndSetFocus)
which are exported with a tag
HWND_DESKTOP (exported with the same tag) as the first argument for these functions.
Win can be removed, the resulted functions omit the first argument, and fill $! and $^E on error. These functions are exported with a tag
Ilya Zakharevich, email@example.com.