From d53035bc78b3fbbd640a6a7535b9cdf7ca0d9667 Mon Sep 17 00:00:00 2001 From: patacongo Date: Thu, 17 May 2012 22:16:02 +0000 Subject: 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 --- nuttx/graphics/nxbe/nxbe.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'nuttx/graphics/nxbe/nxbe.h') 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; -- cgit v1.2.3