1 /* $XConsortium: ilX.h /main/3 1995/10/23 15:41:07 rswiston $ */
2 /**---------------------------------------------------------------------
6 *** description: Public declarations and functions for accessing X drawables with IL
9 *** (c)Copyright 1991 Hewlett-Packard Co.
11 *** RESTRICTED RIGHTS LEGEND
12 *** Use, duplication, or disclosure by the U.S. Government is subject to
13 *** restrictions as set forth in sub-paragraph (c)(1)(ii) of the Rights in
14 *** Technical Data and Computer Software clause in DFARS 252.227-7013.
15 *** Hewlett-Packard Company
16 *** 3000 Hanover Street
17 *** Palo Alto, CA 94304 U.S.A.
18 *** Rights for non-DOD U.S. Government Departments and Agencies are as set
19 *** forth in FAR 52.227-19(c)(1,2).
21 ***-------------------------------------------------------------------*/
38 #ifndef NeedFunctionPrototypes
39 #if defined(FUNCPROTO) || defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
40 #define NeedFunctionPrototypes 1
42 #define NeedFunctionPrototypes 0
44 #endif /* NeedFunctionPrototypes */
46 #ifndef NeedWidePrototypes
47 #if defined(NARROWPROTO)
48 #define NeedWidePrototypes 0
50 #define NeedWidePrototypes 1 /* default to make interropt. easier */
54 #ifdef __cplusplus /* do not leave open across includes */
55 extern "C" { /* for C++ V2.0 */
59 /* Option codes to ilChangeXWC() */
60 #define IL_XWC_ALLOC_GRAYS 0 /* pData = null */
61 #define IL_XWC_FREE_GRAYS 1 /* pData = null */
62 #define IL_XWC_ALLOC_COLORS 2 /* pData = null */
63 #define IL_XWC_FREE_COLORS 3 /* pData = null */
64 #define IL_XWC_SET_DITHER_METHOD 4 /* pData -> unsigned int */
65 #define IL_XWC_SET_RAW_MODE 5 /* pData -> ilBool */
67 #define IL_XWC_ALLOC_DITHER_COLORS IL_XWC_ALLOC_COLORS /* no longer used */
68 #define IL_XWC_FREE_DITHER_COLORS IL_XWC_FREE_COLORS /* no longer used */
70 /* Values for ilQueryXWCInfo.visualType */
71 #define IL_XWC_BITONAL 0
72 #define IL_XWC_GRAY_8 1
73 #define IL_XWC_COLOR_8 2
74 #define IL_XWC_COLOR_24 3
76 /* Values for ilQueryXWCInfo.writeType */
77 #define IL_XWC_WRITE_BITONAL 0
78 #define IL_XWC_WRITE_GRAY 1
79 #define IL_XWC_WRITE_COLOR_DITHER 2
80 #define IL_XWC_WRITE_COLOR 3
82 /* Masks for "flags" to ilReadXDrawable */
83 #define IL_READ_X_RAW_MODE (1<<0)
90 unsigned short visualType;
91 ilShortBool staticVisual;
92 unsigned int ditherMethod;
94 unsigned short writeType;
98 typedef ilObject ilXWC;
101 extern ilBool ilReadXDrawable (
102 #if NeedFunctionPrototypes
115 extern ilBool ilConvertForXWrite (
116 #if NeedFunctionPrototypes
120 unsigned long mustBeZero,
125 extern ilBool ilWriteXDrawable (
126 #if NeedFunctionPrototypes
133 unsigned long mustBeZero
137 extern ilXWC ilCreateXWC (
138 #if NeedFunctionPrototypes
144 unsigned long mustBeZero1,
145 unsigned long mustBeZero2
149 extern ilBool ilChangeXWC (
150 #if NeedFunctionPrototypes
157 extern ilBool ilQueryXWC (
158 #if NeedFunctionPrototypes