FACT++  1.0
void get_all_colors ( Display *  display,
Widget  w 
)

Definition at line 218 of file dui_util.c.

References BLACK, BLUE, get_something(), GRAY, GREEN, LIGHTGRAY, NONE, ORANGE, RED, rgb_colors, WHITE, and YELLOW.

Referenced by app_initialize().

221 {
222  XColor a,b;
223  Colormap cm;
224  cm = DefaultColormap ( display, DefaultScreen(display));
225 
226  XAllocNamedColor ( display, cm, "Medium Aquamarine", &a,&b );
227  rgb_colors[GREEN] = b.pixel;
228 
229  XAllocNamedColor ( display, cm, "Turquoise", &a,&b );
230  rgb_colors[BLUE] = b.pixel;
231 
232  XAllocNamedColor ( display, cm, "Yellow", &a,&b );
233  rgb_colors[YELLOW] = b.pixel;
234 
235  XAllocNamedColor ( display, cm, "Orange", &a,&b );
236  rgb_colors[ORANGE] = b.pixel;
237 
238  XAllocNamedColor ( display, cm, "Red", &a,&b );
239  rgb_colors[RED] = b.pixel;
240 
241  XAllocNamedColor ( display, cm, "Black", &a,&b );
242  rgb_colors[BLACK] = b.pixel;
243 
244  XAllocNamedColor ( display, cm, "White", &a,&b );
245  rgb_colors[WHITE] = b.pixel;
246 
247  XAllocNamedColor ( display, cm, "Light Gray", &a,&b );
248  rgb_colors[GRAY] = b.pixel;
249 
250  XAllocNamedColor ( display, cm, "Gainsboro", &a,&b );
251  rgb_colors[LIGHTGRAY] = b.pixel;
252 /*
253  MrmFetchColorLiteral(hid, "green", display, 0, &rgb_colors[GREEN]);
254  MrmFetchColorLiteral(hid, "blue", display, 0, &rgb_colors[BLUE]);
255  MrmFetchColorLiteral(hid, "yellow", display, 0, &rgb_colors[YELLOW]);
256  MrmFetchColorLiteral(hid, "orange", display, 0, &rgb_colors[ORANGE]);
257  MrmFetchColorLiteral(hid, "red", display, 0, &rgb_colors[RED]);
258  MrmFetchColorLiteral(hid, "black", display, 0, &rgb_colors[BLACK]);
259  MrmFetchColorLiteral(hid, "white", display, 0, &rgb_colors[WHITE]);
260 */
261  get_something(w,XmNbackground,&rgb_colors[NONE]);
262 }
void get_something(Widget w, char *resource, char *value)
Definition: dui_util.c:94
Definition: dui_colors.h:4
Pixel rgb_colors[MAX_COLORS]
Definition: dui_util.c:161
Definition: dui_colors.h:4
Display * display
Definition: did.h:37
Definition: dui_colors.h:4
Definition: dui_colors.h:4

+ Here is the call graph for this function:

+ Here is the caller graph for this function: