#define PUTTY_REG_POS "Software\\SimonTatham\\PuTTY"
+#ifdef macintosh
+#define OPTIMISE_SCROLL
+#endif
+
#ifdef macintosh
#include <MacTypes.h>
+#include <Palettes.h>
typedef UInt32 DWORD;
+struct mac_session;
#endif /* macintosh */
#ifndef TRUE
#define CHAR_MASK 0x000000FFUL
#ifdef macintosh
-typedef void *Context; /* Temporarily until I work out what it should really be */
+struct mac_session;
+typedef struct mac_session *Context;
#else /* not macintosh */
typedef HDC Context;
#endif /* not macintosh */
+#ifdef macintosh
+#define SEL_NL { 13 }
+#else
#define SEL_NL { 13, 10 }
+#endif
/*
* Global variables. Most modules declare these `extern', but
#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 unsigned long attr_mask;
GLOBAL int rows, cols, savelines;
/* Colour options */
int try_palette;
int bold_colour;
+#ifdef macintosh
+ PaletteHandle colours;
+#else /* not macintosh */
unsigned char colours[22][3];
+#endif /* not macintosh */
/* Selection options */
+ int implicit_copy;
+#ifdef macintosh
int mouse_is_xterm;
+#endif
short wordness[256];
} Config;
GLOBAL Config cfg;
+typedef struct {
+ /* 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;
+} Session;
+
+
/*
* Exports from window.c.
*/
void write_clip (void *, int);
void get_clip (void **, int *);
void optimised_move (int, int, int);
+void do_scroll(int, int, int);
void fatalbox (const char *, ...);
void beep (void);
#define OPTIMISE_IS_SCROLL 1
void term_pwron (void);
void term_clrsb (void);
void term_mouse (Mouse_Button, Mouse_Action, int, int);
+void term_copy(void);
+void term_paste(void);
+int term_hasselection(void);
void term_deselect (void);
void term_update (void);
void term_invalidate(void);
* Exports from telnet.c.
*/
-Backend telnet_backend;
+extern Backend telnet_backend;
/*
* Exports from ssh.c.
*/
-Backend ssh_backend;
+extern Backend ssh_backend;
/*
* Exports from sshrand.c.
void *saferealloc(void *, size_t);
void safefree(void *);
+/*
+ * Exports from testback.c
+ */
+
+extern Backend null_backend;
+extern Backend loop_backend;
+
/*
* Exports from version.c.
*/