If your screensaver is simple enough, you can use the screensaver maker tools that create automatically a new screensaver using a collection of pictures, or videos.
If you really want to build your own, both Win and Mac have functions to integrate your screensaver
In Win you include the lib scrnsave.lib and in mac, you subclass the screensaverView class and link to the screensaver framework.
win:
http://www.dreamincode.net/forums/topic/17214-write-your-own-windows-screen-saver/mac:
http://cocoadevcentral.com/articles/000088.phpIt is better to intergrate your screensaver instead of producing a standard executable that behaves like a screensaver:
- you control/select it via the OS control panel
- you define the time-out from the OS
- the native screensaver will not start during your emulated screensaver executable run.
- it will respect other programs that disable the starting of the screensavers