Screensaver notes

From Helpful
Jump to navigation Jump to search
This article/section is a stub — probably a pile of half-sorted notes and is probably a first version, is not well-checked, so may have incorrect bits. (Feel free to ignore, or tell me)


Screensaver from existing media

This article/section is a stub — probably a pile of half-sorted notes and is probably a first version, is not well-checked, so may have incorrect bits. (Feel free to ignore, or tell me)


Windows

If you just want a basic slideshow from images (or sometimes video, Flash, and/or such), there are some easy options that do this for you.


Options include:

  • Google screensaver
    • Images from disk, (previously Picasa) and/or RSS feeds
    • [1]
  • (third-party) Flickr screensaver (images)
    • Images from flickr users, groups, tags
    • [2]
  • InstantStorm
    • Turns SWF files (Flash animations) into a locally running screensaver
  • many paid / adware / trialware programs (that tend to be low quality or bothersome)


Linux


OSX

Has a photos screensaver, which defaults to fetch from the web, and you can also set to your photo library, or a specific folder.



Agnostic


Writing your own

Wrapping a browser

Windows

.scr files are basic executables that follow a few conventions

  • has a description resource table
  • has an icon resource
  • stoppings on most/all interaction
  • knows about the command line arguments:
/s means 'start the thing in full-screen'
/c means 'show a screensaver configuration dialog' (optional)
/p handlenum means 'display a preview in the specified window handle - used in windows's screensaver configuration window (optional)


Some details are smoother when you listen to relevant window messaging.

You can use scrnsave.h + scrnsave.lib, which has most boilerplate (command handling, form/window handles stuff (the preview is handled for you), and you hook your own code into ScreenSaverProc (note that you draw based on WM_TIMER, not WM_PAINT as you otherwise might)

You need to implement that ScreenSaverProc, ScreenSaverConfigureDialog (can be a do-nothing implementation), and RegisterDialogClasses (regularly a do-nothing implementation).


See also:



Installing

If you want your installer to set the screensaver as the active one, you'll want the installer to, post-install, run something like:

rundll32.exe desk.cpl,InstallScreenSaver Path\to\your.scr

This seems to be the same as right-clicking on the .scr file and choosing install(verify)


That does not copy it, though, and windows seems to forget about .scr files that are not stored in %WinDir%\system32 or %WinDir%\SysWoW64, so it seems like a good idea to have an installer place your .scr files there (or have a .scr file there that is a shim around your real install).

See also https://stackoverflow.com/questions/8783328/does-a-screensaver-still-have-to-be-installed-into-system32



Seemingly spurious WM_MOUSEMOVE messages

The window manager can send WM_MOUSEMOVE message for 'mouse entered the window', which can happen because of mouse movements, but can also happen purely through changes in the window hierarchy - and a screensaver going fullscreen can do that.


It seems that when you use scrnsave.lib this is filtered out(verify).

If you don't: The hierarchy messages are a bunch of message (5, apparently) with identical coordinates (the mouse's current ones, presumably(verify)), so the simplest way to work around this is probably to check the coordinates show actual movement, which you are probably already doing anyway.


See also:



Linux

xscreensaver

gnome-screensaver

KDE (kscreensaver)

OSX

This article/section is a stub — probably a pile of half-sorted notes and is probably a first version, is not well-checked, so may have incorrect bits. (Feel free to ignore, or tell me)

See also: