The web page: https://developer.gnome.org/gtk2/stable/GtkEntry.html
shows the procedure gtk_entry_get_buffer being declared.
However this is not in the nimble package gtk2-1.1/gtk.nim and when I try to add this declaration:
- proc get_buffer*(entry: PEntry): PTextBuffer{.cdecl,
- dynlib: lib, importc: "gtk_entry_get_buffer".}
to my application I get a loader error: could not import: gtk_entry_get_buffer
Thank you for any suggestions.
BTW - I am trying to get rid of a spurious selection set on a gtk_entry
Unless i'm mistaken, the nimble package uses the version 2.0:
when defined(win32):
const
lib = "libgtk-win32-2.0-0.dll"
elif defined(macosx):
const
lib = "(libgtk-quartz-2.0.0.dylib|libgtk-x11-2.0.dylib)"
# linklib gtk-x11-2.0
# linklib gdk-x11-2.0
# linklib pango-1.0.0
# linklib glib-2.0.0
# linklib gobject-2.0.0
# linklib gdk_pixbuf-2.0.0
# linklib atk-1.0.0
else:
const
lib = "libgtk-x11-2.0.so(|.0)"
But gtk_entry_get_buffer requires 2.18 . I have never used gtk, so i might be wrong.
gtk_entry_get_buffer() is available since GTK 2.18 only.
When you try to add that declaration inside your own module, of course you have to ensure that const lib is set to valid library name. That may be not easy, because const lib may be not exported from GTK2 module. Maybe try to patch that module?
I guess GTK3 module will have gtk_entry_get_buffer -- if not let me know, I will fix it then.
Much code already written using Gtk2 - so Gtk3 not a good option.
When using nimble install gtk2 it wants to install gtk2-1.0 although I have somehow also gotten gtk2-1.1 installed.
I did a nimble refresh first
Nor does nimble install gtk2-2.18 work either
Is gtk2-2.1x available from a different nim repository??
Thanks