home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 110 / EnigmaAmiga110CD.iso / indispensabili / utility / apdf / xpdf-0.80 / ltk / ltkborder.h < prev    next >
C/C++ Source or Header  |  1998-11-27  |  2KB  |  71 lines

  1. //========================================================================
  2. //
  3. // LTKBorder.h
  4. //
  5. // Copyright 1996 Derek B. Noonburg
  6. //
  7. //========================================================================
  8.  
  9. #ifndef LTKBORDER_H
  10. #define LTKBORDER_H
  11.  
  12. #ifdef __GNUC__
  13. #pragma interface
  14. #endif
  15.  
  16. #include <stddef.h>
  17. #include <X11/Xlib.h>
  18.  
  19. // Width of a border.
  20. #define ltkBorderWidth 2
  21.  
  22. // Type of border.
  23. enum LTKBorder {
  24.   ltkBorderNone,
  25.   ltkBorderRaised,
  26.   ltkBorderSunken
  27. };
  28.  
  29. // Triangle orientation.
  30. enum LTKTriangle {
  31.   ltkTriLeft,
  32.   ltkTriRight,
  33.   ltkTriUp,
  34.   ltkTriDown
  35. };
  36.  
  37. // Compute bright/dark color and allocate X pixel color.
  38. extern Gulong ltkGetBrightColor(Display *display, int screenNum,
  39.                 XColor *bg, Gulong def);
  40. extern Gulong ltkGetDarkColor(Display *display, int screenNum,
  41.                   XColor *bg, Gulong def);
  42.  
  43. // Draw a rectangular border.
  44. extern void ltkDrawBorder(Display *display, Window xwin,
  45.               GC bright, GC dark, GC background,
  46.               int x, int y, int width, int height,
  47.               LTKBorder border);
  48.  
  49. // Draw a triangular border.
  50. extern void ltkDrawTriBorder(Display *display, Window xwin,
  51.                  GC bright, GC dark, GC background,
  52.                  int x, int y, int width, int height,
  53.                  LTKTriangle orient, LTKBorder border);
  54.  
  55. // Draw a divider line.  Divider is horizontal if width > 0, vertical
  56. // otherwise.
  57. extern void ltkDrawDivider(Display *display, Window xwin,
  58.                GC bright, GC dark, GC background,
  59.                int x, int y, int width, int height,
  60.                LTKBorder border);
  61.  
  62. // Draw a border which splits a rectangle into two pieces.
  63. // Border is horizontal if width > 0, vertical otherwise.
  64. // This border has width 2*ltkBorderWidth.
  65. extern void ltkDrawSplitBorder(Display *display, Window xwin,
  66.                    GC bright, GC dark, GC background,
  67.                    int x, int y, int width, int height,
  68.                    LTKBorder border);
  69.  
  70. #endif
  71.