{"id":27354190,"url":"https://github.com/maxbqb/winmagnification","last_synced_at":"2025-04-12T21:53:49.384Z","repository":{"id":42560603,"uuid":"507385940","full_name":"MaxBQb/WinMagnification","owner":"MaxBQb","description":"Python wrapper for Windows Magnification API","archived":false,"fork":false,"pushed_at":"2023-08-11T12:03:40.000Z","size":176,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-12T21:53:46.527Z","etag":null,"topics":["accessibility","color-filter","ctypes-wrapper","dependecy-free","inversion","lib","library","magnification","magnification-api","magnifier","package","python","python3","pywin32-support","win-magnification","winapi","windows","wrapper-library"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MaxBQb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-06-25T18:17:51.000Z","updated_at":"2025-04-10T11:47:10.000Z","dependencies_parsed_at":"2022-09-04T13:01:20.423Z","dependency_job_id":null,"html_url":"https://github.com/MaxBQb/WinMagnification","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaxBQb%2FWinMagnification","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaxBQb%2FWinMagnification/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaxBQb%2FWinMagnification/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaxBQb%2FWinMagnification/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MaxBQb","download_url":"https://codeload.github.com/MaxBQb/WinMagnification/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248637825,"owners_count":21137538,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["accessibility","color-filter","ctypes-wrapper","dependecy-free","inversion","lib","library","magnification","magnification-api","magnifier","package","python","python3","pywin32-support","win-magnification","winapi","windows","wrapper-library"],"created_at":"2025-04-12T21:53:48.631Z","updated_at":"2025-04-12T21:53:49.371Z","avatar_url":"https://github.com/MaxBQb.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WinMagnification\n![Windows](https://img.shields.io/badge/platform-Windows-green)\n[![PyPI version shields.io](https://img.shields.io/pypi/v/WinMagnification.svg)](https://pypi.org/project/WinMagnification/)\n[![Documentation Status](https://readthedocs.org/projects/winmagnification/badge/?version=latest)](https://winmagnification.readthedocs.io/en/latest/)\n[![GitHub license](https://img.shields.io/github/license/MaxBQb/WinMagnification.svg)](https://github.com/MaxBQb/WinMagnification/blob/master/LICENSE.md)\n---\n\nPython wrapper for [Windows Magnification API](https://docs.microsoft.com/en-us/windows/win32/api/_magapi/)\n\n```cmd\npip install WinMagnification\n```\n\nCovered functions:\n+ MagInitialize\n+ MagUninitialize\n+ MagGetFullscreenColorEffect\n+ MagSetFullscreenColorEffect\n+ MagSetFullscreenTransform\n+ MagGetFullscreenTransform\n+ MagSetColorEffect\n+ MagGetColorEffect\n+ MagSetWindowTransform\n+ MagGetWindowTransform\n+ MagSetWindowSource\n+ MagGetWindowSource\n+ MagSetWindowFilterList\n+ MagGetWindowFilterList\n+ MagGetInputTransform\n+ MagSetInputTransform\n+ MagShowSystemCursor\n\nYou may use old-style function names:\n```py\nimport win_magnification as mag\nimport win_magnification.old as old_mag\n\nold_mag.MagInitialize()\nold_mag.MagSetFullscreenColorEffect(mag.const.COLOR_INVERSION_EFFECT)\nold_mag.MagSetFullscreenColorEffect(mag.const.DEFAULT_COLOR_EFFECT)\nold_mag.MagUninitialize()\n```\n\nOr you may use more pythonic function names:\n```py\nimport win_magnification as mag\n\nmag.initialize()\nmag.set_fullscreen_color_effect(mag.const.COLOR_INVERSION_EFFECT)\nmag.reset_fullscreen_color_effect()\nmag.finalize()\n```\n\nOr... you can even use Object-Oriented wrapper:\n```py\nimport win_magnification as mag\n\napi = mag.WinMagnificationAPI()\napi.fullscreen.color_effect.raw = mag.const.COLOR_INVERSION_EFFECT\napi.fullscreen.color_effect.reset()\n```\n\n# Restrictions\nThere are 3.5 groups of functions:\n\n- Fullscreen (nothing required, call and chill) have limited functional, but simple:\n  + get/set_fullscreen_color_effect\n  + get/set_fullscreen_transform\n  + **get_input_transform**\n- Window (requires window creation as shown in [example](https://github.com/MaxBQb/WinMagnification/blob/master/example/windows_utils.py)),\nmore powerful, but requires such things like custom window creation (hello from [pywin32](https://pypi.org/project/pywin32/)),\n[UiAccess](https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/user-account-control-allow-uiaccess-applications-to-prompt-for-elevation-without-using-the-secure-desktop) (Hard to obtain) if you need your magnifier [above everything](https://blog.adeltax.com/window-z-order-in-windows-10/), but you can simulate all fullscreen functions too:\n  + get/set_color_effect\n  + get/set_transform\n  + get/set_source\n  + get/set_filters (supports exclusion only, looks like excluded windows never exist for magnifier)\n- [UiAccess](https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/user-account-control-allow-uiaccess-applications-to-prompt-for-elevation-without-using-the-secure-desktop) required:\n  + **set_input_transform**\n- Other:\n  + initialize\n  + finalize\n  + set_cursor_visibility (cursor stay hidden until active)\n\n# Known alternatives\n[Pymagnification](https://pypi.org/project/pymagnification/)\n\nI can't actually use this lib, I don't know why, it just does nothing and imports nothing.\nAlso, it doesn't support fullscreen* functions\n\n# Known issues\nWorking from different threads is pain, and I'm trying to solve/restrict this somehow\n\n# [PyWin32](https://pypi.org/project/pywin32/) Integration?\nThis package uses ctypes only, so no pywin32 required.\nBut, well, you can use pywin32 for creating magnifier windows and so on (see [example](https://github.com/MaxBQb/WinMagnification/blob/master/example/windows_utils.py))\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxbqb%2Fwinmagnification","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxbqb%2Fwinmagnification","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxbqb%2Fwinmagnification/lists"}