diff --git a/Directories.mk b/Directories.mk index 271e8aba51..cabca719ab 100644 --- a/Directories.mk +++ b/Directories.mk @@ -1,7 +1,8 @@ ############################################################################ # Directories.mk # -# Copyright (C) 2007-2012, 2014, 2016 Gregory Nutt. All rights reserved. +# Copyright (C) 2007-2012, 2014, 2016-2017 Gregory Nutt. All rights +# reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -121,6 +122,10 @@ endif ifeq ($(CONFIG_NX),y) NONFSDIRS += graphics libnx CONTEXTDIRS += graphics libnx +else ifeq ($(CONFIG_NXFONTS),y) +NONFSDIRS += libnx +CONTEXTDIRS += libnx +OTHERDIRS += graphics else OTHERDIRS += graphics libnx endif diff --git a/FlatLibs.mk b/FlatLibs.mk index 0a05e84c49..ad29c24272 100644 --- a/FlatLibs.mk +++ b/FlatLibs.mk @@ -1,7 +1,8 @@ ############################################################################ # FlatLibs.mk # -# Copyright (C) 2007-2012, 2014, 2016 Gregory Nutt. All rights reserved. +# Copyright (C) 2007-2012, 2014, 2016-2017 Gregory Nutt. All rights +# reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -104,6 +105,8 @@ endif ifeq ($(CONFIG_NX),y) NUTTXLIBS += lib$(DELIM)libgraphics$(LIBEXT) NUTTXLIBS += lib$(DELIM)libnx$(LIBEXT) +else ifeq ($(CONFIG_NXFONTS),y) +NUTTXLIBS += lib$(DELIM)libnx$(LIBEXT) endif # Add libraries for the Audio sub-system diff --git a/Kconfig b/Kconfig index d5f4209c5d..584db78620 100644 --- a/Kconfig +++ b/Kconfig @@ -1662,6 +1662,7 @@ endmenu menu "Graphics Support" source graphics/Kconfig +source libnx/Kconfig endmenu menu "Memory Management" diff --git a/KernelLibs.mk b/KernelLibs.mk index b1da6dbd0b..b5ea4768aa 100644 --- a/KernelLibs.mk +++ b/KernelLibs.mk @@ -99,6 +99,9 @@ ifeq ($(CONFIG_NX),y) NUTTXLIBS += lib$(DELIM)libgraphics$(LIBEXT) NUTTXLIBS += lib$(DELIM)libknx$(LIBEXT) USERLIBS += lib$(DELIM)libunx$(LIBEXT) +else ifeq ($(CONFIG_NXFONTS),y) +NUTTXLIBS += lib$(DELIM)libknx$(LIBEXT) +USERLIBS += lib$(DELIM)libunx$(LIBEXT) endif # Add libraries for the Audio sub-system diff --git a/ProtectedLibs.mk b/ProtectedLibs.mk index 5dd45a6fab..df3edddadb 100644 --- a/ProtectedLibs.mk +++ b/ProtectedLibs.mk @@ -1,7 +1,8 @@ ############################################################################ # ProtectedLibs.mk # -# Copyright (C) 2007-2012, 2014, 2016 Gregory Nutt. All rights reserved. +# Copyright (C) 2007-2012, 2014, 2016-2017 Gregory Nutt. All rights +# reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -103,12 +104,11 @@ endif ifeq ($(CONFIG_NX),y) NUTTXLIBS += lib$(DELIM)libgraphics$(LIBEXT) -ifeq ($(CONFIG_BUILD_PROTECTED),y) NUTTXLIBS += lib$(DELIM)libknx$(LIBEXT) USERLIBS += lib$(DELIM)libunx$(LIBEXT) -else -NUTTXLIBS += lib$(DELIM)libnx$(LIBEXT) -endif +else ifeq ($(CONFIG_NXFONTS),y) +NUTTXLIBS += lib$(DELIM)libknx$(LIBEXT) +USERLIBS += lib$(DELIM)libunx$(LIBEXT) endif # Add libraries for the Audio sub-system diff --git a/configs/sim/fb/defconfig b/configs/sim/fb/defconfig index 57d543ba7c..4d96384304 100644 --- a/configs/sim/fb/defconfig +++ b/configs/sim/fb/defconfig @@ -1,5 +1,3 @@ -# CONFIG_NX_DISABLE_8BPP is not set -# CONFIG_NX_PACKEDMSFIRST is not set CONFIG_ARCH_BOARD_SIM=y CONFIG_ARCH_BOARD="sim" CONFIG_ARCH_SIM=y @@ -14,10 +12,6 @@ CONFIG_DRIVERS_VIDEO=y CONFIG_EXAMPLES_FB=y CONFIG_IDLETHREAD_STACKSIZE=4096 CONFIG_MAX_TASKS=16 -CONFIG_NX_KBD=y -CONFIG_NX_XYINPUT_MOUSE=y -CONFIG_NX=y -CONFIG_NXFONT_SANS23X27=y CONFIG_PTHREAD_STACK_DEFAULT=8192 CONFIG_SDCLONE_DISABLE=y CONFIG_SIM_FRAMEBUFFER=y diff --git a/graphics/Kconfig b/graphics/Kconfig index 561c39a558..e3fcb9c096 100644 --- a/graphics/Kconfig +++ b/graphics/Kconfig @@ -85,6 +85,7 @@ menu "Supported Pixel Depths" config NX_DISABLE_1BPP bool "Disable 1 BPP" default y + select NXFONTS_DISABLE_1BPP if NXFONTS ---help--- NX supports a variety of pixel depths. You can save some memory by disabling support for unused color depths. The selection disables support for 1BPP @@ -93,6 +94,7 @@ config NX_DISABLE_1BPP config NX_DISABLE_2BPP bool "Disable 2 BPP" default y + select NXFONTS_DISABLE_2BPP ---help--- NX supports a variety of pixel depths. You can save some memory by disabling support for unused color depths. The selection disables support for 2BPP @@ -100,6 +102,7 @@ config NX_DISABLE_2BPP config NX_DISABLE_4BPP bool "Disable 4 BPP" + select NXFONTS_DISABLE_4BPP if NXFONTS default y ---help--- NX supports a variety of pixel depths. You can save some memory by disabling @@ -109,6 +112,7 @@ config NX_DISABLE_4BPP config NX_DISABLE_8BPP bool "Disable 8 BPP" default y + select NXFONTS_DISABLE_8BPP if NXFONTS ---help--- NX supports a variety of pixel depths. You can save some memory by disabling support for unused color depths. The selection disables support for 8BPP @@ -117,6 +121,7 @@ config NX_DISABLE_8BPP config NX_DISABLE_16BPP bool "Disable 16 BPP" default y + select NXFONTS_DISABLE_16BPP if NXFONTS ---help--- NX supports a variety of pixel depths. You can save some memory by disabling support for unused color depths. The selection disables support for 16BPP @@ -125,6 +130,7 @@ config NX_DISABLE_16BPP config NX_DISABLE_24BPP bool "Disable 24 BPP" default y + select NXFONTS_DISABLE_24BPP if NXFONTS ---help--- NX supports a variety of pixel depths. You can save some memory by disabling support for unused color depths. The selection disables support for 24BPP @@ -133,6 +139,7 @@ config NX_DISABLE_24BPP config NX_DISABLE_32BPP bool "Disable 32 BPP" default y + select NXFONTS_DISABLE_32BPP if NXFONTS ---help--- NX supports a variety of pixel depths. You can save some memory by disabling support for unused color depths. The selection disables support for 32BPP @@ -143,6 +150,7 @@ endmenu config NX_PACKEDMSFIRST bool "Packed MS First" default y + select NXFONTS_PACKEDMSFIRST if NXFONTS depends on NX_DISABLE_1BPP || NX_DISABLE_2BPP || NX_DISABLE_4BPP ---help--- If a pixel depth of less than 8-bits is used, then NX needs to know if the @@ -252,318 +260,6 @@ config NXTK_AUTORAISE visible portion of the window. Default: A mouse button must be clicked over a visible portion of the window. -menu "Font Selections" - -config NXFONTS_CHARBITS - int "Bits in Character Set" - default 7 - range 7 8 - ---help--- - The number of bits in the character set. Current options are only 7 and 8. - The default is 7. - -config NXFONT_MONO5X8 - bool "Mono 5x8" - default n - ---help--- - Tiny mono-spaced 5x8 font (font ID FONTID_MONO5X8 = 18) - -config NXFONT_SANS17X22 - bool "Sans 17x22" - default n - ---help--- - This option enables support for a tiny, 17x22 san serif font - (font ID FONTID_SANS17X22 == 14). - -config NXFONT_SANS20X26 - bool "Sans 20x26" - default n - ---help--- - This option enables support for a tiny, 20x26 san serif font - (font ID FONTID_SANS20X26 == 15). - -config NXFONT_SANS23X27 - bool "Sans 23x27" - default n - ---help--- - This option enables support for a tiny, 23x27 san serif font - (font ID FONTID_SANS23X27 == 1). - -config NXFONT_SANS22X29 - bool "Sans 22x29" - default n - ---help--- - This option enables support for a small, 22x29 san serif font - (font ID FONTID_SANS22X29 == 2). - -config NXFONT_SANS28X37 - bool "Sans 28x37" - default n - ---help--- - This option enables support for a medium, 28x37 san serif font - (font ID FONTID_SANS28X37 == 3). - -config NXFONT_SANS39X48 - bool "Sans 39x48" - default n - ---help--- - This option enables support for a large, 39x48 san serif font - (font ID FONTID_SANS39X48 == 4). - -config NXFONT_SANS17X23B - bool "Sans 17x23 Bold" - default n - ---help--- - This option enables support for a tiny, 17x23 san serif bold font - (font ID FONTID_SANS17X23B == 16). - -config NXFONT_SANS20X27B - bool "Sans 20x27 Bold" - default n - ---help--- - This option enables support for a tiny, 20x27 san serif bold font - (font ID FONTID_SANS20X27B == 17). - -config NXFONT_SANS22X29B - bool "Sans 22x29 Bold" - default n - ---help--- - This option enables support for a small, 22x29 san serif bold font - (font ID FONTID_SANS22X29B == 5). - -config NXFONT_SANS28X37B - bool "Sans 28x37 Bold" - default n - ---help--- - This option enables support for a medium, 28x37 san serif bold font - (font ID FONTID_SANS28X37B == 6). - -config NXFONT_SANS40X49B - bool "Sans 40x49 Bold" - default n - ---help--- - This option enables support for a large, 40x49 san serif bold font - (font ID FONTID_SANS40X49B == 7). - -config NXFONT_SERIF22X29 - bool "Serif 22x29" - default n - ---help--- - This option enables support for a small, 22x29 font (with serifs) - (font ID FONTID_SERIF22X29 == 8). - -config NXFONT_SERIF29X37 - bool "Serif 29x37" - default n - ---help--- - This option enables support for a medium, 29x37 font (with serifs) - (font ID FONTID_SERIF29X37 == 9). - -config NXFONT_SERIF38X48 - bool "Serif 38x48" - default n - ---help--- - This option enables support for a large, 38x48 font (with serifs) - (font ID FONTID_SERIF38X48 == 10). - -config NXFONT_SERIF22X28B - bool "Serif 22x28 Bold" - default n - ---help--- - This option enables support for a small, 27x38 bold font (with serifs) - (font ID FONTID_SERIF22X28B == 11). - -config NXFONT_SERIF27X38B - bool "Serif 27x38 Bold" - default n - ---help--- - This option enables support for a medium, 27x38 bold font (with serifs) - (font ID FONTID_SERIF27X38B == 12). - -config NXFONT_SERIF38X49B - bool "Serif 38x49 Bold" - default n - ---help--- - This option enables support for a large, 38x49 bold font (with serifs) - (font ID FONTID_SERIF38X49B == 13). - -config NXFONT_PIXEL_UNICODE - bool "Pixel UniCode" - default n - ---help--- - This option enables support for a small LCD, The "Pixel UniCode" - (font ID FONTID_PIXEL_UNICODE == 19). - -config NXFONT_PIXEL_LCD_MACHINE - bool "Pixel lcd machine" - default n - ---help--- - This option enables support for a small LCD, The "Pixel lcd machine" - (font ID FONTID_PIXEL_LCD_MACHINE == 20). - -config NXFONT_X11_MISC_FIXED_4X6 - bool "x11 misc fixed 4x6" - default n - ---help--- - This option enables support for a "x11-misc-fixed-4x6". - (font ID FONTID_X11_MISC_FIXED_4X6 == 21). - -config NXFONT_X11_MISC_FIXED_5X7 - bool "x11 misc fixed 5x7" - default n - ---help--- - This option enables support for a "x11-misc-fixed-5x7". - (font ID FONTID_X11_MISC_FIXED_5X7 == 22). - -config NXFONT_X11_MISC_FIXED_5X8 - bool "x11 misc fixed 5x8" - default n - ---help--- - This option enables support for a "x11-misc-fixed-5x8". - (font ID FONTID_X11_MISC_FIXED_5X8 == 23). - -config NXFONT_X11_MISC_FIXED_6X9 - bool "x11 misc fixed 6x9" - default n - ---help--- - This option enables support for a "x11-misc-fixed-6x9". - (font ID FONTID_X11_MISC_FIXED_6X9 == 24). - -config NXFONT_X11_MISC_FIXED_6X10 - bool "x11 misc fixed 6x10" - default n - ---help--- - This option enables support for a "x11-misc-fixed-6x10". - (font ID FONTID_X11_MISC_FIXED_6X10 == 25). - -config NXFONT_X11_MISC_FIXED_6X12 - bool "x11 misc fixed 6x12" - default n - ---help--- - This option enables support for a "x11-misc-fixed-6x12". - (font ID FONTID_X11_MISC_FIXED_6X12 == 26). - -config NXFONT_X11_MISC_FIXED_6X13 - bool "x11 misc fixed 6x13" - default n - ---help--- - This option enables support for a "x11-misc-fixed-6x13". - (font ID FONTID_X11_MISC_FIXED_6X13 == 27). - -config NXFONT_X11_MISC_FIXED_6X13B - bool "x11 misc fixed 6x13B" - default n - ---help--- - This option enables support for a "x11-misc-fixed-6x13B". - (font ID FONTID_X11_MISC_FIXED_6X13B == 28). - -config NXFONT_X11_MISC_FIXED_6X13O - bool "x11 misc fixed 6x13O" - default n - ---help--- - This option enables support for a "x11-misc-fixed-6x13O". - (font ID FONTID_X11_MISC_FIXED_6X13O == 29). - -config NXFONT_X11_MISC_FIXED_7X13 - bool "x11 misc fixed 7x13" - default n - ---help--- - This option enables support for a "x11-misc-fixed-7x13". - (font ID FONTID_X11_MISC_FIXED_7X13 == 30). - -config NXFONT_X11_MISC_FIXED_7X13B - bool "x11 misc fixed 7x13B" - default n - ---help--- - This option enables support for a "x11-misc-fixed-7x13B". - (font ID FONTID_X11_MISC_FIXED_7X13B == 31). - -config NXFONT_X11_MISC_FIXED_7X13O - bool "x11 misc fixed 7x13O" - default n - ---help--- - This option enables support for a "x11-misc-fixed-7x13O". - (font ID FONTID_X11_MISC_FIXED_7X13O == 32). - -config NXFONT_X11_MISC_FIXED_7X14 - bool "x11 misc fixed 7x14" - default n - ---help--- - This option enables support for a "x11-misc-fixed-7x14". - (font ID FONTID_X11_MISC_FIXED_7X14 == 33). - -config NXFONT_X11_MISC_FIXED_7X14B - bool "x11 misc fixed 7x14B" - default n - ---help--- - This option enables support for a "x11-misc-fixed-7x14B". - (font ID FONTID_X11_MISC_FIXED_7X14B == 34). - -config NXFONT_X11_MISC_FIXED_8X13 - bool "x11 misc fixed 8x13" - default n - ---help--- - This option enables support for a "x11-misc-fixed-8x13". - (font ID FONTID_X11_MISC_FIXED_8X13 == 35). - -config NXFONT_X11_MISC_FIXED_8X13B - bool "x11 misc fixed 8x13B" - default n - ---help--- - This option enables support for a "x11-misc-fixed-8x13B". - (font ID FONTID_X11_MISC_FIXED_8X13B == 36). - -config NXFONT_X11_MISC_FIXED_8X13O - bool "x11 misc fixed 8x13O" - default n - ---help--- - This option enables support for a "x11-misc-fixed-8x13O". - (font ID FONTID_X11_MISC_FIXED_8X13O == 37). - -config NXFONT_X11_MISC_FIXED_9X15 - bool "x11 misc fixed 9x15" - default n - ---help--- - This option enables support for a "x11-misc-fixed-9x15". - (font ID FONTID_X11_MISC_FIXED_9X15 == 38). - -config NXFONT_X11_MISC_FIXED_9X15B - bool "x11 misc fixed 9x15B" - default n - ---help--- - This option enables support for a "x11-misc-fixed-9x15B". - (font ID FONTID_X11_MISC_FIXED_9X15B == 39). - -config NXFONT_X11_MISC_FIXED_9X18 - bool "x11 misc fixed 9x18" - default n - ---help--- - This option enables support for a "x11-misc-fixed-9x18". - (font ID FONTID_X11_MISC_FIXED_9X18 == 40). - -config NXFONT_X11_MISC_FIXED_9X18B - bool "x11 misc fixed 9x18B" - default n - ---help--- - This option enables support for a "x11-misc-fixed-9x18B". - (font ID FONTID_X11_MISC_FIXED_9X18B == 41). - -config NXFONT_X11_MISC_FIXED_10X20 - bool "x11 misc fixed 10x20" - default n - ---help--- - This option enables support for a "x11-misc-fixed-10x20". - (font ID FONTID_X11_MISC_FIXED_10X20 == 42). - -config NXFONT_TOM_THUMB_4X6 - bool "Tom Thumb Monospace 4x6" - default n - ---help--- - This option enables support for a small, 3x5 font (with blank space - padding to 4x6) (font ID FONTID_TOM_THUMB_4X6 == 43). - -endmenu - menuconfig NXTERM bool "NxTerm" default n diff --git a/graphics/README.txt b/graphics/README.txt index 4055f63855..39a7ef7743 100644 --- a/graphics/README.txt +++ b/graphics/README.txt @@ -25,7 +25,7 @@ at the present, but here is the longer term roadmap: NXTOOLKIT - A set of C graphics tools that provide higher-level window drawing operations. The toolkit can be used for window-oriented graphics without NxWidgets and is built on top of NX. - NXFONTS - A set of C graphics tools for present (bitmap) font images. + NXFONTS - A set of C graphics tools for presenting (bitmap) font images. NX - The tiny NuttX windowing system. This includes the small-footprint multi-user implentation (NXMU as described below). NX can be used without NxWidgets and without NXTOOLKIT for raw access to window memory. @@ -394,8 +394,8 @@ CONFIG_NXTERM_NPOLLWAITERS The number of threads that can be waiting for read data available. Default: 4 -NX Multi-user only options --------------------------- +NX Multi-user options +--------------------- CONFIG_NX_BLOCKING Open the client message queues in blocking mode. In this case, @@ -406,4 +406,3 @@ CONFIG_NX_MXSERVERMSGS and CONFIG_NX_MXCLIENTMSGS flooding of the client or server with too many messages (CONFIG_PREALLOC_MQ_MSGS controls how many messages are pre-allocated). - diff --git a/libnx/Kconfig b/libnx/Kconfig new file mode 100644 index 0000000000..205d4d07c7 --- /dev/null +++ b/libnx/Kconfig @@ -0,0 +1,10 @@ +# +# For a description of the syntax of this configuration file, +# see the file kconfig-language.txt in the NuttX tools repository. +# + +source libnx/nx/Kconfig +source libnx/nxfonts/Kconfig +source libnx/nxglib/Kconfig +source libnx/nxmu/Kconfig +source libnx/nxtk/Kconfig diff --git a/libnx/nx/Kconfig b/libnx/nx/Kconfig new file mode 100644 index 0000000000..f72f3c094c --- /dev/null +++ b/libnx/nx/Kconfig @@ -0,0 +1,4 @@ +# +# For a description of the syntax of this configuration file, +# see the file kconfig-language.txt in the NuttX tools repository. +# diff --git a/libnx/nxfonts/Kconfig b/libnx/nxfonts/Kconfig new file mode 100644 index 0000000000..cd8e476da1 --- /dev/null +++ b/libnx/nxfonts/Kconfig @@ -0,0 +1,401 @@ +# +# For a description of the syntax of this configuration file, +# see the file kconfig-language.txt in the NuttX tools repository. +# + +config NXFONTS + bool "Bitmap Font Support" + default n if !NX + default y if NX + ---help--- + Enable support for bitmap fonts, the fonter rendering library, and a + font cache. + +menu "Font Selections" + depends on NXFONTS + +config NXFONTS_CHARBITS + int "Bits in Character Set" + default 7 + range 7 8 + ---help--- + The number of bits in the character set. Current options are only 7 and 8. + The default is 7. + +config NXFONT_MONO5X8 + bool "Mono 5x8" + default n + ---help--- + Tiny mono-spaced 5x8 font (font ID FONTID_MONO5X8 = 18) + +config NXFONT_SANS17X22 + bool "Sans 17x22" + default n + ---help--- + This option enables support for a tiny, 17x22 san serif font + (font ID FONTID_SANS17X22 == 14). + +config NXFONT_SANS20X26 + bool "Sans 20x26" + default n + ---help--- + This option enables support for a tiny, 20x26 san serif font + (font ID FONTID_SANS20X26 == 15). + +config NXFONT_SANS23X27 + bool "Sans 23x27" + default n + ---help--- + This option enables support for a tiny, 23x27 san serif font + (font ID FONTID_SANS23X27 == 1). + +config NXFONT_SANS22X29 + bool "Sans 22x29" + default n + ---help--- + This option enables support for a small, 22x29 san serif font + (font ID FONTID_SANS22X29 == 2). + +config NXFONT_SANS28X37 + bool "Sans 28x37" + default n + ---help--- + This option enables support for a medium, 28x37 san serif font + (font ID FONTID_SANS28X37 == 3). + +config NXFONT_SANS39X48 + bool "Sans 39x48" + default n + ---help--- + This option enables support for a large, 39x48 san serif font + (font ID FONTID_SANS39X48 == 4). + +config NXFONT_SANS17X23B + bool "Sans 17x23 Bold" + default n + ---help--- + This option enables support for a tiny, 17x23 san serif bold font + (font ID FONTID_SANS17X23B == 16). + +config NXFONT_SANS20X27B + bool "Sans 20x27 Bold" + default n + ---help--- + This option enables support for a tiny, 20x27 san serif bold font + (font ID FONTID_SANS20X27B == 17). + +config NXFONT_SANS22X29B + bool "Sans 22x29 Bold" + default n + ---help--- + This option enables support for a small, 22x29 san serif bold font + (font ID FONTID_SANS22X29B == 5). + +config NXFONT_SANS28X37B + bool "Sans 28x37 Bold" + default n + ---help--- + This option enables support for a medium, 28x37 san serif bold font + (font ID FONTID_SANS28X37B == 6). + +config NXFONT_SANS40X49B + bool "Sans 40x49 Bold" + default n + ---help--- + This option enables support for a large, 40x49 san serif bold font + (font ID FONTID_SANS40X49B == 7). + +config NXFONT_SERIF22X29 + bool "Serif 22x29" + default n + ---help--- + This option enables support for a small, 22x29 font (with serifs) + (font ID FONTID_SERIF22X29 == 8). + +config NXFONT_SERIF29X37 + bool "Serif 29x37" + default n + ---help--- + This option enables support for a medium, 29x37 font (with serifs) + (font ID FONTID_SERIF29X37 == 9). + +config NXFONT_SERIF38X48 + bool "Serif 38x48" + default n + ---help--- + This option enables support for a large, 38x48 font (with serifs) + (font ID FONTID_SERIF38X48 == 10). + +config NXFONT_SERIF22X28B + bool "Serif 22x28 Bold" + default n + ---help--- + This option enables support for a small, 27x38 bold font (with serifs) + (font ID FONTID_SERIF22X28B == 11). + +config NXFONT_SERIF27X38B + bool "Serif 27x38 Bold" + default n + ---help--- + This option enables support for a medium, 27x38 bold font (with serifs) + (font ID FONTID_SERIF27X38B == 12). + +config NXFONT_SERIF38X49B + bool "Serif 38x49 Bold" + default n + ---help--- + This option enables support for a large, 38x49 bold font (with serifs) + (font ID FONTID_SERIF38X49B == 13). + +config NXFONT_PIXEL_UNICODE + bool "Pixel UniCode" + default n + ---help--- + This option enables support for a small LCD, The "Pixel UniCode" + (font ID FONTID_PIXEL_UNICODE == 19). + +config NXFONT_PIXEL_LCD_MACHINE + bool "Pixel lcd machine" + default n + ---help--- + This option enables support for a small LCD, The "Pixel lcd machine" + (font ID FONTID_PIXEL_LCD_MACHINE == 20). + +config NXFONT_X11_MISC_FIXED_4X6 + bool "x11 misc fixed 4x6" + default n + ---help--- + This option enables support for a "x11-misc-fixed-4x6". + (font ID FONTID_X11_MISC_FIXED_4X6 == 21). + +config NXFONT_X11_MISC_FIXED_5X7 + bool "x11 misc fixed 5x7" + default n + ---help--- + This option enables support for a "x11-misc-fixed-5x7". + (font ID FONTID_X11_MISC_FIXED_5X7 == 22). + +config NXFONT_X11_MISC_FIXED_5X8 + bool "x11 misc fixed 5x8" + default n + ---help--- + This option enables support for a "x11-misc-fixed-5x8". + (font ID FONTID_X11_MISC_FIXED_5X8 == 23). + +config NXFONT_X11_MISC_FIXED_6X9 + bool "x11 misc fixed 6x9" + default n + ---help--- + This option enables support for a "x11-misc-fixed-6x9". + (font ID FONTID_X11_MISC_FIXED_6X9 == 24). + +config NXFONT_X11_MISC_FIXED_6X10 + bool "x11 misc fixed 6x10" + default n + ---help--- + This option enables support for a "x11-misc-fixed-6x10". + (font ID FONTID_X11_MISC_FIXED_6X10 == 25). + +config NXFONT_X11_MISC_FIXED_6X12 + bool "x11 misc fixed 6x12" + default n + ---help--- + This option enables support for a "x11-misc-fixed-6x12". + (font ID FONTID_X11_MISC_FIXED_6X12 == 26). + +config NXFONT_X11_MISC_FIXED_6X13 + bool "x11 misc fixed 6x13" + default n + ---help--- + This option enables support for a "x11-misc-fixed-6x13". + (font ID FONTID_X11_MISC_FIXED_6X13 == 27). + +config NXFONT_X11_MISC_FIXED_6X13B + bool "x11 misc fixed 6x13B" + default n + ---help--- + This option enables support for a "x11-misc-fixed-6x13B". + (font ID FONTID_X11_MISC_FIXED_6X13B == 28). + +config NXFONT_X11_MISC_FIXED_6X13O + bool "x11 misc fixed 6x13O" + default n + ---help--- + This option enables support for a "x11-misc-fixed-6x13O". + (font ID FONTID_X11_MISC_FIXED_6X13O == 29). + +config NXFONT_X11_MISC_FIXED_7X13 + bool "x11 misc fixed 7x13" + default n + ---help--- + This option enables support for a "x11-misc-fixed-7x13". + (font ID FONTID_X11_MISC_FIXED_7X13 == 30). + +config NXFONT_X11_MISC_FIXED_7X13B + bool "x11 misc fixed 7x13B" + default n + ---help--- + This option enables support for a "x11-misc-fixed-7x13B". + (font ID FONTID_X11_MISC_FIXED_7X13B == 31). + +config NXFONT_X11_MISC_FIXED_7X13O + bool "x11 misc fixed 7x13O" + default n + ---help--- + This option enables support for a "x11-misc-fixed-7x13O". + (font ID FONTID_X11_MISC_FIXED_7X13O == 32). + +config NXFONT_X11_MISC_FIXED_7X14 + bool "x11 misc fixed 7x14" + default n + ---help--- + This option enables support for a "x11-misc-fixed-7x14". + (font ID FONTID_X11_MISC_FIXED_7X14 == 33). + +config NXFONT_X11_MISC_FIXED_7X14B + bool "x11 misc fixed 7x14B" + default n + ---help--- + This option enables support for a "x11-misc-fixed-7x14B". + (font ID FONTID_X11_MISC_FIXED_7X14B == 34). + +config NXFONT_X11_MISC_FIXED_8X13 + bool "x11 misc fixed 8x13" + default n + ---help--- + This option enables support for a "x11-misc-fixed-8x13". + (font ID FONTID_X11_MISC_FIXED_8X13 == 35). + +config NXFONT_X11_MISC_FIXED_8X13B + bool "x11 misc fixed 8x13B" + default n + ---help--- + This option enables support for a "x11-misc-fixed-8x13B". + (font ID FONTID_X11_MISC_FIXED_8X13B == 36). + +config NXFONT_X11_MISC_FIXED_8X13O + bool "x11 misc fixed 8x13O" + default n + ---help--- + This option enables support for a "x11-misc-fixed-8x13O". + (font ID FONTID_X11_MISC_FIXED_8X13O == 37). + +config NXFONT_X11_MISC_FIXED_9X15 + bool "x11 misc fixed 9x15" + default n + ---help--- + This option enables support for a "x11-misc-fixed-9x15". + (font ID FONTID_X11_MISC_FIXED_9X15 == 38). + +config NXFONT_X11_MISC_FIXED_9X15B + bool "x11 misc fixed 9x15B" + default n + ---help--- + This option enables support for a "x11-misc-fixed-9x15B". + (font ID FONTID_X11_MISC_FIXED_9X15B == 39). + +config NXFONT_X11_MISC_FIXED_9X18 + bool "x11 misc fixed 9x18" + default n + ---help--- + This option enables support for a "x11-misc-fixed-9x18". + (font ID FONTID_X11_MISC_FIXED_9X18 == 40). + +config NXFONT_X11_MISC_FIXED_9X18B + bool "x11 misc fixed 9x18B" + default n + ---help--- + This option enables support for a "x11-misc-fixed-9x18B". + (font ID FONTID_X11_MISC_FIXED_9X18B == 41). + +config NXFONT_X11_MISC_FIXED_10X20 + bool "x11 misc fixed 10x20" + default n + ---help--- + This option enables support for a "x11-misc-fixed-10x20". + (font ID FONTID_X11_MISC_FIXED_10X20 == 42). + +config NXFONT_TOM_THUMB_4X6 + bool "Tom Thumb Monospace 4x6" + default n + ---help--- + This option enables support for a small, 3x5 font (with blank space + padding to 4x6) (font ID FONTID_TOM_THUMB_4X6 == 43). + +endmenu + +menu "Font Cache Pixel Depths" + +config NXFONTS_DISABLE_1BPP + bool "Disable 1 BPP" + default y if NX_DISABLE_1BPP + default n if !NX_DISABLE_1BPP + ---help--- + NX supports a variety of pixel depths. You can save some memory by disabling + support for unused color depths. The selection disables support for 1BPP + pixel depth. + +config NXFONTS_DISABLE_2BPP + bool "Disable 2 BPP" + default y if NX_DISABLE_2BPP + default n if !NX_DISABLE_2BPP + ---help--- + NX supports a variety of pixel depths. You can save some memory by disabling + support for unused color depths. The selection disables support for 2BPP + pixel depth. + +config NXFONTS_DISABLE_4BPP + bool "Disable 4 BPP" + default y if NX_DISABLE_4BPP + default n if !NX_DISABLE_4BPP + ---help--- + NX supports a variety of pixel depths. You can save some memory by disabling + support for unused color depths. The selection disables support for 4BPP + pixel depth. + +config NXFONTS_DISABLE_8BPP + bool "Disable 8 BPP" + default y if NX_DISABLE_8BPP + default n if !NX_DISABLE_8BPP + ---help--- + NX supports a variety of pixel depths. You can save some memory by disabling + support for unused color depths. The selection disables support for 8BPP + pixel depth. + +config NXFONTS_DISABLE_16BPP + bool "Disable 16 BPP" + default y if NX_DISABLE_8BPP + default n if !NX_DISABLE_8BPP + ---help--- + NX supports a variety of pixel depths. You can save some memory by disabling + support for unused color depths. The selection disables support for 16BPP + pixel depth. + +config NXFONTS_DISABLE_24BPP + bool "Disable 24 BPP" + default y if NX_DISABLE_24BPP + default n if !NX_DISABLE_24BPP + ---help--- + NX supports a variety of pixel depths. You can save some memory by disabling + support for unused color depths. The selection disables support for 24BPP + pixel depth. + +config NXFONTS_DISABLE_32BPP + bool "Disable 32 BPP" + default y if NX_DISABLE_32BPP + default n if !NX_DISABLE_32BPP + ---help--- + NX supports a variety of pixel depths. You can save some memory by disabling + support for unused color depths. The selection disables support for 32BPP + pixel depth. + +endmenu + +config NXFONTS_PACKEDMSFIRST + bool "Packed MS First" + default y if !NX || NX_PACKEDMSFIRST + default n if NX && !NX_PACKEDMSFIRST + depends on NXFONTS_DISABLE_1BPP || NXFONTS_DISABLE_2BPP || NXFONTS_DISABLE_4BPP + ---help--- + If a pixel depth of less than 8-bits is used, then NX needs to know if the + pixels pack from the MS to LS or from LS to MS diff --git a/libnx/nxfonts/Make.defs b/libnx/nxfonts/Make.defs index fee5f77baa..fa3ddfee9e 100644 --- a/libnx/nxfonts/Make.defs +++ b/libnx/nxfonts/Make.defs @@ -35,7 +35,7 @@ # Expose NXFONT interfaces to applications -ifeq ($(CONFIG_NX),y) +ifeq ($(CONFIG_NXFONTS),y) CSRCS += nxfonts_getfont.c nxfonts_cache.c CSRCS += nxfonts_convert_1bpp.c nxfonts_convert_2bpp.c diff --git a/libnx/nxfonts/nxfonts_cache.c b/libnx/nxfonts/nxfonts_cache.c index 18ef67e262..fcda31d6d4 100644 --- a/libnx/nxfonts/nxfonts_cache.c +++ b/libnx/nxfonts/nxfonts_cache.c @@ -355,8 +355,8 @@ static inline void nxf_fillglyph(FAR struct nxfonts_fcache_s *priv, /* Initialize the glyph memory to the background color. */ -#if !defined(CONFIG_NX_DISABLE_1BPP) || !defined(CONFIG_NX_DISABLE_2BPP) || \ - !defined(CONFIG_NX_DISABLE_4BPP) || !defined(CONFIG_NX_DISABLE_8BPP) +#if !defined(CONFIG_NXFONTS_DISABLE_1BPP) || !defined(CONFIG_NXFONTS_DISABLE_2BPP) || \ + !defined(CONFIG_NXFONTS_DISABLE_4BPP) || !defined(CONFIG_NXFONTS_DISABLE_8BPP) /* For pixel depths of 1, 2, 4, and 8, build up an 8-bit value containing * multiple background colored pixels. @@ -367,7 +367,7 @@ static inline void nxf_fillglyph(FAR struct nxfonts_fcache_s *priv, uint8_t pixel = (uint8_t)priv->bgcolor; FAR uint8_t *ptr; -#ifndef CONFIG_NX_DISABLE_1BPP +#ifndef CONFIG_NXFONTS_DISABLE_1BPP /* Pack a 1-bit pixel to 2 pixels */ if (priv->bpp < 2) @@ -379,7 +379,7 @@ static inline void nxf_fillglyph(FAR struct nxfonts_fcache_s *priv, } #endif -#if !defined(CONFIG_NX_DISABLE_1BPP) || !defined(CONFIG_NX_DISABLE_2BPP) +#if !defined(CONFIG_NXFONTS_DISABLE_1BPP) || !defined(CONFIG_NXFONTS_DISABLE_2BPP) /* Pack a 2-bit pixel to a 4-bit nibble */ if (priv->bpp < 4) @@ -391,8 +391,8 @@ static inline void nxf_fillglyph(FAR struct nxfonts_fcache_s *priv, } #endif -#if !defined(CONFIG_NX_DISABLE_1BPP) || !defined(CONFIG_NX_DISABLE_2BPP) || \ - !defined(CONFIG_NX_DISABLE_4BPP) +#if !defined(CONFIG_NXFONTS_DISABLE_1BPP) || !defined(CONFIG_NXFONTS_DISABLE_2BPP) || \ + !defined(CONFIG_NXFONTS_DISABLE_4BPP) /* Pack the 4-bit nibble into a byte */ if (priv->bpp < 8) @@ -418,7 +418,7 @@ static inline void nxf_fillglyph(FAR struct nxfonts_fcache_s *priv, else #endif -#if !defined(CONFIG_NX_DISABLE_16BPP) +#if !defined(CONFIG_NXFONTS_DISABLE_16BPP) if (priv->bpp == 16) { FAR uint16_t *ptr = (FAR uint16_t *)glyph->bitmap; @@ -436,7 +436,7 @@ static inline void nxf_fillglyph(FAR struct nxfonts_fcache_s *priv, else #endif -#ifndef CONFIG_NX_DISABLE_24BPP +#ifndef CONFIG_NXFONTS_DISABLE_24BPP if (priv->bpp == 24) { FAR uint32_t *ptr = (FAR uint32_t *)glyph->bitmap; @@ -478,7 +478,7 @@ static inline void nxf_fillglyph(FAR struct nxfonts_fcache_s *priv, else #endif -#if !defined(CONFIG_NX_DISABLE_32BPP) +#if !defined(CONFIG_NXFONTS_DISABLE_32BPP) if (priv->bpp == 32) { FAR uint32_t *ptr = (FAR uint32_t *)glyph->bitmap; @@ -696,37 +696,37 @@ FCACHE nxf_cache_connect(enum nx_fontid_e fontid, switch (bpp) { -#ifndef CONFIG_NX_DISABLE_1BPP +#ifndef CONFIG_NXFONTS_DISABLE_1BPP case 1: priv->renderer = (nxf_renderer_t)nxf_convert_1bpp; break; #endif -#ifndef CONFIG_NX_DISABLE_2BPP +#ifndef CONFIG_NXFONTS_DISABLE_2BPP case 2: priv->renderer = (nxf_renderer_t)nxf_convert_2bpp; break; #endif -#ifndef CONFIG_NX_DISABLE_4BPP +#ifndef CONFIG_NXFONTS_DISABLE_4BPP case 4: priv->renderer = (nxf_renderer_t)nxf_convert_4bpp; break; #endif -#ifndef CONFIG_NX_DISABLE_8BPP +#ifndef CONFIG_NXFONTS_DISABLE_8BPP case 8: priv->renderer = (nxf_renderer_t)nxf_convert_8bpp; break; #endif -#ifndef CONFIG_NX_DISABLE_16BPP +#ifndef CONFIG_NXFONTS_DISABLE_16BPP case 16: priv->renderer = (nxf_renderer_t)nxf_convert_16bpp; break; #endif -#ifndef CONFIG_NX_DISABLE_24BPP +#ifndef CONFIG_NXFONTS_DISABLE_24BPP case 24: priv->renderer = (nxf_renderer_t)nxf_convert_24bpp; break; #endif -#ifndef CONFIG_NX_DISABLE_32BPP +#ifndef CONFIG_NXFONTS_DISABLE_32BPP case 32: priv->renderer = (nxf_renderer_t)nxf_convert_32bpp; break; diff --git a/libnx/nxfonts/nxfonts_convert.c b/libnx/nxfonts/nxfonts_convert.c index 6d3b5a71e2..19db61b27c 100644 --- a/libnx/nxfonts/nxfonts_convert.c +++ b/libnx/nxfonts/nxfonts_convert.c @@ -104,7 +104,7 @@ #endif #if NXFONTS_BITSPERPIXEL < 8 -# ifdef CONFIG_NX_PACKEDMSFIRST +# ifdef CONFIG_NXFONTS_PACKEDMSFIRST # define NXF_INITMASK (NXF_PIXELMASK << (8 - NXFONTS_BITSPERPIXEL)) # else # define NXF_INITMASK NXF_PIXELMASK @@ -217,7 +217,7 @@ int NXF_FUNCNAME(nxf_convert,NXFONTS_SUFFIX) pixel = ((pixel & ~mask) | (mpixel & mask)); } -#ifdef CONFIG_NX_PACKEDMSFIRST +#ifdef CONFIG_NXFONTS_PACKEDMSFIRST mask >>= NXFONTS_BITSPERPIXEL; #else mask <<= NXFONTS_BITSPERPIXEL; diff --git a/libnx/nxglib/Kconfig b/libnx/nxglib/Kconfig new file mode 100644 index 0000000000..54f2f74711 --- /dev/null +++ b/libnx/nxglib/Kconfig @@ -0,0 +1,9 @@ +# +# For a description of the syntax of this configuration file, +# see the file kconfig-language.txt in the NuttX tools repository. +# + +config NXGLIB + bool + default y if NX || NXFONTS + default n if !NX && !NXFONTS diff --git a/libnx/nxglib/Make.defs b/libnx/nxglib/Make.defs index 2f972ab2f8..0e50dbb2a0 100644 --- a/libnx/nxglib/Make.defs +++ b/libnx/nxglib/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # libnx/nxglib/Make.defs # -# Copyright (C) 2013-2014 Gregory Nutt. All rights reserved. +# Copyright (C) 2013-2014, 2017 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -35,13 +35,20 @@ # Expose NXGL interfaces to applications -ifeq ($(CONFIG_NX),y) +ifeq ($(CONFIG_NXGLIB),y) +# Files needed by both NX and NXFONTS + +CSRCS += nxglib_rgbblend.c + +# Files needed only by NX + +ifeq ($(CONFIG_NX),y) CSRCS += nxglib_circlepts.c nxglib_circletraps.c nxglib_intersecting.c CSRCS += nxglib_nonintersecting.c nxglib_nullrect.c nxglib_rectadd.c CSRCS += nxglib_rectcopy.c nxglib_rectinside.c nxglib_rectintersect.c CSRCS += nxglib_rectoffset.c nxglib_rectoverlap.c nxglib_rectsize.c -CSRCS += nxglib_rectunion.c nxglib_rgb2yuv.c nxglib_rgbblend.c +CSRCS += nxglib_rectunion.c nxglib_rgb2yuv. CSRCS += nxglib_runcopy.c nxglib_runoffset.c nxglib_splitline.c CSRCS += nxglib_trapcopy.c nxglib_trapoffset.c nxglib_vectoradd.c CSRCS += nxglib_vectsubtract.c nxglib_yuv2rgb.c @@ -49,6 +56,7 @@ CSRCS += nxglib_vectsubtract.c nxglib_yuv2rgb.c ifneq ($(CONFIG_NX_NPLANES),1) CSRCS += nxglib_colorcmp.c nxglib_colorcopy.c endif +endif # Add the nxglib/ directory to the build diff --git a/libnx/nxglib/nxglib_circlepts.c b/libnx/nxglib/nxglib_circlepts.c index 9822b12486..21d2340a71 100644 --- a/libnx/nxglib/nxglib_circlepts.c +++ b/libnx/nxglib/nxglib_circlepts.c @@ -77,22 +77,6 @@ #define POINT_337p5 15 #define NCIRCLE_POINTS 16 -/**************************************************************************** - * Private Types - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/libnx/nxglib/nxglib_circletraps.c b/libnx/nxglib/nxglib_circletraps.c index 6e49e4d836..f7038703ba 100644 --- a/libnx/nxglib/nxglib_circletraps.c +++ b/libnx/nxglib/nxglib_circletraps.c @@ -57,22 +57,6 @@ #define SIN_45p0 46341 /* sin(45) = 46341 / 65536 */ #define COS_45p0 SIN_45p0 /* cos(45) = sin(45) */ -/**************************************************************************** - * Private Types - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/libnx/nxmu/Kconfig b/libnx/nxmu/Kconfig new file mode 100644 index 0000000000..f72f3c094c --- /dev/null +++ b/libnx/nxmu/Kconfig @@ -0,0 +1,4 @@ +# +# For a description of the syntax of this configuration file, +# see the file kconfig-language.txt in the NuttX tools repository. +# diff --git a/libnx/nxtk/Kconfig b/libnx/nxtk/Kconfig new file mode 100644 index 0000000000..f72f3c094c --- /dev/null +++ b/libnx/nxtk/Kconfig @@ -0,0 +1,4 @@ +# +# For a description of the syntax of this configuration file, +# see the file kconfig-language.txt in the NuttX tools repository. +#