Ticket #7 (closed enhancement: fixed)

Opened 10 months ago

Last modified 10 months ago

class cairoLib.Cairo should be renamed to cairo.Context

Reported by: kaarna Assigned to: JJR
Priority: minor Milestone: Pre-release 8
Component: gtkd - classes Version:
Keywords: cairo context namechange Cc:

Description

class cairoLib.Cairo should be renamed to cairo.Context because that's the name of it in C and any other language wrapper for cairo.

To sum it up:
Change the names of
/src/cairoLib/ -> /src/cairo/
/src/cairoLib/Cairo.d -> /src/cairo/Context.d

That will make all the documentation for cairo to apply to gtkD cairo too.

Change History

12/19/07 10:15:16 changed by JJR

  • status changed from new to assigned.

In experimental branch I'm going to mantain, I've already done some directory restructuring and name changes, including this change to cairo. I agree that the svn should have cairoLib -> cairo. I'll take the ticket. :)

12/22/07 14:24:30 changed by JJR

Just want to add a comment... while cairo/Context.d makes sense to some degree... the other language wrappers actually use Context as the name of the class, not the namespace. This class in D is currently called "Cairo". Should it be named Context instead?

The problem here is that D namespaces are file/package oriented... which can be a bit of a pain sometimes. The above change would produce a fully qualified name of cairo.Context.Cairo or (if we are consistant with other wrappers) cairo.Context.Context. Either way it's wierd. I'd just as soon do cairo.Cairo.Context... which represents the real meaning better. Thoughts?

12/22/07 19:03:15 changed by JJR

  • status changed from assigned to closed.
  • resolution set to fixed.

I've update cairo.Cairo to cairo.Context. The internal class is also changed to Context to match the module name (as it should). I notice another D Cairo wrapper did it this way too (cairo4d), so I guess this is the way to go. Let's see how we like it. If it doesn't work out, we can at least revert it back.

The Cairo demo has also been changed to use Context.