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 _XmColorObjP_h
0029 #define _XmColorObjP_h
0030
0031 #include <Xm/VendorSP.h>
0032
0033 #ifdef __cplusplus
0034 extern "C" {
0035 #endif
0036
0037
0038
0039 #define XmCO_MAX_NUM_COLORS 8
0040 #define XmCO_NUM_COLORS XmCO_MAX_NUM_COLORS
0041 #define XmPIXEL_SET_PROP_VERSION '1'
0042
0043
0044 enum { XmCO_BLACK_WHITE, XmCO_LOW_COLOR, XmCO_MEDIUM_COLOR, XmCO_HIGH_COLOR };
0045
0046 typedef struct {
0047 Pixel fg;
0048 Pixel bg;
0049 Pixel ts;
0050 Pixel bs;
0051 Pixel sc;
0052 } XmPixelSet;
0053
0054 typedef XmPixelSet Colors[XmCO_NUM_COLORS];
0055
0056 typedef struct _XmColorObjPart {
0057 XtArgsProc RowColInitHook;
0058 XmPixelSet *myColors;
0059 int myScreen;
0060 Display *display;
0061 Colors *colors;
0062 int numScreens;
0063 Atom *atoms;
0064 Boolean colorIsRunning;
0065 Boolean done;
0066 int *colorUse;
0067 int primary;
0068 int secondary;
0069 int text;
0070 int active;
0071 int inactive;
0072 Boolean useColorObj;
0073 Boolean useText;
0074 Boolean useTextForList;
0075
0076 Boolean useMask;
0077 Boolean useMultiColorIcons;
0078 Boolean useIconFileCache;
0079
0080 } XmColorObjPart;
0081
0082
0083 typedef struct _XmColorObjRec {
0084 CorePart core;
0085 CompositePart composite;
0086 ShellPart shell;
0087 WMShellPart wm;
0088 XmColorObjPart color_obj;
0089 } XmColorObjRec;
0090
0091 typedef struct _XmColorObjClassPart {
0092 XtPointer extension;
0093 } XmColorObjClassPart;
0094
0095
0096
0097
0098
0099 typedef struct _XmColorObjClassRec{
0100 CoreClassPart core_class;
0101 CompositeClassPart composite_class;
0102 ShellClassPart shell_class;
0103 WMShellClassPart wm_shell_class;
0104 XmColorObjClassPart color_obj_class;
0105 } XmColorObjClassRec;
0106
0107
0108 externalref XmColorObjClassRec xmColorObjClassRec;
0109
0110
0111 #ifndef XmIsColorObj
0112 #define XmIsColorObj(w) (XtIsSubclass(w, xmColorObjClass))
0113 #endif
0114
0115 externalref WidgetClass xmColorObjClass;
0116 typedef struct _XmColorObjClassRec *XmColorObjClass;
0117 typedef struct _XmColorObjRec *XmColorObj;
0118
0119
0120 #define XmCO_DitherTopShadow(display, screen, pixelSet) \
0121 ((pixelSet)->bs == BlackPixel((display), (screen)))
0122
0123 #define XmCO_DitherBottomShadow(display, screen, pixelSet) \
0124 ((pixelSet)->ts == WhitePixel((display), (screen)))
0125
0126 #define XmCO_DITHER XmS50_foreground
0127 #define XmCO_NO_DITHER XmSunspecified_pixmap
0128
0129
0130
0131
0132 extern Boolean XmeGetIconControlInfo(
0133 Screen *screen,
0134 Boolean *useMaskRtn,
0135 Boolean *useMultiColorIconsRtn,
0136 Boolean *useIconFileCacheRtn) ;
0137
0138 extern Boolean XmeUseColorObj( void ) ;
0139
0140
0141 extern Boolean XmeGetColorObjData(
0142 Screen * screen,
0143 int *colorUse,
0144 XmPixelSet *pixelSet,
0145 unsigned short num_pixelSet,
0146 short *active_id,
0147 short *inactive_id,
0148 short *primary_id,
0149 short *secondary_id,
0150 short *text_id) ;
0151
0152 extern Boolean XmeGetDesktopColorCells (
0153 Screen * screen,
0154 Colormap colormap,
0155 XColor * colors,
0156 int n_colors,
0157 int * ncolors_returns) ;
0158
0159 extern Boolean XmeGetPixelData (
0160 int screen_number,
0161 int *colorUse,
0162 XmPixelSet *pixelSet,
0163 short *a,
0164 short *i,
0165 short *p,
0166 short *s) ;
0167
0168
0169
0170
0171 #ifdef __cplusplus
0172 }
0173 #endif
0174
0175 #endif
0176