From kwin Mon Jan 30 09:31:18 2012 From: =?utf-8?q?Martin_Gr=C3=A4=C3=9Flin?= Date: Mon, 30 Jan 2012 09:31:18 +0000 To: kwin Subject: Re: Review Request: JavaScript bindings for KWin Effects Message-Id: <20120130093118.4533.7509 () vidsolbach ! de> X-MARC-Message: https://marc.info/?l=kwin&m=132791607812005 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============7092674535466688840==" --===============7092674535466688840== Content-Type: multipart/alternative; boundary="===============4863444965842245746==" --===============4863444965842245746== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/103823/ ----------------------------------------------------------- (Updated Jan. 30, 2012, 9:31 a.m.) Review request for kwin. Changes ------- Script wrapper for FPx2. Following values are supported: null -> FPx2() real -> FPx2(value) { value1: real, value2: real } -> FPx2(value1, value2) with that I hope that the animate method is no longer limited (and API is n= icer). Next step: meta Description ------- The bindings are based on AnimationEffect. So Thomas please have a look whe= ther I use it correctly :-) The method is exported multiple times as I did = not want to wrap the FPx2 class. An example script for fade effect: var duration =3D 250; effects.windowAdded.connect(function(w) { effect.animate(w, Effect.Opacity, duration, 1.0); }); effects.windowClosed.connect(function(w) { effect.animate(w, Effect.Opacity, duration, 0.0, 1.0); }); There is quite some work to be done. EffectWindow does not yet have propert= ies, for EffectsHandler probably some more methods might be exported. Unfortunately I had to change the signature of the signals as QtScript need= s the type being exported as a metatype and metatypes want full name. Diffs (updated) ----- kwin/CMakeLists.txt c4b75c0 = kwin/effects.h 28ab72c = kwin/effects.cpp 4f55799 = kwin/effects/blur/blur.h 65ba381 = kwin/effects/blur/blur.cpp 06c6854 = kwin/effects/boxswitch/boxswitch.h cfb6b47 = kwin/effects/boxswitch/boxswitch.cpp fac6b3f = kwin/effects/coverswitch/coverswitch.h b49a36e = kwin/effects/coverswitch/coverswitch.cpp bdf2fbe = kwin/effects/cube/cubeslide.h ffbda88 = kwin/effects/cube/cubeslide.cpp ed1f518 = kwin/effects/dashboard/dashboard.h 46d3e98 = kwin/effects/dashboard/dashboard.cpp 4f6dc65 = kwin/effects/desktopgrid/desktopgrid.h b420389 = kwin/effects/desktopgrid/desktopgrid.cpp 925d2f1 = kwin/effects/dialogparent/dialogparent.h 439c67e = kwin/effects/dialogparent/dialogparent.cpp ac9493a = kwin/effects/diminactive/diminactive.h 24a80de = kwin/effects/diminactive/diminactive.cpp 6978f36 = kwin/effects/dimscreen/dimscreen.h ee8c114 = kwin/effects/dimscreen/dimscreen.cpp fd4c15a = kwin/effects/explosion/explosion.h 8a343c7 = kwin/effects/explosion/explosion.cpp dc9cd14 = kwin/effects/fade/fade.h 38c0040 = kwin/effects/fade/fade.cpp 213516b = kwin/effects/fallapart/fallapart.h acc1446 = kwin/effects/fallapart/fallapart.cpp 5db5ee7 = kwin/effects/flipswitch/flipswitch.h 559e88b = kwin/effects/flipswitch/flipswitch.cpp f7f4307 = kwin/effects/glide/glide.h 0003345 = kwin/effects/glide/glide.cpp 99a8c8b = kwin/effects/highlightwindow/highlightwindow.h 8b46bd4 = kwin/effects/highlightwindow/highlightwindow.cpp f048cfb = kwin/effects/invert/invert.h 3dc49fb = kwin/effects/invert/invert.cpp 0ef1545 = kwin/effects/login/login.h db30044 = kwin/effects/login/login.cpp a9da287 = kwin/effects/logout/logout.h f08152f = kwin/effects/logout/logout.cpp 4e97ebe = kwin/effects/magiclamp/magiclamp.h 8000081 = kwin/effects/magiclamp/magiclamp.cpp f7f73b4 = kwin/effects/minimizeanimation/minimizeanimation.h 27e0dd3 = kwin/effects/minimizeanimation/minimizeanimation.cpp 44d15ec = kwin/effects/presentwindows/presentwindows.h 08aa262 = kwin/effects/presentwindows/presentwindows.cpp dc4d5c5 = kwin/effects/resize/resize.h 0411d6d = kwin/effects/resize/resize.cpp 84bdd7f = kwin/effects/scalein/scalein.h 8ae7504 = kwin/effects/scalein/scalein.cpp 25d78df = kwin/effects/screenshot/screenshot.h 22385a3 = kwin/effects/screenshot/screenshot.cpp 6bd18e3 = kwin/effects/sheet/sheet.h 7ec739b = kwin/effects/sheet/sheet.cpp 9156f0d = kwin/effects/slideback/slideback.h 0cba556 = kwin/effects/slideback/slideback.cpp 380b3d5 = kwin/effects/slidingpopups/slidingpopups.h eca9e2e = kwin/effects/slidingpopups/slidingpopups.cpp 8fb0608 = kwin/effects/snaphelper/snaphelper.h ee60f8f = kwin/effects/snaphelper/snaphelper.cpp a30cc60 = kwin/effects/taskbarthumbnail/taskbarthumbnail.h 77e5294 = kwin/effects/taskbarthumbnail/taskbarthumbnail.cpp 1ce6233 = kwin/effects/thumbnailaside/thumbnailaside.h 323e2fd = kwin/effects/thumbnailaside/thumbnailaside.cpp 3a1b4e0 = kwin/effects/translucency/translucency.h fa7b85c = kwin/effects/translucency/translucency.cpp 4e6d58d = kwin/effects/windowgeometry/windowgeometry.h ba20c05 = kwin/effects/windowgeometry/windowgeometry.cpp a9fd796 = kwin/effects/wobblywindows/wobblywindows.h d4844d3 = kwin/effects/wobblywindows/wobblywindows.cpp c7d30fe = kwin/libkwineffects/kwinanimationeffect.h 106155c = kwin/libkwineffects/kwinanimationeffect.cpp 00a7887 = kwin/libkwineffects/kwineffects.h 491ec58 = kwin/scripting/scriptedeffect.h PRE-CREATION = kwin/scripting/scriptedeffect.cpp PRE-CREATION = kwin/thumbnailitem.cpp 73441a0 = Diff: http://git.reviewboard.kde.org/r/103823/diff/diff Testing ------- Thanks, Martin Gr=C3=A4=C3=9Flin --===============4863444965842245746== Content-Type: text/html; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable
This is an automatically generated e-mail. To reply, visit: http://git.revie= wboard.kde.org/r/103823/

