mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 23:03:27 +08:00
Add a mechanism to get remote keyboard and mouse inputs
This commit is contained in:
@@ -49,6 +49,7 @@
|
||||
|
||||
#include <nuttx/video/fb.h>
|
||||
#include <nuttx/video/rfb.h>
|
||||
#include <nuttx/video/vnc.h>
|
||||
#include <nuttx/nx/nxglib.h>
|
||||
#include <nuttx/nx/nx.h>
|
||||
#include <nuttx/net/net.h>
|
||||
@@ -239,10 +240,6 @@ struct vnc_fbupdate_s
|
||||
|
||||
struct vnc_session_s
|
||||
{
|
||||
/* NX graphics system */
|
||||
|
||||
NXHANDLE handle; /* NX graphics handle */
|
||||
|
||||
/* Connection data */
|
||||
|
||||
struct socket listen; /* Listen socket */
|
||||
@@ -259,6 +256,12 @@ struct vnc_session_s
|
||||
volatile bool rre; /* Remote supports RRE encoding */
|
||||
FAR uint8_t *fb; /* Allocated local frame buffer */
|
||||
|
||||
/* VNC client input support */
|
||||
|
||||
vnc_kbdout_t kbdout; /* Callout when keyboard input is received */
|
||||
vnc_mouseout_t mouseout; /* Callout when keyboard input is received */
|
||||
FAR void *arg; /* Argument that accompanies the callouts */
|
||||
|
||||
/* Updater information */
|
||||
|
||||
pthread_t updater; /* Updater thread ID */
|
||||
@@ -283,7 +286,8 @@ struct vnc_session_s
|
||||
|
||||
struct fb_startup_s
|
||||
{
|
||||
sem_t fbsem; /* Framebuffer driver will wait on this */
|
||||
sem_t fbinit; /* Wait for session creation */
|
||||
sem_t fbconnect; /* Wait for client connection */
|
||||
int16_t result; /* OK: successfully initialized */
|
||||
};
|
||||
|
||||
@@ -537,24 +541,6 @@ void vnc_key_map(FAR struct vnc_session_s *session, uint16_t keysym,
|
||||
bool keydown);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: vnc_find_session
|
||||
*
|
||||
* Description:
|
||||
* Return the session structure associated with this display.
|
||||
*
|
||||
* Input Parameters:
|
||||
* display - The display number of interest.
|
||||
*
|
||||
* Returned Value:
|
||||
* 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.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
FAR struct vnc_session_s *vnc_find_session(int display);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: vnc_convert_rgbNN
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user