[compiz] PaintOutput patches for widget, cheatsheet and flash
Mike Dransfield
mike at blueroot.co.uk
Mon Jun 4 05:45:34 PDT 2007
Sam Spilsbury wrote:
> Erm, forgot to attach them :/
Thanks, I have applied the necessary changes for those
to work. Widget didn't need any changes though, did you
just search and replace?
Regards
Mike
>
>
>
> On 6/4/07, Sam Spilsbury <smspillaz at gmail.com> wrote:
>> Hi
>>
>> Attached are some patches to make widget, cheatsheet and flash work
>> with the current Compiz GIT.
>>
>> They are my first patches so please do not shoot me down for them. It
>> is just me trying to understand the code a little more.
>>
>> They Compile OK here (i686, SUSE 10.2) and should compiz OK if you
>> have a recent (==days) version of compiz.
>>
>> All I have done really is replace PaintScreen with PaintOutput and
>> paintScreen with paintOutput.
>>
>> I hope they are of some use.
>>
>> PS : On a side note. Considering that most users dont really know too
>> much about these plugins, is it possible that we can mirror them on
>> git.opencompositing.org? We will give full credit to the authors and
>> whoever mantains them. I also need something to write about in OCCN!
>> :P
>>
>> -SmSpillaz
>>
> ------------------------------------------------------------------------
>
> diff --git a/cheatsheet.c b/cheatsheet.c
> index 98cb899..9a9d8a6 100644
> --- a/cheatsheet.c
> +++ b/cheatsheet.c
> @@ -45,7 +45,7 @@ typedef struct _CheatsheetDisplay {
> } CheatsheetDisplay;
>
> typedef struct _CheatsheetScreen {
> - PaintScreenProc paintScreen;
> + PaintOutputProc paintOutput;
> int grabIndex;
>
> Pixmap pixmap;
> @@ -639,7 +639,7 @@ cheatsheetTerminate (CompDisplay *d,
> }
>
> static Bool
> -cheatsheetPaintScreen (CompScreen *s,
> +cheatsheetPaintOutput (CompScreen *s,
> const ScreenPaintAttrib *sAttrib,
> const CompTransform *transform,
> Region region,
> @@ -650,9 +650,9 @@ cheatsheetPaintScreen (CompScreen *s,
>
> CHEATSHEET_SCREEN (s);
>
> - UNWRAP (cs, s, paintScreen);
> - status = (*s->paintScreen) (s, sAttrib, transform, region, output, mask);
> - WRAP (cs, s, paintScreen, cheatsheetPaintScreen);
> + UNWRAP (cs, s, paintOutput);
> + status = (*s->paintOutput) (s, sAttrib, transform, region, output, mask);
> + WRAP (cs, s, paintOutput, cheatsheetPaintOutput);
>
> if (status && cs->content && region->numRects)
> {
> @@ -828,7 +828,7 @@ cheatsheetInitScreen (CompPlugin *p,
>
> addScreenAction (s, &cd->opt[CHEATSHEET_DISPLAY_OPTION_INITIATE].value.action);
>
> - WRAP (cs, s, paintScreen, cheatsheetPaintScreen);
> + WRAP (cs, s, paintOutput, cheatsheetPaintOutput);
>
> s->privates[cd->screenPrivateIndex].ptr = cs;
>
> @@ -852,7 +852,7 @@ cheatsheetFiniScreen (CompPlugin *p,
> if (cs->pixmap)
> XFreePixmap (s->display->display, cs->pixmap);
>
> - UNWRAP (cs, s, paintScreen);
> + UNWRAP (cs, s, paintOutput);
>
> free (cs);
> }
> diff --git a/cheatsheet.xml b/cheatsheet.xml
> lines 17-54/54 (END)
>
>
>
> ------------------------------------------------------------------------
>
> diff --git a/widget.c b/widget.c
> index 8a34909..7b275fa 100644
> --- a/widget.c
> +++ b/widget.c
> @@ -103,8 +103,8 @@ typedef struct _WidgetScreen
> WidgetPaintType paintType;
>
> PaintWindowProc paintWindow;
> - PreparePaintScreenProc preparePaintScreen;
> - DonePaintScreenProc donePaintScreen;
> + PreparePaintOutputProc preparePaintOutput;
> + DonePaintOutputProc donePaintOutput;
> WindowResizeNotifyProc windowResizeNotify;
> WindowMoveNotifyProc windowMoveNotify;
> Cursor cursor;
> @@ -410,7 +410,7 @@ widgetUnGrabScreen (CompScreen *s)
> }
>
> static void
> -widgetPreparePaintScreen (CompScreen *s,
> +widgetPreparePaintOutput (CompScreen *s,
> int msSinceLastPaint)
> {
> WIDGET_SCREEN (s);
> @@ -459,13 +459,13 @@ widgetPreparePaintScreen (CompScreen *s
>
> }
>
> - UNWRAP (ws, s, preparePaintScreen);
> - (*s->preparePaintScreen) (s, msSinceLastPaint);
> - WRAP (ws, s, preparePaintScreen, widgetPreparePaintScreen);
> + UNWRAP (ws, s, preparePaintOutput);
> + (*s->preparePaintOutput) (s, msSinceLastPaint);
> + WRAP (ws, s, preparePaintOutput, widgetPreparePaintOutput);
> }
>
> static void
>
> -widgetDonePaintScreen (CompScreen * s)
> +widgetDonePaintOutput (CompScreen * s)
> {
> WIDGET_SCREEN(s);
>
> @@ -474,9 +474,9 @@ widgetDonePaintScreen (CompScreen * s
> damageScreen (s);
> }
>
> - UNWRAP (ws, s, donePaintScreen);
> - (*s->donePaintScreen) (s);
> - WRAP (ws, s, donePaintScreen, widgetDonePaintScreen);
> + UNWRAP (ws, s, donePaintOutput);
> + (*s->donePaintOutput) (s);
> + WRAP (ws, s, donePaintOutput, widgetDonePaintOutput);
> }
>
> static Bool
> @@ -925,8 +925,8 @@ widgetInitScreen (CompPlugin *p,
> ws->grabIndex = 0;
>
> WRAP (ws, s, paintWindow, widgetPaintWindow);
> - WRAP (ws, s, preparePaintScreen, widgetPreparePaintScreen);
> - WRAP (ws, s, donePaintScreen, widgetDonePaintScreen);
> + WRAP (ws, s, preparePaintOutput, widgetPreparePaintOutput);
> + WRAP (ws, s, donePaintOutput, widgetDonePaintOutput);
>
> return TRUE;
> }
> @@ -938,8 +938,8 @@ widgetFiniScreen (CompPlugin *p,
> WIDGET_SCREEN (s);
>
> UNWRAP (ws, s, paintWindow);
> - UNWRAP (ws, s, preparePaintScreen);
> - UNWRAP (ws, s, donePaintScreen);
> + UNWRAP (ws, s, preparePaintOutput);
> + UNWRAP (ws, s, donePaintOutput);
> lines 38-74/78 95%
>
> freeWindowPrivateIndex (s, ws->windowPrivateIndex);
>
> diff --git a/widget.xml b/widget.xml
>
>
> ------------------------------------------------------------------------
>
> diff --git a/flash.c b/flash.c
> index 46da38d..18909f6 100644
> --- a/flash.c
> +++ b/flash.c
> @@ -1,6 +1,6 @@
> /**
> *
> -* Beryl plugin Flash
> +* Compiz plugin Flash
> *
> * Copyright : (C) 2007 by Jean-Fran�is Souville & Charles Jeremy
> * E-mail : souville at ecole.ensicaen.fr , charles at ecole.ensicaen.fr
> @@ -92,9 +92,9 @@ typedef struct _FlashScreen {
> int windowPrivateIndex;
> CompOption opt[FLASH_SCREEN_OPTION_NUM];
>
> - DonePaintScreenProc donePaintScreen;
> - PaintScreenProc paintScreen;
> - PreparePaintScreenProc preparePaintScreen;
> + DonePaintOutputProc donePaintOutput;
> + PaintOutputProc paintOutput;
> + PreparePaintOutputProc preparePaintOutput;
>
> int pointX, pointY;
> int winX,winY,winW,winH;
> @@ -407,11 +407,11 @@ getCoordinateArray (double** CoordinateA
> }
>
> /*
> - * flashPreparePaintScreen
> + * flashPreparePaintOutput
> *
> */
> static void
> -flashPreparePaintScreen (CompScreen *s, int msSinceLastPaint)
> +flashPreparePaintOutput (CompScreen *s, int msSinceLastPaint)
> {
>
> FLASH_SCREEN (s);
> FLASH_DISPLAY(s->display);
> @@ -484,34 +484,34 @@ flashPreparePaintScreen (CompScreen *s,
> }
> }
>
> - UNWRAP (fs, s, preparePaintScreen);
> - (*s->preparePaintScreen) (s, msSinceLastPaint);
> - WRAP (fs, s, preparePaintScreen, flashPreparePaintScreen);
> + UNWRAP (fs, s, preparePaintOutput);
> + (*s->preparePaintOutput) (s, msSinceLastPaint);
> + WRAP (fs, s, preparePaintOutput, flashPreparePaintOutput);
> }
>
> /*
> - * flashDonePaintScreen
> + * flashDonePaintOutput
> *
> */
> static void
> -flashDonePaintScreen (CompScreen *s)
> +flashDonePaintOutput (CompScreen *s)
> {
> FLASH_SCREEN (s);
>
> if(fs->active)
> damageScreen(s);
>
> - UNWRAP (fs, s, donePaintScreen);
> - (*s->donePaintScreen) (s);
> - WRAP (fs, s, donePaintScreen, flashDonePaintScreen);
> + UNWRAP (fs, s, donePaintOutput);
> + (*s->donePaintOutput) (s);
> + WRAP (fs, s, donePaintOutput, flashDonePaintOutput);
> }
>
> /*
> - * flashPaintScreen
> + * flashPaintOutput
> *
> */
> static Bool
> -flashPaintScreen (CompScreen * s, const ScreenPaintAttrib * sAttrib,
> +flashPaintOutput (CompScreen * s, const ScreenPaintAttrib * sAttrib,
> const CompTransform *transform,
> Region region, int output, unsigned int mask)
> {
> @@ -519,9 +519,9 @@ flashPaintScreen (CompScreen * s, const
> FLASH_SCREEN (s);
> FLASH_DISPLAY(s->display);
>
> - UNWRAP (fs, s, paintScreen);
> - status = (*s->paintScreen) (s, sAttrib, transform ,region, output, mask);
> - WRAP (fs, s, paintScreen, flashPaintScreen);
> + UNWRAP (fs, s, paintOutput);
> + status = (*s->paintOutput) (s, sAttrib, transform ,region, output, mask);
> + WRAP (fs, s, paintOutput, flashPaintOutput);
>
> int x1, y1;
> x1 = fs->pointX;
> @@ -847,9 +847,9 @@ flashInitScreen (CompPlugin *p, CompScre
>
> addScreenAction (s, &fd->opt[FLASH_DISPLAY_OPTION_INITIATE].value.action);
>
> - WRAP (fs, s, donePaintScreen, flashDonePaintScreen);
> - WRAP (fs, s, paintScreen, flashPaintScreen);
> - WRAP (fs, s, preparePaintScreen, flashPreparePaintScreen);
> + WRAP (fs, s, donePaintOutput, flashDonePaintOutput);
> + WRAP (fs, s, paintOutput, flashPaintOutput);
> + WRAP (fs, s, preparePaintOutput, flashPreparePaintOutput);
>
> s->privates[fd->screenPrivateIndex].ptr = fs;
>
> @@ -868,9 +868,9 @@ flashFiniScreen (CompPlugin *p, CompScre
>
> freeWindowPrivateIndex (s, fs->windowPrivateIndex);
>
> - UNWRAP (fs, s, donePaintScreen);
> - UNWRAP (fs, s, paintScreen);
> - UNWRAP (fs, s, preparePaintScreen);
> + UNWRAP (fs, s, donePaintOutput);
> + UNWRAP (fs, s, paintOutput);
> + UNWRAP (fs, s, preparePaintOutput);
>
> removeScreenAction(s, &fd->opt[FLASH_DISPLAY_OPTION_INITIATE].value.action);
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> compiz mailing list
> compiz at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/compiz
>
More information about the compiz
mailing list