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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!newsfeed.xs3.de!io.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Ada-Oriented GUI Date: Tue, 20 Mar 2018 16:34:56 -0500 Organization: JSA Research & Innovation Message-ID: References: Injection-Date: Tue, 20 Mar 2018 21:34:57 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="5565"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: reader02.eternal-september.org comp.lang.ada:51086 Date: 2018-03-20T16:34:56-05:00 List-Id: "Dan'l Miller" wrote in message news:f69b294b-414c-46ff-8c2b-23eb0ab4ccd6@googlegroups.com... On Sunday, March 18, 2018 at 8:33:26 AM UTC-5, Jeffrey R. Carter wrote: >> Those interested can find Ada_GUI at >> >> https://github.com/jrcarter/Ada_GUI > >". a better design for a GUI is for the GUI to have its own task, so it >doesn't require that its client give up a thread of control. GUI events are >communicated to the client through a protected queue of events. The >client software can be written in the clearest way possible, unconstrained >by the GUI." > >Although I am sympathetic to your goals* in general, please allow me to >play devil's advocate for the current status quo thread design in nearly >all > GUI-equipped OSes. The GUI does in fact have its own thread: the > main thread of the process. ... I can't speak to all such systems, but the above is definitely not true of Windows Win32. The GUI can be on any thread that it likes, the restriction is that one needs to use a single thread to create windows and receive messages. (Any thread can do other operations.) We took advantage of this in the design of Claw, where there is a separate Ada task created solely for the purpose of managing the GUI. On top of this we built a fairly conventional OOP design where the GUI task dispatches to appropriate subprograms. This allows Ada programs fairly free access to the GUI from any task. (It also has the downside of bringing in tasking issues into any Claw program, even if there aren't any explicit tasks.) It would be easy for Jeff to build his GUI design on top of Win32, it would be organized somewhat like Claw internally but using a different interface to interact with it. Randy. Randy.