# define SMOOTH_COLORS
# define release_mountain 0
+# define reshape_mountain 0
+# define mountain_handle_event 0
# include "xlockmore.h" /* in xscreensaver distribution */
#else /* STANDALONE */
# include "xlock.h" /* in xlockmore distribution */
#ifdef USE_MODULES
ModStruct mountain_description =
{"mountain", "init_mountain", "draw_mountain", (char *) NULL,
- "refresh_mountain", "init_mountain", (char *) NULL, &mountain_opts,
+ "refresh_mountain", "init_mountain", "free_mountain", &mountain_opts,
1000, 30, 4000, 1, 64, 1.0, "",
"Shows Papo's mountain range", 0, NULL};
mp->stage++;
}
-static void free_mountain (ModeInfo * mi);
-
ENTRYPOINT void
init_mountain (ModeInfo * mi)
{
XGCValues gcv;
mountainstruct *mp;
- MI_INIT (mi, mountains, free_mountain);
+ MI_INIT (mi, mountains);
mp = &mountains[MI_SCREEN(mi)];
mp->width = MI_WIDTH(mi);
}
ENTRYPOINT void
-reshape_mountain(ModeInfo * mi, int width, int height)
-{
- XClearWindow (MI_DISPLAY (mi), MI_WINDOW(mi));
- init_mountain (mi);
-}
-
-
-static void
free_mountain (ModeInfo * mi)
{
mountainstruct *mp = &mountains[MI_SCREEN(mi)];
XFreeGC(MI_DISPLAY(mi), mp->stippledGC);
}
+#ifndef STANDALONE
ENTRYPOINT void
refresh_mountain(ModeInfo * mi)
{
mp->x = 0;
mp->y = 0;
}
-
-ENTRYPOINT Bool
-mountain_handle_event (ModeInfo *mi, XEvent *event)
-{
- if (screenhack_event_helper (MI_DISPLAY(mi), MI_WINDOW(mi), event))
- {
- init_mountain (mi);
- return True;
- }
- return False;
-}
+#endif
XSCREENSAVER_MODULE ("Mountain", mountain)