This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git

commit edb4d266630a884980c983a0b7a4beeaf65d728f
Author: Acfboy <[email protected]>
AuthorDate: Sat Aug 1 22:56:05 2026 +0800

    graphics/microwindows: add Nano-X client library and built-in server 
support for NuttX
    
    Build the Nano-X client library, server and (optional) built-in window 
manager
    from the bundled Microwindows tree
    
    Signed-off-by: Acfboy <[email protected]>
---
 graphics/microwindows/Kconfig  | 18 ++++++++++++++++++
 graphics/microwindows/Makefile | 40 +++++++++++++++++++++++++++++++++++++++-
 2 files changed, 57 insertions(+), 1 deletion(-)

diff --git a/graphics/microwindows/Kconfig b/graphics/microwindows/Kconfig
index 9d5f0cb8c..acff0ca9c 100644
--- a/graphics/microwindows/Kconfig
+++ b/graphics/microwindows/Kconfig
@@ -128,4 +128,22 @@ config MICROWINDOWS_MWIN
                a high-level windowing API similar to the Microsoft Windows API
                with window management, controls, and standard dialogs.
 
+config MICROWINDOWS_NANOX
+       bool "Nano-X (X11 API) client/server support"
+       default n
+       depends on NET_LOCAL && NET_LOCAL_STREAM
+       ---help---
+               Build the Nano-X server core and the Nano-X client library.
+               The Nano-X server runs as a separate task and provides the
+               X11-like API (GrXXX calls) to client applications which
+               connect to it through a local stream socket.
+
+config MICROWINDOWS_NANOX_NANOWM
+       bool "Built-in Nano-X window manager"
+       default n
+       depends on MICROWINDOWS_NANOX
+       ---help---
+               Link the built-in window manager (wm*.c, nxdraw.c) into the
+               Nano-X server, providing window decorations (title bar, 3D
+               frame), cascaded placement, move/resize and focus handling.
 endif # GRAPHICS_MICROWINDOWS
diff --git a/graphics/microwindows/Makefile b/graphics/microwindows/Makefile
index 2ea7e4c1a..39ead68c6 100644
--- a/graphics/microwindows/Makefile
+++ b/graphics/microwindows/Makefile
@@ -31,7 +31,7 @@ MICROWINDOWS_DIR_NAME = microwindows
 
 WD := ${shell echo $(CURDIR) | sed -e 's/ /\\ /g'}
 
-MICROWINDOWS_COMMIT_HASH := 1f269127b991d01dea5784eacee321a23e34d3d5
+MICROWINDOWS_COMMIT_HASH := f9c2980fe085de87acc085980ffd672bc2d20cff
 
 CONFIG_GRAPH_MICROWINDOWS_URL ?= 
https://codeload.github.com/ghaerr/microwindows/zip/$(MICROWINDOWS_COMMIT_HASH)
 
@@ -153,4 +153,42 @@ CFLAGS += -DNOGDI
 
 endif
 
+ifneq ($(CONFIG_MICROWINDOWS_NANOX),)
+
+MW_NANOX_CLIENT_SRCS  = microwindows/src/nanox/nxdraw.c
+MW_NANOX_CLIENT_SRCS += microwindows/src/nanox/nxutil.c
+MW_NANOX_CLIENT_SRCS += microwindows/src/nanox/nxtransform.c
+MW_NANOX_CLIENT_SRCS += microwindows/src/nanox/nxpaintnc.c
+MW_NANOX_CLIENT_SRCS += microwindows/src/nanox/client.c
+MW_NANOX_CLIENT_SRCS += microwindows/src/nanox/clientfb.c
+MW_NANOX_CLIENT_SRCS += microwindows/src/nanox/nxproto.c
+MW_NANOX_CLIENT_SRCS += microwindows/src/drivers/osdep.c
+
+MW_NANOX_WM_SRCS  = microwindows/src/nanox/wmaction.c
+MW_NANOX_WM_SRCS += microwindows/src/nanox/wmclients.c
+MW_NANOX_WM_SRCS += microwindows/src/nanox/wmevents.c
+MW_NANOX_WM_SRCS += microwindows/src/nanox/wmutil.c
+
+MW_NANOX_SERVER_SRCS  = microwindows/src/nanox/srvmain.c
+MW_NANOX_SERVER_SRCS += microwindows/src/nanox/srvfunc.c
+MW_NANOX_SERVER_SRCS += microwindows/src/nanox/srvutil.c
+MW_NANOX_SERVER_SRCS += microwindows/src/nanox/srvevent.c
+MW_NANOX_SERVER_SRCS += microwindows/src/nanox/srvclip.c
+MW_NANOX_SERVER_SRCS += microwindows/src/nanox/srvnet.c
+
+# The server main() is renamed to nanox_server_main() and invoked from
+# the nanoxterm example, which starts the server as a separate task.
+microwindows/src/nanox/srvmain.c_CFLAGS += -Dmain=nanox_server_main
+
+CFLAGS += -DMULTITHREAD_SERVER=1
+ifneq ($(CONFIG_MICROWINDOWS_NANOX_NANOWM),)
+CFLAGS += -DNANOWM=1
+$(foreach src,$(MW_NANOX_WM_SRCS),$(eval $(src)_CFLAGS += -include 
microwindows/src/nanox/serv.h))
+CSRCS += $(MW_NANOX_WM_SRCS)
+endif
+
+CSRCS += $(MW_NANOX_CLIENT_SRCS) $(MW_NANOX_SERVER_SRCS)
+
+endif
+
 include $(APPDIR)/Application.mk

Reply via email to