MailboxP.h revision c19de146
1c19de146Smrg/* $XConsortium: MailboxP.h,v 1.22 94/04/17 20:43:27 rws Exp $ */ 2c19de146Smrg/* 3c19de146Smrg 4c19de146SmrgCopyright (c) 1988 X Consortium 5c19de146Smrg 6c19de146SmrgPermission is hereby granted, free of charge, to any person obtaining 7c19de146Smrga copy of this software and associated documentation files (the 8c19de146Smrg"Software"), to deal in the Software without restriction, including 9c19de146Smrgwithout limitation the rights to use, copy, modify, merge, publish, 10c19de146Smrgdistribute, sublicense, and/or sell copies of the Software, and to 11c19de146Smrgpermit persons to whom the Software is furnished to do so, subject to 12c19de146Smrgthe following conditions: 13c19de146Smrg 14c19de146SmrgThe above copyright notice and this permission notice shall be included 15c19de146Smrgin all copies or substantial portions of the Software. 16c19de146Smrg 17c19de146SmrgTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 18c19de146SmrgOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19c19de146SmrgMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20c19de146SmrgIN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR 21c19de146SmrgOTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 22c19de146SmrgARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 23c19de146SmrgOTHER DEALINGS IN THE SOFTWARE. 24c19de146Smrg 25c19de146SmrgExcept as contained in this notice, the name of the X Consortium shall 26c19de146Smrgnot be used in advertising or otherwise to promote the sale, use or 27c19de146Smrgother dealings in this Software without prior written authorization 28c19de146Smrgfrom the X Consortium. 29c19de146Smrg 30c19de146Smrg*/ 31c19de146Smrg/* $XFree86: xc/programs/xbiff/MailboxP.h,v 1.1 2000/02/13 03:56:12 dawes Exp $ */ 32c19de146Smrg 33c19de146Smrg#ifndef _XawMailboxP_h 34c19de146Smrg#define _XawMailboxP_h 35c19de146Smrg 36c19de146Smrg#include "Mailbox.h" 37c19de146Smrg#include <X11/Xaw/SimpleP.h> 38c19de146Smrg 39c19de146Smrg#if defined(SYSV) 40c19de146Smrg#define MAILBOX_DIRECTORY "/usr/mail" 41c19de146Smrg#elif defined(SVR4) 42c19de146Smrg#define MAILBOX_DIRECTORY "/var/mail" 43c19de146Smrg#elif defined(CSRG_BASED) 44c19de146Smrg#include <paths.h> 45c19de146Smrg#ifdef _PATH_MAILDIR 46c19de146Smrg#define MAILBOX_DIRECTORY _PATH_MAILDIR 47c19de146Smrg#endif 48c19de146Smrg#elif defined(__linux__) 49c19de146Smrg#define MAILBOX_DIRECTORY "/var/spool/mail" 50c19de146Smrg#endif 51c19de146Smrg 52c19de146Smrg#ifndef MAILBOX_DIRECTORY 53c19de146Smrg#define MAILBOX_DIRECTORY "/usr/spool/mail" 54c19de146Smrg#endif 55c19de146Smrg 56c19de146Smrgtypedef struct { /* new fields for mailbox widget */ 57c19de146Smrg /* resources */ 58c19de146Smrg int update; /* seconds between updates */ 59c19de146Smrg Pixel foreground_pixel; /* color index of normal state fg */ 60c19de146Smrg String filename; /* filename to watch */ 61c19de146Smrg String check_command; /* command to exec for mail check */ 62c19de146Smrg Boolean flipit; /* do flip of full pixmap */ 63c19de146Smrg int volume; /* bell volume */ 64c19de146Smrg Boolean once_only; /* ring bell only once on new mail */ 65c19de146Smrg /* local state */ 66c19de146Smrg GC gc; /* normal GC to use */ 67c19de146Smrg long last_size; /* size in bytes of mailboxname */ 68c19de146Smrg XtIntervalId interval_id; /* time between checks */ 69c19de146Smrg Boolean flag_up; /* is the flag up? */ 70c19de146Smrg struct _mbimage { 71c19de146Smrg Pixmap bitmap, mask; /* depth 1, describing shape */ 72c19de146Smrg Pixmap pixmap; /* full depth pixmap */ 73c19de146Smrg int width, height; /* geometry of pixmaps */ 74c19de146Smrg } full, empty; 75c19de146Smrg Boolean shapeit; /* do shape extension */ 76c19de146Smrg struct { 77c19de146Smrg Pixmap mask; 78c19de146Smrg int x, y; 79c19de146Smrg } shape_cache; /* last set of info */ 80c19de146Smrg} MailboxPart; 81c19de146Smrg 82c19de146Smrgtypedef struct _MailboxRec { /* full instance record */ 83c19de146Smrg CorePart core; 84c19de146Smrg SimplePart simple; 85c19de146Smrg MailboxPart mailbox; 86c19de146Smrg} MailboxRec; 87c19de146Smrg 88c19de146Smrg 89c19de146Smrgtypedef struct { /* new fields for mailbox class */ 90c19de146Smrg int dummy; /* stupid C compiler */ 91c19de146Smrg} MailboxClassPart; 92c19de146Smrg 93c19de146Smrgtypedef struct _MailboxClassRec { /* full class record declaration */ 94c19de146Smrg CoreClassPart core_class; 95c19de146Smrg SimpleClassPart simple_class; 96c19de146Smrg MailboxClassPart mailbox_class; 97c19de146Smrg} MailboxClassRec; 98c19de146Smrg 99c19de146Smrgextern MailboxClassRec mailboxClassRec; /* class pointer */ 100c19de146Smrg 101c19de146Smrg#endif /* _XawMailboxP_h */ 102