Peek-a-Boo Apple Event Application Programming Interface Software Development Kit

by Bob Clark

August 1997

Simultaneously with the Peek-a-Boo 1.6 release, we are making available a small SDK for people who want to communicate with Peek-a-Boo via Apple Events. Peek-a-Boo 1.5 or later is required to use the Temporary Memory Apple Event, and Peek-a-Boo 1.6 or later is required for the Set Priority Apple Event.

A downloadable package includes two files: PeekabooSupport.h and PeekabooSupport.cpp. These are very small files (about 4K total) that make it easy to use the Apple Event interface.

There are two features that Peek-a-Boo has exposed to other applications who wish to use them via Peek-a-Boo's Apple Events: setting priority and notifying Peek-a-Boo about temporary memory usage.

Here is a way for other programs to use Peek-a-Boo in order to set a process's priority. (This requires the PaB Special Technology extension to be installed.)

The Clarkwood Software product CSM Pack now includes a Control Strip module that relies upon this Apple Event support. This module offers a convenient way for the user to set the current process's priority.

In order to use the SDK to adjust a process's priority, add a line like this to your program:

err = PeekabooSetPriority(kHighPriority);

The other feature for which Peek-a-Boo supports Apple Events is for processes that use Temporary Memory (sometimes called the Process Manager Heap, and real old-timers will recognize it as Multifinder Memory). Although Peek-a-Boo currently determines how much Temporary Memory a process can use, it can't find out where in the memory map that Temporary Memory is used.

But if an application tells Peek-a-Boo where the application is using Temporary Memory, then Peek-a-Boo can show that in the memory map part of its display.

Another Clarkwood Software product, ramBunctious, uses Temporary Memory to store its RAM disk images. It uses this API to tell Peek-a-Boo where in memory those RAM disks live.

In order to use the SDK to tell Peek-a-Boo where Temporary Memory is being used, add a line like this to your program:

err = TellPeekabooAboutTempMemUsage(start, length, true);

This SDK is provided free of charge, and you can use it however you wish. Of course, Peek-a-Boo usage (even if it's controlled to some extent by an API-using program) is subject to its normal obligations.

Related Links: