Commit Graph

20 Commits

Author SHA1 Message Date
Gregory Nutt
392809fae5 libs/libnx/nxtk/nxtk_opentoolbar.c: Refuse to open a toolbar of height zero. 2019-05-10 08:30:09 -06:00
Gregory Nutt
05ce221523 graphics/: Add new NX interfaces to query if a window is hidden or not. 2019-05-09 08:27:12 -06:00
Gregory Nutt
04a0a7c8bb Documentation/NXGraphicsSubsystem.html: Add documentatin for new nx[tk]_modal() and nx[tk]_setvisibility() interfaces. 2019-05-08 11:03:06 -06:00
Gregory Nutt
a312503ed2 libs/libnx/nxtk/nxtk_events: Fix an error in handling mouse events for framed windows. When drawing, NX may report mouse positions outside of the Window. The is only for NX windows, but the outside-the-side positions were being discarded by nxtk_events(). 2019-05-07 18:17:59 -06:00
Gregory Nutt
b05e940135 graphics/: Windows can now be created in the hidden state. This can be used to clean up initial window presentation which may involve several steps. This makes those steps all invisible until nx[tk]_setvisibility() is called to make the windows visible. 2019-05-07 08:49:16 -06:00
Gregory Nutt
da314276a1 NX graphics: This commit adds support for hiding windows. This features is needed by Twm4Nx: When a window is iconfied, the icon should appear on the background and the window should disappear (i.e., be hidden). The windows needs to remain healthy and to be updated in all ways, but it cannot affect the display content.
Converserely, when the icon is clicked, the icon needs to be hidden on the backgound and the window needs to be restored in its current state (which may be different than the state of the window at the time it was iconified.

Squashed commit of the following:

    graphics/:  Add checks in all places that I can think to avoid doing something stupid with hidden windows

    Improve some naming

    Add a new file missing in last commit.

    graphics/:  Initial, incomplete support for hiding windows.
2019-05-05 15:21:52 -06:00
Gregory Nutt
0b3375cb78 graphics/, lib/libnx, include/nutt/nx: Add support for modal windows. 2019-04-05 08:24:46 -06:00
Gregory Nutt
ebbd91b441 Grrr.. Once again I forget to 'add' files before committing them. 2019-03-25 13:50:01 -06:00
Gregory Nutt
10388e9123 exmamples/, graphics/NxWidgets: Implement new interfaces nx_synch() and nxtk_synch(). This are used to syncrhonize the NX server with the window client. Currently most of the logic is equivalent to nx_block() and nxtk_block(), but with slightly different semantics. The are separate now because they are likely to diverge in the future. 2019-03-25 13:48:27 -06:00
Gregory Nutt
f5e8dc60f4 graphics/nxmu, include/nuttx/nx/nxmu.h, libs/libnx: Add new server->client callback to notify the window client of server events. Remove the old 'blocked' callback and just make it one case of an 'event' callback. 2019-03-25 13:00:13 -06:00
Gregory Nutt
683cd4c045 libs/libnx/nxtk: Fix more cases where we were using the wrong coordinate system. 2019-03-18 13:29:58 -06:00
Gregory Nutt
5fda638cf0 libs/libnx/nxtk: Add logic to re-draw the frame when the toolbar is added or removed. 2019-03-18 12:13:22 -06:00
Gregory Nutt
10b73fde9d graphics/: Correct logic for copy of bit maps with resolution less than 8 bits from the per-window framebuffer to the device. 2019-03-18 09:45:09 -06:00
Gregory Nutt
4d4ae87cb7 libs/libnx/nxtk/nxtk_setsize.c: Add logic to redraw NXTK borders for the case of per-window framebuffers. There are no redraw callbacks in this case, so we cannot rely on the callbacks to redraw the borders. 2019-03-17 14:37:57 -06:00
Gregory Nutt
a90364d14f libs/libnx/nxtk/nxtk_drawframe.c: Fix a one character typo in a comment 2019-03-17 13:47:10 -06:00
Gregory Nutt
8a46b1f488 Squashed commit of the following:
graphics:  nx_openwindow() and nxtk_openwindow() now accept an addtional 'flag' parameter.  This argument is not used at present but will, eventually enable a RAM backed, per-window framebuffer.

    graphics/Kconfig:  Add configuration to support a rambacked framebuffer. Current marked as EXPERIMENTAL because this is a work in progress.
2019-03-13 12:34:13 -06:00
Gregory Nutt
2d4ce4e047 graphics/nxterm and configs/open1788: Various fixes to get the NxTerm example working in PROTECTED mode with the Open1788 knxterm configuration. Basically works until the screen becomes full and it starts scrolling. Then characters are missing from the display. Needs more debug and test. 2019-03-07 15:57:34 -06:00
Gregory Nutt
1a754deaa0 Cosmetic updates from review of last PR. 2018-11-12 09:43:33 -06:00
Petteri Aimonen
fe0532c226 Merged in paimonen/nuttx/pullreq_libc_libnx_updates (pull request #757)
Pullreq libc libnx updates

* NuttX: make strerror() return 'Success' for 0

* NuttX: fix strrchr() so that it considers null terminator as part of string

    From strrchr(3) man page:
    "The terminating null byte is considered part of the string, so that if c
    is specified as '\0', these functions return a pointer to the terminator."

* NuttX: mm_free(): Add DEBUGASSERT()'s to catch memory corruption early.

    It's easier to find the source when asserts fail already when freeing
    an overflowed buffer, than if the corruption is only detected on next
    malloc().

* MM_FILL_ALLOCATIONS: Add debug option to fill all mallocs()

    This is helpful for detecting uninitialized variables,
    especially in C++ code. I seem to be forgetting to initialize
    member variables and then they just get random values..

* NuttX: nxtk_bitmapwindow: Fix warning message when bitmap is fully off-screen.

* nxfonts_getfont: Avoid unnecessary warnings for other whitespace chars also.

* NuttX: Fix kerning of 'I' in Sans17x22 font

    The I character was running together with some other
    characters, e.g. in sequence "IMI".

* NXMU: Revalidate window pointer for mouse events.

    NXMU caches the previous window pointer so that further mouse
    events can be sent to the same window. However, if the window
    is destroyed while mouse button is held down, the pointer may
    become invalid and cause a crash. This patch revalidates the
    pointer before using it.

Approved-by: GregoryN <gnutt@nuttx.org>
2018-11-12 15:36:35 +00:00
Gregory Nutt
cf99fb40c9 This commit moves all of the libraries under a common directory called libs/. This most certainly break libcxx and uClibc++ for now.
Squashed commit of the following:

    libs/libxx:  Fix some confusing in naming.  If the directory is called libxx, then the library must be libxx.a (unless perhaps LIBCXX is selected).
    libs/:  Fix paths in moved library directories.
    libs:  Brute force move of libc, libnx, and libxx to libs.  Cannot yet build it in that configuration.
2018-05-29 13:21:26 -06:00