summaryrefslogtreecommitdiff
path: root/gi/overrides/Gdk.py
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2017-07-12 08:36:00 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2017-07-12 08:36:01 +0900
commit385fb5df2f7c3ec197b954e8a8ddac5297fe4043 (patch)
treed84ecee10b56acc8ec2633a277fca9ce457013f1 /gi/overrides/Gdk.py
parentc79482ebfe55da780fd2d733696f5107dc4d5cb8 (diff)
downloadpygobject2-385fb5df2f7c3ec197b954e8a8ddac5297fe4043.tar.gz
pygobject2-385fb5df2f7c3ec197b954e8a8ddac5297fe4043.tar.bz2
pygobject2-385fb5df2f7c3ec197b954e8a8ddac5297fe4043.zip
Imported Upstream version 2.28.0
Change-Id: If251721667bb545804ab96eb17bffb715cd4e832 Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'gi/overrides/Gdk.py')
-rw-r--r--gi/overrides/Gdk.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/gi/overrides/Gdk.py b/gi/overrides/Gdk.py
index 16a0548..e346f55 100644
--- a/gi/overrides/Gdk.py
+++ b/gi/overrides/Gdk.py
@@ -45,6 +45,24 @@ class Color(Gdk.Color):
Color = override(Color)
__all__.append('Color')
+if Gdk._version == '3.0':
+ class RGBA(Gdk.RGBA):
+ def __init__(self, red=1.0, green=1.0, blue=1.0, alpha=1.0):
+ Gdk.RGBA.__init__(self)
+ self.red = red
+ self.green = green
+ self.blue = blue
+ self.alpha = alpha
+
+ def __new__(cls, *args, **kwargs):
+ return Gdk.RGBA.__new__(cls)
+
+ def __repr__(self):
+ return '<Gdk.Color(red=%f, green=%f, blue=%f, alpha=%f)>' % (self.red, self.green, self.blue, self.alpha)
+
+ RGBA = override(RGBA)
+ __all__.append('RGBA')
+
if Gdk._version == '2.0':
class Rectangle(Gdk.Rectangle):