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

Function create_status_window

win/X11/winstat.c:1087–1114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1085}
1086
1087void
1088create_status_window(
1089 struct xwindow *wp, /* window pointer */
1090 boolean create_popup,
1091 Widget parent)
1092{
1093 struct status_info_t *si = (struct status_info_t *) alloc(sizeof *si);
1094
1095 xw_status_win = wp;
1096 if (wp->Win_info.Status_info)
1097 free((genericptr_t) wp->Win_info.Status_info);
1098 wp->Win_info.Status_info = si;
1099 (void) memset((genericptr_t) si, 0, sizeof *si);
1100
1101 if (!appResources.fancy_status)
1102 create_status_window_tty(wp, create_popup, parent);
1103 else
1104 create_status_window_fancy(wp, create_popup, parent);
1105
1106#if 0 /*
1107 * this does not work as intended; it triggers
1108 * "Warning: Cannot find callback list in XtAddCallback"
1109 */
1110 XtAddCallback(wp->w, XtNresizeCallback, stat_resized, (XtPointer) 0);
1111#else
1112 nhUse(stat_resized);
1113#endif
1114}
1115
1116/* callback to deal with the game window being resized */
1117static void

Callers 2

X11_create_nhwindowFunction · 0.85
init_standard_windowsFunction · 0.85

Calls 3

create_status_window_ttyFunction · 0.85
allocFunction · 0.50

Tested by

no test coverage detected