Community
Participate
Working Groups
Currently all gtk/gdk native functions are placed into OS.java. If a *dynamic* gtk/gdk function is put into OS.java, then we have to *manually* link it to the proper library in os_custom.h like: #define gdk_drag_context_list_targets_LIB LIB_GDK #define gtk_event_controller_handle_event_LIB LIB_GTK This is confusing to new swt/gtk developers and requires java developers to understand C code. Also it slows down development even if you know about them. It would be much easier to have two separate classes 'GTK.java' and 'GDK.java', where if you put something in there, they're automatically hard-linked against those libraries. I've quickly coded a proof of concept (>40 minutes of work). And tested with dynamic/static gtk function. Works well. @SWT/Linx devs, please have a quick review of the patch and let me know if you have any objections moving forward.
New Gerrit change created: https://git.eclipse.org/r/114703
New Gerrit change created: https://git.eclipse.org/r/116065
Note to self: Currently GObject/GIO functions are linked against glib. @Alex, should I instead link them to the proper libraries? libgobject-2.0.so.0 libgio-2.0.so.0
(GLIB)
New Gerrit change created: https://git.eclipse.org/r/116267
Gerrit change https://git.eclipse.org/r/116267 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=99f1cc70e851d747f5b2b5de343eacb7bc4cce6a
New Gerrit change created: https://git.eclipse.org/r/116557
Awaiting GDK.java patch review. After that bug can be closed.
Gerrit change https://git.eclipse.org/r/116557 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=b9b818f3a8a00e500f1a4a7bd628dd845e22c986
Done. Dynamic functions in GTK.java/GDK.java don't need to be manually linked in os_custom.h anymore. But functions in OS.java still need to be linked in os_cusotm.h. As a note, for rapid prototyping or non gtk/gdk functions, one can temporarily put things into GTK.java and then upon submitting patch move/manually link in OS.java. Also NativeStats show stats separate for Gtk/Gdk. Hopefully that'll help us narrow down gtk3 performance issues in the future.
(In reply to Leo Ufimtsev from comment #12) > Done. > > Dynamic functions in GTK.java/GDK.java don't need to be manually linked in > os_custom.h anymore. > But functions in OS.java still need to be linked in os_cusotm.h. > > As a note, for rapid prototyping or non gtk/gdk functions, one can > temporarily put things into GTK.java and then upon submitting patch > move/manually link in OS.java. Let's not recommend taking such shortcuts as dlsym from another *.so file is something people should not do. I am also afraid that with such recommendations we will end up with many gerrits where time will be lost to remind people to move their bindings to the proper place. I have to remind of enough things already. > > Also NativeStats show stats separate for Gtk/Gdk. > Hopefully that'll help us narrow down gtk3 performance issues in the future.