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.32 by root, Wed Jan 11 00:59: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
534 fprintf (stderr, "found: \"%s\"\n", f); 534 fprintf (stderr, "found: \"%s\"\n", f);
535#endif 535#endif
536 536
537 return f; 537 return f;
538} 538}
539#endif /* defined (XPM_BACKGROUND) || (MENUBAR_MAX) */ 539#endif
540 540
541/*----------------------------------------------------------------------* 541/*----------------------------------------------------------------------*
542 * miscellaneous drawing routines 542 * miscellaneous drawing routines
543 */ 543 */
544 544
545/* 545/*
546 * Draw top/left and bottom/right border shadows around windows 546 * Draw top/left and bottom/right border shadows around windows
547 */ 547 */
548#if defined(RXVT_SCROLLBAR) || defined(MENUBAR) 548#ifdef RXVT_SCROLLBAR
549void 549void
550rxvt_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)
551{ 551{
552 int shadow; 552 int shadow;
553 553
558 { 558 {
559 XDrawLine (display, win, topShadow, x, y, w, y); 559 XDrawLine (display, win, topShadow, x, y, w, y);
560 XDrawLine (display, win, topShadow, x, y, x, h); 560 XDrawLine (display, win, topShadow, x, y, x, h);
561 XDrawLine (display, win, botShadow, w, h, w, y + 1); 561 XDrawLine (display, win, botShadow, w, h, w, y + 1);
562 XDrawLine (display, win, botShadow, w, h, x + 1, h); 562 XDrawLine (display, win, botShadow, w, h, x + 1, h);
563 }
564}
565#endif
566
567/* button shapes */
568#ifdef MENUBAR
569void
570rxvt_Draw_Triangle (Display *display, Window win, GC topShadow, GC botShadow, int x, int y, int w, int type)
571{
572 switch (type)
573 {
574 case 'r': /* right triangle */
575 XDrawLine (display, win, topShadow, x, y, x, y + w);
576 XDrawLine (display, win, topShadow, x, y, x + w, y + w / 2);
577 XDrawLine (display, win, botShadow, x, y + w, x + w, y + w / 2);
578 break;
579
580 case 'l': /* left triangle */
581 XDrawLine (display, win, botShadow, x + w, y + w, x + w, y);
582 XDrawLine (display, win, botShadow, x + w, y + w, x, y + w / 2);
583 XDrawLine (display, win, topShadow, x, y + w / 2, x + w, y);
584 break;
585
586 case 'd': /* down triangle */
587 XDrawLine (display, win, topShadow, x, y, x + w / 2, y + w);
588 XDrawLine (display, win, topShadow, x, y, x + w, y);
589 XDrawLine (display, win, botShadow, x + w, y, x + w / 2, y + w);
590 break;
591
592 case 'u': /* up triangle */
593 XDrawLine (display, win, botShadow, x + w, y + w, x + w / 2, y);
594 XDrawLine (display, win, botShadow, x + w, y + w, x, y + w);
595 XDrawLine (display, win, topShadow, x, y + w, x + w / 2, y);
596 break;
597#if 0
598 case 's': /* square */
599 XDrawLine (display, win, topShadow, x + w, y, x, y);
600 XDrawLine (display, win, topShadow, x, y, x, y + w);
601 XDrawLine (display, win, botShadow, x, y + w, x + w, y + w);
602 XDrawLine (display, win, botShadow, x + w, y + w, x + w, y);
603 break;
604#endif
605
606 } 563 }
607} 564}
608#endif 565#endif
609 566
610// 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