* Fill in parameters "regular" and "inverse" with newly created GCs. * Using the given background pixel and the foreground pixel obtained * by querying the widget with the resource name. */
| 908 | * by querying the widget with the resource name. |
| 909 | */ |
| 910 | static void |
| 911 | set_gc( |
| 912 | Widget w, |
| 913 | Font font, |
| 914 | const char *resource_name, |
| 915 | Pixel bgpixel, |
| 916 | GC *regular, GC *inverse) |
| 917 | { |
| 918 | XGCValues values; |
| 919 | XtGCMask mask = GCFunction | GCForeground | GCBackground | GCFont; |
| 920 | Pixel curpixel; |
| 921 | Arg arg[1]; |
| 922 | |
| 923 | XtSetArg(arg[0], (char *) resource_name, &curpixel); |
| 924 | XtGetValues(w, arg, ONE); |
| 925 | |
| 926 | values.foreground = curpixel; |
| 927 | values.background = bgpixel; |
| 928 | values.function = GXcopy; |
| 929 | values.font = font; |
| 930 | *regular = XtGetGC(w, mask, &values); |
| 931 | values.foreground = bgpixel; |
| 932 | values.background = curpixel; |
| 933 | values.function = GXcopy; |
| 934 | values.font = font; |
| 935 | *inverse = XtGetGC(w, mask, &values); |
| 936 | } |
| 937 | |
| 938 | /* |
| 939 | * Create the GC's for each color. |
nothing calls this directly
no outgoing calls
no test coverage detected