NX console should only be available if NX multi-user mode is enabled

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4535 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2012-03-28 17:19:17 +00:00
parent 0118856491
commit 0c4acf3a3f
5 changed files with 30 additions and 15 deletions

View File

@ -374,6 +374,9 @@ nx11
-CONFIG_NXCONSOLE=n
+CONFIG_NXCONSOLE=y
-CONFIG_NX_MULTIUSER=n
+CONFIG_NX_MULTIUSER=y
Comment out the following in the appconfig file:
-CONFIGURED_APPS += examples/nx

View File

@ -1,7 +1,7 @@
############################################################################
# graphics/nxmu/Make.defs
#
# Copyright (C) 2008, 2011 Gregory Nutt. All rights reserved.
# Copyright (C) 2008, 2011-2012 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
@ -36,10 +36,10 @@
NX_ASRCS =
NXAPI_CSRCS = nx_bitmap.c nx_closewindow.c nx_connect.c nx_disconnect.c \
nx_eventhandler.c nx_eventnotify.c nx_fill.c nx_filltrapezoid.c \
nx_getposition.nx_getrectanble.c nx_kbdchin.c nx_kbdin.c nx_lower.c \
nx_getposition.c nx_getrectangle.c nx_kbdchin.c nx_kbdin.c nx_lower.c \
nx_mousein.c nx_move.c nx_openwindow.c nx_raise.c \
nx_releasebkgd.c nx_requestbkgd.c nx_setpixel.c nx_setsize.c \
nx_setbgcolor.c nx_setposition.c nx_drawcircle.c nx_drawline.c
nx_setbgcolor.c nx_setposition.c nx_drawcircle.c nx_drawline.c \
nx_fillcircle.c
NXMU_CSRCS = nxmu_constructwindow.c nxmu_kbdin.c nxmu_mouse.c \
nxmu_openwindow.c nxmu_redrawreq.c nxmu_releasebkgd.c \

View File

@ -85,12 +85,12 @@
* col - The color to use in the set
*
* Return:
* None
* OK on success; ERROR on failure with errno set appropriately
*
****************************************************************************/
void nx_setpixel(NXWINDOW hwnd, FAR const struct nxgl_point_s *pos,
nxgl_mxpixel_t color[CONFIG_NX_NPLANES])
int nx_setpixel(NXWINDOW hwnd, FAR const struct nxgl_point_s *pos,
nxgl_mxpixel_t color[CONFIG_NX_NPLANES])
{
FAR struct nxbe_window_s *wnd = (FAR struct nxbe_window_s *)hwnd;
struct nxsvrmsg_setpixel_s outmsg;
@ -99,7 +99,7 @@ void nx_setpixel(NXWINDOW hwnd, FAR const struct nxgl_point_s *pos,
#ifdef CONFIG_DEBUG
if (!wnd || !wnd->conn || !pos || !color)
{
errno = EINVAL;
set_errno(EINVAL);
return ERROR;
}
#endif
@ -108,8 +108,9 @@ void nx_setpixel(NXWINDOW hwnd, FAR const struct nxgl_point_s *pos,
outmsg.msgid = NX_SVRMSG_SETPIXEL;
outmsg.wnd = wnd;
outmsg.pos.x = pos->x;
outmsg.pos.y = pos->y;
nxgl_vectcopy(&outmsg.pos, pos);
nxgl_colorcopy(outmsg.color, color);
/* Forward the fill command to the server */

View File

@ -1,7 +1,7 @@
/****************************************************************************
* graphics/nxmu/nxmu_server.c
*
* Copyright (C) 2008-2011 Gregory Nutt. All rights reserved.
* Copyright (C) 2008-2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@ -180,9 +180,8 @@ static inline void nxmu_shutdown(FAR struct nxfe_state_s *fe)
* Name: nxmu_setup
****************************************************************************/
static inline int nxmu_lcdsetup(FAR const char *mqname,
FAR NX_DRIVERTYPE *dev,
FAR struct nxfe_state_s *fe)
static inline int nxmu_setup(FAR const char *mqname, FAR NX_DRIVERTYPE *dev,
FAR struct nxfe_state_s *fe)
{
struct mq_attr attr;
int ret;
@ -435,8 +434,8 @@ int nx_runinstance(FAR const char *mqname, FAR NX_DRIVERTYPE *dev)
case NX_SVRMSG_SETPIXEL: /* Set a single pixel in the window with a color */
{
FAR struct nxsvrmsg_setpixel_s *setmsg = (FAR struct nxsvrmsg_fill_s *)buffer;
nxbe_setpixel(fillmsg->wnd, &setmsg->pos, setmsg->color);
FAR struct nxsvrmsg_setpixel_s *setmsg = (FAR struct nxsvrmsg_setpixel_s *)buffer;
nxbe_setpixel(setmsg->wnd, &setmsg->pos, setmsg->color);
}
break;

View File

@ -51,7 +51,19 @@
* Pre-processor definitions
****************************************************************************/
/* Configuration ************************************************************/
/* CONFIG_NXCONSOLE
/* Nx Console prerequistes */
#ifndef CONFIG_NX
# warning "NX is not enabled (CONFIG_NX)
#endif
#ifndef CONFIG_NX_MULTIUSER
# warning "NX Console requires multi-user support (CONFIG_NX_MULTIUSER)"
#endif
/* Nx Console configuration options:
*
* CONFIG_NXCONSOLE
* Enables building of the NxConsole driver.
* CONFIG_NXCONSOLE_BPP
* Currently, NxConsole supports only a single pixel depth. This