]> O.S.I.I.S - jp/crow.git/commitdiff
MDCrow, single treaded xlib with discard event on xsync
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Sat, 22 Dec 2018 10:48:58 +0000 (11:48 +0100)
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Sat, 22 Dec 2018 10:48:58 +0000 (11:48 +0100)
132 files changed:
Crow.sln
Crow/Templates/Button.template
Crow/src/BmpPicture.cs
Crow/src/Cairo/CairoHelpers.cs
Crow/src/ExtensionsMethods.cs
Crow/src/Fill/Fill.cs
Crow/src/Font.cs
Crow/src/Gradient.cs
Crow/src/GraphicObjects/Border.cs
Crow/src/GraphicObjects/Button.cs
Crow/src/GraphicObjects/DockStack.cs
Crow/src/GraphicObjects/GraduatedSlider.cs
Crow/src/GraphicObjects/Group.cs
Crow/src/GraphicObjects/HueSelector.cs
Crow/src/GraphicObjects/Image.cs
Crow/src/GraphicObjects/Label.cs
Crow/src/GraphicObjects/PrivateContainer.cs
Crow/src/GraphicObjects/ProgressBar.cs
Crow/src/GraphicObjects/SaturationValueSelector.cs
Crow/src/GraphicObjects/Scroller.cs
Crow/src/GraphicObjects/ScrollingObject.cs
Crow/src/GraphicObjects/Shape.cs
Crow/src/GraphicObjects/Slider.cs
Crow/src/GraphicObjects/Splitter.cs
Crow/src/GraphicObjects/TabItem.cs
Crow/src/GraphicObjects/TabView.cs
Crow/src/GraphicObjects/TemplatedControl.cs
Crow/src/GraphicObjects/TestCairoPatch.cs
Crow/src/GraphicObjects/TextBox.cs
Crow/src/GraphicObjects/TextRun.cs
Crow/src/GraphicObjects/Trend.cs
Crow/src/GraphicObjects/Widget.cs
Crow/src/GraphicObjects/Window.cs
Crow/src/Interface.cs
Crow/src/Mono.Cairo/Antialias.cs
Crow/src/Mono.Cairo/Cairo.cs
Crow/src/Mono.Cairo/CairoDebug.cs
Crow/src/Mono.Cairo/Content.cs
Crow/src/Mono.Cairo/Context.cs
Crow/src/Mono.Cairo/DRMDevice.cs
Crow/src/Mono.Cairo/DRMSurface.cs
Crow/src/Mono.Cairo/Device.cs
Crow/src/Mono.Cairo/DirectFBSurface.cs
Crow/src/Mono.Cairo/Distance.cs
Crow/src/Mono.Cairo/EGLDevice.cs
Crow/src/Mono.Cairo/Extend.cs
Crow/src/Mono.Cairo/FillRule.cs
Crow/src/Mono.Cairo/Filter.cs
Crow/src/Mono.Cairo/FontExtents.cs
Crow/src/Mono.Cairo/FontFace.cs
Crow/src/Mono.Cairo/FontOptions.cs
Crow/src/Mono.Cairo/FontSlant.cs
Crow/src/Mono.Cairo/FontType.cs
Crow/src/Mono.Cairo/FontWeight.cs
Crow/src/Mono.Cairo/Format.cs
Crow/src/Mono.Cairo/GLSurface.cs
Crow/src/Mono.Cairo/GLXDevice.cs
Crow/src/Mono.Cairo/GlitzSurface.cs
Crow/src/Mono.Cairo/Glyph.cs
Crow/src/Mono.Cairo/Gradient.cs
Crow/src/Mono.Cairo/HintMetrics.cs
Crow/src/Mono.Cairo/HintStyle.cs
Crow/src/Mono.Cairo/ImageSurface.cs
Crow/src/Mono.Cairo/LineCap.cs
Crow/src/Mono.Cairo/LineJoin.cs
Crow/src/Mono.Cairo/LinearGradient.cs
Crow/src/Mono.Cairo/Matrix.cs
Crow/src/Mono.Cairo/MeshPattern.cs
Crow/src/Mono.Cairo/NativeMethods.cs
Crow/src/Mono.Cairo/Operator.cs
Crow/src/Mono.Cairo/PSSurface.cs
Crow/src/Mono.Cairo/Path.cs
Crow/src/Mono.Cairo/Pattern.cs
Crow/src/Mono.Cairo/PatternType.cs
Crow/src/Mono.Cairo/PdfSurface.cs
Crow/src/Mono.Cairo/Point.cs
Crow/src/Mono.Cairo/PointD.cs
Crow/src/Mono.Cairo/RadialGradient.cs
Crow/src/Mono.Cairo/Region.cs
Crow/src/Mono.Cairo/ScaledFont.cs
Crow/src/Mono.Cairo/SolidPattern.cs
Crow/src/Mono.Cairo/Status.cs
Crow/src/Mono.Cairo/SubpixelOrder.cs
Crow/src/Mono.Cairo/Surface.cs
Crow/src/Mono.Cairo/SurfacePattern.cs
Crow/src/Mono.Cairo/SurfaceType.cs
Crow/src/Mono.Cairo/SvgSurface.cs
Crow/src/Mono.Cairo/SvgVersion.cs
Crow/src/Mono.Cairo/TextExtents.cs
Crow/src/Mono.Cairo/WGLDevice.cs
Crow/src/Mono.Cairo/Win32Surface.cs
Crow/src/Mono.Cairo/XcbSurface.cs
Crow/src/Mono.Cairo/XlibSurface.cs
Crow/src/Picture.cs
Crow/src/Point.cs
Crow/src/SolidColor.cs
Crow/src/SvgPicture.cs
Crow/src/backends/IBackend.cs
Crow/src/backends/win32/WinBackend.cs [changed mode: 0755->0644]
Crow/src/backends/xcb/XCBBackend.cs
Crow/src/backends/xlib/XLibBackend.cs
Crow/src/debug/DbgEventTypeColors.cs
Crow/src/debug/DbgLogViewer.cs
Crow/src/debug/DebugLogger.cs
Crow/src/rsvg/Handle.cs
CrowIDE/src/DesignInterface.cs
CrowIDE/src/Editors/CodeBuffer/TextEditor.cs
CrowIDE/src/Editors/ImlVisualEditor.cs
CrowIDE/src/Editors/SourceEditor.cs
CrowIDE/src/Editors/SvgEditor.cs
CrowIDE/src/GraphicObjectDesignContainer.cs
CrowIDE/src/MemberView/MembersView.cs
CrowIDE/src/VerticalLine.cs
MDCrow/AddinInfo.cs [new file with mode: 0644]
MDCrow/MDCrow.addin.xml [new file with mode: 0644]
MDCrow/MDCrow.csproj [new file with mode: 0644]
MDCrow/obj/MDCrow.csproj.nuget.cache [new file with mode: 0644]
MDCrow/obj/MDCrow.csproj.nuget.g.props [new file with mode: 0644]
MDCrow/obj/MDCrow.csproj.nuget.g.targets [new file with mode: 0644]
MDCrow/obj/project.assets.json [new file with mode: 0644]
MDCrow/src/CrowCanvas.cs [new file with mode: 0644]
MDCrow/src/CrowDisplayBinding.cs [new file with mode: 0644]
MDCrow/src/CrowView.cs [new file with mode: 0644]
MDCrow/src/DesignInterface.cs [new file with mode: 0644]
MDCrow/src/MDCrowNodeExtension.cs [new file with mode: 0644]
Tests/BasicTests.cs
Tests/GraphicObjects/ColorCircleSelector.cs
Tests/GraphicObjects/HexaContainer.cs
Tests/GraphicObjects/LaggingGraphicObject.cs
Tests/GraphicObjects/SimpleGauge.cs
Tests/GraphicObjects/TechBorder.cs
Tests/Interfaces/GraphicObject/0.crow

index 68347c39583abba827b3ac2cd42573fe23c9e385..b9be25c401d089665c6a493faeb9a9b210f157c5 100644 (file)
--- a/Crow.sln
+++ b/Crow.sln
@@ -7,6 +7,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "Tests\Tests.csproj
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CrowIDE", "CrowIDE\CrowIDE.csproj", "{B6D911CD-1D09-42FC-B300-9187190F2AE1}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MDCrow", "MDCrow\MDCrow.csproj", "{34956F17-5485-4C5C-9E2D-8EB15E5160AE}"
+EndProject
 Global
        GlobalSection(SolutionConfigurationPlatforms) = preSolution
                Debug|Any CPU = Debug|Any CPU
@@ -25,6 +27,10 @@ Global
                {C2980F9B-4798-4C05-99E2-E174810F7C7B}.Debug|Any CPU.Build.0 = Debug|Any CPU
                {C2980F9B-4798-4C05-99E2-E174810F7C7B}.Release|Any CPU.ActiveCfg = Release|Any CPU
                {C2980F9B-4798-4C05-99E2-E174810F7C7B}.Release|Any CPU.Build.0 = Release|Any CPU