Review request for kwin.
By Martin Gr=C3=A4=C3=9Flin.

Updated Jan. 30, 2012, 9:31 a.m.

Changes
Script wrapper for FPx2. Following values are supported:
null -> FPx2()
real -> FPx2(value)
{
value1: real,
value2: real
}
-> FPx2(value1, value2)

with that I hope that the animate method is no longer limited (and API is n=
icer). Next step: meta

Descripti= on

The bindings are based on AnimationEffect. So Thomas please =
have a look whether I use it correctly :-) The method is exported multiple =
times as I did not want to wrap the FPx2 class.

An example script for fade effect:
var duration =3D 250;
effects.windowAdded.connect(function(w) {
    effect.animate(w, Effect.Opacity, duration, 1.0);
});
effects.windowClosed.connect(function(w) {
    effect.animate(w, Effect.Opacity, duration, 0.0, 1.0);
});

There is quite some work to be done. EffectWindow does not yet have propert=
ies, for EffectsHandler probably some more methods might be exported.

Unfortunately I had to change the signature of the signals as QtScript need=
s the type being exported as a metatype and metatypes want full name.

Diffs= (updated)

  • kwin/CMakeLists.txt (c4b75c0)
  • kwin/effects.h (28ab72c)
  • kwin/effects.cpp (4f55799)
  • kwin/effects/blur/blur.h (65ba381)<= /li>
  • kwin/effects/blur/blur.cpp (06c6854)
  • kwin/effects/boxswitch/boxswitch.h (cfb6b4= 7)
  • kwin/effects/boxswitch/boxswitch.cpp (fac6= b3f)
  • kwin/effects/coverswitch/coverswitch.h (b4= 9a36e)
  • kwin/effects/coverswitch/coverswitch.cpp (= bdf2fbe)
  • kwin/effects/cube/cubeslide.h (ffbda88)
  • kwin/effects/cube/cubeslide.cpp (ed1f518)<= /span>
  • kwin/effects/dashboard/dashboard.h (46d3e9= 8)
  • kwin/effects/dashboard/dashboard.cpp (4f6d= c65)
  • kwin/effects/desktopgrid/desktopgrid.h (b4= 20389)
  • kwin/effects/desktopgrid/desktopgrid.cpp (= 925d2f1)
  • kwin/effects/dialogparent/dialogparent.h (= 439c67e)
  • kwin/effects/dialogparent/dialogparent.cpp (ac9493a)
  • kwin/effects/diminactive/diminactive.h (24= a80de)
  • kwin/effects/diminactive/diminactive.cpp (= 6978f36)
  • kwin/effects/dimscreen/dimscreen.h (ee8c11= 4)
  • kwin/effects/dimscreen/dimscreen.cpp (fd4c= 15a)
  • kwin/effects/explosion/explosion.h (8a343c= 7)
  • kwin/effects/explosion/explosion.cpp (dc9c= d14)
  • kwin/effects/fade/fade.h (38c0040)<= /li>
  • kwin/effects/fade/fade.cpp (213516b)
  • kwin/effects/fallapart/fallapart.h (acc144= 6)
  • kwin/effects/fallapart/fallapart.cpp (5db5= ee7)
  • kwin/effects/flipswitch/flipswitch.h (559e= 88b)
  • kwin/effects/flipswitch/flipswitch.cpp (f7= f4307)
  • kwin/effects/glide/glide.h (0003345)
  • kwin/effects/glide/glide.cpp (99a8c8b)
  • kwin/effects/highlightwindow/highlightwindow.h (8b46bd4)
  • kwin/effects/highlightwindow/highlightwindow.cpp (f048cfb)
  • kwin/effects/invert/invert.h (3dc49fb)
  • kwin/effects/invert/invert.cpp (0ef1545)
  • kwin/effects/login/login.h (db30044)
  • kwin/effects/login/login.cpp (a9da287)
  • kwin/effects/logout/logout.h (f08152f)
  • kwin/effects/logout/logout.cpp (4e97ebe)
  • kwin/effects/magiclamp/magiclamp.h (800008= 1)
  • kwin/effects/magiclamp/magiclamp.cpp (f7f7= 3b4)
  • kwin/effects/minimizeanimation/minimizeanimation.h (27e0dd3)
  • kwin/effects/minimizeanimation/minimizeanimation.cpp (44d15ec)
  • kwin/effects/presentwindows/presentwindows.h (08aa262)
  • kwin/effects/presentwindows/presentwindows.cpp (dc4d5c5)
  • kwin/effects/resize/resize.h (0411d6d)
  • kwin/effects/resize/resize.cpp (84bdd7f)
  • kwin/effects/scalein/scalein.h (8ae7504)
  • kwin/effects/scalein/scalein.cpp (25d78df)=
  • kwin/effects/screenshot/screenshot.h (2238= 5a3)
  • kwin/effects/screenshot/screenshot.cpp (6b= d18e3)
  • kwin/effects/sheet/sheet.h (7ec739b)
  • kwin/effects/sheet/sheet.cpp (9156f0d)
  • kwin/effects/slideback/slideback.h (0cba55= 6)
  • kwin/effects/slideback/slideback.cpp (380b= 3d5)
  • kwin/effects/slidingpopups/slidingpopups.h (eca9e2e)
  • kwin/effects/slidingpopups/slidingpopups.cpp (8fb0608)
  • kwin/effects/snaphelper/snaphelper.h (ee60= f8f)
  • kwin/effects/snaphelper/snaphelper.cpp (a3= 0cc60)
  • kwin/effects/taskbarthumbnail/taskbarthumbnail.h (77e5294)
  • kwin/effects/taskbarthumbnail/taskbarthumbnail.cpp (1ce6233)
  • kwin/effects/thumbnailaside/thumbnailaside.h (323e2fd)
  • kwin/effects/thumbnailaside/thumbnailaside.cpp (3a1b4e0)
  • kwin/effects/translucency/translucency.h (= fa7b85c)
  • kwin/effects/translucency/translucency.cpp (4e6d58d)
  • kwin/effects/windowgeometry/windowgeometry.h (ba20c05)
  • kwin/effects/windowgeometry/windowgeometry.cpp (a9fd796)
  • kwin/effects/wobblywindows/wobblywindows.h (d4844d3)
  • kwin/effects/wobblywindows/wobblywindows.cpp (c7d30fe)
  • kwin/libkwineffects/kwinanimationeffect.h = (106155c)
  • kwin/libkwineffects/kwinanimationeffect.cpp (491ec58= )
  • kwin/scripting/scriptedeffect.h (PRE-CREAT= ION)
  • kwin/scripting/scriptedeffect.cpp (PRE-CRE= ATION)
  • kwin/thumbnailitem.cpp (73441a0)

View Diff

--===============4863444965842245746==-- --===============7092674535466688840== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ kwin mailing list kwin@kde.org https://mail.kde.org/mailman/listinfo/kwin --===============7092674535466688840==--