2016-04-14 01:52:36 +02:00
|
|
|
/****************************************************************************
|
|
|
|
* graphics/vnc/server/vnc_server.h
|
|
|
|
*
|
|
|
|
* Copyright (C) 2016 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 __GRAPHICS_VNC_SERVER_VNC_SERVER_H
|
|
|
|
#define __GRAPHICS_VNC_SERVER_VNC_SERVER_H
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Included Files
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#include <nuttx/config.h>
|
|
|
|
|
|
|
|
#include <stdint.h>
|
2016-04-18 00:48:30 +02:00
|
|
|
#include <semaphore.h>
|
2016-04-17 16:20:14 +02:00
|
|
|
#include <pthread.h>
|
2016-04-18 00:48:30 +02:00
|
|
|
#include <queue.h>
|
2016-04-14 01:52:36 +02:00
|
|
|
|
|
|
|
#include <nuttx/video/fb.h>
|
2016-04-18 00:48:30 +02:00
|
|
|
#include <nuttx/video/rfb.h>
|
2016-04-14 01:52:36 +02:00
|
|
|
#include <nuttx/nx/nxglib.h>
|
2016-04-14 19:09:18 +02:00
|
|
|
#include <nuttx/nx/nx.h>
|
2016-04-14 01:52:36 +02:00
|
|
|
#include <nuttx/net/net.h>
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Pre-processor Definitions
|
|
|
|
****************************************************************************/
|
2016-04-16 20:50:23 +02:00
|
|
|
|
2016-04-14 21:52:59 +02:00
|
|
|
/* Configuration */
|
|
|
|
|
2016-04-17 20:26:03 +02:00
|
|
|
#ifndef CONFIG_NET_TCP_READAHEAD
|
|
|
|
# error CONFIG_NET_TCP_READAHEAD must be set to use VNC
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef CONFIG_NX_UPDATE
|
|
|
|
# error CONFIG_NX_UPDATE must be set to use VNC
|
|
|
|
#endif
|
|
|
|
|
2016-04-16 20:50:23 +02:00
|
|
|
#if !defined(CONFIG_VNCSERVER_PROTO3p3) && !defined(CONFIG_VNCSERVER_PROTO3p8)
|
|
|
|
# error No VNC protocol selected
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(CONFIG_VNCSERVER_PROTO3p3) && defined(CONFIG_VNCSERVER_PROTO3p8)
|
|
|
|
# error Too many VNC protocols selected
|
|
|
|
#endif
|
|
|
|
|
2016-04-14 21:52:59 +02:00
|
|
|
#ifndef CONFIG_VNCSERVER_NDISPLAYS
|
|
|
|
# define CONFIG_VNCSERVER_NDISPLAYS 1
|
|
|
|
#endif
|
|
|
|
|
2016-04-16 23:59:00 +02:00
|
|
|
#if defined(CONFIG_VNCSERVER_COLORFMT_RGB16)
|
2016-04-17 02:11:17 +02:00
|
|
|
# define RFB_COLORFMT FB_FMT_RGB16_565
|
2016-04-16 23:59:00 +02:00
|
|
|
# define RFB_BITSPERPIXEL 16
|
|
|
|
# define RFB_PIXELDEPTH 16
|
|
|
|
# define RFB_TRUECOLOR 1
|
|
|
|
# define RFB_RMAX 0x1f
|
|
|
|
# define RFB_GMAX 0x3f
|
|
|
|
# define RFB_BMAX 0x1f
|
|
|
|
# define RFB_RSHIFT 11
|
|
|
|
# define RFB_GSHIFT 5
|
|
|
|
# define RFB_BSHIFT 0
|
|
|
|
#elif defined(CONFIG_VNCSERVER_COLORFMT_RGB32)
|
2016-04-17 02:11:17 +02:00
|
|
|
# define RFB_COLORFMT FB_FMT_RGB32
|
2016-04-16 23:59:00 +02:00
|
|
|
# define RFB_BITSPERPIXEL 32
|
|
|
|
# define RFB_PIXELDEPTH 24
|
|
|
|
# define RFB_TRUECOLOR 1
|
|
|
|
# define RFB_RMAX 0xff
|
|
|
|
# define RFB_GMAX 0xff
|
|
|
|
# define RFB_BMAX 0xff
|
|
|
|
# define RFB_RSHIFT 16
|
|
|
|
# define RFB_GSHIFT 8
|
|
|
|
# define RFB_BSHIFT 0
|
|
|
|
#else
|
2016-04-18 18:42:44 +02:00
|
|
|
# error Unspecified/unsupported color format
|
2016-04-16 23:59:00 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef CONFIG_VNCSERVER_SCREENWIDTH
|
|
|
|
# define CONFIG_VNCSERVER_SCREENWIDTH 320
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef CONFIG_VNCSERVER_SCREENHEIGHT
|
|
|
|
# define CONFIG_VNCSERVER_SCREENHEIGHT 240
|
|
|
|
#endif
|
|
|
|
|
2016-04-14 21:52:59 +02:00
|
|
|
#ifndef CONFIG_VNCSERVER_PRIO
|
|
|
|
# define CONFIG_VNCSERVER_PRIO 100
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef CONFIG_VNCSERVER_STACKSIZE
|
|
|
|
# define CONFIG_VNCSERVER_STACKSIZE 2048
|
|
|
|
#endif
|
2016-04-14 01:52:36 +02:00
|
|
|
|
2016-04-17 16:20:14 +02:00
|
|
|
#ifndef CONFIG_VNCSERVER_UPDATER_PRIO
|
|
|
|
# define CONFIG_VNCSERVER_UPDATER_PRIO 100
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef CONFIG_VNCSERVER_UPDATER_STACKSIZE
|
|
|
|
# define CONFIG_VNCSERVER_UPDATER_STACKSIZE 2048
|
|
|
|
#endif
|
|
|
|
|
2016-04-18 00:48:30 +02:00
|
|
|
#ifndef CONFIG_VNCSERVER_INBUFFER_SIZE
|
|
|
|
# define CONFIG_VNCSERVER_INBUFFER_SIZE 80
|
2016-04-16 21:06:39 +02:00
|
|
|
#endif
|
|
|
|
|
2016-04-18 00:48:30 +02:00
|
|
|
#ifndef CONFIG_VNCSERVER_NUPDATES
|
|
|
|
# define CONFIG_VNCSERVER_NUPDATES 48
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef CONFIG_VNCSERVER_UPDATE_BUFSIZE
|
|
|
|
# define CONFIG_VNCSERVER_UPDATE_BUFSIZE 4096
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define VNCSERVER_UPDATE_BUFSIZE \
|
|
|
|
(CONFIG_VNCSERVER_UPDATE_BUFSIZE + SIZEOF_RFB_FRAMEBUFFERUPDATE_S(0))
|
|
|
|
|
2016-04-17 16:20:14 +02:00
|
|
|
/* Local framebuffer characteristics in bytes */
|
|
|
|
|
2016-04-18 23:34:39 +02:00
|
|
|
#define RFB_BYTESPERPIXEL ((RFB_BITSPERPIXEL + 7) >> 3)
|
2016-04-17 16:20:14 +02:00
|
|
|
#define RFB_STRIDE (RFB_BYTESPERPIXEL * CONFIG_VNCSERVER_SCREENWIDTH)
|
|
|
|
#define RFB_SIZE (RFB_STRIDE * CONFIG_VNCSERVER_SCREENHEIGHT)
|
|
|
|
|
2016-04-14 19:09:18 +02:00
|
|
|
/* RFB Port Number */
|
|
|
|
|
|
|
|
#define RFB_PORT_BASE 5900
|
2016-04-14 21:52:59 +02:00
|
|
|
#define RFB_MAX_DISPLAYS CONFIG_VNCSERVER_NDISPLAYS
|
2016-04-14 19:09:18 +02:00
|
|
|
#define RFB_DISPLAY_PORT(d) (RFB_PORT_BASE + (d))
|
|
|
|
|
2016-04-16 21:06:39 +02:00
|
|
|
/* Miscellaneous */
|
|
|
|
|
|
|
|
#ifndef MIN
|
2016-04-16 23:59:00 +02:00
|
|
|
# define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
2016-04-16 21:06:39 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef MAX
|
2016-04-16 23:59:00 +02:00
|
|
|
# define MAX(a,b) (((a) > (b)) ? (a) : (b))
|
2016-04-16 21:06:39 +02:00
|
|
|
#endif
|
|
|
|
|
2016-04-14 01:52:36 +02:00
|
|
|
/****************************************************************************
|
|
|
|
* Public Types
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
/* This enumeration indicates the state of the VNC server */
|
|
|
|
|
|
|
|
enum vnc_server_e
|
|
|
|
{
|
|
|
|
VNCSERVER_UNINITIALIZED = 0, /* Initial state */
|
|
|
|
VNCSERVER_INITIALIZED, /* State structured initialized, but not connected */
|
|
|
|
VNCSERVER_CONNECTED, /* Connect to a client, but not yet configured */
|
|
|
|
VNCSERVER_CONFIGURED, /* Configured and ready to transfer graphics */
|
2016-04-17 16:20:14 +02:00
|
|
|
VNCSERVER_RUNNING, /* Running and activly transferring graphics */
|
2016-04-18 18:42:44 +02:00
|
|
|
VNCSERVER_STOPPING, /* The updater has been asked to stop */
|
|
|
|
VNCSERVER_STOPPED /* The updater has stopped */
|
2016-04-14 19:09:18 +02:00
|
|
|
};
|
2016-04-14 01:52:36 +02:00
|
|
|
|
2016-04-18 00:48:30 +02:00
|
|
|
/* This structure is used to queue FrameBufferUpdate event. It includes a
|
|
|
|
* pointer to support singly linked list.
|
|
|
|
*/
|
|
|
|
|
|
|
|
struct vnc_fbupdate_s
|
|
|
|
{
|
|
|
|
FAR struct vnc_fbupdate_s *flink;
|
|
|
|
struct nxgl_rect_s rect; /* The enqueued update rectangle */
|
|
|
|
};
|
|
|
|
|
2016-04-14 01:52:36 +02:00
|
|
|
struct vnc_session_s
|
|
|
|
{
|
|
|
|
/* NX graphics system */
|
|
|
|
|
|
|
|
NXHANDLE handle; /* NX graphics handle */
|
|
|
|
|
|
|
|
/* Connection data */
|
|
|
|
|
|
|
|
struct socket listen; /* Listen socket */
|
|
|
|
struct socket connect; /* Connected socket */
|
|
|
|
volatile uint8_t state; /* See enum vnc_server_e */
|
|
|
|
|
|
|
|
/* Display geometry and color characteristics */
|
|
|
|
|
2016-04-19 02:55:36 +02:00
|
|
|
uint8_t display; /* Display number (for debug) */
|
2016-04-17 16:20:14 +02:00
|
|
|
uint8_t colorfmt; /* Remote color format (See include/nuttx/fb.h) */
|
|
|
|
uint8_t bpp; /* Remote bits per pixel */
|
2016-04-14 19:32:00 +02:00
|
|
|
FAR uint8_t *fb; /* Allocated local frame buffer */
|
2016-04-18 00:48:30 +02:00
|
|
|
|
2016-04-17 16:20:14 +02:00
|
|
|
/* Updater information */
|
|
|
|
|
|
|
|
pthread_t updater; /* Updater thread ID */
|
2016-04-16 21:06:39 +02:00
|
|
|
|
2016-04-18 00:48:30 +02:00
|
|
|
/* Update list information */
|
|
|
|
|
|
|
|
struct vnc_fbupdate_s updpool[CONFIG_VNCSERVER_NUPDATES];
|
|
|
|
sq_queue_t updfree;
|
|
|
|
sq_queue_t updqueue;
|
2016-04-18 02:09:04 +02:00
|
|
|
sem_t freesem;
|
|
|
|
sem_t queuesem;
|
2016-04-18 00:48:30 +02:00
|
|
|
|
2016-04-17 16:20:14 +02:00
|
|
|
/* I/O buffers for misc network send/receive */
|
|
|
|
|
2016-04-18 00:48:30 +02:00
|
|
|
uint8_t inbuf[CONFIG_VNCSERVER_INBUFFER_SIZE];
|
|
|
|
uint8_t outbuf[VNCSERVER_UPDATE_BUFSIZE];
|
2016-04-14 01:52:36 +02:00
|
|
|
};
|
|
|
|
|
2016-04-18 23:34:39 +02:00
|
|
|
/* This structure is used to communicate start-up status between the server
|
|
|
|
* the framebuffer driver.
|
|
|
|
*/
|
|
|
|
|
|
|
|
struct fb_startup_s
|
|
|
|
{
|
|
|
|
sem_t fbsem; /* Framebuffer driver will wait on this */
|
|
|
|
int16_t result; /* OK: successfully initialized */
|
|
|
|
};
|
|
|
|
|
2016-04-14 01:52:36 +02:00
|
|
|
/****************************************************************************
|
2016-04-18 20:24:52 +02:00
|
|
|
* Public Data
|
2016-04-14 01:52:36 +02:00
|
|
|
****************************************************************************/
|
|
|
|
|
2016-04-14 21:52:59 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
#define EXTERN extern "C"
|
|
|
|
extern "C"
|
|
|
|
{
|
|
|
|
#else
|
|
|
|
#define EXTERN extern
|
|
|
|
#endif
|
|
|
|
|
2016-04-18 20:24:52 +02:00
|
|
|
/* Given a display number as an index, the following array can be used to
|
|
|
|
* look-up the session structure for that display.
|
|
|
|
*/
|
|
|
|
|
|
|
|
EXTERN FAR struct vnc_session_s *g_vnc_sessions[RFB_MAX_DISPLAYS];
|
|
|
|
|
|
|
|
/* Used to synchronize the server thread with the framebuffer driver. */
|
|
|
|
|
2016-04-18 23:34:39 +02:00
|
|
|
EXTERN struct fb_startup_s g_fbstartup[RFB_MAX_DISPLAYS];
|
2016-04-18 20:24:52 +02:00
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Public Function Prototypes
|
|
|
|
****************************************************************************/
|
|
|
|
|
2016-04-14 21:52:59 +02:00
|
|
|
/****************************************************************************
|
|
|
|
* Name: vnc_server
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* The VNC server daemon. This daemon is implemented as a kernel thread.
|
|
|
|
*
|
|
|
|
* Input Parameters:
|
|
|
|
* Standard kernel thread arguments (all ignored)
|
|
|
|
*
|
|
|
|
* Returned Value:
|
|
|
|
* This function does not return.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
int vnc_server(int argc, FAR char *argv[]);
|
|
|
|
|
2016-04-14 19:09:18 +02:00
|
|
|
/****************************************************************************
|
2016-04-17 16:20:14 +02:00
|
|
|
* Name: vnc_negotiate
|
2016-04-14 19:09:18 +02:00
|
|
|
*
|
|
|
|
* Description:
|
2016-04-17 16:20:14 +02:00
|
|
|
* Perform the VNC initialization sequence after the client has sucessfully
|
|
|
|
* connected to the server. Negotiate security, framebuffer and color
|
|
|
|
* properties.
|
2016-04-14 19:09:18 +02:00
|
|
|
*
|
|
|
|
* Input Parameters:
|
2016-04-17 16:20:14 +02:00
|
|
|
* session - An instance of the session structure.
|
2016-04-14 19:09:18 +02:00
|
|
|
*
|
|
|
|
* Returned Value:
|
|
|
|
* Returns zero (OK) on success; a negated errno value on failure.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
2016-04-17 16:20:14 +02:00
|
|
|
int vnc_negotiate(FAR struct vnc_session_s *session);
|
2016-04-14 19:09:18 +02:00
|
|
|
|
|
|
|
/****************************************************************************
|
2016-04-17 16:20:14 +02:00
|
|
|
* Name: vnc_start_updater
|
2016-04-14 19:09:18 +02:00
|
|
|
*
|
|
|
|
* Description:
|
2016-04-17 16:20:14 +02:00
|
|
|
* Start the updater thread
|
2016-04-14 19:09:18 +02:00
|
|
|
*
|
|
|
|
* Input Parameters:
|
2016-04-17 16:20:14 +02:00
|
|
|
* session - An instance of the session structure.
|
2016-04-14 19:09:18 +02:00
|
|
|
*
|
|
|
|
* Returned Value:
|
2016-04-17 16:20:14 +02:00
|
|
|
* Zero (OK) is returned on success; a negated errno value is returned on
|
|
|
|
* any failure.
|
2016-04-14 19:09:18 +02:00
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
2016-04-17 16:20:14 +02:00
|
|
|
int vnc_start_updater(FAR struct vnc_session_s *session);
|
2016-04-14 19:09:18 +02:00
|
|
|
|
|
|
|
/****************************************************************************
|
2016-04-17 16:20:14 +02:00
|
|
|
* Name: vnc_stop_updater
|
2016-04-14 19:09:18 +02:00
|
|
|
*
|
|
|
|
* Description:
|
2016-04-17 16:20:14 +02:00
|
|
|
* Stop the updater thread
|
2016-04-14 19:09:18 +02:00
|
|
|
*
|
|
|
|
* Input Parameters:
|
2016-04-17 16:20:14 +02:00
|
|
|
* session - An instance of the session structure.
|
2016-04-14 19:09:18 +02:00
|
|
|
*
|
|
|
|
* Returned Value:
|
2016-04-17 16:20:14 +02:00
|
|
|
* Zero (OK) is returned on success; a negated errno value is returned on
|
|
|
|
* any failure.
|
2016-04-14 19:09:18 +02:00
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
2016-04-17 16:20:14 +02:00
|
|
|
int vnc_stop_updater(FAR struct vnc_session_s *session);
|
2016-04-14 19:09:18 +02:00
|
|
|
|
2016-04-17 20:26:03 +02:00
|
|
|
/****************************************************************************
|
|
|
|
* Name: vnc_update_rectangle
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Queue an update of the specified rectangular region on the display.
|
|
|
|
*
|
|
|
|
* Input Parameters:
|
|
|
|
* session - An instance of the session structure.
|
|
|
|
* rect - The rectanglular region to be updated.
|
|
|
|
*
|
|
|
|
* Returned Value:
|
|
|
|
* Zero (OK) is returned on success; a negated errno value is returned on
|
|
|
|
* any failure.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
int vnc_update_rectangle(FAR struct vnc_session_s *session,
|
|
|
|
FAR const struct nxgl_rect_s *rect);
|
|
|
|
|
2016-04-17 01:24:14 +02:00
|
|
|
/****************************************************************************
|
2016-04-17 16:20:14 +02:00
|
|
|
* Name: vnc_receiver
|
2016-04-17 01:24:14 +02:00
|
|
|
*
|
|
|
|
* Description:
|
2016-04-17 16:20:14 +02:00
|
|
|
* This function handles all Client-to-Server messages.
|
2016-04-17 01:24:14 +02:00
|
|
|
*
|
|
|
|
* Input Parameters:
|
2016-04-17 16:20:14 +02:00
|
|
|
* session - An instance of the session structure.
|
2016-04-17 01:24:14 +02:00
|
|
|
*
|
|
|
|
* Returned Value:
|
2016-04-17 16:20:14 +02:00
|
|
|
* At present, always returns OK
|
2016-04-17 01:24:14 +02:00
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
2016-04-17 16:20:14 +02:00
|
|
|
int vnc_receiver(FAR struct vnc_session_s *session);
|
2016-04-17 01:24:14 +02:00
|
|
|
|
2016-04-14 19:09:18 +02:00
|
|
|
/****************************************************************************
|
2016-04-17 16:20:14 +02:00
|
|
|
* Name: vnc_key_map
|
2016-04-14 19:09:18 +02:00
|
|
|
*
|
|
|
|
* Description:
|
2016-04-17 16:20:14 +02:00
|
|
|
* Map the receive X11 keysym into something understood by NuttX and route
|
|
|
|
* that through NX to the appropriate window.
|
2016-04-14 19:09:18 +02:00
|
|
|
*
|
|
|
|
* Input Parameters:
|
2016-04-17 16:20:14 +02:00
|
|
|
* session - An instance of the session structure.
|
|
|
|
* keysym - The X11 keysym value (see include/nuttx/inputx11_keysymdef)
|
|
|
|
* keydown - True: Key pressed; False: Key released
|
2016-04-14 19:09:18 +02:00
|
|
|
*
|
|
|
|
* Returned Value:
|
2016-04-17 16:20:14 +02:00
|
|
|
* None
|
2016-04-14 19:09:18 +02:00
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
2016-04-17 16:20:14 +02:00
|
|
|
#ifdef CONFIG_NX_KBD
|
2016-04-17 21:35:51 +02:00
|
|
|
void vnc_key_map(FAR struct vnc_session_s *session, uint16_t keysym,
|
2016-04-17 16:20:14 +02:00
|
|
|
bool keydown);
|
|
|
|
#endif
|
2016-04-14 19:09:18 +02:00
|
|
|
|
2016-04-14 21:52:59 +02:00
|
|
|
/****************************************************************************
|
|
|
|
* Name: vnc_find_session
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Return the session structure associated with this display.
|
|
|
|
*
|
|
|
|
* Input Parameters:
|
|
|
|
* display - The display number of interest.
|
|
|
|
*
|
|
|
|
* Returned Value:
|
2016-04-17 16:20:14 +02:00
|
|
|
* Returns the instance of the session structure for this display. NULL
|
|
|
|
* will be returned if the server has not yet been started or if the
|
|
|
|
* display number is out of range.
|
2016-04-14 21:52:59 +02:00
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
FAR struct vnc_session_s *vnc_find_session(int display);
|
|
|
|
|
|
|
|
#undef EXTERN
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2016-04-14 01:52:36 +02:00
|
|
|
#endif /* __GRAPHICS_VNC_SERVER_VNC_SERVER_H */
|