749N/A/*
749N/A * $XConsortium: Mailbox.c,v 1.35 89/10/09 16:51:44 jim Exp $
749N/A *
749N/A * Copyright 1988 Massachusetts Institute of Technology
749N/A *
749N/A * Permission to use, copy, modify, and distribute this software and its
749N/A * documentation for any purpose and without fee is hereby granted, provided
749N/A * that the above copyright notice appear in all copies and that both that
749N/A * copyright notice and this permission notice appear in supporting
749N/A * documentation, and that the name of M.I.T. not be used in advertising or
749N/A * publicity pertaining to distribution of the software without specific,
749N/A * written prior permission. M.I.T. makes no representations about the
749N/A * suitability of this software for any purpose. It is provided "as is"
749N/A * without express or implied warranty.
749N/A *
749N/A * Author: Jim Fulton, MIT X Consortium
749N/A *
749N/A * I recommend that you use the new mailfull and mailempty bitmaps instead of
749N/A * the ugly mailboxes:
749N/A *
749N/A * XBiff*fullPixmap: mailfull
749N/A * XBiff*emptyPixmap: mailempty
749N/A */
749N/A
749N/A#include <stdio.h> /* for printing error messages */
749N/A#include <pwd.h> /* for getting username */
1233N/A#include <stdlib.h> /* for system, exit */
1233N/A#include <unistd.h> /* for getuid, getlogin */
749N/A
749N/A#include <X11/cursorfont.h> /* for cursor constants */
749N/A#include <X11/StringDefs.h> /* for useful atom names */
749N/A#include <X11/Intrinsic.h> /* for XtTimerCallbackProc */
749N/A#include <X11/IntrinsicP.h> /* for toolkit stuff */
749N/A#include <sys/stat.h> /* for stat() ** needs types.h ***/
749N/A
749N/A#include <X11/bitmaps/mailfull> /* for flag up (mail present) bits */
749N/A#include <X11/bitmaps/mailempty> /* for flag down (mail not here) */
749N/A
749N/A#include <./Xaw3_1XawInit.h>
749N/A#include <./Xaw3_1MailboxP.h> /* for implementation mailbox stuff */
749N/A
749N/A#include <X11/Xmu/Converters.h> /* for XmuCvtStringToBitmap */
749N/A
749N/A#ifdef SHAPE
749N/A#include <X11/extensions/shape.h>
749N/A#endif
749N/A
749N/A/*
749N/A * The default user interface is to have the mailbox turn itself off whenever
749N/A * the user presses a button in it. Expert users might want to make this
749N/A * happen on EnterWindow. It might be nice to provide support for some sort of
749N/A * exit callback so that you can do things like press q to quit.
749N/A */
749N/A
749N/Astatic char defaultTranslations[] =
749N/A "<ButtonPress>: unset()";
749N/A
749N/Astatic void Check(), Set(), Unset();
749N/A
749N/Astatic XtActionsRec actionsList[] = {
749N/A { "check", Check },
749N/A { "unset", Unset },
749N/A { "set", Set },
749N/A};
749N/A
749N/A
749N/A/* Initialization of defaults */
749N/A
749N/A#define offset(field) XtOffset(MailboxWidget,mailbox.field)
749N/A#define goffset(field) XtOffset(Widget,core.field)
749N/A
749N/Astatic Dimension defDim = 48;
749N/Astatic Pixmap nopix = None;
749N/A
749N/Astatic XtResource resources[] = {
749N/A { XtNwidth, XtCWidth, XtRDimension, sizeof (Dimension),
749N/A goffset (width), XtRDimension, (caddr_t)&defDim },
749N/A { XtNheight, XtCHeight, XtRDimension, sizeof (Dimension),
749N/A goffset (height), XtRDimension, (caddr_t)&defDim },
749N/A { XtNupdate, XtCInterval, XtRInt, sizeof (int),
749N/A offset (update), XtRString, "30" },
749N/A { XtNforeground, XtCForeground, XtRPixel, sizeof (Pixel),
749N/A offset (foreground_pixel), XtRString, "black" },
749N/A { XtNbackground, XtCBackground, XtRPixel, sizeof (Pixel),
749N/A goffset (background_pixel), XtRString, "white" },
749N/A { XtNreverseVideo, XtCReverseVideo, XtRBoolean, sizeof (Boolean),
749N/A offset (reverseVideo), XtRString, "FALSE" },
749N/A { XtNfile, XtCFile, XtRString, sizeof (String),
749N/A offset (filename), XtRString, NULL },
749N/A { XtNcheckCommand, XtCCheckCommand, XtRString, sizeof(char*),
749N/A offset (check_command), XtRString, NULL},
749N/A { XtNvolume, XtCVolume, XtRInt, sizeof(int),
749N/A offset (volume), XtRString, "33"},
749N/A { XtNonceOnly, XtCBoolean, XtRBoolean, sizeof(Boolean),
749N/A offset (once_only), XtRImmediate, (caddr_t)False },
749N/A { XtNfullPixmap, XtCPixmap, XtRBitmap, sizeof(Pixmap),
749N/A offset (full.bitmap), XtRString, "flagup" },
749N/A { XtNfullPixmapMask, XtCPixmapMask, XtRBitmap, sizeof(Pixmap),
749N/A offset (full.mask), XtRBitmap, (caddr_t) &nopix },
749N/A { XtNemptyPixmap, XtCPixmap, XtRBitmap, sizeof(Pixmap),
749N/A offset (empty.bitmap), XtRString, "flagdown" },
749N/A { XtNemptyPixmapMask, XtCPixmapMask, XtRBitmap, sizeof(Pixmap),
749N/A offset (empty.mask), XtRBitmap, (caddr_t) &nopix },
749N/A { XtNflip, XtCFlip, XtRBoolean, sizeof(Boolean),
749N/A offset (flipit), XtRString, "true" },
749N/A#ifdef SHAPE
749N/A { XtNshapeWindow, XtCShapeWindow, XtRBoolean, sizeof(Boolean),
749N/A offset (shapeit), XtRString, "false" },
749N/A#endif
749N/A};
749N/A
749N/A#undef offset
749N/A#undef goffset
749N/A
749N/Astatic void GetMailFile(), CloseDown();
749N/Astatic void check_mailbox(), redraw_mailbox(), beep();
749N/Astatic void ClassInitialize(), Initialize(), Realize(), Destroy(), Redisplay();
749N/Astatic Boolean SetValues();
749N/A
749N/AMailboxClassRec mailboxClassRec = {
749N/A { /* core fields */
749N/A /* superclass */ &widgetClassRec,
749N/A /* class_name */ "Mailbox",
749N/A /* widget_size */ sizeof(MailboxRec),
749N/A /* class_initialize */ ClassInitialize,
749N/A /* class_part_initialize */ NULL,
749N/A /* class_inited */ FALSE,
749N/A /* initialize */ Initialize,
749N/A /* initialize_hook */ NULL,
749N/A /* realize */ Realize,
749N/A /* actions */ actionsList,
749N/A /* num_actions */ XtNumber(actionsList),
749N/A /* resources */ resources,
749N/A /* resource_count */ XtNumber(resources),
749N/A /* xrm_class */ NULL,
749N/A /* compress_motion */ TRUE,
749N/A /* compress_exposure */ TRUE,
749N/A /* compress_enterleave */ TRUE,
749N/A /* visible_interest */ FALSE,
749N/A /* destroy */ Destroy,
749N/A /* resize */ NULL,
749N/A /* expose */ Redisplay,
749N/A /* set_values */ SetValues,
749N/A /* set_values_hook */ NULL,
749N/A /* set_values_almost */ XtInheritSetValuesAlmost,
749N/A /* get_values_hook */ NULL,
749N/A /* accept_focus */ NULL,
749N/A /* version */ XtVersion,
749N/A /* callback_private */ NULL,
749N/A /* tm_table */ defaultTranslations,
749N/A /* query_geometry */ XtInheritQueryGeometry,
749N/A /* display_accelerator */ XtInheritDisplayAccelerator,
749N/A /* extension */ NULL
749N/A }
749N/A};
749N/A
749N/AWidgetClass mailboxWidgetClass = (WidgetClass) &mailboxClassRec;
749N/A
749N/A
749N/A/*
749N/A * widget initialization
749N/A */
749N/A
749N/Astatic void ClassInitialize ()
749N/A{
749N/A static XtConvertArgRec screenConvertArg[] = {
749N/A { XtWidgetBaseOffset, (caddr_t) XtOffset(Widget, core.screen), sizeof(Screen *) }
749N/A };
749N/A
749N/A XawInitializeWidgetSet();
749N/A XtAddConverter (XtRString, XtRBitmap, XmuCvtStringToBitmap,
749N/A screenConvertArg, XtNumber(screenConvertArg));
749N/A return;
749N/A}
749N/A
749N/Astatic GC get_mailbox_gc (w)
749N/A MailboxWidget w;
749N/A{
749N/A XtGCMask valuemask;
749N/A XGCValues xgcv;
749N/A
749N/A valuemask = GCForeground | GCBackground | GCFunction | GCGraphicsExposures;
749N/A xgcv.foreground = w->mailbox.foreground_pixel;
749N/A xgcv.background = w->core.background_pixel;
749N/A xgcv.function = GXcopy;
749N/A xgcv.graphics_exposures = False; /* this is Bool, not Boolean */
749N/A return (XtGetGC ((Widget) w, valuemask, &xgcv));
749N/A}
749N/A
749N/A
749N/A/* ARGSUSED */
749N/Astatic void Initialize (request, new)
749N/A Widget request, new;
749N/A{
749N/A MailboxWidget w = (MailboxWidget) new;
749N/A#ifdef SHAPE
749N/A int shape_event_base, shape_error_base;
749N/A#endif
749N/A
749N/A if (!w->mailbox.filename) GetMailFile (w);
749N/A
749N/A if (w->core.width <= 0) w->core.width = 1;
749N/A if (w->core.height <= 0) w->core.height = 1;
749N/A
749N/A if (w->mailbox.reverseVideo) {
749N/A Pixel tmp;
749N/A
749N/A tmp = w->mailbox.foreground_pixel;
749N/A w->mailbox.foreground_pixel = w->core.background_pixel;
749N/A w->core.background_pixel = tmp;
749N/A }
749N/A
749N/A#ifdef SHAPE
749N/A if (w->mailbox.shapeit && !XShapeQueryExtension (XtDisplay (w),
749N/A &shape_event_base,
749N/A &shape_error_base))
749N/A w->mailbox.shapeit = False;
749N/A w->mailbox.shape_cache.mask = None;
749N/A#endif
749N/A
749N/A w->mailbox.gc = get_mailbox_gc (w);
749N/A w->mailbox.interval_id = (XtIntervalId) 0;
749N/A w->mailbox.full.pixmap = None;
749N/A w->mailbox.empty.pixmap = None;
749N/A
749N/A return;
749N/A}
749N/A
749N/A
749N/A/*
749N/A * action procedures
749N/A */
749N/A
749N/A/*
749N/A * pretend there is new mail; put widget in flagup state
749N/A */
749N/A
749N/A/* ARGSUSED */
749N/Astatic void Set (gw, event, params, nparams)
749N/A Widget gw;
749N/A XEvent *event;
749N/A String *params;
749N/A Cardinal *nparams;
749N/A{
749N/A MailboxWidget w = (MailboxWidget) gw;
749N/A
749N/A w->mailbox.last_size = -1;
749N/A
749N/A check_mailbox (w, TRUE, FALSE); /* redraw, no reset */
749N/A
749N/A return;
749N/A}
749N/A
749N/A
749N/A/*
749N/A * ack the existing mail; put widget in flagdown state
749N/A */
749N/A
749N/A/* ARGSUSED */
749N/Astatic void Unset (gw, event, params, nparams)
749N/A Widget gw;
749N/A XEvent *event;
749N/A String *params;
749N/A Cardinal *nparams;
749N/A{
749N/A MailboxWidget w = (MailboxWidget) gw;
749N/A
749N/A check_mailbox (w, TRUE, TRUE); /* redraw, reset */
749N/A
749N/A return;
749N/A}
749N/A
749N/A
749N/A/*
749N/A * look to see if there is new mail; if so, Set, else Unset
749N/A */
749N/A
749N/A/* ARGSUSED */
749N/Astatic void Check (gw, event, params, nparams)
749N/A Widget gw;
749N/A XEvent *event;
749N/A String *params;
749N/A Cardinal *nparams;
749N/A{
749N/A MailboxWidget w = (MailboxWidget) gw;
749N/A
749N/A check_mailbox (w, TRUE, FALSE); /* redraw, no reset */
749N/A
749N/A return;
749N/A}
749N/A
749N/A
749N/A/* ARGSUSED */
1295N/Astatic void clock_tic (
1295N/A caddr_t client_data,
1295N/A XtIntervalId *id)
749N/A{
749N/A MailboxWidget w = (MailboxWidget) client_data;
749N/A
749N/A check_mailbox (w, FALSE, FALSE); /* no redraw, no reset */
749N/A
749N/A /*
749N/A * and reset the timer
749N/A */
749N/A
749N/A w->mailbox.interval_id = XtAddTimeOut (w->mailbox.update * 1000,
749N/A (XtTimerCallbackProc)clock_tic,
749N/A (caddr_t) w);
749N/A
749N/A return;
749N/A}
749N/A
749N/Astatic Pixmap make_pixmap (dpy, w, bitmap, depth, flip, widthp, heightp)
749N/A Display *dpy;
749N/A MailboxWidget w;
749N/A Pixmap bitmap;
749N/A Boolean flip;
749N/A int depth;
749N/A int *widthp, *heightp;
749N/A{
749N/A Window root;
749N/A int x, y;
749N/A unsigned int width, height, bw, dep;
749N/A unsigned long fore, back;
749N/A
749N/A if (!XGetGeometry (dpy, bitmap, &root, &x, &y, &width, &height, &bw, &dep))
749N/A return None;
749N/A
749N/A *widthp = (int) width;
749N/A *heightp = (int) height;
749N/A if (flip) {
749N/A fore = w->core.background_pixel;
749N/A back = w->mailbox.foreground_pixel;
749N/A } else {
749N/A fore = w->mailbox.foreground_pixel;
749N/A back = w->core.background_pixel;
749N/A }
749N/A return XmuCreatePixmapFromBitmap (dpy, w->core.window, bitmap,
749N/A width, height, depth, fore, back);
749N/A}
749N/A
749N/Astatic void Realize (gw, valuemaskp, attr)
749N/A Widget gw;
749N/A XtValueMask *valuemaskp;
749N/A XSetWindowAttributes *attr;
749N/A{
749N/A MailboxWidget w = (MailboxWidget) gw;
749N/A register Display *dpy = XtDisplay (w);
749N/A int depth = w->core.depth;
749N/A
749N/A *valuemaskp |= (CWBitGravity | CWCursor);
749N/A attr->bit_gravity = ForgetGravity;
749N/A attr->cursor = XCreateFontCursor (dpy, XC_top_left_arrow);
749N/A
749N/A XtCreateWindow (gw, InputOutput, (Visual *) CopyFromParent,
749N/A *valuemaskp, attr);
749N/A
749N/A /*
749N/A * build up the pixmaps that we'll put into the image
749N/A */
749N/A if (w->mailbox.full.bitmap == None) {
749N/A w->mailbox.full.bitmap =
749N/A XCreateBitmapFromData (dpy, w->core.window,
749N/A (const char *)mailfull_bits,
749N/A mailfull_width, mailfull_height);
749N/A }
749N/A if (w->mailbox.empty.bitmap == None) {
749N/A w->mailbox.empty.bitmap =
749N/A XCreateBitmapFromData (dpy, w->core.window,
749N/A (const char *)mailempty_bits,
749N/A mailempty_width, mailempty_height);
749N/A }
749N/A
749N/A w->mailbox.empty.pixmap = make_pixmap (dpy, w, w->mailbox.empty.bitmap,
749N/A depth, False,
749N/A &w->mailbox.empty.width,
749N/A &w->mailbox.empty.height);
749N/A w->mailbox.full.pixmap = make_pixmap (dpy, w, w->mailbox.full.bitmap,
749N/A depth, w->mailbox.flipit,
749N/A &w->mailbox.full.width,
749N/A &w->mailbox.full.height);
749N/A
749N/A#ifdef SHAPE
749N/A if (w->mailbox.empty.mask == None && w->mailbox.full.mask == None)
749N/A w->mailbox.shapeit = False;
749N/A#endif
749N/A
749N/A w->mailbox.interval_id = XtAddTimeOut (w->mailbox.update * 1000,
749N/A (XtTimerCallbackProc)clock_tic,
749N/A (caddr_t) w);
749N/A
749N/A#ifdef SHAPE
749N/A w->mailbox.shape_cache.mask = None;
749N/A#endif
749N/A
749N/A return;
749N/A}
749N/A
749N/A
749N/Astatic void Destroy (gw)
749N/A Widget gw;
749N/A{
749N/A MailboxWidget w = (MailboxWidget) gw;
749N/A Display *dpy = XtDisplay (gw);
749N/A
749N/A XtFree (w->mailbox.filename);
749N/A if (w->mailbox.interval_id) XtRemoveTimeOut (w->mailbox.interval_id);
749N/A XtDestroyGC (w->mailbox.gc);
749N/A#define freepix(p) if (p) XFreePixmap (dpy, p)
749N/A freepix (w->mailbox.full.bitmap); /* until cvter does ref cnt */
749N/A freepix (w->mailbox.full.mask); /* until cvter does ref cnt */
749N/A freepix (w->mailbox.full.pixmap);
749N/A freepix (w->mailbox.empty.bitmap); /* until cvter does ref cnt */
749N/A freepix (w->mailbox.empty.mask); /* until cvter does ref cnt */
749N/A freepix (w->mailbox.empty.pixmap);
749N/A#ifdef SHAPE
749N/A freepix (w->mailbox.shape_cache.mask);
749N/A#endif
749N/A#undef freepix
749N/A return;
749N/A}
749N/A
749N/A
749N/Astatic void Redisplay (gw)
749N/A Widget gw;
749N/A{
749N/A MailboxWidget w = (MailboxWidget) gw;
749N/A
749N/A check_mailbox (w, TRUE, FALSE);
749N/A}
749N/A
749N/A
749N/Astatic void check_mailbox (w, force_redraw, reset)
749N/A MailboxWidget w;
749N/A Boolean force_redraw, reset;
749N/A{
749N/A long mailboxsize = 0;
749N/A
749N/A if (w->mailbox.check_command != NULL) {
749N/A switch (system(w->mailbox.check_command)) {
749N/A case 0:
749N/A mailboxsize = w->mailbox.last_size + 1;
749N/A break;
749N/A /* case 1 is no change */
749N/A case 2:
749N/A mailboxsize = 0;
749N/A /* treat everything else as no change */
749N/A }
749N/A }
749N/A else {
749N/A struct stat st;
749N/A
749N/A if (stat (w->mailbox.filename, &st) == 0) {
749N/A mailboxsize = st.st_size;
749N/A }
749N/A }
749N/A
749N/A /*
749N/A * Now check for changes. If reset is set then we want to pretent that
749N/A * there is no mail. If the mailbox is empty then we want to turn off
749N/A * the flag. Otherwise if the mailbox has changed size then we want to
749N/A * put the flag up.
749N/A *
749N/A * The cases are:
749N/A * o forced reset by user DOWN
749N/A * o no mailbox or empty (zero-sized) mailbox DOWN
749N/A * o same size as last time no change
749N/A * o bigger than last time UP
749N/A * o smaller than last time but non-zero UP
749N/A *
749N/A * The last two cases can be expressed as different from last
749N/A * time and non-zero.
749N/A */
749N/A
749N/A if (reset) { /* forced reset */
749N/A w->mailbox.flag_up = FALSE;
749N/A force_redraw = TRUE;
749N/A } else if (mailboxsize == 0) { /* no mailbox or empty */
749N/A w->mailbox.flag_up = FALSE;
749N/A if (w->mailbox.last_size > 0) force_redraw = TRUE; /* if change */
749N/A } else if (mailboxsize != w->mailbox.last_size) { /* different size */
749N/A if (!w->mailbox.once_only || !w->mailbox.flag_up)
749N/A beep(w);
749N/A w->mailbox.flag_up = TRUE;
749N/A force_redraw = TRUE;
749N/A }
749N/A
749N/A w->mailbox.last_size = mailboxsize;
749N/A if (force_redraw) redraw_mailbox (w);
749N/A return;
749N/A}
749N/A
749N/A/*
749N/A * get user name for building mailbox
749N/A */
749N/A
749N/Astatic void GetMailFile (w)
749N/A MailboxWidget w;
749N/A{
749N/A char *username;
749N/A
749N/A username = getlogin ();
749N/A if (!username) {
749N/A struct passwd *pw = getpwuid (getuid ());
749N/A
749N/A if (!pw) {
749N/A fprintf (stderr, "%s: unable to find a username for you.\n",
749N/A "Mailbox widget");
749N/A CloseDown (w, 1);
749N/A }
749N/A username = pw->pw_name;
749N/A }
749N/A w->mailbox.filename = (String) XtMalloc (strlen (MAILBOX_DIRECTORY) + 1 +
749N/A strlen (username) + 1);
749N/A strcpy (w->mailbox.filename, MAILBOX_DIRECTORY);
749N/A strcat (w->mailbox.filename, "/");
749N/A strcat (w->mailbox.filename, username);
749N/A return;
749N/A}
749N/A
749N/Astatic void CloseDown (w, status)
749N/A MailboxWidget w;
749N/A int status;
749N/A{
749N/A Display *dpy = XtDisplay (w);
749N/A
749N/A XtDestroyWidget ((Widget)w);
749N/A XCloseDisplay (dpy);
749N/A exit (status);
749N/A}
749N/A
749N/A
749N/A/* ARGSUSED */
749N/Astatic Boolean SetValues (gcurrent, grequest, gnew)
749N/A Widget gcurrent, grequest, gnew;
749N/A{
749N/A MailboxWidget current = (MailboxWidget) gcurrent;
749N/A MailboxWidget new = (MailboxWidget) gnew;
749N/A Boolean redisplay = FALSE;
749N/A
749N/A if (current->mailbox.update != new->mailbox.update) {
749N/A if (current->mailbox.interval_id)
749N/A XtRemoveTimeOut (current->mailbox.interval_id);
749N/A new->mailbox.interval_id = XtAddTimeOut (new->mailbox.update * 1000,
749N/A (XtTimerCallbackProc)clock_tic,
749N/A (caddr_t) gnew);
749N/A }
749N/A
749N/A if (current->mailbox.foreground_pixel != new->mailbox.foreground_pixel ||
749N/A current->core.background_pixel != new->core.background_pixel) {
749N/A XtDestroyGC (current->mailbox.gc);
749N/A new->mailbox.gc = get_mailbox_gc (new);
749N/A redisplay = TRUE;
749N/A }
749N/A
749N/A return (redisplay);
749N/A}
749N/A
749N/A
749N/A/*
749N/A * drawing code
749N/A */
749N/A
749N/Astatic void redraw_mailbox (w)
749N/A MailboxWidget w;
749N/A{
749N/A register Display *dpy = XtDisplay (w);
749N/A register Window win = XtWindow (w);
749N/A register int x, y;
749N/A GC gc = w->mailbox.gc;
749N/A Pixel back = w->core.background_pixel;
749N/A struct _mbimage *im;
749N/A
749N/A /* center the picture in the window */
749N/A
749N/A if (w->mailbox.flag_up) { /* paint the "up" position */
749N/A im = &w->mailbox.full;
749N/A if (w->mailbox.flipit) back = w->mailbox.foreground_pixel;
749N/A } else { /* paint the "down" position */
749N/A im = &w->mailbox.empty;
749N/A }
749N/A x = (((int)w->core.width) - im->width) / 2;
749N/A y = (((int)w->core.height) - im->height) / 2;
749N/A
749N/A XSetWindowBackground (dpy, win, back);
749N/A XClearWindow (dpy, win);
749N/A XCopyArea (dpy, im->pixmap, win, gc, 0, 0, im->width, im->height, x, y);
749N/A
749N/A#ifdef SHAPE
749N/A /*
749N/A * XXX - temporary hack; walk up widget tree to find top most parent (which
749N/A * will be a shell) and mash it to have our shape. This will be replaced
749N/A * by a special shell widget.
749N/A */
749N/A if (w->mailbox.shapeit) {
749N/A Widget parent;
749N/A
749N/A for (parent = (Widget) w; XtParent(parent);
749N/A parent = XtParent(parent)) {
749N/A x += parent->core.x + parent->core.border_width;
749N/A y += parent->core.y + parent->core.border_width;
749N/A }
749N/A
749N/A if (im->mask != w->mailbox.shape_cache.mask ||
749N/A x != w->mailbox.shape_cache.x || y != w->mailbox.shape_cache.y) {
749N/A XShapeCombineMask (XtDisplay(parent), XtWindow(parent),
749N/A ShapeBounding, x, y, im->mask, ShapeSet);
749N/A w->mailbox.shape_cache.mask = im->mask;
749N/A w->mailbox.shape_cache.x = x;
749N/A w->mailbox.shape_cache.y = y;
749N/A }
749N/A }
749N/A#endif
749N/A
749N/A return;
749N/A}
749N/A
749N/A
749N/Astatic void beep (w)
749N/A MailboxWidget w;
749N/A{
749N/A XBell (XtDisplay (w), w->mailbox.volume);
749N/A return;
749N/A}