mono/gtk-sharp — pull request #113 by knocte (2014-08-05 13:54:01+00:00)
Title: generator: Ginterface approach overhaul

In the past, for the GInterface Foo we used to have:
a) FooAdapter: the helper class to use GInterface implementations.
b) Foo: the interface with the methods from native side.
c) FooImplementor: the interface to inherit from .NET classes.

Learning about these special suffixes "Adapter" and "Implementor" was
a bit cumbersome and not very API-consumer friendly.

Some months ago we modified gtk-sharp's generator to follow the "I"
prefix convention for .NET interfaces, which leaves us as:

a) FooAdapter.
b) IFoo.
c) IFooImplementor.

This is good because now the name "Foo" is free, so we can rename
"FooAdapter" to "Foo", and there's one less thing to learn (so this
is one of the things this commit achieves).

The next step is, then, getting rid of the "Implementor" suffix, how?
Simply switching the way this is exposed, as:

b) IFooBase
c) IFoo

This way, if one wants to create a .NET class that implements the
GInterface Foo, she simply needs to inherit from "IFoo". And when
consuming, from .NET, native classes that implement the Foo GInterface,
the interface they will implement will be IFooBase instead of IFoo
(but there's no need to learn this since by using the API you will
simply be exposed to it).

Discussed and reviewed by: Stephan Sundermann