Commit Graph

565 Commits

Author SHA1 Message Date
Sebastian Ene
fce08ec029 arch/sim: Fix NXWM test failure
## Summary of changes

Fixed the crash caused by a NULL memory access to an invalid background
window.

Signed-off-by: Sebastian Ene <sene@apache.org>
2020-11-01 11:56:57 -08:00
Matias N
5bcaeff541 lvgl: use malloc/free for memory handling and "tickless" tick interface
This makes LVGL use malloc/free to handle its memory (instead of
their own memory handling) and supports a tick interface by which
LVGL can ask NuttX the elapsed time, instead of having to periodically
"tick" LVGL internal time in a thread.
2020-10-29 22:26:32 -07:00
Xiang Xiao
e76ab9c868 Remove all fclose with stdin, stdout and stderr
since it is wrong to close the builtin stream and specially note
https://pubs.opengroup.org/onlinepubs/9699919799/functions/fclose.html:

Since after the call to fclose() any use of stream results in
undefined behavior, fclose() should not be used on stdin, stdout,
or stderr except immediately before process termination (see XBD
Process Termination), so as to avoid triggering undefined behavior
in other standard interfaces that rely on these streams. If there
are any atexit() handlers registered by the application, such a
call to fclose() should not occur until the last handler is
finishing. Once fclose() has been used to close stdin, stdout, or
stderr, there is no standard way to reopen any of these streams.

and it is also unnecessary because the stream always get flushed.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-10-29 20:43:59 +09:00
Xiang Xiao
8a63e58936 Change all 'Nuttx' to 'NuttX'
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-10-18 22:27:57 -07:00
Huang Qi
08c5998472 graphics/lvgl: Specific LVGL version by kconfig
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2020-08-14 16:02:25 +01:00
Xiang Xiao
e6c5ff9208 Remove the unnecessary touch and clean from Makefile
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-08-11 19:10:19 +01:00
Xiang Xiao
4136d42596 Change FBIO_UPDATE argument from nxgl_rect_s to fb_area_s
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ibaf4b0180afecdcd3248693a3092c8a23e22a2fa
2020-08-10 10:45:37 +01:00
Maciej Wójcik
21049ece6e Rewritten READMEs to Markdown 2020-07-25 01:01:51 -07:00
Maciej Wójcik
51e6645f71 Rename README and README.txt to README.md 2020-07-25 01:01:51 -07:00
Maciej Wójcik
d85cbea7f8 Don't copy header outside of LVGL, export LVGL, add README, fix example 2020-07-16 09:16:20 -05:00
Xiang Xiao
deaa6c5b7b build: Replace $(TOPDIR)/Make.defs with $(APPDIR)/Make.defs
and move NUTTXLIB defintion to the common place

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-07-09 15:17:37 -03:00
Xiang Xiao
b217de70e5 apps: Remove all stuff related to CONFIG_xxx_CXXINITIALIZE
since it is moved to the central place in nuttx side instead

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I544d6110f1ca6460f7c82f970870aa9b1e7ab3dd
2020-07-01 10:03:12 -06:00
Huang Qi
7a85bc75dc graphics/lvgl: Bump lvgl version to 7.0.2 2020-06-17 12:13:36 -03:00
YAMAMOTO Takashi
faba0249c1 Include malloc.h instead of stdlib.h for mallinfo()
Adapt to the change in the main repo.

mallinfo is meant to be API compatible with Linux,
where it's provided by malloc.h.

(I think the API actually originated with System V. I don't
remember how it was there though. Anyway, I guess the
compatibility with Linux is more important than System V
these days.)
2020-06-15 07:21:52 -06:00
Xiang Xiao
69f013e74e build: Remve the unnecessary .gitignore
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-23 15:56:35 +01:00
Xiang Xiao
ead498a788 build: Remove the workaround for the inexistence of .config/Make.defs
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-21 17:43:42 +01:00
Xiang Xiao
6a26547dec build: Move INCDIROPT to common place
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-18 15:37:24 -06:00
Huang Qi
ed54b894b2 graphics/littlevgl: Add missing configs
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Change-Id: I0332365858f7bf9288a43778de8540b6117ddc8a
2020-05-07 06:40:18 -06:00
Xiang Xiao
8a1f5ee34c debug: Reduce CONFIG_CPP_HAVE_VARARGS usage
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-06 07:31:10 -06:00
Alin Jerpelea
1697c64994 examples: nxwidget: nxstyle fixes
nxstyle fixes for nxwidget exaples

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2020-04-21 16:41:51 -06:00
Qi Huang
5018ee264c graphics/littlevgl: Fix lvgl internal warning with patch
examples/lvgldemo: Fix build warning with specific config

