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
36c918a7e2Smrg#include "config.h"
37c19de146Smrg#include "Mailbox.h"
38c19de146Smrg#include <X11/Xaw/SimpleP.h>
39c19de146Smrg
40c918a7e2Smrg#ifdef HAVE_PATHS_H
41c918a7e2Smrg# include <paths.h>
42c19de146Smrg#endif
43c19de146Smrg
44c19de146Smrg#ifndef MAILBOX_DIRECTORY
45c918a7e2Smrg# ifdef _PATH_MAILDIR
46c918a7e2Smrg#  define MAILBOX_DIRECTORY _PATH_MAILDIR
47c918a7e2Smrg# elif defined(SYSV)
48c918a7e2Smrg#  define MAILBOX_DIRECTORY "/usr/mail"
49c918a7e2Smrg# elif defined(SVR4)
50c918a7e2Smrg#  define MAILBOX_DIRECTORY "/var/mail"
51c918a7e2Smrg# elif defined(__linux__)
52c918a7e2Smrg#  define MAILBOX_DIRECTORY "/var/spool/mail"
53c918a7e2Smrg# else
54c918a7e2Smrg#  define MAILBOX_DIRECTORY "/usr/spool/mail"
55c918a7e2Smrg# endif
56c19de146Smrg#endif
57c19de146Smrg
58c19de146Smrgtypedef struct {			/* new fields for mailbox widget */
59c19de146Smrg    /* resources */
60c19de146Smrg    int update;				/* seconds between updates */
61c19de146Smrg    Pixel foreground_pixel;		/* color index of normal state fg */
62a39bb051Smrg    char *filename;			/* filename to watch */
63c19de146Smrg    String check_command;		/* command to exec for mail check */
64c19de146Smrg    Boolean flipit;			/* do flip of full pixmap */
65c19de146Smrg    int volume;				/* bell volume */
66c19de146Smrg    Boolean once_only;			/* ring bell only once on new mail */
67c19de146Smrg    /* local state */
68c19de146Smrg    GC gc;				/* normal GC to use */
69c19de146Smrg    long last_size;			/* size in bytes of mailboxname */
70c19de146Smrg    XtIntervalId interval_id;		/* time between checks */
71c19de146Smrg    Boolean flag_up;			/* is the flag up? */
72c19de146Smrg    struct _mbimage {
73c19de146Smrg	Pixmap bitmap, mask;		/* depth 1, describing shape */
74c19de146Smrg	Pixmap pixmap;			/* full depth pixmap */
75c19de146Smrg	int width, height;		/* geometry of pixmaps */
76c19de146Smrg    } full, empty;
77c19de146Smrg    Boolean shapeit;			/* do shape extension */
78c19de146Smrg    struct {
79c19de146Smrg	Pixmap mask;
80c19de146Smrg	int x, y;
81c19de146Smrg    } shape_cache;			/* last set of info */
82c19de146Smrg} MailboxPart;
83c19de146Smrg
84c19de146Smrgtypedef struct _MailboxRec {		/* full instance record */
85c19de146Smrg    CorePart core;
86c19de146Smrg    SimplePart simple;
87c19de146Smrg    MailboxPart mailbox;
88c19de146Smrg} MailboxRec;
89c19de146Smrg
90c19de146Smrg
91c19de146Smrgtypedef struct {			/* new fields for mailbox class */
92c19de146Smrg    int dummy;				/* stupid C compiler */
93c19de146Smrg} MailboxClassPart;
94c19de146Smrg
95c19de146Smrgtypedef struct _MailboxClassRec {	/* full class record declaration */
96c19de146Smrg    CoreClassPart core_class;
97c19de146Smrg    SimpleClassPart simple_class;
98c19de146Smrg    MailboxClassPart mailbox_class;
99c19de146Smrg} MailboxClassRec;
100c19de146Smrg
101c19de146Smrgextern MailboxClassRec mailboxClassRec;	 /* class pointer */
102c19de146Smrg
103c19de146Smrg#endif /* _XawMailboxP_h */
104