diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2017-07-12 08:36:00 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2017-07-12 08:36:01 +0900 |
commit | 385fb5df2f7c3ec197b954e8a8ddac5297fe4043 (patch) | |
tree | d84ecee10b56acc8ec2633a277fca9ce457013f1 /gi/overrides/Gdk.py | |
parent | c79482ebfe55da780fd2d733696f5107dc4d5cb8 (diff) | |
download | pygobject2-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.py | 18 |
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): |