1 /* 2 * $XFree86: mit/lib/Xaw/MailboxP.h,v 2.0 1993/07/28 11:56:34 dawes Exp $ 3 * $XConsortium: MailboxP.h,v 1.20 91/07/19 21:52:57 rws Exp $ 4 * 5 * Copyright 1988 Massachusetts Institute of Technology 6 * 7 * Permission to use, copy, modify, and distribute this software and its 8 * documentation for any purpose and without fee is hereby granted, provided 9 * that the above copyright notice appear in all copies and that both that 10 * copyright notice and this permission notice appear in supporting 11 * documentation, and that the name of M.I.T. not be used in advertising or 12 * publicity pertaining to distribution of the software without specific, 13 * written prior permission. M.I.T. makes no representations about the 14 * suitability of this software for any purpose. It is provided "as is" 15 * without express or implied warranty. 16 * 17 * Author: Jim Fulton, MIT X Consortium 18 */ 19 20 #ifndef _XawMailboxP_h 21 #define _XawMailboxP_h 22 23 #include <X11/Xaw/Mailbox.h> 24 #include <X11/Xaw/SimpleP.h> 25 26 #ifdef SYSV 27 #ifdef SCO 28 #define MAILBOX_DIRECTORY "/usr/spool/mail" 29 #else 30 #define MAILBOX_DIRECTORY "/usr/mail" 31 #endif 32 #else 33 #if defined(SVR4) || defined(__386BSD__) 34 #define MAILBOX_DIRECTORY "/var/mail" 35 #else 36 #define MAILBOX_DIRECTORY "/usr/spool/mail" 37 #endif 38 #endif 39 40 typedef struct { /* new fields for mailbox widget */ 41 /* resources */ 42 int update; /* seconds between updates */ 43 Pixel foreground_pixel; /* color index of normal state fg */ 44 String filename; /* filename to watch */ 45 String check_command; /* command to exec for mail check */ 46 Boolean flipit; /* do flip of full pixmap */ 47 int volume; /* bell volume */ 48 Boolean once_only; /* ring bell only once on new mail */ 49 /* local state */ 50 GC gc; /* normal GC to use */ 51 long last_size; /* size in bytes of mailboxname */ 52 XtIntervalId interval_id; /* time between checks */ 53 Boolean flag_up; /* is the flag up? */ 54 struct _mbimage { 55 Pixmap bitmap, mask; /* depth 1, describing shape */ 56 Pixmap pixmap; /* full depth pixmap */ 57 int width, height; /* geometry of pixmaps */ 58 } full, empty; 59 Boolean shapeit; /* do shape extension */ 60 struct { 61 Pixmap mask; 62 int x, y; 63 } shape_cache; /* last set of info */ 64 } MailboxPart; 65 66 typedef struct _MailboxRec { /* full instance record */ 67 CorePart core; 68 SimplePart simple; 69 MailboxPart mailbox; 70 } MailboxRec; 71 72 73 typedef struct { /* new fields for mailbox class */ 74 int dummy; /* stupid C compiler */ 75 } MailboxClassPart; 76 77 typedef struct _MailboxClassRec { /* full class record declaration */ 78 CoreClassPart core_class; 79 SimpleClassPart simple_class; 80 MailboxClassPart mailbox_class; 81 } MailboxClassRec; 82 83 extern MailboxClassRec mailboxClassRec; /* class pointer */ 84 85 #endif /* _XawMailboxP_h */ 86