summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2010-04-28 09:55:57 +0200
committerDanny Baumann <dannybaumann@web.de>2010-04-28 09:55:57 +0200
commita4c0bd14fe7011a056f25b4875534fac411c07a0 (patch)
treee25f5e2e985e85aff20f34cbb636c0624d9bc547 /include
parent7b78d2885f6cba19c8acf84d468b0686a5a5c990 (diff)
downloadzcomp-a4c0bd14fe7011a056f25b4875534fac411c07a0.tar.gz
zcomp-a4c0bd14fe7011a056f25b4875534fac411c07a0.tar.bz2
Add some additional accessor functions for more consistent class usage.
Diffstat (limited to 'include')
-rw-r--r--include/core/rect.h7
-rw-r--r--include/core/screen.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/include/core/rect.h b/include/core/rect.h
index 160c30b..da2814a 100644
--- a/include/core/rect.h
+++ b/include/core/rect.h
@@ -40,6 +40,7 @@ class CompRect {
int x () const;
int y () const;
+ CompPoint pos () const;
int width () const;
int height () const;
@@ -138,6 +139,12 @@ CompRect::y () const
return mRegion.extents.y1;
}
+inline CompPoint
+CompRect::pos () const
+{
+ return CompPoint (x (), y ());
+}
+
inline int
CompRect::width () const
{
diff --git a/include/core/screen.h b/include/core/screen.h
index d4ae692..4d1e2f1 100644
--- a/include/core/screen.h
+++ b/include/core/screen.h
@@ -293,6 +293,7 @@ class CompScreen :
void sendWindowActivationRequest (Window id);
int outputDeviceForPoint (int x, int y);
+ int outputDeviceForPoint (const CompPoint &point);
CompRect getCurrentOutputExtents ();