src/cwindowfactory.cxx: In member function 'void Twm4Nx::CWindowFactory::redrawIcons(const nxgl_rect_s*)':
src/cwindowfactory.cxx:461:38: warning: 'iconPos.nxgl_point_s::y' may be used uninitialized in this function [-Wmaybe-uninitialized]
461 | iconBounds.pt2.y = iconPos.y + iconSize.h - 1;
| ~~~~~~~~^
src/cwindowfactory.cxx:460:38: warning: 'iconPos.nxgl_point_s::x' may be used uninitialized in this function [-Wmaybe-uninitialized]
460 | iconBounds.pt2.x = iconPos.x + iconSize.w - 1;
| ~~~~~~~~^
nsh_netcmds.c:424:20: warning: 'nsh_addrconv' defined but not used [-Wunused-function]
static inline bool nsh_addrconv(FAR const char *hwstr,
^
nsh_netcmds.c:446:20: warning: 'nsh_sethwaddr' defined but not used [-Wunused-function]
static inline void nsh_sethwaddr(FAR const char *ifname,
^
nsh_envcmds.c:94:21: warning: 'nsh_getdirpath' defined but not used [-Wunused-function]
static inline char *nsh_getdirpath(FAR struct nsh_vtbl_s *vtbl,
^
In file included from bas.c:84:0:
bas.c: In function 'bas_interpreter':
bas_error.h:110:37: warning: left-hand operand of comma expression has no effect [-Wunused-value]
#define NOSUCHLINE STATIC+40, _("No such line")
^
bas.c:2425:52: note: in expansion of macro 'NOSUCHLINE'
FS_putChars(STDCHANNEL, (NOSUCHLINE));
^~~~~~~~~~
bas_fs.c:107:22: warning: 'g_vt100_colormap' defined but not used [-Wunused-const-variable=]
static const uint8_t g_vt100_colormap[8] =
^~~~~~~~~~~~~~~~
<stdout>:4048:16: warning: 'input' defined but not used [-Wunused-function]
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I62610b4c90e67637250cbd0107c2935c8abc542f
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>
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.
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.
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
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.
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.
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
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.
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.
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.
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.
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.
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.
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.
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
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.
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.
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.
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.