From fd4dd86fe8de2ddda1e8723973e8b5774528ebb7 Mon Sep 17 00:00:00 2001 From: patacongo Date: Tue, 1 May 2012 20:36:19 +0000 Subject: More NxWM support git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4682 42af7a65-404d-4744-a932-0658087f49c3 --- NxWidgets/libnxwidgets/include/cnxserver.hxx | 20 +++++++++---- NxWidgets/libnxwidgets/include/nxconfig.hxx | 44 +++++++++++++++++++++------- 2 files changed, 48 insertions(+), 16 deletions(-) (limited to 'NxWidgets/libnxwidgets/include') diff --git a/NxWidgets/libnxwidgets/include/cnxserver.hxx b/NxWidgets/libnxwidgets/include/cnxserver.hxx index 3043fd9e0..c6ca21bfc 100644 --- a/NxWidgets/libnxwidgets/include/cnxserver.hxx +++ b/NxWidgets/libnxwidgets/include/cnxserver.hxx @@ -44,6 +44,7 @@ #include #include +#include #include @@ -79,21 +80,28 @@ namespace NXWidgets class CNxServer { private: -#ifndef CONFIG_NX_MULTIUSER FAR NX_DRIVERTYPE *m_hDevice; /**< LCD/Framebuffer device handle */ -#endif NXHANDLE m_hNxServer; /**< NX server handle */ #ifdef CONFIG_NX_MULTIUSER - voilatile bool m_running; /**< True: The listener thread is running */ - voilatile bool m_connected; /**< True: Connected to the server */ + volatile bool m_running; /**< True: The listener thread is running */ + volatile bool m_connected; /**< True: Connected to the server */ volatile bool m_stop; /**< True: Waiting for the listener thread to stop */ sem_t m_connsem; /**< Wait for server connection */ #endif static uint8_t m_nServers; /**< The number of NX server instances */ /** - * This is the entry point of a thread that listeners for and dispatches - * events from the NX server. + * NX server thread. This is the entry point into the server thread that + * serializes the multi-threaded accesses to the display. + */ + +#ifdef CONFIG_NX_MULTIUSER + static int server(int argc, char *argv[]); +#endif + + /** + * NX listener thread. This is the entry point of a thread that listeners for and + * dispatches events from the NX server. */ #ifdef CONFIG_NX_MULTIUSER diff --git a/NxWidgets/libnxwidgets/include/nxconfig.hxx b/NxWidgets/libnxwidgets/include/nxconfig.hxx index 2f38c7c26..682eadb82 100644 --- a/NxWidgets/libnxwidgets/include/nxconfig.hxx +++ b/NxWidgets/libnxwidgets/include/nxconfig.hxx @@ -52,13 +52,20 @@ * Pre-Processor Definitions ****************************************************************************/ /* NX Configuration *********************************************************/ +/** + * C++ support is required + */ + +#ifndef CONFIG_HAVE_CXX +# error "C++ support is required (CONFIG_HAVE_CXX)" +#endif /** * Required to enabled NX graphics support */ #ifndef CONFIG_NX -# error "NX mouse/touchscreen support is required (CONFIG_NX_MOUSE)" +# error "NX graphics support is required (CONFIG_NX)" #endif /** @@ -112,7 +119,19 @@ */ #ifndef CONFIG_NXWIDGETS_SERVERPRIO -# define CONFIG_NXWIDGETS_SERVERPRIO 50 +# define CONFIG_NXWIDGETS_SERVERPRIO SCHED_PRIORITY_DEFAULT +#endif + +#ifndef CONFIG_NXWIDGETS_CLIENTPRIO +# define CONFIG_NXWIDGETS_CLIENTPRIO SCHED_PRIORITY_DEFAULT +#endif + +/** + * NX server thread stack size (in multi-user mode) + */ + +#ifndef CONFIG_NXWIDGETS_SERVERSTACK +# define CONFIG_NXWIDGETS_SERVERSTACK 2048 #endif /** @@ -120,30 +139,35 @@ */ #ifndef CONFIG_NXWIDGETS_LISTENERPRIO -# define CONFIG_NXWIDGETS_LISTENERPRIO 50 +# define CONFIG_NXWIDGETS_LISTENERPRIO SCHED_PRIORITY_DEFAULT #endif /** - * NX server/listener thread stack size (in multi-user mode) + * NX listener thread stack size (in multi-user mode) */ -#ifndef CONFIG_NXWIDGETS_STACKSIZE -# define CONFIG_NXWIDGETS_STACKSIZE 4096 +#ifndef CONFIG_NXWIDGETS_LISTENERSTACK +# define CONFIG_NXWIDGETS_LISTENERSTACK 2048 #endif /* NXWidget Configuration ***************************************************/ -/* NX Server/Device Configuration +/** + * NX Server/Device Configuration * * CONFIG_NXWIDGETS_DEVNO - LCD device number (in case there are more than * one LCDs connected. Default: 0 * CONFIG_NXWIDGETS_VPLANE - Only a single video plane is supported. Default: 0 * CONFIG_NXWIDGETS_SERVERPRIO - Priority of the NX server (in multi-user mode). * Default: 50 - * CONFIG_NXWIDGETS_SERVERPRIO + * CONFIG_NXWIDGETS_CLIENTPRIO * CONFIG_NXWIDGETS_LISTENERPRIO - Priority of the NX event listener thread (in * multi-user mode). Default: 50 - * CONFIG_NXWIDGETS_STACKSIZE - Priority of the NX server/listener thread - * stack size (in multi-user mode). Default: 4096 + * CONFIG_NXWIDGETS_EXTERNINIT - Define to support external display + * initialization. + * CONFIG_NXWIDGETS_SERVERSTACK - NX server thread stack size (in multi-user + * mode). Default 2048 + * CONFIG_NXWIDGETS_LISTENERSTACK - NX listener thread stack size (in multi-user + * mode). Default 2048 * * NXWidget Configuration * -- cgit v1.2.3