comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@acm.org
Subject: Re: A community Windows binding
Date: Fri, 08 Oct 2004 04:56:34 GMT
Date: 2004-10-08T04:56:34+00:00	[thread overview]
Message-ID: <56p9d.202353$MQ5.7145@attbi_s52> (raw)
In-Reply-To: 2smd6iF1mo0mcU1@uni-berlin.de

>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



  reply	other threads:[~2004-10-08  4:56 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <usm8shkul.fsf@acm.org>
2004-10-05 23:28 ` A community Windows binding Stephen Leake
2004-10-06  4:26   ` David Botton
2004-10-06 17:42     ` Jeffrey Carter
2004-10-07 16:33       ` Warren W. Gay VE3WWG
2004-10-07 17:37         ` Jeffrey Carter
2004-10-08  2:39           ` Alexander E. Kopilovich
2004-10-08  2:43           ` Nick Roberts
2004-10-08  4:56             ` tmoran [this message]
2004-10-08 23:17             ` chris
2004-10-09  1:31             ` Jeffrey Carter
2004-10-09  1:36             ` Jeffrey Carter
2004-10-09  3:15               ` Steve
2004-10-09  6:23                 ` tmoran
     [not found]                 ` <z7ybd.26154$hk6.998363@news20.bellglobal.com>
2004-10-15  1:12                   ` Stephen Leake
2004-10-15 20:36                     ` David Botton
2004-10-17 13:25                       ` Stephane Riviere
2004-10-09 13:20               ` Stephen Leake
2004-10-10  9:04                 ` CBFalconer
2004-10-10 14:39                   ` Stephen Leake
2004-10-14 16:54                     ` Warren W. Gay VE3WWG
2004-10-14 16:53                   ` Warren W. Gay VE3WWG
2004-10-10  3:38               ` David Botton
2004-10-14 16:46             ` Warren W. Gay VE3WWG
     [not found]           ` <rSftVP19_F@VB1162.spb.edu>
2004-10-08  8:18             ` Marius Amado Alves
2004-10-08  1:36         ` Stephen Leake
2004-10-06  4:28   ` CBFalconer
2004-10-06  6:02     ` tmoran
2004-10-06 11:35     ` Georg Bauhaus
2004-10-06 14:04       ` Steve
2004-10-06  6:22   ` Fionn mac Cuimhaill
2004-10-06 17:18   ` Nick Roberts
2004-10-07  6:38   ` Frank Piron
2004-10-07  9:44   ` Ross Higson
2004-10-07 16:39     ` Warren W. Gay VE3WWG
2004-10-07 22:27       ` Ross Higson
     [not found] <41664D4E.7040405@netcabo.pt>
2004-10-08 21:38 ` Alexander E. Kopilovich
     [not found] <uacv0hhj0.fsf_-_@acm.org>
2004-10-10 18:05 ` Stephen Leake
2004-10-10 18:17   ` Andre
2004-10-10 20:55     ` tmoran
2004-10-11  0:34   ` David Botton
2004-10-11  0:39   ` David Botton
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox