fifengine/fifengine — pull request #799 by ChrisOelmueller (2013-06-18 19:06:48+00:00)
Title: Convince SWIG that Color.r (g, b, a) should be a python property

While %attribute is not mentioned in SWIG documentation, there is
https://github.com/swig/swig/blob/master/Lib/typemaps/attribute.swg

Instead of using the old getR(), getG() getters and setB(128), you now
can do:

>>> c = fife.Color(80, 0, 255, 128)
>>> print c.r # This replaces getR()
80
>>> c.g = 64 # This replaces setG(64)
>>> print c.g # This replaces getG()
64

and so on. Note that the `Alpha` setters are rather likely to become
deprecated soon in favor of `getA()` and `setA()`, so the name of the
associated python property also is `a` over `alpha`:

>>> print c.a # This replaces getAlpha()
128
>>> c.a = 255 # This replaces setAlpha(255)