From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,e793d50ead4087cc,start X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,CP1252 X-Received: by 10.66.84.136 with SMTP id z8mr4396444pay.2.1356630341398; Thu, 27 Dec 2012 09:45:41 -0800 (PST) Received: by 10.50.33.171 with SMTP id s11mr8482360igi.13.1356630341360; Thu, 27 Dec 2012 09:45:41 -0800 (PST) Path: 6ni65509pbd.1!nntp.google.com!kr7no16406679pbb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 27 Dec 2012 09:45:40 -0800 (PST) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=70.53.16.242; posting-account=cUi90woAAADTaOISowbbHM8GUD0-opJO NNTP-Posting-Host: 70.53.16.242 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <0c94b952-2bdf-4f25-98a3-91a67ed2355d@googlegroups.com> Subject: Thickening Ada GTK or Vala Binding ? From: Patrick Injection-Date: Thu, 27 Dec 2012 17:45:41 +0000 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Date: 2012-12-27T09:45:40-08:00 List-Id: So I am still going around in circles with the front end of my two projects= . I am however learning new things with each revolution. Now I am thinking I will not use the smaller toolkits, FLTK, Fox and Tk and= will stick to WxWidgets/QT/GTK with GTK being preferred.=20 I have done some experiments. QT has a method called QApplication::processE= vents that was designed to be called from long running callbacks to avoid l= ocking up the gui. I wrapped it and called it from a loop inside Ada and av= oided the normal QT main loop all together. I would then be able to call ta= sks and use Ada=92s multi-threading. I would however have to wrap each C++ = callback in C in order to bind to Ada and that looked painful. I also did some C GTK + Ada experiments. GTK has gtk_main_iteration but = was not able to call it without first initializing the regular main loop. = This is not actually a problem and while I have not finished the test I am = confident that I could do what I was able to do with QT and make a callback= that passed control to Ada and have Ada not return control but to call g= tk_main_iteration instead. My plan was to write more C functions to hide away as much GTK complexity a= s possible and to bind to these functions. So for instance GTK uses glib ty= pes a lot but I don=92t want to have strange looking gint types etc in Ada,= not to mention access types. This leads into what everyone must be thinking, why not just use GtkAda?? There is tons of C Gtk documentation, examples and a large community to cal= l for help with on. Looking at Gtk Ada in makes my head spin. C GTK is bad enough but all the m= ess with pointers and glib just looks that much worse in Ada. I don=92t see= how anyone could use it unless they had a very strong understanding of bot= h Ada and C GTK. I am trying to catch up but right now this does not descri= be me. So to the point......(thanks for reading this far) If I was going to write c functions to hide away the GTK ugliness why don= =92t just write them in Ada and help the community. Does anyone have some small code examples that might help with this ? Or ti= ps on how I could make another wrapper around Ada GTK ? that being said, this does not have to end up being a full reusable wrapper= around GTK, it could be codes samples that other people could use. I think= it is very hard to write reusable code as everyone=92s needs are different= .=20 Also has anyone else looked at Vala ? https://live.gnome.org/Vala/ Vala is designed to hide away as much of C GTK as possible, it compiles to = plain C. What it I wrapped Vala GTK? Thanks-Patrick