]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - putty.h
The edit menu is now mostly functional. I'm not sure about paste, since I
[PuTTY.git] / putty.h
diff --git a/putty.h b/putty.h
index 581225b3934bc83a141ab14acf69679b05418881..34b57cb09f4f0c70cc2cd5704a4e7889b073c64a 100644 (file)
--- a/putty.h
+++ b/putty.h
@@ -3,9 +3,15 @@
 
 #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
@@ -41,12 +47,17 @@ typedef UInt32 DWORD;
 #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
@@ -59,23 +70,7 @@ 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 unsigned long attr_mask;
 
 GLOBAL int rows, cols, savelines;
 
@@ -163,14 +158,40 @@ typedef struct {
     /* 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.
  */
@@ -186,6 +207,7 @@ void palette_reset (void);
 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
@@ -223,6 +245,9 @@ void term_scroll (int, int);
 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);
@@ -231,13 +256,13 @@ 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.
@@ -268,6 +293,13 @@ void *safemalloc(size_t);
 void *saferealloc(void *, size_t);
 void safefree(void *);
 
+/*
+ * Exports from testback.c
+ */
+
+extern Backend null_backend;
+extern Backend loop_backend;
+
 /*
  * Exports from version.c.
  */