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