# Preface

* [Related Documents](#related-documents)
* [Organization of this Guide](#organization-of-this-guide)
* [Obtaining Samples of the Guide](#obtaining-samples-of-the-guide)
* [Compiling and Running Environment of the Samples](#compiling-and-running-environment-of-the-samples)
* [Copyright and Licensing](#copyright-and-licensing)

MiniGUI is a mature cross-platform windowing system and a GUI (Graphics User Interface) support system for embedded systems and smart IoT devices.

MiniGUI aims to provide a fast, stable, full-featured, tailorable, and cross-platform windowing and GUI support system, which is especially fit for embedded systems or smart IoT devices based-on Linux/uClinux, eCos, and other traditional RTOSes, such as ThreadX, FreeRTOS, RTEMS, RT-Thread, VxWorks, Nucleus, pSOS, uC/OS-II, and OSE.

This handbook is the programming guide for the MiniGUI version 3.2 or later. It describes how to develop applications based on MiniGUI core and the following MiniGUI components:

* mGUtils: This component contains miscellaneous utilities like `ColorSelectionDialogBox`, `FileOpenDialogBox`, and so on.
* mGPlus: This component provides support for 2D vector graphics functions like path, gradient, anti-aliased stretch, and color combination.
* mGEff: This component provides an animation framework for MiniGUI app. It also provides some popular UI/UE special effects.
* mGNCS: This component provides a new control set for MiniGUI app, and a new framework for MiniGUI apps as well. By using mGNCS, you can use miniStudio to develop MiniGUI app in WYSIWYG way.
* mGNCS4Touch: This component provides some new controls, which are compliant to the new control API spec of mGNCS, for devices with touch screens.

This handbook is a complete guide on MiniGUI programming, which describes the foundation knowledge of MiniGUI programming and various programming methods and skills, and describes the main API functions in detail. Though the handbook tries to describe various aspects of MiniGUI programming at length, it is not a complete reference manual about MiniGUI APIs; please refer to [MiniGUI API Reference Manuals](https://github.com/VincentWei/minigui-docs/blob/master/api-reference/README.md) for relevant information.

## Related Documents

The documents related to this guide:

* [MiniGUI Overview](../../introduction/minigui-overview) - The goals, features, advantages, and road map of MiniGUI.
* [MiniGUI User Manual](../user-manual) - How to configure, install, and run MiniGUI.
* [MiniGUI Supplementary Documents](../supplementary-docs) - Supplementary documents about new features.
* API Reference Manuals for MiniGUI Core:
  * [MiniGUI 4.0 API Reference (MiniGUI-Processes mode)](http://www.minigui.com/doc-api-ref-minigui-procs-4.0.0/html/index.html) - The API reference for MiniGUI V4.0 multi-process runmode.
  * [MiniGUI 4.0 API Reference (MiniGUI-Threads mode)](http://www.minigui.com/doc-api-ref-minigui-ths-4.0.0/html/index.html) - The API reference for MiniGUI V4.0 multi-thread runmode.
  * [MiniGUI 4.0 API Reference (MiniGUI-Standalone mode)](http://www.minigui.com/doc-api-ref-minigui-sa-4.0.0/html/index.html) - The API reference for MiniGUI V4.0 standalone runmode.
  * [MiniGUI 3.2 API Reference (MiniGUI-Processes mode)](http://www.minigui.com/api_ref/minigui-3.2.0/procs/index.html) - The API reference for MiniGUI V3.2 multi-process runmode.
  * [MiniGUI 3.2 API Reference (MiniGUI-Threads mode)](http://www.minigui.com/api_ref/minigui-3.2.0/ths/index.html) - The API reference for MiniGUI V3.2 multi-thread runmode.
  * [MiniGUI 3.2 API Reference (MiniGUI-Standalone mode)](http://www.minigui.com/api_ref/minigui-3.2.0/sa/index.html) - The API reference for MiniGUI V3.2 standalone runmode.
* API Reference for MiniGUI Components:
  * [mGUtils 1.2 API Reference](http://www.minigui.com/doc-api-ref-mgutils-1.2.2/html/index.html) - The API reference for mGUtils V1.2.
  * [mGPlus 1.4 API Reference](http://www.minigui.com/doc-api-ref-mgplus-1.4.0/html/index.html) - The API reference for mGUtils V1.4.
  * [mGEff 1.2 API Reference](http://www.minigui.com/doc-api-ref-mgeff-1.2.2/html/index.html) - The API reference for mGEff V1.2.
  * [mGNCS 1.2 API Reference](http://www.minigui.com/doc-api-ref-mgncs-1.2.4/html/index.html) - The API reference for mGNCS V1.2.
  * [mGNCS4Touch 1.2 API Reference](http://www.minigui.com/doc-api-ref-mgncs4touch-1.2.2/html/index.html) - The API reference for mGNCS4Touch V1.2.
* Links to Release Notes:
  * [MiniGUI Core](https://github.com/VincentWei/minigui/blob/master/RELEASE-NOTES.md)
  * [mGUtils](https://github.com/VincentWei/mgutils/blob/master/RELEASE-NOTES.md)
  * [mGPlus](https://github.com/VincentWei/mgplus/blob/master/RELEASE-NOTES.md)
  * [mGEff](https://github.com/VincentWei/mgeff/blob/master/RELEASE-NOTES.md)
  * [mGNCS](https://github.com/VincentWei/mgncs/blob/master/RELEASE-NOTES.md)
  * [mGNCS4Touch](https://github.com/VincentWei/mgncs4touch/blob/master/RELEASE-NOTES.md)

## Organization of this Guide

Except this preface, the text is divided into six parts (dozens chapters) and an appendix in total:

* Part I: Foundation of MiniGUI Programming. We describe the foundation concepts of MiniGUI programming in this part.
  * [Beginning MiniGUI Programming](part-i-foundation-of-minigui-programming/miniguiprogguidepart1chapter01)
  * [Window and Message](part-i-foundation-of-minigui-programming/miniguiprogguidepart1chapter02)
  * [Foundation of Dialog Box Programming](part-i-foundation-of-minigui-programming/miniguiprogguidepart1chapter03)
  * [Foundation of Control Programming](part-i-foundation-of-minigui-programming/miniguiprogguidepart1chapter04)
  * [Advanced Programming of Control](part-i-foundation-of-minigui-programming/miniguiprogguidepart1chapter05)
  * [Menu](part-i-foundation-of-minigui-programming/miniguiprogguidepart1chapter06)
  * [Scrollbar](part-i-foundation-of-minigui-programming/miniguiprogguidepart1chapter07)
  * [Keyboard and Mouse](part-i-foundation-of-minigui-programming/miniguiprogguidepart1chapter08)
  * [Icon, Cursor, and Caret](part-i-foundation-of-minigui-programming/miniguiprogguidepart1chapter09)
  * [Look-and-feel and UI effects](part-i-foundation-of-minigui-programming/miniguiprogguidepart1chapter10)
  * [Other Programming Topics](part-i-foundation-of-minigui-programming/miniguiprogguidepart1chapter11)
  * [Using mGUtils](part-i-foundation-of-minigui-programming/miniguiprogguidepart1chapter12)
* Part II: Using mGNCS. We describe the concepts and the use of main APIs of mGNCS in this part.
  * [Brief Introduction to mGNCS](part-ii-using-mgncs/miniguiprogguidepart2chapter01)
  * [Getting Started](part-ii-using-mgncs/miniguiprogguidepart2chapter02)
  * [Renderer and Resources Management](part-ii-using-mgncs/miniguiprogguidepart2chapter03)
  * [Foundation Class](part-ii-using-mgncs/miniguiprogguidepart2chapter04)
  * [Static Box Series Control Class](part-ii-using-mgncs/miniguiprogguidepart2chapter05)
  * [Button Series Control Class](part-ii-using-mgncs/miniguiprogguidepart2chapter06)
  * [Panel and Its Derived Class](part-ii-using-mgncs/miniguiprogguidepart2chapter07)
  * [Container and Its Derived Class](part-ii-using-mgncs/miniguiprogguidepart2chapter08)
  * [Slider Series Control Class](part-ii-using-mgncs/miniguiprogguidepart2chapter09)
  * [Spinner Series Control Class](part-ii-using-mgncs/miniguiprogguidepart2chapter10)
  * [Progress Bar Control Class](part-ii-using-mgncs/miniguiprogguidepart2chapter11)
  * [Property Sheet Control Class](part-ii-using-mgncs/miniguiprogguidepart2chapter12)
  * [Edit Box Series Control Class](part-ii-using-mgncs/miniguiprogguidepart2chapter13)
  * [Animation Control Class](part-ii-using-mgncs/miniguiprogguidepart2chapter14)
  * [Other Advanced Control Class](part-ii-using-mgncs/miniguiprogguidepart2chapter15)
  * [Invisible Control Class](part-ii-using-mgncs/miniguiprogguidepart2chapter16)
  * [Other Class](part-ii-using-mgncs/miniguiprogguidepart2chapter17)
* Part III: MiniGUI Graphics Programming. We describe the use and concepts of MiniGUI graphics related APIs in this part.
  * [Graphics Device Interfaces](part-iii-minigui-graphics-programming/miniguiprogguidepart3chapter01)
  * [Handling and Rendering of Text](part-iii-minigui-graphics-programming/miniguiprogguidepart3chapter02)
  * [Advanced GDI Functions](part-iii-minigui-graphics-programming/miniguiprogguidepart3chapter03)
  * [Using mGPlus for Vector Graphics](part-iii-minigui-graphics-programming/miniguiprogguidepart3chapter04)
* Part IV: Visual Effects and Animations. We describe how to program for visual effects and animations in this part.
  * [Using mGEff for Visual Effects and Animations](part-iv-visual-effects-and-animations/miniguiprogguidepart4chapter01)
  * [Using mGNCS4Touch](part-iv-visual-effects-and-animations/miniguiprogguidepart4chapter02)
  * [Integrating OpenGL ES and/or OpenVG with MiniGUI](part-iv-visual-effects-and-animations/miniguiprogguidepart4chapter03)
* Part V: MiniGUI Advanced Programming Topics. We describe the concepts of MiniGUI-Processes related advanced programming and the development of customizing GAL and IAL engine in this part.
  * [Inter-Process Communication and Asynchronous Event Process](part-v-minigui-advanced-programming/miniguiprogguidepart5chapter01)
  * [Developing Customized MiniGUI-Processes Server Program](part-v-minigui-advanced-programming/miniguiprogguidepart5chapter02)
  * [GAL and IAL Engines](part-v-minigui-advanced-programming/miniguiprogguidepart5chapter03)
  * [Universal Startup API for RTOSes](part-v-minigui-advanced-programming/miniguiprogguidepart5chapter04)
* Part VI: Using MiniGUI Inherent Controls. We describe the use of various controls provided by MiniGUI core in this part.
  * [Static Control](part-vi-using-minigui-inherent-controls/miniguiprogguidepart6chapter01)
  * [Button Control](part-vi-using-minigui-inherent-controls/miniguiprogguidepart6chapter02)
  * [List Box Control](part-vi-using-minigui-inherent-controls/miniguiprogguidepart6chapter03)
  * [Edit Box Control](part-vi-using-minigui-inherent-controls/miniguiprogguidepart6chapter04)
  * [Combo Box Control](part-vi-using-minigui-inherent-controls/miniguiprogguidepart6chapter05)
  * [Menu Button Control](part-vi-using-minigui-inherent-controls/miniguiprogguidepart6chapter06)
  * [Progress Bar Control](part-vi-using-minigui-inherent-controls/miniguiprogguidepart6chapter07)
  * [Track Bar Control](part-vi-using-minigui-inherent-controls/miniguiprogguidepart6chapter08)
  * [Toolbar Control](part-vi-using-minigui-inherent-controls/miniguiprogguidepart6chapter09)
  * [Property Sheet Control](part-vi-using-minigui-inherent-controls/miniguiprogguidepart6chapter10)
  * [Scroll Window Control](part-vi-using-minigui-inherent-controls/miniguiprogguidepart6chapter11)
  * [Scroll View Control](part-vi-using-minigui-inherent-controls/miniguiprogguidepart6chapter12)
  * [Tree View Control](part-vi-using-minigui-inherent-controls/miniguiprogguidepart6chapter13)
  * [List View Control](part-vi-using-minigui-inherent-controls/miniguiprogguidepart6chapter14)
  * [Month Calendar Control](part-vi-using-minigui-inherent-controls/miniguiprogguidepart6chapter15)
  * [Spin Box Control](part-vi-using-minigui-inherent-controls/miniguiprogguidepart6chapter16)
  * [Cool Bar Control](part-vi-using-minigui-inherent-controls/miniguiprogguidepart6chapter17)
  * [Animation Control](part-vi-using-minigui-inherent-controls/miniguiprogguidepart6chapter18)
  * [GridView Control](part-vi-using-minigui-inherent-controls/miniguiprogguidepart6chapter19)
  * [IconView Control](part-vi-using-minigui-inherent-controls/miniguiprogguidepart6chapter20)
  * [Independent Scrollbar Control](part-vi-using-minigui-inherent-controls/miniguiprogguidepart6chapter21)
* Appendix: Specifications for MiniGUI Developers. We provide some information for MiniGUI developers in this appendix.
  * [Code Style and Project Specification](appendix-specifications-for-minigui-developers/miniguiprogguideappendixa)
  * [Specification for the Picture Resources Used by mGNCS Skin Renderer](appendix-specifications-for-minigui-developers/miniguiprogguideappendixb)
  * [Specification for the mGNCS-compliant Widget Components](appendix-specifications-for-minigui-developers/miniguiprogguideappendixd)

## Obtaining Samples of the Guide

We organize the sample programs in this guide into a complete Autoconf/Automake project package called `mg-samples`. You can download this source tarball from the download zone of MiniGUI website:

[http://www.minigui.com/download](http://www.minigui.com/download)

or fetch the source code from the public repository:

[https://github.com/VincentWei/mg-samples](https://github.com/VincentWei/mg-samples)

## Compiling and Running Environment of the Samples

This guide assumes that you run MiniGUI 3.2 or later on Linux operating system. Therefore, some samples are described on the assumption that you are using Linux and GNU GCC toolchain. However, most of the samples in this guide can run on other operating systems.

For the instructions to setup the development environment, you can refer to [Quick Start](../user-manual/miniguiusermanualquickstart).

## Copyright and Licensing

FMSoft releases the sample code (mg-samples) under Apache 2.0 license. The original text of Apache 2.0 license can be obtained by following means:

* LICENSE file in `mg-samples` software package
* [http://www.apache.org/licenses/LICENSE-2.0.html](http://www.apache.org/licenses/LICENSE-2.0.html)

***

[Table of Contents]() | [Beginning MiniGUI Programming >>](part-i-foundation-of-minigui-programming/miniguiprogguidepart1chapter01)
