howto write an interface

Hi, I want to write an interface with glib-object. The situation is a
parent object implements the interface, but the subclass should
overwrite the function pointers in the interface. The parent class
contains the following code in the function ags_recall_get_type:


static const GInterfaceInfo ags_connectable_interface_info = {
  (GInterfaceInitFunc) ags_recall_connectable_interface_init,
  NULL, /* interface_finalize */
  NULL, /* interface_data */




AgsRecall has subclasses which should overwrite the functions, but I
don't know what's the proper way in the subclass to do so. How do I tell
GInterface to call a function of the subclass to overwrite?
One more, is it correct to make an object cast on the interface e.g.
(where AgsConnectable is an interface which is implemented by

ags_recall_connect(AgsConnectable connectable)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]