Mac Screensaver

BlitzMax Forums/BlitzMax Programming/Mac Screensaver

I did some more investigating.

A Mac screensaver isn't just one file. It is a `bundle` of files and folders. When the folder is named whatever.saver, it hides the fact that it is a folder and displays as a single file. If you remove .saver from the name, you can see the folder contents.

Each screensaver comprises a main folder called "Contents". Within that folder are four items: info.plist which seems to be an xml `plist` file that describes some things about the application/bundle etc, pbdevelopment.plist which is another xml file describing some more stuff, a `MacOS` folder containing the actual screensaver itself which appears to show as a console program (non gui app), a `Resources` folder which contains an English.lproj folder which contains two files: ConfigureSheet.nib and Localizable.strings. The localization file appears to contain some localized strings that probably appear within the app as messages to the user. The nib file seems to be an `interface builder` file which when clicked on will launch interface builder, and basically contains the gui configuration sheet that appears when you click `config` in the system screensaver prefs - you can actually edit the interface. I'm not sure, based on Objective C, how the interface events are handled or where or what the result of certain events achieves or where you define that.

All these files comprise a screensaver - this is taken from the `Amseq` screensaver.

With this in mind, how much of this and how many of these files can be tailored to work with a Blitzmax screensaver in any way?

I tried compiling a Blitzmax app as a non-gui app and replacing an existing screensaver exe with it. Although the saver shows as an option in the system prefs, if you select it it tells you the bundle is damaged and cannot load the screensaver. Presumably either some of the file contents conflict or are invalid, or the blitz exe should be making some calls to stuff in the screensaver.h header file to `register` it as a real screensaver or to set it up for being used as one, ie in the preview window etc. Since that is absent from the blitz app I'm thinking it doesn't recognize the exe as a screensaver.

That aside I tried leaving that screensaver selected anyway. The hotcorner did run the app but the default NSView screen took over so you see nothing and I don't think the blitz app reall executed.

So either things will have to revolve around getting the c code into blitzmax, or the max code into c. ????