Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Calls nxtk_openwindow() to create a bordered window,
  • Calls nxtk_setposition() and nxtk_setsize() to position the window in the display,
  • Calls nxtk_opentoolbar() to create a toolbar sub-window on the main window (This toolbar window is not used by the example, it is just for illustration).

A more practical use case for, say, a handheld device with a single NxTerm display would be to use the background window.  The background is a window like any other with these special properties:  It cannot be moved; it is always positioned at (0,0).  It cannot be resized; it is always the full size of the display.  And it cannot be raised, it is always the lowest windows in the z-axis.

NxTerm Driver

And binds the Nxterm driver to the permit drawing in the window. This is done when it:

...

  • Character input driver receives input,
  • Some keyboard listener thread receives input and injects it into NX via a call to nx_kbdin(),
  • NX sends an event to the registered kbdin() method of the window that has focus, providing the keyboard input to the window application.  In this case, the window application of interest is the window bound to the NxTerm character driver by the application.  The kbin() callback provides the focused keyboard input to the NxTerm driver via boardctl(BOARDIOC_NXTERM_IOCTL, (uintptr_t)&iocargs),
  • If the NxTerm window is the window with focus, the The NxTerm character driver receives keyboard data, buffers it, and provides that keyboard input for the next read operation,
  • NSH receives input on stdin which was re-directed to the NxTerm character driver.  NSH processes the input, and
  • NSH outputs data to stdout which was re-directed to the NxTerm character driver.

...