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

Function nhFreePixel

win/X11/winX.c:719–744  ·  view source on GitHub ↗

ARGSUSED */

Source from the content-addressed store, hash-verified

717
718/* ARGSUSED */
719static void
720nhFreePixel(
721 XtAppContext app,
722 XrmValuePtr toVal,
723 XtPointer closure,
724 XrmValuePtr args,
725 Cardinal *num_args)
726{
727 Screen *screen;
728 Colormap colormap;
729
730 if (*num_args != 2) {
731 XtAppWarningMsg(app, "wrongParameters", "freePixel", "XtToolkitError",
732 "Freeing a pixel requires screen and colormap arguments",
733 (String *) 0, (Cardinal *) 0);
734 return;
735 }
736
737 screen = *((Screen **) args[0].addr);
738 colormap = *((Colormap *) args[1].addr);
739
740 if (closure) {
741 XFreeColors(DisplayOfScreen(screen), colormap,
742 (unsigned long *) toVal->addr, 1, (unsigned long) 0);
743 }
744}
745
746/* [ALI] Utility function to ask Xaw for font height, since the previous
747 * assumption of ascent + descent is not always valid.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected