-# define PROGCLASS "Grav"
-# define HACK_INIT init_grav
-# define HACK_DRAW draw_grav
-# define grav_opts xlockmore_opts
-# define DEFAULTS "*count: 12 \n" \
- "*delay: 10000 \n" \
- "*ncolors: 64 \n"
-# define BRIGHT_COLORS
-# include "xlockmore.h" /* from the xscreensaver distribution */
-#else /* !STANDALONE */
-# include "xlock.h" /* from the xlockmore distribution */
-#endif /* !STANDALONE */
+#define MODE_grav
+#define PROGCLASS "Grav"
+#define HACK_INIT init_grav
+#define HACK_DRAW draw_grav
+#define grav_opts xlockmore_opts
+#define DEFAULTS "*delay: 10000 \n" \
+ "*count: 12 \n" \
+ "*ncolors: 64 \n"
+#define BRIGHT_COLORS
+#include "xlockmore.h" /* in xscreensaver distribution */
+#else /* STANDALONE */
+#include "xlock.h" /* in xlockmore distribution */
+
+#endif /* STANDALONE */
+
+#ifdef MODE_grav
+
+#define DEF_DECAY "False" /* Damping for decaying orbits */
+#define DEF_TRAIL "False" /* For trails (works good in mono only) */
+
+static Bool decay;
+static Bool trail;
+
+static XrmOptionDescRec opts[] =
+{
+ {(char *) "-decay", (char *) ".grav.decay", XrmoptionNoArg, (caddr_t) "on"},
+ {(char *) "+decay", (char *) ".grav.decay", XrmoptionNoArg, (caddr_t) "off"},
+ {(char *) "-trail", (char *) ".grav.trail", XrmoptionNoArg, (caddr_t) "on"},
+ {(char *) "+trail", (char *) ".grav.trail", XrmoptionNoArg, (caddr_t) "off"}
+};
+static argtype vars[] =
+{
+ {(caddr_t *) & decay, (char *) "decay", (char *) "Decay", (char *) DEF_DECAY, t_Bool},
+ {(caddr_t *) & trail, (char *) "trail", (char *) "Trail", (char *) DEF_TRAIL, t_Bool}
+};
+static OptionStruct desc[] =
+{
+ {(char *) "-/+decay", (char *) "turn on/off decaying orbits"},
+ {(char *) "-/+trail", (char *) "turn on/off trail dots"}
+};
+
+ModeSpecOpt grav_opts =
+{sizeof opts / sizeof opts[0], opts, sizeof vars / sizeof vars[0], vars, desc};
+
+#ifdef USE_MODULES
+ModStruct grav_description =
+{"grav", "init_grav", "draw_grav", "release_grav",
+ "refresh_grav", "init_grav", (char *) NULL, &grav_opts,
+ 10000, -12, 1, 1, 64, 1.0, "",
+ "Shows orbiting planets", 0, NULL};
+
+#endif