Project Description
The idea for this project is to write a Windows screen saver using procedural COBOL.

Roadmap
Release 0.1 was based on an approach similar to Samuel Pauls' Butterfly Screensaver Tutorial (http://samuelpauls.com/?p=71), in which a Windows native executable written in C wraps a system call to launch a GUI application written in Java. Replace C with OpenCobol, and Java with isCOBOL, and you get the idea.

On further consideration, I think it would be preferable to not base my approach on any proprietary COBOL runtime libraries. This in turn appears to rule out object-oriented COBOL, at least for the time being.

OpenCobol is an obvious choice for an open source procedural COBOL compiler. Sample code in the http://opencobol.add1tocobol.com/sources/ directory shows how OpenCobol can be used for GUI programming, by calling hand-crafted C wrapper functions for GTK+. This may suffice for most of what a Windows screen saver requires. The sample source files of interest are ocgtk.c and gtkhello.cob.

However, I would like to fully meet Microsoft's standards for Windows screensavers as documented in KB182383 (http://support.microsoft.com/kb/182383). Doing so may require creating some C or C++ wrapper functions for the Windows API. I'm thinking for example of the Windows screen saver settings dialog, which is supposed to be a child window to a particular window handle. I would also like to address the considerations raised by Lucian Wischik in his C++ examples at http://www.wischik.com/scr/, e.g., support for multiple monitors.

My roadmap for the next few incremental releases is to switch to OpenCOBOL, handle the standard command line options (if only by explicitly ignoring them), and write the GUI code using COBOL calls to C wrappers for GTK+. Once this is working, I'll see what Windows API programming is needed for full compliance with KB182383 -- or whether those formalities can reasonably be ignored.

Last edited Mar 19, 2012 at 2:49 AM by mfisher_ix, version 4