From a457105a0bb42b36ead422fcfb32ee7fd4ffce05 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 28 Dec 2013 08:40:03 -0600 Subject: [PATCH] Move the NX components out of libc and into its own library, libnx --- ChangeLog | 3 +- Documentation/NXGraphicsSubsystem.html | 22 ++- Documentation/README.html | 2 + Makefile.unix | 30 +++- Makefile.win | 30 +++- README.txt | 2 + graphics/README.txt | 19 +++ graphics/nxglib/nxglib_copyrun.h | 2 +- graphics/nxglib/nxglib_fillrun.h | 2 +- libc/Makefile | 3 - libc/lib_internal.h | 8 +- libnx/.gitignore | 6 + libnx/Makefile | 143 ++++++++++++++++++ libnx/README.txt | 11 ++ libnx/bin/.gitignore | 8 + libnx/bin/Makefile | 48 ++++++ libnx/kbin/.gitignore | 8 + libnx/kbin/Makefile | 48 ++++++ {libc => libnx}/nx/Make.defs | 4 +- .../nx/nx_drawcircle.c | 2 +- .../nx/nx_drawline.c | 2 +- .../nx/nx_fillcircle.c | 2 +- libnx/nxcontext.h | 127 ++++++++++++++++ {libc => libnx}/nxglib/Make.defs | 20 ++- .../nxglib/nxglib_circlepts.c | 0 .../nxglib/nxglib_circletraps.c | 0 .../nxglib/nxglib_colorcopy.c | 2 +- .../nxglib/nxglib_intersecting.c | 2 +- .../nxglib/nxglib_nonintersecting.c | 2 +- .../nxglib/nxglib_nullrect.c | 2 +- .../nxglib/nxglib_rectadd.c | 2 +- .../nxglib/nxglib_rectcopy.c | 2 +- .../nxglib/nxglib_rectinside.c | 2 +- .../nxglib/nxglib_rectintersect.c | 2 +- .../nxglib/nxglib_rectoffset.c | 2 +- .../nxglib/nxglib_rectoverlap.c | 2 +- .../nxglib/nxglib_rectsize.c | 2 +- .../nxglib/nxglib_rectunion.c | 2 +- .../nxglib/nxglib_rgb2yuv.c | 2 +- .../nxglib/nxglib_runcopy.c | 2 +- .../nxglib/nxglib_runoffset.c | 2 +- .../nxglib/nxglib_splitline.c | 0 .../nxglib/nxglib_trapcopy.c | 2 +- .../nxglib/nxglib_trapoffset.c | 2 +- .../nxglib/nxglib_vectoradd.c | 2 +- .../nxglib/nxglib_vectsubtract.c | 2 +- .../nxglib/nxglib_yuv2rgb.c | 2 +- {libc => libnx}/nxmu/Make.defs | 18 +-- .../lib_nx_bitmap.c => libnx/nxmu/nx_bitmap.c | 2 +- .../lib_nx_block.c => libnx/nxmu/nx_block.c | 2 +- .../nxmu/nx_closewindow.c | 2 +- .../nxmu/nx_connect.c | 4 +- .../nxmu/nx_disconnect.c | 2 +- .../lib_nx_fill.c => libnx/nxmu/nx_fill.c | 2 +- .../nxmu/nx_filltrapezoid.c | 2 +- .../nxmu/nx_getposition.c | 2 +- .../nxmu/nx_getrectangle.c | 2 +- .../nxmu/nx_kbdchin.c | 2 +- .../lib_nx_kbdin.c => libnx/nxmu/nx_kbdin.c | 4 +- .../lib_nx_lower.c => libnx/nxmu/nx_lower.c | 2 +- .../nxmu/nx_mousein.c | 2 +- .../lib_nx_move.c => libnx/nxmu/nx_move.c | 2 +- .../nxmu/nx_openwindow.c | 4 +- .../lib_nx_raise.c => libnx/nxmu/nx_raise.c | 2 +- .../nxmu/nx_releasebkgd.c | 2 +- .../nxmu/nx_requestbkgd.c | 2 +- .../nxmu/nx_setbgcolor.c | 2 +- .../nxmu/nx_setpixel.c | 2 +- .../nxmu/nx_setposition.c | 2 +- .../nxmu/nx_setsize.c | 2 +- .../nxmu/nxmu_constructwindow.c | 4 +- .../nxmu/nxmu_semtake.c | 2 +- .../nxmu/nxmu_sendserver.c | 2 +- .../nxmu/nxmu_sendwindow.c | 2 +- libnx/ubin/.gitignore | 8 + libnx/ubin/Makefile | 48 ++++++ 76 files changed, 632 insertions(+), 94 deletions(-) create mode 100644 libnx/.gitignore create mode 100644 libnx/Makefile create mode 100755 libnx/README.txt create mode 100644 libnx/bin/.gitignore create mode 100644 libnx/bin/Makefile create mode 100644 libnx/kbin/.gitignore create mode 100644 libnx/kbin/Makefile rename {libc => libnx}/nx/Make.defs (95%) rename libc/nx/lib_nx_drawcircle.c => libnx/nx/nx_drawcircle.c (99%) rename libc/nx/lib_nx_drawline.c => libnx/nx/nx_drawline.c (99%) rename libc/nx/lib_nx_fillcircle.c => libnx/nx/nx_fillcircle.c (99%) create mode 100644 libnx/nxcontext.h rename {libc => libnx}/nxglib/Make.defs (74%) rename libc/nxglib/lib_nxglib_circlepts.c => libnx/nxglib/nxglib_circlepts.c (100%) rename libc/nxglib/lib_nxglib_circletraps.c => libnx/nxglib/nxglib_circletraps.c (100%) rename libc/nxglib/lib_nxglib_colorcopy.c => libnx/nxglib/nxglib_colorcopy.c (98%) rename libc/nxglib/lib_nxglib_intersecting.c => libnx/nxglib/nxglib_intersecting.c (98%) rename libc/nxglib/lib_nxglib_nonintersecting.c => libnx/nxglib/nxglib_nonintersecting.c (99%) rename libc/nxglib/lib_nxglib_nullrect.c => libnx/nxglib/nxglib_nullrect.c (98%) rename libc/nxglib/lib_nxglib_rectadd.c => libnx/nxglib/nxglib_rectadd.c (99%) rename libc/nxglib/lib_nxglib_rectcopy.c => libnx/nxglib/nxglib_rectcopy.c (98%) rename libc/nxglib/lib_nxglib_rectinside.c => libnx/nxglib/nxglib_rectinside.c (99%) rename libc/nxglib/lib_nxglib_rectintersect.c => libnx/nxglib/nxglib_rectintersect.c (98%) rename libc/nxglib/lib_nxglib_rectoffset.c => libnx/nxglib/nxglib_rectoffset.c (98%) rename libc/nxglib/lib_nxglib_rectoverlap.c => libnx/nxglib/nxglib_rectoverlap.c (98%) rename libc/nxglib/lib_nxglib_rectsize.c => libnx/nxglib/nxglib_rectsize.c (98%) rename libc/nxglib/lib_nxglib_rectunion.c => libnx/nxglib/nxglib_rectunion.c (98%) rename libc/nxglib/lib_nxglib_rgb2yuv.c => libnx/nxglib/nxglib_rgb2yuv.c (99%) rename libc/nxglib/lib_nxglib_runcopy.c => libnx/nxglib/nxglib_runcopy.c (98%) rename libc/nxglib/lib_nxglib_runoffset.c => libnx/nxglib/nxglib_runoffset.c (98%) rename libc/nxglib/lib_nxglib_splitline.c => libnx/nxglib/nxglib_splitline.c (100%) rename libc/nxglib/lib_nxglib_trapcopy.c => libnx/nxglib/nxglib_trapcopy.c (98%) rename libc/nxglib/lib_nxglib_trapoffset.c => libnx/nxglib/nxglib_trapoffset.c (98%) rename libc/nxglib/lib_nxglib_vectoradd.c => libnx/nxglib/nxglib_vectoradd.c (98%) rename libc/nxglib/lib_nxglib_vectsubtract.c => libnx/nxglib/nxglib_vectsubtract.c (98%) rename libc/nxglib/lib_nxglib_yuv2rgb.c => libnx/nxglib/nxglib_yuv2rgb.c (99%) rename {libc => libnx}/nxmu/Make.defs (78%) rename libc/nxmu/lib_nx_bitmap.c => libnx/nxmu/nx_bitmap.c (99%) rename libc/nxmu/lib_nx_block.c => libnx/nxmu/nx_block.c (99%) rename libc/nxmu/lib_nx_closewindow.c => libnx/nxmu/nx_closewindow.c (99%) rename libc/nxmu/lib_nx_connect.c => libnx/nxmu/nx_connect.c (99%) rename libc/nxmu/lib_nx_disconnect.c => libnx/nxmu/nx_disconnect.c (99%) rename libc/nxmu/lib_nx_fill.c => libnx/nxmu/nx_fill.c (99%) rename libc/nxmu/lib_nx_filltrapezoid.c => libnx/nxmu/nx_filltrapezoid.c (99%) rename libc/nxmu/lib_nx_getposition.c => libnx/nxmu/nx_getposition.c (99%) rename libc/nxmu/lib_nx_getrectangle.c => libnx/nxmu/nx_getrectangle.c (99%) rename libc/nxmu/lib_nx_kbdchin.c => libnx/nxmu/nx_kbdchin.c (99%) rename libc/nxmu/lib_nx_kbdin.c => libnx/nxmu/nx_kbdin.c (98%) rename libc/nxmu/lib_nx_lower.c => libnx/nxmu/nx_lower.c (99%) rename libc/nxmu/lib_nx_mousein.c => libnx/nxmu/nx_mousein.c (99%) rename libc/nxmu/lib_nx_move.c => libnx/nxmu/nx_move.c (99%) rename libc/nxmu/lib_nx_openwindow.c => libnx/nxmu/nx_openwindow.c (98%) rename libc/nxmu/lib_nx_raise.c => libnx/nxmu/nx_raise.c (99%) rename libc/nxmu/lib_nx_releasebkgd.c => libnx/nxmu/nx_releasebkgd.c (99%) rename libc/nxmu/lib_nx_requestbkgd.c => libnx/nxmu/nx_requestbkgd.c (99%) rename libc/nxmu/lib_nx_setbgcolor.c => libnx/nxmu/nx_setbgcolor.c (99%) rename libc/nxmu/lib_nx_setpixel.c => libnx/nxmu/nx_setpixel.c (99%) rename libc/nxmu/lib_nx_setposition.c => libnx/nxmu/nx_setposition.c (99%) rename libc/nxmu/lib_nx_setsize.c => libnx/nxmu/nx_setsize.c (99%) rename libc/nxmu/lib_nxmu_constructwindow.c => libnx/nxmu/nxmu_constructwindow.c (98%) rename libc/nxmu/lib_nxmu_semtake.c => libnx/nxmu/nxmu_semtake.c (99%) rename libc/nxmu/lib_nxmu_sendserver.c => libnx/nxmu/nxmu_sendserver.c (99%) rename libc/nxmu/lib_nxmu_sendwindow.c => libnx/nxmu/nxmu_sendwindow.c (99%) create mode 100644 libnx/ubin/.gitignore create mode 100644 libnx/ubin/Makefile diff --git a/ChangeLog b/ChangeLog index e3fa6f52624..1590700a6b7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6326,4 +6326,5 @@ reshuffling is necessary if we ever want to build graphics applications as kernel builds. There is still more today (NXTK and NXFONTS need to be moved to libc as well) (2013-12-27). - + * Move libc/nx, nxmu, and nxglib to a new library, libnx. The NX + graphics is not properly a part of libc (2013-12-28). diff --git a/Documentation/NXGraphicsSubsystem.html b/Documentation/NXGraphicsSubsystem.html index 7da1c86f77d..4aa754b6c60 100644 --- a/Documentation/NXGraphicsSubsystem.html +++ b/Documentation/NXGraphicsSubsystem.html @@ -12,7 +12,7 @@

NX Graphics Subsystem

-

Last Updated: May 7, 2012

+

Last Updated: December 28, 2013

@@ -3144,9 +3144,20 @@ int nxf_convert_32bpp(FAR uint32_t *dest, uint16_t height, +

+ The graphics capability consist both of components internal to the RTOS and of user-callable interfaces. + In the NuttX kernel mode build there are some components of the graphics subsystem are callable in user mode and other components that are internal to the RTOS. + The directory nuttx/graphics contains only those components that are internal to the RTOS. + + User callable functions must be part of a library that can be linked against user applications. + This user callable interfaces are provided in sub-directories under nuttx/libnx. +