00001 #ifndef _FBVNCSERVER_H
00002 #define _FBVNCSERVER_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00031
00032
00033
00034
00035 #include <stdlib.h>
00036 #include <stdio.h>
00037 #include <unistd.h>
00038 #include <string.h>
00039 #include <math.h>
00040
00041 #include <sys/mman.h>
00042 #include <sys/wait.h>
00043
00044
00045
00046
00047
00048 #include "rfb/rfb.h"
00049 #include "rfb/keysym.h"
00050
00051
00052 #include "config.h"
00053 #include "rotate.h"
00054 #include "dev_uinput.h"
00055
00056
00057 #define DESKTOP_NAME "PDA"
00058 #ifndef TRUE
00059 #define TRUE 1
00060 #endif
00061 #ifndef FALSE
00062 #define FALSE 0
00063 #endif
00064
00065 #define UINPUT_KBD_NAME "fbvnc key-injector"
00066 #define UINPUT_TS_NAME "fbvnc mouse-injector"
00067 #define UINPUT_INPUTAPI_NAME "fbvnc TS"
00069 #define CONFIGBASEDIR "/usr/share/vnc/"
00070 #define DEFAULT_KBD_LAYOUT "en-us"
00072
00073 #ifdef DEBUG
00074 #define TRACE(STR) if (debug) {rfbLog(STR); }
00075 #define TRACE1(STR,ARG1) if (debug) {rfbLog(STR, ARG1); }
00076 #define TRACE2(STR,ARG1,ARG2) if (debug) {rfbLog(STR, ARG1, ARG2); }
00077 #define TRACE3(STR,ARG1,ARG2,ARG3) if (debug) {rfbLog(STR, ARG1, ARG2, ARG3); }
00078 #define TRACE4(STR,ARG1,ARG2,ARG3,ARG4) if (debug) {rfbLog(STR, ARG1, ARG2, ARG3,ARG4); }
00079 #define TRACE5(STR,ARG1,ARG2,ARG3,ARG4, ARG5) if (debug) {rfbLog(STR, ARG1, ARG2, ARG3,ARG4, ARG5); }
00080 #else
00081 #define TRACE(STR)
00082 #define TRACE1(STR,ARG1)
00083 #define TRACE2(STR,ARG1,ARG2)
00084 #define TRACE3(STR,ARG1,ARG2, ARG3)
00085 #define TRACE4(STR,ARG1,ARG2, ARG3, ARG4)
00086 #define TRACE5(STR,ARG1,ARG2, ARG3, ARG4, ARG5)
00087 #endif
00088
00089 static unsigned short int rotate = 0;
00090 static unsigned short int debug = 0;
00091 static unsigned short int uinput = 1;
00093 static int uinput_fd_kbd = -1;
00094 static int uinput_fd_mouse = -1;
00180 #endif