{ "info": { "author": "David Ma", "author_email": "davidma@davidma.cn", "bugtrack_url": null, "classifiers": [], "description": "# Overlay\nA package that creates and manipulates screen overlays based on tkinter.\n\n## Platforms\n- Mac OS\n- Linux (not tested)\n- Windows (not tested)\n\n## Installation\n```sh\npip install overlay\n```\n\n## Usage\nA basic overlay is created as such:\n```python\nfrom overlay import Window\n\nwin = Window()\nWindow.launch()\n```\n\nThe constructor of the _Window_ class takes the following (optional) parameters:\n- __size__: _tuple_, the dimension (width, height) of the overlay window.\n- __position__: _tuple_, the position of the overlay (on screen).\n- __transparent__: _bool_, whether to set the overlay background transparent.\n- __alpha__: _float [0, 1]_, the alpha (transparency) of the overlay.\n- __draggable__: _bool_, whether the window can be dragged\n\nNote that the parameters mentioned above can be edited any time as attributes of an instance of _Window_.\n\nIn order to edit the content of a overlay, one needs to obtain the root of the overlay, upon which all else shall be build.\n```python\nimport tkinter as tk\nfrom overlay import Window\n\nwin = Window()\nlabel = tk.Label(win.root, text=\"Window_0\")\nlabel.pack()\nWindow.launch()\n```\n\nMultiple overlays can be created just as easily:\n```python\nimport tkinter as tk\nfrom overlay import Window\n\nwin_0 = Window()\nlabel_0 = tk.Label(win_0.root, text=\"Window_0\")\nlabel_0.pack()\nwin_1 = Window()\nlabel_1 = tk.Label(win_1.root, text=\"Window_1\")\nlabel_1.pack()\nWindow.launch()\n```\n\nThe following program covers a brief explaination on other methods of the _Window_ class.\n```python\nimport tkinter as tk\nfrom time import sleep\nfrom overlay import Window\n\ndef other_stuff(text):\n\tprint(text)\n\tsleep(2)\n\twin_0.hide() # Hides the overlay.\n\tsleep(1)\n\twin_0.show() # Shows the overlay.\n\tsleep(1)\n\tWindow.hide_all() # Hides all overlays.\n\tsleep(1)\n\tWindow.show_all() # Shows all overlays.\n\tsleep(1)\n\twin_0.destroy() # Kills the overlay.\n\tsleep(1)\n\tWindow.destroy_all() # Kills all overlays and ends the mainloop.\n\n\n'''Creates two windows.'''\nwin_0 = Window()\nlabel_0 = tk.Label(win_0.root, text=\"Window_0\")\nlabel_0.pack()\nwin_1 = Window()\nlabel_1 = tk.Label(win_1.root, text=\"Window_1\")\nlabel_1.pack()\n\nWindow.after(2000, other_stuff, 'Hello World') # Identical to the after method of tkinter.Tk.\n\nWindow.launch()\n```\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/davidmaamoaix/Overlay", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "overlay", "package_url": "https://pypi.org/project/overlay/", "platform": "", "project_url": "https://pypi.org/project/overlay/", "project_urls": { "Homepage": "https://github.com/davidmaamoaix/Overlay" }, "release_url": "https://pypi.org/project/overlay/1.1.0/", "requires_dist": null, "requires_python": "", "summary": "A package that creates and manipulates screen overlays based on tkinter.", "version": "1.1.0" }, "last_serial": 4645941, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "d17815178822d13d8167dc84238aa9c2", "sha256": "00ab06f7fbb1cbd9dc3a6ddc530f75e650f33a5360524a40345af8bfa82b6006" }, "downloads": -1, "filename": "overlay-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "d17815178822d13d8167dc84238aa9c2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3525, "upload_time": "2018-12-29T13:02:15", "url": "https://files.pythonhosted.org/packages/88/53/28984403c9dd287239765c64dd51c75490cc8d7b9d12e98ac6e04a242e7a/overlay-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d507eaa2e873dd1e358a741c995b2114", "sha256": "bfae2cf8d8bd8054bcf96ec18b0df6eba7629085132b3a961a2612a49c8d536b" }, "downloads": -1, "filename": "overlay-1.0.0.tar.gz", "has_sig": false, "md5_digest": "d507eaa2e873dd1e358a741c995b2114", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2171, "upload_time": "2018-12-29T13:02:18", "url": "https://files.pythonhosted.org/packages/6c/e0/b9b4aeac0bec23612760b0c88b272b8d44f6cf1d994aaf41c8e244b786f7/overlay-1.0.0.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "9a5408bfb9855cc4ffb45d652aa37db1", "sha256": "d67ceb5c8706adae9e6a636eace39742f1e4edc3a18b0383b1970156e6dd760c" }, "downloads": -1, "filename": "overlay-1.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "9a5408bfb9855cc4ffb45d652aa37db1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4456, "upload_time": "2018-12-30T10:50:53", "url": "https://files.pythonhosted.org/packages/5e/00/369ed47eca373d25303129d1833d7e0ee0b677a19852032be4ff1412791b/overlay-1.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8671df66d88b01170556fb1d7fa45e89", "sha256": "b1ad4b0ff3f25daca32e92d5923a09fb7c5af8ea26d200942f2bfdca6d6a56e4" }, "downloads": -1, "filename": "overlay-1.1.0.tar.gz", "has_sig": false, "md5_digest": "8671df66d88b01170556fb1d7fa45e89", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3225, "upload_time": "2018-12-30T10:50:54", "url": "https://files.pythonhosted.org/packages/8d/b1/77ff041030625ec458214f8b0ddf781a1a757ec9bd94a3b7829a704efec1/overlay-1.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9a5408bfb9855cc4ffb45d652aa37db1", "sha256": "d67ceb5c8706adae9e6a636eace39742f1e4edc3a18b0383b1970156e6dd760c" }, "downloads": -1, "filename": "overlay-1.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "9a5408bfb9855cc4ffb45d652aa37db1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4456, "upload_time": "2018-12-30T10:50:53", "url": "https://files.pythonhosted.org/packages/5e/00/369ed47eca373d25303129d1833d7e0ee0b677a19852032be4ff1412791b/overlay-1.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8671df66d88b01170556fb1d7fa45e89", "sha256": "b1ad4b0ff3f25daca32e92d5923a09fb7c5af8ea26d200942f2bfdca6d6a56e4" }, "downloads": -1, "filename": "overlay-1.1.0.tar.gz", "has_sig": false, "md5_digest": "8671df66d88b01170556fb1d7fa45e89", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3225, "upload_time": "2018-12-30T10:50:54", "url": "https://files.pythonhosted.org/packages/8d/b1/77ff041030625ec458214f8b0ddf781a1a757ec9bd94a3b7829a704efec1/overlay-1.1.0.tar.gz" } ] }