MCPcopy Create free account
hub / github.com/NetHack/NetHack / get_gc

Function get_gc

win/X11/winmesg.c:549–566  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

547}
548
549static void
550get_gc(Widget w, struct mesg_info_t *mesg_info)
551{
552 XGCValues values;
553 XtGCMask mask = GCFunction | GCForeground | GCBackground | GCFont;
554 Pixel fgpixel, bgpixel;
555 Arg arg[2];
556
557 XtSetArg(arg[0], XtNforeground, &fgpixel);
558 XtSetArg(arg[1], XtNbackground, &bgpixel);
559 XtGetValues(w, arg, TWO);
560
561 values.foreground = fgpixel;
562 values.background = bgpixel;
563 values.function = GXcopy;
564 values.font = WindowFont(w);
565 mesg_info->gc = XtGetGC(w, mask, &values);
566}
567
568/*
569 * Handle resizes on a message window. Correct saved pixel height and width.

Callers 1

create_message_windowFunction · 0.85

Calls 1

WindowFontFunction · 0.85

Tested by

no test coverage detected