]>
Dogcows Code - chaz/openbox/blob - src/Texture.hh
1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
2 // Texture.hh for Blackbox - an X11 Window manager
3 // Copyright (c) 2001 - 2002 Sean 'Shaleh' Perry <shaleh at debian.org>
4 // Copyright (c) 1997 - 2000, 2002 Bradley T Hughes <bhughes at trolltech.com>
6 // Permission is hereby granted, free of charge, to any person obtaining a
7 // copy of this software and associated documentation files (the "Software"),
8 // to deal in the Software without restriction, including without limitation
9 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 // and/or sell copies of the Software, and to permit persons to whom the
11 // Software is furnished to do so, subject to the following conditions:
13 // The above copyright notice and this permission notice shall be included in
14 // all copies or substantial portions of the Software.
16 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 // DEALINGS IN THE SOFTWARE.
47 CrossDiagonal
= (1l<<8),
59 // parent relative image
60 Parent_Relative
= (1l<<17),
61 // fake interlaced image
65 BTexture(const BaseDisplay
* const _display
= 0,
66 unsigned int _screen
= ~(0u), BImageControl
* _ctrl
= 0);
67 BTexture(const std::string
&_description
,
68 const BaseDisplay
* const _display
= 0,
69 unsigned int _screen
= ~(0u), BImageControl
* _ctrl
= 0);
71 void setColor(const BColor
&_color
);
72 void setColorTo(const BColor
&_colorTo
) { ct
= _colorTo
; }
73 void setBorderColor(const BColor
&_borderColor
) { bc
= _borderColor
; }
75 const BColor
&color(void) const { return c
; }
76 const BColor
&colorTo(void) const { return ct
; }
77 const BColor
&lightColor(void) const { return lc
; }
78 const BColor
&shadowColor(void) const { return sc
; }
79 const BColor
&borderColor(void) const { return bc
; }
81 unsigned long texture(void) const { return t
; }
82 void setTexture(const unsigned long _texture
) { t
= _texture
; }
83 void addTexture(const unsigned long _texture
) { t
|= _texture
; }
85 BTexture
&operator=(const BTexture
&tt
);
86 inline bool operator==(const BTexture
&tt
)
87 { return (c
== tt
.c
&& ct
== tt
.ct
&& lc
== tt
.lc
&&
88 sc
== tt
.sc
&& t
== tt
.t
); }
89 inline bool operator!=(const BTexture
&tt
)
90 { return (! operator==(tt
)); }
92 const BaseDisplay
*display(void) const { return dpy
; }
93 unsigned int screen(void) const { return scrn
; }
94 void setDisplay(const BaseDisplay
* const _display
,
95 const unsigned int _screen
);
96 void setImageControl(BImageControl
* _ctrl
) { ctrl
= _ctrl
; }
97 const std::string
&description(void) const { return descr
; }
98 void setDescription(const std::string
&d
);
100 Pixmap
render(const unsigned int width
, const unsigned int height
,
101 const Pixmap old
= 0);
104 BColor c
, ct
, lc
, sc
, bc
;
107 const BaseDisplay
*dpy
;
This page took 0.03751 seconds and 4 git commands to generate.