High-level wrapper around pywin32 for developing windows overlays
Project description
Installing
pip install WinAPIClient
Usage
Common usage
# select the currently active window
winapi = WinAPIClient()
# alternatively select another window by title:
winapi = WinAPIClient(wnd_title="Untitled - Notepad")
# or by manually acquired window handle:
winapi = WinAPIClient(hwnd=0xC0FFEE)
# make selected window top-level, enable transparency, and make click-through
winapi.init_overlay()
# same as:
winapi = WinAPIClient(init_overlay=True)
Manually set overlay settings
# initiate layered mode (allows windows to use transparency)
# Note: layered mode will make a window click-through
winapi.set_layered_mode()
# enable transparency (sets style-flags required for transparency)
# Note: after transparency is enabled, any pixel in the window matching
# the color "winapi.color_key" will be transparent
winapi.set_transparency(opacity=1, color_key=None)
# make the window always top-level (appearing in front of other windows)
winapi.set_always_toplevel()
Other methods
# make entire window transparent (not just the color_key)
winapi.set_transparency(.5)
# reset the window style to default
winapi.reset_style(retain_size=False, retain_pos=False)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
WinAPIClient-0.1.0.tar.gz
(4.8 kB
view hashes)
Built Distribution
Close
Hashes for WinAPIClient-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf848bd809ebb2d7d9bfa3eeb4223778d661e67c1678471e7871e8a8e40a170d |
|
MD5 | 012b98a85f5c718e7430112abd8f2d89 |
|
BLAKE2b-256 | 34b3bbc27afb36f657fa000d658f3313f2d09231d215d3736974df17c2c30668 |