Commit Graph

4110 Commits

Author SHA1 Message Date
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
b512ec0235 Trival removal of spaces dangling at the end of lines. 2019-05-06 18:13:03 -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
Sebastien Lorquet
fc7aa92b57 apps/netutils/libcurl4nx: This is an initial comit libcurl4nx. It is not complete yet, but I still wish to commit the unfinished bits to describe the roadmap, and because it is already usable. It will be updated and fixed in the future weeks and months, certainly including POST support and later, SSL.
Some improvements could be made by anyone.  For example, I know the main routine in perform() shall be split into several parts for readability. I apologize in advance for this kind of spaghetti code, but I was short on time to refactor it.  Also chunked HTTP transfer encoding would be a nice contribution from anyone interested. It is detected but not yet supported.
2019-05-03 07:26:13 -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
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
07b6eb555c Trivial changes from review of last PR 2019-04-28 06:47:03 -06:00
raiden00pl
75aca388a4 Merged in raiden00/apps/cjson (pull request #175)
netutils: support for the current version of cJSON

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-04-28 12:34:20 +00:00
raiden00pl
0a6726bc3e Merged in raiden00/apps (pull request #174)
Small fixes

examples/pca9635/pca9635_main.c: fix compilation

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-04-28 11:33:21 +00: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
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
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
04a05b3e7b apps/system/nxplayer: Fix compile problems when audio debug is enabled. 2019-04-23 11:07:20 -06:00
Gregory Nutt
8c48db8176 graphics/nxglyphs/include/mkcursor.c: Correct file header comments. 2019-04-22 17:01:20 -06:00
Gregory Nutt
63efade0fc apps/include/graphics: Minor cleanup of typos noted in review. 2019-04-18 08:23:10 -06:00
Matous Pokorny
f8963b9245 Fix some typos in comments. 2019-04-15 07:58:26 -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
f2b486c281 include/graphics/nxwidgets/cnxserver.hxx: Add Cursor methods to the CNxServer class. 2019-04-13 16:56:29 -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
ad7f76f3a8 apps/examples/pwfb: Fix more cursor-related problems. Currently cursor is presented but the system dies due to memory corruption. 2019-04-10 15:00:36 -06:00
Gregory Nutt
fa05ad35e1 app/examples/pwfb: Add options to reduce the number of windows. This is helpful during debug to reduce the complexity. 2019-04-10 12:33:31 -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
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
Gregory Nutt
aec954b9ec apps/graphics/nxglyphs: Fixes for more changes to cursor structures. 2019-04-07 17:41:45 -06:00
Gregory Nutt
7a7e86ac6c apps/nxglyphs/include/: Remove stride from cursor structure 2019-04-07 16:06:21 -06:00