~ubuntu-branches/debian/sid/xscreensaver/sid

« back to all changes in this revision

Viewing changes to hacks/hopalong.c

  • Committer: Bazaar Package Importer
  • Author(s): Jose Luis Rivas, Tormod Volden, Jose Luis Rivas
  • Date: 2008-07-15 14:48:48 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20080715144848-c6c6mhyxij0dk2p7
Tags: 5.05-3
[ Tormod Volden ]
* debian/patches/10_jwz-xscreensaver-randr-patch-3.patch:
  from upstream, addresses issues with xrandr/xinerama
  (Closes: #482385, #428797, #471920, #453708, #473681, #479715, #480231)
* fixed typo "screen < real_nscreens" in driver/lock:1527 from above patch
* drop 61_DualHead-nVidia_bug471920.patch (obsolete)
* drop 67_XineRama-mode_bug473681.patch (obsolete)
* fix m6502.o typo in hacks/Makefile.in
* refresh 53_XScreenSaver.ad.in.patch
* refresh (disabled) 60_add-ant-hack.patch

[ Jose Luis Rivas ]
* add xscreensaver-demo desktop file, thanks to Daniel Dickinson
  (Closes: #480592)
* update package descriptions (thanks jwz)
* fix categories in xscreensaver.menu
* change build-deps from xlibmesa-gl-dev to libgl1-mesa-dev,
  xutils to xutils-dev, x-dev to x11proto-core-dev.
* bump Standards-Version to 3.8.0
* add Vcs fields and Homepage to debian/control
* Flurry is not installed until the bug get fixed (Closes: #484112)

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
 
53
53
#ifdef STANDALONE
54
54
#define MODE_hop
55
 
#define PROGCLASS "Hop"
56
 
#define HACK_INIT init_hop
57
 
#define HACK_DRAW draw_hop
58
 
#define hop_opts xlockmore_opts
59
 
#define DEFAULTS "*delay: 10000 \n" \
60
 
 "*count: 1000 \n" \
61
 
 "*cycles: 2500 \n" \
62
 
 "*ncolors: 200 \n"
63
 
#define SMOOTH_COLORS
64
 
#include "xlockmore.h"          /* in xscreensaver distribution */
65
 
#include "erase.h"
 
55
#define DEFAULTS        "*delay: 10000 \n" \
 
56
                                        "*count: 1000 \n" \
 
57
                                        "*cycles: 2500 \n" \
 
58
                                        "*ncolors: 200 \n"
 
59
# define SMOOTH_COLORS
 
60
# define reshape_hop 0
 
61
# define hop_handle_event 0
 
62
# include "xlockmore.h"         /* in xscreensaver distribution */
 
63
# include "erase.h"
66
64
#else /* STANDALONE */
67
 
#include "xlock.h"              /* in xlockmore distribution */
68
 
 
 
65
# include "xlock.h"             /* in xlockmore distribution */
69
66
#endif /* STANDALONE */
70
67
 
71
68
#ifdef MODE_hop
148
145
        {"-/+sine", "turn on/off sine format"}
149
146
};
150
147
 
151
 
ModeSpecOpt hop_opts =
 
148
ENTRYPOINT ModeSpecOpt hop_opts =
152
149
{sizeof opts / sizeof opts[0], opts, sizeof vars / sizeof vars[0], vars, desc};
153
150
 
154
151
#ifdef USE_MODULES
187
184
        int         count;
188
185
        int         bufsize;
189
186
        XPoint     *pointBuffer;        /* pointer for XDrawPoints */
 
187
#ifdef STANDALONE
 
188
  eraser_state *eraser;
 
189
#endif
190
190
} hopstruct;
191
191
 
192
192
static hopstruct *hops = (hopstruct *) NULL;
193
193
 
194
 
void
 
194
ENTRYPOINT void
195
195
init_hop(ModeInfo * mi)
196
196
{
197
197
        Display    *display = MI_DISPLAY(mi);
386
386
                        return;
387
387
        }
388
388
 
 
389
#ifndef STANDALONE
389
390
        MI_CLEARWINDOW(mi);
 
391
#endif
390
392
 
391
393
        XSetForeground(display, gc, MI_WHITE_PIXEL(mi));
392
394
        hp->count = 0;
393
395
}
394
396
 
395
397
 
396
 
void
 
398
ENTRYPOINT void
397
399
draw_hop(ModeInfo * mi)
398
400
{
399
401
        double      oldj, oldi;
404
406
        if (hops == NULL)
405
407
                return;
406
408
        hp = &hops[MI_SCREEN(mi)];
 
409
 
 
410
#ifdef STANDALONE
 
411
    if (hp->eraser) {
 
412
      hp->eraser = erase_window (MI_DISPLAY(mi), MI_WINDOW(mi), hp->eraser);
 
413
      return;
 
414
    }
 
415
#endif
 
416
 
 
417
 
407
418
        if (hp->pointBuffer == NULL)
408
419
                return;
409
420
        xp = hp->pointBuffer;
532
543
                    hp->pointBuffer, hp->bufsize, CoordModeOrigin);
533
544
        if (++hp->count > MI_CYCLES(mi)) {
534
545
#ifdef STANDALONE
535
 
            erase_full_window(MI_DISPLAY(mi), MI_WINDOW(mi));
 
546
      hp->eraser = erase_window (MI_DISPLAY(mi), MI_WINDOW(mi), hp->eraser);
536
547
#endif /* STANDALONE */
537
548
                init_hop(mi);
538
549
        }
539
550
}
540
551
 
541
 
void
 
552
ENTRYPOINT void
542
553
release_hop(ModeInfo * mi)
543
554
{
544
555
        if (hops != NULL) {
555
566
        }
556
567
}
557
568
 
558
 
void
 
569
ENTRYPOINT void
559
570
refresh_hop(ModeInfo * mi)
560
571
{
561
572
        MI_CLEARWINDOW(mi);
562
573
}
563
574
 
 
575
XSCREENSAVER_MODULE_2 ("Hopalong", hopalong, hop)
 
576
 
564
577
#endif /* MODE_hop */