<s>
In	O
computing	O
,	O
Nano-X	B-Language
is	O
a	O
windowing	B-Application
system	I-Application
which	O
is	O
full	O
featured	O
enough	O
to	O
be	O
used	O
on	O
a	O
PC	B-Device
,	O
an	O
embedded	B-Architecture
system	I-Architecture
or	O
a	O
PDA	B-Application
.	O
</s>
<s>
It	O
is	O
an	O
Open	B-License
Source	I-License
project	O
aimed	O
at	O
bringing	O
the	O
features	O
of	O
modern	O
graphical	O
windowing	B-Application
environments	I-Application
to	O
smaller	O
devices	O
and	O
platforms	O
.	O
</s>
<s>
The	O
project	O
was	O
renamed	O
from	O
Microwindows	B-Language
due	O
to	O
legal	O
threats	O
from	O
Microsoft	O
regarding	O
the	O
Windows	B-Application
trademark	O
.	O
</s>
<s>
The	O
Nano-X	B-Language
Window	B-Application
System	I-Application
is	O
extremely	O
portable	O
,	O
and	O
completely	O
written	O
in	O
C	B-Language
.	O
It	O
has	O
been	O
ported	O
to	O
the	O
Intel	O
16	O
,	O
32	O
and	O
64	O
bit	O
CPUs	O
,	O
the	O
Broadcom	O
BCM2837	O
ARM	O
Cortex-A53	O
,	O
as	O
well	O
as	O
MIPS	O
R4000	O
(	O
NEC	O
Vr41xx	O
)	O
StrongARM	B-Device
and	O
PowerPC	B-Architecture
chips	I-Architecture
found	O
on	O
handheld	O
and	O
pocket	O
PCs	B-Device
.	O
</s>
<s>
The	O
Nano-X	B-Language
Window	B-Application
System	I-Application
currently	O
runs	O
on	O
Linux	B-Application
systems	O
with	O
kernel	B-Language
framebuffer	I-Language
support	O
,	O
or	O
using	O
an	O
X11	B-Operating_System
driver	O
that	O
allows	O
Microwindows	B-Language
applications	O
to	O
be	O
run	O
on	O
top	O
of	O
the	O
X	B-Operating_System
Window	I-Operating_System
desktop	I-Operating_System
.	O
</s>
<s>
This	O
driver	O
emulates	O
all	O
of	O
Microwindows	B-Language
 '	O
