[Mono-dev] patch for Mono.Cairo to rename Graphics to Context
Peter Dennis Bartok
peter at novonyx.com
Tue Nov 29 12:13:45 EST 2005
Being consistent with other language bindings enables users to easily switch
languages and switch to using Mono for their cairo needs without relearning
or posting support questions.
The cairo documentation refers to 'Contexts', the language binding
specification says this: "For this reason, and for inter-language
consistency all object-oriented languages should name this type as if it
were cairo_context_t. "
When we moved Mono.Cairo to cairo 1.0 we should have followed the language
binding specs that cairo provides instead of sticking with what it was
called when Mono.Cairo was created and no language binding docs existed.
I would rather have a little pain now, affecting an unstable release, than
lots of pain later, if we ever decided to change it after all.
The [Obsolete] attribute sounds like a good idea.
Cheers,
Peter
-----Original Message-----
From: "Mike Kestner" <mkestner at novell.com>
To: "John Luke" <john.luke at gmail.com>
Cc: <mono-devel-list at lists.ximian.com>
Date: 29 November, 2005 09:57
Subject: Re: [Mono-dev] patch for Mono.Cairo to rename Graphics to Context
>On Mon, 2005-11-28 at 21:10 -0500, John Luke wrote:
>> Hello,
>>
>> Here is a patch that renames the Graphics class to Context, like all the
>> other cairo bindings use. It would be a breaking change, but I think it
>> will be less confusing for developers. Please speak up if you disagree.
>>
>> There is one other API change I think would be nice, but I dont think
>> I'll have time to do it this week. That is to change PointD, Color, etc
>> to structs and rename PointD to Point. Everything else should be able
>> to be handled in an API compatible way.
>
>Seems like a gratuitous change to me.
>
>We are already exposing Cairo.Graphics in the 2.7.1 release of Gtk#.
>It's an unstable release, so I can change the symbol still, but the
>change as posted would break 2.7.1 on newer mono releases.
>
>If this change is going to be made, at the very least I would suggest
>adding something like:
>
>[Obsolete ("Replaced by Cairo.Context")]
>public class Graphics : Context {}
>
>That would at least give source compat, if not runtime compat. But I
>don't personally think it's worth changing just to be consistent with
>other language bindings.
>
>--
>Mike Kestner <mkestner at novell.com>
>
>_______________________________________________
>Mono-devel-list mailing list
>Mono-devel-list at lists.ximian.com
>http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
>
More information about the Mono-devel-list
mailing list