top of page

MiniWin Open Source Embedded Window Manager

MiniWin is a generic open source overlapped window manager for small embedded systems with a touch screen. It is written in compliant C99 and is easily portable. The hardware interface is separated out into a small hardware abstraction layer making the rest of the system re-targetable to a wide variety of processors. MiniWin will run easily on ARM Cortex M0 or above, PIC32 or Renesas RX processors. MiniWin has a simple easy to understand API giving access to fully overlapped windows. The standard look and feel is easy to customize to your needs. Included with MiniWin are two sets of standard controls in standard and large sizes and a growing library of standard dialogs windows. All code developed for MiniWin and MiniWin generated code is MISRA 2012 'required' compliant.

Who is MiniWin For?

  • Open source projects that need a quick-start user interface

  • Small commercial products that do not have the budget to buy a window manager or the manpower to develop one

  • Hardware constrained devices that have limited resources but also have limited requirements

  • Student projects that can build on the supplied example code 

  • Developers who want a quick-start user interface without the need for extensive driver development effort

Features

  • Written specifically for small embedded systems with a LCD display and a touch screen

  • Apart from a small hardware abstraction layer, platform independent

  • Supports multiple overlapped windows with Z ordering

  • Supports display rotation

  • Incorporates a flexible graphics library

  • Comes with a 2 sets of user interface controls - standard size for use with a touch screen and stylus, and large size for touch screen with finger input.

  • Includes a set of standard dialogs that need no further code written to use.

  • No dynamic memory used - all data structures allocated at compile time

  • Two different sized standard bitmapped fonts included - fixed width and proportional - and 4 further optional bitmapped fonts. Any bitmapped font can be plotted in 4 rotations.

  • TrueType font rendering support allowing you to to render justified, kerned, anti-aliased text on screen using a TrueType font of your choice.

  • A clean easy to use API

  • Comprehensive documentation and example code

  • Runs in bare metal systems or within a single thread of a RTOS.

  • Example projects showing FatFS (with USB host or SD interface), FreeRTOS integration, and TrueType font rendering.

  • Requires minimal memory.

  • Compiles without warning with GCC, clang, CL, XC32 or CC-RX

  • Doxygen documentation for every function and type

  • In-built touch screen calibration capability the first time the window manager is started.

  • Code generator to create all your windows and controls from a simple configuration file in JSON format.

  • Windows and Linux simulations allow for rapid user interface code development before hardware is available and without time consuming reflashing.

User Interface Controls

  • Button

  • Check box

  • List box with optional icons

  • Radio buttons

  • Menu bar

  • Text label

  • Progress bar

  • Horizontal scroll bar

  • Vertical scroll bar

  • Multi-directional arrow buttons

  • Numeric keypad

  • ASCII keyboard (standard sized controls only)

  • TrueType text box with rendering of justified kerned anti-aliased text.

  • Multiple tabs

  • Expandable tree

These are the standard ones. You can easily add more.

m.jpg

Overlapped windows showing standard size controls. Any control or menu bar item can be enabled or disabled. Controls can be shown or hidden.

m.jpg

Large size controls for finger input on small screens. Where relevant, controls implement touch and drag (for example scroll bars and sliders) or touch and hold down (for example arrow buttons).

Movable windows. Grab the title bar and move the window around the display.

MiniWin Windows

  • Optional title bar, menu bar, title and border

  • Overlapped with unique Z order

  • Movable

  • Resizable

  • Maximise, minimise, resize and close icons

  • Minimizable to icon on desktop

  • Customizable desktop colour or bitmap

  • Can have a single system modal window

  • Window-aware graphics library for drawing in a window

  • Standard or large sized features

Of course, you don't have to use overlapped windows at all. If you want fixed dedicated areas of the display with each area being responsive to user input and having its own message and paint functions, that's possible too. Any window can be created with no border or title bar, and like this it's fixed on the screen.

Standard Dialogs

MiniWin includes a growing collection of pre-defined standard dialogs. You don't have to do any window definition or coding to use these, just call the utility function to get it displayed. Each dialog can have its appearance controlled from the utility function parameters, for example the message to display in the message box dialogs and the text shown in the title bar.

  • Single button message box

  • Double button message box

  • Time chooser

  • Date chooser

  • Text entry dialog

  • Number entry dialog

  • File or folder chooser dialog

MiniWin Quick Start Guide

There's a quick start guide here.

MiniWin Window Management API

The MiniWin API is described here.

Developer Utility Applications

MiniWin includes the following utility applications with source code:

 

  • Converter for monochrome bitmap files in .bmp format to C99 source code.

  • Converter for 24 bit colour bitmap files in .bmp format to C99 source code.

  • Converter for TrueType font files to run-length encoded C99 source file for a single point size

  • Code generator to create your window and control code from a JSON format configuration file.

These utilities can be built for Windows or Linux from source.

Resizable windows. Drag the resize icon in the title bar and expand or shrink the window. A window can also be maximised, minimised or closed with the title bar icons.

m.jpg

Window-aware graphics library containing multiple rotatable fonts, line-styles, pattern fills and 2D polygon rotation and fill.

scr_dump6.jpg

Drivers and Examples

MiniWin comes with all source for the window manager, graphics library and user interface components. It also comes with 8 example projects - a simple getting started example, a non-overlapped fixed windows example, an example that integrates a USB pen drive or SD card to read and show text and image files, an example integrated with FreeRTOS, a TrueType font demonstration, an example showing root window capabilities, a project showing usage of all MiniWin's user interface components and a project that interfaces with a video camera showing a video stream in a MiniWin window.

