home *** CD-ROM | disk | FTP | other *** search
/ The Best of Mecomp Multimedia 1 / Mecomp-CD.iso / amiga / tools / utillities / vinced / include / window.h < prev   
Encoding:
C/C++ Source or Header  |  1997-05-19  |  29.2 KB  |  769 lines

  1. #ifndef VNC_WINDOW_H
  2. #define VNC_WINDOW_H
  3. /*********************************************************
  4.  ** ViNCEd                                              **
  5.  ** a DOS - window handler                              **
  6.  **                                                     **
  7.  ** © 1991-97 THOR-Software inc.                        **
  8.  ** Version 3.40                                        **
  9.  **                                                     **
  10.  ** program version 1.23 05/03/91       THOR            **
  11.  ** update  version 1.25 06/19/91       THOR            **
  12.  ** header file 06/19/91                THOR            **
  13.  ** updated to 3.30      03/31/97       THOR            **
  14.  ** updated to 3.40      05/05/97       THOR            **
  15.  ** updated to 3.41     05/19/97    THOR        **
  16.  **                                                     **
  17.  ** ViNCEd Window: The main structure (vcn)             **
  18.  **-----------------------------------------------------**
  19.  **                                                     **
  20.  ** all use at your own risk,etc.,etc.                  **
  21.  **                                                     **
  22.  ** Everything declared as "reserved" or                **
  23.  ** "not used" is NOT free for your use,                **
  24.  ** it will propably used in a later release.           **
  25.  ** All FREE entries are free for public                **
  26.  ** use and are, if not otherwise noted,                **
  27.  ** initialized with ZERO                               **
  28.  *********************************************************/
  29.  
  30. #ifndef EXEC_TYPES_H
  31. #include <exec/types.h>
  32. #endif
  33.  
  34. #ifndef EXEC_LIBRARIES_H
  35. #include <exec/libraries.h>
  36. #endif
  37.  
  38. #ifndef EXEC_PORTS_H
  39. #include <exec/ports.h>
  40. #endif
  41.  
  42. #ifndef EXEC_SEMAPHORES_H
  43. #include <exec/semaphores.h>
  44. #endif
  45.  
  46. #ifndef EXEC_IO_H
  47. #include <exec/io.h>
  48. #endif
  49.  
  50. #ifndef EXEC_DEVICES_H
  51. #include <exec/devices.h>
  52. #endif
  53.  
  54. #ifndef DEVICES_TIMER_H
  55. #include <devices/timer.h>
  56. #endif
  57.  
  58. #ifndef DEVICES_CONSOLE_H
  59. #include <devices/console.h>
  60. #endif
  61.  
  62. #ifndef DEVICES_CONUNIT_H
  63. #include <devices/conunit.h>
  64. #endif
  65.  
  66. #ifndef DEVICES_KEYMAP_H
  67. #include <devices/keymap.h>
  68. #endif
  69.  
  70. #ifndef GRAPHICS_CLIP_H
  71. #include <graphics/clip.h>
  72. #endif
  73.  
  74. #ifndef GRAPHICS_GFX_H
  75. #include <graphics/gfx.h>
  76. #endif
  77.  
  78. #ifndef GRAPHICS_RASTPORT_H
  79. #include <graphics/rastport.h>
  80. #endif
  81.  
  82. #ifndef GRAPHICS_TEXT_H
  83. #include <graphics/text.h>
  84. #endif
  85.  
  86. #ifndef UTILITY_TAGITEM_H
  87. #include <utility/tagitem.h>
  88. #endif
  89.  
  90. #ifndef INTUITION_INTUITION_H
  91. #include <intuition/intuition.h>
  92. #endif
  93.  
  94. #ifndef INTUITION_SCREENS_H
  95. #include <intuition/screens.h>
  96. #endif
  97.  
  98. #ifndef DOS_DOS_H
  99. #include <dos/dos.h>
  100. #endif
  101.  
  102. #ifndef DOS_DOSEXTENS_H
  103. #include <dos/dosextens.h>
  104. #endif
  105.  
  106. #ifndef WORKBENCH_WORKBENCH_H
  107. #include <workbench/workbench.h>
  108. #endif
  109.  
  110. #ifndef VNC_VNCBASE_H
  111. #include <vnc/vncbase.h>
  112. #endif
  113.  
  114. #ifndef VNC_PREFS_H
  115. #include <vnc/prefs.h>
  116. #endif
  117.  
  118. #ifndef VNC_OWNER_H
  119. #include <vnc/owner.h>
  120. #endif
  121.  
  122. #ifndef VNC_DYNAMICS_H
  123. #include <vnc/dynamics.h>
  124. #endif
  125.  
  126.  
  127. /* This is the description of the main structure of ViNCEd, the
  128.    ViNCWindow. It is linked to a group of "owners" that share
  129.    a common output window. This window is described by this structure */
  130.  
  131. struct ViNCWindow {
  132.         struct ViNCWindow       *vcn_succ,*vcn_pred; /* linked list in
  133.                                                         library base */
  134.         UWORD                    vcn_Version;        /* version information */
  135.         UWORD                    vcn_Revision;
  136.         struct SignalSemaphore   vcn_Semaphore;      /* access grant. DO
  137.                                                         NOT TOUCH. Use
  138.                                                         LockWindow(),
  139.                                                         UnLockWindow()! */
  140.         UWORD                    vcn_OpenCount;      /* times DOS Open'd
  141.                                                         this. No lock count,
  142.                                                         no asyncs here */
  143.  
  144. /* base pointers */
  145.         struct VNCBase          *vcn_VNCBase;        /* library base */
  146.         struct ViUserNode       *vcn_UserNode;       /* for you. See below*/
  147.  
  148. /* important flags */
  149.         ULONG                    vcn_Flags;
  150.         ULONG                    vcn_ExtFlags;       /* even more */
  151.         ULONG                    vnc_EventFlags;     /* received events */
  152.         ULONG                    vcn_DOSFlags;       /* much more */
  153.         ULONG                    vcn_RequestedEvents;/* receive which input
  154.                                                         events */
  155.  
  156. /* links to the system */
  157.         struct Window           *vcn_Window;    /* the intuition window,
  158.                                                    if open */
  159.         struct ViNCNewWindow    *vcn_NewWindow; /* temporary for reopen */
  160.         struct RastPort         *vcn_RastPort;  /* private one, for drawing*/
  161.         struct Layer            *vcn_Layer;     /* the layer */
  162.         struct Screen           *vcn_Screen;    /* the screen the window is
  163.                                                    displayed on, if open */
  164.         struct TmpRas           *vcn_TmpRas;    /* used to speedup
  165.                                                    scrolling */
  166.         struct TextFont         *vcn_TextFont;  /* text used for rendering*/
  167.         void                    *vcn_MemPool;   /* ViNCEd's private memory
  168.                                                    pool. Do not touch, THIS
  169.                                                    IS NOT EXEC COMPATIBLE */
  170.  
  171.         struct DosList          *vcn_DeviceNode; /* no BPTR! Pointer to
  172.                                                     dos device entry */
  173.  
  174.         struct ConUnit          *vcn_ConUnit;   /* ConUnit for backwards
  175.                                                    compatibility */
  176.  
  177.         struct KeyMap           *vcn_KeyMap;    /* used keyboard */
  178.  
  179.         UWORD                   *vcn_TabStops;  /* array of TAB positions*/
  180.  
  181. /* size of window and font */
  182.  
  183.         UWORD                    vcn_TXSize;
  184.         UWORD                    vcn_TYSize;    /* Size of the font */
  185.  
  186.         UWORD                    vcn_TBaseLine; /* text base line */
  187.  
  188.         UWORD                    vcn_TotalCount;/* total open count of
  189.                                                    all structures.
  190.                                                    The handler is allowed
  191.                                                    to leave not until this
  192.                                                    is zero */
  193.         UWORD                    vcn_LeftOffset;/* text starting offset
  194.                                                    in the window */
  195.         UWORD                    vcn_TopOffset; /* same, but vertical */
  196.         UWORD                    vcn_RightOffset;
  197.         UWORD                    vcn_BottomOffset; /* for mini clipping */
  198.  
  199.         UWORD                    vcn_Width;
  200.         UWORD                    vcn_Height;    /* available area for
  201.                                                    drawing in pixels */
  202.  
  203.         UWORD                    vcn_CWidth;
  204.         UWORD                    vcn_CHeight;   /* same in characters */
  205.  
  206.         UWORD                    vcn_BProtLeft;
  207.         UWORD                    vcn_BProtTop;
  208.         UWORD                    vcn_BPropRight;
  209.         UWORD                    vcn_BPortBottom;
  210.                                                 /* border protection
  211.                                                    zone, against
  212.                                                    italic characters */
  213.  
  214.         UWORD                    vcn_RightScroll;
  215.         UWORD                    vcn_LeftScroll;/* scrolling margins*/
  216.  
  217. /* system lists */
  218.  
  219.         struct MinList           vcn_reservedlist;
  220.         struct MinList           vcn_MemBlockList; /* dynamic memory pool*/
  221.         struct MinList           vcn_InputBList;   /* history lines */
  222.         struct MinList           vcn_ButtonList;   /* buttons */
  223.         struct MinList           vcn_ReceivedReads;/* Read() pkt's Q here */
  224.         struct MinList           vcn_ReceivedWrites;/* Write()'s Q here */
  225.         struct MinList           vcn_OwnerList;    /* list of owners, i.e.
  226.                                                       named consoles.
  227.                                                       !WARNING! Semaphore
  228.                                                       protected! DO NOT
  229.                                                       TOUCH! LockWindow()
  230.                                                       is NOT ENOUGH here! */
  231.         struct MinList           vcn_UpperLineList;/* upper lines */
  232.         struct MinList           vcn_LowerLineList;/* lower lines */
  233.         struct MinList           vcn_FreeList;     /* garbage snip lines */
  234.         struct MinList           vcn_HookList;     /* window wide hooks */
  235.         struct MinList           vcn_MacroList;    /* user macros */
  236.  
  237. /* position of window & cursor */
  238.  
  239.         UWORD                    vcn_CursorX;
  240.         UWORD                    vcn_CursorY;      /* cursor position */
  241.         UWORD                    vcn_ScrollX;      /* horizontal scrolling */
  242.         UWORD                    vcn_GfxScrollX;   /* and what's seen on
  243.                                                       the screen */
  244.  
  245.         UWORD                    vcn_SearchX;      /* private for pattern
  246.                                                      searching */
  247.         UWORD                    vcn_DOSX;      /* DOS cursor location for
  248.                                                      mask input hack */
  249.  
  250.         UBYTE                    vcn_RefreshBits; /* window refresh mode,
  251.                                                      see below */
  252.         UBYTE                    vcn_RefreshCounter;/* times the refresh
  253.                                                       was requested */
  254.         UWORD                    vcn_DeltaScroll;   /* amount of lines
  255.                                                       scrolled while output
  256.                                                       disabled */
  257.         UWORD                    vcn_BlockX;
  258.         UWORD                    vcn_BlockY;  /* position of end of block */
  259.  
  260.         UWORD                    vcn_MenuNumber; /* menu selected last */
  261.         UWORD                    vcn_MenuQualifier; /* last menu qualifier */
  262.  
  263.         struct Gadget           *vcn_PressedGadget; /* gadget hold down, or
  264.                                                       NULL */
  265.  
  266. /* colors and types. All come in packed version, see vnc/dynamics.h */
  267.  
  268.         UBYTE                    vcn_ActualLineType; /* copy of cur. line */
  269.         UBYTE                    vcn_ActualLineMask; /* bitplane mask */
  270.  
  271.         UBYTE                    vcn_ActualPenPair; /* colors and */
  272.         UBYTE                    vcn_ActualType;    /* draw mode, packed*/
  273.  
  274.         UBYTE                    vcn_UserPenPair;
  275.         UBYTE                    vcn_UserType;   /* input style characters*/
  276.  
  277.         UBYTE                    vcn_DOSPenPair;
  278.         UBYTE                    vcn_DOSType;    /* dos (output) char's */
  279.  
  280.         UBYTE                    vcn_BackFillPenPair;
  281.         UBYTE                    vcn_BackFillType;  /* only BPen used */
  282.  
  283.         UBYTE                    vcn_PlaneMaskPenPair;
  284.         UBYTE                    vcn_PlaneMaskType;
  285.                                         /* used for concurrent mode */
  286.  
  287. /* actual lines, in the screen and in the buffer,
  288.    line pointers, get adjusted if lines move in memory.
  289.    See dynamics.h */
  290.  
  291.         struct DynLine          *vcn_ActualLine; /* or NULL */
  292.         struct DynLine          *vcn_ActualInput; /* current history line */
  293.         struct DynLine          *vcn_LinePtr;    /* general purpose
  294.                                                    auto adjust pointer */
  295.         struct DynLine          *vcn_AnchorLine; /* for block marking */
  296.  
  297.         UWORD                    vcn_ActualY;    /* position of line in
  298.                                                    buffer */
  299.         UWORD                    vcn_AnchorLineX;/* reserved */
  300.         UWORD                    vcn_AnchorX;
  301.         UWORD                    vcn_AnchorY;    /* anchor position of
  302.                                                    current block */
  303.  
  304. /* line counters and thresholds */
  305.         UWORD                    vcn_InpCount;  /* current size of history */
  306.         UWORD                    vcn_InpMax;    /* maximal size of history */
  307.  
  308.         UWORD                    vcn_UpperCount;
  309.         UWORD                    vcn_UpperMax;   /* same for upper lines */
  310.  
  311.         UWORD                    vcn_LowerCount;
  312.         UWORD                    vcn_LowerMax;   /* same for lower lines */
  313.  
  314.  
  315. /* internal buffers and their sizing */
  316.         struct  VCharLine       *vcn_EditBuffer; /* contains current line */
  317.         char                    *vcn_SearchBuffer; /* for history search */
  318.         char                    *vcn_RawKeyBuffer; /* for RawKeyConvert */
  319.  
  320.         char                    *vcn_BufObsolete[4];
  321.  
  322.         char                    *vcn_CutBuffer;  /* for ^K, ^Y */
  323.         char                    *vcn_CommandBuffer; /* reserved */
  324.         char                    *vcn_WindowTitle;
  325.         char                    *vcn_ScreenTitle;
  326.         char                    *vcn_PubScreenName; /* like it says */
  327.  
  328.         char                    *vcn_MObsolete[10];
  329.  
  330.         UWORD                    vcn_EditSize;   /* size of EditBuffer */
  331.         UWORD                    vcn_SearchSize;
  332.         UWORD                    vcn_RawKeySize;
  333.         UWORD                    vcn_DOSSize;    /* obsolete */
  334.         UWORD                    vcn_ASCSize;    /* obsolete */
  335.         UWORD                    vcn_CutSize;
  336.  
  337. /* ports, iorequests and signal masks */
  338.  
  339.         struct MsgPort         *vcn_WindowPort; /* not IDCMP, private!*/
  340.         ULONG                    vcn_WindowSignalMask;
  341.  
  342.         struct MsgPort          *vcn_DOSPort;    /* port of NULL owner */
  343.         ULONG                    vcn_DOSSignalMask;
  344.  
  345.         struct MsgPort          *vcn_IOPort;     /* generic port for
  346.                                                    IO interaction */
  347.         ULONG                    vcn_IOSignalMask;
  348.  
  349.         struct IOStdReq         *vcn_ConsoleIO; /* for console IO */
  350.         struct timerequest      *vcn_TimerIO;
  351.         struct IOStdReq         *vcn_InputIO;
  352.         struct IOStdReq         *vcn_UserIORequest;
  353.                                         /* given to user by dos packet */
  354.  
  355. /* colors and more. Added in V2.36 */
  356.  
  357.         UBYTE                    vcn_MenuDetailPen;
  358.         UBYTE                    vcn_MenuBlockPen;
  359.  
  360.         UBYTE                    vcn_GlobalRasterMask;
  361.                                         /* used to speed up drawing */
  362.  
  363.         UBYTE                    vcn_GlobalInvertMask;
  364.                                         /* used to draw the cursor */
  365.  
  366. /* gadgets and more. Please do not touch - these aren't the
  367.    actual gadgets if boopsis are available! */
  368.  
  369.         struct Gadget           *vcn_PropXGadget;
  370.         struct Gadget           *vcn_PropYGadget;
  371.         struct Gadget           *vcn_CommandGadget;     /* reserved */
  372.  
  373.         struct Menu             *vcn_Menu;      /* the menu in the window */
  374.  
  375.         void                    *vcn_MenuRemember;
  376.                                 /* memory management for menu structs,
  377.                                    ViNCEd internal, NOT INTUITION COMPATIBLE*/
  378.  
  379. /* link to the dos */
  380.  
  381.         struct DosPacket        *vcn_ActualDP;  /* packet in action */
  382.         ULONG                    vcn_longreserved;
  383.  
  384.         struct ViOwner          *vcn_ActualOwner; /* in foreground */
  385.         struct ViOwner          *vcn_BREAKOwner;  /* ^C whom ? */
  386.         struct ViOwner          *vcn_OpenOwner;   /* opened this window */
  387.  
  388. /* added these in 2.00 */
  389.  
  390.         struct DynLine          *vcn_DOSLine;   /* dos set cursor here */
  391.  
  392.         UWORD                    vcn_KeepOpenCounter;
  393.                                         /* window iconification forbid */
  394.         UWORD                    vcn_counterreserved;
  395.  
  396. /* added in 2.41 */
  397.  
  398.         UWORD                    vcn_TopRows;
  399.         UWORD                    vcn_BottomRows;
  400.                                         /* scrolling borders, CSI R */
  401.  
  402.         UWORD                    vcn_LeftColumns;
  403.         UWORD                    vcn_RightColumns;  /* not yet used */
  404.  
  405.         UWORD                    vcn_ItalicLeft;
  406.         UWORD                    vcn_ItalicRight;
  407.                                         /* additional room for
  408.                                            italic characters */
  409.  
  410. /* io requests for delay */
  411.  
  412.         struct timerequest      *vcn_PrivateTimerIO; /* intuition delay */
  413.         struct timerrequest     *vcn_DelayTimerIO;   /* for refresh */
  414.         struct timerrequest     *vcn_ScrollTimerIO;  /* for scrolling */
  415.         struct timerrequest     *vcn_BlinkTimerIO;   /* for cursor blinking */
  416.  
  417. /* delay times in micros, see prefs.h */
  418.  
  419.         ULONG                    vcn_DelayMicros;
  420.         ULONG                    vcn_RebuildMicros;
  421.         ULONG                    vcn_SlowMicros;
  422.         ULONG                    vcn_BlinkMicros;
  423.  
  424. /* time stamp the gadget was pressed down */
  425.  
  426.         ULONG                    vcn_TimeDown[2];
  427.  
  428. /* added in 3.00 */
  429.  
  430.         UWORD                    vcn_SelectedLeftOffset;
  431.         UWORD                    vcn_SelectedTopOffset;
  432.         UWORD                    vcn_SelectedWidth;
  433.         UWORD                    vcn_SelectedHeight;
  434.                                 /* borders set by CBM CSI sequences */
  435.  
  436. /* even more gadgets. DO NOT TOUCH! These aren't the actual gadgets
  437.    if boopsis are available ! */
  438.  
  439.         struct Gadget           *vcn_LeftGadget;
  440.         struct Gadget           *vcn_RightGadget;
  441.         struct Gadget           *vcn_UpGadget;
  442.         struct Gadget           *vcn_DownGadget; /* arrows */
  443.  
  444.         struct Gadget           *vcn_IconicGadget; /* iconification */
  445.  
  446.         struct Gadget           *vcn_FirstVNCGadget;
  447.                                         /* first private gadget added to
  448.                                            the window */
  449.         UWORD                    vcn_ViNCNumGads; /* number of gad's added */
  450.         UWORD                    vcn_ViNCGadPos;  /* at which position ?*/
  451.  
  452. /* dimensions of the sizing gadgets and arrows... */
  453.  
  454.         UWORD                    vcn_HorWidth;
  455.         UWORD                    vcn_HorHeight;
  456.         UWORD                    vcn_VertWidth;
  457.         UWORD                    vcn_VertHeight; /* arrow gadgets */
  458.  
  459.         UWORD                    vcn_SizingWidth;
  460.         UWORD                    vcn_SizingHeight;
  461.  
  462.         UWORD                    vcn_IconicWidth;
  463.         UWORD                    vcn_IconicHeight;
  464.  
  465.         UWORD                    vcn_LeftTitle;  /* free position near close */
  466.  
  467.         UWORD                    vcn_LeftButton; /* left edge of leftmost
  468.                                                     button, relative to
  469.                                                     rightmost edge */
  470.  
  471.         UWORD                    vcn_CloseWidth; /* width of the close
  472.                                                    gadget */
  473.  
  474.         UWORD                    vcn_DimReserved;
  475.  
  476.  
  477. /* Stuff needed for iconification */
  478.  
  479.         struct DiskObject       *vcn_IconicDOP; /* icon for iconification */
  480.         struct AppIcon          *vcn_AppIcon;   /* the code we got from WB */
  481.         UBYTE                    vcn_IconicCode;/* internal use... */
  482.         UBYTE                    vcn_IconcRes[3]; /* reserved */
  483.         char                    *vcn_IconTitle; /* the title */
  484.  
  485. /* complete (unpacked) colors */
  486.  
  487.         UBYTE                    vcn_UserExtAPen;
  488.         UBYTE                    vcn_UserExtBPen; /* user input colors */
  489.         UBYTE                    vcn_UserExtMode;
  490.         UBYTE                    vcn_UserExtReserved;
  491.  
  492.         UBYTE                    vcn_DOSExtAPen;
  493.         UBYTE                    vcn_DOSExtBPen;
  494.         UBYTE                    vcn_DOSExtMode; /* same for output */
  495.         UBYTE                    vcn_DOSExtReserved;
  496.  
  497.         UBYTE                    vcn_BackExtAPen; /* unused */
  498.         UBYTE                    vcn_BackExtBPen; /* backfill pen */
  499.         UBYTE                    vcn_BackExtMode; /* unused */
  500.         UBYTE                    vcn_BackExtReserved;
  501.  
  502. /* colors for rendering. Used by ViNCEd and SetVNC */
  503.  
  504.         UBYTE                    vcn_LightColor; /* shine pen */
  505.         UBYTE                    vcn_DarkColor;  /* shadow pen */
  506.         UBYTE                    vcn_FillColor;  /* background. =0 */
  507.         UBYTE                    vcn_TextColor;  /* used for text */
  508.         UBYTE                    vcn_MarkColor;  /* special text */
  509.         UBYTE                    vcn_ArrowColor; /* colors of arrows */
  510.         UBYTE                    vcn_ArrowLight;
  511.         UBYTE                    vcn_ArrowDark; /* usually shine & shadow
  512.                                                    but not in 1.2/1.3 */
  513.         UBYTE                    vcn_FillTextColor; /* text in the bar */
  514.         UBYTE                    vcn_reserved[3];
  515.  
  516. /* even more master pointers for the DynLines. Get relocated if
  517.    lines move. For private use only! */
  518.  
  519.         struct DynLine          *vcn_LinePtrA;
  520.         struct DynLine          *vcn_LinePtrB;
  521.         struct DynLine          *vcn_LinePtrC;
  522.  
  523. /* screen support */
  524.  
  525.         ULONG                    vcn_ScreenSignalMask;
  526.         UBYTE                    vcn_ScreenSignalBit; /* for pubscreen
  527.                                                         close */
  528.         UBYTE                    vcn_ScreenRes[3];
  529.  
  530.         struct Screen           *vcn_PubScreen; /* our public screen again,
  531.                                                    if open */
  532.         struct TextAttr          vcn_PrivAttr;  /* not used, but reserved */
  533.  
  534.         struct ViNCNewWindow    *vcn_LastNewWindow;
  535.                                                 /* used for re-opening */
  536.  
  537. /* final (ready for use) titles after parsing */
  538.  
  539.         char                    *vcn_FinalTitle;
  540.         char                    *vcn_FinalScreenTitle;
  541.         char                    *vcn_FinalIconTitle;
  542.  
  543. /* again screen support */
  544.  
  545.         ULONG                    vcn_DefaultModeID; /* for screens */
  546.         struct ViColorEntry      vcn_Colors[16];    /* current colors */
  547.  
  548.  
  549. /* TABHook support */
  550.  
  551.         struct MsgPort          *vcn_TABHookPort;   /* for communications
  552.                                                        with the ViNCFiler */
  553.  
  554.         struct Library          *vcn_AslBase;   /* DO NOT READ! MIGHT BE
  555.                                                    INVALID! */
  556.         struct Library          *vcn_ArpBase;   /* ditto */
  557.  
  558.         ULONG                    vcn_TABTime[2]; /* time of last TAB */
  559.         ULONG                    vcn_TABFlags;  /* private flags for the TABHook */
  560.         struct MinList           vcn_TABExpansionList; /* what has been
  561.                                                          found */
  562.         void                    *vcn_TABCurrentNode;
  563.                                                 /* do not care about it */
  564.  
  565.         struct ViOwner          *vcn_TABOwner;  /* who pressed TAB ?*/
  566.  
  567.         UWORD                    vcn_TABLineLen;
  568.         UWORD                    vcn_TABCursorPos; /* and where ?*/
  569.  
  570.         char                    *vcn_TABPatBuf; /* expanded pattern. */
  571.         char                    *vcn_TABRemainder;
  572.  
  573.         UWORD                    vcn_GluePos; /* where to glue in again */
  574.         UWORD                    vcn_ArgNum; /* which argument to expand */
  575.         UWORD                    vcn_PatPos; /* where's #? ?*/
  576.         UWORD                    vcn_TABReserved;
  577.  
  578.         struct AppWindow        *vcn_AppWindow; /* for icon drop */
  579.         BPTR                     vcn_TABLock;   /* expansion list is
  580.                                                    relative to this one */
  581.  
  582.         UWORD                    vcn_PathOnlyQualifier;
  583.         UWORD                    vcn_NameOnlyQualifier;
  584.  
  585. /* more color support */
  586.  
  587.         struct ViColorEntry      vcn_DefaultColors[16]; /* default colors */
  588.  
  589.         /* private fields beyond this point, do not read!
  590.            do not allocate yourself, use AllocCNWindow() ! */
  591. };
  592.  
  593. /* The next node is definitly for your private use! ViNCEd does not
  594.    touch it, except for one line master pointer that gets adjusted if
  595.    the line moves... */
  596.  
  597. /* Valid flags in vcn_Flags can be found in vpf_Flags, see Prefs.h.
  598.    Same goes for vcn_DOSFlags.
  599.    ExtFlags are for internal use. Not documented cause they will
  600.    change in the future.... */
  601.  
  602. /* Refresh modes... */
  603.  
  604. /* horizontal line */
  605. #define VCNR_HOR_BIT    0
  606.  
  607. /* vertical screen */
  608. #define VCNR_VERT_BIT   1
  609.  
  610. /* total refresh */
  611. #define VCNR_TOTAL_BIT  2
  612.  
  613. /* layer must be refreshed */
  614. #define VCNR_LAYER_BIT  3
  615.  
  616. /* currently refreshing */
  617. #define VCNR_REFRESHING_BIT 6
  618.  
  619. /* masking forbidden, gets calculated */
  620. #define VNCR_FULLMASK_BIT 7
  621.  
  622.  
  623. struct ViUserNode {
  624.         struct ViNCWindow       *ucn_Window; /* points back to structure
  625.                                                 above */
  626.  
  627.         struct VNCBase          *ucn_LibBase; /* library base */
  628.  
  629.         struct DynLine          *ucn_UserLinePtr; /* gets updated.
  630.                                                      Keep line ptrs
  631.                                                      here! */
  632.  
  633.         ULONG                    ucn_UserData;
  634.         void                    *ucn_UserPtr;
  635.  
  636.         struct List              ucn_UserList;  /* Not initialized! */
  637.  
  638.         UWORD                    ucn_UserReserved; /* don't touch this! */
  639.         UWORD                    ucn_UserCount;
  640.  
  641.         UWORD                    ucn_UserX;
  642.         UWORD                    ucn_UserY;
  643. };
  644.  
  645.  
  646.  
  647.  
  648.  
  649. /* The next one is used for OpenAWindow(), to attach an intuition window
  650.    to a ViNCWindow */
  651.  
  652. struct ViNCNewWindow {
  653.         WORD                     vnw_LeftEdge;
  654.         WORD                     vnw_TopEdge; /* position. Set top to -1
  655.                                                  to adjust to drag bar */
  656.         WORD                     vnw_Width;
  657.         WORD                     vnw_Height; /* size. Set to -1 to get
  658.                                                 maximal size */
  659.  
  660.         UBYTE                    vnw_Pens[2]; /* reserved. Must be -1,-1 */
  661.  
  662.         ULONG                    vnw_ViNCFlags; /* see below. No IDCMP! */
  663.  
  664.         /* note that no IDCMP flags are here! ViNCEd does not use the
  665.            IDCMP, instead an input handler is used ! */
  666.  
  667.         ULONG                    vnw_WindowFlags;
  668.                                                 /* passed to intuition as
  669.                                                    window flags */
  670.         WORD                     vnw_AltLeftEdge;
  671.         WORD                     vnw_AltTopEdge;
  672.         WORD                     vnw_AltWidth;
  673.         WORD                     vnw_AltHeight; /* alternate position */
  674.  
  675.         char                    *vnw_Title;
  676.  
  677.         void                    *vnw_Screen;
  678.                         /* pointer to intuition screen, or name of
  679.                            public screen */
  680.  
  681.         struct BitMap           *vnw_BitMap; /* for superbitmap. Not tested */
  682.  
  683.         WORD                     vnw_MinWidth,vnw_MinHeight;
  684.         WORD                     vnw_MaxWidth,vnw_MaxHeight;
  685.                 /* set to -1,-1 for maximal dimension! */
  686.  
  687.         UWORD                    vnw_Type;
  688.  
  689.         struct TagItem          *vnw_Tags;      /* expand on your own */
  690.  
  691.         struct Window           *vnw_UserWindow;
  692.                                                 /* set to install in own
  693.                                                    window */
  694.  
  695.         char                    *vnw_ScreenTitle;
  696.  
  697.         ULONG                    vnw_MonitorID; /* for private screens */
  698.         UWORD                    vnw_Depth;     /* for depth of screen */
  699.  
  700.         UBYTE                    vnw_Cols,vnw_Rows;
  701.                                         /* dimensions in characters, if
  702.                                            not zero */
  703.  
  704.         struct TextFont         *vnw_TextFont;
  705.                                         /* Text Font to use */
  706. };
  707.  
  708. /* Useful screen types */
  709.  
  710. /* open on workbench or on ViNCEd screen (set proper flags, see below) */
  711. #define VNW_STYPE_WORKBENCH     1
  712.  
  713. /* open on custom screen */
  714. #define VNW_STYPE_CUSTOM        15
  715.  
  716. /* open on public screen */
  717. #define VNW_STYPE_PUBLIC        2
  718.  
  719.  
  720. /* Add the standard menu */
  721. #define VNW_ADDMENU_BIT         30
  722. #define VNW_ADDMENU_MASK        (1L<<30)
  723.  
  724. /* Add X prop gadget */
  725. #define VNW_ADDPROPX_BIT        29
  726. #define VNW_ADDPROPX_MASK       (1L<<29)
  727.  
  728. /* Add Y prop gadget */
  729. #define VNW_ADDPROPY_BIT        28
  730. #define VNW_ADDPROPY_MASK       (1L<<28)
  731.  
  732. /* Fall back to WB if custom/public screen not available */
  733. #define VNW_PUBFALLBACK_BIT     27
  734. #define VNW_PUBFALLBACK_MASK    (1L<<27)
  735.  
  736. /* screen title available */
  737. #define VNW_WITHTITLE_BIT       26
  738. #define VNW_WITHTITLE_MASK      (1L<<26)
  739.  
  740. /* chunky graphics ? */
  741. #define VNW_CHUNKYPIXEL_BIT     25
  742. #define VNW_CHUNKYPIXEL_MASK    (1L<<25)
  743.  
  744. /* shell window ? */
  745. #define VNW_SHELL_BIT           24
  746. #define VNW_SHELL_MASK          (1L<<24)
  747.  
  748. /* add buttons ? */
  749. #define VNW_ADDBUTTONS_BIT      23
  750. #define VNW_ADDBUTTONS_MASK     (1L<<23)
  751.  
  752. /* add iconify ? */
  753. #define VNW_ADDICONIC_BIT       22
  754. #define VNW_ADDICONIC_MASK      (1L<<22)
  755.  
  756. /* open on own screen? Set type to VNW_STYPE_WORKBENCH in this case */
  757. #define VNW_PRIVSCREEN_BIT      21
  758. #define VNW_PRIVSCREEN_MASK     (1L<<21)
  759.  
  760. /* remove dragbar ?*/
  761. #define VNW_NODRAGBAR_BIT       20
  762. #define VNW_NODRAGBAR_MASK      (1L<<20)
  763.  
  764. /* keep user window open ?*/
  765. #define VNW_KEEPOPEN_BIT        19
  766. #define VNW_KEEPOPEN_MASK       (1L<<19)
  767.  
  768. #endif
  769.