OpenStrip

Download http://www.strout.net/files/OpenStrip.sit.hqx
Current Version 0.4 , released on 2000-Oct-27 -- release notes are included with the download package.
System Requirements OpenStrip requires MacOS 9.0.4 with CarbonLib 1.1, or Mac OS X.
License OpenStrip is free and open-source. This means you may distribute it as you like, and even change the source as long as you send me your changes.
Mailing Lists To be notified of updates to OpenStrip or OpenStrip modules, subscribe to the openstrip-news mailing list.

If you're interested in helping with OpenStrip development or writing some modules, please subscribe to the openstrip-devl mailing list.

Help Wanted! As an open-source project, OpenStrip is a community effort that needs your help to thrive. Please visit the OpenStrip project page at SourceForge:
http://sourceforge.net/projects/openstrip/

We need developers to help with coding, artists to help with icons, and everybody else to report bugs and feature requests. Please get involved!

Purpose & Rationale

"OpenStrip" is a free, Open-Source reimplementation of the Control Strip. It is only getting started, and I welcome any and all suggestions.

As you probably know, the Control Strip is going away in OS X. I consider this a shame, since I find it very useful for:

And best of all, the Control Strip collapses down to a little tab when you want it out of your way. It's great! But, like many other great things, Apple is suffering from lack of vision and killing it. (They're killing the Apple menu too, making something like the Control Strip even more useful -- put oft-used desk accessories and such there.)

Apple is trying to make the Dock replace the Control Strip, the Apple Menu, and system menus. But working in OS X for any amount of time quickly demonstrates that it's inadequate to the task.

Fortunately, there is nothing particularly difficult about the Control Strip. It's just a global floating window served by a faceless background app. This can be rewritten in OS X pretty easily. Current CSMs will have to be recompiled, but shouldn't need too much change to their source code.


General Approach

OpenStrip will be a faceless background application which creates and manages a floating utility window. It will load Control Strip Modules (CSMs) -- which should probably be called OpenStrip Modules once they're recompiled -- and call code in these to draw themselves, respond to events, etc. There will be no control panel in the classic sense ('cdev' or 'appc'), though there may be another application which speaks to OpenStrip via AppleEvents and can inspect or change its preferences.

It should be noted that starting with Mac OS 8.5, the Control Strip is an application and not loaded at startup time. This is very similar to how OpenStrip will be implemented.


Issues

Calling the CSM code

A CSM (Control Strip Module) consists of a single function entry point. This function is invoked by the Control Strip with one of nine message codes, and some parameter info whose interpretation varies depending on the message.

Currently a CSM is a 68k code resource. For OpenStrip, it will be a PowerPC Carbon shared library instead. This will of course mean recompiling each CSM, but there will be few (if any) changes needed to the source code (except those required for Carbonization).

CSM code calling support functions

CSM modules traditionally use about a dozen functions defined in ControlStrip.h. For OpenStrip, the modules will link against a stub library. These functions will then be implemented in the OpenStrip host app, and exported therefrom. This allows the plug-in modules to access the host's code. This is the standard CFM approach, and should work in Mac OS X since CFM is fully supported in Carbon.

Window appearance & behavior

The window is a global floating (utility) window. It's pretty much like a sideways utility window (definition ID = kWindowFloatSideProc), but with some custom look and behavior:

  1. the title region actually serves to collapse the window against the edge of the screen

  2. the title region is non-rectangular

  3. the close box appears opposite the title area, and has a special appearance and behavior

Because of these unusual features, a custom window definition function is used.

The current OpenStrip prototype does not use kUtilityWindowClass, because this identifier disappeared from the Carbon headers for a while. It's back now, but I haven't yet downloaded the latest version. As soon as I do, we'll be able to make a global floating window in Carbon/OS X.

Progress

OpenStrip now scans for modules in its folder and attempts to load any it finds. It comes with two modules; one is a simple test module that counts how many times you've clicked it, and the other is one of Apple's old sample modules, that lets you choose among three different display icons. Not all of the API functions have been implemented yet, but it's coming along nicely.

The appearance of the OpenStrip window comes from some resources in its resource fork. I currently have four partial sets of graphics. The first is mostly a copy of the current ("classic") ControlStrip:

The second one is a hacked-together first-draft attempt at something which will fit in better with the new Aqua look:

The third one, currently used by the code, is a nicer Aqua look prepared by Lucas Haley.

Finally, here's a concept by Samrod Shenassa.

The first three are actual screenshots of the running OpenStrip program (though the first two are currently disabled). Please keep in mind that these are preliminary; we can tweak them easily, and we'll eventually provide user configuration modules (aka "skins").

As of Sunday, October 8, 2000, OpenStrip has received a couple of bug fixes (the width is constrained to be a positive value, and clicking the anchor tab now collapses the strip), as well as a few enhancements to the sample modules. See the release notes included with the download for details. Module authors, contact me and we'll look into updating your modules for OS X!

Done! Not Yet Done
  • prototype CFM plug-in architecture
  • prototype module interface
  • prototype UI including custom WDEF
  • convert app to Carbon
  • clean up WDEF code
  • implement "button-push" animation
  • implement basic strip dragging behavior
  • test prototype under OS X
  • implement strip collapse behavior
  • global floating behavior
  • constrain strip dragging behavior
  • implement all CS functions
  • implement module dragging behavior
  • implement strip scroll buttons


Relevant Links


How to Help

I'm happy for any contributions to this open-source project -- anything from minor suggestions and corrections, to writing large parts of the code. The more people who contribute their expertise, the better this will be for everybody. Please write to joe@strout.net if you're interested.