Minor manpage formatting fix.
[fvwm.git] / libs / Graphics.h
blobf3da43ee0ccc138ae819063c06b7308c8070c4f7
1 #ifndef LIB_GRAPHICS_H
2 #define LIB_GRAPHICS_H
4 void do_relieve_rectangle(
5 Display *dpy, Drawable d, int x, int y, int w, int h,
6 GC ReliefGC, GC ShadowGC, int line_width, Bool use_alternate_shading);
8 void do_relieve_rectangle_with_rotation(
9 Display *dpy, Drawable d, int x, int y, int w, int h,
10 GC ReliefGC, GC ShadowGC, int line_width, Bool use_alternate_shading,
11 int rotation);
13 #define RelieveRectangle(dpy, d, x, y, w, h, ReliefGC, ShadowGC, line_width) \
14 do_relieve_rectangle( \
15 dpy, d, x, y, w, h, ReliefGC, ShadowGC, line_width, False)
17 #define RelieveRectangle2(dpy, d, x, y, w, h, ReliefGC, ShadowGC, line_width) \
18 do_relieve_rectangle( \
19 dpy, d, x, y, w, h, ReliefGC, ShadowGC, line_width, True)
21 Pixmap CreateStretchXPixmap(
22 Display *dpy, Pixmap src, int src_width, int src_height, int src_depth,
23 int dest_width, GC gc);
25 Pixmap CreateStretchYPixmap(
26 Display *dpy, Pixmap src, int src_width, int src_height, int src_depth,
27 int dest_height, GC gc);
29 Pixmap CreateStretchPixmap(
30 Display *dpy, Pixmap src, int src_width, int src_height, int src_depth,
31 int dest_width, int dest_height, GC gc);
33 Pixmap CreateTiledPixmap(
34 Display *dpy, Pixmap src, int src_width, int src_height,
35 int dest_width, int dest_height, int depth, GC gc);
37 Pixmap CreateRotatedPixmap(
38 Display *dpy, Pixmap src, int src_width, int src_height, int depth,
39 GC gc, int rotation);
41 GC fvwmlib_XCreateGC(
42 Display *display, Drawable drawable, unsigned long valuemask,
43 XGCValues *values);
45 /**** gradient stuff ****/
47 /* gradient types */
48 #define H_GRADIENT 'H'
49 #define V_GRADIENT 'V'
50 #define D_GRADIENT 'D'
51 #define B_GRADIENT 'B'
52 #define S_GRADIENT 'S'
53 #define C_GRADIENT 'C'
54 #define R_GRADIENT 'R'
55 #define Y_GRADIENT 'Y'
57 Bool IsGradientTypeSupported(char type);
59 /* Convenience function. Calls AllocNonLinearGradient to fetch all colors and
60 * then frees the color names and the perc and color_name arrays. */
61 XColor *AllocAllGradientColors(
62 char *color_names[], int perc[], int nsegs, int ncolors, int dither);
64 int ParseGradient(char *gradient, char **rest, char ***colors_return,
65 int **perc_return, int *nsegs_return);
67 Bool CalculateGradientDimensions(Display *dpy, Drawable d, int ncolors,
68 char type, int dither, int *width_ret,
69 int *height_ret);
70 Drawable CreateGradientPixmap(
71 Display *dpy, Drawable d, GC gc, int type, int g_width,
72 int g_height, int ncolors, XColor *xcs, int dither, Pixel **d_pixels,
73 int *d_npixels, Drawable in_drawable, int d_x, int d_y,
74 int d_width, int d_height, XRectangle *rclip);
75 Pixmap CreateGradientPixmapFromString(
76 Display *dpy, Drawable d, GC gc, int type, char *action,
77 int *width_return, int *height_return,
78 Pixel **alloc_pixels, int *nalloc_pixels, int dither);
80 void DrawTrianglePattern(
81 Display *dpy, Drawable d, GC ReliefGC, GC ShadowGC, GC FillGC,
82 int x, int y, int width, int height, int bw, char orientation,
83 Bool draw_relief, Bool do_fill, Bool is_pressed);
85 #endif /* LIB_GRAPHICS_H */