Signed-off-by: Qi Huang <huangqi3@xiaomi.com>
2020-04-16 19:06:05 +08:00
Qi Huang
a749b42164 graphics/littlevgl: Fix nxstyle
Signed-off-by: Qi Huang <huangqi3@xiaomi.com>
2020-04-15 11:38:24 -03:00
Qi Huang
4555e73b3e graphics/littlevgl: Change tarball version from 5.3 to 6.1.2
Signed-off-by: Qi Huang <huangqi3@xiaomi.com>
2020-04-15 11:38:24 -03:00
Qi Huang
972a31c16a graphics/littlevgl: Update theme config symbol name in Kconfig
Signed-off-by: Qi Huang <huangqi3@xiaomi.com>
Change-Id: I34be5049fb42a0e293f088dfefe6e9025838403b
2020-04-15 11:38:24 -03:00
Qi Huang
1775ccde1b graphics/littlevgl: Correct color depth description
Signed-off-by: Qi Huang <huangqi3@xiaomi.com>
Change-Id: Ice795f62179d5762cd46c5c9495997ccde0d021e
2020-04-15 11:38:24 -03:00
Qi Huang
5bee0377cb graphics/littlevgl:Fix nxstyle for lv_conf.h
Signed-off-by: Qi Huang <huangqi3@xiaomi.com>
Change-Id: Icdf39551357d32f2af57c6cffe10a07101e3aebe
2020-04-15 11:38:24 -03:00
Qi Huang
6f2ed3dfd4 apps/graphics/littlevgl: Update include guard macro of lv_conf.h
Signed-off-by: Qi Huang <huangqi3@xiaomi.com>
Change-Id: I467354c5a26407eee6d1bc780f6accd091e9b3d2
2020-04-15 11:38:24 -03:00
Qi Huang
abdc745412 graphics/littlevgl: Migrate part of Kconfig/lv_conf.h to LittleVGL V6.1.2, such as basic setting and font, etc.
Signed-off-by: Qi Huang <huangqi3@xiaomi.com>
Change-Id: Ib3dc31d95acf646dd26d41be873082ea107c6616
2020-04-15 11:38:24 -03:00
Qi Huang
4c151dfef6 graphics/littlevgl: Change lvgl tarball download source to GitHub
Signed-off-by: Qi Huang <huangqi3@xiaomi.com>
2020-04-14 11:21:05 -03:00
Gregory Nutt
05f2253a33 Remove CONFIG_CAN_PASS_STRUCT
This is the companion to PR #766.  It removes the CONFIG_CAN_PASS_STRUCT option as recommended by Issue #620

NuttX PR #766 depends on PR being in place but not vice versa.  This PR should be merge-able without #766 and then PR #766 should also pass its checks.
2020-04-11 20:32:53 +01:00
YAMAMOTO Takashi
e7156be066 Change the defaults of stack size configs to DEFAULT_TASK_STACKSIZE
This commit changes only ones with the default 2048 and
leaves the others.
E.g. this leaves SYSTEM_RAMTEST_STACKSIZE, whose default is 1024.
I guess those need to be inspected one-by-one.
2020-03-27 02:43:11 -05:00
YAMAMOTO Takashi
c304624fab Replace "STACKSIZE = 2048" with CONFIG_DEFAULT_TASK_SIZE
For now, I left the following instances because it isn't
clear to me why they are using the different values.
Maybe they need one-by-one inspection.

    examples/igmp/Makefile:STACKSIZE = 1024
    examples/powerled/Makefile:STACKSIZE = 1024
    examples/powermonitor/Makefile:STACKSIZE = 768
    examples/relays/Makefile:STACKSIZE = 512
    examples/smps/Makefile:STACKSIZE = 1024
    graphics/screenshot/Makefile:STACKSIZE = 4096
    system/flash_eraseall/Makefile:STACKSIZE = 1024
    testing/cxxtest/Makefile:STACKSIZE = 4096
    testing/smart_test/Makefile:STACKSIZE = 4096
