home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / x / volume15 / xmail / part02 / MailwatchP.h < prev   
C/C++ Source or Header  |  1991-10-29  |  2KB  |  62 lines

  1. /*
  2.  * Author:  Dan Heller (see Mailwatch.c for detailed info)
  3.  */
  4. #ifndef _XtMailwatchP_h
  5. #define _XtMailwatchP_h
  6.  
  7. #include "Mailwatch.h"
  8. #include <X11/CoreP.h>
  9.  
  10. #ifndef MAILBOX_DIRECTORY
  11. #define MAILBOX_DIRECTORY "/usr/spool/mail"
  12. #endif /* MAILBOX_DIRECTORY */
  13.  
  14. #define MAILBOX_VOLUME 33        /* percentage */
  15.  
  16. typedef struct {            /* new fields for mailwatch widget */
  17.     Pixel    foreground_pixel;    /* color index of normal state fg */
  18.     GC        normal_GC;        /* normal GC to use */
  19.     GC        invert_GC;        /* invert GC for FillRectangle call */
  20.     int        update;            /* seconds between updates */
  21.     String    filename;        /* filename to watch */
  22.     long    last_size;        /* size in bytes of mailboxname */
  23.     time_t    last_access;        /* last time user accessed mailbox */
  24.     Boolean    reverseVideo;        /* do reverse video? */
  25.     Boolean    flag_up;        /* is the flag up? */
  26.     Boolean    bell;            /* ring the bell on new mail? */
  27.     Boolean    useName;        /* add username to icon image? */
  28.     Boolean    useHost;        /* add mailhost name to icon image? */
  29.     String    username;        /* username of mailbox */
  30.     String    mailhost;        /* host name of mail server */
  31.     XFontStruct    *font;            /* font to use when displaying name */
  32.     XtCallbackList    callback;    /* Call func(s) when mail arrives */
  33.     XtIntervalId    interval_id;    /* time between checks */
  34.     struct _mbimage {
  35.     int    width, height;
  36.     Pixmap    pixmap;            /* full depth pixmap */
  37. #ifndef    XPM
  38.     Pixmap  bitmap;
  39. #else
  40.     String  bitmap;
  41. #endif
  42.     } mail, nomail;
  43. } MailwatchPart;
  44.  
  45. typedef struct _MailwatchRec {        /* full instance record */
  46.     CorePart core;
  47.     MailwatchPart mailbox;
  48. } MailwatchRec;
  49.  
  50. typedef struct {            /* new fields for mailwatch class */
  51.     int dummy;                /* stupid C compiler */
  52. } MailwatchClassPart;
  53.  
  54. typedef struct _MailwatchClassRec {    /* full class record declaration */
  55.     CoreClassPart core_class;
  56.     MailwatchClassPart mailwatch_class;
  57. } MailwatchClassRec;
  58.  
  59. extern MailwatchClassRec mailwatchClassRec;     /* class pointer */
  60.  
  61. #endif _XtMailwatchP_h
  62.