nuttx-apps/include/graphics/twm4nx/twm4nx_config.hxx

477 lines
14 KiB
C++
Raw Normal View History

wm4Nx is a port of twm, Tab Window Manager (or Tom's Window Manager) version 1.0.10 to NuttX NX windows server. No, a port is not the right word. It is a re-design of TWM from the inside out to work with the NuttX NX server. The name Twm4Nx reflects this legacy. But Twm4Nx is more a homage to TWM than a port of TWM. The original TWM was based on X11 which provides a rich set of features. TWM provided titlebars, shaped windows, several forms of icon management, user-defined macro functions, click-to-type and pointer-driven keyboard focus, graphic contexts, and user-specified key and pointer button bindings, etc. Twm4Nx, on the other hand is based on the NuttX NX server which provides comparatively minimal support. Additional drawing support comes from the NuttX NxWidgets library (which necessitated the change to C++). Twm4Nx is greatly stripped down and targeted on small embedded systems with minimal resources. For example, no assumption is made about the availability of a file system; no .twmrc file is used. Bitmaps are not used (other than for fonts). The TWM license is, I believe compatible with the BSD license used by NuttX. The origin TWM license required notice of copyrights within each file and a full copy of the original license which you can find in the COPYING file. within this directory. STATUS: This port was brutal. Much TWM logic was removed because it depending on X11 features (or just because I could not understand how to use it). The logic is partial. A lot more needs to be done to have a complete system (hence, it is marked EXPERIMENTAL). The kinds of things that need to done are: 1. Update some logic that is only fragmentary for how like resizing, and menus. 2. Integrate NxWidgets into the windows: The resize menu needs a CLabel, the menus are CListBox'es, but not completely integrated, the Icon Manager needs to be a button array. 3. Resit Icons. They are windows now, but need to be compound widgets lying on the background. 4. Widget events are only partially integrated. A lot more needs to be done. A partial change to thoe event system that hints at the redesign is in place but it is far from complete.
2019-04-26 00:54:17 +02:00
/////////////////////////////////////////////////////////////////////////////
// apps/graphics/twm4nx/include/twm4nx_config.hxx
// Twm4Nx configuration settings
//
// Copyright (C) 2019 Gregory Nutt. All rights reserved.
// Author: Gregory Nutt <gnutt@nuttx.org>
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in
// the documentation and/or other materials provided with the
// distribution.
// 3. Neither the name NuttX nor the names of its contributors may be
// used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
/////////////////////////////////////////////////////////////////////////////
#ifndef __APPS_INCLUDE_GRAPHICS_TWM4NX_TWM4NX_CONFIG_HXX
#define __APPS_INCLUDE_GRAPHICS_TWM4NX_TWM4NX_CONFIG_HXX
/////////////////////////////////////////////////////////////////////////////
// Included Files
/////////////////////////////////////////////////////////////////////////////
#include <nuttx/config.h>
#include <debug.h>
wm4Nx is a port of twm, Tab Window Manager (or Tom's Window Manager) version 1.0.10 to NuttX NX windows server. No, a port is not the right word. It is a re-design of TWM from the inside out to work with the NuttX NX server. The name Twm4Nx reflects this legacy. But Twm4Nx is more a homage to TWM than a port of TWM. The original TWM was based on X11 which provides a rich set of features. TWM provided titlebars, shaped windows, several forms of icon management, user-defined macro functions, click-to-type and pointer-driven keyboard focus, graphic contexts, and user-specified key and pointer button bindings, etc. Twm4Nx, on the other hand is based on the NuttX NX server which provides comparatively minimal support. Additional drawing support comes from the NuttX NxWidgets library (which necessitated the change to C++). Twm4Nx is greatly stripped down and targeted on small embedded systems with minimal resources. For example, no assumption is made about the availability of a file system; no .twmrc file is used. Bitmaps are not used (other than for fonts). The TWM license is, I believe compatible with the BSD license used by NuttX. The origin TWM license required notice of copyrights within each file and a full copy of the original license which you can find in the COPYING file. within this directory. STATUS: This port was brutal. Much TWM logic was removed because it depending on X11 features (or just because I could not understand how to use it). The logic is partial. A lot more needs to be done to have a complete system (hence, it is marked EXPERIMENTAL). The kinds of things that need to done are: 1. Update some logic that is only fragmentary for how like resizing, and menus. 2. Integrate NxWidgets into the windows: The resize menu needs a CLabel, the menus are CListBox'es, but not completely integrated, the Icon Manager needs to be a button array. 3. Resit Icons. They are windows now, but need to be compound widgets lying on the background. 4. Widget events are only partially integrated. A lot more needs to be done. A partial change to thoe event system that hints at the redesign is in place but it is far from complete.
2019-04-26 00:54:17 +02:00
#include "graphics/nxglyphs.hxx"
#include "graphics/nxwidgets/nxconfig.hxx"
#include "graphics/nxwidgets/crlepalettebitmap.hxx"
/////////////////////////////////////////////////////////////////////////////
// Pre-Processor Definitions
/////////////////////////////////////////////////////////////////////////////
// Debug ////////////////////////////////////////////////////////////////////
#ifdef CONFIG_TWM4NX_DEBUG
# define twminfo(format, ...) _info(format, ##__VA_ARGS__)
# define twmwarn(format, ...) _warn(format, ##__VA_ARGS__)
# define twmerr(format, ...) _err(format, ##__VA_ARGS__)
#else
# define twminfo(format, ...) ginfo(format, ##__VA_ARGS__)
# define twmwarn(format, ...) gwarn(format, ##__VA_ARGS__)
# define twmerr(format, ...) gerr(format, ##__VA_ARGS__)
#endif
wm4Nx is a port of twm, Tab Window Manager (or Tom's Window Manager) version 1.0.10 to NuttX NX windows server. No, a port is not the right word. It is a re-design of TWM from the inside out to work with the NuttX NX server. The name Twm4Nx reflects this legacy. But Twm4Nx is more a homage to TWM than a port of TWM. The original TWM was based on X11 which provides a rich set of features. TWM provided titlebars, shaped windows, several forms of icon management, user-defined macro functions, click-to-type and pointer-driven keyboard focus, graphic contexts, and user-specified key and pointer button bindings, etc. Twm4Nx, on the other hand is based on the NuttX NX server which provides comparatively minimal support. Additional drawing support comes from the NuttX NxWidgets library (which necessitated the change to C++). Twm4Nx is greatly stripped down and targeted on small embedded systems with minimal resources. For example, no assumption is made about the availability of a file system; no .twmrc file is used. Bitmaps are not used (other than for fonts). The TWM license is, I believe compatible with the BSD license used by NuttX. The origin TWM license required notice of copyrights within each file and a full copy of the original license which you can find in the COPYING file. within this directory. STATUS: This port was brutal. Much TWM logic was removed because it depending on X11 features (or just because I could not understand how to use it). The logic is partial. A lot more needs to be done to have a complete system (hence, it is marked EXPERIMENTAL). The kinds of things that need to done are: 1. Update some logic that is only fragmentary for how like resizing, and menus. 2. Integrate NxWidgets into the windows: The resize menu needs a CLabel, the menus are CListBox'es, but not completely integrated, the Icon Manager needs to be a button array. 3. Resit Icons. They are windows now, but need to be compound widgets lying on the background. 4. Widget events are only partially integrated. A lot more needs to be done. A partial change to thoe event system that hints at the redesign is in place but it is far from complete.
2019-04-26 00:54:17 +02:00
// General Configuration ////////////////////////////////////////////////////
/**
* Required settings:
*
* CONFIG_HAVE_CXX : C++ support is required
* CONFIG_NX : NX must enabled
* CONFIG_NXTERM=y : For NxTerm support
*/
#ifndef CONFIG_HAVE_CXX
# error "C++ support is required (CONFIG_HAVE_CXX)"
#endif
/**
* NX Multi-user support is required
*/
#ifndef CONFIG_NX
# error "NX support is required (CONFIG_NX)"
#endif
/**
* NxTerm support is (probably) required to support NxTWM terminals
*/
#if defined(CONFIG_TWM4NX_NXTERM) && !defined(CONFIG_NXTERM)
# warning "NxTerm support may be needed (CONFIG_NXTERM)"
#endif
// Background ///////////////////////////////////////////////////////////////
/**
* CONFIG_TWM4NX_DEFAULT_BACKGROUNDCOLOR - Normal background color. Default:
* MKRGB(148,189,215)
* CONFIG_TWM4NX_BACKGROUND_IMAGE - The name of the image to use in the
* background window. Default:NXWidgets::g_nuttxBitmap160x160
*/
#ifndef CONFIG_TWM4NX_BACKGROUND_IMAGE
# define CONFIG_TWM4NX_BACKGROUND_IMAGE NXWidgets::g_nuttxBitmap160x160
#endif
// Windows //////////////////////////////////////////////////////////////////
// Toolbar /////////////////////////////////////////////////////////////////
/**
* Toolbar Icons. The Title bar contains (from left to right):
*
* 1. Menu button
* 2. Window title (text)
* 3. Minimize (Iconify) button
* 4. Resize button
* 5. Delete button
*
* There is no focus indicator
*/
#ifndef CONFIG_TWM4NX_MENU_IMAGE
# define CONFIG_TWM4NX_MENU_IMAGE NXWidgets::g_menuBitmap
#endif
#ifndef CONFIG_TWM4NX_MINIMIZE_IMAGE
# define CONFIG_TWM4NX_MINIMIZE_IMAGE NXWidgets::g_minimizeBitmap
#endif
#ifndef CONFIG_TWM4NX_RESIZE_IMAGE
# define CONFIG_TWM4NX_RESIZE_IMAGE NXWidgets::g_resizeBitmap
#endif
#ifndef CONFIG_TWM4NX_TERMINATE_IMAGE
# define CONFIG_TWM4NX_TERMINATE_IMAGE NXWidgets::g_stopBitmap
#endif
#ifndef CONFIG_TWM4NX_ICONMGR_IMAGE
# define CONFIG_TWM4NX_ICONMGR_IMAGE NXWidgets::g_nxiconBitmap
#endif
// Spacing. Defaults values good at 75 and 100 DPI
#ifndef CONFIG_TWM4NX_TOOLBAR_HSPACING
# define CONFIG_TWM4NX_TOOLBAR_HSPACING 2
wm4Nx is a port of twm, Tab Window Manager (or Tom's Window Manager) version 1.0.10 to NuttX NX windows server. No, a port is not the right word. It is a re-design of TWM from the inside out to work with the NuttX NX server. The name Twm4Nx reflects this legacy. But Twm4Nx is more a homage to TWM than a port of TWM. The original TWM was based on X11 which provides a rich set of features. TWM provided titlebars, shaped windows, several forms of icon management, user-defined macro functions, click-to-type and pointer-driven keyboard focus, graphic contexts, and user-specified key and pointer button bindings, etc. Twm4Nx, on the other hand is based on the NuttX NX server which provides comparatively minimal support. Additional drawing support comes from the NuttX NxWidgets library (which necessitated the change to C++). Twm4Nx is greatly stripped down and targeted on small embedded systems with minimal resources. For example, no assumption is made about the availability of a file system; no .twmrc file is used. Bitmaps are not used (other than for fonts). The TWM license is, I believe compatible with the BSD license used by NuttX. The origin TWM license required notice of copyrights within each file and a full copy of the original license which you can find in the COPYING file. within this directory. STATUS: This port was brutal. Much TWM logic was removed because it depending on X11 features (or just because I could not understand how to use it). The logic is partial. A lot more needs to be done to have a complete system (hence, it is marked EXPERIMENTAL). The kinds of things that need to done are: 1. Update some logic that is only fragmentary for how like resizing, and menus. 2. Integrate NxWidgets into the windows: The resize menu needs a CLabel, the menus are CListBox'es, but not completely integrated, the Icon Manager needs to be a button array. 3. Resit Icons. They are windows now, but need to be compound widgets lying on the background. 4. Widget events are only partially integrated. A lot more needs to be done. A partial change to thoe event system that hints at the redesign is in place but it is far from complete.
2019-04-26 00:54:17 +02:00
#endif
#ifndef CONFIG_TWM4NX_FRAME_VSPACING
# define CONFIG_TWM4NX_FRAME_VSPACING 2
wm4Nx is a port of twm, Tab Window Manager (or Tom's Window Manager) version 1.0.10 to NuttX NX windows server. No, a port is not the right word. It is a re-design of TWM from the inside out to work with the NuttX NX server. The name Twm4Nx reflects this legacy. But Twm4Nx is more a homage to TWM than a port of TWM. The original TWM was based on X11 which provides a rich set of features. TWM provided titlebars, shaped windows, several forms of icon management, user-defined macro functions, click-to-type and pointer-driven keyboard focus, graphic contexts, and user-specified key and pointer button bindings, etc. Twm4Nx, on the other hand is based on the NuttX NX server which provides comparatively minimal support. Additional drawing support comes from the NuttX NxWidgets library (which necessitated the change to C++). Twm4Nx is greatly stripped down and targeted on small embedded systems with minimal resources. For example, no assumption is made about the availability of a file system; no .twmrc file is used. Bitmaps are not used (other than for fonts). The TWM license is, I believe compatible with the BSD license used by NuttX. The origin TWM license required notice of copyrights within each file and a full copy of the original license which you can find in the COPYING file. within this directory. STATUS: This port was brutal. Much TWM logic was removed because it depending on X11 features (or just because I could not understand how to use it). The logic is partial. A lot more needs to be done to have a complete system (hence, it is marked EXPERIMENTAL). The kinds of things that need to done are: 1. Update some logic that is only fragmentary for how like resizing, and menus. 2. Integrate NxWidgets into the windows: The resize menu needs a CLabel, the menus are CListBox'es, but not completely integrated, the Icon Manager needs to be a button array. 3. Resit Icons. They are windows now, but need to be compound widgets lying on the background. 4. Widget events are only partially integrated. A lot more needs to be done. A partial change to thoe event system that hints at the redesign is in place but it is far from complete.
2019-04-26 00:54:17 +02:00
#endif
#ifndef CONFIG_TWM4NX_BUTTON_INDENT
# define CONFIG_TWM4NX_BUTTON_INDENT 1
wm4Nx is a port of twm, Tab Window Manager (or Tom's Window Manager) version 1.0.10 to NuttX NX windows server. No, a port is not the right word. It is a re-design of TWM from the inside out to work with the NuttX NX server. The name Twm4Nx reflects this legacy. But Twm4Nx is more a homage to TWM than a port of TWM. The original TWM was based on X11 which provides a rich set of features. TWM provided titlebars, shaped windows, several forms of icon management, user-defined macro functions, click-to-type and pointer-driven keyboard focus, graphic contexts, and user-specified key and pointer button bindings, etc. Twm4Nx, on the other hand is based on the NuttX NX server which provides comparatively minimal support. Additional drawing support comes from the NuttX NxWidgets library (which necessitated the change to C++). Twm4Nx is greatly stripped down and targeted on small embedded systems with minimal resources. For example, no assumption is made about the availability of a file system; no .twmrc file is used. Bitmaps are not used (other than for fonts). The TWM license is, I believe compatible with the BSD license used by NuttX. The origin TWM license required notice of copyrights within each file and a full copy of the original license which you can find in the COPYING file. within this directory. STATUS: This port was brutal. Much TWM logic was removed because it depending on X11 features (or just because I could not understand how to use it). The logic is partial. A lot more needs to be done to have a complete system (hence, it is marked EXPERIMENTAL). The kinds of things that need to done are: 1. Update some logic that is only fragmentary for how like resizing, and menus. 2. Integrate NxWidgets into the windows: The resize menu needs a CLabel, the menus are CListBox'es, but not completely integrated, the Icon Manager needs to be a button array. 3. Resit Icons. They are windows now, but need to be compound widgets lying on the background. 4. Widget events are only partially integrated. A lot more needs to be done. A partial change to thoe event system that hints at the redesign is in place but it is far from complete.
2019-04-26 00:54:17 +02:00
#endif
#ifndef CONFIG_TWM4NX_ICONMGR_VSPACING
# define CONFIG_TWM4NX_ICONMGR_VSPACING 2
#endif
#ifndef CONFIG_TWM4NX_ICONMGR_HSPACING
# define CONFIG_TWM4NX_ICONMGR_HSPACING 2
#endif
// Menus ////////////////////////////////////////////////////////////////////
/**
* CONFIG_TWM4NX_MENU_IMAGE. Menu image (see toolbar icons)
*/
// Colors ///////////////////////////////////////////////////////////////////
/* Colors *******************************************************************/
/**
* Color configuration
*
* CONFIG_TWM4NX_DEFAULT_BACKGROUNDCOLOR - Normal background color. Default:
* MKRGB(148,189,215)
* CONFIG_TWM4NX_DEFAULT_SELECTEDBACKGROUNDCOLOR - Select background color.
* Default: MKRGB(206,227,241)
* CONFIG_TWM4NX_DEFAULT_SHINEEDGECOLOR - Color of the bright edge of a border.
* Default: MKRGB(255,255,255)
* CONFIG_TWM4NX_DEFAULT_SHADOWEDGECOLOR - Color of the shadowed edge of a border.
* Default: MKRGB(0,0,0)
* CONFIG_TWM4NX_DEFAULT_FONTCOLOR - Default font color. Default:
* MKRGB(0,0,0)
* CONFIG_TWM4NX_TRANSPARENT_COLOR - The "transparent" color. Default:
* MKRGB(0,0,0)
*/
/**
* Normal background color
*/
#ifndef CONFIG_TWM4NX_DEFAULT_BACKGROUNDCOLOR
# define CONFIG_TWM4NX_DEFAULT_BACKGROUNDCOLOR MKRGB(148,189,215)
#endif
/**
* Default selected background color
*/
#ifndef CONFIG_TWM4NX_DEFAULT_SELECTEDBACKGROUNDCOLOR
# define CONFIG_TWM4NX_DEFAULT_SELECTEDBACKGROUNDCOLOR MKRGB(206,227,241)
#endif
/**
* Border colors
*/
#ifndef CONFIG_TWM4NX_DEFAULT_SHINEEDGECOLOR
# define CONFIG_TWM4NX_DEFAULT_SHINEEDGECOLOR MKRGB(248,248,248)
#endif
#ifndef CONFIG_TWM4NX_DEFAULT_SHADOWEDGECOLOR
# define CONFIG_TWM4NX_DEFAULT_SHADOWEDGECOLOR MKRGB(35,58,73)
#endif
/**
* The default font color
*/
#ifndef CONFIG_TWM4NX_DEFAULT_FONTCOLOR
# define CONFIG_TWM4NX_DEFAULT_FONTCOLOR MKRGB(255,255,255)
#endif
/**
* The transparent color
*/
#ifndef CONFIG_TWM4NX_TRANSPARENT_COLOR
# define CONFIG_TWM4NX_TRANSPARENT_COLOR MKRGB(0,0,0)
#endif
// Toolbar Configuration ////////////////////////////////////////////////////
/**
* CONFIG_TWM4NX_TOOLBAR_HEIGHT. The height of the tool bar in each
* application window. At present, all icons are 21 or 42 pixels in height
* (depending on the setting of CONFIG_TWM4NX_LARGE_ICONS) and, hence require
* a task bar of at least that size.
*/
#ifndef CONFIG_TWM4NX_TOOLBAR_HEIGHT
# define CONFIG_TWM4NX_TOOLBAR_HEIGHT \
(CONFIG_TWM4NX_TASKBAR_ICONHEIGHT + 2 * CONFIG_TWM4NX_TASKBAR_HSPACING)
#endif
/* CONFIG_TWM4NX_TOOLBAR_FONTID overrides the default Twm4Nx font selection */
#ifndef CONFIG_TWM4NX_TOOLBAR_FONTID
# define CONFIG_TWM4NX_TOOLBAR_FONTID CONFIG_TWM4NX_DEFAULT_FONTID
#endif
// Background Image //////////////////////////////////////////////////////////
/**
* CONFIG_TWM4NX_BACKGROUND_IMAGE - The name of the image to use in the
* background window. Default:NXWidgets::g_nuttxBitmap160x160
*/
#ifndef CONFIG_TWM4NX_BACKGROUND_IMAGE
# define CONFIG_TWM4NX_BACKGROUND_IMAGE NXWidgets::g_nuttxBitmap160x160
#endif
// Cursor ////////////////////////////////////////////////////////////////////
// Cursor Images
#ifndef CONFIG_TWM4NX_CURSOR_IMAGE // The normal cursor image
# define CONFIG_TWM4NX_CURSOR_IMAGE g_arrow1Cursor
#endif
#ifndef CONFIG_TWM4NX_GBCURSOR_IMAGE // Grab cursor image
# define CONFIG_TWM4NX_GBCURSOR_IMAGE g_grabCursor
#endif
#ifndef CONFIG_TWM4NX_WTCURSOR_IMAGE // Wait cursor image
# define CONFIG_TWM4NX_WTCURSOR_IMAGE g_waitCursor
#endif
// Fonts /////////////////////////////////////////////////////////////////////
// Font IDs
#ifndef CONFIG_TWM4NX_TITLE_FONTID
# define CONFIG_TWM4NX_TITLE_FONTID NXFONT_DEFAULT
#endif
#ifndef CONFIG_TWM4NX_MENU_FONTID
# define CONFIG_TWM4NX_MENU_FONTID NXFONT_DEFAULT
#endif
#ifndef CONFIG_TWM4NX_ICON_FONTID
# define CONFIG_TWM4NX_ICON_FONTID NXFONT_DEFAULT
#endif
#ifndef CONFIG_TWM4NX_SIZE_FONTID
# define CONFIG_TWM4NX_SIZE_FONTID NXFONT_DEFAULT
#endif
#ifndef CONFIG_TWM4NX_ICONMGR_SIZEFONTID
# define CONFIG_TWM4NX_ICONMGR_SIZEFONTID NXFONT_DEFAULT
#endif
// Font Colors
#ifndef CONFIG_TWM4NX_TITLE_FONTCOLOR
# define CONFIG_TWM4NX_TITLE_FONTCOLOR MKRGB(0,64,0)
#endif
#ifndef CONFIG_TWM4NX_MENU_FONTCOLOR
# define CONFIG_TWM4NX_MENU_FONTCOLOR MKRGB(0,64,0)
#endif
#ifndef CONFIG_TWM4NX_ICON_FONTCOLOR
# define CONFIG_TWM4NX_ICON_FONTCOLOR MKRGB(0,64,0)
#endif
#ifndef CONFIG_TWM4NX_SIZE_FONTCOLOR
# define CONFIG_TWM4NX_SIZE_FONTCOLOR MKRGB(0,64,0)
#endif
#ifndef CONFIG_TWM4NX_ICONMGR_FONTCOLOR
# define CONFIG_TWM4NX_ICONMGR_FONTCOLOR MKRGB(0,64,0)
#endif
#ifndef CONFIG_TWM4NX_DEFAULT_FONTCOLOR
# define CONFIG_TWM4NX_DEFAULT_FONTCOLOR MKRGB(0,64,0)
#endif
// NxTerm Window /////////////////////////////////////////////////////////////
/**
* NxTerm Window Configuration
*
* CONFIG_TWM4NX_NXTERM_PRIO - Priority of the NxTerm task. Default:
* SCHED_PRIORITY_DEFAULT. NOTE: This priority should be less than
* CONFIG_NXSTART_SERVERPRIO or else there may be data overrun errors.
* Such errors would most likely appear as duplicated rows of data on the
* display.
* CONFIG_TWM4NX_NXTERM_STACKSIZE - The stack size to use when starting the
* NxTerm task. Default: 2048 bytes.
* CONFIG_TWM4NX_NXTERM_WCOLOR - The color of the NxTerm window background.
* Default: MKRGB(192,192,192)
* CONFIG_TWM4NX_NXTERM_FONTCOLOR - The color of the fonts to use in the
* NxTerm window. Default: MKRGB(0,0,0)
* CONFIG_TWM4NX_NXTERM_FONTID - The ID of the font to use in the NxTerm
* window. Default: CONFIG_TWM4NX_DEFAULT_FONTID
* CONFIG_TWM4NX_NXTERM_ICON - The glyph to use as the NxTerm icon
*/
#ifdef CONFIG_TWM4NX_NXTERM
# ifndef CONFIG_TWM4NX_NXTERM_PRIO
# define CONFIG_TWM4NX_NXTERM_PRIO SCHED_PRIORITY_DEFAULT
# endif
# if CONFIG_NXSTART_SERVERPRIO <= CONFIG_TWM4NX_NXTERM_PRIO
# warning "CONFIG_NXSTART_SERVERPRIO <= CONFIG_TWM4NX_NXTERM_PRIO"
# warning" -- This can result in data overrun errors"
# endif
# ifndef CONFIG_TWM4NX_NXTERM_STACKSIZE
# define CONFIG_TWM4NX_NXTERM_STACKSIZE 2048
# endif
# ifndef CONFIG_TWM4NX_NXTERM_WCOLOR
# define CONFIG_TWM4NX_NXTERM_WCOLOR CONFIG_TWM4NX_DEFAULT_BACKGROUNDCOLOR
# endif
# ifndef CONFIG_TWM4NX_NXTERM_FONTCOLOR
# define CONFIG_TWM4NX_NXTERM_FONTCOLOR CONFIG_TWM4NX_DEFAULT_FONTCOLOR
# endif
# ifndef CONFIG_TWM4NX_NXTERM_FONTID
# define CONFIG_TWM4NX_NXTERM_FONTID CONFIG_TWM4NX_DEFAULT_FONTID
# endif
/**
* The NxTerm window glyph
*/
# ifndef CONFIG_TWM4NX_NXTERM_ICON
# define CONFIG_TWM4NX_NXTERM_ICON NXWidgets::g_cmdBitmap
# endif
#endif
// Input Devices /////////////////////////////////////////////////////////////
/**
* Configuration settings
*
* CONFIG_TWM4NX_VNCSERVER - If selected, then keyboard and positional input
* will come from the VNC server. In this case all other input settings
* are ignored.
*
* Common input device settings
wm4Nx is a port of twm, Tab Window Manager (or Tom's Window Manager) version 1.0.10 to NuttX NX windows server. No, a port is not the right word. It is a re-design of TWM from the inside out to work with the NuttX NX server. The name Twm4Nx reflects this legacy. But Twm4Nx is more a homage to TWM than a port of TWM. The original TWM was based on X11 which provides a rich set of features. TWM provided titlebars, shaped windows, several forms of icon management, user-defined macro functions, click-to-type and pointer-driven keyboard focus, graphic contexts, and user-specified key and pointer button bindings, etc. Twm4Nx, on the other hand is based on the NuttX NX server which provides comparatively minimal support. Additional drawing support comes from the NuttX NxWidgets library (which necessitated the change to C++). Twm4Nx is greatly stripped down and targeted on small embedded systems with minimal resources. For example, no assumption is made about the availability of a file system; no .twmrc file is used. Bitmaps are not used (other than for fonts). The TWM license is, I believe compatible with the BSD license used by NuttX. The origin TWM license required notice of copyrights within each file and a full copy of the original license which you can find in the COPYING file. within this directory. STATUS: This port was brutal. Much TWM logic was removed because it depending on X11 features (or just because I could not understand how to use it). The logic is partial. A lot more needs to be done to have a complete system (hence, it is marked EXPERIMENTAL). The kinds of things that need to done are: 1. Update some logic that is only fragmentary for how like resizing, and menus. 2. Integrate NxWidgets into the windows: The resize menu needs a CLabel, the menus are CListBox'es, but not completely integrated, the Icon Manager needs to be a button array. 3. Resit Icons. They are windows now, but need to be compound widgets lying on the background. 4. Widget events are only partially integrated. A lot more needs to be done. A partial change to thoe event system that hints at the redesign is in place but it is far from complete.
2019-04-26 00:54:17 +02:00
*
* CONFIG_TWM4NX_INPUT_SIGNO - The realtime signal used to wake up the
* keyboard/mouse listener thread. Default: 6
* CONFIG_TWM4NX_INPUT_LISTENERPRIO - Priority of the touchscreen listener
* thread. Default: (SCHED_PRIORITY_DEFAULT + 20)
* CONFIG_TWM4NX_INPUT_LISTENERSTACK - Input listener thread stack
* size. Default 1024
*/
#ifndef CONFIG_TWM4NX_INPUT_SIGNO
# define CONFIG_TWM4NX_INPUT_SIGNO 6
#endif
#ifndef CONFIG_TWM4NX_INPUT_LISTENERPRIO
# define CONFIG_TWM4NX_INPUT_LISTENERPRIO (SCHED_PRIORITY_DEFAULT + 20)
#endif
#ifndef CONFIG_TWM4NX_INPUT_LISTENERSTACK
# define CONFIG_TWM4NX_INPUT_LISTENERSTACK 1024
#endif
// Mouse Input Device ////////////////////////////////////////////////////////
/**
* Mouse device settings
*
* CONFIG_TWM4NX_NOMOUSE - Can be used to disable mouse input.
* CONFIG_TWM4NX_MOUSE - Input is from a mouse.
* CONFIG_TWM4NX_TOUSCREEN - Input is from a touchscreen.
wm4Nx is a port of twm, Tab Window Manager (or Tom's Window Manager) version 1.0.10 to NuttX NX windows server. No, a port is not the right word. It is a re-design of TWM from the inside out to work with the NuttX NX server. The name Twm4Nx reflects this legacy. But Twm4Nx is more a homage to TWM than a port of TWM. The original TWM was based on X11 which provides a rich set of features. TWM provided titlebars, shaped windows, several forms of icon management, user-defined macro functions, click-to-type and pointer-driven keyboard focus, graphic contexts, and user-specified key and pointer button bindings, etc. Twm4Nx, on the other hand is based on the NuttX NX server which provides comparatively minimal support. Additional drawing support comes from the NuttX NxWidgets library (which necessitated the change to C++). Twm4Nx is greatly stripped down and targeted on small embedded systems with minimal resources. For example, no assumption is made about the availability of a file system; no .twmrc file is used. Bitmaps are not used (other than for fonts). The TWM license is, I believe compatible with the BSD license used by NuttX. The origin TWM license required notice of copyrights within each file and a full copy of the original license which you can find in the COPYING file. within this directory. STATUS: This port was brutal. Much TWM logic was removed because it depending on X11 features (or just because I could not understand how to use it). The logic is partial. A lot more needs to be done to have a complete system (hence, it is marked EXPERIMENTAL). The kinds of things that need to done are: 1. Update some logic that is only fragmentary for how like resizing, and menus. 2. Integrate NxWidgets into the windows: The resize menu needs a CLabel, the menus are CListBox'es, but not completely integrated, the Icon Manager needs to be a button array. 3. Resit Icons. They are windows now, but need to be compound widgets lying on the background. 4. Widget events are only partially integrated. A lot more needs to be done. A partial change to thoe event system that hints at the redesign is in place but it is far from complete.
2019-04-26 00:54:17 +02:00
* CONFIG_TWM4NX_MOUSE_DEVPATH - The full path to the mouse device.
* Default: "/dev/console"
* CONFIG_TWM4NX_MOUSE_USBHOST - Indicates the the mouse is attached via
* USB
* CONFIG_TWM4NX_MOUSE_BUFSIZE - The size of the mouse read data buffer.
* Default: sizeof(struct mouse_report_s) or SIZEOF_TOUCH_SAMPLE_S(1)
wm4Nx is a port of twm, Tab Window Manager (or Tom's Window Manager) version 1.0.10 to NuttX NX windows server. No, a port is not the right word. It is a re-design of TWM from the inside out to work with the NuttX NX server. The name Twm4Nx reflects this legacy. But Twm4Nx is more a homage to TWM than a port of TWM. The original TWM was based on X11 which provides a rich set of features. TWM provided titlebars, shaped windows, several forms of icon management, user-defined macro functions, click-to-type and pointer-driven keyboard focus, graphic contexts, and user-specified key and pointer button bindings, etc. Twm4Nx, on the other hand is based on the NuttX NX server which provides comparatively minimal support. Additional drawing support comes from the NuttX NxWidgets library (which necessitated the change to C++). Twm4Nx is greatly stripped down and targeted on small embedded systems with minimal resources. For example, no assumption is made about the availability of a file system; no .twmrc file is used. Bitmaps are not used (other than for fonts). The TWM license is, I believe compatible with the BSD license used by NuttX. The origin TWM license required notice of copyrights within each file and a full copy of the original license which you can find in the COPYING file. within this directory. STATUS: This port was brutal. Much TWM logic was removed because it depending on X11 features (or just because I could not understand how to use it). The logic is partial. A lot more needs to be done to have a complete system (hence, it is marked EXPERIMENTAL). The kinds of things that need to done are: 1. Update some logic that is only fragmentary for how like resizing, and menus. 2. Integrate NxWidgets into the windows: The resize menu needs a CLabel, the menus are CListBox'es, but not completely integrated, the Icon Manager needs to be a button array. 3. Resit Icons. They are windows now, but need to be compound widgets lying on the background. 4. Widget events are only partially integrated. A lot more needs to be done. A partial change to thoe event system that hints at the redesign is in place but it is far from complete.
2019-04-26 00:54:17 +02:00
*/
#ifndef CONFIG_TWM4NX_MOUSE_DEVPATH
# ifdef CONFIG_TWM4NX_MOUSE
# define CONFIG_TWM4NX_MOUSE_DEVPATH "/dev/mouse0"
# else
# define CONFIG_TWM4NX_MOUSE_DEVPATH "/dev/input0"
# endif
wm4Nx is a port of twm, Tab Window Manager (or Tom's Window Manager) version 1.0.10 to NuttX NX windows server. No, a port is not the right word. It is a re-design of TWM from the inside out to work with the NuttX NX server. The name Twm4Nx reflects this legacy. But Twm4Nx is more a homage to TWM than a port of TWM. The original TWM was based on X11 which provides a rich set of features. TWM provided titlebars, shaped windows, several forms of icon management, user-defined macro functions, click-to-type and pointer-driven keyboard focus, graphic contexts, and user-specified key and pointer button bindings, etc. Twm4Nx, on the other hand is based on the NuttX NX server which provides comparatively minimal support. Additional drawing support comes from the NuttX NxWidgets library (which necessitated the change to C++). Twm4Nx is greatly stripped down and targeted on small embedded systems with minimal resources. For example, no assumption is made about the availability of a file system; no .twmrc file is used. Bitmaps are not used (other than for fonts). The TWM license is, I believe compatible with the BSD license used by NuttX. The origin TWM license required notice of copyrights within each file and a full copy of the original license which you can find in the COPYING file. within this directory. STATUS: This port was brutal. Much TWM logic was removed because it depending on X11 features (or just because I could not understand how to use it). The logic is partial. A lot more needs to be done to have a complete system (hence, it is marked EXPERIMENTAL). The kinds of things that need to done are: 1. Update some logic that is only fragmentary for how like resizing, and menus. 2. Integrate NxWidgets into the windows: The resize menu needs a CLabel, the menus are CListBox'es, but not completely integrated, the Icon Manager needs to be a button array. 3. Resit Icons. They are windows now, but need to be compound widgets lying on the background. 4. Widget events are only partially integrated. A lot more needs to be done. A partial change to thoe event system that hints at the redesign is in place but it is far from complete.
2019-04-26 00:54:17 +02:00
#endif
#ifndef CONFIG_TWM4NX_MOUSE_BUFSIZE
# ifdef CONFIG_TWM4NX_MOUSE
# define CONFIG_TWM4NX_MOUSE_BUFSIZE sizeof(struct mouse_report_s)
# else
# define CONFIG_TWM4NX_MOUSE_BUFSIZE SIZEOF_TOUCH_SAMPLE_S(1)
# endif
wm4Nx is a port of twm, Tab Window Manager (or Tom's Window Manager) version 1.0.10 to NuttX NX windows server. No, a port is not the right word. It is a re-design of TWM from the inside out to work with the NuttX NX server. The name Twm4Nx reflects this legacy. But Twm4Nx is more a homage to TWM than a port of TWM. The original TWM was based on X11 which provides a rich set of features. TWM provided titlebars, shaped windows, several forms of icon management, user-defined macro functions, click-to-type and pointer-driven keyboard focus, graphic contexts, and user-specified key and pointer button bindings, etc. Twm4Nx, on the other hand is based on the NuttX NX server which provides comparatively minimal support. Additional drawing support comes from the NuttX NxWidgets library (which necessitated the change to C++). Twm4Nx is greatly stripped down and targeted on small embedded systems with minimal resources. For example, no assumption is made about the availability of a file system; no .twmrc file is used. Bitmaps are not used (other than for fonts). The TWM license is, I believe compatible with the BSD license used by NuttX. The origin TWM license required notice of copyrights within each file and a full copy of the original license which you can find in the COPYING file. within this directory. STATUS: This port was brutal. Much TWM logic was removed because it depending on X11 features (or just because I could not understand how to use it). The logic is partial. A lot more needs to be done to have a complete system (hence, it is marked EXPERIMENTAL). The kinds of things that need to done are: 1. Update some logic that is only fragmentary for how like resizing, and menus. 2. Integrate NxWidgets into the windows: The resize menu needs a CLabel, the menus are CListBox'es, but not completely integrated, the Icon Manager needs to be a button array. 3. Resit Icons. They are windows now, but need to be compound widgets lying on the background. 4. Widget events are only partially integrated. A lot more needs to be done. A partial change to thoe event system that hints at the redesign is in place but it is far from complete.
2019-04-26 00:54:17 +02:00
#endif
// Keyboard device ///////////////////////////////////////////////////////////
/**
* Keyboard device settings
*
* CONFIG_TWM4NX_NOKEYBOARD - Can be used to disable keyboard input.
wm4Nx is a port of twm, Tab Window Manager (or Tom's Window Manager) version 1.0.10 to NuttX NX windows server. No, a port is not the right word. It is a re-design of TWM from the inside out to work with the NuttX NX server. The name Twm4Nx reflects this legacy. But Twm4Nx is more a homage to TWM than a port of TWM. The original TWM was based on X11 which provides a rich set of features. TWM provided titlebars, shaped windows, several forms of icon management, user-defined macro functions, click-to-type and pointer-driven keyboard focus, graphic contexts, and user-specified key and pointer button bindings, etc. Twm4Nx, on the other hand is based on the NuttX NX server which provides comparatively minimal support. Additional drawing support comes from the NuttX NxWidgets library (which necessitated the change to C++). Twm4Nx is greatly stripped down and targeted on small embedded systems with minimal resources. For example, no assumption is made about the availability of a file system; no .twmrc file is used. Bitmaps are not used (other than for fonts). The TWM license is, I believe compatible with the BSD license used by NuttX. The origin TWM license required notice of copyrights within each file and a full copy of the original license which you can find in the COPYING file. within this directory. STATUS: This port was brutal. Much TWM logic was removed because it depending on X11 features (or just because I could not understand how to use it). The logic is partial. A lot more needs to be done to have a complete system (hence, it is marked EXPERIMENTAL). The kinds of things that need to done are: 1. Update some logic that is only fragmentary for how like resizing, and menus. 2. Integrate NxWidgets into the windows: The resize menu needs a CLabel, the menus are CListBox'es, but not completely integrated, the Icon Manager needs to be a button array. 3. Resit Icons. They are windows now, but need to be compound widgets lying on the background. 4. Widget events are only partially integrated. A lot more needs to be done. A partial change to thoe event system that hints at the redesign is in place but it is far from complete.
2019-04-26 00:54:17 +02:00
* CONFIG_TWM4NX_KEYBOARD_DEVPATH - The full path to the keyboard device.
* Default: "/dev/console"
* CONFIG_TWM4NX_KEYBOARD_USBHOST - Indicates the the keyboard is attached via
* USB
* CONFIG_TWM4NX_KEYBOARD_BUFSIZE - The size of the keyboard read data buffer.
* Default: 16
*/
#ifndef CONFIG_TWM4NX_KEYBOARD_DEVPATH
# define CONFIG_TWM4NX_KEYBOARD_DEVPATH "/dev/kbd0"
#endif
#ifndef CONFIG_TWM4NX_KEYBOARD_BUFSIZE
# define CONFIG_TWM4NX_KEYBOARD_BUFSIZE 6
#endif
#endif // __APPS_INCLUDE_GRAPHICS_TWM4NX_TWM4NX_CONFIG_HXX