2 * Window Maker window manager
4 * Copyright (c) 1997, 1998 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
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
34 #define WREL_MENUENTRY 6
37 #define WREL_BORDER_MASK 1
39 #define WTEX_SOLID ((1<<1)|WREL_BORDER_MASK)
40 #define WTEX_HGRADIENT ((1<<2)|WREL_BORDER_MASK)
41 #define WTEX_VGRADIENT ((1<<3)|WREL_BORDER_MASK)
42 #define WTEX_DGRADIENT ((1<<4)|WREL_BORDER_MASK)
43 #define WTEX_MHGRADIENT ((1<<5)|WREL_BORDER_MASK)
44 #define WTEX_MVGRADIENT ((1<<6)|WREL_BORDER_MASK)
45 #define WTEX_MDGRADIENT ((1<<7)|WREL_BORDER_MASK)
46 #define WTEX_PIXMAP (1<<8)
47 #define WTEX_THGRADIENT ((1<<9)|WREL_BORDER_MASK)
48 #define WTEX_TVGRADIENT ((1<<10)|WREL_BORDER_MASK)
49 #define WTEX_TDGRADIENT ((1<<11)|WREL_BORDER_MASK)
50 #define WTEX_FUNCTION ((1<<12)|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 WTexPixmap
{
109 struct RImage
*pixmap
;
112 typedef struct WTexTGradient
{
120 struct RImage
*pixmap
;
124 typedef struct WTexFunction
{
131 RImage
*(*render
) (int, char**, int, int, int);
136 typedef union WTexture
{
139 WTexGradient gradient
;
140 WTexMGradient mgradient
;
142 WTexTGradient tgradient
;
143 WTexFunction function
;
147 WTexSolid
*wTextureMakeSolid(WScreen
*, XColor
*);
148 WTexGradient
*wTextureMakeGradient(WScreen
*, int, RColor
*, RColor
*);
149 WTexMGradient
*wTextureMakeMGradient(WScreen
*, int, RColor
**);
150 WTexTGradient
*wTextureMakeTGradient(WScreen
*, int, RColor
*, RColor
*, char *, int);
151 WTexPixmap
*wTextureMakePixmap(WScreen
*scr
, int style
, char *pixmap_file
,
153 #ifdef TEXTURE_PLUGIN
154 WTexFunction
*wTextureMakeFunction(WScreen
*, char *, char *, int, char **);
156 void wTextureDestroy(WScreen
*, WTexture
*);
157 void wTexturePaint(WTexture
*, Pixmap
*, WCoreWindow
*, int, int);
158 void wTextureRender(WScreen
*, WTexture
*, Pixmap
*, int, int, int);
159 struct RImage
*wTextureRenderImage(WTexture
*, int, int, int);
162 void wTexturePaintTitlebar(struct WWindow
*wwin
, WTexture
*texture
, Pixmap
*tdata
,
166 #define FREE_PIXMAP(p) if ((p)!=None) XFreePixmap(dpy, (p)), (p)=None
168 void wDrawBevel(Drawable d
, unsigned width
, unsigned height
,
169 WTexSolid
*texture
, int relief
);