mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 09:58:01 +00:00
End of a night's work. Not a very useful state, but this is my branch and
I'll do what I want with it. Anyway, made a start on a Mac display for the terminal emulator, and the enumeration of the global variables that will have to die. Oh, and the licence is now in a TEXT resource -- I just have to work out how to display it... [originally from svn r53]
This commit is contained in:
parent
e230e36e2f
commit
29f26a1050
7
mac.c
7
mac.c
@ -1,4 +1,4 @@
|
||||
/* $Id: mac.c,v 1.1.2.4 1999/02/20 22:10:33 ben Exp $ */
|
||||
/* $Id: mac.c,v 1.1.2.5 1999/02/20 23:55:55 ben Exp $ */
|
||||
/*
|
||||
* mac.c -- miscellaneous Mac-specific routines
|
||||
*/
|
||||
@ -39,6 +39,8 @@ static void mac_closewindow(WindowPtr);
|
||||
static void mac_zoomwindow(WindowPtr, short);
|
||||
static void mac_shutdown(void);
|
||||
|
||||
static void mac_newsession(void);
|
||||
|
||||
int main (int argc, char **argv) {
|
||||
|
||||
mac_startup();
|
||||
@ -230,6 +232,9 @@ static void mac_menucommand(long result) {
|
||||
break;
|
||||
case mFile:
|
||||
switch (item) {
|
||||
case iNew:
|
||||
mac_newsession();
|
||||
break;
|
||||
case iClose:
|
||||
mac_closewindow(FrontWindow());
|
||||
break;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: macresid.h,v 1.1.2.1 1999/02/20 22:10:34 ben Exp $ */
|
||||
/* $Id: macresid.h,v 1.1.2.2 1999/02/20 23:55:55 ben Exp $ */
|
||||
|
||||
/*
|
||||
* macresid.h -- Mac resource IDs
|
||||
@ -18,8 +18,9 @@
|
||||
/* Apple menu */
|
||||
#define iAbout 1
|
||||
/* File menu */
|
||||
#define iClose 1
|
||||
#define iQuit 3
|
||||
#define iNew 1
|
||||
#define iClose 2
|
||||
#define iQuit 4
|
||||
|
||||
/* Window types (and resource IDs) */
|
||||
#define wNone 0 /* Dummy value for no window */
|
||||
|
18
putty.h
18
putty.h
@ -59,6 +59,24 @@ typedef HDC Context;
|
||||
#define GLOBAL extern
|
||||
#endif
|
||||
|
||||
struct session {
|
||||
/* Display state */
|
||||
int rows, cols, savelines;
|
||||
int font_width, font_height;
|
||||
int has_focus;
|
||||
/* Buffers */
|
||||
unsigned char inbuf[INBUF_SIZE];
|
||||
int inbuf_head, inbuf_reap;
|
||||
unsigned char outbuf[OUTBUF_SIZE];
|
||||
int outbuf_head, outbuf_reap;
|
||||
/* Emulator state */
|
||||
int app_cursor_keys, app_keypad_keys;
|
||||
/* Backend */
|
||||
Backend *back;
|
||||
/* Config that created this session */
|
||||
Config cfg;
|
||||
}
|
||||
|
||||
GLOBAL int rows, cols, savelines;
|
||||
|
||||
GLOBAL int font_width, font_height;
|
||||
|
15
putty.r
15
putty.r
@ -1,4 +1,4 @@
|
||||
/* $Id: putty.r,v 1.1.2.5 1999/02/20 22:10:34 ben Exp $ */
|
||||
/* $Id: putty.r,v 1.1.2.6 1999/02/20 23:55:55 ben Exp $ */
|
||||
/* PuTTY resources */
|
||||
|
||||
#define PICT_RezTemplateVersion 1
|
||||
@ -271,6 +271,7 @@ resource 'MENU' (mFile, preload) {
|
||||
enabled,
|
||||
"File",
|
||||
{
|
||||
"New Session" noicon, "N", nomark, plain,
|
||||
"Close", noicon, "W", nomark, plain,
|
||||
"-", noicon, nokey, nomark, plain,
|
||||
"Quit", noicon, "Q", nomark, plain,
|
||||
@ -309,6 +310,18 @@ resource 'DITL' (wFatal, "fatalbox", purgeable) {
|
||||
}
|
||||
};
|
||||
|
||||
/* Terminal window */
|
||||
|
||||
resource 'WIND' (wTerminal, "terminal", purgeable) {
|
||||
{ 0, 0, 0, 0 },
|
||||
zoomDocProc,
|
||||
invisible,
|
||||
goAway,
|
||||
0x0,
|
||||
"untitled"
|
||||
staggerParentWindowScreen
|
||||
};
|
||||
|
||||
/* "About" box */
|
||||
|
||||
resource 'DLOG' (wAbout, "about", purgeable) {
|
||||
|
Loading…
Reference in New Issue
Block a user