summaryrefslogtreecommitdiff
path: root/src/TestPlugin.cs
diff options
context:
space:
mode:
authorAlp Toker <alp@atoker.com>2006-08-09 00:10:28 +0100
committerAlp Toker <alp@atoker.com>2006-08-09 00:10:28 +0100
commit1fc8f3da015dc7e555dbe9e2ac81f98b4a73e963 (patch)
tree679f9e28b8e76df070d7ec05e761b99f5bdc3cda /src/TestPlugin.cs
parent0464bcaf2d04490d78ea8cf56c306ef1b179659c (diff)
downloadcompiz-cil-1fc8f3da015dc7e555dbe9e2ac81f98b4a73e963.tar.gz
compiz-cil-1fc8f3da015dc7e555dbe9e2ac81f98b4a73e963.tar.bz2
Zero more fields, implement Screen.Paint event
Diffstat (limited to 'src/TestPlugin.cs')
-rw-r--r--src/TestPlugin.cs16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/TestPlugin.cs b/src/TestPlugin.cs
index dc40a58..2785160 100644
--- a/src/TestPlugin.cs
+++ b/src/TestPlugin.cs
@@ -9,19 +9,20 @@ public class MtestPlugin : Plugin
Screen s = new Screen (screen);
s.PreparePaint += OnPreparePaintScreen;
+ s.Paint += OnPaintScreen;
return true;
}
public void OnPreparePaintScreen (PreparePaintScreenHandler inner, IntPtr s, int msSinceLastPaint)
{
- Console.Error.WriteLine ("PreparePaintScreen (managed)");
+ Console.Error.WriteLine ("PreparePaintScreen (managed) " + msSinceLastPaint);
inner (s, msSinceLastPaint);
}
- public bool PaintScreen (IntPtr s, ref ScreenPaintAttrib sa, IntPtr region, ScreenPaint mask)
+ public bool OnPaintScreen (PaintScreenHandler inner, IntPtr s, ref ScreenPaintAttrib sa, IntPtr region, ScreenPaint mask)
{
- Console.Error.WriteLine ("PaintScreen (managed) " + " " + my_screen.Handle + " " + s + " " + mask);
+ Console.Error.WriteLine ("PaintScreen (managed) " + " " + s + " " + mask);
Console.Error.WriteLine ("xRotate: " + sa.xRotate);
Console.Error.WriteLine ("yRotate: " + sa.yRotate);
@@ -46,16 +47,11 @@ public class MtestPlugin : Plugin
//mask &= ScreenPaint.Region;
//mask |= ScreenPaint.Transformed;
- bool ret = my_screen.PaintScreenOrig (s, ref sa, region, mask);
- //Screen.PaintScreen_Add (my_screen.Handle, ref PaintScreen);
- Screen.PaintScreen_Add (my_screen.Handle, pt);
+ bool ret = inner (s, ref sa, region, mask);
+
return ret;
}
- Screen my_screen = null;
-
- PaintScreenHandler pt;
-
public override bool InitWindow (IntPtr plugin, IntPtr window)
{
Console.WriteLine ("initWindow");