1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-02 03:52:49 -05:00

Change Seat's get_char_cell_size to get_window_pixel_size.

That's more directly useful in uxpty.c (which is currently the only
actual client of the function), and also matches the data that SSH
clients send in "pty-req". Also, it makes that method behave more like
the GUI query function get_window_pixels used by terminal.c (with the
sole exception that unlike g_w_p it's allowed to return failure), so
it becomes even more trivial to implement in the GUI front ends.
This commit is contained in:
Simon Tatham
2018-10-13 07:37:24 +01:00
parent c95b277798
commit 99c215e761
9 changed files with 19 additions and 21 deletions

10
putty.h
View File

@ -903,12 +903,12 @@ struct SeatVtable {
int (*get_windowid)(Seat *seat, long *id_out);
/*
* Return the pixel size of a terminal character cell. If the
* Return the size of the terminal window in pixels. If the
* concept is meaningless or the information is unavailable,
* return FALSE; otherwise fill in the output pointers and return
* TRUE.
*/
int (*get_char_cell_size)(Seat *seat, int *width, int *height);
int (*get_window_pixel_size)(Seat *seat, int *width, int *height);
};
#define seat_output(seat, is_stderr, data, len) \
@ -939,8 +939,8 @@ struct SeatVtable {
((seat)->vt->get_x_display(seat))
#define seat_get_windowid(seat, out) \
((seat)->vt->get_windowid(seat, out))
#define seat_get_char_cell_size(seat, width, height) \
((seat)->vt->get_char_cell_size(seat, width, height))
#define seat_get_window_pixel_size(seat, width, height) \
((seat)->vt->get_window_pixel_size(seat, width, height))
/* Unlike the seat's actual method, the public entry point
* seat_connection_fatal is a wrapper function with a printf-like API,
@ -983,7 +983,7 @@ int nullseat_is_always_utf8(Seat *seat);
void nullseat_echoedit_update(Seat *seat, int echoing, int editing);
const char *nullseat_get_x_display(Seat *seat);
int nullseat_get_windowid(Seat *seat, long *id_out);
int nullseat_get_char_cell_size(Seat *seat, int *width, int *height);
int nullseat_get_window_pixel_size(Seat *seat, int *width, int *height);
/*
* Seat functions provided by the platform's console-application