static void ProcStatus( void ) { disp_optn optn; optn = GetOption(); if( optn == OPEN ) { WndCreateStatusWindow( &WndStatusColour ); } else if( optn == CLOSE ) { WndCloseStatusWindow(); } else { Error( ERR_LOC, LIT_ENG( ERR_BAD_OPTION ), GetCmdName( CMD_DISPLAY ) ); } }
void ProcPaint( void ) { wnd_class wndcls; gui_colour fore; gui_colour back; gui_colour_set *set; bool dialog; int attr; dialog = FALSE; wndcls = WND_NO_CLASS; if( ScanStatus() ) { attr = 0; } else if( ScanCmd( "DIalog\0" ) == 0 ) { dialog = TRUE; attr = ScanAttr( DlgAttrMap, ArraySize( DlgAttrMap ) ); } else { wndcls = ReqWndName(); attr = ScanAttr( AttrMap, ArraySize( AttrMap ) ); } fore = ScanColour(); ScanCmd( "On\0" ); back = ScanColour(); ReqEOC(); if( attr < 0 ) return; if( wndcls == WND_NO_CLASS ) { if( dialog ) { GUIGetDialogColours( WndDlgColours ); set_dlg_attr( (gui_dlg_attr)attr, fore, back ); GUISetDialogColours( WndDlgColours ); } else { WndStatusColour.fore = fore; WndStatusColour.back = back; if( WndHaveStatusWindow() ) { WndCloseStatusWindow(); WndCreateStatusWindow( &WndStatusColour ); } } } else { set = WndClassColour[wndcls]; if( set == NULL ) { set = WndAlloc( sizeof( WndColours ) ); memcpy( set, WndColours, sizeof( WndColours ) ); WndClassColour[wndcls] = set; } set_wndcls_attr( (wnd_attr)attr, set, fore, back, ( wndcls == WND_ALL ) ); _SwitchOn( SW_PENDING_REPAINT ); } }