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 :win.
HWND_DESKTOP
:win
See PMREF documentation for the following functions:
PMREF
BOOL WinFocusChange (HWND hwndDesktop, HWND hwndSetFocus, ULONG flFocusChange) HWND WinQueryFocus (HWND hwndDesktop) BOOL WinSetFocus (HWND hwndDesktop, HWND hwndSetFocus)
which are exported with a tag :win. Use HWND_DESKTOP (exported with the same tag) as the first argument for these functions.
Prefix Win can be removed, the resulted functions omit the first argument, and fill $! and $^E on error. These functions are exported with a tag :short.
Win
:short
Ilya Zakharevich, ilya@math.ohio-state.edu.
perl(1).
To install OS2::Focus, copy and paste the appropriate command in to your terminal.
cpanm
cpanm OS2::Focus
CPAN shell
perl -MCPAN -e shell install OS2::Focus
For more information on module installation, please visit the detailed CPAN module installation guide.