Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-swt-dev] Re: GC Code cleanup (2)

Laurent M. wrote:
see "GC Code cleanup" for the context.. .


I also noticed the pattern of

Color.carbon_new
Color.gtk_new
Color.win32_new

I was wondering why not have a Color.allocate_new

or have both, or have a ColorFactory.allocate_new for each supported platform, such that my portable GC's GC.getBackground() could then call any of these to get a valid platform specific color instance.

[santa?!! saaaannnta... can u tell'em about that one too pleaaasse]

cheers.



I figured that one out... duhh... the color model is not the same so the signature cannot be the same...

ok, so for now I am going with

Color ColorFactory::allocate_new(Device d, Object rgb)

that will work for float[] (serious platforms) , int[] (win32)...

sorry.



Back to the top