2 * Window Maker window manager
4 * Copyright (c) 1997-2003 Alfredo K. Kojima
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
33 #define WREL_MENUENTRY 6
36 #define WREL_BORDER_MASK 1
38 #define WTEX_SOLID ((1<<1)|WREL_BORDER_MASK)
39 #define WTEX_HGRADIENT ((1<<2)|WREL_BORDER_MASK)
40 #define WTEX_VGRADIENT ((1<<3)|WREL_BORDER_MASK)
41 #define WTEX_DGRADIENT ((1<<4)|WREL_BORDER_MASK)
42 #define WTEX_MHGRADIENT ((1<<5)|WREL_BORDER_MASK)
43 #define WTEX_MVGRADIENT ((1<<6)|WREL_BORDER_MASK)
44 #define WTEX_MDGRADIENT ((1<<7)|WREL_BORDER_MASK)
45 #define WTEX_IGRADIENT ((1<<8)|WREL_BORDER_MASK)
46 #define WTEX_PIXMAP (1<<10)
47 #define WTEX_THGRADIENT ((1<<11)|WREL_BORDER_MASK)
48 #define WTEX_TVGRADIENT ((1<<12)|WREL_BORDER_MASK)
49 #define WTEX_TDGRADIENT ((1<<13)|WREL_BORDER_MASK)
50 #define WTEX_FUNCTION ((1<<14)|WREL_BORDER_MASK)
59 short type
; /* type of texture */
60 char subtype
; /* subtype of the texture */
61 XColor color
; /* default background color */
62 GC gc
; /* gc for the background color */
66 typedef struct WTexSolid
{
82 typedef struct WTexGradient
{
93 typedef struct WTexMGradient
{
103 typedef struct WTexIGradient
{
116 typedef struct WTexPixmap
{
122 struct RImage
*pixmap
;
125 typedef struct WTexTGradient
{
133 struct RImage
*pixmap
;
137 typedef struct WTexFunction
{
144 RImage
*(*render
) (int, char**, int, int, int);
149 typedef union WTexture
{
152 WTexGradient gradient
;
153 WTexIGradient igradient
;
154 WTexMGradient mgradient
;
156 WTexTGradient tgradient
;
157 WTexFunction function
;
161 WTexSolid
*wTextureMakeSolid(WScreen
*, XColor
*);
162 WTexGradient
*wTextureMakeGradient(WScreen
*, int, const RColor
*, const RColor
*);
163 WTexMGradient
*wTextureMakeMGradient(WScreen
*, int, RColor
**);
164 WTexTGradient
*wTextureMakeTGradient(WScreen
*, int, const RColor
*, const RColor
*, const char *, int);
165 WTexIGradient
*wTextureMakeIGradient(WScreen
*, int, const RColor
[], int, const RColor
[]);
166 WTexPixmap
*wTextureMakePixmap(WScreen
*scr
, int style
, const char *pixmap_file
,
168 void wTextureDestroy(WScreen
*, WTexture
*);
169 void wTexturePaint(WTexture
*, Pixmap
*, WCoreWindow
*, int, int);
170 void wTextureRender(WScreen
*, WTexture
*, Pixmap
*, int, int, int);
171 struct RImage
*wTextureRenderImage(WTexture
*, int, int, int);
174 void wTexturePaintTitlebar(struct WWindow
*wwin
, WTexture
*texture
, Pixmap
*tdata
,
178 #define FREE_PIXMAP(p) if ((p)!=None) XFreePixmap(dpy, (p)), (p)=None
180 void wDrawBevel(Drawable d
, unsigned width
, unsigned height
,
181 WTexSolid
*texture
, int relief
);