File indexing completed on 2025-01-18 10:15:23
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028 #ifndef _XmColorP_h
0029 #define _XmColorP_h
0030
0031 #include <X11/Intrinsic.h>
0032
0033 #ifdef __cplusplus
0034 extern "C" {
0035 #endif
0036
0037
0038
0039
0040 #define DEFAULT_ALLOCCOLOR_PROC (XAllocColor)
0041
0042
0043
0044 #define XmMAX_SHORT 65535
0045
0046 #define XmCOLOR_PERCENTILE (XmMAX_SHORT / 100)
0047 #define BoundColor(value)\
0048 ((value < 0) ? 0 : (((value > XmMAX_SHORT) ? XmMAX_SHORT : value)))
0049
0050
0051
0052 #define XmRED_LUMINOSITY 0.30
0053 #define XmGREEN_LUMINOSITY 0.59
0054 #define XmBLUE_LUMINOSITY 0.11
0055
0056
0057
0058
0059 #define XmINTENSITY_FACTOR 75
0060 #define XmLIGHT_FACTOR 0
0061 #define XmLUMINOSITY_FACTOR 25
0062
0063
0064
0065
0066 #define XmCOLOR_LITE_SEL_FACTOR 15
0067 #define XmCOLOR_LITE_BS_FACTOR 40
0068 #define XmCOLOR_LITE_TS_FACTOR 20
0069
0070
0071
0072
0073 #define XmCOLOR_DARK_SEL_FACTOR 15
0074 #define XmCOLOR_DARK_BS_FACTOR 30
0075 #define XmCOLOR_DARK_TS_FACTOR 50
0076
0077
0078
0079
0080
0081
0082
0083
0084 #define XmCOLOR_HI_SEL_FACTOR 15
0085 #define XmCOLOR_HI_BS_FACTOR 40
0086 #define XmCOLOR_HI_TS_FACTOR 60
0087
0088 #define XmCOLOR_LO_SEL_FACTOR 15
0089 #define XmCOLOR_LO_BS_FACTOR 60
0090 #define XmCOLOR_LO_TS_FACTOR 50
0091
0092
0093
0094
0095 #define XmLOOK_AT_SCREEN (1<<0)
0096 #define XmLOOK_AT_CMAP (1<<1)
0097 #define XmLOOK_AT_BACKGROUND (1<<2)
0098 #define XmLOOK_AT_FOREGROUND (1<<3)
0099 #define XmLOOK_AT_TOP_SHADOW (1<<4)
0100 #define XmLOOK_AT_BOTTOM_SHADOW (1<<5)
0101 #define XmLOOK_AT_SELECT (1<<6)
0102
0103 #define XmBACKGROUND ((unsigned char) (1<<0))
0104 #define XmFOREGROUND ((unsigned char) (1<<1))
0105 #define XmTOP_SHADOW ((unsigned char) (1<<2))
0106 #define XmBOTTOM_SHADOW ((unsigned char) (1<<3))
0107 #define XmSELECT ((unsigned char) (1<<4))
0108 #define XmHIGHLIGHT ((unsigned char) (1<<5))
0109
0110
0111 typedef struct _XmColorData
0112 { Screen * screen;
0113 Colormap color_map;
0114 unsigned char allocated;
0115 XColor background;
0116 XColor foreground;
0117 XColor top_shadow;
0118 XColor bottom_shadow;
0119 XColor select;
0120 } XmColorData;
0121
0122 #ifdef __cplusplus
0123 }
0124 #endif
0125
0126
0127 #endif
0128