gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Suggestion for improving backend configuration...


From: Fred Kiefer
Subject: Re: Suggestion for improving backend configuration...
Date: Wed, 27 Jun 2012 23:36:03 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120601 Thunderbird/13.0

On 27.06.2012 17:02, Gregory Casamento wrote:
Guys, currently the code which configures the backend graphics context
looks like this:

   /* What backend context? */
   if ([defs stringForKey: @"GSContext"])
     context = [defs stringForKey: @"GSContext"];

   if ([context isEqual: @"xdps"])
     contextClass = NSClassFromString(@"NSDPSContext");
   else if ([context isEqual: @"art"])
     contextClass = NSClassFromString(@"ARTContext");
   else if ([context isEqual: @"winlib"])
     contextClass = NSClassFromString(@"WIN32Context");
    else if ([context isEqual: @"cairo"])
     contextClass = NSClassFromString(@"CairoContext");
  else
     contextClass = NSClassFromString(@"XGContext");

I think that this information should come from the backend bundles
plist if possible.  This way it's possible to create a backend without
needing to modify backend code directly.

Any thoughts?

Later, GC


Getting this information from the plist instead of hard coding the values here is fine by me. But how would the correct value get into the plist and how can you write a backend without touching the backend code?

Completely puzzled,
Fred



reply via email to

[Prev in Thread] Current Thread [Next in Thread]