Use signals as final methods in interfaces
Rogni opened this issue · 2 comments
Rogni commented
Currently signals in ListModelIF are generated as virtual methods
connect:
GtkD/generated/gtkd/gio/ListModelIF.d
Line 203 in 81ddb59
emit:
GtkD/generated/gtkd/gio/ListModelIF.d
Line 186 in 81ddb59
and implementation of signals defined in mixin template ListModelT. It is required to implement signal methods in the derived classes.
void itemsChanged(uint position, uint removed, uint added) {
g_list_model_items_changed(getListModelStruct(), position, removed, added);
}
gulong addOnItemsChanged(void delegate(uint, uint, uint, ListModelIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
{
return Signals.connect(this, "items-changed", dlg, connectFlags ^ ConnectFlags.SWAPPED);
}
I suggest to move implementation of signal methods from mixin template to interface as final methods
Rogni commented
also maybe need generate
GListModel* getListModelStruct(bool transferOwnership = false) {
return cast(GListModel*) getStruct;
}
as final method
MikeWey commented
Probably all functions that are not part of the GTK interface should be final functions in the D interface.