Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mRemoteNG/PuTTYNG.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/defs.h
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2018-10-25 20:44:04 +0300
committerSimon Tatham <anakin@pobox.com>2018-10-25 20:49:17 +0300
commit64f8f68a3434e883bb672f5e484e72845765da4d (patch)
tree68284df0dd5087bc9713deb0d1b177eafe4908e8 /defs.h
parent291c1b07f22ecaccdedf2bfe4a0923673eb8f14b (diff)
Remove the 'Frontend' type and replace it with a vtable.
After the recent Seat and LogContext revamps, _nearly_ all the remaining uses of the type 'Frontend' were in terminal.c, which needs all sorts of interactions with the GUI window the terminal lives in, from the obvious (actually drawing text on the window, reading and writing the clipboard) to the obscure (minimising, maximising and moving the window in response to particular escape sequences). All of those functions are now provided by an abstraction called TermWin. The few remaining uses of Frontend after _that_ are internal to a particular platform directory, so as to spread the implementation of that particular kind of Frontend between multiple source files; so I've renamed all of those so that they take a more specifically named type that refers to the particular implementation rather than the general abstraction. So now the name 'Frontend' no longer exists in the code base at all, and everywhere one used to be used, it's completely clear whether it was operating in one of Frontend's three abstract roles (and if so, which), or whether it was specific to a particular implementation. Another type that's disappeared is 'Context', which used to be a typedef defined to something different on each platform, describing whatever short-lived resources were necessary to draw on the terminal window: the front end would provide a ready-made one when calling term_paint, and the terminal could request one with get_ctx/free_ctx if it wanted to do proactive window updates. Now that drawing context lives inside the TermWin itself, because there was never any need to have two of those contexts live at the same time. (Another minor API change is that the window-title functions - both reading and writing - have had a missing 'const' added to their char * parameters / return values.) I don't expect this change to enable any particularly interesting new functionality (in particular, I have no plans that need more than one implementation of TermWin in the same application). But it completes the tidying-up that began with the Seat and LogContext rework.
Diffstat (limited to 'defs.h')
-rw-r--r--defs.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/defs.h b/defs.h
index bf257117..74aca8b1 100644
--- a/defs.h
+++ b/defs.h
@@ -57,7 +57,8 @@ typedef struct LogPolicyVtable LogPolicyVtable;
typedef struct Seat Seat;
typedef struct SeatVtable SeatVtable;
-typedef struct Frontend Frontend;
+typedef struct TermWin TermWin;
+typedef struct TermWinVtable TermWinVtable;
typedef struct Ssh Ssh;