diff options
-rw-r--r-- | include/core/rect.h | 18 | ||||
-rw-r--r-- | include/core/size.h | 16 | ||||
-rw-r--r-- | src/rect.cpp | 12 | ||||
-rw-r--r-- | src/size.cpp | 6 |
4 files changed, 26 insertions, 26 deletions
diff --git a/include/core/rect.h b/include/core/rect.h index b4aad63..4bca23c 100644 --- a/include/core/rect.h +++ b/include/core/rect.h @@ -30,15 +30,15 @@ class CompRect { public: CompRect (); - CompRect (int x, int y, unsigned int width, unsigned int height); + CompRect (int x, int y, int width, int height); CompRect (const CompRect&); CompRect (const XRectangle); int x () const; int y () const; - unsigned int width () const; - unsigned int height () const; + int width () const; + int height () const; int x1 () const; int y1 () const; @@ -54,17 +54,17 @@ class CompRect { int centerY () const; CompPoint center () const; - unsigned int area () const; + int area () const; const Region region () const; void setGeometry (int x, int y, - unsigned int width, unsigned int height); + int width, int height); void setX (int); void setY (int); - void setWidth (unsigned int); - void setHeight (unsigned int); + void setWidth (int); + void setHeight (int); void setPos (const CompPoint&); void setSize (const CompSize&); @@ -110,13 +110,13 @@ CompRect::y () const return mRegion.extents.y1; } -inline unsigned int +inline int CompRect::width () const { return mRegion.extents.x2 - mRegion.extents.x1; } -inline unsigned int +inline int CompRect::height () const { return mRegion.extents.y2 - mRegion.extents.y1; diff --git a/include/core/size.h b/include/core/size.h index a9bc2cb..62d6dba 100644 --- a/include/core/size.h +++ b/include/core/size.h @@ -33,13 +33,13 @@ class CompSize { public: CompSize (); - CompSize (unsigned int, unsigned int); + CompSize (int, int); - unsigned int width () const; - unsigned int height () const; + int width () const; + int height () const; - void setWidth (unsigned int); - void setHeight (unsigned int); + void setWidth (int); + void setHeight (int); typedef std::vector<CompSize> vector; typedef std::vector<CompSize *> ptrVector; @@ -47,16 +47,16 @@ class CompSize { typedef std::list<CompSize *> ptrList; private: - unsigned int mWidth, mHeight; + int mWidth, mHeight; }; -inline unsigned int +inline int CompSize::width () const { return mWidth; } -inline unsigned int +inline int CompSize::height () const { return mHeight; diff --git a/src/rect.cpp b/src/rect.cpp index ddbc9a8..f024495 100644 --- a/src/rect.cpp +++ b/src/rect.cpp @@ -36,7 +36,7 @@ CompRect::CompRect () mRegion.extents.y2 = 0; } -CompRect::CompRect (int x, int y, unsigned int width, unsigned int height) +CompRect::CompRect (int x, int y, int width, int height) { mRegion.rects = &mRegion.extents; mRegion.numRects = 1; @@ -71,8 +71,8 @@ CompRect::region () const void CompRect::setGeometry (int x, int y, - unsigned int width, - unsigned int height) + int width, + int height) { mRegion.extents.x1 = x; mRegion.extents.y1 = y; @@ -106,13 +106,13 @@ CompRect::setPos (const CompPoint& pos) } void -CompRect::setWidth (unsigned int width) +CompRect::setWidth (int width) { mRegion.extents.x2 = mRegion.extents.x1 + width; } void -CompRect::setHeight (unsigned int height) +CompRect::setHeight (int height) { mRegion.extents.y2 = mRegion.extents.y1 + height; } @@ -211,7 +211,7 @@ CompRect::isEmpty () const return true; } -unsigned int +int CompRect::area () const { if (mRegion.extents.x2 < mRegion.extents.x1) diff --git a/src/size.cpp b/src/size.cpp index 848c074..f655919 100644 --- a/src/size.cpp +++ b/src/size.cpp @@ -31,20 +31,20 @@ CompSize::CompSize () : { } -CompSize::CompSize (unsigned int width, unsigned int height) : +CompSize::CompSize (int width, int height) : mWidth (width), mHeight (height) { } void -CompSize::setWidth (unsigned int width) +CompSize::setWidth (int width) { mWidth = width; } void -CompSize::setHeight (unsigned int height) +CompSize::setHeight (int height) { mHeight = height; } |