Missing GObject Introspection Annotations in the libnautilus-extension headers
I tryed make vala vapi
$ vapigen --library libnautilus-extension --pkg gio-2.0 --pkg gtk+-3.0 /usr/share/gir-1.0/Nautilus-3.0.gir -d ~/Temp
Generation succeeded - 0 warning(s)
but generated result is incorrect: libnautilus-extension.vapi
For example the returns of GLib.List<Nautilus.MenuItem> get_file_items (Gtk.Widget window, GLib.List<Nautilus.FileInfo> files);
should be nullable: GLib.List<Nautilus.MenuItem>? get_file_items (Gtk.Widget window, GLib.List<Nautilus.FileInfo>? files);
. I think that the root of the problem is the missing of annotation in the
nautilus-menu-provider.h. Something like that:
/* Interface Functions */
/**
* nautilus_menu_provider_get_file_items:
* @provider: a #NautilusMenuProvider
* @window: a #GtkWidget
* @files: (nullable) (element-type Nautilus.FileInfo): List of #NautilusFileInfo
*
* Returns: (nullable) (element-type Nautilus.MenuItem): List of #NautilusMenuItem
*/
GList *nautilus_menu_provider_get_file_items (NautilusMenuProvider *provider,
GtkWidget *window,
GList *files);
Another example.
Result of vapigen: public static void module_list_types (GLib.Type types, int num_types);
I think should be public static void module_list_types (out GLib.Type[] types);
with annotation for nautilus-extension.h:
/**
* nautilus_module_list_types:
* @types: (out) (array length=num_types): List of types
*/
void nautilus_module_list_types (const GType **types,
int *num_types);
And I don't know what is this:
public weak global::update_file_info update_file_info;
public weak global::cancel_update cancel_update;