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