home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / X / mit / clients / xmh / tocintrnl.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-07-14  |  4.5 KB  |  98 lines

  1. /* $XConsortium: tocintrnl.h,v 2.18 91/07/14 18:53:37 converse Exp $ */
  2. /*
  3.  *              COPYRIGHT 1987
  4.  *           DIGITAL EQUIPMENT CORPORATION
  5.  *               MAYNARD, MASSACHUSETTS
  6.  *            ALL RIGHTS RESERVED.
  7.  *
  8.  * THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE AND
  9.  * SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT CORPORATION.
  10.  * DIGITAL MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THIS SOFTWARE FOR
  11.  * ANY PURPOSE.  IT IS SUPPLIED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
  12.  *
  13.  * IF THE SOFTWARE IS MODIFIED IN A MANNER CREATING DERIVATIVE COPYRIGHT
  14.  * RIGHTS, APPROPRIATE LEGENDS MAY BE PLACED ON THE DERIVATIVE WORK IN
  15.  * ADDITION TO THAT SET FORTH ABOVE.
  16.  *
  17.  *
  18.  * Permission to use, copy, modify, and distribute this software and its
  19.  * documentation for any purpose and without fee is hereby granted, provided
  20.  * that the above copyright notice appear in all copies and that both that
  21.  * copyright notice and this permission notice appear in supporting
  22.  * documentation, and that the name of Digital Equipment Corporation not be
  23.  * used in advertising or publicity pertaining to distribution of the software
  24.  * without specific, written prior permission.
  25.  */
  26.  
  27. /* Includes for modules implementing toc stuff. */
  28.  
  29. #ifndef _tocinternal_h
  30. #define _tocinternal_h
  31.  
  32. #include <X11/IntrinsicP.h>    /* %%% */
  33. #include "tsource.h"
  34.  
  35. typedef enum {
  36.     unknown, valid, invalid
  37. } ValidType;
  38.  
  39. typedef struct _MsgRec {
  40.     Toc        toc;        /* Which toc this message is in. */
  41.     Toc        desttoc;    /* Folder to copy or move to (NULL if none) */
  42.     Scrn    *scrn;        /* Scrns showing this message (if any) */
  43.     Widget      source;        /* Source (if any) containing this msg. */
  44.     XawTextPosition position;    /* Position in the scanfile for this msg. */
  45.     XawTextPosition startPos;    /* Where to start the insertion point. */
  46.     char    *buf;        /* The scanline for this message. */
  47.     int        msgid;        /* Message id for this message. */
  48.     short    length;        /* #/chars for this msg's entry in scanfile */
  49.     unsigned char num_scrns;    /* How many scrns are currently showing msg */
  50.     unsigned    fate:2;        /* What will be done to this message */
  51.     unsigned    changed:1;    /* True iff this entry needs to be saved */
  52.     unsigned    visible:1;    /* Whether we should show this message */
  53.     unsigned    temporary:1;    /* Whether we should delete this message when
  54.                    it is no longer visible */
  55.     unsigned    reapable:1;    /* True iff we don't need to keep this
  56.                    composition around */
  57.     unsigned    unused:2;
  58. } MsgRec;
  59.  
  60. typedef struct _TocRec {
  61.    Scrn        *scrn;        /* Scrns containing this table of contents. */
  62.    Cardinal    num_scrns;    /* How many scrns are currently showing toc. */
  63.    char     *foldername;    /* Folder name for this toc */
  64.    char        *path;        /* Full path to folder's directory. */
  65.    char        *scanfile;    /* Full path to file containing scan. */
  66.    Msg        curmsg;        /* Current msgid for this toc. */
  67.    int        nummsgs;    /* How many info entries we currently have. */
  68.    Msg        *msgs;        /* Array of pointers to info about each msg. */
  69.    int        numsequences;    /* #/sequences defined for this folder. */
  70.    Sequence    *seqlist;    /* Array of pointers to sequences. */
  71.    Sequence     viewedseq;    /* Seq currently shown (NULL == all msgs) */
  72.    Sequence    selectseq;    /* The most recently selected sequence */
  73.    Widget       source;        /* Source for the file containing info. */
  74.    Boolean    hasselection;    /* Whether we own the selection. */
  75.    XawTextPosition left, right;    /* Left and right extents of selection. */
  76.    int        length;        /* #/chars in the scanfile. */
  77.    int        origlength;    /* Original #/chars in the scanfile. */
  78.    int        lastPos;    /* Last legal position */
  79.    ValidType    validity;    /* Whether the scan file for this toc is */
  80.                 /* up to date. */
  81.    Boolean    needsrepaint;    /* TRUE if we should repaint this toc. */
  82.    Boolean    needscachesave;    /* TRUE if the cache needs saving. */
  83.    Boolean    needslabelupdate;/* TRUE if the toclabel needs repainting. */
  84.    Boolean    stopupdate;    /* Zero if refreshing; nonzero if refreshing is
  85.                    currently inhibited. */
  86.    Boolean    haschanged;    /* Whether it's changed in the process of */
  87.                 /* the current commit. */
  88.    Boolean    delete_pending;    /* Is a delete folder operation pending? */
  89.    Boolean    force_reset;    /* temporary bug work-around for sequences */
  90.    char        *incfile;    /* Which file to incorporate from (if any). */
  91.    int        mailpending;    /* True if we're currently displaying
  92.                    mail pending true for this folder */
  93.    long        lastreaddate;    /* Last time we read or wrote the cache. */
  94.    Stack    sequence_stack;    /* Stack of sequence names. */
  95. } TocRec;
  96.  
  97. #endif /* _tocinternal_h */
  98.