summaryrefslogtreecommitdiff
path: root/nuttx/graphics/nxbe/nxbe.h
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-05-17 22:16:02 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-05-17 22:16:02 +0000
commitd53035bc78b3fbbd640a6a7535b9cdf7ca0d9667 (patch)
tree166f99f4788c23b3649826405468b34f475d4726 /nuttx/graphics/nxbe/nxbe.h
parentb1bbea743d6eef38eebf9975a3b19bbfb7e71233 (diff)
downloadpx4-nuttx-d53035bc78b3fbbd640a6a7535b9cdf7ca0d9667.tar.gz
px4-nuttx-d53035bc78b3fbbd640a6a7535b9cdf7ca0d9667.tar.bz2
px4-nuttx-d53035bc78b3fbbd640a6a7535b9cdf7ca0d9667.zip
Implement an NX interface to block flush message queues in multi-user mode. This is necessary to prevent stale window handles when a window is closed
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4745 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/graphics/nxbe/nxbe.h')
-rw-r--r--nuttx/graphics/nxbe/nxbe.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/nuttx/graphics/nxbe/nxbe.h b/nuttx/graphics/nxbe/nxbe.h
index 089196fdd..aff42d6b3 100644
--- a/nuttx/graphics/nxbe/nxbe.h
+++ b/nuttx/graphics/nxbe/nxbe.h
@@ -62,6 +62,7 @@
# define CONFIG_NX_NCOLORS 256
#endif
+/* NXBE Definitions *********************************************************/
/* These are the values for the clipping order provided to nx_clipper */
#define NX_CLIPORDER_TLRB (0) /* Top-left-right-bottom */
@@ -70,6 +71,14 @@
#define NX_CLIPORDER_BRLT (3) /* Bottom-right-left-top */
#define NX_CLIPORDER_DEFAULT NX_CLIPORDER_TLRB
+/* Window flags and helper macros */
+
+#define NXBE_WINDOW_BLOCKED (1 << 0) /* The window is blocked and will not
+ * receive further input. */
+
+#define NXBE_ISBLOCKED(wnd) (((wnd)->flags & NXBE_WINDOW_BLOCKED) != 0)
+#define NXBE_SETBLOCKED(wnd) do { (wnd)->flags |= NXBE_WINDOW_BLOCKED; } while (0)
+
/****************************************************************************
* Public Types
****************************************************************************/
@@ -157,6 +166,12 @@ struct nxbe_window_s
struct nxgl_rect_s bounds; /* The bounding rectangle of window */
+ /* Window flags (see the NXBE_* bit definitions above) */
+
+#ifdef CONFIG_NX_MULTIUSER /* Currently used only in multi-user mode */
+ uint8_t flags;
+#endif
+
/* Client state information this is provide in window callbacks */
FAR void *arg;