The widget implements GtkScrollable. In theory I could use
gtk_scrollable_get_hadjustment: function(scrollable: PGtkWidget): PGtkAdjustment; cdecl;
gtk_scrollable_get_vadjustment: function(scrollable: PGtkWidget): PGtkAdjustment; cdecl;
with my widget, but the parameter "scrollable" should actually be a PGtkScrollable, which is defined nowhere in the bindings. So I try using the PGtkWidget directly and then the funcs obviously return garbages as this is not the right address.
See
https://developer.gnome.org/vte/unstable/VteTerminal.html#VteTerminal.implemented-interfaces for more details. The idea is to sync a TScrollBar to the vertical scrollbar of the widget.
I'd eventually be okay to use a hacky method based on the ABI, e.g unsafe pointer arithmetic.
As the object structure is known the right pointer must be something like address of the widget + 8 * n (to get the location of the virtual table), then the dereference of this pointer + 8 * m (m is 0, 1 or 2 as there's only 3 interfaces in this widget).