diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2011-11-19 15:59:16 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2011-11-19 15:59:16 +0100 |
commit | a48361b11a5abb5a345dac5ec83a8f56c4d50b74 (patch) | |
tree | a16fb870a072450bb45ee09ac4df9887bfa7f98e /nxcomp/NXvars.h | |
parent | 9997e13bb583de4012914006c7507839a4e11227 (diff) | |
parent | 232dfc41d41390bfffa75ec2ed065c109fa03a0e (diff) | |
download | nx-libs-a48361b11a5abb5a345dac5ec83a8f56c4d50b74.tar.gz nx-libs-a48361b11a5abb5a345dac5ec83a8f56c4d50b74.tar.bz2 nx-libs-a48361b11a5abb5a345dac5ec83a8f56c4d50b74.zip |
Merge branch 'nxcomp'
Diffstat (limited to 'nxcomp/NXvars.h')
-rw-r--r-- | nxcomp/NXvars.h | 193 |
1 files changed, 193 insertions, 0 deletions
diff --git a/nxcomp/NXvars.h b/nxcomp/NXvars.h new file mode 100644 index 000000000..3bee6d3ed --- /dev/null +++ b/nxcomp/NXvars.h @@ -0,0 +1,193 @@ +/**************************************************************************/ +/* */ +/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ +/* */ +/* NXCOMP, NX protocol compression and NX extensions to this software */ +/* are copyright of NoMachine. Redistribution and use of the present */ +/* software is allowed according to terms specified in the file LICENSE */ +/* which comes in the source distribution. */ +/* */ +/* Check http://www.nomachine.com/licensing.html for applicability. */ +/* */ +/* NX and NoMachine are trademarks of Medialogic S.p.A. */ +/* */ +/* All rights reserved. */ +/* */ +/**************************************************************************/ + +#ifndef NXvars_H +#define NXvars_H + +/* + * This can be included by the proxy or another + * layer that doesn't use Xlib. + */ + +#if !defined(_XLIB_H_) && !defined(_XKBSRV_H_) + +#define NeedFunctionPrototypes 1 + +#define Display void + +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Display flush policies. + */ + +#define NXPolicyImmediate 1 +#define NXPolicyDeferred 2 + +/* + * Type of flush. + */ + +#define NXFlushBuffer 0 +#define NXFlushLink 1 + +/* + * Type of statistics. + */ + +#define NXStatisticsPartial 0 +#define NXStatisticsTotal 1 + +/* + * Reason why the display is blocking. + */ + +#define NXBlockRead 1 +#define NXBlockWrite 2 + +/* + * Set if the client is interested in ignoring + * the display error and continue with the exe- + * cution of the program. By default the usual + * Xlib behaviour is gotten, and the library + * will call an exit(). + */ + +extern int _NXHandleDisplayError; + +/* + * The function below is called whenever Xlib is + * going to perform an I/O operation. The funct- + * ion can be redefined to include additional + * checks aimed at detecting if the display needs + * to be closed, for example because of an event + * or a signal mandating the end of the session. + * In this way the client program can regain the + * control before Xlib blocks waiting for input + * from the network. + */ + +typedef int (*NXDisplayErrorPredicate)( +#if NeedFunctionPrototypes + Display* /* display */, + int /* reason */ +#endif +); + +extern NXDisplayErrorPredicate _NXDisplayErrorFunction; + +/* + * This is called when Xlib is going to block + * waiting for the display to become readable or + * writable. The client can use the hook to run + * any arbitrary operation that may require some + * time to complete. The user should not try to + * read or write to the display inside the call- + * back routine. + */ + +typedef void (*NXDisplayBlockHandler)( +#if NeedFunctionPrototypes + Display* /* display */, + int /* reason */ +#endif +); + +extern NXDisplayBlockHandler _NXDisplayBlockFunction; + +/* + * Used to notify the program when more data + * is written to the socket. + */ + +typedef void (*NXDisplayWriteHandler)( +#if NeedFunctionPrototypes + Display* /* display */, + int /* length */ +#endif +); + +extern NXDisplayWriteHandler _NXDisplayWriteFunction; + +/* + * This callback is used to notify the agent + * that the proxy link has been flushed. + */ + +typedef void (*NXDisplayFlushHandler)( +#if NeedFunctionPrototypes + Display* /* display */, + int /* length */ +#endif +); + +extern NXDisplayFlushHandler _NXDisplayFlushFunction; + +/* + * Used by the NX transport to get an arbitrary + * string to add to its protocol statistics. + */ + +typedef void (*NXDisplayStatisticsHandler)( +#if NeedFunctionPrototypes + Display* /* display */, + char* /* buffer */, + int /* size */ +#endif +); + +extern NXDisplayStatisticsHandler _NXDisplayStatisticsFunction; + +/* + * Let users redefine the function printing an + * error message in the case of a out-of-order + * sequence number. + */ + +typedef void (*NXLostSequenceHandler)( +#if NeedFunctionPrototypes + Display* /* display */, + unsigned long /* newseq */, + unsigned long /* lastseq */, + unsigned int /* type */ +#endif +); + +extern NXLostSequenceHandler _NXLostSequenceFunction; + +/* + * Let the X server run the children processes + * (as for example the keyboard initialization + * utilities) by using the native system libra- + * ries, instead of the libraries shipped with + * the NX environment. If set, the Popen() in + * the X server will remove the LD_LIBRARY_PATH + * setting from the environment before calling + * the execl() function in the child process. + */ + +extern int _NXUnsetLibraryPath; + +#ifdef __cplusplus +} +#endif + +#endif /* NXvars_H */ |