Commit Graph

48 Commits

Author SHA1 Message Date
Xiang Xiao adbff7de81 tools/Config.mk: add DEFINE macro like INCDIR 2020-02-03 15:06:11 -06:00
Xiang Xiao 5c80b94820 Replace #include <semaphore.h> to #include <nuttx/semaphore.h>
Since the kernel side should call nxsem_xxx instead and remove the unused inclusion
2020-02-01 08:27:30 -06:00
Xiang Xiao 68951e8d72 Remove exra whitespace from files (#189)
* Remove multiple newlines at the end of files
* Remove the whitespace from the end of lines
2020-01-31 09:24:49 -06:00
chao.an c3ba541bd2 Author: Gregory Nutt <gnutt@nuttx.org>
mm/Makefile:  Same change should be applied to mm/Makefile since the mm/ build is identical to the libc/ build.
        libs/libnx/Makefile:  Same change should be applied to libnx/Makefile since the mm/ build is identical to the libc/ build.

    Author: chao.an <anchao@xiaomi.com>

        libs/libc/Makefile:  Correct the dependents path
2020-01-21 08:02:23 -06:00
Xiang Xiao 6a3c2aded6 Fix wait loop and void cast (#24)
* Simplify EINTR/ECANCEL error handling

1. Add semaphore uninterruptible wait function
2 .Replace semaphore wait loop with a single uninterruptible wait
3. Replace all sem_xxx to nxsem_xxx

* Unify the void cast usage

1. Remove void cast for function because many place ignore the returned value witout cast
2. Replace void cast for variable with UNUSED macro
2020-01-02 10:54:43 -06:00
Nathan Hartman 46aaec7ba0 Fix minor typos in docs and comments. 2019-09-29 12:52:20 -06:00
athan Hartman 6d7e0feea1 Remove 'executable' bit on several files 2019-08-01 14:13:55 -06:00
Gregory Nutt 6253a8995f apps/graphics/nxglyphs: Remove some warnings due to coupling with NXWM. 2019-05-17 08:41:23 -06:00
Gregory Nutt f371679f58 libs/libnx/nxglib/nxglib_intersecting.c: Correct bogus logic in nxgl_interesting. Good to know I was stupid then to and that is it not just a recent thing. 2019-05-13 09:06:14 -06:00
Gregory Nutt 4f31eec94e libs/libnx/nxmu/: Add a few bad input parameter checks. configs/lpcxpresso-lpc54628/twm4nx/defconfig: Need to enable the NX library. 2019-05-12 14:42:27 -06:00
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 abf6965c24 Squashed commit of the following:
libs/:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    syscall/:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    wireless/:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    Documentation/:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    include/:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    drivers/:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    sched/:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    configs:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    arch/xtensa:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    arch/z80:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    arch/x86:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    arch/renesas and arch/risc-v:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    arch/or1k:  Remove all references to CONFIG_DISABLE_SIGNALS.  Signals are always enabled.
    arch/misoc:  Remove all references to CONFIG_DISABLE_SIGNALS.  Signals are always enabled.
    arch/mips:  Remove all references to CONFIG_DISABLE_SIGNALS.  Signals are always enabled.
    arch/avr:  Remove all references to CONFIG_DISABLE_SIGNALS.  Signals are always enabled.
    arch/arm:  Remove all references to CONFIG_DISABLE_SIGNALS.  Signals are always enabled.
2019-04-29 14:52:05 -06:00
Gregory Nutt 4179b8416f graphics/: Clean up some C and Kconfig comments. Remove Kconfig dependency on EXPERIMENTAL. 2019-04-13 16:54:55 -06:00
Gregory Nutt ad76ca674b graphics/nxbe: Some bugfix found early in cursor testing. 2019-04-10 12:31:43 -06:00
Gregory Nutt 4aadcc8c28 Adds support for cursors with differing pixel depths on multiple displays
Squashed commit of the following:

    Update .gitignore
    Fix some compile-related issues.
    Add support for cursors of differing pixeldepth.
    Various compile-related fixes.
    graphics/nxglib:  Separate cursor rendering routines in nxglib/ (like all other rendering logic).  graphics/nxbe:  Flesh out remaining cursor methods.
2019-04-09 11:33:59 -06:00
Gregory Nutt 2c2729521b Abandon attempt to get common data structures for NX and the raw framebuffer cursor interface. This backs out several changes. 2019-04-07 18:00:40 -06:00
Gregory Nutt e5c56aaab6 graphics: A little more progress with software cursors. 2019-04-07 16:04:21 -06:00
Gregory Nutt 79b83f0c05 graphics: Extend the definition of the cursor image structure. 2019-04-07 13:25:20 -06:00
Gregory Nutt 42e2c9139c Squashed commit of the following:
libs/libnx/nxme:  Add front-end, client, message handling needed for cursor support.  Still actual cursor logic yet, just message handling.

    graphics/nxmu and graphics/nxbe:  Add back-end message handling needed for cursor support.  No actual cursor logic yet, just message handling.
2019-04-06 14:34:56 -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 372e8b86a4 libs/libnx/nxmu/nx_filltrapezoid.c: Fix a coordinate system error. When no clipping rectangle is falls, it falls back to use the entire window as for the clip. However, that window must then then be in window relative coordinates, not in absoute device coordinates. 2019-03-20 12:26:45 -06:00
anchao bb8648e7a0 ibs/libc/Makefile, libs/libnx/Makefile, and mm/Makefile: Remove obj-path MKDEPS option since make dependency target (MT) is not supported by some toolchains. 2019-03-19 10:14:50 -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 92554257b9 Squashed commit of the following:
graphics/nxbe/nxbe_bitmap.c:  Fix another coordinate system problem.

    graphics/:  Review use of device coordinate system with window frambebuffer and make fixes accordingly.

    graphics/nxbe/nxbe_fill.c:  Fix a coordinate system bug.  Was trying to update the window fraembuffer using the device coordinate system.  Need to use the relative coordinate system.

    graphics/:  Use DEBUGASSERT instead of return an error since the is no user to handle the errors within the NX server.  Use CONFIG_DEBUG_GRAPHICS instead of CONFIG_DEBUG_FEATURES in most cases.

    graphics/:  Nothing under graphics/ should set the errno.
2019-03-17 11:34:45 -06:00
Gregory Nutt f2d90e6298 graphics: For consistency, rename fields fb->fbmem as in other structures. 2019-03-14 12:19:01 -06:00
Gregory Nutt 419c4cb6be A little more progress toward the implementation of per-window framebuffers. Still missing:
- Logic that generates the low lever framebuffer renderers for the per-window framebuffers,
- The logic that picks off the per-window framebuffer updates from normal graphics device updates.  This logic must update both the per-window framebuffer and the graphics device (from the framebuffer).

Squashed commit of the following:

    graphics:  Add logic to allocate the per-window framebuffer.

    graphics:  A few fragmentary thoughts on how a per-window framebuffer could be represented and allocated.
2019-03-14 11:20:14 -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 0454ae2a10 This commit removes naming associated with and naming for the now non-existent NXFE graphics layer.
Squashed commit of the following:

    graphics/:  Rename nxfe_reportposition to nxmu_reportposition.  The is no longer an nxfe layer.

    graphics/:  Renmae nxfe_redrawreq to nxmu_redrawreq.  The is no longer an nxfe layer.

    graphics/nxmu/nxmu.h:  Renmae nxfe.h to nxmu.h.  There is no long an nxfe layer.

    graphics/: Rename nxfe_state_s to nxmu_state_s.  There is no longer an nxfe layer.

    graphics/: Rename nxfe_conn_s to nxmu_conn_s.  There is no longer an nxfe layer.
2019-03-13 09:16:30 -06:00
Gregory Nutt 1f22ebfac3 libs/libnx/nxfonts: Fix a memory leak in the font cache. With a busy NxTerm display, this could drain off all the memory pretty quickly! 2019-03-08 11:52:49 -06:00
Gregory Nutt aefacb05ca Minor NxTerm-related clean-up 2019-03-08 08:43:16 -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
Xiang Xiao e1202d2ed3 Replace all ASSERT with DEBUGASSERT to save the code space 2018-08-24 06:58:30 -06:00
Xiang Xiao 467d2a58ea Replace non critical PANIC with DEBUGPANIC to save the code space 2018-08-24 06:21:15 -06: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