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,4b27f494a96e0530 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!news.maxwell.syr.edu!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!wn14feed!worldnet.att.net!attbi_s52.POSTED!53ab2750!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: A community Windows binding References: <2smd6iF1mo0mcU1@uni-berlin.de> X-Newsreader: Tom's custom newsreader Message-ID: <56p9d.202353$MQ5.7145@attbi_s52> NNTP-Posting-Host: 24.6.132.82 X-Complaints-To: abuse@comcast.net X-Trace: attbi_s52 1097211393 24.6.132.82 (Fri, 08 Oct 2004 04:56:33 GMT) NNTP-Posting-Date: Fri, 08 Oct 2004 04:56:33 GMT Organization: Comcast Online Date: Fri, 08 Oct 2004 04:56:34 GMT Xref: g2news1.google.com comp.lang.ada:4911 Date: 2004-10-08T04:56:34+00:00 List-Id: >I have long felt that the approach most suited to a concurrent language >(such as Ada) is for the 'window manager' to be a separate task, or >possibly many tasks. Claw has a (hidden) separate task for the window manager. >The window manager calls -- via callbacks, or (better) dispatching -- the Claw uses dispatching. >'draw' procedures of a registered set of 'visual components', in response >to the movement, resizing, uncovering, deminimisation, etc., of those >components, as they are placed on the screen. The window manager may do the >actual drawing itself directly to the hardware, or it may be a proxy for an >underlying subsystem. I appreciate that this model doesn't fit Win32 >perfectly, but it can be done. When, eg resizing, is done by the user, the Claw window manager calls (by dispatching) the programmer's "When_Resize" procedure, which in turn may make calls to draw the various objects that should be visible in the resized window. >All that a simple program (with no separate tasks of its own) needs to do >is to set up the components, and register them with the window manager. In Claw (for non-trivial programs) the programmer defines, eg, type My_Stereo_View_Window_Type is new Basic_Window_Type with ... procedure When_Resize(Window : in out My_Stereo_View_Window_Type; ... A call to the (inherited) Create procedure creates the window (usually also displaying it). On a resize event for a window, dispatching goes to the appropriate When_Resize procedure. >Its main data needs to be protected (in protected objects), so that it can be >accessed concurrently by the components' draw (and other) procedures, as >they are called by the window manager. Most windows programs do everything on an interrupt, er, event basis so there's really only one task - the window manager - doing anything. The main program merely sits and waits for the window manager and other tasks to finish. But you're quite right, if the main program or other tasks needs to non-trivially access shared data protected objects will likely be appropriate. >However, this is all very idle and speculative. Hardly, see www.rrsoftware.com/html/prodinf/claw.claw.htm