Commit Graph

341 Commits

Author SHA1 Message Date
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
278b40b766 include/graphics/nxwidgets/cwidgetcontrol.hxx: Add handshare to getWindowHandle() to avoid returning a NULL handle. But now Twm4Nx hangs waiting for the non-NULL handle, 2019-05-01 12:19:14 -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
8f5944c4a8 Squashed commit of the following:
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.
2019-04-29 14:53:38 -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
94a0d92b54 This commit removes the private network initialization logic from NSH and puts in a common location at apps/netutils/netinit. Now that netork initialization logic can be used by applications that do not include NSH.
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.
2019-04-29 10:22:56 -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
Sebastien Lorquet
fe0954cd62 netutils/netlib/netlib_parseurl.c: Add a more flexible version of netlib_parsehttpurl. This one can parse any URL, and is extensible so future improvements keep the same API. 2019-04-26 13:08:38 -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
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
63efade0fc apps/include/graphics: Minor cleanup of typos noted in review. 2019-04-18 08:23:10 -06:00
Gregory Nutt
f2b486c281 include/graphics/nxwidgets/cnxserver.hxx: Add Cursor methods to the CNxServer class. 2019-04-13 16:56:29 -06:00
Gregory Nutt
99382df286 apps/examples/pwfb: Extend example to verify software cursors. Untested on initial commit. 2019-04-10 09:24:08 -06:00
Gregory Nutt
c6dbcb2b17 graphics/nxglyphs/Makefile: Fixes error 'No rule to make target preconfig' 2019-04-05 14:41:00 -06:00
Gregory Nutt
ef26c25994 graphics/nxwidgets and inclu/graphics/nxwidgets: Add support for modal windows. 2019-04-05 09:05:19 -06:00
Gregory Nutt
755ee18504 apps/graphics/nxwm: nxwm_main.c is no longer a unit test. Need to remove some dangling dependencies on UNITTEST and also some testing that is inappropriate in its new role. 2019-04-04 20:04:12 -06:00
Gregory Nutt
dee7f14b49 Squashed commit of the following:
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.
2019-04-04 18:53:29 -06:00
Gregory Nutt
b167bebabc graphics/NxWidgets/nxwidgets/src/ccallback.cxx and include/graphics/nxwidgets/: Add a synchronize method to every window. This is a wrapper arounc nx[tk]_sync and permits C++ applications to synchronize with the NX server. 2019-03-27 13:50:52 -06:00
Gregory Nutt
11b6bc9447 exmamples/, graphics/NxWidgets: Update NX window clients so that they use the new 'event' callback (vs. the obsoluted 'blocked' callback). 2019-03-25 13:01:52 -06:00
Gregory Nutt
66af5b46dd apps/Nxwidgets: Fix some recently introduced errors found in build testing. 2019-03-08 16:26:34 -06:00
Alan Carvalho de Assis
c019c9d7af apps/examples/modbusmaster/mbmaster_main.c: eMBMasterRegHoldingCB cannot be static. 2019-03-07 16:11:45 -06:00
Gregory Nutt
061b4338c9 apps/examples/nxterm and graphics/NxWidgets/nxwm: Replace direct calls to nxtk_register with legal, indirect calls via boardctrl(BOARDIOC_NXTERM). Replace calls to (deleted) nxterm_unregister(). The correc way to delete a driver is by unlink'ing it. 2019-03-06 10:53:13 -06:00
Gregory Nutt
9db029e318 The file system can no longer be disabled. Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS==0 2019-02-11 13:10:10 -06:00
ligd
557cd8e454 netutils/codecs/base64.c: Add base64_[de|en]code_length() API 2019-01-27 07:20:25 -06:00
Xiang Xiao
4d2f580568 apps/netutils/codecs/base64.c: Remove the big stack array 2019-01-27 07:17:07 -06:00
Ken Pettit
8132c38064 graphics/pdcurs34: This commit adds a configuration option to pdcurses to enable line-drawing character (ALTCHARSET) when using the short 16-bit chtype. This is done by limiting the characters to 7-bit ASCII values and using the 8-th bit as the A_ALTCHARSET bit. This allows a significant RAM savings 4K - 20K depending on terminal size) while still allowing the nicer line-graphic characters for border drawing. 2019-01-08 08:28:27 -06:00
Ken Pettit
e1237bfefd apps/graphics/pdcurs34/nuttx and system/termcurses: This commit fixes two issues:
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).
2019-01-08 08:28:27 -06:00
Ken Pettit
73fc5eb199 apps/graphics/pdcurs34: Integration of termcurses into pdcurses, plus pdcurses updates for multi-thread support 2019-01-05 13:25:12 -06:00
Gregory Nutt
e88a529010 From patch attached to nuttx/ Bitbucket Issue #136 from Vlado Vidovic:
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.
2018-11-23 17:29:07 -06:00
Gregory Nutt
d3c36663d0 netutils/webserver: Contributed by "Anonymous" via attachment to Bitbucket issue #135: "webserver broken when scripting support enabled - support for chunked encoding fixes it"
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.
2018-11-23 10:13:34 -06:00
Gregory Nutt
7488a65e17 Updates from coding style review of PR 160 2018-11-09 10:21:42 -06:00
Petteri Aimonen
66d4ed9912 Merged in paimonen/apps/pullreq_nxwidgets (pull request #160)
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>
2018-11-09 16:00:50 +00:00
ligd
f954b15cac pps/system/ping and pings and apps/netutils/ping: Extract icmp ping and icmpv6 ping6 logic from system/ to C-callable library in netutils/. 2018-11-08 09:32:05 -06:00
Xiang Xiao
cddfda99f0 apps/netutils/pppd: Refine and fix pppd code.
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.
2018-11-07 12:43:42 -06:00
Xiang Xiao
c1f0653c85 apps/netutils/chat and apps/examples/chat: 'constify' chat variables and parameters 2018-11-07 11:55:09 -06:00
Gregory Nutt
7b56c9c336 apps/include/netutils/ipmsfilter.h: Eliminate error generated by bad pre-processor logic. 2018-11-02 08:32:18 -06:00
Gregory Nutt
a26a7f9767 apps/netutils/netlib and apps/examples/igmp: Adapt to use the corrected, semi-standard version of struct ip_msfilter. 2018-10-29 06:51:56 -06:00
Gregory Nutt
c558fce8ad This commit moves the NxWidgets include directories into the correct position in the apps/ source tree.
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
2018-09-16 17:23:45 -06:00
ZhongAn
392943a0a0 apps/system/nxrecorder: Add nxrecorder application 2018-08-27 08:20:11 -06:00
ZhongAn
09a3bc44b4 system/nxplayer/nxplayer.c: Add playraw command 2018-08-27 08:04:48 -06:00
Xiang Xiao
8116d10da3 apps/fsutils/mksmartfs: Add a check to see if the SmartFS is already formatted. apps/nshlib: Add a force flag (-f) to mksmartfs. SmartFS will be formatted only if (1) the FLASH does not already hold a SmartFS, or (2) the force flag is set 2018-08-23 07:14:30 -06:00
Xiang Xiao
ddd86d31ca apps/system/zmodem:
- 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
2018-08-23 06:33:39 -06:00
Gregory Nutt
a57610c2c4 Remove trailing spaces at the end of lines. 2018-08-13 07:47:26 -06:00
Gregory Nutt
3e81973cd5 include/netutils/netlib.h: Eliminate a warning about AF_UNSPEC and AF_INET not defined. 2018-08-03 10:50:24 -06:00