aboutsummaryrefslogtreecommitdiff
path: root/nxcomp/NXpack.h
diff options
context:
space:
mode:
authorReinhard Tartler <siretart@tauware.de>2011-11-13 09:27:51 +0100
committerReinhard Tartler <siretart@tauware.de>2011-11-13 09:27:51 +0100
commit3e924126b56c4d421e8263d25f6b14aa4ceed047 (patch)
tree921403de7b834fb1ac89f97d84ce105e0b487051 /nxcomp/NXpack.h
parenta840692edc9c6d19cd7c057f68e39c7d95eb767d (diff)
downloadnx-libs-3e924126b56c4d421e8263d25f6b14aa4ceed047.tar.gz
nx-libs-3e924126b56c4d421e8263d25f6b14aa4ceed047.tar.bz2
nx-libs-3e924126b56c4d421e8263d25f6b14aa4ceed047.zip
Imported nxcomp-3.1.0-4.tar.gznxcomp/3.1.0-4
Summary: Imported nxcomp-3.1.0-4.tar.gz Keywords: Imported nxcomp-3.1.0-4.tar.gz into Git repository
Diffstat (limited to 'nxcomp/NXpack.h')
-rwxr-xr-xnxcomp/NXpack.h133
1 files changed, 133 insertions, 0 deletions
diff --git a/nxcomp/NXpack.h b/nxcomp/NXpack.h
new file mode 100755
index 000000000..f26d2c81b
--- /dev/null
+++ b/nxcomp/NXpack.h
@@ -0,0 +1,133 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) 2001, 2007 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 NoMachine S.r.l. */
+/* */
+/* All rights reserved. */
+/* */
+/**************************************************************************/
+
+#ifndef NXpack_H
+#define NXpack_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define MASK_METHOD_LIMIT 10
+
+#define NO_MASK 0
+
+#define MASK_8_COLORS 1
+#define MASK_64_COLORS 2
+#define MASK_256_COLORS 3
+#define MASK_512_COLORS 4
+#define MASK_4K_COLORS 5
+#define MASK_32K_COLORS 6
+#define MASK_64K_COLORS 7
+#define MASK_256K_COLORS 8
+#define MASK_2M_COLORS 9
+#define MASK_16M_COLORS 10
+
+#define PACK_METHOD_LIMIT 128
+
+#define NO_PACK 0
+
+#define PACK_MASKED_8_COLORS 1
+#define PACK_MASKED_64_COLORS 2
+#define PACK_MASKED_256_COLORS 3
+#define PACK_MASKED_512_COLORS 4
+#define PACK_MASKED_4K_COLORS 5
+#define PACK_MASKED_32K_COLORS 6
+#define PACK_MASKED_64K_COLORS 7
+#define PACK_MASKED_256K_COLORS 8
+#define PACK_MASKED_2M_COLORS 9
+#define PACK_MASKED_16M_COLORS 10
+
+#define PACK_RAW_8_BITS 3
+#define PACK_RAW_16_BITS 7
+#define PACK_RAW_24_BITS 10
+
+#define PACK_COLORMAP_256_COLORS 11
+
+#define PACK_JPEG_8_COLORS 26
+#define PACK_JPEG_64_COLORS 27
+#define PACK_JPEG_256_COLORS 28
+#define PACK_JPEG_512_COLORS 29
+#define PACK_JPEG_4K_COLORS 30
+#define PACK_JPEG_32K_COLORS 31
+#define PACK_JPEG_64K_COLORS 32
+#define PACK_JPEG_256K_COLORS 33
+#define PACK_JPEG_2M_COLORS 34
+#define PACK_JPEG_16M_COLORS 35
+
+#define PACK_PNG_8_COLORS 37
+#define PACK_PNG_64_COLORS 38
+#define PACK_PNG_256_COLORS 39
+#define PACK_PNG_512_COLORS 40
+#define PACK_PNG_4K_COLORS 41
+#define PACK_PNG_32K_COLORS 42
+#define PACK_PNG_64K_COLORS 43
+#define PACK_PNG_256K_COLORS 44
+#define PACK_PNG_2M_COLORS 45
+#define PACK_PNG_16M_COLORS 46
+
+#define PACK_RGB_16M_COLORS 63
+#define PACK_RLE_16M_COLORS 64
+
+#define PACK_ALPHA 65
+#define PACK_COLORMAP 66
+
+#define PACK_BITMAP_16M_COLORS 67
+
+/*
+ * Not really pack methods. These values
+ * allow dynamic selection of the pack
+ * method by the agent.
+ */
+
+#define PACK_NONE 0
+#define PACK_LOSSY 253
+#define PACK_LOSSLESS 254
+#define PACK_ADAPTIVE 255
+
+/*
+ * Reduce the number of colors in the
+ * image by applying a mask.
+ */
+
+typedef struct
+{
+ unsigned int color_mask;
+ unsigned int correction_mask;
+ unsigned int white_threshold;
+ unsigned int black_threshold;
+
+} ColorMask;
+
+extern const ColorMask Mask8TrueColor;
+extern const ColorMask Mask64TrueColor;
+extern const ColorMask Mask512TrueColor;
+extern const ColorMask Mask4KTrueColor;
+extern const ColorMask Mask32KTrueColor;
+extern const ColorMask Mask256KTrueColor;
+extern const ColorMask Mask2MTrueColor;
+extern const ColorMask Mask16MTrueColor;
+
+const ColorMask *MethodColorMask(unsigned int method);
+
+int MethodBitsPerPixel(unsigned int method);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* NXpack_H */