home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / c-kermit / ckmwin.h < prev    next >
C/C++ Source or Header  |  2020-01-01  |  3KB  |  81 lines

  1. /*
  2.   Copyright (C) 1985, 1992, Trustees of Columbia University in the City of New
  3.   York.  Permission is granted to any individual or institution to use this
  4.   software as long as it is not sold for profit.  This copyright notice must be
  5.   retained.  This software may not be included in commercial products without
  6.   written permission of Columbia University.
  7. */
  8. #define TE_TOOBIG    32000    /* should be less than 32k-1 */
  9. #define TE_TRIM        512    /* should be some approiate size */
  10. #define TE_MAX        32767    /* the maximum size of text in a TE buffer */
  11.  
  12. /*
  13.  * TE window structure
  14.  */
  15. struct cmdw {
  16.     struct cmdw *next;            /* pointer to next in list */
  17.     WindowPtr window;            /* the WindowPtr */
  18.     WindowRecord WRec;            /* store window stuff here */
  19.     ControlHandle vscroll;
  20.     ControlHandle hscroll;
  21.     Rect teviewr;
  22.     TEHandle teh;
  23.     Point theorigin;
  24.     short refNum;            /* file refNum if file opened */
  25.     short vRefNum;            /* vol ref num for file */
  26.     StringPtr fName;            /* file name (pascal string) */
  27.     StringPtr wname;            /* window name (pascal string) */
  28.     int menuitem;            /* item number in Windows menu */
  29.     unsigned short flags;        /* flags */
  30.     int id;                /* id of this cmdw */
  31. };
  32.  
  33. /*
  34.  * Flags field.
  35.  */
  36. #define CMDWF_FOPEN    0x0001        /* opened with fopen */
  37. #define CMDWF_FILE     0x0002        /* window points to a file */
  38. #define CMDWF_MODIFIED 0x0004        /* buffer is modified */
  39.  
  40. /*
  41.  * function prototypes.
  42.  */
  43. struct cmdw *initcmdw();
  44.  
  45. /*
  46.  * Externals
  47.  */
  48. extern struct cmdw *rcmdw;        /* remote command window */
  49. extern struct cmdw *prntw;        /* local "printer" window */
  50. extern int cmdinterminal;
  51.  
  52. /*
  53.  * ckmwin.c prototypes
  54.  */
  55. extern struct cmdw *initcmdw(int id, int vscroll, int hscroll);
  56. extern int sizescrollbars(struct cmdw *cmdw);
  57. extern int sizeteviewr(struct cmdw *cmdw);
  58. extern void growremwindow(struct cmdw *cmdw, Point p);
  59. extern int rcmdwhide(struct cmdw *cmdw);
  60. extern int rrcmdwshow(void);
  61. extern int rcmdwshow(struct cmdw *cmdw);
  62. extern int rcdactivate(struct cmdw *cmdw, int mod);
  63. extern pascal void rdoscroll(ControlHandle WHICHCONTROL, short THECODE);
  64. extern int rcdkey(struct cmdw *cmdw, EventRecord *evt);
  65. extern int rcdmouse(struct cmdw *cmdw, EventRecord *evt);
  66. extern int rcd_cut(struct cmdw *cmdw);
  67. extern int rcd_copy(struct cmdw *cmdw);
  68. extern int rcd_paste(struct cmdw *cmdw);
  69. extern int rcd_clear(struct cmdw *cmdw);
  70. extern int rcdupdate(struct cmdw *cmdw);
  71. extern int scrollbits(struct cmdw *cmdw);
  72. extern int rcdwscroll(struct cmdw *cmdw);
  73. extern int pagescroll(struct cmdw *cmdw, int code, int amount,
  74.               ControlHandle ctrlh);
  75. extern int setscrollmax(struct cmdw *cmdw);
  76. extern VOID cmdout(char);
  77. extern void kSelectWindow(WindowPtr);
  78.  
  79.  
  80.  
  81.