/* PDCurses */12#include "pdcwin.h"34/*man-start**************************************************************56pdcsetsc7--------89### Synopsis1011int PDC_set_blink(bool blinkon);12int PDC_set_bold(bool boldon);13void PDC_set_title(const char *title);1415### Description1617PDC_set_blink() toggles whether the A_BLINK attribute sets an actual18blink mode (TRUE), or sets the background color to high intensity19(FALSE). The default is platform-dependent (FALSE in most cases). It20returns OK if it could set the state to match the given parameter,21ERR otherwise.2223PDC_set_bold() toggles whether the A_BOLD attribute selects an actual24bold font (TRUE), or sets the foreground color to high intensity25(FALSE). It returns OK if it could set the state to match the given26parameter, ERR otherwise.2728PDC_set_title() sets the title of the window in which the curses29program is running. This function may not do anything on some30platforms.3132### Portability33X/Open ncurses NetBSD34PDC_set_blink - - -35PDC_set_title - - -3637**man-end****************************************************************/3839int PDC_curs_set(int visibility)40{41CONSOLE_CURSOR_INFO cci;42int ret_vis;4344PDC_LOG(("PDC_curs_set() - called: visibility=%d\n", visibility));4546ret_vis = SP->visibility;4748if (GetConsoleCursorInfo(pdc_con_out, &cci) == FALSE)49return ERR;5051switch(visibility)52{53case 0: /* invisible */54cci.bVisible = FALSE;55break;56case 2: /* highly visible */57cci.bVisible = TRUE;58cci.dwSize = 95;59break;60default: /* normal visibility */61cci.bVisible = TRUE;62cci.dwSize = SP->orig_cursor;63break;64}6566if (SetConsoleCursorInfo(pdc_con_out, &cci) == FALSE)67return ERR;6869SP->visibility = visibility;70return ret_vis;71}7273void PDC_set_title(const char *title)74{75#ifdef PDC_WIDE76wchar_t wtitle[512];77#endif78PDC_LOG(("PDC_set_title() - called:<%s>\n", title));7980#ifdef PDC_WIDE81PDC_mbstowcs(wtitle, title, 511);82SetConsoleTitleW(wtitle);83#else84SetConsoleTitleA(title);85#endif86}8788int PDC_set_blink(bool blinkon)89{90if (!SP)91return ERR;9293if (SP->color_started)94{95COLORS = 16;96if (PDC_can_change_color()) /* is_nt */97{98if (pdc_conemu || SetConsoleMode(pdc_con_out, 0x0004)) /* VT */99COLORS = PDC_MAXCOL;100101if (!pdc_conemu)102SetConsoleMode(pdc_con_out, 0x0010); /* LVB */103}104}105106if (blinkon)107{108if (!(SP->termattrs & A_BLINK))109{110SP->termattrs |= A_BLINK;111pdc_last_blink = GetTickCount();112}113}114else115{116if (SP->termattrs & A_BLINK)117{118SP->termattrs &= ~A_BLINK;119PDC_blink_text();120}121}122123return OK;124}125126int PDC_set_bold(bool boldon)127{128return boldon ? ERR : OK;129}130131132