+               {34956F17-5485-4C5C-9E2D-8EB15E5160AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {34956F17-5485-4C5C-9E2D-8EB15E5160AE}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {34956F17-5485-4C5C-9E2D-8EB15E5160AE}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {34956F17-5485-4C5C-9E2D-8EB15E5160AE}.Release|Any CPU.Build.0 = Release|Any CPU
        EndGlobalSection
        GlobalSection(MonoDevelopProperties) = preSolution
                Policies = $0
index d2f6c602e2ba9d84d71b86ac7e7dc13fe3747de8..db8c31e5287d2081f485f7f3e45ff230e2feab99 100755 (executable)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<Border Background="{./Background}" MinimumSize="50,20" Name="Content"
+<Border Background="{./Background}" MinimumSize="50,20" Name="Content" Focusable="true"
        Foreground="Transparent" CornerRadius="{../CornerRadius}" BorderWidth="1"
        MouseEnter="{Foreground=vgradient|0:White|0.2:Grey|0.9:Grey|1:Black;caption.Foreground=White}"
        MouseLeave="{Foreground=Transparent;caption.Foreground=LightGrey}"
index 98c2a01607898fc50577e33b6fbcb22afbdf1344..540087dc6814c480461fa7997c2df5b5efd63526 100644 (file)
@@ -26,7 +26,7 @@
 
 using System;
 using System.IO;
-using Cairo;
+using Crow.Cairo;
 
 namespace Crow
 {
index 032980d0164142991507c5787dd88e35c7d59634..c9b057aa6c99f53e3657b5f5eca5b0ae92c921db 100644 (file)
@@ -57,18 +57,18 @@ namespace Crow
 
             return arr[minp];
         }
-               public static void CairoRectangle(Cairo.Context gr, Rectangle r, double radius, double stroke = 0.0)
+               public static void CairoRectangle(Crow.Cairo.Context gr, Rectangle r, double radius, double stroke = 0.0)
                {
                        if (radius > 0)
                                CairoHelpers.DrawRoundedRectangle (gr, r, radius, stroke);
                        else
                                gr.Rectangle (r, stroke);
                }
-               public static void CairoCircle(Cairo.Context gr, Rectangle r)
+               public static void CairoCircle(Crow.Cairo.Context gr, Rectangle r)
                {
                        gr.Arc(r.X + r.Width/2, r.Y + r.Height/2, Math.Min(r.Width,r.Height)/2, 0, 2*Math.PI);
                }
-               public static void DrawRoundedRectangle(Cairo.Context gr, Rectangle r, double radius, double stroke = 0.0)
+               public static void DrawRoundedRectangle(Crow.Cairo.Context gr, Rectangle r, double radius, double stroke = 0.0)
         {
                        if (stroke>0.0) {
                                gr.LineWidth = stroke;
@@ -78,7 +78,7 @@ namespace Crow
                        }else
                                DrawRoundedRectangle(gr, r.X, r.Y, r.Width, r.Height, radius);
         }
-        public static void DrawRoundedRectangle(Cairo.Context gr, double x, double y, double width, double height, double radius)
+        public static void DrawRoundedRectangle(Crow.Cairo.Context gr, double x, double y, double width, double height, double radius)
         {
             gr.Save();
 
@@ -96,7 +96,7 @@ namespace Crow
             gr.ClosePath();
             gr.Restore();
         }
-        public static void StrokeRaisedRectangle(Cairo.Context gr, Rectangle r, double width = 1)
+        public static void StrokeRaisedRectangle(Crow.Cairo.Context gr, Rectangle r, double width = 1)
         {
             gr.Save();
             r.Inflate((int)-width / 2, (int)-width / 2);
@@ -115,7 +115,7 @@ namespace Crow
 
             gr.Restore();
         }
-        public static void StrokeLoweredRectangle(Cairo.Context gr, Rectangle r, double width = 1)
+        public static void StrokeLoweredRectangle(Crow.Cairo.Context gr, Rectangle r, double width = 1)
         {
             gr.Save();
             r.Inflate((int)-width / 2, (int)-width / 2);
index ecbc8a7234449f04f7bc74c5f5ded99feef57014..ef464270f80f92d6719009ddb9e6f7af253ef7fd 100644 (file)
@@ -33,7 +33,7 @@ namespace Crow
        {
                #region Cairo extensions
 
-               public static void Rectangle(this Cairo.Context ctx, Rectangle r, double stroke = 0.0)
+               public static void Rectangle(this Crow.Cairo.Context ctx, Rectangle r, double stroke = 0.0)
                {
                        if (stroke > 0.0) {
                                ctx.LineWidth = stroke;
@@ -43,41 +43,41 @@ namespace Crow
                        }else
                                ctx.Rectangle (r.X, r.Y, r.Width, r.Height);
                }
-               public static double GetLength(this Cairo.PointD p){
+               public static double GetLength(this Crow.Cairo.PointD p){
                        return Math.Sqrt (Math.Pow (p.X, 2) + Math.Pow (p.Y, 2));
                }
-               public static Cairo.PointD GetPerp(this Cairo.PointD p){
-                       return new Cairo.PointD(-p.Y, p.X);
+               public static Crow.Cairo.PointD GetPerp(this Crow.Cairo.PointD p){
+                       return new Crow.Cairo.PointD(-p.Y, p.X);
                }
-               public static Cairo.PointD GetNormalized(this Cairo.PointD p){
+               public static Crow.Cairo.PointD GetNormalized(this Crow.Cairo.PointD p){
                        double length = p.GetLength();
                        p.X /= length;
                        p.Y /= length;
                        return p;
                }
-               public static Cairo.PointD Substract(this Cairo.PointD p1, Cairo.PointD p2){
-                       return new Cairo.PointD(p1.X - p2.X, p1.Y - p2.Y);
+               public static Crow.Cairo.PointD Substract(this Crow.Cairo.PointD p1, Crow.Cairo.PointD p2){
+                       return new Crow.Cairo.PointD(p1.X - p2.X, p1.Y - p2.Y);
                }
-               public static Cairo.PointD Divide(this Cairo.PointD p1, double d){
-                       return new Cairo.PointD(p1.X / d, p1.Y / d);
+               public static Crow.Cairo.PointD Divide(this Crow.Cairo.PointD p1, double d){
+                       return new Crow.Cairo.PointD(p1.X / d, p1.Y / d);
                }
-               public static Cairo.PointD Add(this Cairo.PointD p1, Cairo.PointD p2){
-                       return new Cairo.PointD(p1.X + p2.X, p1.Y + p2.Y);
+               public static Crow.Cairo.PointD Add(this Crow.Cairo.PointD p1, Crow.Cairo.PointD p2){
+                       return new Crow.Cairo.PointD(p1.X + p2.X, p1.Y + p2.Y);
                }
-               public static Cairo.PointD Multiply(this Cairo.PointD p1, double v){
-                       return new Cairo.PointD(p1.X * v, p1.Y * v);
+               public static Crow.Cairo.PointD Multiply(this Crow.Cairo.PointD p1, double v){
+                       return new Crow.Cairo.PointD(p1.X * v, p1.Y * v);
                }
-               public static void DrawCote(this Cairo.Context ctx, Cairo.PointD p1, Cairo.PointD p2,
+               public static void DrawCote(this Crow.Cairo.Context ctx, Crow.Cairo.PointD p1, Crow.Cairo.PointD p2,
                        double stroke = 1.0, bool fill = false, double arrowWidth = 3.0, double arrowLength = 7.0)
                {                       
-                       Cairo.PointD vDir = p2.Substract(p1);
+                       Crow.Cairo.PointD vDir = p2.Substract(p1);
                        vDir = vDir.GetNormalized ();
-                       Cairo.PointD vPerp = vDir.GetPerp ();
+                       Crow.Cairo.PointD vPerp = vDir.GetPerp ();
 
-                       Cairo.PointD pA0 = p1.Add(vDir.Multiply(arrowLength));
-                       Cairo.PointD pA1 = p2.Substract(vDir.Multiply(arrowLength));
+                       Crow.Cairo.PointD pA0 = p1.Add(vDir.Multiply(arrowLength));
+                       Crow.Cairo.PointD pA1 = p2.Substract(vDir.Multiply(arrowLength));
 
-                       Cairo.PointD vA = vPerp.Multiply (arrowWidth);
+                       Crow.Cairo.PointD vA = vPerp.Multiply (arrowWidth);
 
                        ctx.MoveTo (p1);
                        ctx.LineTo (pA0.Add (vA));
@@ -104,17 +104,17 @@ namespace Crow
                        ctx.LineWidth = stroke;
                        ctx.Stroke ();
                }
-               public static void DrawCoteInverse(this Cairo.Context ctx, Cairo.PointD p1, Cairo.PointD p2,
+               public static void DrawCoteInverse(this Crow.Cairo.Context ctx, Crow.Cairo.PointD p1, Crow.Cairo.PointD p2,
                        double stroke = 1.0, bool fill = false, double arrowWidth = 3.0, double arrowLength = 7.0)
                {                       
-                       Cairo.PointD vDir = p2.Substract(p1);
+                       Crow.Cairo.PointD vDir = p2.Substract(p1);
                        vDir = vDir.GetNormalized ();
-                       Cairo.PointD vPerp = vDir.GetPerp ();
+                       Crow.Cairo.PointD vPerp = vDir.GetPerp ();
 
-                       Cairo.PointD pA0 = p1.Add(vDir.Multiply(arrowLength));
-                       Cairo.PointD pA1 = p2.Substract(vDir.Multiply(arrowLength));
+                       Crow.Cairo.PointD pA0 = p1.Add(vDir.Multiply(arrowLength));
+                       Crow.Cairo.PointD pA1 = p2.Substract(vDir.Multiply(arrowLength));
 
-                       Cairo.PointD vA = vPerp.Multiply (arrowWidth);
+                       Crow.Cairo.PointD vA = vPerp.Multiply (arrowWidth);
 
                        ctx.MoveTo (p1.Add (vA));
                        ctx.LineTo (pA0);
@@ -136,13 +136,13 @@ namespace Crow
                        ctx.LineWidth = stroke;
                        ctx.Stroke ();
                }
-               public static void DrawCoteFixed(this Cairo.Context ctx, Cairo.PointD p1, Cairo.PointD p2,
+               public static void DrawCoteFixed(this Crow.Cairo.Context ctx, Crow.Cairo.PointD p1, Crow.Cairo.PointD p2,
                        double stroke = 1.0, double coteWidth = 3.0)
                {                       
-                       Cairo.PointD vDir = p2.Substract(p1);
+                       Crow.Cairo.PointD vDir = p2.Substract(p1);
                        vDir = vDir.GetNormalized ();
-                       Cairo.PointD vPerp = vDir.GetPerp ();
-                       Cairo.PointD vA = vPerp.Multiply (coteWidth);
+                       Crow.Cairo.PointD vPerp = vDir.GetPerp ();
+                       Crow.Cairo.PointD vA = vPerp.Multiply (coteWidth);
 
                        ctx.MoveTo (p1.Add (vA));
                        ctx.LineTo (p1.Substract (vA));
@@ -154,11 +154,11 @@ namespace Crow
                        ctx.Stroke ();
                }
 
-               public static void SetSourceColor(this Cairo.Context ctx, Color c)
+               public static void SetSourceColor(this Crow.Cairo.Context ctx, Color c)
                {
                        ctx.SetSourceRGBA(c.R,c.G,c.B,c.A);
                }
-               public static void AddColorStop(this Cairo.Gradient grad, double offset, Color c)
+               public static void AddColorStop(this Crow.Cairo.Gradient grad, double offset, Color c)
                {
                        grad.AddColorStop (offset, c);
                }
index 0c0bdf5b671be0a26c257ffbd09c53db9f5a57b9..7d521045cbb5086f2aac43c6562df86c71341d23 100644 (file)
@@ -26,7 +26,7 @@
 
 using System;
 using System.Collections.Generic;
-using Cairo;
+using Crow.Cairo;
 
 namespace Crow
 {
index 16353d70226eda53fd98c24b8a43176515f2e058..06df4a88ae6f78d1367c7cf5668796fbab3eb538 100644 (file)
@@ -25,7 +25,7 @@
 // THE SOFTWARE.
 
 using System;
-using Cairo;
+using Crow.Cairo;
 
 namespace Crow
 {
index 2630c42a59dc00990c1b44068c27f6ed5d94d7c4..1e37fac3307fadad36c9c0d79ffed96e932945e1 100644 (file)
@@ -26,7 +26,7 @@
 
 using System;
 using System.Collections.Generic;
-using Cairo;
+using Crow.Cairo;
 
 namespace Crow
 {
@@ -81,16 +81,16 @@ namespace Crow
 
                public override void SetAsSource (Context ctx, Rectangle bounds = default(Rectangle))
                {
-                       Cairo.Gradient grad = null;
+                       Crow.Cairo.Gradient grad = null;
                        switch (GradientType) {
                        case Type.Vertical:
-                               grad = new Cairo.LinearGradient (bounds.Left, bounds.Top, bounds.Left, bounds.Bottom);
+                               grad = new Crow.Cairo.LinearGradient (bounds.Left, bounds.Top, bounds.Left, bounds.Bottom);
                                break;
                        case Type.Horizontal:
-                               grad = new Cairo.LinearGradient (bounds.Left, bounds.Top, bounds.Right, bounds.Top);
+                               grad = new Crow.Cairo.LinearGradient (bounds.Left, bounds.Top, bounds.Right, bounds.Top);
                                break;
                        case Type.Oblic:
-                               grad = new Cairo.LinearGradient (bounds.Left, bounds.Top, bounds.Right, bounds.Bottom);
+                               grad = new Crow.Cairo.LinearGradient (bounds.Left, bounds.Top, bounds.Right, bounds.Bottom);
                                break;
                        case Type.Radial:
                                throw new NotImplementedException ();
index 9379c26acaa96525a5ef1d64a8cc1eec26f793a8..e5a16ec8949b3758fc0c3237ea1f1149d47b4652 100644 (file)
@@ -28,7 +28,7 @@ using System;
 using System.Xml.Serialization;
 using System.ComponentModel;
 using System.Diagnostics;
-using Cairo;
+using Crow.Cairo;
 
 namespace Crow
 {
index 30612512f208522f844153370f07f67ed39ead73..8b15c2ea6ec000d7c56378a6d641075d5a1a1b17 100644 (file)
@@ -33,7 +33,7 @@ using System.Text;
 using System.Diagnostics;
 
 using System.Xml.Serialization;
-using Cairo;
+using Crow.Cairo;
 using System.ComponentModel;
 
 namespace Crow
index a52c7f6e9c0e9cb77d7ed58dabcffb498e61d439..ab86ae0b0af06c9b3a4617cf89bc3bb914cb439c 100644 (file)
@@ -189,7 +189,7 @@ namespace Crow
                        RegisterForGraphicUpdate ();
                }
 
-               protected override void onDraw (Cairo.Context gr)
+               protected override void onDraw (Crow.Cairo.Context gr)
                {
                        gr.Save ();
 
index e1d4dd46e8a45f872811842542f1ea6d477b0801..71bbff112954ef479880906f4263dcf6aeb89eea 100644 (file)
@@ -28,7 +28,7 @@ using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
-using Cairo;
+using Crow.Cairo;
 using System.Xml.Serialization;
 
 namespace Crow
index 26a5084d8d365eb738a4be03e44638297d2a5f92..a0ae35b24c7785e76c7724c1e98ea04f87a9f3c8 100644 (file)
@@ -28,7 +28,7 @@ using System;
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Xml.Serialization;
-using Cairo;
+using Crow.Cairo;
 using System.Diagnostics;
 using System.Reflection;
 using System.Threading;
index d8218feeb64b30af95ddcb88a3c87a7577246112..e9a31dfbeb0187bf0ae9df5418f66f9e809d5169 100644 (file)
@@ -27,7 +27,7 @@
 using System;
 using System.Xml.Serialization;
 using System.ComponentModel;
-using Cairo;
+using Crow.Cairo;
 
 namespace Crow
 {
index 388abb1b4b74acc9dea19bf548577f32bfdb0533..98f86e58cd605cc57f8aa951edc40e9dbbfb6826 100644 (file)
@@ -25,7 +25,7 @@
 // THE SOFTWARE.
 
 using System;
-using Cairo;
+using Crow.Cairo;
 using System.Xml.Serialization;
 using System.ComponentModel;
 using System.Diagnostics;
index b4b813c6b5b4cbaab804cdf1665ddab4c897515c..371e79cec4453db7b67f1baf0601c10b9a2bc887 100644 (file)
@@ -28,7 +28,7 @@ using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Diagnostics;
-using Cairo;
+using Crow.Cairo;
 using System.Text.RegularExpressions;
 using System.Xml.Serialization;
 using System.ComponentModel;
@@ -692,12 +692,12 @@ namespace Crow
                {
                        base.onMouseEnter (sender, e);
                        if (Selectable)
-                               IFace.MouseCursor = XCursor.Text;
+                               IFace.MouseCursor = MouseCursors.Text;
                }
                public override void onMouseLeave (object sender, MouseMoveEventArgs e)
                {
                        base.onMouseLeave (sender, e);
-                       IFace.MouseCursor = XCursor.Default;
+                       IFace.MouseCursor = MouseCursors.Default;
                }
                protected override void onFocused (object sender, EventArgs e)
                {
index 8b1650e5f2bfbaf5bf0e6ce068d4d005bb5430bd..1225cbb385a6235993e6b42888c0e1e59e3ab438 100644 (file)
@@ -27,7 +27,7 @@
 using System;
 using System.Xml.Serialization;
 using System.ComponentModel;
-using Cairo;
+using Crow.Cairo;
 
 namespace Crow
 {
index afaead9b452850bdee25208a39e6c96faae185ce..20fadadce0cdffaebc5b03d97c04eff2b4eb123b 100644 (file)
@@ -28,7 +28,7 @@ using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
-using Cairo;
+using Crow.Cairo;
 using System.Diagnostics;
 using System.Xml.Serialization;
 using System.ComponentModel;
index 5a25d6a22f21b145698a572529f46ba78a99940f..535a90df198884774737e0ba1e09c04d921fd161 100644 (file)
@@ -25,7 +25,7 @@
 // THE SOFTWARE.
 
 using System;
-using Cairo;
+using Crow.Cairo;
 using System.Xml.Serialization;
 
 namespace Crow
index 99500d89b5360eb7e5b5fc1c35d57d46a8fb3d77..b97009ba1542f147bcc974aed837d86dfe1717fc 100644 (file)
@@ -28,7 +28,7 @@ using System;
 using System.Xml.Serialization;
 using System.ComponentModel;
 using System.Diagnostics;
-using Cairo;
+using Crow.Cairo;
 
 namespace Crow
 {
index 0f694236f6022f514df9efcb974f3609b136848d..12804899dfc7baed69b784ca5789716ea3c0954d 100644 (file)
@@ -28,7 +28,7 @@ using System;
 using System.Xml.Serialization;
 using System.ComponentModel;
 using System.Collections;
-using Cairo;
+using Crow.Cairo;
 
 
 namespace Crow
index ea0409b121a4fb05f27141461a2093e87af2e0c7..99678556afc66a9d73f7246f7de285072c65e9a1 100644 (file)
@@ -28,7 +28,7 @@ using System.Xml.Serialization;
 using System.ComponentModel;
 using System.IO;
 using System.Text;
-using Cairo;
+using Crow.Cairo;
 
 namespace Crow
 {
index 2db34f922861ef2212f18a6abbe756584c4eea45..bd46b051637ffdd40cbf45231ed14557b3117f33 100644 (file)
@@ -25,7 +25,7 @@
 // THE SOFTWARE.
 
 using System;
-using Cairo;
+using Crow.Cairo;
 using System.Xml.Serialization;
 using System.ComponentModel;
 using System.Diagnostics;
index e1f8e637739ac3f509f778278dffa86ba950fbd2..70c6451071fb2fb21c6bf67bd42469d03451d3ce 100644 (file)
@@ -91,14 +91,14 @@ namespace Crow
                {
                        base.onMouseEnter (sender, e);
                        if ((Parent as GenericStack).Orientation == Orientation.Horizontal)
-                               IFace.MouseCursor = XCursor.H;
+                               IFace.MouseCursor = MouseCursors.H;
                        else
-                               IFace.MouseCursor = XCursor.V;
+                               IFace.MouseCursor = MouseCursors.V;
                }
                public override void onMouseLeave (object sender, MouseMoveEventArgs e)
                {
                        base.onMouseLeave (sender, e);
-                       IFace.MouseCursor = XCursor.Default;
+                       IFace.backend.SetCursor (MouseCursors.Default);
                }
                public override void onMouseDown (object sender, MouseButtonEventArgs e)
                {
index 4d9847c751ab2c38e2a3e8a3960d4585bf2441b2..113a43997ad8879d515e38409f41aaa299d3581b 100644 (file)
@@ -28,7 +28,7 @@ using System;
 using System.Xml.Serialization;
 using System.ComponentModel;
 using System.Diagnostics;
-using Cairo;
+using Crow.Cairo;
 using System.Linq;
 
 namespace Crow
index 655732f166b5b9e1edc8407b93555c7917abd884..550d60aa3ffaae6cf36edc6fbea453ff288aa6d6 100644 (file)
@@ -27,7 +27,7 @@
 using System;
 using System.Xml.Serialization;
 using System.ComponentModel;
-using Cairo;
+using Crow.Cairo;
 using System.Diagnostics;
 using System.Linq;
 
index 2e36eac6bc624e70f4c0fa43967f19e350cc6d05..d93cf4c8b64d3b6125248377349e8595c1a9976c 100644 (file)
@@ -29,7 +29,7 @@ using System.ComponentModel;
 using System.IO;
 using System.Xml;
 using System.Reflection;
-using Cairo;
+using Crow.Cairo;
 
 namespace Crow
 {
index cd15adc5b4bd0e5a6b64a61ddd6a6bcbef10b2a8..dcfb584c7fb5b0fb073ba1bf2b11296362a1e0e1 100644 (file)
@@ -24,7 +24,7 @@
 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 // THE SOFTWARE.
 using System;
-using Cairo;
+using Crow.Cairo;
 
 namespace Crow
 {
index 500a0a1a45099f9e99d5d4411d6fd7798980afeb..71fd62053cd6e1ef436ea8982e92c261c983cb01 100644 (file)
@@ -25,7 +25,7 @@
 // THE SOFTWARE.
 
 using System;
-using Cairo;
+using Crow.Cairo;
 using System.Diagnostics;
 using System.Xml.Serialization;
 
index 2be1d628e959bf80b363e4ebccc901cc346202e7..8b20ddb7217ced56a9967de21aa6f5daa330ba78 100644 (file)
@@ -29,7 +29,7 @@ using System.Collections.Generic;
 using System.Linq;
 using System.Text;
 using System.Diagnostics;
-using Cairo;
+using Crow.Cairo;
 using System.Text.RegularExpressions;
 using System.Xml.Serialization;
 using System.ComponentModel;
index 8fcd8830975994c5989a2a9e11e78cc23560cd35..b62fd2f2bd976c5e9a22c2bb9e03201df80985d8 100644 (file)
@@ -28,7 +28,7 @@ using System;
 using System.Collections.Generic;
 using System.Xml.Serialization;
 using System.ComponentModel;
-using Cairo;
+using Crow.Cairo;
 
 namespace Crow
 {
index ea076f827f2fcdcbcd9e1c14a1593d4bedab8422..d6ea25801bfe3f8a891846ee41d7b21d0430d168 100644 (file)
@@ -31,7 +31,7 @@ using System.Xml.Serialization;
 using System.Reflection;
 using System.Reflection.Emit;
 using System.Runtime.CompilerServices;
-using Cairo;
+using Crow.Cairo;
 using System.Diagnostics;
 using Crow.IML;
 using System.Threading;
@@ -816,7 +816,7 @@ namespace Crow
                /// <summary>
                /// Font being used in many controls, it is defined in the base GraphicObject class.
                /// </summary>
-               [DesignCategory ("Appearance")][DefaultValue("sans, 10")]
+               [DesignCategory ("Appearance")][DefaultValue("sans, 12")]
                public virtual Font Font {
                        get { return font; }
                        set {
index 6c8f005e0d770c59e9c4e0df4d01e7bfca951f68..a1c0c13fa4b030bb6f9da0e2ad34cdc93fe0d985 100644 (file)
@@ -296,7 +296,7 @@ namespace Crow
 
                        if (!hoverBorder) {
                                currentDirection = Direction.None;
-                               IFace.MouseCursor = XCursor.Default;
+                               IFace.MouseCursor = MouseCursors.Default;
                                return;
                        }
 
@@ -333,31 +333,31 @@ namespace Crow
                                if (currentDirection != lastDir) {
                                        switch (currentDirection) {
                                        case Direction.None:
-                                               otkgw.MouseCursor = XCursor.Default;
+                                               otkgw.MouseCursor = MouseCursors.Default;
                                                break;
                                        case Direction.N:
-                                               otkgw.MouseCursor = XCursor.V;
+                                               otkgw.MouseCursor = MouseCursors.V;
                                                break;
                                        case Direction.S:
-                                               otkgw.MouseCursor = XCursor.V;
+                                               otkgw.MouseCursor = MouseCursors.V;
                                                break;
                                        case Direction.E:
-                                               otkgw.MouseCursor = XCursor.H;
+                                               otkgw.MouseCursor = MouseCursors.H;
                                                break;
                                        case Direction.W:
-                                               otkgw.MouseCursor = XCursor.H;
+                                               otkgw.MouseCursor = MouseCursors.H;
                                                break;
                                        case Direction.NW:
-                                               otkgw.MouseCursor = XCursor.NW;
+                                               otkgw.MouseCursor = MouseCursors.NW;
                                                break;
                                        case Direction.NE:
-                                               otkgw.MouseCursor = XCursor.NE;
+                                               otkgw.MouseCursor = MouseCursors.NE;
                                                break;
                                        case Direction.SW:
-                                               otkgw.MouseCursor = XCursor.SW;
+                                               otkgw.MouseCursor = MouseCursors.SW;
                                                break;
                                        case Direction.SE:
-                                               otkgw.MouseCursor = XCursor.SE;
+                                               otkgw.MouseCursor = MouseCursors.SE;
                                                break;
                                        }
                                }                               
@@ -423,7 +423,7 @@ namespace Crow
                {
                        hoverBorder = false;
                        currentDirection = Direction.None;
-                       IFace.MouseCursor = XCursor.Default;
+                       IFace.MouseCursor = MouseCursors.Default;
                }
                protected virtual void onBorderMouseEnter (object sender, MouseMoveEventArgs e)
                {
@@ -433,7 +433,7 @@ namespace Crow
 
                protected void butQuitPress (object sender, MouseButtonEventArgs e)
                {
-                       IFace.MouseCursor = XCursor.Default;
+                       IFace.MouseCursor = MouseCursors.Default;
                        close ();
                }
 
index 9ba6462a4e6ee19d4e2854be6c72dbd8ea76b823..eb77adf89276d081191c68d25bdf48905577a6c2 100644 (file)
@@ -32,7 +32,7 @@ using System.IO;
 using System.Linq;
 using System.Reflection;
 using System.Threading;
-using Cairo;
+using Crow.Cairo;
 using Crow.IML;
 
 
@@ -118,7 +118,7 @@ namespace Crow
                protected bool running;
                protected virtual void InitBackend () {
             if (Environment.OSVersion.Platform == PlatformID.Unix)
-                backend = new Crow.XCB.XCBBackend();
+                backend = new Crow.XLib.XLibBackend();
             else
                 backend = new Crow.Win32.Win32Backend();
 
@@ -130,14 +130,14 @@ namespace Crow
 
                        running = true;
 
-                       Thread t = new Thread (interfaceThread);
+                       /*Thread t = new Thread (interfaceThread);
                        t.IsBackground = true;
-                       t.Start ();
+                       t.Start ();*/
                }
                public void Run () {
                        while (running) {
+                               Update ();
                                ProcessEvents ();
-                               Thread.Sleep(1);
                        }
                }
                public void ProcessKeyPress (char c)
@@ -999,16 +999,12 @@ namespace Crow
                }
 
                #region Mouse and Keyboard Handling
-               XCursor cursor = XCursor.Default;
 
                public MouseState Mouse;
 
-               public XCursor MouseCursor {
+               public MouseCursors MouseCursor {
                        set {
-                               if (value == cursor)
-                                       return;
-                               cursor = value;
-                               MouseCursorChanged.Raise (this,new MouseCursorChangedEventArgs(cursor));
+                               backend.SetCursor (value);
                        }
                }
                /// <summary>Processes mouse move events from the root container, this function
index 30c71c0fc7643af3953b17cb54d30281aa3ad8fe..64da6443314f6580a5c479f51e4458e082624628 100644 (file)
@@ -30,7 +30,7 @@
 
 using System;
 
-namespace Cairo
+namespace Crow.Cairo
 {
        
        public enum Antialias
index c0a5f2ab0af9771219b031717ef44fcbcfd3ecfe..6450f39790f4dd424afc96da4da010e6e4a1db53 100644 (file)
 using System;
 using System.Runtime.InteropServices;
 
-namespace Cairo
+namespace Crow.Cairo
 {
        public static class CairoAPI {
                static public int Version {
                        get {
-                               return Cairo.NativeMethods.cairo_version ();
+                               return Crow.Cairo.NativeMethods.cairo_version ();
                        }
                }
 
                static public string VersionString {
                        get {
-                               IntPtr x = Cairo.NativeMethods.cairo_version_string ();
+                               IntPtr x = Crow.Cairo.NativeMethods.cairo_version_string ();
                                return Marshal.PtrToStringAnsi (x);
                        }
                }
index d694bbb545112665c1c988b8afbacd4c46bfe1be..faff93386b1db4a8720acd294b814b58f66778a8 100644 (file)
@@ -28,7 +28,7 @@
 
 using System;
 
-namespace Cairo {
+namespace Crow.Cairo {
 
        static class CairoDebug
        {
index a45370ff1b2b1a54e379b79e946fb9194a1b4496..f14305a49026304e0067c36a946e14e75b766314 100644 (file)
@@ -30,7 +30,7 @@
 
 using System;
 
-namespace Cairo
+namespace Crow.Cairo
 {
        //[Flags]
        
index d428b42cc47c8cd5691a3602fa3f5515a6507125..44e1b5eb49ae9014f5ae09db2126b9e49e27d5a2 100644 (file)
@@ -39,7 +39,7 @@ using System.Runtime.InteropServices;
 using System.Text;
 using Color = Crow.Color;
 
-namespace Cairo {      
+namespace Crow.Cairo { 
 
        [Obsolete ("Renamed Cairo.Context per suggestion from cairo binding guidelines.")]
        public class Graphics : Context {
@@ -141,7 +141,7 @@ namespace Cairo {
                        set { NativeMethods.cairo_set_antialias (handle, value); }
                }
 
-               public Cairo.Status Status {
+               public Crow.Cairo.Status Status {
                        get {
                                return NativeMethods.cairo_status (handle);
                        }
@@ -173,7 +173,7 @@ namespace Cairo {
                        }
                }
 
-               public Cairo.FillRule FillRule {
+               public Crow.Cairo.FillRule FillRule {
                        set {
                                NativeMethods.cairo_set_fill_rule (handle, value);
                        }
@@ -193,7 +193,7 @@ namespace Cairo {
                        }
                }
 
-               public Cairo.LineCap LineCap {
+               public Crow.Cairo.LineCap LineCap {
                        set {
                                NativeMethods.cairo_set_line_cap (handle, value);
                        }
@@ -203,7 +203,7 @@ namespace Cairo {
                        }
                }
 
-               public Cairo.LineJoin LineJoin {
+               public Crow.Cairo.LineJoin LineJoin {
                        set {
                                NativeMethods.cairo_set_line_join (handle, value);
                        }
@@ -247,7 +247,7 @@ namespace Cairo {
                public Pattern GetSource ()
                {
                        var ptr = NativeMethods.cairo_get_source (handle);
-                       return Cairo.Pattern.Lookup (ptr, false);
+                       return Crow.Cairo.Pattern.Lookup (ptr, false);
                }
 
                public double MiterLimit {
@@ -275,7 +275,7 @@ namespace Cairo {
                }
 
                [Obsolete ("Use GetTarget/SetTarget")]
-               public Cairo.Surface Target {
+               public Crow.Cairo.Surface Target {
                        set {
                                if (handle != IntPtr.Zero)
                                        NativeMethods.cairo_destroy (handle);
@@ -819,7 +819,7 @@ namespace Cairo {
 
                public FontFace GetContextFontFace ()
                {
-                       return Cairo.FontFace.Lookup (NativeMethods.cairo_get_font_face (handle), false);
+                       return Crow.Cairo.FontFace.Lookup (NativeMethods.cairo_get_font_face (handle), false);
                }
 
                public void SetContextFontFace (FontFace value)
index a03195fbfc7ea2503e54c37dacfd5963e6433047..05e142cbcddcf557907bbd3c27af5a50154cbec6 100644 (file)
@@ -29,7 +29,7 @@
 //
 using System;
 
-namespace Cairo
+namespace Crow.Cairo
 {
        public class DRMDevice : Device
        {
index 248541c70e037d1c356c47173b53e1fcf69ff500..f624967facd71a3cdb2b2fbf6e26ebdc6805266c 100644 (file)
@@ -30,7 +30,7 @@
 
 using System;
 
-namespace Cairo {
+namespace Crow.Cairo {
 
        public class DRMSurface : Surface
        {
index a5452f9d660b3061de158120ef5cee5ebf6e85c0..dc9910cbde3f66e6ee71ad6b5ed2f3db94b5e2f5 100644 (file)
@@ -29,7 +29,7 @@
 //
 using System;
 
-namespace Cairo
+namespace Crow.Cairo
 {
        public class Device : IDisposable
        {
index afa57b7dff1f4b210e4d353c3227b28569dda0ef..64431574854e3996cbd4f24858345663292db2ff 100644 (file)
@@ -28,7 +28,7 @@
 
 using System;
 
-namespace Cairo {
+namespace Crow.Cairo {
        public class DirectFBSurface : Surface
        {
                internal DirectFBSurface (IntPtr handle, bool owns) : base (handle, owns)
index 7cba3729ceae93fbcf228d46a307b9ae3adcbe70..d716ab1f87148872d23f3087222f687b20aa3c61 100644 (file)
@@ -34,7 +34,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-namespace Cairo {
+namespace Crow.Cairo {
 
        public struct Distance
        {
index 45c988a3849fc34bb10da9296761417306276820..44590c70932f735f6fd8c80762d680ee795e748f 100644 (file)
@@ -29,7 +29,7 @@
 //
 using System;
 
-namespace Cairo
+namespace Crow.Cairo
 {
        public class EGLDevice : Device
        {
index 1135c2ff3c917b84d3bab835a179e4b91e6fff48..4af536dce6a14f599edfdf2bf8e262169e397355 100644 (file)
@@ -32,7 +32,7 @@
 
 using System;
 
-namespace Cairo
+namespace Crow.Cairo
 {
        
        public enum Extend
index 24cbfba2b4065da8ca1916fedc8124497c9db00f..80f61ed5d7f67836d868991a2e386e68029a97d5 100644 (file)
@@ -30,7 +30,7 @@
 
 using System;
 
-namespace Cairo
+namespace Crow.Cairo
 {
        
        public enum FillRule
index 2355fbb313b51030986e07d7c736a27a119640a2..a73ea58df6666c980e7a1e933c0a00e6e4a5f9b3 100644 (file)
@@ -30,7 +30,7 @@
 
 using System;
 
-namespace Cairo
+namespace Crow.Cairo
 {
        
        public enum Filter
index 76c7e658d5d24a9a2f17c6de588b37a09e89239a..ea26d9bb8d3f518cb5f4fdcfbeefa049a0cf3d87 100644 (file)
@@ -34,7 +34,7 @@
 using System;
 using System.Runtime.InteropServices;
 
-namespace Cairo
+namespace Crow.Cairo
 {
        [StructLayout (LayoutKind.Sequential)]
        public struct FontExtents
index 19d8163c35fea4f0f8b9d17db74b6158d01a2f21..64c428e2739167b8fea92d0a7fae916c0f001d90 100644 (file)
@@ -32,7 +32,7 @@
 //
 using System;
 
-namespace Cairo
+namespace Crow.Cairo
 {
        public class FontFace : IDisposable
        {
index 5269d54dfac2ca504e8a29cf3c883292292fed00..f90a3a4d792e98d83bb7e22c0261db485f681bb6 100644 (file)
@@ -28,7 +28,7 @@
 
 using System;
 
-namespace Cairo
+namespace Crow.Cairo
 {
        public class FontOptions : IDisposable
        {
index b7a5684cddfdca3e944e28d48738f2ecd9745dc3..b3d8a1a201309d677a7d4ac819cb7df7a74b7fa9 100644 (file)
@@ -30,7 +30,7 @@
 
 using System;
 
-namespace Cairo
+namespace Crow.Cairo
 {
        
        public enum FontSlant
index e9fd263a4fc505d826e48b112e34d543238c7b4d..5db44d4eec4683f7415989e0d4b0bbc6c2da15b5 100644 (file)
@@ -28,7 +28,7 @@
 
 using System;
 
-namespace Cairo {
+namespace Crow.Cairo {
 
        
        public enum FontType
index 5b7810957ab5898f5bddc96f3ea46627615470f1..0b8fc6a80842d789f143e0fdc4a20a3205172482 100644 (file)
@@ -30,7 +30,7 @@
 
 using System;
 
-namespace Cairo
+namespace Crow.Cairo
 {
        
        public enum FontWeight
index 96e9a0f577f47fe5371530014d5e405287a23769..54c8be1e4dedfec7c6cb89114ade2e8089f04254 100644 (file)
@@ -29,7 +29,7 @@
 
 using System;
 
-namespace Cairo
+namespace Crow.Cairo
 {
        
        public enum Format
index 9486c9cd13cd5975f37b79c802b5d3fef153843a..179012a41d291b6560416a404a81b1c9718328b9 100644 (file)
@@ -30,7 +30,7 @@
 
 using System;
 
-namespace Cairo {
+namespace Crow.Cairo {
 
        public class GLSurface : Surface
        {
@@ -38,7 +38,7 @@ namespace Cairo {
                public GLSurface (IntPtr ptr, bool own) : base (ptr, own)
                {}
 
-               public GLSurface (Device device, Cairo.Content content, uint tex, int width, int height)
+               public GLSurface (Device device, Crow.Cairo.Content content, uint tex, int width, int height)
                        : base (NativeMethods.cairo_gl_surface_create_for_texture (device.Handle, (uint)content, tex, width, height), true)
                {}
 
index 189872a26ba379cf11d12990e76563b7e9a5a405..00cbce1feefc7a9eabb3aa5252509e6a98c179de 100644 (file)
@@ -29,7 +29,7 @@
 //
 using System;
 
-namespace Cairo
+namespace Crow.Cairo
 {
        public class GLXDevice : Device
        {
index 6da1ac6a934e78424b20d4f1fadf55eb6b6c59df..4aa249830a6f6b579249abc293c1e1283057fb63 100644 (file)
@@ -28,7 +28,7 @@
 
 using System;
 
-namespace Cairo {
+namespace Crow.Cairo {
        public class GlitzSurface : Surface
        {
                internal GlitzSurface (IntPtr handle, bool owns) : base (handle, owns)
index ec9c2ff38a6707c3dfedcd7bf9b163704fe12d7e..ad5115621dbbcba0a67737cbcb359aee7523df27 100644 (file)
@@ -30,7 +30,7 @@
 using System;
 using System.Runtime.InteropServices;
 
-namespace Cairo
+namespace Crow.Cairo
 {
        [StructLayout(LayoutKind.Sequential)]
        public struct Glyph
index c7bc53c6f958e2bbf691e335506e7b6bdad18e08..427cc053beea2dc766bc0109fbb8ab87283f3b4d 100644 (file)
@@ -29,7 +29,7 @@
 
 using System;
 using Color = Crow.Color;
-namespace Cairo {
+namespace Crow.Cairo {
 
        public class Gradient : Pattern
        {
index 3bf01d23da661380150b998a09a60b09dfe76d83..d830f3ebdfd0213d17320c3bee762800050b632c 100644 (file)
@@ -29,7 +29,7 @@
 
 using System;
 
-namespace Cairo
+namespace Crow.Cairo
 {
        
        public enum HintMetrics
index b8cca97469a673c0a72030c08f20a3bdf85b9f85..343daf3e0bfbd516ecef77555fc9718ce19f5d2d 100644 (file)
@@ -29,7 +29,7 @@
 
 using System;
 
-namespace Cairo
+namespace Crow.Cairo
 {
        
        public enum HintStyle
index 98143fe8e22543efeda94ddba4631f6ea29b1efd..1737fe1a33fdb45692defbbd013734c04b054628 100644 (file)
@@ -35,7 +35,7 @@
 using System;
 using System.Runtime.InteropServices;
 
-namespace Cairo {
+namespace Crow.Cairo {
 
        public class ImageSurface : Surface
        {
@@ -49,7 +49,7 @@ namespace Cairo {
                }
 
                [Obsolete ("Use ImageSurface (byte[] data, Cairo.Format format, int width, int height, int stride)")]
-               public ImageSurface (ref byte[] data, Cairo.Format format, int width, int height, int stride)
+               public ImageSurface (ref byte[] data, Crow.Cairo.Format format, int width, int height, int stride)
                        : this (data, format, width, height, stride)
                {
                }
index 46938c25bf4020d9bd746f28b5c6a2d19ffbbb8e..1560cda4c93a76f7eb5bccdba1bc0eb5c6225790 100644 (file)
@@ -29,7 +29,7 @@
 
 using System;
 
-namespace Cairo
+namespace Crow.Cairo
 {
        
        public enum LineCap
index b5c241b0b1fe42fa615eaeccee6c24374145690b..1d5389b56eb8293337634b94e6c52a6d41b3048c 100644 (file)
@@ -29,7 +29,7 @@
 
 using System;
 
-namespace Cairo
+namespace Crow.Cairo
 {
        
        public enum LineJoin
index 85fdea84a2c53c4252576db7c424c7532b6d3d54..100d1e6d0da3acad7ecade98508e0449acdbb760 100644 (file)
@@ -29,7 +29,7 @@
 
 using System;
 
-namespace Cairo {
+namespace Crow.Cairo {
 
        public class LinearGradient : Gradient
        {
index 12f0cb92977217f0862544dcc8bd2c14ae2c28ba..9c30845c3c6633b6495fb956d987e8d8c6bbb65d 100644 (file)
@@ -34,7 +34,7 @@
 using System;
 using System.Runtime.InteropServices;
 
-namespace Cairo {
+namespace Crow.Cairo {
 
        [StructLayout(LayoutKind.Sequential)]
        public class Matrix //: ICloneable
@@ -114,7 +114,7 @@ namespace Cairo {
                        NativeMethods.cairo_matrix_rotate (this, radians);
                }
 
-               public Cairo.Status Invert ()
+               public Crow.Cairo.Status Invert ()
                {
                        return NativeMethods.cairo_matrix_invert (this);
                }
index b14c709bbb6134bdbc0b036a1f2cbc2a698a0562..96bc3c858caf594f862889f60e3a4bc11a786800 100644 (file)
@@ -29,7 +29,7 @@
 
 using System;
 
-namespace Cairo {
+namespace Crow.Cairo {
 
        public class MeshPattern : Pattern
        {
index 8ed90290cf9ceab521ffc61f0269c6065cb50e9a..5c4dfcf798be558e95781eb1ed2c165562f08cb5 100644 (file)
@@ -34,7 +34,7 @@
 using System;
 using System.Runtime.InteropServices;
 
-namespace Cairo
+namespace Crow.Cairo
 {
        // sort the functions like in the following page so it is easier to find what is missing
        // http://cairographics.org/manual/index-all.html
@@ -270,13 +270,13 @@ namespace Cairo
 
                #region Image Surface
                [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
-               internal static extern IntPtr cairo_image_surface_create (Cairo.Format format, int width, int height);
+               internal static extern IntPtr cairo_image_surface_create (Crow.Cairo.Format format, int width, int height);
 
                [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
-               internal static extern IntPtr cairo_image_surface_create_for_data (byte[] data, Cairo.Format format, int width, int height, int stride);
+               internal static extern IntPtr cairo_image_surface_create_for_data (byte[] data, Crow.Cairo.Format format, int width, int height, int stride);
 
                [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
-               internal static extern IntPtr cairo_image_surface_create_for_data (IntPtr data, Cairo.Format format, int width, int height, int stride);
+               internal static extern IntPtr cairo_image_surface_create_for_data (IntPtr data, Crow.Cairo.Format format, int width, int height, int stride);
 
                [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
                internal static extern IntPtr cairo_image_surface_create_from_png  (string filename);
@@ -698,7 +698,7 @@ namespace Cairo
                internal static extern int cairo_get_dash_count (IntPtr cr);
 
                [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
-               internal static extern void cairo_set_fill_rule (IntPtr cr, Cairo.FillRule fill_rule);
+               internal static extern void cairo_set_fill_rule (IntPtr cr, Crow.Cairo.FillRule fill_rule);
 
                [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
                internal static extern void cairo_set_font_face (IntPtr cr, IntPtr fontFace);
@@ -728,7 +728,7 @@ namespace Cairo
                internal static extern void cairo_set_miter_limit (IntPtr cr, double limit);
 
                [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
-               internal static extern void cairo_set_operator (IntPtr cr, Cairo.Operator op);
+               internal static extern void cairo_set_operator (IntPtr cr, Crow.Cairo.Operator op);
 
                [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
                internal static extern void cairo_set_source (IntPtr cr, IntPtr pattern);
@@ -777,7 +777,7 @@ namespace Cairo
 
                #region Surface
                [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
-               internal static extern IntPtr cairo_surface_create_similar (IntPtr surface, Cairo.Content content, int width, int height);
+               internal static extern IntPtr cairo_surface_create_similar (IntPtr surface, Crow.Cairo.Content content, int width, int height);
 
                [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
                internal static extern void cairo_surface_destroy (IntPtr surface);
index f233a25f195af292e5fccbb52f3678cc8c47b5ce..1c11cccc3fc456121929537f157f82ece92a22e8 100644 (file)
@@ -31,7 +31,7 @@
 
 using System;
 
-namespace Cairo
+namespace Crow.Cairo
 {
        
        public enum Operator
index 9d6b73be68996272d7251ab88e8189288070bf56..cf90794e68e71f47fdd5d87ebe536a1c38c39dec 100644 (file)
@@ -28,7 +28,7 @@
 
 using System;
 
-namespace Cairo {
+namespace Crow.Cairo {
 
        public class PSSurface : Surface
        {
index 184c606cf3470b851e09c0c51de29ea8f7972d95..a55f03b073c5d189286755dc6c79a6fe4c11a9e1 100644 (file)
@@ -30,9 +30,9 @@
 
 using System;
 using System.Runtime.InteropServices;
-using Cairo;
+using Crow.Cairo;
 
-namespace Cairo {
+namespace Crow.Cairo {
 
        public class Path : IDisposable
        {
index bc0a962a218d59d5ff42a45289a56e7c2f5c8f40..3e933a19c0bddfc7745b1c8d021bd31e66018aa2 100644 (file)
@@ -30,7 +30,7 @@
 using System;
 using System.Collections;
 
-namespace Cairo {
+namespace Crow.Cairo {
    
        public class Pattern : IDisposable
        {
index f9b9523a0ab07ab351fd6e86f4978f083573a161..deac3ab7b707e1af58796b035c409ab6c5677442 100644 (file)
@@ -28,7 +28,7 @@
 
 using System;
 
-namespace Cairo {
+namespace Crow.Cairo {
 
        
        public enum PatternType
index c980f249ed06ae2626cb83c9e565498d11b82fbc..09a2d12688c6698e9b3b367e8cb027770763012e 100644 (file)
@@ -28,7 +28,7 @@
 
 using System;
 
-namespace Cairo {
+namespace Crow.Cairo {
 
        public class PdfSurface : Surface
        {
index e72ca6c529ce690000e7b403b0bfeccfaaf108df..cf07f31185fc8e4022f0b6a8c0c12ba632260f81 100644 (file)
@@ -34,7 +34,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-namespace Cairo {
+namespace Crow.Cairo {
        public struct Point
        {
                public Point (int x, int y)
index c2e3587d1f78ff10c394a54fab5881e692c9500d..8bc019c9f5d7c3f7070ef891e0fd132c3bd0b846 100644 (file)
@@ -34,7 +34,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-namespace Cairo {
+namespace Crow.Cairo {
 
        public struct PointD
        {
index 6422e00d6e4e778219c400072ba8cf5136353185..6abe2671f6098f68a0ca101ee33c9e19b74a5cdd 100644 (file)
@@ -29,7 +29,7 @@
 
 using System;
 
-namespace Cairo {
+namespace Crow.Cairo {
 
        public class RadialGradient : Gradient
        {
index 4a82842ae5c05743f13c7fca1029cd5539dda311..5e8d8d607e75bdc431ee6c5d536c10a4b6ca6d03 100644 (file)
@@ -23,7 +23,7 @@
 using System;
 using System.Runtime.InteropServices;
 
-namespace Cairo
+namespace Crow.Cairo
 {
        [StructLayout(LayoutKind.Sequential)]
        public struct RectangleList {
index 937194607af414e35fbb5ee6a0b80b02a7949c07..594d1be9dc07f1c5ad5ba5ca4f3be87a3b209b94 100644 (file)
@@ -26,7 +26,7 @@
 using System;
 using System.Runtime.InteropServices;
 
-namespace Cairo {
+namespace Crow.Cairo {
    
        public class ScaledFont : IDisposable
        {
index 37864e5b8f1c40960b7d813c94b39ff969be4c52..6cd89f85328b9e84afb058787639821fd625b036 100644 (file)
@@ -29,7 +29,7 @@
 
 using System;
 using Color = Crow.Color;
-namespace Cairo {
+namespace Crow.Cairo {
 
        public class SolidPattern : Pattern
        {
index 54b2fec3ba829eace2d9579ea5148970f8c86450..2df15580148bfa2d0a5e0c45a2789caf48637bd6 100644 (file)
@@ -32,7 +32,7 @@
 
 using System;
 
-namespace Cairo
+namespace Crow.Cairo
 {
        
        public enum Status
index 3c3a336227ad720d610460f3c8c2ec98313a69c1..95f3cbee00053f9aec17f96dc18cd51f1d05f7b8 100644 (file)
@@ -28,7 +28,7 @@
 
 using System;
 
-namespace Cairo
+namespace Crow.Cairo
 {
        
        public enum SubpixelOrder
index 14f4a2b147852029dc00e4d6543bcb9976015f20..88ebb107191431384864d253dd28c6330fc46720 100644 (file)
@@ -36,7 +36,7 @@
 using System;
 using System.Collections;
 
-namespace Cairo {
+namespace Crow.Cairo {
 
        public class Surface : IDisposable
        {
@@ -91,28 +91,28 @@ namespace Cairo {
                }
 
                [Obsolete ("Use an ImageSurface constructor instead.")]
-               public static Cairo.Surface CreateForImage (
-                       ref byte[] data, Cairo.Format format, int width, int height, int stride)
+               public static Crow.Cairo.Surface CreateForImage (
+                       ref byte[] data, Crow.Cairo.Format format, int width, int height, int stride)
                {
                        IntPtr p = NativeMethods.cairo_image_surface_create_for_data (
                                data, format, width, height, stride);
 
-                       return new Cairo.Surface (p, true);
+                       return new Crow.Cairo.Surface (p, true);
                }
 
                [Obsolete ("Use an ImageSurface constructor instead.")]
-               public static Cairo.Surface CreateForImage (
-                       Cairo.Format format, int width, int height)
+               public static Crow.Cairo.Surface CreateForImage (
+                       Crow.Cairo.Format format, int width, int height)
                {
                        IntPtr p = NativeMethods.cairo_image_surface_create (
                                format, width, height);
 
-                       return new Cairo.Surface (p, true);
+                       return new Crow.Cairo.Surface (p, true);
                }
 
 
-               public Cairo.Surface CreateSimilar (
-                       Cairo.Content content, int width, int height)
+               public Crow.Cairo.Surface CreateSimilar (
+                       Crow.Cairo.Content content, int width, int height)
                {
                        IntPtr p = NativeMethods.cairo_surface_create_similar (
                                this.Handle, content, width, height);
index 4422b11d41dc899da6aa8edfa5a31fcd8ca23e55..53a90d384ac06d9da1686bf59eedaf858214b3e6 100644 (file)
@@ -29,7 +29,7 @@
 
 using System;
 
-namespace Cairo {
+namespace Crow.Cairo {
 
        public class SurfacePattern : Pattern
        {
index b0b659c6221fc57c92ffe99bb641a06a980d67a4..bd992db0ccfdfe4f732b489c490ba214a5b8c3e9 100644 (file)
@@ -28,7 +28,7 @@
 
 using System;
 
-namespace Cairo {
+namespace Crow.Cairo {
 
        
        public enum SurfaceType
index 418295011fde1c26a144ab920ab513b634844902..c7d72988065bcdcc5729e27eda7bf9523aca60c6 100644 (file)
@@ -28,7 +28,7 @@
 
 using System;
 
-namespace Cairo {
+namespace Crow.Cairo {
 
        public class SvgSurface : Surface
        {
index 7f0f4620f3a7b5904a51e759e5a03d85fa984d5a..916fb86129542349de201d383218d80d157210d6 100644 (file)
@@ -28,7 +28,7 @@
 
 using System;
 
-namespace Cairo {
+namespace Crow.Cairo {
 
        
        public enum SvgVersion
index f9cd560f39ba7a7dae1c572ee3ee0a58af474b2f..965ca046b2e2b38eb3d362ea447e290ffc0d76b3 100644 (file)
@@ -31,7 +31,7 @@
 using System;
 using System.Runtime.InteropServices;
 
-namespace Cairo
+namespace Crow.Cairo
 {
        [StructLayout (LayoutKind.Sequential)]
        public struct TextExtents
index 03f7e3a49870f3512c436a32afdade600e4424a5..308cfadd055461eef10bd11d9d1222fdb6de00b9 100644 (file)
@@ -29,7 +29,7 @@
 //
 using System;
 
-namespace Cairo
+namespace Crow.Cairo
 {
        public class WGLDevice : Device
        {
index dd244286dff508a90832ea9ac88cd2aaa1afe99c..4776a19bfd1d02f4ebb38c1cd26a3a41bb2d6f6c 100644 (file)
@@ -28,7 +28,7 @@
 
 using System;
 
-namespace Cairo {
+namespace Crow.Cairo {
        
        public class Win32Surface : Surface
        {
index 340b0fae99f391685a5f2b11420c6a7cc05cce95..32a6784823e91e923f2a99ecf307fa1c14123c46 100644 (file)
@@ -28,7 +28,7 @@
 
 using System;
 
-namespace Cairo {
+namespace Crow.Cairo {
        public class XcbSurface : Surface
        {
                internal XcbSurface (IntPtr handle, bool owns) : base (handle, owns)
index c0003a491e61f3afafefcbb4ebbfb025a1052f75..186024e9b7106c849fee2c4b2a6cacf52b02edab 100644 (file)
@@ -34,7 +34,7 @@
 
 using System;
 
-namespace Cairo {
+namespace Crow.Cairo {
 
        public class XlibSurface : Surface
        {
index f2f45261874ccdcf93f176fbb9303c8e3f1f526c..133bc4efb834eac7fe5ab892aab88d4aeaad21da 100644 (file)
@@ -26,7 +26,7 @@
 
 using System;
 using System.IO;
-using Cairo;
+using Crow.Cairo;
 using System.Collections.Generic;
 
 namespace Crow
index 08dd4436b9f1adc72a6ce3726265ccce7540af64..de9df7c8d672db12a5411ce1b9c2388370cbcdc2 100644 (file)
@@ -58,13 +58,13 @@ namespace Crow
                public double LengthD {
                        get { return Math.Sqrt (Math.Pow (_x, 2) + Math.Pow (_y, 2)); }
                }
-        public static implicit operator Cairo.Point(Point p)
+        public static implicit operator Crow.Cairo.Point(Point p)
         {
-            return new Cairo.Point(p.X, p.Y);
+            return new Crow.Cairo.Point(p.X, p.Y);
         }
-        public static implicit operator Cairo.PointD(Point p)
+        public static implicit operator Crow.Cairo.PointD(Point p)
         {
-            return new Cairo.PointD(p.X, p.Y);
+            return new Crow.Cairo.PointD(p.X, p.Y);
         }
         public static implicit operator Point(int i)
         {
index d6423d318ad8259bd60a026f6dbc03abd66409bc..f14c7cf72ddf2b0346b4dc7da7146626631dcf80 100644 (file)
@@ -31,7 +31,7 @@ using System.Text;
 using System.Xml.Serialization;
 using System.Reflection;
 using System.Diagnostics;
-using Cairo;
+using Crow.Cairo;
 
 
 
index dee6c8e0f2d480ff9a09eaeabd0216891465d1da..33f689559ed2cd63756c63ed9d9cc23288b4af38 100644 (file)
@@ -26,7 +26,7 @@
 
 using System;
 using System.IO;
-using Cairo;
+using Crow.Cairo;
 
 namespace Crow
 {
index 3275205e17f180942fec57b5ef6e8641815e25e1..f33dd8f819fc4e02273bd3e3821d1de1f2fa723c 100644 (file)
@@ -27,6 +27,22 @@ using System;
 
 namespace Crow
 {
+       public enum MouseCursors
+       {
+               Default,
+               Cross,
+               Arrow,
+               Text,
+               SW,
+               SE,
+               NW,
+               NE,
+               N,
+               S,
+               V,
+               H,
+               MaxEnum,
+       }
        public interface IBackend
        {
                void Init(Interface iFace);
@@ -34,6 +50,9 @@ namespace Crow
                void Flush();
                void ProcessEvents();
 
+               void SetCursor (MouseCursors newCur);
+               void SetCursorPosition (int x, int y);
+
                bool IsDown (Key key);
                bool Shift { get; }
                bool Ctrl { get; }
old mode 100755 (executable)
new mode 100644 (file)
index 183adc1..66157fe
@@ -105,7 +105,7 @@ namespace Crow.Win32
             User32.Window.ShowWindow(handle, ShowWindowCommand.Show);
 
             hdc = User32.Window.GetDC(handle);
-            iFace.surf = new Cairo.Win32Surface(hdc);
+            iFace.surf = new Crow.Cairo.Win32Surface(hdc);
 
         }
 
@@ -464,6 +464,15 @@ namespace Crow.Win32
             return User32.Window.DefWindowProc(handle, message, wParam, lParam);
         }
 
-    }
+               public void SetCursor (MouseCursors newCur)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public void SetCursorPosition (int x, int y)
+               {
+                       throw new NotImplementedException ();
+               }
+       }
 }
 
index 93a9be637d2940528d3d08434497d2b8f35bc399..51ea91bde9a527017d764373e4483ab81ef34cdd 100644 (file)
@@ -419,7 +419,7 @@ namespace Crow.XCB
 
                        loadCursors (); 
 
-                       iFace.surf = new Cairo.XcbSurface (conn, win, visual, iFace.ClientRectangle.Width, iFace.ClientRectangle.Height);
+                       iFace.surf = new Crow.Cairo.XcbSurface (conn, win, visual, iFace.ClientRectangle.Width, iFace.ClientRectangle.Height);
                }
 
                public void CleanUp ()
@@ -514,6 +514,15 @@ namespace Crow.XCB
                        return IntPtr.Zero;
                }
 
+               public void SetCursor (MouseCursors newCur)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public void SetCursorPosition (int x, int y)
+               {
+                       throw new NotImplementedException ();
+               }
        }
 }
 
index 111296e3f4a002c2f8f99a559c28a5ca2df95969..9271144f19915e4156ca0ac28121a5cbe3308649 100644 (file)
@@ -32,43 +32,60 @@ namespace Crow.XLib
        public class XLibBackend : IBackend
        {
                #region pinvoke
-               [DllImportAttribute("X11")]
+               [DllImport("X11")]
                static extern int XInitThreads();
-               [DllImportAttribute("X11")]
+               [DllImport("X11")]
                internal static extern IntPtr XOpenDisplay(IntPtr displayName);
-               [DllImportAttribute("X11")]
+               [DllImport("X11")]
                internal static extern IntPtr XCloseDisplay(IntPtr disp);
-               [DllImportAttribute("X11")]
+               [DllImport("X11")]
                static extern Int32 XDefaultScreen(IntPtr disp);
-               [DllImportAttribute("X11")]
+               [DllImport("X11")]
                static extern IntPtr XDefaultRootWindow(IntPtr disp);
-               [DllImportAttribute("X11")]
+               [DllImport("X11")]
                static extern UInt32 XDefaultDepth (IntPtr disp, Int32 screen);
-               [DllImportAttribute("X11")]
+               [DllImport("X11")]
                static extern IntPtr XDefaultVisual(IntPtr disp, Int32 screen);
-               [DllImportAttribute("X11")]
+               [DllImport("X11")]
                static extern IntPtr XCreateSimpleWindow(IntPtr disp, IntPtr rootWindow, Int32 x, Int32 y, UInt32 width, UInt32 height,
                        UInt32 borderWidth, IntPtr border, IntPtr background);
-               [DllImportAttribute("X11")]
+               [DllImport("X11")]
                static extern IntPtr XCreatePixmap(IntPtr disp, IntPtr rootWindow, UInt32 width, UInt32 height, UInt32 depth);
-               [DllImportAttribute("X11")]
+               [DllImport("X11")]
                static extern IntPtr XFreePixmap(IntPtr disp, IntPtr pixmap);
-               [DllImportAttribute("X11")]
+               [DllImport("X11")]
                static extern IntPtr XFree(IntPtr data);
-               [DllImportAttribute("X11")]
+               [DllImport("X11")]
                static extern Int32 XSelectInput(IntPtr disp, IntPtr win, EventMask eventMask);
-               [DllImportAttribute("X11")]
+               [DllImport("X11")]
                static extern Int32 XMapWindow(IntPtr disp, IntPtr win);
-               [DllImportAttribute("X11")]
+               [DllImport("X11")]
                static extern int XPending (IntPtr disp);
-               [DllImportAttribute("X11")]
+               [DllImport("X11")]
                static extern IntPtr XNextEvent(IntPtr disp, ref XEvent xevent);
-               [DllImportAttribute("X11")]
+               [DllImport("X11")]
                static extern Int32 XSync(IntPtr disp, int discard);
-               [DllImportAttribute("X11")]
+               [DllImport("X11")]
                static extern int XConnectionNumber(IntPtr disp);
-               [DllImportAttribute("X11")]
+               [DllImport("X11")]
                static extern IntPtr XSetErrorHandler(XErrorHandler error_handler);
+               [DllImport ("X11")]
+               static extern int XDefineCursor (IntPtr disp, IntPtr wnd, IntPtr cursor);
+
+               [DllImport ("X11")]
+               static extern uint XWarpPointer (IntPtr disp, IntPtr src_w, IntPtr dest_w, int src_x, int src_y, uint src_width, uint src_height, int dest_x, int dest_y);
+
+               [DllImport ("libXcursor.so.1")]
+               static extern int XcursorGetDefaultSize (IntPtr dpy);
+               [DllImport ("libXcursor.so.1")]
+               static extern string XcursorGetTheme (IntPtr dpy);
+               [DllImport ("libXcursor.so.1")]
+               static extern IntPtr XcursorLibraryLoadImage (string name, string theme, int size);
+               [DllImport ("libXcursor.so.1")]
+               static extern void XcursorImageDestroy (IntPtr image);
+
+               [DllImport ("libXcursor.so.1")]
+               static extern IntPtr XcursorImageLoadCursor (IntPtr dpy, IntPtr image);
 
                #endregion
 
@@ -80,6 +97,8 @@ namespace Crow.XLib
                Interface iFace;
                X11Keyboard keyboard;
 
+               IntPtr [] cursors = new IntPtr [(int)MouseCursors.MaxEnum];
+
                #region IBackend implementation
 
                public void Init (Interface _iFace)
@@ -109,10 +128,12 @@ namespace Crow.XLib
 
                        keyboard = new Crow.XLib.X11Keyboard (xDisp);
 
-                       iFace.surf = new Cairo.XlibSurface (xDisp, xwinHnd, xDefaultVisual, iFace.ClientRectangle.Width, iFace.ClientRectangle.Height);
+                       iFace.surf = new Crow.Cairo.XlibSurface (xDisp, xwinHnd, xDefaultVisual, iFace.ClientRectangle.Width, iFace.ClientRectangle.Height);
 
                        errorHnd = new XErrorHandler (HandleError);
                        XSetErrorHandler (errorHnd);
+
+                       loadCursors ();
                }
 
                public void CleanUp ()
@@ -122,7 +143,7 @@ namespace Crow.XLib
                        XCloseDisplay (xDisp);
                }
                public void Flush () {
-                       XSync (xDisp, 0);
+                       XSync (xDisp, 1);
                }
                public void ProcessEvents ()
                {
@@ -169,20 +190,50 @@ namespace Crow.XLib
                                throw new NotImplementedException ();
                        }
                }
-
                public bool Ctrl {
                        get {
                                throw new NotImplementedException ();
                        }
                }
-
                public bool Alt {
                        get {
                                throw new NotImplementedException ();
                        }
                }
+               public void SetCursor (MouseCursors newCur)
+               {
+                       XDefineCursor (xDisp, xwinHnd, cursors[(int)newCur]);
+                       XSync (xDisp, 0);
+               }
+               public void SetCursorPosition (int x, int y)
+               {
+                       XWarpPointer (xDisp, IntPtr.Zero, xwinHnd, 0, 0, 0, 0, x, y);
+               }
                #endregion
 
+               void loadCursor (MouseCursors id, string name)
+               {
+                       IntPtr img = XcursorLibraryLoadImage (name, null, XcursorGetDefaultSize (xDisp));
+                       cursors[(int)id] = XcursorImageLoadCursor (xDisp, img);
+                       XcursorImageDestroy (img);
+               }
+
+               void loadCursors ()
+               {
+                       loadCursor (MouseCursors.Default, "default");
+                       loadCursor (MouseCursors.Cross, "cross");
+                       loadCursor (MouseCursors.Arrow, "arrow");
+                       loadCursor (MouseCursors.Text, "text");
+                       loadCursor (MouseCursors.SW, "bottom_left_corner");
+                       loadCursor (MouseCursors.SE, "bottom_right_corner");
+                       loadCursor (MouseCursors.NW, "top_left_corner");
+                       loadCursor (MouseCursors.NE, "top_right_corner");
+                       loadCursor (MouseCursors.N, "top_side");
+                       loadCursor (MouseCursors.S, "bottom_side");
+                       loadCursor (MouseCursors.V, "size_ver");
+                       loadCursor (MouseCursors.H, "size_hor");
+               }
+
                int HandleError (IntPtr display, ref XErrorEvent error_event)
                {
                        /*if (ErrorExceptions)
@@ -198,6 +249,8 @@ namespace Crow.XLib
                        Debug.WriteLine ("XERROR {0}", error_event.error_code);
                        return 0;
                }
+
+
        }
 }
 
index e0881182b8c827127525ad9b05e36e1a627c2b27..1936704ebf9b602d96cc711affd7bb244eb35bc1 100644 (file)
@@ -24,7 +24,7 @@
 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 // THE SOFTWARE.
 using System;
-using Cairo;
+using Crow.Cairo;
 using System.Linq;
 
 namespace Crow
index c10cfdf60c2e34eb7caa5254347af2fdec0c2c35..4ff6082e1c098016819af90b6c6218ab7ee179f7 100644 (file)
@@ -27,7 +27,7 @@ using System;
 using System.Collections.Generic;
 using System.IO;
 using System.Linq;
-using Cairo;
+using Crow.Cairo;
 
 #if DEBUG_LOG
 namespace Crow
index 38cbc2afe345a65fd7f7bad3b3c2198c61a72569..f1eaf9c8f1a56118de97811661b6e660ddcfba81 100644 (file)
@@ -24,7 +24,7 @@
 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 // THE SOFTWARE.
 using System;
-using Cairo;
+using Crow.Cairo;
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.IO;
index e13f79ad57f4ae65d5625272f93326b171e97d54..bab0584e8746935b4054fcfaf44a47e28b082c48 100644 (file)
@@ -1,5 +1,5 @@
 //Copyright GPL2
-using Cairo;
+using Crow.Cairo;
 
 
 namespace Rsvg {
@@ -108,7 +108,7 @@ namespace Rsvg {
                [DllImport("rsvg-2")]
                static extern void rsvg_handle_render_cairo_sub(IntPtr raw, IntPtr cr, string id);
 
-               public void RenderCairoSub(Cairo.Context cr, string id) {
+               public void RenderCairoSub(Crow.Cairo.Context cr, string id) {
                        rsvg_handle_render_cairo_sub(Raw, cr == null ? IntPtr.Zero : cr.Handle, id);
                }
 
index ae9af80cc3fc7aec958a86df372b158f61a13796..6d2f8b5b7c2c225e97121fa3b76a4904ebb11762 100644 (file)
@@ -30,7 +30,7 @@ using System.Threading;
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.IO;
-using Cairo;
+using Crow.Cairo;
 
 namespace Crow.Coding
 {
index 214594067d2d5b83a9e83561d0e1eda58a4d091e..7761263b7b0207d780fd4a06ed26eaaac59f1379 100644 (file)
@@ -28,7 +28,7 @@ using System;
 using System.Xml.Serialization;
 using System.ComponentModel;
 using System.Collections;
-using Cairo;
+using Crow.Cairo;
 using System.Text;
 using System.Collections.Generic;
 using System.Text.RegularExpressions;
@@ -461,12 +461,12 @@ namespace Crow.Text
                public override void onMouseEnter (object sender, MouseMoveEventArgs e)
                {
                        base.onMouseEnter (sender, e);
-                       IFace.MouseCursor = XCursor.Text;
+                       IFace.MouseCursor = MouseCursors.Text;
                }
                public override void onMouseLeave (object sender, MouseMoveEventArgs e)
                {
                        base.onMouseLeave (sender, e);
-                       IFace.MouseCursor = XCursor.Default;
+                       IFace.MouseCursor = MouseCursors.Default;
                }
                public override void onMouseMove (object sender, MouseMoveEventArgs e)
                {
index 616d9a6b4a8c9aa4b480d03fa3cc5b4aad242cf5..ccfb21140224ab155d6bf365a0a2d508660dbe18 100644 (file)
@@ -29,7 +29,7 @@ using Crow.IML;
 using System.Text;
 using System.Xml;
 using System.Diagnostics;
-using Cairo;
+using Crow.Cairo;
 
 namespace Crow.Coding
 {
@@ -388,7 +388,7 @@ namespace Crow.Coding
 
                }
 
-               protected override void onDraw (Cairo.Context gr)
+               protected override void onDraw (Crow.Cairo.Context gr)
                {
                        base.onDraw (gr);
 
@@ -515,8 +515,8 @@ namespace Crow.Coding
                        double z = zoom / 100.0;
                        double coteW = 3, coteL = 5;
                        bool fill = true;
-                       Cairo.PointD p1 = new Cairo.PointD (hr.X + 0.5, hr.Y - space);
-                       Cairo.PointD p2 = new Cairo.PointD (hr.Right - 0.5, hr.Y - space);
+                       Crow.Cairo.PointD p1 = new Crow.Cairo.PointD (hr.X + 0.5, hr.Y - space);
+                       Crow.Cairo.PointD p2 = new Crow.Cairo.PointD (hr.Right - 0.5, hr.Y - space);
 
                        if (p1.Y < cb.Top) {
                                if (hr.Bottom > cb.Bottom - space)
@@ -536,8 +536,8 @@ namespace Crow.Coding
                                drawCenteredTextLine (gr, p1.Add(p2.Substract(p1).Divide (2)), g.Width.Value.ToString());
                        }
 
-                       p1 = new Cairo.PointD (hr.X - space, hr.Top + 0.5);
-                       p2 = new Cairo.PointD (hr.X - space, hr.Bottom - 0.5);
+                       p1 = new Crow.Cairo.PointD (hr.X - space, hr.Top + 0.5);
+                       p2 = new Crow.Cairo.PointD (hr.X - space, hr.Bottom - 0.5);
 
                        if (p1.X < cb.Left) {
                                if (hr.Right > cb.Right - space)
index d1e1ba8e40a1cd83e1e28d1527596540580ca65e..a85e2403e81746d3c388e346bb53aeaadceedebf 100644 (file)
@@ -28,7 +28,7 @@ using System;
 using System.Xml.Serialization;
 using System.ComponentModel;
 using System.Collections;
-using Cairo;
+using Crow.Cairo;
 using System.Text;
 using System.Collections.Generic;
 using System.Text.RegularExpressions;
@@ -926,14 +926,14 @@ namespace Crow.Coding
                {
                        base.onMouseEnter (sender, e);
                        if (e.X - ScreenCoordinates(Slot).X < leftMargin + ClientRectangle.X)
-                               IFace.MouseCursor = XCursor.Default;
+                               IFace.MouseCursor = MouseCursors.Default;
                        else
-                               IFace.MouseCursor = XCursor.Text;
+                               IFace.MouseCursor = MouseCursors.Text;
                }
                public override void onMouseLeave (object sender, MouseMoveEventArgs e)
                {
                        base.onMouseLeave (sender, e);
-                       IFace.MouseCursor = XCursor.Default;
+                       IFace.MouseCursor = MouseCursors.Default;
                }
                public override void onMouseMove (object sender, MouseMoveEventArgs e)
                {
@@ -945,9 +945,9 @@ namespace Crow.Coding
 
                        if (!e.Mouse.IsButtonDown (MouseButton.Left)) {
                                if (mouseLocalPos.X < leftMargin)
-                                       IFace.MouseCursor = XCursor.Default;
+                                       IFace.MouseCursor = MouseCursors.Default;
                                else
-                                       IFace.MouseCursor = XCursor.Text;
+                                       IFace.MouseCursor = MouseCursors.Text;
                                return;
                        }
 
index 163b5ac1e930b4d4c083bf08f75464bea925fc18..cac03669a1f344efbe0ffe7fa24ae3509ac0377b 100644 (file)
@@ -25,7 +25,7 @@
 // THE SOFTWARE.
 using System;
 using System.ComponentModel;
-using Cairo;
+using Crow.Cairo;
 
 namespace Crow.Coding
 {
index e5d620a642bd4011f3999aa24f7243243eee30fa..e996ce3edab10b7f0e247dab8ceb2bcb95d1c639 100644 (file)
@@ -24,7 +24,7 @@
 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 // THE SOFTWARE.
 using System;
-using Cairo;
+using Crow.Cairo;
 
 namespace Crow.Coding
 {
index bd6ad1448f47d58f254c78658f0160be951cd436..27d1e025e0674cc9ffe3e647a3d9190114343cb7 100644 (file)
@@ -25,7 +25,7 @@ using System.ComponentModel;
 using System.Reflection;
 using System.Collections.Generic;
 using System.Linq;
-using Cairo;
+using Crow.Cairo;
 
 namespace Crow.Coding
 {      
index 8644f81c5d0eaa28b6658a878bf8b3bdf1337395..d7bfe0c1a06d5da25293b055507e11c0202a768e 100644 (file)
@@ -34,7 +34,7 @@ namespace Crow.Coding
                {
                }
 
-               protected override void onDraw (Cairo.Context gr)
+               protected override void onDraw (Crow.Cairo.Context gr)
                {
                        base.onDraw (gr);
                        Foreground.SetAsSource (gr);
diff --git a/MDCrow/AddinInfo.cs b/MDCrow/AddinInfo.cs
new file mode 100644 (file)
index 0000000..331366c
--- /dev/null
@@ -0,0 +1,44 @@
+//
+// AddinInfo.cs
+//
+// Author:
+//       Mikayla Hutchinson <m.j.hutchinson@gmail.com>
+//
+// Copyright (c) 2017 Microsoft Corp.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+using System;
+using Mono.Addins;
+using Mono.Addins.Description;
+
+[assembly: Addin (
+       "MDCrow",
+       Namespace = "MonoDevelop",
+       Version = "1.0"
+)]
+
+[assembly: AddinName ("MDCrow")]
+[assembly: AddinCategory ("IDE extensions")]
+[assembly: AddinDescription ("Crow interface designer")]
+[assembly: AddinAuthor ("JP Bruyère")]
+
+[assembly: AddinDependency ("Core", MonoDevelop.BuildInfo.Version)]
+[assembly: AddinDependency ("Ide", MonoDevelop.BuildInfo.Version)]
+//[assembly: AddinDependency ("::Core", "7.0")]
+//[assembly: AddinDependency ("::Ide", "7.0")]
diff --git a/MDCrow/MDCrow.addin.xml b/MDCrow/MDCrow.addin.xml
new file mode 100644 (file)
index 0000000..24998c4
--- /dev/null
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ExtensionModel>    
+    <Extension path = "/MonoDevelop/Ide/DisplayBindings">           
+        <DisplayBinding
+            id = "Crow Designer"
+            insertafter ="AssemblyBrowser" 
+            class = "MDCrow.CrowDisplayBinding" />
+    </Extension>
+    <Extension path = "/MonoDevelop/Ide/Pads/ProjectPad">
+        <NodeBuilder id = "CrowNodeExtension" class = "MDCrow.CrowNodeExtension"/>
+    </Extension>
+    <Extension path = "/MonoDevelop/Core/MimeTypes">
+        <MimeType id="text/x-crow" _description="Crow interface definition" icon="md-csharp-file" isText="false">
+            <File pattern="*.crow" />
+        </MimeType>
+        <MimeType id="text/x-goml" _description="GOlib interface definition" icon="md-csharp-file" isText="false">
+            <File pattern="*.goml" />
+        </MimeType>
+
+    </Extension>
+<!--    <Extension path = "/MonoDevelop/DesignerSupport/PropertyProviders" extension-nodes="Class">
+        <Class class = "MonoDevelop.GOLib.GOLibItemPropertyProvider"/>
+    </Extension>-->
+</ExtensionModel>
\ No newline at end of file
diff --git a/MDCrow/MDCrow.csproj b/MDCrow/MDCrow.csproj
new file mode 100644 (file)
index 0000000..96c83ae
--- /dev/null
@@ -0,0 +1,30 @@
+<Project Sdk="Microsoft.NET.Sdk">
+  <PropertyGroup>
+    <TargetFramework>net461</TargetFramework>
+    <ReleaseVersion>0.8.0</ReleaseVersion>
+  </PropertyGroup>
+  <ItemGroup>
+    <Folder Include="src\" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\Crow\Crow.csproj" />
+  </ItemGroup>
+  <ItemGroup>
+<!--  <Reference Include="MonoDevelop.Core">
+      <HintPath>..\..\..\..\..\opt\lib\monodevelop\bin\MonoDevelop.Core.dll</HintPath>
+    </Reference>
+    <Reference Include="MonoDevelop.Ide">
+      <HintPath>..\..\..\..\..\opt\lib\monodevelop\bin\MonoDevelop.Ide.dll</HintPath>
+    </Reference>
+    <Reference Include="Mono.Addins">
+      <HintPath>..\..\..\..\..\opt\lib\monodevelop\bin\Mono.Addins.dll</HintPath>
+    </Reference>     
+-->
+<!--    <Reference Include="MonoDevelop.Core" />
+    <Reference Include="MonoDevelop.Ide" />
+    <Reference Include="Mono.Addins" />-->
+  </ItemGroup>
+  <ItemGroup>
+    <PackageReference Include="MonoDevelop.Addins" Version="0.4.7" />
+  </ItemGroup>
+</Project>
diff --git a/MDCrow/obj/MDCrow.csproj.nuget.cache b/MDCrow/obj/MDCrow.csproj.nuget.cache
new file mode 100644 (file)
index 0000000..5dc86cb
--- /dev/null
@@ -0,0 +1,5 @@
+{
+  "version": 1,
+  "dgSpecHash": "NOLr8yug3fyGzNdtnGuiu+nsOLipm7yDza0aE769gwIvmZfTjFbAmOPxIueJkGAXWMxx8sw4H+nYZROzeSVvUQ==",
+  "success": true
+}
\ No newline at end of file
diff --git a/MDCrow/obj/MDCrow.csproj.nuget.g.props b/MDCrow/obj/MDCrow.csproj.nuget.g.props
new file mode 100644 (file)
index 0000000..ce1dceb
--- /dev/null
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8" standalone="no"?>
+<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
+    <RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
+    <RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
+    <ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">/mnt/devel/gts/crow/MDCrow/obj/project.assets.json</ProjectAssetsFile>
+    <NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">/home/jp/.nuget/packages/</NuGetPackageRoot>
+    <NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">/home/jp/.nuget/packages/;/usr/share/dotnet/sdk/NuGetFallbackFolder</NuGetPackageFolders>
+    <NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
+    <NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">4.7.0</NuGetToolVersion>
+  </PropertyGroup>
+  <PropertyGroup>
+    <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
+  </PropertyGroup>
+  <ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
+    <Import Project="$(NuGetPackageRoot)monodevelop.addins/0.4.7/build/MonoDevelop.Addins.props" Condition="Exists('$(NuGetPackageRoot)monodevelop.addins/0.4.7/build/MonoDevelop.Addins.props')" />
+  </ImportGroup>
+</Project>
\ No newline at end of file
diff --git a/MDCrow/obj/MDCrow.csproj.nuget.g.targets b/MDCrow/obj/MDCrow.csproj.nuget.g.targets
new file mode 100644 (file)
index 0000000..175c03f
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8" standalone="no"?>
+<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
+  </PropertyGroup>
+  <ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
+    <Import Project="$(NuGetPackageRoot)monodevelop.addins/0.4.7/build/MonoDevelop.Addins.targets" Condition="Exists('$(NuGetPackageRoot)monodevelop.addins/0.4.7/build/MonoDevelop.Addins.targets')" />
+  </ImportGroup>
+</Project>
\ No newline at end of file
diff --git a/MDCrow/obj/project.assets.json b/MDCrow/obj/project.assets.json
new file mode 100644 (file)
index 0000000..d32ce72
--- /dev/null
@@ -0,0 +1,111 @@
+{
+  "version": 3,
+  "targets": {
+    ".NETFramework,Version=v4.6.1": {
+      "MonoDevelop.Addins/0.4.7": {
+        "type": "package",
+        "build": {
+          "build/MonoDevelop.Addins.props": {},
+          "build/MonoDevelop.Addins.targets": {}
+        }
+      },
+      "Crow/1.0.0": {
+        "type": "project",
+        "compile": {
+          "bin/placeholder/Crow.dll": {}
+        },
+        "runtime": {
+          "bin/placeholder/Crow.dll": {}
+        }
+      }
+    }
+  },
+  "libraries": {
+    "MonoDevelop.Addins/0.4.7": {
+      "sha512": "eUqhwtcw224cx8OjkGaCwVsl4UO78X4nE3r1PpQVGaJWopwaUvKbyDfNmGxpDAKO5/+K4v3Dxxuz5zhFpz+6hQ==",
+      "type": "package",
+      "path": "monodevelop.addins/0.4.7",
+      "files": [
+        ".signature.p7s",
+        "build/ICSharpCode.SharpZipLib.dll",
+        "build/Mono.Addins.CecilReflector.dll",
+        "build/Mono.Addins.Setup.dll",
+        "build/Mono.Addins.dll",
+        "build/Mono.Cecil.Mdb.dll",
+        "build/Mono.Cecil.Pdb.dll",
+        "build/Mono.Cecil.Rocks.dll",
+        "build/Mono.Cecil.dll",
+        "build/MonoDevelop.Addins.Tasks.dll",
+        "build/MonoDevelop.Addins.Tasks.pdb",
+        "build/MonoDevelop.Addins.props",
+        "build/MonoDevelop.Addins.targets",
+        "monodevelop.addins.0.4.7.nupkg.sha512",
+        "monodevelop.addins.nuspec"
+      ]
+    },
+    "Crow/1.0.0": {
+      "type": "project",
+      "path": "../Crow/Crow.csproj",
+      "msbuildProject": "../Crow/Crow.csproj"
+    }
+  },
+  "projectFileDependencyGroups": {
+    ".NETFramework,Version=v4.6.1": [
+      "Crow >= 1.0.0",
+      "MonoDevelop.Addins >= 0.4.7"
+    ]
+  },
+  "packageFolders": {
+    "/home/jp/.nuget/packages/": {},
+    "/usr/share/dotnet/sdk/NuGetFallbackFolder": {}
+  },
+  "project": {
+    "version": "1.0.0",
+    "restore": {
+      "projectUniqueName": "/mnt/devel/gts/crow/MDCrow/MDCrow.csproj",
+      "projectName": "MDCrow",
+      "projectPath": "/mnt/devel/gts/crow/MDCrow/MDCrow.csproj",
+      "packagesPath": "/home/jp/.nuget/packages/",
+      "outputPath": "/mnt/devel/gts/crow/MDCrow/obj",
+      "projectStyle": "PackageReference",
+      "fallbackFolders": [
+        "/usr/share/dotnet/sdk/NuGetFallbackFolder"
+      ],
+      "configFilePaths": [
+        "/mnt/devel/gts/crow/.nuget/NuGet.config",
+        "/home/jp/.config/NuGet/NuGet.Config"
+      ],
+      "originalTargetFrameworks": [
+        "net461"
+      ],
+      "sources": {
+        "/mnt/devel/gts/crow-xlib/build/Debug": {},
+        "https://api.nuget.org/v3/index.json": {}
+      },
+      "frameworks": {
+        "net461": {
+          "projectReferences": {
+            "/mnt/devel/gts/crow/Crow/Crow.csproj": {
+              "projectPath": "/mnt/devel/gts/crow/Crow/Crow.csproj"
+            }
+          }
+        }
+      },
+      "warningProperties": {
+        "warnAsError": [
+          "NU1605"
+        ]
+      }
+    },
+    "frameworks": {
+      "net461": {
+        "dependencies": {
+          "MonoDevelop.Addins": {
+            "target": "Package",
+            "version": "[0.4.7, )"
+          }
+        }
+      }
+    }
+  }
+}
\ No newline at end of file
diff --git a/MDCrow/src/CrowCanvas.cs b/MDCrow/src/CrowCanvas.cs
new file mode 100644 (file)
index 0000000..c1942b8
--- /dev/null
@@ -0,0 +1,48 @@
+//
+// CrowCanvas.cs
+//
+// Author:
+//       Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
+//
+// Copyright (c) 2013-2017 Jean-Philippe Bruyère
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+using System;
+using System.Collections.Generic;
+using System.IO;
+
+namespace MDCrow
+{
+       [System.ComponentModel.Category ("Crow.CrowDesigner")]
+       [System.ComponentModel.ToolboxItem (true)]
+       public class CrowCanvas : Gtk.DrawingArea
+       {
+               DesignInterface iface;
+
+               public CrowCanvas ()
+               {
+               }
+               public override void Dispose ()
+               {
+                       base.Dispose ();
+                       iface.Dispose ();
+               }
+
+       }
+}
diff --git a/MDCrow/src/CrowDisplayBinding.cs b/MDCrow/src/CrowDisplayBinding.cs
new file mode 100644 (file)
index 0000000..627b480
--- /dev/null
@@ -0,0 +1,57 @@
+//
+// command.cs
+//
+// Author:
+//       jp <>
+//
+// Copyright (c) 2018 jp
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+using MonoDevelop.Core;
+using MonoDevelop.Ide.Gui;
+using MonoDevelop.Projects;
+
+
+namespace MDCrow
+{
+       class CrowDisplayBinding : IViewDisplayBinding
+       {
+               bool canHandle = false;
+
+               public string Name {
+                       get {
+                               return GettextCatalog.GetString ("Crow designer");
+                       }
+               }
+               public bool CanUseAsDefault { get { return true; } }
+
+               public bool CanHandle (FilePath fileName, string mimeType, Project ownerProject)
+               {
+                       canHandle = mimeType.StartsWith ("text/x-goml", System.StringComparison.OrdinalIgnoreCase) |
+                                                               mimeType.StartsWith ("text/x-crow", System.StringComparison.OrdinalIgnoreCase);
+                       return canHandle;
+               }
+
+               ViewContent IViewDisplayBinding.CreateContent (FilePath fileName, string mimeType, Project ownerProject)
+               {
+                       return new CrowView ();
+               }
+       }
+}
\ No newline at end of file
diff --git a/MDCrow/src/CrowView.cs b/MDCrow/src/CrowView.cs
new file mode 100644 (file)
index 0000000..a1f7301
--- /dev/null
@@ -0,0 +1,64 @@
+//
+// CrowView.cs
+//
+// Author:
+//       Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
+//
+// Copyright (c) 2013-2017 Jean-Philippe Bruyère
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+using System;
+using System.IO;
+using System.Threading.Tasks;
+using MonoDevelop.Components;
+using MonoDevelop.Ide.Gui;
+using Xwt;
+
+namespace MDCrow
+{
+       public class CrowView : ViewContent
+       {
+               CrowCanvas view;
+
+               public override Control Control {
+                       get { return view; }
+               }
+
+               public CrowView () {
+                       view = new CrowCanvas ();
+
+               }
+
+               string src;
+
+               public override async Task Load (FileOpenInformation fileOpenInformation)
+               {
+                       var fileName = fileOpenInformation.FileName;
+                       using (Stream stream = File.OpenRead (fileName)) {
+                               using (StreamReader sr = new StreamReader (stream)) {
+                                       src = await sr.ReadToEndAsync ();
+                               }
+                       }
+
+                       ContentName = fileName;
+                       this.IsDirty = false;
+                       view.SetFocus ();
+               }
+       }
+}
diff --git a/MDCrow/src/DesignInterface.cs b/MDCrow/src/DesignInterface.cs
new file mode 100644 (file)
index 0000000..64c10c2
--- /dev/null
@@ -0,0 +1,212 @@
+//
+// DesignInterface.cs
+//
+// Author:
+//       Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
+//
+// Copyright (c) 2013-2017 Jean-Philippe Bruyère
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+using System;
+using Crow;
+using System.Globalization;
+using System.Threading;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.IO;
+using Crow.Cairo;
+
+namespace MDCrow
+{
+       public class DesignInterface : Interface, IValueChange
+       {
+               #region IValueChange implementation
+               /// <summary>
+               /// Raise to notify that the value of a property has changed, the binding system
+               /// rely mainly on this event. the member name may not be present in the class, this is 
+               /// used in **propertyless** bindings, this allow to raise custom named events without needing
+               /// to create an new one in the class or a new property.
+               /// </summary>
+               public event EventHandler<ValueChangeEventArgs> ValueChanged;
+               /// <summary>
+               /// Helper function to raise the value changed event
+               /// </summary>
+               public virtual void NotifyValueChanged(string MemberName, object _value)
+               {
+                       //Debug.WriteLine ("Value changed: {0}->{1} = {2}", this, MemberName, _value);
+                       ValueChanged.Raise(this, new ValueChangeEventArgs(MemberName, _value));
+               }
+               #endregion
+
+               public DesignInterface () : base()
+               {
+               }
+
+               //public ProjectFile ProjFile;
+
+
+
+               public override Widget CreateInstance (string path)
+               {
+                       ProjectFile pi;
+
+                       if (ProjFile.Project.solution.GetProjectFileFromPath (path, out pi))
+                               return CreateITorFromIMLFragment (pi.Source).CreateInstance();                                  
+               
+                       return null;
+               }
+               public override Stream GetStreamFromPath (string path)
+               {
+                       ProjectFile pi;
+                       if (ProjFile.Project.solution.GetProjectFileFromPath (path, out pi)) {
+                               return new FileStream (pi.AbsolutePath, FileMode.Open); 
+                       }
+                       throw new Exception ($"In Design File not found: {path}");
+               }
+
+               protected override void InitBackend ()
+               {
+                       //surf = new Cairo.ImageSurface (Format.Argb32, 100, 100);
+               }
+               public override void ProcessResize (Rectangle bounds)
+               {
+                       if (bounds == clientRectangle)
+                               return;
+                       lock (UpdateMutex) {
+                               clientRectangle = bounds;
+                               surf.Dispose ();
+                               surf = new ImageSurface (Format.Argb32, clientRectangle.Width, clientRectangle.Height);
+
+                               foreach (Widget g in GraphicTree)
+                                       g.RegisterForLayouting (LayoutingType.All);
+
+                               RegisterClip (clientRectangle);
+                       }
+
+               }
+               public override bool ProcessMouseMove (int x, int y)
+               {
+                       int deltaX = x - Mouse.X;
+                       int deltaY = y - Mouse.Y;
+                       Mouse.X = x;
+                       Mouse.Y = y;
+                       MouseMoveEventArgs e = new MouseMoveEventArgs (x, y, deltaX, deltaY);
+                       e.Mouse = Mouse;
+
+                       if (ActiveWidget != null) {
+                               //TODO, ensure object is still in the graphic tree
+                               //send move evt even if mouse move outside bounds
+                               ActiveWidget.onMouseMove (this, e);
+                               if (!ActiveWidget.IsDragged)//if active is dragged, process mouse move as it was not visible.
+                                       return true;
+                       }
+
+                       if (HoverWidget != null) {
+                               
+                               //check topmost graphicobject first
+                               Widget tmp = HoverWidget;
+                               Widget topc = null;
+                               while (tmp is Widget) {
+                                       topc = tmp;
+                                       tmp = tmp.LogicalParent as Widget;
+                               }
+                               int idxhw = GraphicTree.IndexOf (topc);
+                               if (idxhw != 0) {
+                                       int i = 0;
+                                       while (i < idxhw) {
+                                               if (GraphicTree [i].localLogicalParentIsNull) {
+                                                       if (GraphicTree [i].MouseIsIn (e.Position)) {
+                                                               while (HoverWidget != null) {
+                                                                       HoverWidget.onMouseLeave (HoverWidget, e);
+                                                                       HoverWidget = HoverWidget.LogicalParent as Widget;
+                                                               }
+
+                                                               GraphicTree [i].checkHoverWidget (e);
+                                                               return true;
+                                                       }
+                                               }
+                                               i++;
+                                       }
+                               }
+
+                               if (HoverWidget.MouseIsIn (e.Position)) {
+                                       if (!(HoverWidget is TemplatedControl))
+                                               HoverWidget.checkHoverWidget (e);
+                                       return true;
+                               } else {
+                                       HoverWidget.onMouseLeave (HoverWidget, e);
+                                       //seek upward from last focused graph obj's
+                                       while (HoverWidget.LogicalParent as Widget != null) {
+                                               HoverWidget = HoverWidget.LogicalParent as Widget;
+                                               if (HoverWidget.MouseIsIn (e.Position)) {
+                                                       HoverWidget.checkHoverWidget (e);
+                                                       return true;
+                                               } else
+                                                       HoverWidget.onMouseLeave (HoverWidget, e);
+                                       }
+                               }
+                       }
+
+                       //top level graphic obj's parsing
+                       lock (GraphicTree) {
+                               for (int i = 0; i < GraphicTree.Count; i++) {
+                                       Widget g = GraphicTree [i];
+                                       if (g.MouseIsIn (e.Position)) {
+                                               if (!(HoverWidget is TemplatedControl))
+                                                       g.checkHoverWidget (e);
+                                               if (g is Window)
+                                                       PutOnTop (g);
+                                               return true;
+                                       }
+                               }
+                       }
+                       HoverWidget = null;
+                       return false;           
+               }
+       
+               protected override void processLayouting ()
+               {
+                       #if MEASURE_TIME
+                       layoutingMeasure.StartCycle();
+                       #endif
+
+                       if (Monitor.TryEnter (LayoutMutex)) {
+                               DiscardQueue = new Queue<LayoutingQueueItem> ();
+                               LayoutingQueueItem lqi;
+                               while (LayoutingQueue.Count > 0) {
+                                       lqi = LayoutingQueue.Dequeue ();
+                                       //Console.WriteLine (lqi.ToString ());
+                                       #if DEBUG_LAYOUTING
+                                       currentLQI = lqi;
+                                       curLQIsTries.Add(currentLQI);
+                                       #endif
+                                       lqi.ProcessLayouting ();
+                               }
+                               LayoutingQueue = DiscardQueue;
+                               Monitor.Exit (LayoutMutex);
+                               DiscardQueue = null;
+                       }
+
+                       #if MEASURE_TIME
+                       layoutingMeasure.StopCycle();
+                       #endif
+               }
+       }
+}
+
diff --git a/MDCrow/src/MDCrowNodeExtension.cs b/MDCrow/src/MDCrowNodeExtension.cs
new file mode 100644 (file)
index 0000000..115acc4
--- /dev/null
@@ -0,0 +1,131 @@
+//
+// MDCrowNodeExtension.cs
+//
+// Author:
+//       Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
+//
+// Copyright (c) 2013-2017 Jean-Philippe Bruyère
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+using System;
+using MonoDevelop.Components.Commands;
+using MonoDevelop.Ide;
+using MonoDevelop.Ide.Gui.Components;
+using MonoDevelop.Projects;
+
+namespace MDCrow
+{
+       enum Commands
+       {
+               ShowCrowViewer
+       }
+
+       class CrowNodeExtension : NodeBuilderExtension
+       {
+               public override Type CommandHandlerType {
+                       get { return typeof (CrowCommandHandler); }
+               }
+               public override bool CanBuildNode (Type dataType)
+               {
+                       return typeof (ProjectFile).IsAssignableFrom (dataType);
+               }
+               public override void BuildNode (ITreeBuilder treeBuilder, object dataObject, NodeInfo nodeInfo)
+               {
+                       ProjectFile pf = dataObject as ProjectFile;
+
+                       //                      string mimeType = DesktopService.GetMimeTypeForUri (pf.FilePath);
+                       //                      if (mimeType.StartsWith ("image/", StringComparison.CurrentCultureIgnoreCase)) {
+                       //                              Image i;
+                       //                              if (pf != null) {                               
+                       //                                      i = Image.FromFile (pf.FilePath);
+                       //                                      nodeInfo.Icon = i.Scale (16.0 / i.Width, 16.0 / i.Height);
+                       //                              }
+                       //                      }
+
+                       base.BuildNode (treeBuilder, dataObject, nodeInfo);
+               }
+       }
+
+       class CrowCommandHandler : NodeCommandHandler //, IPropertyPadProvider
+       {
+               [CommandHandler (Commands.ShowCrowViewer)]
+               protected void OnShowGOLibViewer ()
+               {
+
+                       CrowView view = new CrowView ();
+
+                       ProjectFile file = CurrentNode.DataItem as ProjectFile;
+
+                       if (file != null)
+                               view.Load (file.FilePath);
+
+
+                       IdeApp.Workbench.OpenDocument (view, true);
+                       //IdeApp.Workbench.Documents.Where (d => d.FileName == file.FilePath);
+               }
+
+               //              public override void ActivateItem ()
+               //              {
+               //                      ProjectFile o = this.CurrentNode.DataItem as ProjectFile;
+               //
+               //                      Ide.Gui.Document[] doc = IdeApp.Workbench.Documents.Where (d => d.FileName == o.FilePath).ToArray();
+               //                      var tmp = MonoDevelop.Ide.Gui.DisplayBindingService.GetFileViewers (o.FilePath, o.Project).ToList();
+               //
+               //                      OnShowGOLibViewer ();
+               //              }
+
+               //              #region IPropertyPadProvider implementation
+               //              public object GetActiveComponent ()
+               //              {
+               //                      if (CurrentNodes.Length == 1)
+               //                              return CurrentNode.DataItem;
+               //                      else
+               //                              return null;
+               //              }
+               //              public object GetProvider ()
+               //              {
+               //                      return null;
+               //              }
+               //              public void OnEndEditing (object obj)
+               //              {
+               //                      throw new NotImplementedException ();
+               //              }
+               //              public void OnChanged (object obj)
+               //              {
+               //                      
+               //              }
+               //              #endregion
+       }
+
+       //      class GOLibItemPropertyProvider : IPropertyProvider
+       //      {
+       //              #region IPropertyProvider implementation
+       //              public object CreateProvider (object obj)
+       //              {
+       //                      var projectFile = obj as ProjectFile;
+       //                      return projectFile;
+       //              }
+       //
+       //              public bool SupportsObject (object obj)
+       //              {
+       //                      return obj is ProjectFile;
+       //              }
+       //              #endregion
+       //      }
+}
index b4d7840c6c168e31cd8504a826f2d6b460d288fa..662ad4818d0e05e58729d7d2b42c9eb575182d59 100644 (file)
@@ -111,7 +111,7 @@ namespace tests
                                //                              win.Show ();
                                //app.LoadIMLFragment (@"<SimpleGauge Level='40' Margin='5' Background='Jet' Foreground='Grey' Width='30' Height='50%'/>");
 
-                               app.CMDTest = new Command(new Action(() => app.AddWidget (app.instFileDlg.CreateInstance()).DataSource = app)) { Caption = "Test", Icon = new SvgPicture("#Tests.image.blank-file.svg"), CanExecute = true};
+                               //app.CMDTest = new Command(new Action(() => app.AddWidget (app.instFileDlg.CreateInstance()).DataSource = app)) { Caption = "Test", Icon = new SvgPicture("#Tests.image.blank-file.svg"), CanExecute = true};
                                //app.AddWidget (@"Interfaces/Divers/testFocus.crow").DataSource = app;
                                //app.AddWidget (@"Interfaces/Divers/testMenu.crow").DataSource = app;
                                //app.AddWidget (@"Interfaces/Divers/testVisibility.crow").DataSource = app;
@@ -168,11 +168,12 @@ namespace tests
                                                app.NotifyValueChanged ("TestColor", Color.Red);
                                        else
                                                app.NotifyValueChanged ("TestColor", Color.Blue);*/
-                                       
+
                                        /*#if MEASURE_TIME
                                        foreach (PerformanceMeasure m in app.PerfMeasures)
                                                m.NotifyChanges ();     
                                        #endif*/
+                                       app.Update ();
                                        app.ProcessEvents ();
                                        //Thread.Sleep(1);
                                }
index eee1515d2d98cc860de039a2bfddf6a52420678b..43579d2a806a700137074db4de328f300aca3c5f 100644 (file)
@@ -24,7 +24,7 @@
 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 // THE SOFTWARE.
 using System;
-using Cairo;
+using Crow.Cairo;
 using Crow;
 
 namespace Test
index 23964e9c53e757bedc040a654c348ec121bdef7a..c481095c943089c068adb891d15365b0e9c276b3 100644 (file)
@@ -25,7 +25,7 @@
 // THE SOFTWARE.
 using System;
 using Crow;
-using Cairo;
+using Crow.Cairo;
 
 namespace Tutorials2
 {      
index b5b7811f0c02bb3b08c9c06d6df70d1358141b61..b3fb71239f248d201939402702de7afe1e8718c8 100644 (file)
@@ -26,7 +26,7 @@
 using System;
 using Crow;
 using System.ComponentModel;
-using Cairo;
+using Crow.Cairo;
 using System.Diagnostics;
 
 namespace Crow
index 2301812a383cf37fffcad5c7963215c9ba2f527f..170a48ead5505ea79c92586f1be6362c2691944d 100644 (file)
@@ -26,7 +26,7 @@
 using System;
 using Crow;
 using System.ComponentModel;
-using Cairo;
+using Crow.Cairo;
 
 namespace Tutorials
 {
index 4f818e51e7ccaa44fb4ba8416afc16359da3d5d8..3701a7e6f2304549aac01301500848a2eaea19be 100644 (file)
@@ -37,7 +37,7 @@ namespace Tests
                {
                        return base.measureRawSize (lt) + 6;
                }
-               protected override void onDraw (Cairo.Context gr)
+               protected override void onDraw (Crow.Cairo.Context gr)
                {
                        gr.Save ();
 
@@ -51,7 +51,7 @@ namespace Tests
                        gr.Restore ();
                }
 
-               void drawTechBorder1 (Cairo.Context gr){
+               void drawTechBorder1 (Crow.Cairo.Context gr){
                        Rectangle r = ClientRectangle;
 
                        double l1 = Math.Round(0.2 * Math.Min (r.Width, r.Height)) + 0.5;
index d608cf00a99de8595a1a62e5a5a81355c5725246..542e2ba47365b6477a0cd51f989e423cdcbc3f94 100755 (executable)
@@ -1,4 +1,4 @@
 <?xml version="1.0"?>
-<VerticalStack >
-    <Label Text="{StringTest}" Background="SeaGreen" DataSourceType="MainClass"/>
-</VerticalStack>
+
+    <Button CornerRadius="0" Background="Red"/>
+