NXWidgets: NXWidgets::CNxServer Class Reference

NXWidgets 1.19

Public Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
NXWidgets::CNxServer Class Reference

`#include <cnxserver.hxx>`

Inheritance diagram for NXWidgets::CNxServer:

## Public Member Functions
| CNxServer (void)
| ~CNxServer (void)
virtual bool | connect (void)
virtual void | disconnect (void)
NXHANDLE | getServer (void)
bool | connected (void)
bool | setBackgroundColor (nxgl_mxpixel_t color)
CNxWindow * | createRawWindow (CWidgetControl *widgetControl)
CNxTkWindow * | createFramedWindow (CWidgetControl *widgetControl)
CBgWindow * | getBgWindow (CWidgetControl *widgetControl)

## Static Private Member Functions
static FAR void * | listener (FAR void *arg)

## Private Attributes
FAR NX_DRIVERTYPE * | m_hDevice
NXHANDLE | m_hNxServer
volatile bool | m_running
volatile bool | m_connected
volatile bool | m_stop
sem_t | m_connsem

## Static Private Attributes
static uint8_t | m_nServers

## Detailed Description

This class represents the NX server. It includes methods to connect to and disconnect form the NX server, methods to manage the background, and "factory" methods to create window objects on the NX server. NXWidget objects them may be created on the window objects.

Definition at line 80 of file cnxserver.hxx.

## Constructor & Destructor Documentation

## ◆ CNxServer()

CNxServer::CNxServer | ( | void |  | ) |

CNXServer constructor. The CNxServer is a normally singleton. However, that not enforced: This constructor could run more than one in the situation where there are multiple physical displays. However, that configuration has never been texted.

CNXServer constructor

Definition at line 81 of file cnxserver.cxx.

## ◆ ~CNxServer()

CNxServer::~CNxServer | ( | void |  | ) |

CNXServer destructor

Definition at line 107 of file cnxserver.cxx.

## Member Function Documentation

## ◆ connect()

bool CNxServer::connect | ( | void |  | ) |
| virtual

Connect to the NX Server

Reimplemented in NxWM::CTaskbar.

Definition at line 126 of file cnxserver.cxx.

## ◆ connected()

bool NXWidgets::CNxServer::connected | ( | void |  | ) |
| inline

Test if we are connected to the NX server.

Returns
  True is connected; false is not connected.

Definition at line 144 of file cnxserver.hxx.

## ◆ createFramedWindow()

CNxTkWindow* NXWidgets::CNxServer::createFramedWindow | ( | CWidgetControl * | widgetControl | ) |
| inline

Get an instance of the framed NX window.

Definition at line 171 of file cnxserver.hxx.

## ◆ createRawWindow()

CNxWindow* NXWidgets::CNxServer::createRawWindow | ( | CWidgetControl * | widgetControl | ) |
| inline

Get an instance of a raw NX window.

Definition at line 162 of file cnxserver.hxx.

## ◆ disconnect()

void CNxServer::disconnect | ( | void |  | ) |
| virtual

Disconnect from the NX Server

Reimplemented in NxWM::CTaskbar.

Definition at line 231 of file cnxserver.cxx.

## ◆ getBgWindow()

CBgWindow* NXWidgets::CNxServer::getBgWindow | ( | CWidgetControl * | widgetControl | ) |
| inline

Get an instance of the background window.

Definition at line 180 of file cnxserver.hxx.

## ◆ getServer()

NXHANDLE NXWidgets::CNxServer::getServer | ( | void |  | ) |
| inline

Get the NX server handle

Returns
  The NX server handler (NULL is not connected)

Definition at line 133 of file cnxserver.hxx.

## ◆ listener()

FAR void * CNxServer::listener | ( | FAR void * | arg | ) |
| staticprivate

NX listener thread. This is the entry point of a thread that listeners for and dispatches events from the NX server.

This is the entry point of a thread that listeners for and dispatches events from the NX server.

Definition at line 263 of file cnxserver.cxx.

## ◆ setBackgroundColor()

bool NXWidgets::CNxServer::setBackgroundColor | ( | nxgl_mxpixel_t | color | ) |
| inline

Set the background color

Definition at line 153 of file cnxserver.hxx.

## Member Data Documentation

## ◆ m_connected

volatile bool NXWidgets::CNxServer::m_connected
| private

True: Connected to the server

Definition at line 86 of file cnxserver.hxx.

## ◆ m_connsem

sem_t NXWidgets::CNxServer::m_connsem
| private

Wait for server connection

Definition at line 88 of file cnxserver.hxx.

## ◆ m_hDevice

FAR NX_DRIVERTYPE* NXWidgets::CNxServer::m_hDevice
| private

LCD/Framebuffer device handle

Definition at line 83 of file cnxserver.hxx.

## ◆ m_hNxServer

NXHANDLE NXWidgets::CNxServer::m_hNxServer
| private

NX server handle

Definition at line 84 of file cnxserver.hxx.

## ◆ m_nServers

uint8_t CNxServer::m_nServers
| staticprivate

The number of NX server instances

Definition at line 89 of file cnxserver.hxx.

## ◆ m_running

volatile bool NXWidgets::CNxServer::m_running
| private

True: The listener thread is running

Definition at line 85 of file cnxserver.hxx.

## ◆ m_stop

volatile bool NXWidgets::CNxServer::m_stop
| private

True: Waiting for the listener thread to stop

Definition at line 87 of file cnxserver.hxx.

The documentation for this class was generated from the following files:

- cnxserver.hxx
- cnxserver.cxx