How to mark a new type as "abstract" in PyGObject (or create a new ginterface/extend existing one)

In PyGObejct, how do I create a new gobject-type, but make it “abstract”? There doesn’t seem to be a simple __gflags__ thing for setting GObject.TypeFlags.ABSTRACT, however it seems that type_register_fundamental type_register_dynamic and type_register_static support setting flags when registering (and then set this as __gtype__ I guess) (however the simple type_register function that just registers a class doesn’t seem to support such options). However then it isn’t really clear how to get the required TypeInfo argument which seems to require a lot of options that should probably usually be gotten automatically.

Or alternatively (and probably more important question), just how do I create a new GObject.GInterface (or a worse option, extend an existing one)? Many ways I tried to do that made a crash without an error message, and one way got me this warning RuntimeWarning: Interface type has no Python implementation support(so is it impossible???) I couldn’t find anything online about creating Ginterfaces through pygobject (or then maybe how do I make a “fake” ginterface? (like convert a python class to one))

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.