Draft:NAppGUI

NAppGUI is an open-source SDK for building cross-platform desktop applications using the C Programming Language (ANSI C90). NAppGUI operates as a lightweight layer on top of the operating system's native API s, which allows creating portable programs very fast and small without external dependencies.

Architecture
The NAppGUI SDK goes beyond a pure GUI widget library and provides the below cross-platform core components..
 * Sewer: Basic types, assertions, Unicode, standard C library, math functions.
 * Osbs: Operating system services. Portable API on files, directories, processes, threads, memory, etc.
 * Core: Commonly used non-graphical utilities. Memory auditor, data structures, I/O channels, lexical analysis, etc.
 * Geom2D: 2D geometry. Transformations, vectors, polygons, collisions, etc.
 * Draw2D: Vector drawing API, images and fonts.
 * Gui: High-level user interface composer.
 * OSApp: Desktop applications. Message loops.
 * INet: Internet protocols and services, such as HTTP.

Supported Platforms
NAppGUI currently supports the following platforms:


 * Windows (from XP)
 * MacOS (from Snow Leopard)
 * Linux (from Ubuntu 12)

Portability and Deployment
NAppGUI aims to compile and debug a program on any of the above platforms without touching a single line of code. It leverages CMake for creating or updating a build project from the source code and uses Visual Studio, Xcode or GCC depending on the active platform.

Since the very beginning of the project, the main objective of NAppGUI has been to simplify as much as possible the arduous task of creating applications with a graphical interface in C. The philosophy on which the project is based and some of its characteristics are:


 * Rapid prototyping, evolution and maintenance in real applications, apart from the simple examples we find in the literature and the Internet.
 * The user interface is described using ANSI-C functions, completely eliminating visual design. This fact facilitates the creation of dynamic interfaces, guarantees portability and enables access to the API from any programming language.
 * Windows are automatically laid out and sized, without the programmer having to explicitly specify the coordinates and size of the controls.
 * It is possible to have a complete application in a single .c file, by removing the usual resource files (*.rc, *.xvid, etc) and their associated controllers. The programmer has complete freedom when defining his own file structure.
 * Automatic synchronization of internal data structures with the interface or with I/O channels. “Data binding".
 * Unified management of resources which facilitates internationalization. “Resources”
 * Translations between languages at runtime without the need to restart the application. “Runtime translation”.
 * The compiled version of NAppGUI occupies less than 1Mb, and is distributed in several static libraries that generate very small executables. This is a great advantage over other solutions that require the distribution of heavy .DLLs, sometimes larger than the application itself.
 * Native Appearance: The applications will be integrated into each system respecting their original aesthetic.
 * Backends. The NAppGUI core provides structures and objects for creating highly efficient command-line applications on Windows or Linux servers.

Documentation
Documentation for NAppGUI is available in the form of an introductory Quick Start Guide, User Guide with build instructions and creating a new application, API reference as well as a free ebook

A set of sample applications demonstrates NAppGUI functionality and facilitates creating own applications.

There exist a NAppGUI Programming Tutorial on YouTube (Spanish language).

Hello World Example


The below code sample creates a window, adds label, button and text control widgets and reacts on a button click. Three screenshots show the program running on the supported platforms.

Other Language Bindings
There exist bindings to the below programming languages for NAppGUI.


 * Nim
 * D
 * Go/Golang
 * Oberon

Reception and Adoption

 * Comparison and brief review of 27 open-source Electron alternatives
 * raygui (immediate mode GUI addon for raylib) vs. NAppGUI

Licensing
NAppGUI is an open-source project and is distributed under the MIT license.