Copyright (c) Hyperion Entertainment and contributors.

AmiWest 2013 Lesson 3

From AmigaOS Documentation Wiki
Jump to navigation Jump to search

ProcTree Redux

At AmiWest 2012 we took a look at a simple application which presented a graphical tree of all the Processes running on your Amiga. I don't believe we spent enough time exploring this example which is what this lesson will focus on.

Full source code is available from here.

Setup

The ProcTree example uses many Amiga-only features to setup the application including:

  • C library provided interfaces
  • Embedded version string
  • Stack cookie
  • stdio window control
  • Startup from Shell and Workbench



Working with AmigaOS GUIs can be quite challenging. There are several toolkits available including the original Intuition, GadTools, basic BOOPSI, ReAction and MUI. Although all toolkits are still available, new applications should use either ReAction or MUI for best results.

This tutorial will focus on using ReAction to create a simple GUI. The GUI displays and automatically updates the system Process tree. This simple example touches on many aspects of AmigaOS programming.

Topics explored include:

  • Opening/Closing BOOPSI classes correctly
  • BOOPSI class interfaces
  • MEMF_PRIVATE data
  • Exec lists
  • ReAction GUIs using window.class
  • Deferred GUI refreshing
  • Hierarchical listbrowser
  • BOOPSI object user data fields
  • Process break signals
  • Process list change notification
  • Listbrowser labels detachment and reattachment
  • Refreshing a BOOPSI object
  • Process IDs
  • Exec objects (LIST, HOOK, NODE)
  • Proper GUI cleanup and exit