2020-03-27 02:43:11 -05:00
Xiang Xiao
1511403fdf Revert "Don't generate .depend anymore"
This reverts commit cc5ad09caa.
2020-03-22 23:09:40 -05:00
Xiang Xiao
cc5ad09caa
Don't generate .depend anymore 2020-03-22 18:15:21 +00:00
Gregory Nutt
da31673ddf Run nxstyle against all modified .c and .h files 2020-03-22 08:23:28 -05:00
Gregory Nutt
1a9444a68b Remove support for CONFIG_FS_WRITABLE and CONFIG_FS_READABLE 2020-03-22 08:23:28 -05:00
Xiang Xiao
41d88f06e7 Run codespell -w with the latest dictonary again 2020-02-23 07:10:14 -06:00
Xiang Xiao
d660492289 Run codespell -w against all files
and fix the wrong correction
2020-02-22 14:41:36 -06:00
chao.an
f28eca9dbc Make.defs: Use complete include path 2020-02-19 12:56:10 -06:00
Xiang Xiao
779197c63e Ensure all source code end with one and only one newline
by this command:
git ls-files -z | while IFS= read -rd '' f; do tail -c1 < "$f" | read -r _ || echo >> "$f"; done
2020-02-09 08:14:49 -06:00
liuhaitao
e738fbedba graphics/littlevgl/Makefile: update lvgl.h dependency to fix parallel build break
Parallel build imxrt1060-evk:lvgl with the below error:
make[3]: *** No rule to make target 'lvgl/lvgl.h', needed by '/home/jenkins/jenkins-slave/
workspace/NuttX-Nightly-Build/apps/include/graphics/lvgl.h'.

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-02-05 05:50:56 -08:00
Xiang Xiao
37135e5dfe telnetd should listen both IPv4 and IPv6 for the dual stack
Change-Id: Ic1c2878f2eda721ccdf667b0a634289c643f5220
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-02-03 07:17:22 -06:00
Xiang Xiao
1154735ca6 Refine the preprocess conditional guard style 2020-01-31 11:04:10 -06:00
Xiang Xiao
e0dcfa0c55 Remove extra whitespace from files (#43)
* Remove multiple newlines at the end of file
* Remove the white space from the end of line
2020-01-31 08:29:24 -06:00
Xiang Xiao
6cd8ba3cf8 Set NXGLYPHS_BACKGROUNDCOLOR default value
to avoid warning: symbol value '' invalid for NXGLYPHS_BACKGROUNDCOLOR

Change-Id: I56e83a88b41d26a6833131a8dc89afe0dcf25d96
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-01-23 15:30:19 +08:00
Xiang Xiao
857158451b Unify the void cast usage
1.Remove void cast for function because many place ignore the returned value witout cast
2.Replace void cast for variable with UNUSED macro

Change-Id: Ie644129a563244a6397036789c4c3ea83c4e9b09
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-01-02 23:21:01 +08:00
Alan Carvalho de Assis
7b4a3ac5ac graphics/littlevgl/Makefile: Temporary fix LVGL compilation until we update to version 6.1.1. 2019-12-07 12:23:01 -06:00
Gregory Nutt
eff1633886 Remove apps/grephics/traveler 2019-11-25 16:21:00 -06:00
Gregory Nutt
0dde32fb43 nshlib/nsh_romfsetc.c and graphics/traveler/trv_romfs.c: Replace direct calls to romdisk_register() with indirect calls via boardioctl(BOARDIOC_ROMDISK). This not only fixes the violation of the portable POSIX OS interface, but also permits use of ROM disks in PROTECTED and KERNEL modes. There are still multiple illegal calls to romdisk_register() from code under apps/examples. These all must also be converted to use boardioctl(BOARDIOC_ROMDISK) someday. 2019-10-26 13:47:03 -06:00
Gregory Nutt
5d59abe442 graphics/twm4nx/Makefile: Fix a recently introduced error that broke all Twm4Nx configurations. 2019-10-17 17:03:55 -06:00
Xiang Xiao
403b4a0178 In all Make.defs files, append CONFIGURED_APPS with the consistent ifeq/ifneq. 2019-10-17 11:42:49 -06:00
Xiang Xiao
7808eb62d2 apps/: In all Make.def files, append to CONFIGURED_APPS patch with the absolute path. 2019-10-17 11:33:59 -06:00
Gregory Nutt
3a23523147 Makefiles: This reverts part of commit cf0365ea9. It restores 'conditional' inclusion of TOPDIR/Make.defs. Otherwise all make targets fail if the board has not been configured. That is okay most of the time, but not for things like clean and distclean which should not depend on being configured. 2019-10-15 09:25:48 +08:00
Xiang Xiao
31a7b99f9c apps.: Remove the inappropriate NSH_BUILTIN_APPS coupling
1. Check NSH_NETINIT for self network initialization
2. Check NSH_ARCHINIT for sel arch specific initialization
3. Always show help regardless of NSH_BUILTIN_APPS
4. Loop forever regardless of NSH_BUILTIN_APPS, user could:
  a.change the default behavior by the command line argument
  b.or ctrl+c to break out the loop
2019-10-07 02:37:56 -06:00
Xiang Xiao
e806097c70 Application.mk and main.c files: Change builtin's entry point from main to xxx_main by macro expansion. This change make the entry point fully compliant with POSIX/ANSI standard. 2019-10-06 06:14:56 -06:00
Xiang Xiao
cf0365ea92 Clean up Makefile under apps folder no functional changes. 2019-10-04 08:35:46 -06:00
Xiang Xiao
e73ca15c99 Makefiles: Change ${shell pwd} to $(CURDIR) since pwd doesn't exist on Windows 2019-10-02 07:06:50 -06:00
Xiang Xiao
9a27d4a697 Makefiles: Remove .PRECIOUS if Makefile doesn't touch libapps. 2019-10-01 11:48:55 -06:00
Nathan Hartman
664e8a1410 Fix minor typos in docs and comments. 2019-09-29 12:53:39 -06:00
Nathan Hartman
b2a3ba57ff Fix typos 2019-09-11 08:59:08 -06:00
Nathan Hartman
6a6e9d1aa8 NxWidgets::CGraphicsPort: Fix small typo 2019-09-08 16:02:15 -06:00
Nathan Hartman
3a75edca20 Fix minor typo/copy-paste: 'will be use when'->'will be used when' 2019-08-23 11:59:28 -06:00
Manuel Stühn
88d47e469f Merged in manuelstuehn/nuttx-apps/feature/bsd-portable (pull request #190)
change all occurences of /bin/(ba)sh to /usr/bin/env bash which appears more portable

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-10 17:16:33 +00:00
Gregory Nutt
b118c96a33 Update configurations instructions in README.txt files to show ':' delimiter vs '/' delimiter. 2019-08-05 17:01:49 -06:00
Nathan Hartman
d6a3beadfb Remove 'executable' bit on several files 2019-08-01 14:19:02 -06:00
Gregory Nutt
31147b962c apps/graphics/slcd: Improve the representation of '1', 'l', and 'I'. 2019-06-01 14:11:30 -06:00
Gregory Nutt
cf878648d4 Another update to a README. 2019-06-01 13:19:50 -06:00
Gregory Nutt
7a56e64121 Update a README 2019-06-01 13:03:09 -06:00
Gregory Nutt
c1bb142e18 Squashed commit of the following:
apps/graphics/tmw4nx and apps/graphics/slcd:  This seems the last of the show stopper bugs.  All seems functional.

    apps/graphics/slcd:  Correct some errors found in early texting.  Now the Twm4Nx::CClock window comes up, but there are problems with the way that the segments are being displayed.

    apps/graphicx/twm4nx:  CClock is complete and compiles correctly.  Crashes with a hardware when the clock is selected from the Main Menu, however.
2019-06-01 13:00:02 -06:00
Gregory Nutt
51c3d3a054 Squashed commit of the following:
apps/graphics/slcd:  With these changes the CSLcd class now compiles
    successfully.  Still untested.

    apps/graphics/slcd:  Finish off rendering.  Hook into configuration and build system.

    apps/graphics/nxglyphs:  Add images that will eventually be used for clock icons

    apps/graphics/slcd:  Completes all CLcd methods except for rendering to the window.

    apps/graphics/slcd:  Add beginning of SLCD class.

    Add ASCII to SLCD character mapping.

    apps/graphics/slcd:  Represent segments as runs rather than trapezoids.  Trapezoids will be synthesized later.

    A little more SLCD logic

    apps/graphics/slcd:  Flesh out more trapezoids in the decomposition.
2019-05-31 20:44:02 -06:00
Gregory Nutt
f937077b0e apps/graphics/twm4nx/README.txt: Add an overview of how to create Twm4Nx applications. 2019-05-28 08:53:00 -06:00
Gregory Nutt
72f536866b Trivial typo fix in README. 2019-05-27 07:23:59 -06:00
Gregory Nutt
af36a92874 Update a README file. 2019-05-26 14:01:34 -06:00
Gregory Nutt
41765ebe81 apps/graphics/twm4nx: Fix some errors found when enabling NX keyboard support. The most important being that the mouse and keyboard drivers need to be opened non-blocking. 2019-05-26 12:37:18 -06:00
Gregory Nutt
10ab7a56c9 apps/graphics/twm4nx: Fix a bug in placement of icons on the desktop. When many windows are iconfigied, a bug in the looping logic could cause an infinite loop. 2019-05-26 09:19:33 -06:00
Gregory Nutt
96d7679d6f Update a README. 2019-05-25 16:17:19 -06:00
Gregory Nutt
95a1a49c14 Update a README file. 2019-05-24 06:31:08 -06:00
Gregory Nutt
636e3e2278 Squashed commit of the following:
apps/graphics/twm4nx:  Revise logic to detect clicks on the background image.  The original implementation had some side effects.

    apps/graphics/twm4nx:  Remove some remaining, unused stuff from TWM that was never used.  Menus need to close after the 'terminal' selection is made.  Otherwise, the menu can become buried under a newly open menu and not easily recovered.

    apps/graphics/twm4ndx:  Add a 'critical' bit to the eventID.  While resizing, all events will be ignore except those marked critical.

    apps/graphics/twm4nx:  CBackground now brings up the main menu if the background image is click.  This makes the behavior the same across all of the background except when an icon is clicked.
2019-05-23 10:20:12 -06:00
Gregory Nutt
7409dd57bb Fix a warning found in build testing. 2019-05-22 08:22:12 -06:00
Gregory Nutt
dd35a7cacc apps/: Removed all references to CONFIG_DISABLE_POLL. The standard POSIX poll() can not longer be disabled. 2019-05-21 19:08:12 -06:00
Gregory Nutt
b7b3dfb58b Update README 2019-05-21 16:10:09 -06:00
Gregory Nutt
320e660e85 apps/graphics/twm4nx: Add a configuration option to control the number of buttons in one column of the Icon Manager. The Icon Manager now long relies the default window width; now it determines a preffered window with based primarily on the font size. 2019-05-21 16:00:19 -06:00
Gregory Nutt
0a00a9950c Squashed commit of the following:
apps/graphics/twm4nx:  Adds some colors and better style control to support the CONTEMPORARY theme.  Still getting a few artifacts on the display.

    apps/graphics/twm4nx:  Use custom CWidgetStyle to force Icon background to match selected desktop background.

    apps/graphics/nxglyphs:  Add more modern looking button images for the Twm4Nx CONTEMPORARY theme

    apps/graphics/twm4nx:  Add some definitions to support Themes.  Background image is now optional.
2019-05-21 14:48:01 -06:00
Gregory Nutt
891ea23356 Squashed commit of the following:
apps/graphics/twm4nx:  Fix an uninitialized variable that was causing toolbar buttons to randomly come up enabled or disabled.  Remove some unused event definitions.

    apps/graphics/twm4nx:  Fix a calibration screen startup issue.  Make an initial calibration scrren optional
2019-05-20 12:06:06 -06:00
Gregory Nutt
a06b47394b This commit adds a calibration screen
Squashed commit of the following:

    apps/graphics/twm4nx:  The calibration seems to be functional.  Needs more testing.

    apps/graphics/twm4nx:  Extend event handling to support receiving raw, uncalibaated touchscreen inputs.  This is needed for touchscreen calibration.

    apps/graphics/twm4nx:  Extend event handling to support shutting down of externally controlled windows.  This is need to end the calibration sequence.

    apps/graphics/twm4nx:  CCalibration now compiles okay, but is missing event handling logic for touchscreen input and for window termination.

    apps/graphics/twm4nx:  Move application-related files into different directories to separate them from the core Twm4Nx files.

    apps/graphics/twm4nx:  A little more progress on calibration display.

    app/graphics/twm4ndx:  Add files that will support a calibration display.  This initial commit is simply the calibration display from NxWM and is not hooked into the configuration or build systems.

    apps/graphics/twm4ndx:  Compile out cursor support if we are using a mouse
2019-05-20 11:01:46 -06:00
Gregory Nutt
5f79775690 apps/graphics/twm4ndx: Compile out cursor support if we are using a mouse 2019-05-17 12:52:04 -06:00
Gregory Nutt
d237001bc3 apps/graphics/nxglyphs: Add a new resize cursor image. apps/graphics/twm4nx: Use new resize cursor image. 2019-05-17 10:52:16 -06:00
Gregory Nutt
5c8249f584 apps/graphics/nxglyphs: Fix some typos in configuration name. 2019-05-17 09:25:41 -06:00
Gregory Nutt
6b303da968 Squashed commit of the following:
apps/graphics/twm4nx:  Clean up some build issues.

    apps/graphics/nxglyphs:  Remove some warnings due to coupling with NXWM.

    apps/graphics/twmndx:  Separate out the main() entry point for ctwm4nx.cxx.  There is functionality there that does not involve CTwm4Nx and so it is better if the main function were totally separate.
2019-05-17 08:53:25 -06:00
Gregory Nutt
5fc0e6c1a8 apps/graphics/twm4nx: During resizing, when the tool bar is drawn, the toolbar background must be redraw before the butttons and title are redrawn. 2019-05-16 16:39:13 -06:00
Gregory Nutt
6fe1d62624 Update a README 2019-05-16 14:52:00 -06:00
Gregory Nutt
e76bfbb74e Squashed commit of the following:
apps/graphics/twm4nx:  Other toolbar buttons need to be disabled while resizing.  Lots of problems if you decide to iconify or exit while resizing.  CResize now disables all buttons except for the RESIZE button while resizing.

    apps/graphics/twm4nx:  Add an event and logic to support notification of changes in the size of a window to NxTerm.

    Various updates to adapt to change in boardctl() interface.

    apps/graphics/twm4nx:  Correct an error in the NxTerm resize logic

    apps/graphics/twm4nx:  Update debug output when failures to send a message occur.  The returned value of -1 is not interested, need to show the errno value instead.

    apps/graphics/twm4nx:  Correct the maximum size of a message.  Recent changes caused message send failures because a message exceed that previous maximum size.

    apps/graphics/twm4nx:  Fix routing of redraw events.
2019-05-16 13:51:57 -06:00
Gregory Nutt
11fc2e4621 Squashed commit of the following:
apps/graphics/twm4nx:  Fix a bad width calculation.

    apps/graphics/twm4nx:  Debugging resize.  Only partially functional.

    apps/graphics/twm4nx:  Forgot to install the IEventTap instance.  No resizing kind of works, but I can't get out of it!  There is a basic problem in the window needs to be updated for the new size and there is no mechanism in place to do that (at least not with RAM backed windows).

    apps/graphics/twm4nx:  Add missing part of the resize logic.  Initial testing is mixed.  The resize window appears, but nothing else good happens.  No hardfaults though.

    apps/graphics/twm4nx:  This is a complete redesign of the CResize class.  Unverified on initial commit.

    apps/graphics/twm4nx:  Commit of in-progress resize changes
2019-05-15 17:21:25 -06:00
Gregory Nutt
e6b642308f Squashed commit of the following:
apps/graphics/nxwidgets/src/cbuttonarray.cxx:  Correct an error CButtonArray.  Was not correctly resizing the widget when the dimensions of the button array changed.

    apps/graphics/twm4nx:  Trival correcion of some typos in comments.
2019-05-15 07:55:57 -06:00
Gregory Nutt
7d28294b45 Squashed commit of the following:
apps/graphics/twm4nx:  Rename IDragEvent interface to IEventTap.  I intend to reuse this interface for window resizing as well as dragging.

    apps/graphics/twm4nx:  Some trivial elimination of some unused logic in CResize.
2019-05-14 16:55:02 -06:00
Gregory Nutt
f57ea060ea apps/graphics/twm4nx: Rename twm4nx_widgetevents.hxx to twm4m_events.hxx. The name was misleading because it includes other types of events as well. 2019-05-14 14:00:21 -06:00
Gregory Nutt
d91fb4e8c9 Squashed commit of the following:
apps/graphics/twm4nx:  In the Icon Manager, do not use the window name to identify which button press corresponds to which Window.  Window names are not unique.  Instead, it now keeps track of thich row x column was assigned to the window name.  That row x column uniquely associates a window with a button and does not depend on the window name in any way.

    apps/graphics/twm4nx:  Fix an error in event notification sent by the Icon Manager when a window is selected.

    apps/graphics/twm4nx:  Correct logic in Icon Manager for the case where the number of windows causes the Icon Manager to increase in size by one row.
2019-05-14 10:41:00 -06:00
Gregory Nutt
eeb5d4433c Squashed commit of the following:
apps/graphics/twm4nx:  Add logic to detect collisions with reserved regions in the backgroud or with other icons when moving an icon on the desktop.

    apps/graphics/twm4nx:  When moving icons, erase the old icon image before drawing the new one.
2019-05-14 08:15:36 -06:00
Gregory Nutt
75fc1a2dd3 apps/graphics/twm4nx: Icons can now be moved, but there are artifacts: Need to erase the old icon region on the background before drawing the new icon image during the move. 2019-05-13 18:09:20 -06:00
Gregory Nutt
c800b43950 Update a README 2019-05-13 09:49:33 -06:00
Gregory Nutt
3cd7b371d5 apps/graphics/twm4nx: Fix error in place of icons on the desktop
apps/graphics/twm4nx:  Fix several errors associated with the NxTerm buttons.  Most changes involved fixing crashes with the exit button is pressed.  Now the NxTerm windows behave well.  However, they are not receiving console input so there is still more to be done.
2019-05-13 09:09:33 -06:00
Gregory Nutt
668fe4e366 Squashed commit of the following:
apps/graphics/twm4nx:  Various fixes to get the NxTerm window to come up properly.  It does now come up okay, but the system basically loses its mind thereafter.  Goods good until some buttons are pressed.

    apps/graphics/twm4nx:  Simpify application startup.

    apps/graphics/twm4nx:  Fix some errors in debug statements.
2019-05-12 17:40:02 -06:00
Gregory Nutt
1ed0e05815 apps/graphics/twm4nx/Makefile: Don't build NxTerms is CONFIG_TWM4NX_NXTERM is not set 2019-05-12 14:40:44 -06:00
Gregory Nutt
80773daff9 Squashed commit of the following:
apps/graphics/NXWidgets/:  NXWidgets::CNxWidgets:  Fix some issues with returned values.  On setting the widget size or position, it was returning false if there was no change in size or position.  Many places in the code were treating the false return value as an error.

    apps/graphics/twm4nx:  Fix a couple of errors in the unused resize logic:  It was not hiding the resize menu to it appeared as a artifact in the uppler left hand corner.  Was calling setSize() on the window instead of getSize().  That was causing errors because the size being set was uninitialized.

    apps/graphics/twm4nx: Add missing event generation logic when a window is closed.
2019-05-12 13:46:48 -06:00
Gregory Nutt
abd7c9a165 This commit incorporates the NxTerm window hosting NSH. This is just code complete and just compiles with no errors. The NxTerm item does not appear in the Main Menu, however, selecting the menu item does not yet bring up the NxTerm window.
Squashed commit of the following:

    apps/graphics/twm4nx:  Revamp the event system to support notification of external applications when the window is being closed.

    apps/graphics/twm4nx:  A little NxTerm progress

    apps/graphics/twm4nx:  Clean up some logic associated with use of multiple Icon Managers.

    apps/graphics/twm4nx:  Add CNxterm to the build.  It is a long way from compiling.
2019-05-12 11:57:45 -06:00
Gregory Nutt
77d10f9028 apps/graphics/twm4nx: Add an IApplicationFactory interface. 2019-05-11 15:48:46 -06:00
Gregory Nutt
c6802efc38 apps/graphics/twm4nx: Modify how applications register with the main menu. Add logic to support all possible menu selection notification methods: But putting up a subment, by starting an application, or be sending an event. 2019-05-11 13:17:19 -06:00
Gregory Nutt
2b2e17d126 Squashed commit of the following:
apps/graphics/twm4nx:  Add new logic to place an icon at a reasonable spot on the background.

    apps/graphics/twm4nx:  Remove some unused logic.
2019-05-11 09:47:27 -06:00
Dave Marples
80de28c865 apps/system/spi: I needed a small test tool for spi in the style of the i2c tool, but I didn't see one so I've hacked one out of the i2c tool source. 2019-05-10 18:14:44 -06:00
Gregory Nutt
dbb5211060 Squashed commit of the following:
apps/graphics/twm4nx:  This resolves the problems noted in the previous commit comments.  Window events are now communicated properly to the appliation-specific event handler.  Menus now seem to be receiving events and working well.

    apps/graphics/twm4nx:  Revamp application event handler.  Better design but still crashes when a main menu entry is clicked.

    apps/graphics/twm4nx:  First cut at application window event distribution.  Has some issues.  Not ready for prime time.

    apps/graphics/twm4nx:  Add more controls for the events that will be generated on basic window redraw, mouse/keyboard input, and keyboard input.

    apps/graphpics/twm4nx:  Add a 'Desktop' item to the main menu that will iconify all windows and menus and just show the open desktop.
2019-05-10 15:22:27 -06:00
Gregory Nutt
28b4be1913 Squashed commit of the following:
apps/graphics/twm4nx:  Remove some unnecessary twiddling with widget settings.

    apps/graphics/twm4nx:  Correct an error in how menu windows are created.

    apps/graphics/twm4nx:  Use button array vs list box for menus.
2019-05-10 09:20:43 -06:00
Gregory Nutt
71de56bca8 Squashed commit of the following:
apps/graphics/twm4nx: Mostly cosmetic stuff.

    apps/graphics/twm4ndx:  In icon manager, fixing some places where width was used when height was intended.  Fixe uninitialized variable.
2019-05-09 17:54:01 -06:00
Gregory Nutt
06f479c471 Squashed commit of the following:
apps/graphics/twm4nx:  The Icon Manager now adds a Main Menu entry that will de-iconify the Icon Manager or raise to the top of the hieararchy if not iconfified.  This is useful when there are many open windows.

    apps/graphics/twm4nx:  In resize operation, don't let window get narrower than the minimum toolbar width.

    apps/graphics/twm4nx:  Add logic so that the main menu is place at (or near) the position where the background was clicked.

    apps/graphics/twm4nx:  Better integrate menus and iconifiction:  Bringup up a menu is like de-iconifcation, except there is no icon to be erases; taking down a menu is like iconification except that there is no icon to present.

    apps/graphics/nxwidgets:  Add methods to all windows to query if a window is visible or hidden.

    apps/graphics/twm4nx:  Use NxWidgets methods which work in all contexts instead of trying to come up with a way to know if a window is displayed through complex flags.
2019-05-09 13:31:12 -06:00
Gregory Nutt
fea0109ab3 Squashed commit of the following:
apps/graphics/twm4nx:  CWindow: Add a global function that can be used to determine the minimum width of a window.  If the window is set to a width smaller than this, then toolbar items will overlap and the toolbar will be corrupted.  This is a global function (rather than a method of CWindow) because in some cases, this minimum width must be known before the window is created.

    apps/graphics/twm4nx:  CMenus now uses CWindows, rather that raw NX windows.  This rippled through to many other things due to conflicts between NUL-terminated C strings and NXWidgets::CNxStrings.
2019-05-08 22:11:28 -06:00
Gregory Nutt
944fd507fe With these changes, the main menu appears when any location on the background no occupied by an icon is clicked.
apps/graphics/nxwidgets:  CWidgetControl::handleLeftClick now returns a value to indicate if the click was actually processed or not.  CWidgetControl::pollMouseEvents:  Correct return value.

apps/graphics/twm4nx:  CBackground::event():  Implement logic to handle a left click on the background and to bring up the main Menu.  CWindowEvent: Extend message to distinguish between keyboard and mouse input.  Mouse position and buttons now accompany the mouse input data. CMenus: Add methods to query and control the visibility of the menu.
2019-05-08 15:28:06 -06:00
Gregory Nutt
9e1257deed apps/graphics/twm4nx: (1) Update the README file, (2) add initial files to support an NxTerm application. On this initial commit, these are just the NxWM NxTerm files with some renaming. That are not finished and have not yet been hooked into the build system. Some applicatino is needed in order to verify the functionality of the main menu. 2019-05-08 11:15:44 -06:00
Gregory Nutt
598bf28f34 apps/graphics/twm4nx: Extend the IDragEvents interfaces and user's thereof to better handle the cases when dragging where the mouse position gets ahead of the window updates and the reported mouse position lies not in the toolbar window, but in the main window or even outside of the window. 2019-05-07 18:20:42 -06:00
Gregory Nutt
d244b7a11d Squashed commit of the following:
apps/graphics/twm4nx:  Additional redesign.  Window draggin now sort of works in an unreliable hurky-gurky way.  More to be done.

    apps/graphics/twm4nx:  First cut at redesigned dragging logic
2019-05-07 16:16:47 -06:00
Gregory Nutt
b0d39372fb apps/graphics/twm4nx: Exploit the new feature to create hidden windows. This cleans up some brief window startup anomalies. Also fixes an initialization error in CMenus. 2019-05-07 08:51:37 -06:00
Gregory Nutt
eaffa13f54 Squashed commit of the following:
apps/graphics/twm4nx:  Replace most usage of NUL-terminated C strings with NXWidgets::CNxString.

    apps/graphics/twm4nx:  Add initial support for the main menu.  The main menu will come up when a left click is performed on the background.  The main menu is used for starting applications.  The adds the CMainMenu class that implements the main menu and an IApplication interface class the provides th template for how any external C++ application can add itself to the Main Menu.

    Still missing is the logic that responds to the meny item selection and sends the event to the Main Menu as well as the logic in the Main Menu that handles the event and either brings up a sub-menu or starts and application.

    Things are still basically functional after these changes, but my gut feeling is these changes added some instabilities that will need to be smoothed out.
2019-05-06 18:10:45 -06:00
Gregory Nutt
02c148e07e Squashed commit of the following:
apps/graphics/twm4nx:  Try to improve icon text spacing.  Not noticeably better, however.

    apps/graphics:  Split long icon title on two lines below the icon image.

    apps/graphics/twm4nx:  Both iconification and de-iconification work.

    apps/graphics/twm4nx: Various fixed toward de-iconifying a window.  Progress but still not there yet.
2019-05-06 12:05:53 -06:00
Gregory Nutt
1879949cdc apps/graphics/twm4nx: Add logic to hide the window when it is iconified and restore the window when it is de-iconfied. Iconification works, de-iconification does not. 2019-05-05 15:23:50 -06:00
Gregory Nutt
1e4dfd7193 apps/graphics/twm4nx: Trying (unsuccessfully so far) to get events from iconified windows. 2019-05-05 11:50:08 -06:00
Gregory Nutt
64cf50e2eb graphics/twm4nx/src/cbackground.cxx: Add logic to handle polling for background icon events.
graphics/twm4nx/src/window.cxx:  Add flags to CWindow initializer to support customization of toolbar buttons and other window properties.  Add framework to handle toolbar button presses.  Window minimization (aka, iconification) does not work.

graphics/twm4nx/src/input.cxx:  Add support to scaling touchscreen.  Not needed for the current testing because the touchscreen naturally matches the display size.  But will be needed, along with calibration scren, in the future.
2019-05-05 10:23:46 -06:00
Gregory Nutt
f64df4a376 apps/graphics/twm4nx: Additional changes needed to use touchscreen with no keyboard. 2019-05-04 14:51:49 -06:00
Gregory Nutt
afbb51eb1e apps/graphics/twm4nx: Add option to use touschreen instead of mouse input. 2019-05-04 12:26:14 -06:00
Gregory Nutt
f3b3d1fc72 apps/graphics/NxWidgets: CNxTkWindow, CNxWindow, CNxServer: Add support to create RAM backed windows.
apps/graphics/twm4nx:  IconMgr window now comes up correctly.  Need to revisit window width setup.  All windows are no created as RAM backed windows.
2019-05-04 11:45:15 -06:00
Gregory Nutt
b5ae79b8f3 graphics/twm4nx/Kconfig: Add configuration disable keyboard/mouse input for testing purposes.
graphics/twm4nx/src/ciconmgr.cxx:  Correct initial window size and position in the upper righthand corner;  Need to fill draw the button array immediately on window creation.

graphics/twm4nx/src/cwindow.cxx:  Need to fill the toolbar initially with the widget background color.
2019-05-04 10:33:16 -06:00
Gregory Nutt
e50bbaac3a graphics/twm4nx/src/cbackground.cxx: Should set the initial background color immediately without waiting for a redraw. 2019-05-04 07:47:00 -06:00
Gregory Nutt
9eb7db731e apps/graphics/twm4nx: Fix a common typo: backgound vs background. 2019-05-03 10:47:04 -06:00
Gregory Nutt
445e0eef79 apps/graphic/twm4nx: Fix junk varialbe that was shadowing variable of the same name in the base CNxWidget class. Resolves all start up crash issues. Now I need to figure out why the host VNC client drops the connection. 2019-05-02 16:40:10 -06:00
Gregory Nutt
2fff83d60d apps/graphics/twm4nx: Correct design of input event logic. Still getting a hardfault. 2019-05-02 14:41:53 -06:00
Gregory Nutt
358f32bfdc Squashed commit of the following:
apps/graphics/twm4nx:  Fix various bugs found in bringup:  Re-order object instantiation to account for inter-object dependencies.  Correct mq_receive() buffer size.  Fix a backward comparison.

    apps/graphics/twm4nx:  Twm4Nx debug can now be separately enabled so that it does not get overwhelmed by other graphics debug output.
2019-05-02 09:19:45 -06:00
Gregory Nutt
a11f55ca4c apps/graphics/twm4nx: Fixes two bugs. Now gets further but is still non-functional. 2019-05-01 14:54:54 -06:00
Gregory Nutt
f730108adb Squashed commit of the following:
apps/graphics/NxWidgets:  Fix a possible deadlock condition when waiting for window geometry data that will never come.  Fixed by re-requesting geometry data if we don't already have it.

    apps/graphics/twm4nx:  Add some debug output.

    apps/graphics/twm4nx:  Rethink how background events are handled.

    apps/grephics/twm4nx:  Expermimental organization to capture background events.
2019-05-01 11:11:43 -06:00
Gregory Nutt
ad57b3de4d apps/graphics/twm4nx: Add options to initialize the system via boardctl() and to bring up the network using the new apps/netutils/netinit. This latter is only necessary because VNC is being used to provide graphics. 2019-04-29 11:49:15 -06:00
Gregory Nutt
6a970ec4e9 apps/graphics/twm4nx: Suppress input thread if using the VNC server. We don't need to catch input fromo keyboard and mouse devices in that case; those inputs will be injected into NX directly by the VNC server. Includes a couple of fixes from initial bringup attempts. 2019-04-28 12:47:49 -06:00
Gregory Nutt
e742f97674 Squashed commit of the following:
apps/graphics/twm4nx:  Remove Icon Windows; replace with IconWidgets that are draw on the background.
    apps/graphics/twm4nx:  Add CIconWidget event generation.
    apps/graphics/twm4nx:  Add event handling logic to CIconWidget.
2019-04-28 09:24:05 -06:00
Gregory Nutt
0c6f41912c apps/graphics/twm4nx: Add compount widget CIconWidget. This will eventually replace the icon Windows with widgets that can be drawn on the Background. 2019-04-27 17:53:02 -06:00
Gregory Nutt
9030bf631d apps/graphics/twm4nx: Flesh out some of the Resize logic. Still missing the pull events needed to do the resize. 2019-04-27 12:05:18 -06:00
Gregory Nutt
c144919a4e apps/graphics/twm4nx: Finsh menu-related event handling. Extended menu handling. Allow external application event handling using a new base class (CTwm4NxEvent). 2019-04-27 09:35:05 -06:00
Gregory Nutt
ba58654955 apps/graphics/twm4nx: In order for widgets too draw the correct window or toolbar, it is necessary to get the CWidgetControl instance from the window we want to use, not to create a new instance. 2019-04-26 14:30:55 -06:00
Gregory Nutt
601659ff59 Squashed commit of the following:
graphics/twm4nx/src/ciconmgr.cxx:  Integrate use of CButtonArray; implement first cut at event handling.

    graphics/nxwidgets/src/cbuttonarray.cxx:  Add a method to CButtonArray that will allow us to dynamically resize the array (at the cost of losing all button labels).

    graphics/twm4nx/src/ciconmgr.cxx:  Add some fragments of CButtonArray logic.

    graphics/twm4nx/src/cwindow.cxx:  Finishes first cut at window event management.
2019-04-26 12:50:35 -06:00
Gregory Nutt
27194275a5 apps/graphics/twm4nx: Update the README. 2019-04-25 17:58:28 -06:00
Gregory Nutt
950b4cb604 wm4Nx is a port of twm, Tab Window Manager (or Tom's Window Manager)
version 1.0.10 to NuttX NX windows server.  No, a port is not the right
word.  It is a re-design of TWM from the inside out to work with the NuttX
NX server.  The name Twm4Nx reflects this legacy.  But Twm4Nx is more a
homage to TWM than a port of TWM.

The original TWM was based on X11 which provides a rich set of features.
TWM provided titlebars, shaped windows, several forms of icon management,
user-defined macro functions, click-to-type and pointer-driven keyboard
focus, graphic contexts, and user-specified key and pointer button bindings,
etc.

Twm4Nx, on the other hand is based on the NuttX NX server which provides
comparatively minimal support.  Additional drawing support comes from
the NuttX NxWidgets library (which necessitated the change to C++).

Twm4Nx is greatly stripped down and targeted on small embedded systems
with minimal resources.  For example, no assumption is made about the
availability of a file system; no .twmrc file is used.  Bitmaps are not
used (other than for fonts).

The TWM license is, I believe compatible with the BSD license used by NuttX.
The origin TWM license required notice of copyrights within each file and
a full copy of the original license which you can find in the COPYING file.
within this directory.

STATUS:

This port was brutal.  Much TWM logic was removed because it depending on X11 features (or just because I could not understand how to use it).  The logic is partial.  A lot more needs to be done to have a complete system (hence, it is marked EXPERIMENTAL).  The kinds of things that need to done are:

1. Update some logic that is only fragmentary for how like resizing, and menus.
2. Integrate NxWidgets into the windows:  The resize menu needs a CLabel, the menus are CListBox'es, but not completely integrated, the Icon Manager needs to be a button array.
3. Resit Icons.  They are windows now, but need to be compound widgets lying on the background.
4. Widget events are only partially integrated.  A lot more needs to be done.  A partial change to thoe event system that hints at the redesign is in place but it is far from complete.
2019-04-25 16:54:17 -06:00
Gregory Nutt
8c48db8176 graphics/nxglyphs/include/mkcursor.c: Correct file header comments. 2019-04-22 17:01:20 -06:00
Gregory Nutt
a96fdc3fa1 /apps/graphics/nxglyphs: Add 16x16 cursor images. 30x30 are kind of large. 2019-04-14 13:44:08 -06:00
Gregory Nutt
03e65e8d22 graphics/nxglyphs: Update cursor images. Better to have clean, if ragged cursor edges that weird color effects from antialiasing attempts. 2019-04-13 15:09:57 -06:00
Gregory Nutt
0ff0a97ae4 apps/graphics/nxglyphs/include: Lots more problems with autogenerated files. 2019-04-10 09:15:05 -06:00
Matthew Koch
f09bc1a01b Squashed commit of the following:
Add note to file header of MIT-licensed code
    Compat for older kconfig
    Fixup OOB build experience
    Apply coding standards to imported code
    Upgrade littlevgl to 5.3 - demo
    Upgrade littlevgl to 5.3
2019-04-08 06:57:42 -06:00