/usr/include/xview/cms.h is in xviewg-dev 3.2p1.4-28.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 | /* @(#)cms.h 20.12 89/08/17 SMI */
/*
* (c) Copyright 1989 Sun Microsystems, Inc. Sun design patents
* pending in the U.S. and foreign countries. See LEGAL NOTICE
* file for terms of the license.
*/
#ifndef xview_cms_h_DEFINED
#define xview_cms_h_DEFINED
#include <sys/types.h>
/*
***********************************************************************
* Include files
***********************************************************************
*/
#include <xview/generic.h>
/*
***********************************************************************
* Definitions and Macros
***********************************************************************
*/
/*
* PUBLIC #defines
*/
#define CMS &xv_cms_pkg
#define Xv_Singlecolor Xv_singlecolor
#define CMS_NAME XV_NAME
#define XV_DEFAULT_CMS_SIZE 2
#define CMS_CONTROL_BG1 0
#define CMS_CONTROL_BG2 1
#define CMS_CONTROL_BG3 2
#define CMS_CONTROL_HIGHLIGHT 3
#define CMS_CONTROL_COLORS 4
/*
* Private #defines
*/
#define CMS_ATTR(type, ordinal) ATTR(ATTR_PKG_CMS, type, ordinal)
#define CMS_ATTR_LIST(ltype, type, ordinal) \
CMS_ATTR(ATTR_LIST_INLINE((ltype), (type)), (ordinal))
#define CMS_CONTROL_CMS_NAME(name, visual, color) \
sprintf(name, "xv_ctl_%x_%d%d%d", visual, \
color.red, color.green, color.blue);
#define CMS_STATUS(bits, status) ((bits) & (1 << (status)))
#define CMS_STATUS_DEFAULT 0
#define CMS_STATUS_CONTROL 1
#define CMS_STATUS_FRAME 2
/*
***********************************************************************
* Typedefs, enumerations, and structs
***********************************************************************
*/
typedef Xv_opaque Cms;
typedef enum Xv_cmstype {
XV_STATIC_CMS = 1,
XV_DYNAMIC_CMS = 2
} Cms_type;
typedef enum {
/*
* Public attributes.
*/
CMS_TYPE = CMS_ATTR(ATTR_ENUM, 5),
CMS_SIZE = CMS_ATTR(ATTR_INT, 10),
CMS_COLORS = CMS_ATTR(ATTR_SINGLE_COLOR_PTR, 15),
CMS_NAMED_COLORS = CMS_ATTR_LIST(ATTR_NULL, ATTR_STRING, 16),
CMS_X_COLORS = CMS_ATTR(ATTR_OPAQUE, 17),
CMS_INDEX = CMS_ATTR(ATTR_INT, 20),
CMS_COLOR_COUNT = CMS_ATTR(ATTR_INT, 25),
CMS_SCREEN = CMS_ATTR(ATTR_OPAQUE, 30),
CMS_INDEX_TABLE = CMS_ATTR(ATTR_OPAQUE, 35),
CMS_FOREGROUND_PIXEL= CMS_ATTR(ATTR_INT, 40),
CMS_BACKGROUND_PIXEL= CMS_ATTR(ATTR_INT, 45),
CMS_PIXEL = CMS_ATTR(ATTR_INT, 50),
CMS_CMS_DATA = CMS_ATTR(ATTR_OPAQUE, 55),
CMS_CONTROL_CMS = CMS_ATTR(ATTR_BOOLEAN, 60),
/*
* Private attributes.
*/
CMS_DEFAULT_CMS = CMS_ATTR(ATTR_BOOLEAN, 70),
CMS_FRAME_CMS = CMS_ATTR(ATTR_BOOLEAN, 75),
CMS_CMAP_ID = CMS_ATTR(ATTR_OPAQUE, 80),
CMS_CMAP_TYPE = CMS_ATTR(ATTR_ENUM, 85),
CMS_STATUS_BITS = CMS_ATTR(ATTR_INT, 90)
} Cms_attribute;
typedef struct {
Xv_generic_struct parent_data;
Xv_opaque private_data;
} Xv_cms_struct;
typedef struct xv_cmsdata {
Cms_type type;
short size;
short index;
short rgb_count;
unsigned char *red;
unsigned char *green;
unsigned char *blue;
} Xv_cmsdata;
typedef struct xv_singlecolor {
u_char red, green, blue;
} Xv_singlecolor;
/*
* do we really need this ? check and remove.
*/
typedef struct xv_color_info {
Cms cms;
int cms_fg; /* CMS index of the foreground color */
int cms_bg; /* CMS index of the background color */
} Xv_Color_info;
/*
* Private typedefs
*/
typedef enum {
XV_STATIC_CMAP = 1,
XV_DYNAMIC_CMAP = 2
} Cmap_type;
/*
***********************************************************************
* Globals
***********************************************************************
*/
extern Xv_pkg xv_cms_pkg;
#endif /* ~xview_cms_h_DEFINED */
|