MiniWin comes with 13 HAL layer samples:

 

  • STM32F4DISCOVERY board using an ILI9341 driven QVGA LCD with touch screen

  • ESP32 based DevKitC board using an ILI9341 driven QVGA LCD with touch screen built using ESP32-IDF

  • ESP32 based DevKitC board using an ILI9341 driven QVGA LCD with touch screen built using Arduino IDE

  • STM32F429I-DISC1 board with built in QVGA LCD with touch screen

  • NXP 54628 board with built in WQVGA LCD and touch screen

  • Renesas Envision Kit board running RX65N processor with built in WQVGA LCD with touch screen built with CC-RX

  • Renesas Envision Kit board running RX65N processor with built in WQVGA LCD with touch screen built with GCC-RX

  • Microchip PIC32MX board using an ILI9341 driven QVGA LCD with touch screen

  • Microchip PIC32MZ board using an ILI9341 driven QVGA LCD with touch screen

  • Raspberry Pi Zero W board using an ILI9341 driven QVGA LCD with touch screen

  • Linux simulator built with GCC or clang

  • Windows simulator built with GCC or clang under MSYS2

  • Windows simulator built with Visual Studio CL

Sample simulation projects are built using standalone gmake makefiles with GCC or clang for Windows and Linux or Microsoft Visual Studio CL compiler via nmake makefiles for Windows. Eclipse project files are provided for the Windows and Linux simulation projects. Build/project files are provided for all examples.

MiniWin has the ability to debug on Windows or Linux running the simulators. Develop your embedded part of your application on target, but do the user interface development part on the simulators on Windows or Linux. This allows much quicker debugging than flashing to target every time you make a change. 

Get images in your user interface. Convert them from .bmp files to C99 source files using the provided MiniWin utilities and link them straight into your project.

Graphics Library

MiniWin comes with a standard graphics library supporting the normal lines, bitmapped and TrueType font rendering, bitmaps and shapes as well as polygon and shape rotation. It includes simple patterned lines and texture fills.

All graphics library drawing routines are window aware - you do not have to worry about where your window is, if it is overlapped or partly off screen. You just draw to a window's client area regardless using the client area as your frame of reference. MiniWin performs all window offset translations and clipping required. You will never end up drawing outside of your window or scribbling somewhere you shouldn't.

Customisability

Because MiniWin is open source its look and feel is fully customisable. Don't like the look of a user interface component? Simple. Modify its paint function and draw it how you want it to look.

Window Paint Algorithm

MiniWin uses a paint algorithm that is optimised for use on a system without any off-screen shadow buffers for its windows, i.e. all writes to the display memory via the graphics library are shown immediately on the display. To avoid flickering each part of the display is written to only once for each repaint request regardless of how overlapped the windows are.

The paint algorithm used is the singly-combined sorted intersections algorithm.

Download

The latest stable release and all previous releases can be found here. The latest development code (which may not be stable) can be found here.

Documentation can be found here.

Future Development

  • Raspberry Pi Pico port nearing completion

  • Arduino Due port will follow

What's New

Windows can be used in fixed mode without overlapping, or a combination of non-overlapped fixed windows with overlapped pop-up windows on top

On any window you can mix and match standard or large controls, create your own following the samples provides, and mix in your own graphics using the provided window-aware graphics library.

m.jpg
  • PIC32 ports for MX and MZ variants

  • Raspberry Pi Zero port

  • clang added to list of supported compilers

  • First Arduino IDE build supported for Espressif ESP32 DevKitC board

Limitations

MiniWin is only small and has some limitations.

  • The maximum number of windows and controls in use at any one time must be fixed at compile time.

  • Controls do not have a Z order within their window. They cannot be overlapped without making underneath ones invisible.

  • A window border width is currently fixed at 1 pixel.

  • A window can only be resized using the resize icon on its title bar. A window cannot be resized using its border.

  • Bitmapped fonts are only ASCII. TrueType fonts can only access characters from 0-255 (no wchar support yet).

  • All of MiniWin runs in a single thread if threads are used or the main loop if they are not. Badly behaved code will lock the user interface.

  • The MiniWin window timer is not accurate and is only available for user interface purposes.

  • The MiniWin LCD driver interface has no capability to read from the display.

  • The MiniWin touch driver is used in a polling manner. Different touch screens work in different ways and polling allows a HAL interface independent of touch screen type.

  • A design goal of MiniWin is minimal porting effort needed and ease of use for the programmer. The feature set is small but so is the API. 

Third Party Software

MiniWin uses the following third party software libraries:

STM32 HAL driver library

NXP SDK

Renesas FIT modules and BSP

GCC RX BSP

JSON11

FatFS

EasyBMP

FreeRTOS

FreeType

MCUFont

DejaVu TrueType font

Touch screen calibration by Carlos Vidales

OpenCV version 4.30

Espressif ESP-IDF for ESP32

Integrated file handling using FatFS. You can have multiple windows of the same type each with its own data model.

m.jpg

Running in emulation mode under MS Windows. Get your user interface coding done rapidly with no re-flashing after every change.

l.jpg

Example Project Videos

File example project running under Windows using standard size controls. This example on real hardware accesses text and image files on a USB pen drive using the FatFS third party software and ST's HAL drivers. In the Windows/Linux examples it access files from the local file system.

The simulator has been ported to Linux if that is your preference for you embedded development. Command line makefiles are provided in addition to the TrueStudio project files.

Running on a cheap and easily available STM32 development board - ideal for evaluating MiniWin for little time and cost.

Simple example project running under Windows using standard sized controls. It shows a standard dialog box popping up - the single button message box.

Fixed windows example running on a STM32F429DISC1 development board. This example uses large sized controls that can be finger operated with this sized LCD display.

Contact

Comments, suggestions, support questions, feature requests, bug reports, complaints, example applications, any other general adulation or rants?

Get in touch here.

Thanks! Message sent.

bottom of page