ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/misc.C
(Generate patch)

Comparing rxvt-unicode/src/misc.C (file contents):
Revision 1.31 by root, Fri Jan 6 20:50:58 2006 UTC vs.
Revision 1.33 by root, Mon Jan 16 15:00:20 2006 UTC

438 * file searching 438 * file searching
439 */ 439 */
440 440
441/* #define DEBUG_SEARCH_PATH */ 441/* #define DEBUG_SEARCH_PATH */
442 442
443#if defined (XPM_BACKGROUND) || (MENUBAR_MAX) 443#ifdef XPM_BACKGROUND
444/* 444/*
445 * search for FILE in the current working directory, and within the 445 * search for FILE in the current working directory, and within the
446 * colon-delimited PATHLIST, adding the file extension EXT if required. 446 * colon-delimited PATHLIST, adding the file extension EXT if required.
447 * 447 *
448 * FILE is either semi-colon or zero terminated 448 * FILE is either semi-colon or zero terminated
525 char *f; 525 char *f;
526 526
527 if (file == NULL || *file == '\0') 527 if (file == NULL || *file == '\0')
528 return NULL; 528 return NULL;
529 529
530 /* search environment variables here too */
531 if ((f = rxvt_File_search_path (path, file, ext)) == NULL) 530 f = rxvt_File_search_path (path, file, ext);
532#ifdef PATH_ENV
533 if ((f = rxvt_File_search_path (getenv (PATH_ENV), file, ext)) == NULL)
534#endif
535 f = rxvt_File_search_path (getenv ("PATH"), file, ext);
536 531
537#ifdef DEBUG_SEARCH_PATH 532#ifdef DEBUG_SEARCH_PATH
538 if (f) 533 if (f)
539 fprintf (stderr, "found: \"%s\"\n", f); 534 fprintf (stderr, "found: \"%s\"\n", f);
540#endif 535#endif
541 536
542 return f; 537 return f;
543} 538}
544#endif /* defined (XPM_BACKGROUND) || (MENUBAR_MAX) */ 539#endif
545 540
546/*----------------------------------------------------------------------* 541/*----------------------------------------------------------------------*
547 * miscellaneous drawing routines 542 * miscellaneous drawing routines
548 */ 543 */
549 544
550/* 545/*
551 * Draw top/left and bottom/right border shadows around windows 546 * Draw top/left and bottom/right border shadows around windows
552 */ 547 */
553#if defined(RXVT_SCROLLBAR) || defined(MENUBAR) 548#ifdef RXVT_SCROLLBAR
554void 549void
555rxvt_Draw_Shadow (Display *display, Window win, GC topShadow, GC botShadow, int x, int y, int w, int h) 550rxvt_Draw_Shadow (Display *display, Window win, GC topShadow, GC botShadow, int x, int y, int w, int h)
556{ 551{
557 int shadow; 552 int shadow;
558 553
563 { 558 {
564 XDrawLine (display, win, topShadow, x, y, w, y); 559 XDrawLine (display, win, topShadow, x, y, w, y);
565 XDrawLine (display, win, topShadow, x, y, x, h); 560 XDrawLine (display, win, topShadow, x, y, x, h);
566 XDrawLine (display, win, botShadow, w, h, w, y + 1); 561 XDrawLine (display, win, botShadow, w, h, w, y + 1);
567 XDrawLine (display, win, botShadow, w, h, x + 1, h); 562 XDrawLine (display, win, botShadow, w, h, x + 1, h);
568 }
569}
570#endif
571
572/* button shapes */
573#ifdef MENUBAR
574void
575rxvt_Draw_Triangle (Display *display, Window win, GC topShadow, GC botShadow, int x, int y, int w, int type)
576{
577 switch (type)
578 {
579 case 'r': /* right triangle */
580 XDrawLine (display, win, topShadow, x, y, x, y + w);
581 XDrawLine (display, win, topShadow, x, y, x + w, y + w / 2);
582 XDrawLine (display, win, botShadow, x, y + w, x + w, y + w / 2);
583 break;
584
585 case 'l': /* left triangle */
586 XDrawLine (display, win, botShadow, x + w, y + w, x + w, y);
587 XDrawLine (display, win, botShadow, x + w, y + w, x, y + w / 2);
588 XDrawLine (display, win, topShadow, x, y + w / 2, x + w, y);
589 break;
590
591 case 'd': /* down triangle */
592 XDrawLine (display, win, topShadow, x, y, x + w / 2, y + w);
593 XDrawLine (display, win, topShadow, x, y, x + w, y);
594 XDrawLine (display, win, botShadow, x + w, y, x + w / 2, y + w);
595 break;
596
597 case 'u': /* up triangle */
598 XDrawLine (display, win, botShadow, x + w, y + w, x + w / 2, y);
599 XDrawLine (display, win, botShadow, x + w, y + w, x, y + w);
600 XDrawLine (display, win, topShadow, x, y + w, x + w / 2, y);
601 break;
602#if 0
603 case 's': /* square */
604 XDrawLine (display, win, topShadow, x + w, y, x, y);
605 XDrawLine (display, win, topShadow, x, y, x, y + w);
606 XDrawLine (display, win, botShadow, x, y + w, x + w, y + w);
607 XDrawLine (display, win, botShadow, x + w, y + w, x + w, y);
608 break;
609#endif
610
611 } 563 }
612} 564}
613#endif 565#endif
614 566
615// should not be used in interactive programs, for obvious reasons 567// should not be used in interactive programs, for obvious reasons

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines