-/* gltext, Copyright (c) 2001, 2002, 2003, 2004 Jamie Zawinski <jwz@jwz.org>
+/* gltext, Copyright (c) 2001-2005 Jamie Zawinski <jwz@jwz.org>
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
#define DEF_SPIN "XYZ"
#define DEF_WANDER "True"
-#define DEFAULTS "*delay: 10000 \n" \
+#define DEFAULTS "*delay: 20000 \n" \
"*showFPS: False \n" \
"*wireframe: False \n" \
"*spin: " DEF_SPIN "\n" \
#include <sys/time.h>
#include <ctype.h>
+#ifdef HAVE_LOCALE_H
+# include <locale.h>
+#endif /* HAVE_LOCALE_H */
+
#ifdef USE_GL /* whole file */
#ifdef HAVE_UNAME
text_configuration *tp = &tps[MI_SCREEN(mi)];
if (event->xany.type == ButtonPress &&
- event->xbutton.button & Button1)
+ event->xbutton.button == Button1)
{
tp->button_down_p = True;
gltrackball_start (tp->trackball,
return True;
}
else if (event->xany.type == ButtonRelease &&
- event->xbutton.button & Button1)
+ event->xbutton.button == Button1)
{
tp->button_down_p = False;
return True;
}
+ else if (event->xany.type == ButtonPress &&
+ (event->xbutton.button == Button4 ||
+ event->xbutton.button == Button5))
+ {
+ gltrackball_mousewheel (tp->trackball, event->xbutton.button, 10,
+ !!event->xbutton.state);
+ return True;
+ }
else if (event->xany.type == MotionNotify &&
tp->button_down_p)
{
text_configuration *tp;
int i;
+# ifdef HAVE_SETLOCALE
+ setlocale (LC_TIME, ""); /* for strftime() calls */
+# endif
+
if (!tps) {
tps = (text_configuration *)
calloc (MI_NUM_SCREENS(mi), sizeof (text_configuration));
{
Bool spinx=False, spiny=False, spinz=False;
- double spin_speed = 1.0;
- double wander_speed = 0.05;
- double spin_accel = 1.0;
+ double spin_speed = 0.5;
+ double wander_speed = 0.02;
+ double spin_accel = 0.5;
char *s = do_spin;
while (*s)
ly = coord->y;
}
}
- return (int) (ch->right + tube_width/2);
+ return (int) (ch->right + tube_width);
}
return 0;
}