In this post I will explain the difference between the background mode and windows mode, at least as I understand it so far and I saw when I’ve done the tests.
The idea is, when you want to display something on the screen either you choose to handle the background using
nx_requestbkgd() or with
nx_openwindow(). However you can’t use the two functions on the same time, I already tested it and it’s not working.
As show in the image below the
nx_requestbkgd() allows you to draw an object on the hole area screen but there is no management of the objects. It is up to you to provide that (for example if you want to move, raise or hide an object). On the other hand,
nx_openwindow() allows you to create a window at the dimensions of your choise and draw objects inside; the window can be moved, raised, closed, etc…
Note: When you change position, change size, raise, etc. you need to redraw the region returned by
redraw() callback function.
Here a little demonstration using background drawing and windows drawing.
Here is the patch for nuttx-7.22 directory and for apps-7.22 directory.