Lines Matching refs:mailbox

40 #include <./Xaw3_1MailboxP.h>		/* for implementation mailbox stuff */
49 * The default user interface is to have the mailbox turn itself off whenever
69 #define offset(field) XtOffset(MailboxWidget,mailbox.field)
183 xgcv.foreground = w->mailbox.foreground_pixel;
200 if (!w->mailbox.filename) GetMailFile (w);
205 if (w->mailbox.reverseVideo) {
208 tmp = w->mailbox.foreground_pixel;
209 w->mailbox.foreground_pixel = w->core.background_pixel;
214 if (w->mailbox.shapeit && !XShapeQueryExtension (XtDisplay (w),
217 w->mailbox.shapeit = False;
218 w->mailbox.shape_cache.mask = None;
221 w->mailbox.gc = get_mailbox_gc (w);
222 w->mailbox.interval_id = (XtIntervalId) 0;
223 w->mailbox.full.pixmap = None;
224 w->mailbox.empty.pixmap = None;
247 w->mailbox.last_size = -1;
306 w->mailbox.interval_id = XtAddTimeOut (w->mailbox.update * 1000,
333 back = w->mailbox.foreground_pixel;
335 fore = w->mailbox.foreground_pixel;
361 if (w->mailbox.full.bitmap == None) {
362 w->mailbox.full.bitmap =
367 if (w->mailbox.empty.bitmap == None) {
368 w->mailbox.empty.bitmap =
374 w->mailbox.empty.pixmap = make_pixmap (dpy, w, w->mailbox.empty.bitmap,
376 &w->mailbox.empty.width,
377 &w->mailbox.empty.height);
378 w->mailbox.full.pixmap = make_pixmap (dpy, w, w->mailbox.full.bitmap,
379 depth, w->mailbox.flipit,
380 &w->mailbox.full.width,
381 &w->mailbox.full.height);
384 if (w->mailbox.empty.mask == None && w->mailbox.full.mask == None)
385 w->mailbox.shapeit = False;
388 w->mailbox.interval_id = XtAddTimeOut (w->mailbox.update * 1000,
393 w->mailbox.shape_cache.mask = None;
406 XtFree (w->mailbox.filename);
407 if (w->mailbox.interval_id) XtRemoveTimeOut (w->mailbox.interval_id);
408 XtDestroyGC (w->mailbox.gc);
410 freepix (w->mailbox.full.bitmap); /* until cvter does ref cnt */
411 freepix (w->mailbox.full.mask); /* until cvter does ref cnt */
412 freepix (w->mailbox.full.pixmap);
413 freepix (w->mailbox.empty.bitmap); /* until cvter does ref cnt */
414 freepix (w->mailbox.empty.mask); /* until cvter does ref cnt */
415 freepix (w->mailbox.empty.pixmap);
417 freepix (w->mailbox.shape_cache.mask);
439 if (w->mailbox.check_command != NULL) {
440 switch (system(w->mailbox.check_command)) {
442 mailboxsize = w->mailbox.last_size + 1;
453 if (stat (w->mailbox.filename, &st) == 0) {
460 * there is no mail. If the mailbox is empty then we want to turn off
461 * the flag. Otherwise if the mailbox has changed size then we want to
466 * o no mailbox or empty (zero-sized) mailbox DOWN
476 w->mailbox.flag_up = FALSE;
478 } else if (mailboxsize == 0) { /* no mailbox or empty */
479 w->mailbox.flag_up = FALSE;
480 if (w->mailbox.last_size > 0) force_redraw = TRUE; /* if change */
481 } else if (mailboxsize != w->mailbox.last_size) { /* different size */
482 if (!w->mailbox.once_only || !w->mailbox.flag_up)
484 w->mailbox.flag_up = TRUE;
488 w->mailbox.last_size = mailboxsize;
494 * get user name for building mailbox
513 w->mailbox.filename = (String) XtMalloc (strlen (MAILBOX_DIRECTORY) + 1 +
515 strcpy (w->mailbox.filename, MAILBOX_DIRECTORY);
516 strcat (w->mailbox.filename, "/");
517 strcat (w->mailbox.filename, username);
541 if (current->mailbox.update != new->mailbox.update) {
542 if (current->mailbox.interval_id)
543 XtRemoveTimeOut (current->mailbox.interval_id);
544 new->mailbox.interval_id = XtAddTimeOut (new->mailbox.update * 1000,
549 if (current->mailbox.foreground_pixel != new->mailbox.foreground_pixel ||
551 XtDestroyGC (current->mailbox.gc);
552 new->mailbox.gc = get_mailbox_gc (new);
570 GC gc = w->mailbox.gc;
576 if (w->mailbox.flag_up) { /* paint the "up" position */
577 im = &w->mailbox.full;
578 if (w->mailbox.flipit) back = w->mailbox.foreground_pixel;
580 im = &w->mailbox.empty;
595 if (w->mailbox.shapeit) {
604 if (im->mask != w->mailbox.shape_cache.mask ||
605 x != w->mailbox.shape_cache.x || y != w->mailbox.shape_cache.y) {
608 w->mailbox.shape_cache.mask = im->mask;
609 w->mailbox.shape_cache.x = x;
610 w->mailbox.shape_cache.y = y;
622 XBell (XtDisplay (w), w->mailbox.volume);