Из пакета nautilus-devel установлены:
/usr/share/gir-1.0/Nautilus-3.0.gir
/usr/include/nautilus/libnautilus-extension/nautilus-menu-item.h и т.д.
Сконвертировал:
$ vapigen --library ~/.local/share/vala/vapi/Nautilus-3.0 --pkg gio-2.0 --pkg gtk+-3.0 /usr/share/gir-1.0/Nautilus-3.0.gir
[CCode (cprefix = "Nautilus", gir_namespace = "Nautilus", gir_version = "3.0", lower_case_cprefix = "nautilus_")]
namespace Nautilus {
.........
[CCode (cheader_filename = "Nautilus-3.0.h", type_id = "nautilus_menu_item_get_type ()")]
public class MenuItem : GLib.Object {
public weak Nautilus.MenuItemDetails details;
[CCode (has_construct_function = false)]
public MenuItem (string name, string label, string tip, string icon);
public static void list_free (GLib.List<Nautilus.MenuItem> item_list);
public void set_submenu (Nautilus.Menu menu);
[NoAccessorMethod]
public string icon { owned get; set; }
[NoAccessorMethod]
public string label { owned get; set; }
[NoAccessorMethod]
public Nautilus.Menu menu { owned get; set; }
[NoAccessorMethod]
public string name { owned get; construct; }
[NoAccessorMethod]
public bool priority { get; set; }
[NoAccessorMethod]
public bool sensitive { get; set; }
[NoAccessorMethod]
public string tip { owned get; set; }
[HasEmitter]
public virtual signal void activate ();
}
......
}
using Nautilus;
...
Nautilus.MenuItem item = new Nautilus.MenuItem("name", "label", "tip", null);
...
[1/4] Compiling Vala source
....
Compilation succeeded
[2/3] Compiling C object 'src/extension@exe/extension@exe_main.c.o'.
FAILED: src/extension@exe/extension@exe_main.c.o
ccache cc -Isrc/extension@exe -Isrc -I../../../../../Projects/extension/src -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -w -O0 -g -O2 -g -pthread -MMD -MQ 'src/extension@exe/extension@exe_main.c.o' -MF 'src/extension@exe/src_extension@exe_main.c.o.d' -o 'src/extension@exe/src_extension@exe_main.c.o' -c 'src/extension@exe/main.c'
src/extension@exe/main.c:28:26: fatal error: Nautilus-3.0.h: No such file or directory
#include "Nautilus-3.0.h"
^
compilation terminated.
ninja: build stopped: subcommand failed.
[CCode (cheader_filename = "nautilus-menu-item.h", type_id = "nautilus_menu_item_get_type ()")]
.......main.c:28:32: fatal error: nautilus-menu-item.h: No such file or directory
#include "nautilus-menu-item.h"
^
compilation terminated.
ninja: build stopped: subcommand failed.
Что не так?