diff options
author | fluxgen <fluxgen> | 2002-07-19 20:33:15 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2002-07-19 20:33:15 (GMT) |
commit | 56bbd4e5804ecb7230aa21c43026aec36ae8982d (patch) | |
tree | ec7b1e66e15a3043c6b3789cbcb9786e00a7ffa6 /src/Image.hh | |
parent | 15c875ad3718afb20534a2f4a1f12b0462f55162 (diff) | |
download | fluxbox-56bbd4e5804ecb7230aa21c43026aec36ae8982d.zip fluxbox-56bbd4e5804ecb7230aa21c43026aec36ae8982d.tar.bz2 |
changed function names in BColor, BTexture, BImage and BImageControl
Diffstat (limited to 'src/Image.hh')
-rw-r--r-- | src/Image.hh | 99 |
1 files changed, 49 insertions, 50 deletions
diff --git a/src/Image.hh b/src/Image.hh index 677acbb..1a9579b 100644 --- a/src/Image.hh +++ b/src/Image.hh | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: Image.hh,v 1.7 2002/05/17 10:59:30 fluxgen Exp $ | 25 | // $Id: Image.hh,v 1.8 2002/07/19 20:33:15 fluxgen Exp $ |
26 | 26 | ||
27 | #ifndef IMAGE_HH | 27 | #ifndef IMAGE_HH |
28 | #define IMAGE_HH | 28 | #define IMAGE_HH |
@@ -40,51 +40,51 @@ class BImageControl; | |||
40 | 40 | ||
41 | 41 | ||
42 | class BColor { | 42 | class BColor { |
43 | private: | ||
44 | int allocated; | ||
45 | unsigned char red, green, blue; | ||
46 | unsigned long pixel; | ||
47 | |||
48 | public: | 43 | public: |
49 | BColor(char r = 0, char g = 0, char b = 0) | 44 | BColor(unsigned char red = 0, unsigned char green = 0, unsigned char blue = 0): |
50 | { red = r; green = g; blue = b; pixel = 0; allocated = 0; } | 45 | m_red(red), m_green(green), m_blue(blue), m_pixel(0), m_allocated(false) { } |
51 | 46 | ||
52 | inline int isAllocated(void) const { return allocated; } | 47 | inline int isAllocated() const { return m_allocated; } |
53 | 48 | ||
54 | inline unsigned char getRed(void) const { return red; } | 49 | inline unsigned char red() const { return m_red; } |
55 | inline unsigned char getGreen(void) const { return green; } | 50 | inline unsigned char green() const { return m_green; } |
56 | inline unsigned char getBlue(void) const { return blue; } | 51 | inline unsigned char blue() const { return m_blue; } |
57 | 52 | ||
58 | inline unsigned long getPixel(void) const { return pixel; } | 53 | inline unsigned long pixel() const { return m_pixel; } |
59 | 54 | ||
60 | inline void setAllocated(int a) { allocated = a; } | 55 | inline void setAllocated(bool a) { m_allocated = a; } |
61 | inline void setRGB(char r, char g, char b) { red = r; green = g; blue = b; } | 56 | inline void setRGB(char red, char green, char blue) { m_red = red; m_green = green; m_blue = blue; } |
62 | inline void setPixel(unsigned long p) { pixel = p; } | 57 | inline void setPixel(unsigned long pixel) { m_pixel = pixel; } |
58 | |||
59 | private: | ||
60 | unsigned char m_red, m_green, m_blue; | ||
61 | unsigned long m_pixel; | ||
62 | bool m_allocated; | ||
63 | }; | 63 | }; |
64 | 64 | ||
65 | 65 | ||
66 | class BTexture { | 66 | class BTexture { |
67 | private: | ||
68 | BColor color, colorTo, hiColor, loColor; | ||
69 | unsigned long texture; | ||
70 | |||
71 | public: | 67 | public: |
72 | BTexture(void):texture(0) { } | 68 | BTexture():m_texture(0) { } |
73 | 69 | ||
74 | inline const BColor *getColor(void) const { return &color; } | 70 | inline const BColor &color() const { return m_color; } |
75 | inline const BColor *getColorTo(void) const { return &colorTo; } | 71 | inline const BColor &colorTo() const { return m_color_to; } |
76 | inline const BColor *getHiColor(void) const { return &hiColor; } | 72 | inline const BColor &hiColor() const { return m_hicolor; } |
77 | inline const BColor *getLoColor(void) const { return &loColor; } | 73 | inline const BColor &loColor() const { return m_locolor; } |
78 | 74 | ||
79 | inline BColor *getColor(void) { return &color; } | 75 | inline BColor &color() { return m_color; } |
80 | inline BColor *getColorTo(void) { return &colorTo; } | 76 | inline BColor &colorTo() { return m_color_to; } |
81 | inline BColor *getHiColor(void) { return &hiColor; } | 77 | inline BColor &hiColor() { return m_hicolor; } |
82 | inline BColor *getLoColor(void) { return &loColor; } | 78 | inline BColor &loColor() { return m_locolor; } |
83 | 79 | ||
84 | inline unsigned long getTexture(void) const { return texture; } | 80 | inline unsigned long getTexture() const { return m_texture; } |
85 | 81 | ||
86 | inline void setTexture(unsigned long t) { texture = t; } | 82 | inline void setTexture(unsigned long t) { m_texture = t; } |
87 | inline void addTexture(unsigned long t) { texture |= t; } | 83 | inline void addTexture(unsigned long t) { m_texture |= t; } |
84 | |||
85 | private: | ||
86 | BColor m_color, m_color_to, m_hicolor, m_locolor; | ||
87 | unsigned long m_texture; | ||
88 | }; | 88 | }; |
89 | 89 | ||
90 | 90 | ||
@@ -156,35 +156,34 @@ public: | |||
156 | 156 | ||
157 | class BImageControl : public TimeoutHandler { | 157 | class BImageControl : public TimeoutHandler { |
158 | public: | 158 | public: |
159 | BImageControl(BaseDisplay *, ScreenInfo *, Bool = False, int = 4, | 159 | BImageControl(BaseDisplay *disp, ScreenInfo *screen, bool = False, int = 4, |
160 | unsigned long = 300000l, unsigned long = 200l); | 160 | unsigned long = 300000l, unsigned long = 200l); |
161 | virtual ~BImageControl(); | 161 | virtual ~BImageControl(); |
162 | 162 | ||
163 | inline BaseDisplay *getBaseDisplay(void) { return basedisplay; } | 163 | inline BaseDisplay *baseDisplay() { return basedisplay; } |
164 | 164 | ||
165 | inline bool doDither(void) { return dither; } | 165 | inline bool doDither() { return dither; } |
166 | inline const Colormap &getColormap(void) const { return colormap; } | 166 | inline const Colormap &colormap() const { return m_colormap; } |
167 | inline ScreenInfo *getScreenInfo(void) { return screeninfo; } | 167 | inline ScreenInfo *getScreenInfo() { return screeninfo; } |
168 | 168 | ||
169 | inline const Window &getDrawable(void) const { return window; } | 169 | inline const Window &drawable() const { return window; } |
170 | 170 | ||
171 | inline Visual *getVisual(void) { return screeninfo->getVisual(); } | 171 | inline Visual *visual() { return screeninfo->getVisual(); } |
172 | 172 | ||
173 | inline int getBitsPerPixel(void) const { return bits_per_pixel; } | 173 | inline int bitsPerPixel() const { return bits_per_pixel; } |
174 | inline int getDepth(void) const { return screen_depth; } | 174 | inline int depth() const { return screen_depth; } |
175 | inline int getColorsPerChannel(void) const | 175 | inline int colorsPerChannel(void) const { return colors_per_channel; } |
176 | { return colors_per_channel; } | ||
177 | 176 | ||
178 | unsigned long getColor(const char *); | 177 | unsigned long color(const char *colorname); |
179 | unsigned long getColor(const char *, unsigned char *, unsigned char *, | 178 | unsigned long color(const char *, unsigned char *, unsigned char *, |
180 | unsigned char *); | 179 | unsigned char *); |
181 | unsigned long getSqrt(unsigned int); | 180 | unsigned long getSqrt(unsigned int); |
182 | 181 | ||
183 | Pixmap renderImage(unsigned int, unsigned int, BTexture *); | 182 | Pixmap renderImage(unsigned int, unsigned int, BTexture *); |
184 | 183 | ||
185 | void installRootColormap(void); | 184 | void installRootColormap(); |
186 | void removeImage(Pixmap); | 185 | void removeImage(Pixmap thepix); |
187 | void getColorTables(unsigned char **, unsigned char **, unsigned char **, | 186 | void colorTables(unsigned char **, unsigned char **, unsigned char **, |
188 | int *, int *, int *, int *, int *, int *); | 187 | int *, int *, int *, int *, int *, int *); |
189 | void getXColorTable(XColor **, int *); | 188 | void getXColorTable(XColor **, int *); |
190 | void getGradientBuffers(unsigned int, unsigned int, | 189 | void getGradientBuffers(unsigned int, unsigned int, |
@@ -204,7 +203,7 @@ private: | |||
204 | BTimer timer; | 203 | BTimer timer; |
205 | #endif // TIMEDCACHE | 204 | #endif // TIMEDCACHE |
206 | 205 | ||
207 | Colormap colormap; | 206 | Colormap m_colormap; |
208 | 207 | ||
209 | Window window; | 208 | Window window; |
210 | XColor *colors; | 209 | XColor *colors; |