Skip to main content

A cross-hardware GUI framework

Project description

UniGui

Screenshot

A cross-platform user interface framework based on Adafruit Displayio

This GUI framework can be used to create front-ends on multiple platforms, including Generic Linux and Windows PCs, Single board computers such as Raspberry Pi using a hardware display (for instance: PiTFT), and microcontroller-based projects (i.e. Feather RP2040) using CircuitPython and a display.

There is also a class called PygameDisplay that uses pygame to create a displayio.Display for use in a non-embedded environment. Much of that code was adopted from https://github.com/FoamyGuy/Blinka_Displayio_PyGameDisplay.

ToDo list

  • PR for Adafruit_Blinka and (possibly) PlatformDetect to allow usage on generic PC environments.
  • Overall improvement and features for widgets
  • Fix border_on function for generic widget so border is always drawn on top of other content (useful for viewing widget dimensions)
  • Map names (such as BASE_DARK, BASE_LIGHT, TEXT_DEFAULT, TEXT_HIGHLIGHT, etc) to the palette indices so that I can reference them independently of the color scheme
  • Figure out how to better handle clicks. For example, I might want a single widget to have multiple click regions. I don't think this is easy to do right now. Consider removing UniGui object totally and just making the Widget idea fully recursive.
  • Fix font file paths so they work always

How to use this framework

  • Clone this repository to your computer, then navigate into the project directory.
  • Create a python virtual environment with python -m venv .venv. Note: This project has been tested with Python 3.10.4 on Windows and Linux. You can name your virtual environment directory whatever you like. The current .gitignore will ignore all directories starting with .venv
  • Activate the virtual environment on Linux with source .venv/bin/activate.sh, or on Windows PowerShell with .venv\Scripts\Activate.ps1.
  • Install dependencies with pip install -r requirements.txt.
  • To run the main example, type python examples/desktop/code-desktop.py

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

unigui-carstentb-0.1.2.tar.gz (48.1 kB view details)

Uploaded Source

Built Distribution

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

unigui_carstentb-0.1.2-py3-none-any.whl (52.6 kB view details)

Uploaded Python 3

File details

Details for the file unigui-carstentb-0.1.2.tar.gz.

File metadata

  • Download URL: unigui-carstentb-0.1.2.tar.gz
  • Upload date:
  • Size: 48.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for unigui-carstentb-0.1.2.tar.gz
Algorithm Hash digest
SHA256 422ae378583fe321245bef0fbce3f003d84fe19df8523655d82628fdeaaa712a
MD5 71573fe69ced3d74021f5a67d61d14bd
BLAKE2b-256 0afc52a626c301264af09db0a074924ece06d0b6b9c87de9c8628d518bb3ae6d

See more details on using hashes here.

File details

Details for the file unigui_carstentb-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for unigui_carstentb-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 df881ce03c6a92d03b49db94c64b8f4d43f9e98e2930993e834a1c8a03623a5b
MD5 f606a5d1bb24489d152b40405ca288d8
BLAKE2b-256 8a4f77d7758350482d40d16dc20f438d3e70115bb0f6f1b8325a3fef92b43faf

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