🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.atari.st
Article #36833

Re: Who have I clobbered? (GEM windows)

#36833
From: Bill Rosenkranz
Date: Wed, 01 Mar 1989 20:33
47 lines
2260 bytes
---

regarding redraw messages: there is a better (i define better as more
general) way of forcing a redraw using the appl_write () function. it
is more tricky but once u master it, it is more like a general interprocess
message passing utility (i.e. send a message to the current appl, or
to and from an accessory). most applications are written with some sort
of evnt_multi () loop that checks for messages, timer events, keyboard
events, and button events. one of the messages which is looked for is
WM_REDRAW.

tim oren's GEM tutorials presented such a "self redraw" code. the code
fragments recently posted are ok to do the actual redraw.

the only trick involved with using the appl_write () code is getting
the correct application id. i was having some problems and found out that
gulam was somehow messing this up. invoked from the desktop, everything
worked fine. most texts on GEM say the appli_init () function returns
an application id (apid). this MAY be the case on PC GEM or with some
compilers on the ST. however, at least with (beloved) alcyon, the AES 
bindings (AESBIND) export a global 16-bit int containing the proper
gl_apid to use. don't use the return value from appl_init (unless your
compiler bindings say it's ok).

main()
{
	extern int	gl_apid;

	appl_init ();

	/* now gl_apid contains the id of THIS application */

}

u can use appl_find () to get the id of any other gem application in memory
(like .acc's).

if youse guys want, i'll post a small example...

-bill

rosenkra@hall.cray.com or rosenkra%boston@hall.cray.com
...!rutgers!umn-sc!hall!rosenkra

(p.s. there was an article back in STart circa 1987 by tom hudson on this
message pipe scheme...)
Technical Details
Message-ID: <427@hall.cray.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cwjcc!hal!nic.MR.NET!umn-d-ub!umn-cs!hall!rosenkra
References: <7829@chinet.chi.il.us> <7839@chinet.chi.il.us>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cwjcc!hal!nic.MR.NET!umn-d-ub!umn-cs!hall!rosenkra
From: rosenkra@hall.cray.com (Bill Rosenkranz)
Newsgroups: comp.sys.atari.st
Subject: Re: Who have I clobbered? (GEM windows)
Keywords: GEM redraw rectangle
Message-ID: <427@hall.cray.com>
Date: 1 Mar 89 20:33:57 GMT
References: <7829@chinet.chi.il.us> <7839@chinet.chi.il.us>
Reply-To: rosenkra@hall.UUCP (Bill Rosenkranz)
Organization: Cray Research, Inc., Mendota Heights, MN
Lines: 47