
Do you see any difference?
namespace Cairo public Rectangle (construct double X, construct double Y, public double X public double Y public double Width public double Height public static bool Equals (Rectangle rectangle, Rectangle other) public static bool NotEquals (Rectangle rectangle, Rectangle other)using GLib;
{
public class Rectangle
: Object
{
construct double Width, construct double Height)
{
}
{
get;
set construct;
}
{
get;
set construct;
}
{
get;
set construct;
}
{
get;
set construct;
}
{
return rectangle.X == other.X && rectangle.Y == other.Y
&& rectangle.Width == other.Width && rectangle.Height == other.Height;
}
{
return !(Rectangle.Equals (rectangle, other));
}
}
}
First is C# code, second is Vala code. Object oriented GObject syntax.
Use:
valac --pkg=cairo Rectangle.vala
Then:
gcc `pkg-config --libs glib-2.0 --cflags glib-2.0` -I . Rectangle.c -shared -o rectangle.so
enjoy