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