truecolor	O
and	O
palette	B-Data_Structure
modes	O
so	O
that	O
an	O
application	O
can	O
be	O
previewed	O
using	O
the	O
target	O
system	O
's	O
display	B-Device
characteristics	O
directly	O
on	O
the	O
desktop	O
display	B-Device
,	O
regardless	O
of	O
the	O
desktop	O
display	B-Device
characteristics	O
.	O
</s>
<s>
In	O
addition	O
,	O
it	O
has	O
been	O
ported	O
to	O
Windows	B-Application
,	O
Emscripten	B-Language
,	O
Android	B-Application
(	O
based	O
on	O
the	O
Allegro	B-Language
library	I-Language
)	O
,	O
and	O
MS-DOS	B-Application
.	O
</s>
<s>
Microwindows	B-Language
screen	B-Device
drivers	O
have	O
been	O
written	O
based	O
on	O
the	O
SDL1	B-Operating_System
and	I-Operating_System
SDL2	I-Operating_System
libraries	O
plus	O
the	O
Allegro	B-Language
and	O
SVGAlib	B-Application
libraries	O
.	O
</s>
<s>
There	O
are	O
also	O
a	O
VESA	O
and	O
a	O
VGA	B-Protocol
16	O
color	O
4	O
planes	O
driver	O
.	O
</s>
<s>
Microwindows	B-Language
is	O
essentially	O
a	O
layered	O
design	O
that	O
allows	O
different	O
layers	O
to	O
be	O
used	O
or	O
rewritten	O
to	O
suit	O
the	O
needs	O
of	O
the	O
implementation	O
.	O
</s>
<s>
At	O
the	O
lowest	O
level	O
,	O
screen	B-Device
,	O
mouse/touchpad	O
and	O
keyboard	B-Device
drivers	O
provide	O
access	O
to	O
the	O
actual	O
display	B-Device
and	O
other	O
user-input	O
hardware	O
.	O
</s>
<s>
At	O
the	O
upper	O
level	O
,	O
three	O
API	B-Application
's	O
are	O
implemented	O
providing	O
access	O
to	O
the	O
graphics	O
applications	O
programmer	O
.	O
</s>
<s>
Currently	O
,	O
Microwindows	B-Language
supports	O
the	O
Xlib	B-Language
,	O
Nano-X	B-Language
and	O
Windows	B-Application
Win32/WinCE	O
GDI	B-Operating_System
APIs	B-Application
.	O
</s>
<s>
These	O
APIs	B-Application
provide	O
close	O
compatibility	O
with	O
the	O
Win32	B-Library
and	O
X	B-Operating_System
Window	I-Operating_System
systems	I-Operating_System
,	O
however	O
,	O
with	O
reduced	O
functionality	O
.	O
</s>
<s>
These	O
APIs	B-Application
allow	O
programs	O
to	O
be	O
ported	O
from	O
other	O
systems	O
easily	O
.	O
</s>
<s>
A	O
given	O
implementation	O
of	O
Microwindows	B-Language
will	O
link	O
at	O
least	O
one	O
screen	B-Device
,	O
mouse	B-Device
and	O
keyboard	B-Device
driver	O
into	O
the	O
system	O
.	O
</s>
<s>
This	O
setup	O
allows	O
varying	O
hardware	O
devices	O
to	O
be	O
added	O
to	O
the	O
Microwindows	B-Language
system	O
without	O
affecting	O
the	O
way	O
the	O
entire	O
system	O
works	O
.	O
</s>
<s>
Microwindows	B-Language
currently	O
supports	O
three	O
different	O
application	B-Application
programming	I-Application
interfaces	I-Application
(	O
APIs	B-Application
)	O
.	O
</s>
<s>
This	O
set	O
of	O
routines	O
handles	O
client	B-Protocol
–	O
server	B-Application
activity	O
,	O
window	B-Application
manager	I-Application
activities	O
like	O
drawing	O
title	O
bars	O
,	O
close	O
boxes	O
,	O
etc.	O
,	O
as	O
well	O
as	O
handling	O
the	O
programmer	O
's	O
requests	O
for	O
graphics	O
output	O
.	O
</s>
<s>
These	O
APIs	B-Application
run	O
on	O
top	O
of	O
the	O
core	O
graphics	O
engine	O
routines	O
and	O
device	O
drivers	O
.	O
</s>
<s>
The	O
NX11	O
API	B-Application
is	O
compliant	O
with	O
the	O
X	B-Operating_System
Window	I-Operating_System
API	B-Application
.	O
</s>
<s>
It	O
is	O
based	O
on	O
the	O
Nano-X	B-Language
API	B-Application
and	O
provides	O
Xlib	B-Language
functions	O
using	O
the	O
functions	O
available	O
in	O
the	O
Nano-X	B-Language
API	B-Application
.	O
</s>
<s>
It	O
can	O
be	O
compiled	O
as	O
a	O
separate	O
library	O
or	O
together	O
with	O
Nano-X	B-Language
library	O
as	O
a	O
single	O
library	O
called	O
libPX11	O
.	O
</s>
<s>
In	O
all	O
it	O
provides	O
180	O
Xlib	B-Language
functions	O
and	O
stubs	O
for	O
additional	O
functions	O
not	O
implemented	O
.	O
</s>
<s>
Based	O
on	O
the	O
NX11	O
API	B-Application
the	O
FLTK	B-Language
graphical	B-Application
user	I-Application
interface	I-Application
library	O
can	O
be	O
used	O
to	O
provide	O
a	O
GUI	B-Application
for	O
application	O
programs	O
.	O
</s>
<s>
The	O
Nanolinux	O
distribution	O
uses	O
the	O
NX11	O
API	B-Application
and	O
FLTK	B-Language
to	O
implement	O
a	O
Linux	B-Application
operating	I-Application
system	I-Application
using	O
19	O
MB	O
of	O
disk	O
space	O
.	O
</s>
<s>
The	O
Nano-X	B-Language
API	B-Application
is	O
modeled	O
after	O
the	O
mini-x	O
server	B-Application
written	O
initially	O
by	O
David	O
Bell	O
,	O
which	O
was	O
a	O
reimplementation	O
of	O
X	B-Operating_System
on	O
the	O
MINIX	B-Operating_System
operating	O
system	O
.	O
</s>
<s>
It	O
loosely	O
follows	O
the	O
X	B-Operating_System
Window	I-Operating_System
System	I-Operating_System
Xlib	B-Language
API	B-Application
,	O
but	O
the	O
names	O
all	O
being	O
with	O
GrXXX( )	O
rather	O
than	O
X	B-Operating_System
...	O
.	O
</s>
<s>
The	O
basic	O
model	O
of	O
any	O
API	B-Application
on	O
top	O
of	O
Microwindows	B-Language
is	O
to	O
initialize	O
the	O
screen	B-Device
,	O
keyboard	B-Device
and	O
mouse	B-Device
drivers	O
,	O
then	O
hang	O
in	O
a	O
select( )	O
loop	O
waiting	O
for	O
an	O
event	O
.	O
</s>
<s>
When	O
an	O
event	O
occurs	O
,	O
if	O
it	O
is	O
a	O
system	O
event	O
like	O
keyboard	B-Device
or	O
mouse	B-Device
activity	O
,	O
then	O
this	O
information	O
is	O
passed	O
to	O
the	O
user	O
program	O
converted	O
to	O
an	O
expose	O
event	O
,	O
paint	O
message	O
,	O
etc	O
.	O
</s>
<s>
Note	O
that	O
the	O
concept	O
of	O
a	O
window	O
versus	O
raw	O
graphics	O
operations	O
is	O
handled	O
at	O
this	O
API	B-Application
level	O
.	O
</s>
<s>
That	O
is	O
,	O
the	O
API	B-Application
defines	O
the	O
concepts	O
of	O
what	O
a	O
window	O
is	O
,	O
what	O
the	O
coordinate	O
systems	O
are	O
,	O
etc.	O
,	O
and	O
then	O
the	O
coordinates	O
are	O
all	O
converted	O
to	O
"	O
screen	B-Device
coordinates	O
"	O
and	O
passed	O
to	O
the	O
core	O
GdXXX	O
engine	O
routines	O
to	O
do	O
the	O
real	O
work	O
.	O
</s>
<s>
This	O
level	O
also	O
defines	O
graphics	O
or	O
display	B-Device
contexts	O
and	O
passes	O
that	O
information	O
,	O
including	O
clipping	O
information	O
,	O
to	O
the	O
core	O
engine	O
routines	O
.	O
</s>
<s>
The	O
API	B-Application
which	O
tries	O
to	O
be	O
compliant	O
with	O
the	O
Microsoft	O
Win32	B-Library
and	O
WinCE	B-Operating_System
GDI	B-Operating_System
standard	O
is	O
the	O
Microwindows	B-Language
API	B-Application
.	O
</s>
<s>
Currently	O
,	O
there	O
is	O
support	O
for	O
most	O
of	O
the	O
graphics	O
drawing	O
and	O
clipping	O
routines	O
,	O
as	O
well	O
as	O
automatic	O
window	O
title	O
bar	O
drawing	O
and	O
dragging	O
windows	B-Application
for	O
movement	O
.	O
</s>
<s>
The	O
Microwindows	B-Language
API	B-Application
is	O
message-based	O
,	O
and	O
allows	O
programs	O
to	O
be	O
written	O
without	O
regard	O
to	O
the	O
eventual	O
window	B-Application
management	I-Application
policies	O
implemented	O
by	O
the	O
system	O
.	O
</s>
<s>
The	O
Microwindows	B-Language
API	B-Application
is	O
not	O
currently	O
client/server	O
.	O
</s>
<s>
The	O
fundamental	O
communications	O
mechanism	O
in	O
the	O
Microwindows	B-Language
API	B-Application
is	O
the	O
message	O
.	O
</s>
<s>
There	O
are	O
messages	O
that	O
correspond	O
to	O
hardware	O
events	O
,	O
like	O
WM_CHAR	O
for	O
keyboard	B-Device
input	O
or	O
WM_LBUTTONDOWN	O
for	O
mouse	B-Device
button	O
down	O
.	O
</s>
<s>
The	O
message-passing	O
architecture	O
allows	O
the	O
core	O
API	B-Application
to	O
manage	O
many	O
system	O
functions	O
by	O
sending	O
messages	O
on	O
all	O
sorts	O
of	O
events	O
,	O
like	O
window	O
creation	O
,	O
painting	O
needed	O
,	O
moving	O
,	O
etc	O
.	O
</s>
<s>
In	O
this	O
way	O
,	O
all	O
windows	B-Application
can	O
behave	O
the	O
same	O
way	O
when	O
dragged	O
,	O
etc.	O
,	O
unless	O
specifically	O
overridden	O
by	O
the	O
user	O
.	O
</s>
<s>
Major	O
window	B-Application
management	I-Application
policies	O
can	O
be	O
redefined	O
by	O
merely	O
re-implementing	O
DefWindowProc	O
,	O
rather	O
than	O
making	O
changes	O
throughout	O
the	O
system	O
.	O
</s>
<s>
The	O
basic	O
unit	O
of	O
screen	B-Device
organization	O
in	O
Microwindows	B-Language
API	B-Application
is	O
the	O
window	O
.	O
</s>
<s>
Windows	B-Application
describe	O
an	O
area	O
of	O
the	O
screen	B-Device
to	O
draw	O
onto	O
,	O
as	O
well	O
as	O
an	O
associate	O
"	O
window	O
procedure	O
"	O
for	O
handling	O
messages	O
destined	O
for	O
this	O
window	O
.	O
</s>
<s>
Applications	O
programmers	O
can	O
create	O
windows	B-Application
from	O
pre-defined	O
classes	O
,	O
like	O
buttons	O
,	O
edit	O
boxes	O
,	O
and	O
the	O
like	O
,	O
or	O
define	O
their	O
own	O
window	O
classes	O
.	O
</s>
<s>
In	O
both	O
cases	O
,	O
the	O
method	O
of	O
creating	O
and	O
communicating	O
with	O
the	O
windows	B-Application
remains	O
exactly	O
the	O
same	O
.	O
</s>
<s>
Nano-X	B-Language
'	O
s	O
origin	O
is	O
with	O
NanoGUI	O
.	O
</s>
<s>
NanoGUI	O
was	O
created	O
by	O
Alex	O
Holden	O
by	O
taking	O
David	O
Bell	O
's	O
mini-X	O
server	B-Application
and	O
Alan	O
Cox	O
's	O
modifications	O
and	O
adding	O
client/server	O
networking	O
.	O
</s>
<s>
Around	O
version	O
0.5	O
,	O
Gregory	O
Haerr	O
added	O
support	O
for	O
multiple	O
API	B-Application
's	O
,	O
and	O
began	O
distributing	O
Microwindows	B-Language
.	O
</s>
<s>
In	O
Microwindows	B-Language
0.84	O
,	O
all	O
previous	O
NanoGUI	O
changes	O
were	O
incorporated	O
and	O
since	O
then	O
has	O
been	O
the	O
combined	O
NanoGUI/Microwindows	O
distribution	O
.	O
</s>
<s>
In	O
January	O
2005	O
,	O
the	O
system	O
changed	O
its	O
name	O
to	O
the	O
Nano-X	B-Language
Window	B-Application
System	I-Application
.	O
</s>
<s>
Because	O
Nano-X	B-Language
just	O
loosely	O
follows	O
the	O
X	B-Operating_System
Window	I-Operating_System
System	I-Operating_System
Xlib	B-Language
API	B-Application
,	O
an	O
additional	O
interface	O
was	O
developed	O
named	O
NXlib	O
,	O
which	O
provides	O
an	O
Xlib	B-Language
compatible	O
API	B-Application
based	O
on	O
Nano-X	B-Language
.	O
</s>
