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.5 by pcg, Sun Feb 1 01:34:41 2004 UTC vs.
Revision 1.6 by pcg, Mon Feb 9 07:11:49 2004 UTC

364 * Draw top/left and bottom/right border shadows around windows 364 * Draw top/left and bottom/right border shadows around windows
365 */ 365 */
366#if defined(RXVT_SCROLLBAR) || defined(MENUBAR) 366#if defined(RXVT_SCROLLBAR) || defined(MENUBAR)
367/* EXTPROTO */ 367/* EXTPROTO */
368void 368void
369rxvt_Draw_Shadow(Display *Xdisplay, Window win, GC topShadow, GC botShadow, int x, int y, int w, int h) 369rxvt_Draw_Shadow(Display *display, Window win, GC topShadow, GC botShadow, int x, int y, int w, int h)
370{ 370{
371 int shadow; 371 int shadow;
372 372
373 shadow = (w == 0 || h == 0) ? 1 : SHADOW; 373 shadow = (w == 0 || h == 0) ? 1 : SHADOW;
374 w += x - 1; 374 w += x - 1;
375 h += y - 1; 375 h += y - 1;
376 for (; shadow-- > 0; x++, y++, w--, h--) 376 for (; shadow-- > 0; x++, y++, w--, h--)
377 { 377 {
378 XDrawLine(Xdisplay, win, topShadow, x, y, w, y); 378 XDrawLine(display, win, topShadow, x, y, w, y);
379 XDrawLine(Xdisplay, win, topShadow, x, y, x, h); 379 XDrawLine(display, win, topShadow, x, y, x, h);
380 XDrawLine(Xdisplay, win, botShadow, w, h, w, y + 1); 380 XDrawLine(display, win, botShadow, w, h, w, y + 1);
381 XDrawLine(Xdisplay, win, botShadow, w, h, x + 1, h); 381 XDrawLine(display, win, botShadow, w, h, x + 1, h);
382 } 382 }
383} 383}
384#endif 384#endif
385 385
386/* button shapes */ 386/* button shapes */
387#ifdef MENUBAR 387#ifdef MENUBAR
388/* EXTPROTO */ 388/* EXTPROTO */
389void 389void
390rxvt_Draw_Triangle(Display *Xdisplay, Window win, GC topShadow, GC botShadow, int x, int y, int w, int type) 390rxvt_Draw_Triangle(Display *display, Window win, GC topShadow, GC botShadow, int x, int y, int w, int type)
391{ 391{
392 switch (type) 392 switch (type)
393 { 393 {
394 case 'r': /* right triangle */ 394 case 'r': /* right triangle */
395 XDrawLine(Xdisplay, win, topShadow, x, y, x, y + w); 395 XDrawLine(display, win, topShadow, x, y, x, y + w);
396 XDrawLine(Xdisplay, win, topShadow, x, y, x + w, y + w / 2); 396 XDrawLine(display, win, topShadow, x, y, x + w, y + w / 2);
397 XDrawLine(Xdisplay, win, botShadow, x, y + w, x + w, y + w / 2); 397 XDrawLine(display, win, botShadow, x, y + w, x + w, y + w / 2);
398 break; 398 break;
399 399
400 case 'l': /* left triangle */ 400 case 'l': /* left triangle */
401 XDrawLine(Xdisplay, win, botShadow, x + w, y + w, x + w, y); 401 XDrawLine(display, win, botShadow, x + w, y + w, x + w, y);
402 XDrawLine(Xdisplay, win, botShadow, x + w, y + w, x, y + w / 2); 402 XDrawLine(display, win, botShadow, x + w, y + w, x, y + w / 2);
403 XDrawLine(Xdisplay, win, topShadow, x, y + w / 2, x + w, y); 403 XDrawLine(display, win, topShadow, x, y + w / 2, x + w, y);
404 break; 404 break;
405 405
406 case 'd': /* down triangle */ 406 case 'd': /* down triangle */
407 XDrawLine(Xdisplay, win, topShadow, x, y, x + w / 2, y + w); 407 XDrawLine(display, win, topShadow, x, y, x + w / 2, y + w);
408 XDrawLine(Xdisplay, win, topShadow, x, y, x + w, y); 408 XDrawLine(display, win, topShadow, x, y, x + w, y);
409 XDrawLine(Xdisplay, win, botShadow, x + w, y, x + w / 2, y + w); 409 XDrawLine(display, win, botShadow, x + w, y, x + w / 2, y + w);
410 break; 410 break;
411 411
412 case 'u': /* up triangle */ 412 case 'u': /* up triangle */
413 XDrawLine(Xdisplay, win, botShadow, x + w, y + w, x + w / 2, y); 413 XDrawLine(display, win, botShadow, x + w, y + w, x + w / 2, y);
414 XDrawLine(Xdisplay, win, botShadow, x + w, y + w, x, y + w); 414 XDrawLine(display, win, botShadow, x + w, y + w, x, y + w);
415 XDrawLine(Xdisplay, win, topShadow, x, y + w, x + w / 2, y); 415 XDrawLine(display, win, topShadow, x, y + w, x + w / 2, y);
416 break; 416 break;
417#if 0 417#if 0
418 case 's': /* square */ 418 case 's': /* square */
419 XDrawLine(Xdisplay, win, topShadow, x + w, y, x, y); 419 XDrawLine(display, win, topShadow, x + w, y, x, y);
420 XDrawLine(Xdisplay, win, topShadow, x, y, x, y + w); 420 XDrawLine(display, win, topShadow, x, y, x, y + w);
421 XDrawLine(Xdisplay, win, botShadow, x, y + w, x + w, y + w); 421 XDrawLine(display, win, botShadow, x, y + w, x + w, y + w);
422 XDrawLine(Xdisplay, win, botShadow, x + w, y + w, x + w, y); 422 XDrawLine(display, win, botShadow, x + w, y + w, x + w, y);
423 break; 423 break;
424#endif 424#endif
425 425
426 } 426 }
427} 427}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines