1 /* -*- mode: C; tab-width: 4 -*-
2 * Bumps, Copyright (c) 2002, 2006 Shane Smit <CodeWeaver@DigitalLoom.org>
4 * Permission to use, copy, modify, distribute, and sell this software and its
5 * documentation for any purpose is hereby granted without fee, provided that
6 * the above copyright notice appear in all copies and that both that
7 * copyright notice and this permission notice appear in supporting
8 * documentation. No representations are made about the suitability of this
9 * software for any purpose. It is provided "as is" without express or
16 * This is typical bump-mapping. The actual bump map is generated by a screen
17 * grab. The light source is represented by a spotlight of random color. This
18 * spotlight randomly traverses the bump map in a sinus pattern.
20 * Essentially, it 3D-izes your desktop, based on color intensity.
22 * Modification History:
23 * [10/01/99] - Shane Smit: Creation
24 * [10/08/99] - Shane Smit: Port to C. (Ick)
25 * [03/08/02] - Shane Smit: New movement code.
26 * [09/12/02] - Shane Smit: MIT-SHM XImages.
27 * Thanks to Kennett Galbraith <http://www.Alpha-II.com/>
28 * for code optimization.
33 static void SetPalette(Display *, SBumps *, XWindowAttributes * );
34 static void InitBumpMap(Display *, SBumps *, XWindowAttributes * );
35 static void InitBumpMap_2(Display *, SBumps *);
36 static void SoftenBumpMap( SBumps * );
41 /* This function pointer will point to the appropriate PutPixel*() function below. */
42 static void (*MyPutPixel)( int8_ *, uint32_ );
44 static void PutPixel32( int8_ *pData, uint32_ pixel )
46 *(uint32_ *)pData = pixel;
49 static void PutPixel24( int8_ *pData, uint32_ pixel )
51 pData[ 2 ] = ( pixel & 0x00FF0000 ) >> 16;
52 pData[ 1 ] = ( pixel & 0x0000FF00 ) >> 8;
53 pData[ 0 ] = ( pixel & 0x000000FF );
56 static void PutPixel16( int8_ *pData, uint32_ pixel )
58 *(uint16_ *)pData = (uint16_)pixel;
61 static void PutPixel8( int8_ *pData, uint32_ pixel )
63 *(uint8_ *)pData = (uint8_)pixel;
66 /* Creates the light map, which is a circular image... going from black around the edges
67 * to white in the center. */
68 static void CreateSpotLight( SSpotLight *pSpotLight, uint16_ iDiameter, uint16_ nColorCount )
71 int16_ iDistX, iDistY;
74 pSpotLight->nFalloffDiameter = iDiameter;
75 pSpotLight->nFalloffRadius = pSpotLight->nFalloffDiameter / 2;
76 pSpotLight->nLightDiameter = iDiameter / 2;
77 pSpotLight->nLightRadius = pSpotLight->nLightDiameter / 2;
79 printf( "%s: Falloff Diameter: %d\n", progclass, pSpotLight->nFalloffDiameter );
80 printf( "%s: Spot Light Diameter: %d\n", progclass, pSpotLight->nLightDiameter );
83 pSpotLight->aLightMap = malloc( pSpotLight->nLightDiameter * pSpotLight->nLightDiameter * sizeof(uint8_) );
85 pLOffset = pSpotLight->aLightMap;
86 for( iDistY=-pSpotLight->nLightRadius; iDistY<pSpotLight->nLightRadius; ++iDistY )
88 for( iDistX=-pSpotLight->nLightRadius; iDistX<pSpotLight->nLightRadius; ++iDistX )
90 nDist = sqrt( pow( iDistX+0.5F, 2 ) + pow( iDistY+0.5F, 2 ) );
91 if( nDist / pSpotLight->nLightRadius <= 1.0f )
92 *pLOffset = (uint8_)(nColorCount - ( ( nDist / pSpotLight->nLightRadius ) * ( nColorCount - 1 ) ));
100 /* Initialize movement variables. */
101 pSpotLight->nAccelX = 0;
102 pSpotLight->nAccelY = 0;
103 pSpotLight->nVelocityX = ( RANDOM() % 2 ) ? pSpotLight->nVelocityMax : -pSpotLight->nVelocityMax;
104 pSpotLight->nVelocityY = ( RANDOM() % 2 ) ? pSpotLight->nVelocityMax : -pSpotLight->nVelocityMax;
108 /* Calculates the position of the spot light on the screen. */
109 static void CalcLightPos( SBumps *pBumps )
111 SSpotLight *pSpotLight = &pBumps->SpotLight;
115 if( pSpotLight->nXPos < pSpotLight->nFalloffRadius ) nGravity = 1.0f;
116 else if( pSpotLight->nXPos > pBumps->iWinWidth - pSpotLight->nFalloffRadius ) nGravity = -1.0f;
117 else nGravity = ( ( RANDOM() % 201 ) / 100.0f ) - 1.0f;
119 pSpotLight->nAccelX += nGravity * ( pSpotLight->nAccelMax / 5.0f );
120 if( pSpotLight->nAccelX < -pSpotLight->nAccelMax ) pSpotLight->nAccelX = -pSpotLight->nAccelMax;
121 else if( pSpotLight->nAccelX > pSpotLight->nAccelMax ) pSpotLight->nAccelX = pSpotLight->nAccelMax;
123 pSpotLight->nVelocityX += pSpotLight->nAccelX;
124 if( pSpotLight->nVelocityX < -pSpotLight->nVelocityMax ) pSpotLight->nVelocityX = -pSpotLight->nVelocityMax;
125 else if( pSpotLight->nVelocityX > pSpotLight->nVelocityMax ) pSpotLight->nVelocityX = pSpotLight->nVelocityMax;
127 pSpotLight->nXPos += pSpotLight->nVelocityX;
130 if( pSpotLight->nYPos < pSpotLight->nFalloffRadius ) nGravity = 1.0f;
131 else if( pSpotLight->nYPos > pBumps->iWinHeight - pSpotLight->nFalloffRadius ) nGravity = -1.0f;
132 else nGravity = ( ( RANDOM() % 201 ) / 100.0f ) - 1.0f;
134 pSpotLight->nAccelY += nGravity * ( pSpotLight->nAccelMax / 5.0f );
135 if( pSpotLight->nAccelY < -pSpotLight->nAccelMax ) pSpotLight->nAccelY = -pSpotLight->nAccelMax;
136 else if( pSpotLight->nAccelY > pSpotLight->nAccelMax ) pSpotLight->nAccelY = pSpotLight->nAccelMax;
138 pSpotLight->nVelocityY += pSpotLight->nAccelY;
139 if( pSpotLight->nVelocityY < -pSpotLight->nVelocityMax ) pSpotLight->nVelocityY = -pSpotLight->nVelocityMax;
140 else if( pSpotLight->nVelocityY > pSpotLight->nVelocityMax ) pSpotLight->nVelocityY = pSpotLight->nVelocityMax;
142 pSpotLight->nYPos += pSpotLight->nVelocityY;
146 /* Main initialization function. */
147 static void CreateBumps( SBumps *pBumps, Display *dpy, Window NewWin )
149 XWindowAttributes XWinAttribs;
154 /* Make size and velocity a function of window size, so it appears the same at 100x60 as it does in 3200x1200. */
155 XGetWindowAttributes( dpy, NewWin, &XWinAttribs );
156 pBumps->iWinWidth = XWinAttribs.width;
157 pBumps->iWinHeight = XWinAttribs.height;
158 pBumps->SpotLight.nXPos = XWinAttribs.width / 2.0f;
159 pBumps->SpotLight.nYPos = XWinAttribs.height / 2.0f;
160 pBumps->SpotLight.nVelocityMax = ( ( XWinAttribs.width < XWinAttribs.height ) ? XWinAttribs.width : XWinAttribs.height ) / 140.0f;
161 pBumps->SpotLight.nAccelMax = pBumps->SpotLight.nVelocityMax / 10.0f;
163 pBumps->Win = NewWin;
164 pBumps->pXImage = NULL;
166 iDiameter = ( ( pBumps->iWinWidth < pBumps->iWinHeight ) ? pBumps->iWinWidth : pBumps->iWinHeight ) / 2;
168 /* jwz: sometimes we get tearing if this lands on the wrong bounaary;
169 constraining it to be a multiple of 8 seems to fix it. */
170 iDiameter = ((iDiameter+7)/8)*8;
172 #ifdef HAVE_XSHM_EXTENSION
173 pBumps->bUseShm = get_boolean_resource(dpy, "useSHM", "Boolean" );
175 if( pBumps->bUseShm )
177 pBumps->pXImage = create_xshm_image( pBumps->dpy, XWinAttribs.visual, XWinAttribs.depth,
178 ZPixmap, NULL, &pBumps->XShmInfo, iDiameter, iDiameter );
179 if( !pBumps->pXImage )
181 fprintf( stderr, "%s: Unable to create XShmImage.\n", progname );
182 pBumps->bUseShm = False;
185 #endif /* HAVE_XSHM_EXTENSION */
186 if( !pBumps->pXImage )
188 pBumps->pXImage = XCreateImage( pBumps->dpy, XWinAttribs.visual, XWinAttribs.depth,
189 ZPixmap, 0, NULL, iDiameter, iDiameter, BitmapPad( pBumps->dpy ), 0 );
190 pBumps->pXImage->data = malloc( pBumps->pXImage->bytes_per_line * pBumps->pXImage->height * sizeof(int8_) );
193 /* For speed, access the XImage data directly using my own PutPixel routine. */
194 switch( pBumps->pXImage->bits_per_pixel )
197 pBumps->bytesPerPixel = 4;
198 MyPutPixel = PutPixel32;
202 pBumps->bytesPerPixel = 3;
203 MyPutPixel = PutPixel24;
207 pBumps->bytesPerPixel = 2;
208 MyPutPixel = PutPixel16;
212 pBumps->bytesPerPixel = 1;
213 MyPutPixel = PutPixel8;
217 fprintf( stderr, "%s: Unknown XImage depth.", progname );
218 #ifdef HAVE_XSHM_EXTENSION
219 if( pBumps->bUseShm )
220 destroy_xshm_image( pBumps->dpy, pBumps->pXImage, &pBumps->XShmInfo );
222 #endif /* HAVE_XSHM_EXTENSION */
223 XDestroyImage( pBumps->pXImage );
227 GCValues.function = GXcopy;
228 GCValues.subwindow_mode = IncludeInferiors;
229 nGCFlags = GCFunction;
230 if( use_subwindow_mode_p( XWinAttribs.screen, pBumps->Win ) ) /* See grabscreen.c */
231 nGCFlags |= GCSubwindowMode;
232 pBumps->GraphicsContext = XCreateGC( pBumps->dpy, pBumps->Win, nGCFlags, &GCValues );
234 SetPalette(dpy, pBumps, &XWinAttribs );
235 CreateSpotLight( &pBumps->SpotLight, iDiameter, pBumps->nColorCount );
236 InitBumpMap(dpy, pBumps, &XWinAttribs );
240 /* Creates a specialized phong shade palette. */
241 static void SetPalette(Display *dpy, SBumps *pBumps, XWindowAttributes *pXWinAttribs )
245 char *sColor; /* Spotlight Color */
248 sColor = get_string_resource(dpy, "color", "Color" );
250 BaseColor.red = RANDOM() % 0xFFFF;
251 BaseColor.green = RANDOM() % 0xFFFF;
252 BaseColor.blue = RANDOM() % 0xFFFF;
254 /* Make one color full intesity to avoid dark spotlights. */
255 switch( RANDOM() % 3 )
257 case 0: BaseColor.red = 0xFFFF; break;
258 case 1: BaseColor.green = 0xFFFF; break;
259 case 2: BaseColor.blue = 0xFFFF; break;
262 if( strcasecmp( sColor, "random" ) && !XParseColor( pBumps->dpy, pXWinAttribs->colormap, sColor, &BaseColor ) )
263 fprintf( stderr, "%s: color %s not found in database. Choosing random...\n", progname, sColor );
266 printf( "%s: Spotlight color is <%d,%d,%d> RGB.\n", progclass, BaseColor.red, BaseColor.green, BaseColor.blue );
269 pBumps->nColorCount = get_integer_resource(dpy, "colorcount", "Integer" );
270 if( pBumps->nColorCount < 2 ) pBumps->nColorCount = 2;
271 if( pBumps->nColorCount > 128 ) pBumps->nColorCount = 128;
273 pBumps->aColors = malloc( pBumps->nColorCount * sizeof(uint32_ ) );
275 /* Creates a phong shade: / BaseColor \ Index/ColorCount
276 * PhongShade = | ------------ | Index + ( 65535 - BaseColor )^
278 pBumps->nColorCount--;
279 for( iColor=0; iColor<=pBumps->nColorCount; iColor++ )
281 Color.red = (uint16_)( ( ( BaseColor.red / (double)pBumps->nColorCount ) * iColor ) + pow( 0xFFFF - BaseColor.red, iColor/(double)pBumps->nColorCount ) );
282 Color.green = (uint16_)( ( ( BaseColor.green / (double)pBumps->nColorCount ) * iColor ) + pow( 0xFFFF - BaseColor.green, iColor/(double)pBumps->nColorCount ) );
283 Color.blue = (uint16_)( ( ( BaseColor.blue / (double)pBumps->nColorCount ) * iColor ) + pow( 0xFFFF - BaseColor.blue, iColor/(double)pBumps->nColorCount ) );
285 if( !XAllocColor( pBumps->dpy, pXWinAttribs->colormap, &Color ) )
287 XFreeColors( pBumps->dpy, pXWinAttribs->colormap, pBumps->aColors, iColor, 0 );
288 free( pBumps->aColors );
289 pBumps->aColors = malloc( pBumps->nColorCount * sizeof(uint32_) );
290 pBumps->nColorCount--;
294 pBumps->aColors[ iColor ] = Color.pixel;
296 pBumps->nColorCount++;
299 printf( "%s: Allocated %d colors.\n", progclass, pBumps->nColorCount );
302 XSetWindowBackground( pBumps->dpy, pBumps->Win, pBumps->aColors[ 0 ] );
306 /* Grabs the current contents of the window to use an intensity-based bump map. */
307 static void InitBumpMap(Display *dpy, SBumps *pBumps, XWindowAttributes *pXWinAttribs )
309 pBumps->xColors = (XColor*)malloc( pBumps->iWinWidth * sizeof(XColor) );
311 if (pBumps->source) abort();
312 pBumps->source = XCreatePixmap(pBumps->dpy, pBumps->Win,
313 pXWinAttribs->width, pXWinAttribs->height,
314 pXWinAttribs->depth);
315 pBumps->img_loader = load_image_async_simple (0, pXWinAttribs->screen,
316 pBumps->Win, pBumps->source, 0, 0);
319 static void InitBumpMap_2(Display *dpy, SBumps *pBumps)
321 XImage *pScreenImage;
324 uint16_ iWidth, iHeight;
328 double softenMultiplier = 1.0f;
329 BOOL bInvert = (BOOL)get_boolean_resource(dpy, "invert", "Boolean" );
330 XWindowAttributes XWinAttribs;
331 XGetWindowAttributes( pBumps->dpy, pBumps->Win, &XWinAttribs );
333 pScreenImage = XGetImage( pBumps->dpy, pBumps->source, 0, 0,
334 pBumps->iWinWidth, pBumps->iWinHeight,
336 XFreePixmap (pBumps->dpy, pBumps->source);
339 XSetWindowBackground( pBumps->dpy, pBumps->Win, pBumps->aColors[ 0 ] );
340 XClearWindow (pBumps->dpy, pBumps->Win);
341 XSync (pBumps->dpy, 0);
343 pBumps->aBumpMap = malloc( pBumps->iWinWidth * pBumps->iWinHeight * sizeof(uint16_) );
345 nSoften = get_integer_resource(dpy, "soften", "Integer" );
347 softenMultiplier *= 1.0f + ( 1.0f / 3.0f ); /* Softening takes the max height down, so scale up to compensate. */
348 maxHeight = pBumps->SpotLight.nLightRadius * softenMultiplier;
349 nAverager = maxHeight ? ( 3 * 0xFFFF ) / maxHeight : 0;
351 pBump = pBumps->aBumpMap;
352 if( bInvert ) /* Funny, it's actually the 'else' that inverts the bump map... */
354 for( iHeight=0; iHeight<pBumps->iWinHeight; iHeight++ )
356 pColor = pBumps->xColors;
357 for( iWidth=0; iWidth<pBumps->iWinWidth; iWidth++ )
358 (pColor++)->pixel = XGetPixel( pScreenImage, iWidth, iHeight );
360 XQueryColors( pBumps->dpy, XWinAttribs.colormap, pBumps->xColors, pBumps->iWinWidth );
362 pColor = pBumps->xColors;
363 for( iWidth=pBumps->iWinWidth; iWidth; --iWidth, ++pColor, ++pBump )
364 *pBump = ( nAverager ? ( pColor->red + pColor->green + pColor->blue ) / nAverager : 0 );
369 for( iHeight=0; iHeight<pBumps->iWinHeight; iHeight++ )
371 pColor = pBumps->xColors;
372 for( iWidth=0; iWidth<pBumps->iWinWidth; iWidth++ )
373 (pColor++)->pixel = XGetPixel( pScreenImage, iWidth, iHeight );
375 XQueryColors( pBumps->dpy, XWinAttribs.colormap, pBumps->xColors, pBumps->iWinWidth );
377 pColor = pBumps->xColors;
378 for( iWidth=pBumps->iWinWidth; iWidth; --iWidth, ++pColor, ++pBump )
379 *pBump = ( maxHeight - ( nAverager ? ( pColor->red + pColor->green + pColor->blue ) / nAverager : 0 ) );
383 XDestroyImage( pScreenImage );
385 nSoften = get_integer_resource(dpy, "soften", "Integer" );
387 if( nSoften ) printf( "%s: Softening Bump Map %d time(s)...\n", progclass, nSoften );
390 SoftenBumpMap( pBumps );
392 free( pBumps->xColors );
396 /* Soften the bump map. This is to avoid pixelated-looking ridges.
397 * |-----|-----|-----|
398 * | 0% |12.5%| 0% | The adjacent pixels are averaged together
399 * |-----|-----|-----| first. Then than value is averaged with
400 * |12.5%| 50% |12.5%| the pixel is question. This essentially weights
401 * |-----|-----|-----| each pixel as shown on the left.
403 * |-----|-----|-----|
405 static void SoftenBumpMap( SBumps *pBumps )
407 uint16_ *pOffset, *pTOffset;
409 uint32_ iWidth, iHeight;
410 uint16_ *aTempBuffer = malloc( pBumps->iWinWidth * pBumps->iWinHeight * sizeof(uint16_) );
412 pOffset = pBumps->aBumpMap;
413 pTOffset = aTempBuffer;
414 for( iHeight=pBumps->iWinHeight; iHeight; --iHeight )
416 for( iWidth=pBumps->iWinWidth; iWidth; --iWidth, ++pOffset, ++pTOffset )
418 if( iHeight==pBumps->iWinHeight || iHeight==1 ||
419 iWidth==pBumps->iWinWidth || iWidth==1 )
425 nHeight = pOffset[ -pBumps->iWinWidth ];
426 nHeight += pOffset[ 1 ];
427 nHeight += pOffset[ pBumps->iWinWidth ];
428 nHeight += pOffset[ -1 ];
430 nHeight += pOffset[ 0 ];
436 memcpy( pBumps->aBumpMap, aTempBuffer, pBumps->iWinWidth * pBumps->iWinHeight * sizeof(uint16_) );
441 /* This is where we slap down some pixels... */
442 static void Execute( SBumps *pBumps )
444 int32_ nLightXPos, nLightYPos;
445 int32_ iScreenX, iScreenY;
446 int32_ iLightX, iLightY;
451 int32_ nLightOffsetFar = pBumps->SpotLight.nFalloffDiameter - pBumps->SpotLight.nLightRadius;
453 CalcLightPos( pBumps );
455 /* Offset to upper left hand corner. */
456 nLightXPos = pBumps->SpotLight.nXPos - pBumps->SpotLight.nFalloffRadius;
457 nLightYPos = pBumps->SpotLight.nYPos - pBumps->SpotLight.nFalloffRadius;
459 for( iScreenY=nLightYPos, iLightY=-pBumps->SpotLight.nLightRadius; iLightY<nLightOffsetFar; ++iScreenY, ++iLightY )
461 if( iScreenY < 0 ) continue;
462 else if( iScreenY >= pBumps->iWinHeight ) break;
464 /* warning: pointer targets in assignment differ in signedness
465 Should pDOffset be a int8? I can't tell. -jwz, 22-Jul-2003 */
466 pDOffset = (int8_ *) &pBumps->pXImage->data[ (iLightY+pBumps->SpotLight.nLightRadius) * pBumps->pXImage->bytes_per_line ];
467 pBOffset = pBumps->aBumpMap + ( iScreenY * pBumps->iWinWidth ) + nLightXPos;
468 for( iScreenX=nLightXPos, iLightX=-pBumps->SpotLight.nLightRadius; iLightX<nLightOffsetFar; ++iScreenX, ++iLightX, ++pBOffset, pDOffset+=pBumps->bytesPerPixel )
470 if( iScreenX < 0 ) continue;
471 else if( iScreenX >= pBumps->iWinWidth ) break;
472 else if( iScreenY == 0 || iScreenY >= pBumps->iWinHeight-2 ||
473 iScreenX == 0 || iScreenX >= pBumps->iWinWidth-2 )
475 MyPutPixel( pDOffset, pBumps->aColors[ 0 ] );
479 /* That's right folks, all the magic of bump mapping occurs in these two lines. (kinda disappointing, isn't it?) */
480 nX = ( pBOffset[ 1 ] - pBOffset[ 0 ] ) + iLightX;
481 nY = ( pBOffset[ pBumps->iWinWidth ] - pBOffset[ 0 ] ) + iLightY;
483 if( nX<0 || nX>=pBumps->SpotLight.nLightDiameter
484 || nY<0 || nY>=pBumps->SpotLight.nLightDiameter )
486 MyPutPixel( pDOffset, pBumps->aColors[ 0 ] );
490 nColor = pBumps->SpotLight.aLightMap[ ( nY * pBumps->SpotLight.nLightDiameter ) + nX ];
491 MyPutPixel( pDOffset, pBumps->aColors[ nColor ] );
495 /* Allow the spotlight to go *slightly* off the screen by clipping the XImage. */
496 iLightX = iLightY = 0; /* Use these for XImages X and Y now. */
497 nX = nY = pBumps->SpotLight.nFalloffDiameter; /* Use these for XImage width and height now. */
500 iLightX = -nLightXPos;
504 else if( nLightXPos + nX >= pBumps->iWinWidth )
506 nX -= ( nLightXPos + nX ) - pBumps->iWinWidth;
511 iLightY = -nLightYPos;
515 else if( nLightYPos + nY >= pBumps->iWinHeight )
517 nY -= ( nLightYPos + nY ) - pBumps->iWinHeight;
520 #ifdef HAVE_XSHM_EXTENSION
521 if( pBumps->bUseShm )
522 XShmPutImage( pBumps->dpy, pBumps->Win, pBumps->GraphicsContext, pBumps->pXImage, iLightX, iLightY, nLightXPos, nLightYPos,
525 #endif /* HAVE_XSHM_EXTENSION */
526 XPutImage( pBumps->dpy, pBumps->Win, pBumps->GraphicsContext, pBumps->pXImage, iLightX, iLightY, nLightXPos, nLightYPos,
531 static void DestroySpotLight( SSpotLight *pSpotLight ) { free( pSpotLight->aLightMap ); }
534 static void DestroyBumps( SBumps *pBumps )
536 DestroySpotLight( &pBumps->SpotLight );
537 free( pBumps->aColors );
538 free( pBumps->aBumpMap );
539 #ifdef HAVE_XSHM_EXTENSION
540 if( pBumps->bUseShm )
541 destroy_xshm_image( pBumps->dpy, pBumps->pXImage, &pBumps->XShmInfo );
543 #endif /* HAVE_XSHM_EXTENSION */
544 XDestroyImage( pBumps->pXImage );
548 /* All messages to the screensaver are processed here. */
550 bumps_init (Display *dpy, Window Win)
552 SBumps *Bumps = (SBumps *) calloc (1, sizeof(SBumps));
555 time_t Time = time( NULL );
559 CreateBumps( Bumps, dpy, Win );
560 Bumps->delay = get_integer_resource(dpy, "delay", "Integer" );
565 bumps_draw (Display *dpy, Window window, void *closure)
567 SBumps *Bumps = (SBumps *) closure;
569 if (Bumps->img_loader) /* still loading */
571 Bumps->img_loader = load_image_async_simple (Bumps->img_loader, 0, 0, 0, 0, 0);
572 if (! Bumps->img_loader) /* just finished */
573 InitBumpMap_2(dpy, Bumps);
583 if( Time - time( NULL ) )
585 printf( "FPS: %d\n", iFrame );
595 bumps_reshape (Display *dpy, Window window, void *closure,
596 unsigned int w, unsigned int h)
601 bumps_event (Display *dpy, Window window, void *closure, XEvent *event)
607 bumps_free (Display *dpy, Window window, void *closure)
609 SBumps *Bumps = (SBumps *) closure;
610 DestroyBumps( Bumps );
614 XSCREENSAVER_MODULE ("Bumps", bumps)