Minor updates to PDCurses.

This commit is contained in:
casey langen 2022-07-30 20:35:07 -07:00
parent 16596c6ad4
commit c3231a49aa
4 changed files with 18 additions and 24 deletions

View File

@ -39,10 +39,10 @@ Defined by this header:
/* the 'endwin_*' #defines below should be updated. */
#define PDC_VER_MAJOR 4
#define PDC_VER_MINOR 3
#define PDC_VER_CHANGE 3
#define PDC_VER_CHANGE 4
#define PDC_VER_YEAR 2022
#define PDC_VER_MONTH 07
#define PDC_VER_DAY 24
#define PDC_VER_DAY 29
#define PDC_STRINGIZE( x) #x
#define PDC_stringize( x) PDC_STRINGIZE( x)
@ -1785,6 +1785,7 @@ PDCEX void PDC_set_window_resized_callback(void (*callback)());
PDCEX int PDC_set_preferred_fontface( const wchar_t* fontface);
PDCEX void PDC_set_color_intensify_enabled( bool enabled);
PDCEX void PDC_set_default_menu_visibility(int visible);
PDCEX WINDOW *Xinitscr(int, char **);
#ifdef XCURSES

View File

@ -207,13 +207,13 @@ WINDOW *getwin(FILE *filep)
}
win->_attrs = _get_chtype_from_eight_bytes( buff);
win->_bkgd = _get_chtype_from_eight_bytes( buff + 8);
win->_clear = _clear;
win->_leaveit = _leaveit;
win->_scroll = _scroll;
win->_nodelay = _nodelay;
win->_immed = _immed;
win->_sync = _sync;
win->_use_keypad = _use_keypad;
win->_clear = (bool)_clear;
win->_leaveit = (bool)_leaveit;
win->_scroll = (bool)_scroll;
win->_nodelay = (bool)_nodelay;
win->_immed = (bool)_immed;
win->_sync = (bool)_sync;
win->_use_keypad = (bool)_use_keypad;
nlines = win->_maxy;

View File

@ -21,10 +21,6 @@ util
short color_pair, const void *opts);
wchar_t *wunctrl(cchar_t *wc);
int PDC_mbtowc(wchar_t *pwc, const char *s, size_t n);
size_t PDC_mbstowcs(wchar_t *dest, const char *src, size_t n);
size_t PDC_wcstombs(char *dest, const wchar_t *src, size_t n);
### Description
unctrl() expands the text portion of the chtype c into a printable
@ -67,9 +63,6 @@ util
getcchar Y Y Y
setcchar Y Y Y
wunctrl Y Y Y
PDC_mbtowc - - -
PDC_mbstowcs - - -
PDC_wcstombs - - -
**man-end****************************************************************/

View File

@ -985,6 +985,7 @@ INLINE int set_default_sizes_from_registry( const int n_cols, const int n_rows,
static void adjust_font_size( const int font_size_change)
{
extern int PDC_font_size;
RECT client_rect;
PDC_font_size += font_size_change;
if( PDC_font_size < 2)
@ -1001,22 +1002,21 @@ static void adjust_font_size( const int font_size_change)
/* you disagree, I have others. */
if( IsZoomed( PDC_hWnd))
{
RECT client_rect;
GetClientRect( PDC_hWnd, &client_rect);
GetClientRect(PDC_hWnd, &client_rect);
PDC_n_rows = client_rect.bottom / PDC_cyChar;
PDC_n_cols = client_rect.right / PDC_cxChar;
keep_size_within_bounds( &PDC_n_rows, &PDC_n_cols);
PDC_resize_screen( PDC_n_rows, PDC_n_cols);
add_key_to_queue( KEY_RESIZE);
keep_size_within_bounds(&PDC_n_rows, &PDC_n_cols);
PDC_resize_screen(PDC_n_rows, PDC_n_cols);
add_key_to_queue(KEY_RESIZE);
SP->resized = TRUE;
GetClientRect( PDC_hWnd, &client_rect);
InvalidateRect(PDC_hWnd, &client_rect, FALSE);
}
else
{
PDC_resize_screen( PDC_n_rows, PDC_n_cols);
InvalidateRect( PDC_hWnd, NULL, FALSE);
}
InvalidateRect(PDC_hWnd, NULL, FALSE);
UpdateWindow(PDC_hWnd);
}
#define WM_ENLARGE_FONT (WM_USER + 1)