The GTK4 C example has recently been revised:
Now they use
g_main_context_iteration (NULL, TRUE);
Both are method calls for gobject-introspection, for g_main_context_iteration we have
<parameters> <instance-parameter name="context" transfer-ownership="none" nullable="1" allow-none="1">
So the instance itself, called this or self in OOP, can be NULL. But how can we get this info from gobject-introspection? My impression is that g_arg_info_may_be_null() does work only for the parameters of the instance, but not for instance itself?
For g_main_context_wakeup() we have
<parameters> <instance-parameter name="context" transfer-ownership="none"> <doc xml:space="preserve" filename="glib-2.0.c" line="21807">a #GMainContext</doc> <type name="MainContext" c:type="GMainContext*"/> </instance-parameter> </parameters>
So here nullable=“1” seems to be missing?
So my current impression is that nullable property for instance parameters is not really supported by gobject-introspection. So we would have to allow NULL always for instance parameters in the bindings?
Well this is a difficult question, but I can not express the problem more clearly currently.