all repos — fluxbox @ 344bd1d00ac69ad073b83269fd57787a23e305e5

custom fork of the fluxbox windowmanager

using short instead of char
fluxgen fluxgen
commit

344bd1d00ac69ad073b83269fd57787a23e305e5

parent

748467ac49f37e18b04de32a9f069dc78df5d450

2 files changed, 13 insertions(+), 12 deletions(-)

jump to
M src/FbTk/Color.ccsrc/FbTk/Color.cc

@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Color.cc,v 1.3 2002/12/01 13:42:14 rathnor Exp $ +// $Id: Color.cc,v 1.4 2003/02/23 01:09:20 fluxgen Exp $ #include "Color.hh"

@@ -50,7 +50,7 @@ Color::Color(const Color &col_copy) {

copy(col_copy); } -Color::Color(unsigned char red, unsigned char green, unsigned char blue, int screen): +Color::Color(unsigned short red, unsigned short green, unsigned short blue, int screen): m_red(red), m_green(green), m_blue(blue), m_pixel(0), m_allocated(false), m_screen(screen) {

@@ -138,7 +138,7 @@ col_copy.m_screen);

} -void Color::allocate(unsigned char red, unsigned char green, unsigned char blue, int screen) { +void Color::allocate(unsigned short red, unsigned short green, unsigned short blue, int screen) { Display *disp = App::instance()->display(); XColor color;

@@ -161,7 +161,7 @@

m_screen = screen; } -void Color::setRGB(unsigned char red, unsigned char green, unsigned char blue) { +void Color::setRGB(unsigned short red, unsigned short green, unsigned short blue) { m_red = red; m_green = green; m_blue = blue;
M src/FbTk/Color.hhsrc/FbTk/Color.hh

@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Color.hh,v 1.2 2002/12/01 13:42:14 rathnor Exp $ +// $Id: Color.hh,v 1.3 2003/02/23 01:09:02 fluxgen Exp $ #ifndef FBTK_COLOR_HH #define FBTK_COLOR_HH

@@ -38,7 +38,7 @@ public:

Color(); explicit Color(unsigned long pixel); Color(const Color &col_copy); - Color(unsigned char red, unsigned char green, unsigned char blue, int screen); + Color(unsigned short red, unsigned short green, unsigned short blue, int screen); Color(const char *color_string, int screen); ~Color();

@@ -49,20 +49,21 @@ // TODO

//Color &operator = (const Color &col_copy); bool isAllocated() const { return m_allocated; } - unsigned char red() const { return m_red; } - unsigned char green() const { return m_green; } - unsigned char blue() const { return m_blue; } + unsigned short red() const { return m_red; } + unsigned short green() const { return m_green; } + unsigned short blue() const { return m_blue; } unsigned long pixel() const { return m_pixel; } private: void free(); void copy(const Color &col); - void allocate(unsigned char red, unsigned char green, unsigned char blue, int screen); + void allocate(unsigned short red, unsigned short green, + unsigned short blue, int screen); inline void setAllocated(bool a) { m_allocated = a; } - void setRGB(unsigned char red, unsigned char green, unsigned char blue); + void setRGB(unsigned short red, unsigned short green, unsigned short blue); - unsigned char m_red, m_green, m_blue; + unsigned short m_red, m_green, m_blue; unsigned long m_pixel; bool m_allocated; int m_screen;