Skip to main content

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


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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

WinAPIClient-0.1.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file WinAPIClient-0.1.0.tar.gz.

File metadata

  • Download URL: WinAPIClient-0.1.0.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.6

File hashes

Hashes for WinAPIClient-0.1.0.tar.gz
Algorithm Hash digest
SHA256 72b0b168073f2a1d320798b95824243582e59a650ee3d15971dac6638c38ed7e
MD5 518c47ac554a053c5063b7e69bccf659
BLAKE2b-256 c9dd2f11bf556aabbae43ee4ee30a90904f01edb7db82c2d2c24f469ea9a1404

See more details on using hashes here.

File details

Details for the file WinAPIClient-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: WinAPIClient-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.6

File hashes

Hashes for WinAPIClient-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bf848bd809ebb2d7d9bfa3eeb4223778d661e67c1678471e7871e8a8e40a170d
MD5 012b98a85f5c718e7430112abd8f2d89
BLAKE2b-256 34b3bbc27afb36f657fa000d658f3313f2d09231d215d3736974df17c2c30668

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page