mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 17:33:08 +08:00
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.
This commit is contained in:
+11
-4
@@ -1,7 +1,8 @@
|
||||
/****************************************************************************
|
||||
* include/nuttx/nx/nx.h
|
||||
*
|
||||
* Copyright (C) 2008-2011, 2015, 2017 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2008-2011, 2015, 2017, 2019 Gregory Nutt. All rights
|
||||
* reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -379,6 +380,9 @@ int nx_eventnotify(NXHANDLE handle, int signo);
|
||||
*
|
||||
* Input Parameters:
|
||||
* handle - The handle returned by nx_connect()
|
||||
* flags - Optional flags. Must be zero unless CONFIG_NX_RAMBACKED is
|
||||
* enabled. In that case, it may be zero or
|
||||
* NXBE_WINDOW_RAMBACKED
|
||||
* cb - Callbacks used to process window events
|
||||
* arg - User provided value that will be returned with NX callbacks.
|
||||
*
|
||||
@@ -388,8 +392,8 @@ int nx_eventnotify(NXHANDLE handle, int signo);
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
NXWINDOW nx_openwindow(NXHANDLE handle, FAR const struct nx_callback_s *cb,
|
||||
FAR void *arg);
|
||||
NXWINDOW nx_openwindow(NXHANDLE handle, uint8_t flags,
|
||||
FAR const struct nx_callback_s *cb, FAR void *arg);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nx_closewindow
|
||||
@@ -908,6 +912,9 @@ void nx_redrawreq(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect);
|
||||
* Input Parameters:
|
||||
* handle - The handle returned by nx_connect
|
||||
* hwnd - The pre-allocated window structure.
|
||||
* flags - Optional flags. Must be zero unless CONFIG_NX_RAMBACKED is
|
||||
* enabled. In that case, it may be zero or
|
||||
* NXBE_WINDOW_RAMBACKED
|
||||
* cb - Callbacks used to process window events
|
||||
* arg - User provided value that will be returned with NX callbacks.
|
||||
*
|
||||
@@ -917,7 +924,7 @@ void nx_redrawreq(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect);
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int nx_constructwindow(NXHANDLE handle, NXWINDOW hwnd,
|
||||
int nx_constructwindow(NXHANDLE handle, NXWINDOW hwnd, uint8_t flags,
|
||||
FAR const struct nx_callback_s *cb, FAR void *arg);
|
||||
|
||||
#undef EXTERN
|
||||
|
||||
+26
-6
@@ -1,7 +1,8 @@
|
||||
/****************************************************************************
|
||||
* include/nuttx/nx/nxbe.h
|
||||
*
|
||||
* Copyright (C) 2008-2011, 2013, 2017 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2008-2011, 2013, 2017, 2019 Gregory Nutt. All rights
|
||||
* reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -62,13 +63,32 @@
|
||||
#endif
|
||||
|
||||
/* NXBE Definitions *********************************************************/
|
||||
/* Window flags and helper macros */
|
||||
|
||||
#define NXBE_WINDOW_BLOCKED (1 << 0) /* The window is blocked and will not
|
||||
* receive further input. */
|
||||
/* Window flags and helper macros:
|
||||
*
|
||||
* NXBE_WINDOW_BLOCKED - Window input is blocked (internal use only)
|
||||
* NXBE_WINDOW_RAMBACKED - Window is backed by a framebuffer
|
||||
*/
|
||||
|
||||
#define NXBE_ISBLOCKED(wnd) (((wnd)->flags & NXBE_WINDOW_BLOCKED) != 0)
|
||||
#define NXBE_SETBLOCKED(wnd) do { (wnd)->flags |= NXBE_WINDOW_BLOCKED; } while (0)
|
||||
#define NXBE_WINDOW_BLOCKED (1 << 0) /* The window is blocked and will not
|
||||
* receive further input. */
|
||||
#define NXBE_WINDOW_RAMBACKED (1 << 1) /* Window is backed by a framebuffer */
|
||||
|
||||
#ifdef CONFIG_NX_RAMBACKED
|
||||
# define NXBE_WINDOW_USER NXBE_WINDOW_RAMBACKED
|
||||
#else
|
||||
# define NXBE_WINDOW_USER 0
|
||||
#endif
|
||||
|
||||
#define NXBE_ISBLOCKED(wnd) \
|
||||
(((wnd)->flags & NXBE_WINDOW_BLOCKED) != 0)
|
||||
#define NXBE_SETBLOCKED(wnd) \
|
||||
do { (wnd)->flags |= NXBE_WINDOW_BLOCKED; } while (0)
|
||||
|
||||
#define NXBE_ISRAMBACKED(wnd) \
|
||||
(((wnd)->flags & NXBE_WINDOW_RAMBACKED) != 0)
|
||||
#define NXBE_SETRAMBACKED(wnd) \
|
||||
do { (wnd)->flags |= NXBE_WINDOW_RAMBACKED; } while (0)
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* include/nuttx/nx/nxmu.h
|
||||
*
|
||||
* Copyright (C) 2008-2013 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2008-2013, 2019 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* include/nuttx/nx/nxtk.h
|
||||
*
|
||||
* Copyright (C) 2008-2012, 2015 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2008-2012, 2015, 2019 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -122,6 +122,9 @@ extern "C"
|
||||
*
|
||||
* Input Parameters:
|
||||
* handle - The handle returned by nx_connect
|
||||
* flags - Optional flags. Must be zero unless CONFIG_NX_RAMBACKED is
|
||||
* enabled. In that case, it may be zero or
|
||||
* NXBE_WINDOW_RAMBACKED
|
||||
* cb - Callbacks used to process window events
|
||||
* arg - User provided value that will be returned with NXTK callbacks.
|
||||
*
|
||||
@@ -131,8 +134,9 @@ extern "C"
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
NXTKWINDOW nxtk_openwindow(NXHANDLE handle,
|
||||
FAR const struct nx_callback_s *cb, FAR void *arg);
|
||||
NXTKWINDOW nxtk_openwindow(NXHANDLE handle, uint8_t flags,
|
||||
FAR const struct nx_callback_s *cb,
|
||||
FAR void *arg);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nxtk_closewindow
|
||||
|
||||
Reference in New Issue
Block a user