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.
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.
include/ and netutils/: Remove references to CONFIG_DISABLE_SIGNALS. Signals can no longer be disabled.
nshlib/: Remove references to CONFIG_DISABLE_SIGNALS. Signals can no longer be disabled.
system/: Remove references to CONFIG_DISABLE_SIGNALS. Signals can no longer be disabled.
testing/: Remove references to CONFIG_DISABLE_SIGNALS. Signals can no longer be disabled.
examples/: Remove references to CONFIG_DISABLE_SIGNALS. Signals can no longer be disabled.
Squashed commit of the following:
apps/nshlib: Remove NSH initialization. Now uses the common apps/netutils/netinit logic (which was cloned from nshlib to begin with).
apps/netutils/netinit: Clone network initialization logic from NSH to this directory so that it can be available for general use.
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.
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.
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.
apps/system/nxplayer: Fix some logical errors from recent comments. They broke the build of the nxplayer as a library vs. a task. apps/graphics/nxglyphs: Fix yet more namespace problems.
graphics/nxwm/src/nxwm_main.cxx: Move from graphics/nxwidgets/UnitTests/nxwm/nxwm_main.cxx.
apps/graphicx/nx*: Fixes numerous build issues mostly associated with include paths and namespaces.
apps/nxglyphs: Decouple (mostly) from nxwidgets and nxwm so that they can be used elsewhere. Creates include/graphics/nxglyphs.h
apps/graphics/nxglyphs: Put all NxWidgets and NxWM glyphs into a common directory where they can eventually be shared. Not very sharable at the moment due to header file entanglements. Need a separate nxglyps.hxx header file.
Separate nxwidets and nxwm into separate directories. Remove old, common NxWidgets directory.
1. A memory corruption issue that occurs from a paste operation that would overflow the fixed buffer size for keyboard processing.
2. A stall in getch() processing when there are cached keycodes in the termcurses emulation (tcurses_vt100.c).
The patch provided in issue 135, which adds support for HTTP Chunked Encoding, covers all paths in the webserver app except CGI callbacks. As a result, if a page being served happens to use CGI, it could generate stream content that does not comply with HTTP Chunked Encoding.
The patch attached amends the webserver app's CGI callbacks to use the HTTP Chunked Encoding sender function instead of using send() directly.
The webserver/httpd app is currently broken when script support is enabled (CONFIG_NETUTILS_HTTPD_SCRIPT_DISABLE). The root cause has been tracked down to the "Content-length" not being available ahead of time in this case (length of -1 passed to send_headers() ). On the other hand, the server closing the socket does not result in FIN being sent to the browser either (FIN not supported by NuttX yet).
Simple solution: Add support for HTTP Chunked Encoding to webserver/httpd (attached patch).
The attached patch is simple. It adds a configuration option to enable chunked encoding. When enabled, the implementation will auto-detect the cases where content length is not available ahead of time, and will automatically engage chunked encoding transfers.
Without this patch, the browser/client hangs forever, as it is expecting more data. With this patch, the browser displays the content.
NxWidgets improvements
* NxWidgets: fix garbage returned when CCycleButton::getValue() is called after removeAllOptions().
It's a bit questionable whether returning 0 here is reasonable or
if it would be better to assert(). But either is better than reading
into random memory and returning a garbage value.
* NXWidgets CScrollingPanel: Don't draw outside the widget area.
The port->move() function doesn't support clipping the
copied area to the client area, so we have to manually
calculate the part that can be moved without going outside
the widget.
* CNxString: Add string + operator and ::format() function
* CNumericEdit: Add option to include unit name after the value
* NxWidgets: CNxWidget: Make useWidgetStyle() public
Makes it easier to update styles when multiple controls are nested.
* NxWidgets: Add CLabelGrid control for displaying text in grid format.
Approved-by: GregoryN <gnutt@nuttx.org>
Reviewers note: Reviewing the changes I also see that these file did not follow the NuttX codings standard. I ran all files through nuttx/tools/indent.sh, manually reviewed all files for coding style issues. I also changed occurrences of non-standard types u8_t, u16_t, and u32_t to the standard uint8_t, uint16_t, and uint32_t.
Squashed commit of the following:
Clean-up some include path problems introduced with the previous set of changes.
app/include/graphics, apps/NxWidgets/UnitTests: Update include paths for file in new location.
apps/NxWidgets/nxwidgets and nxwm: Update include paths for file in new location.
apps/graphics/NxWidgets: Move nxwidgets and nxwm include/ directories to apps/include/graphics
- fix error "sz_main.o: No such file or directory"
- support -p <path> for rz to change the folder for the recevied file
- switch debug output from printf to syslog
- send the next packet for ZME_ACK in ZMS_SENDING to avoid rz on the host side stuck
- make send work reliable even without hardware flow control