Ejemplo n.º 1
0
/*
 * Erase the contents of the statusline if it starts with 'pattern'.
 */
void
statusline_erase(const char *pattern)
{
    const char *buf = NULL;
    if (XtIsRealized(globals.widgets.top_level) && initialized && (resource.expert_mode & XPRT_SHOW_STATUSLINE) != 0) {
	/* get current statusline contents */
#ifdef MOTIF
	XtVaGetValues(statusline, XmNvalue, &buf, NULL);
#else
	XtVaGetValues(statusline, XtNlabel, &buf, NULL);
#endif

	if (strncmp(buf, pattern, strlen(pattern)) == 0) {
	    statusline_clear();
	}
    }
}
Ejemplo n.º 2
0
void deletestatusline(void)
{
	if (!statusline_hdc)
		return;
	if (!statusline_bitmap)
		DeleteObject(statusline_bitmap);
	if (statusline_hdc)
		ReleaseDC(NULL, statusline_hdc);
	if (statusline_font)
		DeleteObject(statusline_font);
	if (statusline_palette)
		DeleteObject(statusline_palette);
	statusline_bitmap = NULL;
	statusline_hdc = NULL;
	statusline_font = NULL;
	statusline_palette = NULL;
	statusline_clear();
}